|
|
@ -142,9 +142,16 @@ |
|
|
|
</image>{{paytheprice*100}} |
|
|
|
</image>{{paytheprice*100}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- #ifdef MP --> |
|
|
|
<button class="btn" open-type="getPhoneNumber" v-if="user.phone == null" |
|
|
|
<button class="btn" open-type="getPhoneNumber" v-if="user.phone == null" |
|
|
|
@getphonenumber="getPhoneNumber">实际支付</button> |
|
|
|
@getphonenumber="getPhoneNumber">实际支付</button> |
|
|
|
<button class="btn" v-else @tap="toPay">实际支付</button> |
|
|
|
<button class="btn" v-else @tap="toPay">实际支付</button> |
|
|
|
|
|
|
|
<!-- #endif --> |
|
|
|
|
|
|
|
<!-- #ifdef H5 --> |
|
|
|
|
|
|
|
<button class="btn" v-if="user.phone == null" @getphonenumber="bindUserPhone">实际支付</button> |
|
|
|
|
|
|
|
<button class="btn" v-else @tap="toPay">实际支付</button> |
|
|
|
|
|
|
|
<!-- #endif --> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -155,7 +162,8 @@ |
|
|
|
addOrder, |
|
|
|
addOrder, |
|
|
|
getCouponById, |
|
|
|
getCouponById, |
|
|
|
GetPhoneNumber, |
|
|
|
GetPhoneNumber, |
|
|
|
getUserNormalDiscountList |
|
|
|
getUserNormalDiscountList, |
|
|
|
|
|
|
|
bindUserPhone |
|
|
|
} from '../../Utils/Api.js'; |
|
|
|
} from '../../Utils/Api.js'; |
|
|
|
let app = getApp(); |
|
|
|
let app = getApp(); |
|
|
|
export default { |
|
|
|
export default { |
|
|
@ -202,30 +210,6 @@ |
|
|
|
this.getUserNormalDiscountList(); |
|
|
|
this.getUserNormalDiscountList(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
//页面显示时,加载订单信息 |
|
|
|
|
|
|
|
// uni.getStorage({ |
|
|
|
|
|
|
|
// key: 'buylist', |
|
|
|
|
|
|
|
// success: (ret) => { |
|
|
|
|
|
|
|
// this.buylist = ret.data; |
|
|
|
|
|
|
|
// this.goodsPrice = 0; |
|
|
|
|
|
|
|
// //合计 |
|
|
|
|
|
|
|
// let len = this.buylist.length; |
|
|
|
|
|
|
|
// for (let i = 0; i < len; i++) { |
|
|
|
|
|
|
|
// this.goodsPrice = this.goodsPrice + (this.buylist[i].number * this.buylist[i].price); |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// this.deduction = this.int / 100; |
|
|
|
|
|
|
|
// this.sumPrice = this.goodsPrice - this.deduction + this.freight; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// uni.getStorage({ |
|
|
|
|
|
|
|
// key: 'selectAddress', |
|
|
|
|
|
|
|
// success: (e) => { |
|
|
|
|
|
|
|
// this.recinfo = e.data; |
|
|
|
|
|
|
|
// uni.removeStorage({ |
|
|
|
|
|
|
|
// key: 'selectAddress' |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
onHide() { |
|
|
|
onHide() { |
|
|
|
|
|
|
|
|
|
|
@ -303,7 +287,8 @@ |
|
|
|
if (this.couponList.salesPrice > this.UserNormalDiscountList[i].highDiscount.discountPrice) { |
|
|
|
if (this.couponList.salesPrice > this.UserNormalDiscountList[i].highDiscount.discountPrice) { |
|
|
|
//满减价格 |
|
|
|
//满减价格 |
|
|
|
this.deductionPrice = this.UserNormalDiscountList[i].highDiscount.discountPrice; |
|
|
|
this.deductionPrice = this.UserNormalDiscountList[i].highDiscount.discountPrice; |
|
|
|
this.paytheprice = (((this.couponList.salesPrice*100) - (this.deductionPrice*100))/100); |
|
|
|
this.paytheprice = (((this.couponList.salesPrice * 100) - (this.deductionPrice * 100)) / |
|
|
|
|
|
|
|
100); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: '未满足满减条件', |
|
|
|
title: '未满足满减条件', |
|
|
@ -314,7 +299,7 @@ |
|
|
|
} else if (this.UserNormalDiscountList[i].highDiscount.discountType == 2) { |
|
|
|
} else if (this.UserNormalDiscountList[i].highDiscount.discountType == 2) { |
|
|
|
//抵扣价格 |
|
|
|
//抵扣价格 |
|
|
|
this.deductionPrice = this.UserNormalDiscountList[i].highDiscount.discountPrice; |
|
|
|
this.deductionPrice = this.UserNormalDiscountList[i].highDiscount.discountPrice; |
|
|
|
this.paytheprice = (((this.couponList.salesPrice*100) - (this.deductionPrice*100))/100); |
|
|
|
this.paytheprice = (((this.couponList.salesPrice * 100) - (this.deductionPrice * 100)) / 100); |
|
|
|
} else if (this.UserNormalDiscountList[i].highDiscount.discountType == 3) { |
|
|
|
} else if (this.UserNormalDiscountList[i].highDiscount.discountType == 3) { |
|
|
|
// 打折 |
|
|
|
// 打折 |
|
|
|
this.deductionPrice = this.couponList.salesPrice - this.couponList.salesPrice * (this |
|
|
|
this.deductionPrice = this.couponList.salesPrice - this.couponList.salesPrice * (this |
|
|
@ -325,6 +310,13 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// H5获取手机号 |
|
|
|
|
|
|
|
jumpH5Bding() { |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
|
|
url:'/pages/login/register?id=2' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 微信获取手机号 |
|
|
|
getPhoneNumber(PhoneNumber) { |
|
|
|
getPhoneNumber(PhoneNumber) { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
openId: app.globalData.openId, |
|
|
|
openId: app.globalData.openId, |
|
|
|