Commit 77eaebdf authored by Mac's avatar Mac

1

parent 2324240a
......@@ -5,7 +5,7 @@
<button :style="sureStyle" class="hotsopt" open-type="getUserInfo" @getuserinfo="getUserInfo"></button>
<button :style="cancelStyle" class="hotsopt" @click="close"></button>
</u-popup>
<coupon v-if="showCoupons" :coupon-message="couponMessage" @goLook="goLook" @closeBtn="closeBtn"></coupon>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon>
</div>
</template>
......@@ -23,6 +23,7 @@
showDialog: true,
showCoupons: false,
couponMessage: '',
ComeFrom:'',
};
},
created() {
......@@ -140,8 +141,11 @@
uni.setStorageSync('mall_UserInfo', res.data);
that.$emit('changeuserinfo');
if (res.couponResultCode == 1) {
this.showCoupons = true;
this.couponMessage = res.couponMessage;
if(uni.getStorageSync("ComeFrom")){
that.ComeFrom= uni.getStorageSync("ComeFrom").ComeFrom
}
that.showCoupons = true;
that.couponMessage = res.couponMessage;
}
uni.removeStorageSync('pid');
uni.removeStorageSync('SmallShopId');
......
......@@ -5,7 +5,8 @@
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/couponsbg.png" mode="widthFix" />
<view class="coupons-box">
<text style="font-size: 18px;color: #FFFFFF;">恭喜获得{{msgtype==1?'优惠券':'积分'}}</text>
<text style="font-size: 14px;color: #FFFFFF;margin-top: 20rpx;">{{couponMessage}}</text>
<text style="font-size: 14px;color: #FDE005;;margin-top: 20rpx;">{{couponMessage}}</text>
<text style="font-size: 12px;color: #FDE005;;margin-top: 20rpx;" v-if="cform!=null && cform!=''">{{cform}}</text>
<view class="btn" @click="goLook">
<text>立即查看</text>
</view>
......@@ -25,19 +26,26 @@
},
msgtype: {
type: String,
default: 1
default: "1"
},
cform: {
type: String,
default: ""
}
},
data() {
return {
pageinfo: {},
showDialog: true
showDialog: true,
};
},
created() {
},
methods: {
goLook() {
uni.removeStorageSync("ComeFrom");
this.showDialog = false;
if (this.msgtype == 1) {
uni.navigateTo({
......@@ -51,6 +59,7 @@
this.$emit('goLook');
},
closeBtn() {
uni.removeStorageSync("ComeFrom");
this.showDialog = false;
this.$emit('closeBtn');
}
......
......@@ -76,7 +76,7 @@
<Text style="color: #fff;">{{setting.add_app_text}}</Text>
<view class="triangle-up" :style="{'top':pagePaddingBottom}"></view>
</view>
<coupon v-if="showCoupons" :coupon-message="couponMessage" @goLook="goLook" @closeBtn="closeBtn"></coupon>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<official-account></official-account>
</view>
......@@ -130,7 +130,7 @@
add_show: 1,
showtabs: true,
showCoupons: false,
couponMessage: "恭喜获得20元优惠券",
couponMessage: "",
pageTitleStr: "",
titleStyle: "",
pagePaddingBottom: "0px",
......@@ -150,6 +150,7 @@
fxstoreId:0,//分享过来的门店id
showStart:false,//是否显示启动页
startData:{},
ComeFrom:'',
};
},
components: {
......@@ -272,6 +273,7 @@
});
}
if (options && options.ComeFrom) {//跳过来的文字描述
this.ComeFrom = options.ComeFrom;
uni.setStorageSync("ComeFrom", {
ComeFrom: options.ComeFrom
});
......
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