import { getAccessToken } from '@/utils/auth' import { toast } from '@/utils/common.js' export function getQrcode(data) { return new Promise((resolve, reject) => { uni.request({ url: `https://api.weixin.qq.com/wxa/getwxacode?access_token=${getAccessToken()}`, header: { 'content-type': 'application/x-www-form-urlencoded' }, data, method: 'POST', dataType: 'json', success: (res) => { resolve(res.data) }, fail: (err) => { reject(toast(err.errMsg)) } }) }) }