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.
 
 
 
 
 
 
pifa/api/wxofficial.js

25 lines
596 B

import request from '@/utils/request'
// api地址
const api = {
jssdkConfig: 'wxofficial/jssdkConfig',
oauthUrl: 'wxofficial/oauthUrl',
oauthUserInfo: 'wxofficial/oauthUserInfo'
}
// 获取微信公众号jssdk配置参数
const jssdkConfig = url => {
return request.get(api.jssdkConfig, { url })
}
// 获取授权登录地址
const oauthUrl = callbackUrl => {
return request.get(api.oauthUrl, { callbackUrl })
}
// 获取微信用户信息
const oauthUserInfo = code => {
return request.get(api.oauthUserInfo, { code })
}
export default { jssdkConfig, oauthUrl, oauthUserInfo }