Commit 300b5e3a by sunchao

解决游客登陆强制退出后停留在首页bug和token报错提示bug&配置了云打包相机权限

parent a72609c7
......@@ -123,12 +123,16 @@
type:"1",
source: "cffp"
}
if(common.mobileNoValid(this.form.mobile) && !this.disabledSendBtn){
api.verificationCode(params).then((res)=>{
if(res['success']){
this.delayTime()
}
})
if(common.mobileNoValid(this.form.mobile)){
if(!this.disabledSendBtn){
api.verificationCode(params).then((res)=>{
if(res['success']){
this.delayTime()
}else{
common.errorDialog(2,res['message'])
}
})
}
}else{
common.errorDialog(2,'手机号校验错误')
}
......@@ -179,12 +183,12 @@
inviterInvitationCode:this.invitation_code,
...this.form
}
console.log(params)
api.register(params).then((res)=>{
if(res['success']){
this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1')
uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('uni-token', res.data['token']);
uni.switchTab({
url:'/pages/index/index'
})
......
......@@ -19,7 +19,7 @@ const config = {
stage,
prod
}
let env = 'dev';
let env = 'prod';
// if (process.env.NODE_ENV === 'development') {
// env = 'dev';
// }else if (process.env.NODE_ENV === 'production') {
......
......@@ -26,7 +26,8 @@
"Share" : {},
"Payment" : {},
"VideoPlayer" : {},
"OAuth" : {}
"OAuth" : {},
"Camera" : {}
},
/* 应用发布信息 */
"distribute" : {
......
......@@ -174,12 +174,12 @@
if (uni.getStorageSync('isLogin')) {
this.queryAreaCenterInfo();
this.announcementQuery();
this.courseList()
} else {
uni.navigateTo({
url: '/components/login/login'
})
}
this.courseList()
},
onShow() {
let loginType = uni.getStorageSync('loginType')
......@@ -229,6 +229,7 @@
duration: 2000,
icon: 'none'
});
uni.clearStorageSync();
uni.redirectTo({
url:'/components/login/login'
})
......
......@@ -65,7 +65,6 @@ import MenuList from "@/components/menuList/menuList.vue"
showCancel: true,
success: function(res) {
if (res.confirm) {
console.log(getCurrentPages().length)
uni.redirectTo({
url:'/components/login/login'
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment