hookehuyr

✨ feat(扫描二维码进入): 获取二维码参数

<!--
* @Date: 2022-09-26 14:36:57
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-11-02 10:52:00
* @LastEditTime: 2022-11-03 11:46:08
* @FilePath: /swx/src/pages/activityDetail/index.vue
* @Description: 活动详情页
-->
......@@ -515,7 +515,7 @@ export default {
mixins: [mixin.init],
async onShow () {
// 获取活动详情
const id = pageQuery().id;
const id = this.qr_id ? this.qr_id : pageQuery().id;
const { code, data } = await activityInfoAPI({ i: id });
if (code) {
this.activity = data.activity;
......@@ -530,10 +530,18 @@ export default {
// 活动状态判断显示
this.activity_status = getCurrentPageParam().status ? getCurrentPageParam().status : '';
},
onLoad(options) {
// 小程序码进入
if (options.scene) {
let qr_id = (decodeURIComponent(options.scene)).slice(2);
this.qr_id = qr_id;
}
},
mounted() {
},
data () {
return {
qr_id: '',
activity: {
cover: '',
},
......