Commit b7004492 authored by Mac's avatar Mac

1

parent 68f070af
...@@ -187,7 +187,9 @@ ...@@ -187,7 +187,9 @@
</view> --> </view> -->
<view class="active_Title">兑换期限</view> <view class="active_Title">兑换期限</view>
<view class="active_Inner"> <view class="active_Inner">
<view>截止<text style="margin:0 5px">{{dataList.ReceiveTime}}</text>之前 <text style="margin-left: 10px;">兑换方式:{{dataList.Way==1?'线上':'线下'}}</text> </view> <view>截止<text style="margin:0 5px">{{dataList.ReceiveTime}}</text>之前
<!-- <text style="margin-left: 10px;">兑换方式:{{dataList.Way==1?'线上':'线下'}}</text> -->
</view>
</view> </view>
<view class="active_Title">活动说明</view> <view class="active_Title">活动说明</view>
<view class="active_Inner"> <view class="active_Inner">
...@@ -206,15 +208,18 @@ ...@@ -206,15 +208,18 @@
<!-- 取消提示 --> <!-- 取消提示 -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import auth from "@/components/auth/index.vue"; import auth from "@/components/auth/index.vue";
import coupon from "@/components/coupons/coupons";
export default { export default {
components: { components: {
auth auth,
coupon
}, },
data() { data() {
return { return {
...@@ -229,7 +234,9 @@ export default { ...@@ -229,7 +234,9 @@ export default {
ActivityId:0 ActivityId:0
}, },
dataList: {}, dataList: {},
loading: false loading: false,
showCoupons: false,
couponMessage: "",
}; };
}, },
created() { created() {
...@@ -237,6 +244,68 @@ export default { ...@@ -237,6 +244,68 @@ export default {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.useName = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").Name:'' this.useName = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").Name:''
}, },
onShareTimeline() {
setTimeout(() => {
// console.log("分享朋友圈调用");
this.getReceive();
}, 2500);
let uid = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserId :
0;
if (uid == 0) {
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
}
let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").SmallShopId :
0;
if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserSmallShopId :
0;
}
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
let activityid = this.msg.ActivityId;
let img = this.dataList.CoverImage?this.dataList.CoverImage:'';
let title = this.dataList.ActivityName? this.dataList.ActivityName:'活动';
return {
title: title,
query: "user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up+ "&activityid=" + activityid,
imageUrl: img,
};
},
onShareAppMessage(res) {
setTimeout(() => {
// console.log("分享朋友调用");
this.getReceive();
}, 2500);
let uid = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserId :
0;
if (uid == 0) {
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
}
let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").SmallShopId :
0;
if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserSmallShopId :
0;
}
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
let activityid = this.msg.ActivityId;
let img = this.dataList.CoverImage?this.dataList.CoverImage:'';
let title = this.dataList.ActivityName? this.dataList.ActivityName:'活动';
console.log("/pages/index/index?user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up+ "&activityid=" + activityid +'&JumpType=11')
return {
title: title,
path: "/pages/index/index?user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up+ "&activityid=" + activityid +'&JumpType=11',
imageUrl: img,
};
},
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route; let u = "/" + currentPages[currentPages.length - 1].route;
...@@ -252,8 +321,10 @@ export default { ...@@ -252,8 +321,10 @@ export default {
title: this.pageTitle, title: this.pageTitle,
}); });
}, },
onLoad: function (option) { onLoad: function (option) {
this.msg.ActivityId = option.ActivityId; if(option && option.ActivityId){
this.msg.ActivityId = option.ActivityId;
}
console.log(option,'optionss'); console.log(option,'optionss');
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) { if (!this.u) {
...@@ -288,7 +359,42 @@ export default { ...@@ -288,7 +359,42 @@ export default {
}, },
goitemize(item){ goitemize(item){
uni.navigateTo({ url: '/pages/goods/list?coupon_id='+ item.Id+'&UseType=1' }); uni.navigateTo({ url: '/pages/goods/list?coupon_id='+ item.Id+'&UseType=1' });
} },
getReceive() {
//分享进入调取领券接口
// 1-分享,2-购买并付款
this.request2({
url: "/api/AppletUser/ShareCoupon",
data: {
TriggerType: 1,
},
},
(res) => {
console.log(res, "res");
if (res.couponResultCode == 1) {
this.couponMessage = res.couponMessage;
this.showCoupons = true;
}
},
(failed)=>{
}
);
},
goLook() {
this.showCoupons = false;
},
closeBtn() {
this.showCoupons = false;
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.init();
},
gbAuth(){
uni.navigateBack()
},
}, },
}; };
</script> </script>
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
startData:{}, startData:{},
ComeFrom:'', ComeFrom:'',
teacherId:0, teacherId:0,
activityid:0,//活动id
}; };
}, },
components: { components: {
...@@ -187,7 +188,7 @@ ...@@ -187,7 +188,7 @@
}, },
onLoad(options) { onLoad(options) {
// options = {//模拟数据 // options = {//模拟数据
// user_id:120746,SmallShopId:0,Up:0,teacherId:6,JumpType:10 // user_id:120590,SmallShopId:0,Up:0,activityid:6,JumpType:11
// } // }
let that = this; let that = this;
uni.getSystemInfo({ uni.getSystemInfo({
...@@ -287,6 +288,11 @@ ...@@ -287,6 +288,11 @@
this.teacherId = options.teacherId; this.teacherId = options.teacherId;
} }
if (options && options.activityid) {//活动id
this.activityid = options.activityid;
}
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
wx.showShareMenu({ wx.showShareMenu({
withShareTicket: true, withShareTicket: true,
...@@ -720,7 +726,11 @@ ...@@ -720,7 +726,11 @@
}else if (that.JumpType == 10) { }else if (that.JumpType == 10) {
//老师详情 //老师详情
uni.navigateTo({ url: "/pages/school/teacherDetails?ID=" + that.teacherId }); uni.navigateTo({ url: "/pages/school/teacherDetails?ID=" + that.teacherId });
} else if (that.JumpType == 11) {
//活动详情
uni.navigateTo({ url: "/pages/friendcircle/activeContent?ActivityId=" + that.activityid });
} }
}, 500); }, 500);
}, },
......
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