修复微信授权bug
This commit is contained in:
parent
0957979d20
commit
b3bdfe373a
@ -12,8 +12,8 @@ let httpApiSix
|
|||||||
let wsApi
|
let wsApi
|
||||||
|
|
||||||
// 在打包之前请检查当前环境是否正确
|
// 在打包之前请检查当前环境是否正确
|
||||||
const env = 'dev'; // 开发
|
// const env = 'dev'; // 开发
|
||||||
// const env = 'prod'; // 生产
|
const env = 'prod'; // 生产
|
||||||
// const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
|
@ -206,7 +206,7 @@ class AuthWechat {
|
|||||||
} else {
|
} else {
|
||||||
uni.setStorageSync('auth_token', res.data.result.key);
|
uni.setStorageSync('auth_token', res.data.result.key);
|
||||||
return uni.navigateTo({
|
return uni.navigateTo({
|
||||||
url: '/pages/users/login/index'
|
url: '/pages/users/login/login_copy'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "惠农生活",
|
"name" : "惠农生活",
|
||||||
"appid" : "__UNI__3A527D1",
|
"appid" : "__UNI__3A527D1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.9.4",
|
"versionName" : "1.9.5",
|
||||||
"versionCode" : 194,
|
"versionCode" : 195,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
console.log(option);
|
||||||
let that = this
|
let that = this
|
||||||
const {
|
const {
|
||||||
code,
|
code,
|
||||||
@ -33,12 +34,13 @@
|
|||||||
} = option;
|
} = option;
|
||||||
wechat.auth(code, state)
|
wechat.auth(code, state)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// console.log(decodeURIComponent(decodeURIComponent(option.back_url)),'back_url')
|
console.log('----', decodeURIComponent(decodeURIComponent(option.back_url)),'back_url')
|
||||||
const href = decodeURIComponent(decodeURIComponent(option.back_url))
|
const href = decodeURIComponent(decodeURIComponent(option.back_url))
|
||||||
location.replace(href)
|
location.replace(href)
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
location.replace("/");
|
console.log('----', {...err})
|
||||||
|
location.replace("/pages/users/login/login_copy");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<view>
|
||||||
<view class="container" v-if="merchantInfo && !isEmpty">
|
<view class="container" v-if="merchantInfo && !isEmpty">
|
||||||
<view class="v-navbar">
|
<view class="v-navbar">
|
||||||
<u-navbar title="面对面收款" :safeAreaInsetTop="false" :fixed="false" :autoBack="true" bgColor="transparent"
|
<u-navbar title="面对面收款" :safeAreaInsetTop="false" :fixed="false" :autoBack="true" bgColor="transparent"
|
||||||
@ -51,6 +52,7 @@
|
|||||||
<!-- 登陆 -->
|
<!-- 登陆 -->
|
||||||
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
|
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user