hookehuyr

fix 未授权用户通过分享进入详情页问题优化

1 <!-- 1 <!--
2 * @Date: 2022-09-26 14:36:57 2 * @Date: 2022-09-26 14:36:57
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-11-15 18:28:02 4 + * @LastEditTime: 2022-11-16 14:44:03
5 * @FilePath: /swx/src/pages/activityDetail/index.vue 5 * @FilePath: /swx/src/pages/activityDetail/index.vue
6 * @Description: 活动详情页 6 * @Description: 活动详情页
7 --> 7 -->
...@@ -528,8 +528,11 @@ export default { ...@@ -528,8 +528,11 @@ export default {
528 name: "activityInfoPage", 528 name: "activityInfoPage",
529 mixins: [mixin.init], 529 mixins: [mixin.init],
530 async onShow () { 530 async onShow () {
531 + // 缓存ID参数
532 + pageQuery().id && Taro.setStorageSync('activity_id', pageQuery().id);
533 + const activity_id = Taro.getStorageSync('activity_id') ? Taro.getStorageSync('activity_id') : pageQuery().id;
531 // 获取活动详情 534 // 获取活动详情
532 - const id = this.qr_id ? this.qr_id : pageQuery().id; 535 + const id = this.qr_id ? this.qr_id : activity_id;
533 const { code, data } = await activityInfoAPI({ i: id }); 536 const { code, data } = await activityInfoAPI({ i: id });
534 if (code) { 537 if (code) {
535 this.activity = data.activity; 538 this.activity = data.activity;
......