移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
509 B

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))
}
})
})
}