修改夜校接活动跳转
This commit is contained in:
parent
51549177fa
commit
c42ae18cd4
53
App.vue
53
App.vue
@ -7,7 +7,10 @@
|
|||||||
this.updateManager();
|
this.updateManager();
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function(options) {
|
||||||
|
if(options?.referrerInfo?.extraData){
|
||||||
|
this.getDyqc(options.referrerInfo.extraData);
|
||||||
|
}
|
||||||
console.log('App Show')
|
console.log('App Show')
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
@ -51,6 +54,54 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//获取多样青春的跳转参数
|
||||||
|
getDyqc(extraData){
|
||||||
|
uni.$u.http.post('/api/user/activityMiniLogin', extraData).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.setStorageSync('token', res.data.userinfo.token)
|
||||||
|
this.getUserInfo();
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
uni.clearStorageSync();
|
||||||
|
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.log('error', error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 获取个人信息
|
||||||
|
getUserInfo() {
|
||||||
|
uni.$u.http.get('/api/user/index', {}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.setStorageSync('userInfo', res.data.user_info);
|
||||||
|
uni.showToast({
|
||||||
|
title: '登陆成功',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
uni.setStorageSync("niName", res.data.user_info.nickname);
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '登陆失败',
|
||||||
|
icon: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch(error => {
|
||||||
|
console.log('error', error);
|
||||||
|
|
||||||
|
uni.showToast({
|
||||||
|
title: '登陆失败',
|
||||||
|
icon: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "多样青春",
|
"name" : "多样青春",
|
||||||
"appid" : "__UNI__ABEB145",
|
"appid" : "__UNI__1F083BC",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<u-icon name="close" size="16"></u-icon>
|
<u-icon name="close" size="16"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box":style="{ marginTop: show ? '34rpx' : capsuleHeight() }">
|
<view class="box":style="{ marginTop: show == true ? '34rpx' : capsuleHeight() }">
|
||||||
<view class="swiper-box">
|
<view class="swiper-box">
|
||||||
<MySwiper :list="swiperList"></MySwiper>
|
<MySwiper :list="swiperList"></MySwiper>
|
||||||
</view>
|
</view>
|
||||||
@ -227,11 +227,10 @@
|
|||||||
this.getinit()
|
this.getinit()
|
||||||
this.getHotList()
|
this.getHotList()
|
||||||
this.getTeacherList()
|
this.getTeacherList()
|
||||||
this.getWqList()
|
this.getWqList();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.autoplay = false
|
this.autoplay = false
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取胶囊高度
|
// 获取胶囊高度
|
||||||
|
Loading…
x
Reference in New Issue
Block a user