💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
``` getAccessToken(){ //获取access_token this.$httpRequest('POST','/getAccessToken').then(res=>{ if(res&&res.status==200){ this.shareToken = res.access_token; this.getWxCode(res.access_token) } }) }, getWxCode(shareToken) { //获取小程序码 let that = this uni.showLoading({ title: '加载中', mask: true }) uni.request({ url: `https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=${shareToken}`, method: "POST", data: { access_token:shareToken, width: 280, path: 'pages/detail/detail?data='+this.detaiId }, responseType: 'arraybuffer', success: function(res) { uni.hideLoading(); let src = uni.arrayBufferToBase64(res.data); that.codeImg = 'data:image/png;base64,' + src; } }) }, ``` ~~~jsx getAccessToken(){ //获取access_token this.$httpRequest('POST','/getAccessToken').then(res=>{ if(res&&res.status==200){ this.shareToken = res.access_token; this.getWxCode(res.access_token) } }) }, getWxCode(shareToken) { //获取小程序码 let that = this uni.showLoading({ title: '加载中', mask: true }) uni.request({ url: `https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=${shareToken}`, method: "POST", data: { access_token:shareToken, width: 280, path: 'pages/detail/detail?data='+this.detaiId }, responseType: 'arraybuffer', success: function(res) { uni.hideLoading(); let src = uni.arrayBufferToBase64(res.data); that.codeImg = 'data:image/png;base64,' + src; } }) }, ~~~