|
|
@@ -77,12 +77,13 @@ export async function getSelfInfo(update) {
|
|
|
* @parmas update为true时会重新触发请求,重置vuex的数据
|
|
|
*/
|
|
|
export async function wxLoginFn(update) {
|
|
|
+
|
|
|
let dataInfo = null
|
|
|
let loginInfo = store.state.login.loginInfo
|
|
|
if (!util.isEmpty(loginInfo) && !update) {
|
|
|
return loginInfo
|
|
|
}
|
|
|
- return new Promise(resolve => {
|
|
|
+ return new Promise((resolve,reject) => {
|
|
|
uni.login({
|
|
|
provider: 'weixin',
|
|
|
success: res => {
|
|
|
@@ -129,6 +130,9 @@ export async function wxLoginFn(update) {
|
|
|
}
|
|
|
|
|
|
})
|
|
|
+ },
|
|
|
+ fail:err=>{
|
|
|
+ reject(err)
|
|
|
}
|
|
|
})
|
|
|
})
|