Commit b7004492 authored by Mac's avatar Mac

1

parent 68f070af
......@@ -187,7 +187,9 @@
</view> -->
<view class="active_Title">兑换期限</view>
<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 class="active_Title">活动说明</view>
<view class="active_Inner">
......@@ -206,15 +208,18 @@
<!-- 取消提示 -->
<u-toast ref="uToast" />
<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>
</template>
<script>
import auth from "@/components/auth/index.vue";
import coupon from "@/components/coupons/coupons";
export default {
components: {
auth
auth,
coupon
},
data() {
return {
......@@ -229,7 +234,9 @@ export default {
ActivityId:0
},
dataList: {},
loading: false
loading: false,
showCoupons: false,
couponMessage: "",
};
},
created() {
......@@ -237,6 +244,68 @@ export default {
this.mainColor = this.$uiConfig.mainColor;
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() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
......@@ -253,7 +322,9 @@ export default {
});
},
onLoad: function (option) {
if(option && option.ActivityId){
this.msg.ActivityId = option.ActivityId;
}
console.log(option,'optionss');
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
......@@ -288,7 +359,42 @@ export default {
},
goitemize(item){
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>
......@@ -152,6 +152,7 @@
startData:{},
ComeFrom:'',
teacherId:0,
activityid:0,//活动id
};
},
components: {
......@@ -187,7 +188,7 @@
},
onLoad(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;
uni.getSystemInfo({
......@@ -287,6 +288,11 @@
this.teacherId = options.teacherId;
}
if (options && options.activityid) {//活动id
this.activityid = options.activityid;
}
// #ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: true,
......@@ -720,8 +726,12 @@
}else if (that.JumpType == 10) {
//老师详情
uni.navigateTo({ url: "/pages/school/teacherDetails?ID=" + that.teacherId });
} else if (that.JumpType == 11) {
//活动详情
uni.navigateTo({ url: "/pages/friendcircle/activeContent?ActivityId=" + that.activityid });
}
}, 500);
},
updateuserinfo(msg) {
......
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