Commit 7a498a48 by wenyang

4.视频播放统计相关(微信授权登录)

parent a1a2608e
...@@ -128,6 +128,8 @@ ...@@ -128,6 +128,8 @@
if (res['success']) { if (res['success']) {
uni.setStorageSync('cffp_userId', String(res['data']['userId'])); uni.setStorageSync('cffp_userId', String(res['data']['userId']));
uni.setStorageSync('uni-token',res['data']['token']); uni.setStorageSync('uni-token',res['data']['token']);
uni.setStorageSync('isLogin', '1');
uni.setStorageSync('loginType', 'codelogin');
next(); next();
} else { } else {
uni.showToast({ uni.showToast({
...@@ -162,7 +164,7 @@ ...@@ -162,7 +164,7 @@
}; };
onLoad(option =>{ onLoad(option =>{
videoId.value = option.videoId ?? 1; videoId.value = option.videoId ?? null;
if(uni.getStorageSync('cffp_userId')){ if(uni.getStorageSync('cffp_userId')){
next(); next();
} }
......
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
api.wxLogin(param).then((res) => { api.wxLogin(param).then((res) => {
if (res['success']) { if (res['success']) {
uni.setStorageSync('cffp_userId', String(res['data']['userId'])); uni.setStorageSync('cffp_userId', String(res['data']['userId']));
uni.setStorageSync('uni-token',res['data']['token']); uni.setStorageSync('uni-token', res['data']['token']);
uni.setStorageSync('isLogin', '1');
uni.setStorageSync('loginType', 'codelogin');
uni.navigateTo({ uni.navigateTo({
url:'/myPackageA/videoProject/videoDetail?videoId='+option.fileId url:'/myPackageA/videoProject/videoDetail?videoId='+option.fileId
}) })
......
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