|
|
|
@ -10,7 +10,7 @@ |
|
|
|
<div class="name">{{info.goodsName}}</div> |
|
|
|
<div class="box"> |
|
|
|
<div class="box-text">{{info.shortDesc}}</div> |
|
|
|
<div class="box-price">¥{{info.totalPrice/100}}</div> |
|
|
|
<div class="box-price">¥{{info.totalPrice?info.totalPrice/100:''}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -40,7 +40,7 @@ |
|
|
|
</div> |
|
|
|
<div class="name" v-if="info.primeCoupon">{{info.primeCoupon.couponName}}</div> |
|
|
|
</div> |
|
|
|
<div class="price" v-if="info.primeCoupon">-¥{{info.primeCoupon.amount}}</div> |
|
|
|
<div class="price" v-if="info.primeCoupon">-¥{{info.primeCoupon?info.primeCoupon.amount/100:""}}</div> |
|
|
|
</div> |
|
|
|
<img class="icon" src="../assets/images/order-list/arrow.png"> |
|
|
|
</div> |
|
|
|
@ -65,17 +65,17 @@ |
|
|
|
<div @click="agree=!agree"> |
|
|
|
我已阅读并同意 |
|
|
|
</div> |
|
|
|
<div class="tips" @click="agree=!agree"> |
|
|
|
<a class="tips" href="http://www.yihaojiazheng.cn/mall/web/agreement"> |
|
|
|
《一号家政服务协议书》 |
|
|
|
</div> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div class="fill"></div> |
|
|
|
<div class="button" role="button"> |
|
|
|
<div class="button-text"> |
|
|
|
还需支付: |
|
|
|
<div class="num">¥{{info.payPrice?info.payPrice/100:''}}</div> |
|
|
|
<div class="num">¥{{price}}</div> |
|
|
|
</div> |
|
|
|
<button :disabled="!agree" @click="pay()">立即付款</button> |
|
|
|
<button :class="{disabled:!agree}" @click="pay()">立即付款</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -89,19 +89,29 @@ export default { |
|
|
|
info: { |
|
|
|
text: "" |
|
|
|
}, |
|
|
|
agree: true, |
|
|
|
agree: false, |
|
|
|
goodsNo: "" |
|
|
|
}; |
|
|
|
}, |
|
|
|
components: { |
|
|
|
"back-header": backHeader |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
price() { |
|
|
|
let price = this.info.payPrice; |
|
|
|
let discount = this.info.primeCoupon |
|
|
|
? this.info.primeCoupon.amount |
|
|
|
: 0; |
|
|
|
return price / 100 - discount / 100; |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getData() { |
|
|
|
let goodsNo = this.getParam("goodsNo"); |
|
|
|
let couponNo = this.getParam("couponNo"); |
|
|
|
// let orderData = localStorage.getItem("orderData") || ""; |
|
|
|
let goodsVersion = this.getParam("goodsVersion"); |
|
|
|
let goodsVersion = |
|
|
|
sessionStorage.getItem("goodsVersion") || |
|
|
|
this.getParam("goodsVersion"); |
|
|
|
orderApi |
|
|
|
.checkOrder( |
|
|
|
qs.stringify({ |
|
|
|
@ -112,6 +122,7 @@ export default { |
|
|
|
) |
|
|
|
.then(res => { |
|
|
|
if (res.code == 0) { |
|
|
|
this.agree = true; |
|
|
|
let data = res.response; |
|
|
|
this.info = data; |
|
|
|
} else if (res.code == 666) { |
|
|
|
@ -133,6 +144,13 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
pay() { |
|
|
|
if (!this.agree) { |
|
|
|
this.$vux.toast.text( |
|
|
|
"请先勾选同意《一号家政服务协议书》", |
|
|
|
"middle" |
|
|
|
); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.addOrder().then(res => { |
|
|
|
this.$vux.loading.show({ |
|
|
|
text: "正在调起支付" |
|
|
|
@ -209,7 +227,6 @@ export default { |
|
|
|
orderApi |
|
|
|
.addOrder( |
|
|
|
qs.stringify({ |
|
|
|
goodsNo: goodsNo, |
|
|
|
goodsNo: goodsNo, |
|
|
|
couponNo: couponNo, |
|
|
|
goodsVersion: goodsVersion, |
|
|
|
@ -247,7 +264,9 @@ export default { |
|
|
|
return promise; |
|
|
|
}, |
|
|
|
go() { |
|
|
|
location.href = "/mall/web/coupon_index?" + this.goodsNo; |
|
|
|
let goodsVersion = this.getParam("goodsVersion") || ""; |
|
|
|
sessionStorage.setItem("goodsVersion", goodsVersion); |
|
|
|
location.href = "/mall/web/coupon_index?" + this.goodsNo + "&"; |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
@ -557,11 +576,15 @@ export default { |
|
|
|
button { |
|
|
|
width: 3.5rem; |
|
|
|
height: 1rem; |
|
|
|
background-color: #00ba86; |
|
|
|
color: white; |
|
|
|
font-size: 0.36rem; |
|
|
|
background: #00ba86; |
|
|
|
color: #fff; |
|
|
|
border-radius: 0px; |
|
|
|
border: none; |
|
|
|
color: white; |
|
|
|
font-size: 0.36rem; |
|
|
|
} |
|
|
|
.disabled { |
|
|
|
opacity: 0.6; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |