|
@@ -463,6 +463,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
|
+ console.log('option:', option);
|
|
if (option.scene) {
|
|
if (option.scene) {
|
|
// scene 生成二维码扫码进来的
|
|
// scene 生成二维码扫码进来的
|
|
let optObj = {};
|
|
let optObj = {};
|
|
@@ -476,6 +477,9 @@ export default {
|
|
console.log("optObj.sc:", optObj);
|
|
console.log("optObj.sc:", optObj);
|
|
uni.setStorageSync("newUser_sc", optObj.sc);
|
|
uni.setStorageSync("newUser_sc", optObj.sc);
|
|
uni.setStorageSync("shareActivityCode", optObj.shareActivityCode)
|
|
uni.setStorageSync("shareActivityCode", optObj.shareActivityCode)
|
|
|
|
+ if (optObj.shareActivityCode && this.$method.isLogin()) {
|
|
|
|
+ this.editShareActivityCode()
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
// 小程序正常跳转的
|
|
// 小程序正常跳转的
|
|
// this.id => goodsId
|
|
// this.id => goodsId
|
|
@@ -483,6 +487,10 @@ export default {
|
|
this.goodsType = option.goodsType;
|
|
this.goodsType = option.goodsType;
|
|
if (option.shareActivityCode) {
|
|
if (option.shareActivityCode) {
|
|
uni.setStorageSync("shareActivityCode", option.shareActivityCode)
|
|
uni.setStorageSync("shareActivityCode", option.shareActivityCode)
|
|
|
|
+ if (this.$method.isLogin()) {
|
|
|
|
+ //已登录
|
|
|
|
+ this.editShareActivityCode()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.getDetail();
|
|
this.getDetail();
|
|
@@ -558,6 +566,18 @@ export default {
|
|
itemWidth() {
|
|
itemWidth() {
|
|
return 100 / this.list.length + "%";
|
|
return 100 / this.list.length + "%";
|
|
},
|
|
},
|
|
|
|
+ // 修改用户活动邀请码
|
|
|
|
+ editShareActivityCode() {
|
|
|
|
+ this.$http({
|
|
|
|
+ url: '/app/user/edit/shareActivityCode',
|
|
|
|
+ method: "post",
|
|
|
|
+ data: {
|
|
|
|
+ shareActivityCode: uni.getStorageSync("shareActivityCode")
|
|
|
|
+ }
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.data.code == 200) {}
|
|
|
|
+ })
|
|
|
|
+ },
|
|
appCommonGoodsCourseModuleFreeExamList() {
|
|
appCommonGoodsCourseModuleFreeExamList() {
|
|
// url: '/app/common/goods/course/moduleFreeExamList/'+data,
|
|
// url: '/app/common/goods/course/moduleFreeExamList/'+data,
|
|
this.$api.appCommonGoodsCourseModuleFreeExamList(this.id).then((res) => {
|
|
this.$api.appCommonGoodsCourseModuleFreeExamList(this.id).then((res) => {
|