feat:173版本
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
|
||||
import { wechatLogin } from "@/api/auth.js";
|
||||
// 服务端接口 - 获取手机号
|
||||
function getPhoneNumberFn(code,phoneCode ) {
|
||||
return new Promise(resolve => {
|
||||
wechatLogin({
|
||||
mobile:'',
|
||||
smscode:'',
|
||||
phoneCode:phoneCode,
|
||||
token:code,
|
||||
type:1,
|
||||
isValid: true,
|
||||
}).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('获取手机号失败2:', err);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 微信api : 微信登录
|
||||
function loginFn() {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.login({
|
||||
success: async (res) => {
|
||||
// 第一遍code
|
||||
resolve(res)
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('login fail:', err);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
loginFn,
|
||||
getPhoneNumberFn
|
||||
}
|
||||
Reference in New Issue
Block a user