Commit 300b5e3a by sunchao

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

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