Commit 63d48d0b by jianan

fix(cffp): 游客首页改为零身份初始化

parent edc5e8e9
...@@ -531,28 +531,15 @@ ...@@ -531,28 +531,15 @@
] ]
uni.removeTabBarBadge({ index: 3 }); uni.removeTabBarBadge({ index: 3 });
// api.loginVerification({ // 游客没有用户身份,直接读取公共首页内容。
// "loginType": 1, this.userId = '';
// }).then((res) => { uni.removeStorageSync('isLogin');
// if (res['success']) { uni.removeStorageSync('cffp_userId');
// this.userId = String(res['data']['userId']); uni.setStorageSync('loginType', 'visitor');
// uni.setStorageSync('isLogin', '1');
// uni.setStorageSync('cffp_userId', this.userId);
// uni.setStorageSync('loginType', 'visitor');
// uni.setStorageSync('uni-token', res.data['token']);
// } else {
// uni.showToast({
// title: res['message'],
// duration: 2000,
// icon: 'none'
// })
// }
// })
this.courseList(); this.courseList();
this.getOneProduct() this.getOneProduct();
this.initShare(); this.initShare();
this.queryAreaCenterInfo() this.queryAreaCenterInfo();
} }
}, },
querySystemMessage() { querySystemMessage() {
...@@ -738,7 +725,7 @@ ...@@ -738,7 +725,7 @@
// 获取轮播图 // 获取轮播图
queryAreaCenterInfo() { queryAreaCenterInfo() {
api.queryAreaCenterInfo({ api.queryAreaCenterInfo({
// userId: uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
companyType: `${companyInfo.companyType}` companyType: `${companyInfo.companyType}`
}).then((res) => { }).then((res) => {
if (res['success']) { if (res['success']) {
......
...@@ -111,6 +111,8 @@ const whiteApiList = [`${apiURL}/authorize/obtainToken`, ...@@ -111,6 +111,8 @@ const whiteApiList = [`${apiURL}/authorize/obtainToken`,
`${apiURL}/verificationCode`, `${apiURL}/verificationCode`,
`${sfpUrl}/sfp/sfpMain/pocessTracking`, `${sfpUrl}/sfp/sfpMain/pocessTracking`,
`${cffpURL}/partner/queryById`, `${cffpURL}/partner/queryById`,
`${cffpURL}/course/list`,
`${cffpURL}/areaCenter/queryAreaCenterInfo`,
`${apiURL}/sso/ticket/consume`, // Casdoor 票据消费:匿名,唯一凭据是 ticket `${apiURL}/sso/ticket/consume`, // Casdoor 票据消费:匿名,唯一凭据是 ticket
]; ];
// ==================== token 获取 & 整页刷新 控制 ==================== // ==================== token 获取 & 整页刷新 控制 ====================
......
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