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