Commit fb4dac8c authored by zhengke's avatar zhengke

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents 63bd0c8c a16a0685
......@@ -77,22 +77,13 @@
<u-loading mode="circle" style="margin-right: 5px;" v-if="submitStatus"></u-loading>提交评价
</u-button>
</view>
<coupon
v-if="showCoupons"
:coupon-message="couponMessage"
:msgtype="msgType"
@goLook="goLook"
@closeBtn="closeBtn"
></coupon>
</view>
</template>
<script>
import coupon from "@/components/coupons/coupons";
export default {
components: {
coupon
},
data() {
return {
pageTitle: "发表评价",
......@@ -123,9 +114,6 @@
fileList: [], //商品上传图
fileList2: [], //导游上传图
dataList: {} ,//商品详情数据
couponMessage: "",//弹出优惠券的内容
showCoupons: false,
msgType:1,//类型
};
},
onLoad(option) {
......@@ -191,11 +179,9 @@
this.msg[1].CommentScore = val
},
submitForm() {
this.couponMessage = '获取10积分';
// this.couponMessage = res.couponMessage;
// this.msgType = res.msgType;
this.msgType = 2;
this.showCoupons = true;
let pages = getCurrentPages(); // 当前页面
let beforePage
beforePage = pages[pages.length - 2]; // 前一个页面
if (this.msg[0].CommentScore == 0) {
this.$refs.uTips.show({
title: "请您为车打打分吧",
......@@ -219,6 +205,7 @@
},
(res) => {
if (res.resultCode == 1) {
let that = this
uni.showModal({
content: "评价成功,感谢您的反馈",
showCancel: false,
......@@ -227,11 +214,17 @@
if (res.confirm) {
uni.navigateBack({
delta: 1,
success: function() {
if(res.msgType==2 && res.couponResultCode==1 ){
beforePage.$vm.getReceive(res.couponMessage,res.msgType); // 执行前一个页面的方法
}
}
});
}
this.submitStatus = false;
that.submitStatus = false;
},
});
} else {
this.submitStatus = false;
this.$refs.uTips.show({
......@@ -243,15 +236,7 @@
}
);
},
goLook() {
this.showCoupons = true;
uni.navigateTo({
url: "/pages/user-center/integral-detail/integral-detail",
});
},
closeBtn() {
this.showCoupons = false;
},
}
};
</script>
......
......@@ -54,11 +54,22 @@
/>
</scroll-view>
</view>
<coupon
v-if="showCoupons"
:coupon-message="couponMessage"
:msgtype="msgType"
@goLook="goLook"
@closeBtn="closeBtn"
></coupon>
</view>
</template>
<script>
import coupon from "@/components/coupons/coupons";
export default {
components: {
coupon
},
data() {
return {
pageTitle: "评价中心",
......@@ -87,6 +98,9 @@ export default {
},
page_count: 0,
isover: false,
couponMessage: "",//弹出优惠券的内容
showCoupons: false,
msgType:1,//类型
};
},
onShow() {
......@@ -165,6 +179,23 @@ export default {
this.status = "nomore";
}
},
getReceive(couponMessage,msgType){
setTimeout(()=>{
this.couponMessage = '获取'+couponMessage+'积分';
this.msgType = msgType;
this.showCoupons = true;
},500)
},
goLook() {
this.showCoupons = true;
uni.navigateTo({
url: "/pages/user-center/integral-detail/integral-detail",
});
},
closeBtn() {
this.showCoupons = false;
},
},
};
</script>
......
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