变更商品数量,调整字段错误,推荐关系页面调整

This commit is contained in:
唐明明
2021-11-12 16:23:35 +08:00
parent 1def6bcbfc
commit 24b23ac13c
9 changed files with 431 additions and 421 deletions

View File

@@ -17,7 +17,7 @@
<view class="sku">
<span>数量</span>
<span>
<u-number-box v-model="params.qty" :min='1' :max='1000' @change='numberBoxChange' />
<u-number-box v-model="params.qty" :min='1' :max='info.stock' @change='numberBoxChange' />
</span>
</view>
</view>
@@ -91,14 +91,8 @@
<script>
import couponTemplate from "@/components/coupon-template/coupon-template-2"
import {
mallBuyGoods
} from '@/apis/interfaces/goods'
import {
wxPay,
aliPay,
ebPay
} from '@/apis/interfaces/order'
import { mallBuyGoods } from '@/apis/interfaces/goods'
import { wxPay, aliPay, ebPay } from '@/apis/interfaces/order'
export default {
name: 'OrderInfo',
components: {
@@ -106,23 +100,19 @@
},
data() {
return {
// box: {
// min: 1,
// max: 100
// },
amount: 0,
account: {},
total: 0,
shop: {}, // 店铺信息
info: {}, // 商品详情
showCouponList: false, // 默认false不显示优惠券弹窗列表
coupon_grant_id: '', // 默认没有选择任何一个优惠券
list: [], // 优惠券列表
params: {}, // 上个页面携带过来的参数
remark: '', // 备注
order_no: '', // 下单成功的id
selectTypeId: '2', // 微信支付2 支付宝支付3
coupon_price: '' // 代驾券显示金额,提货券显示什么呢
amount : 0,
account : {},
total : 0,
shop : {}, // 店铺信息
info : {}, // 商品详情
showCouponList : false, // 默认false不显示优惠券弹窗列表
coupon_grant_id : '', // 默认没有选择任何一个优惠券
list : [], // 优惠券列表
params : {}, // 上个页面携带过来的参数
remark : '', // 备注
order_no : '', // 下单成功的id
selectTypeId : '2', // 微信支付2 支付宝支付3
coupon_price : '' // 代驾券显示金额,提货券显示什么呢
};
},
@@ -138,22 +128,21 @@
params.coupon_grant_id = this.coupon_grant_id
mallBuyGoods(params, method).then(res => {
if (method === 'get') {
this.amount = res.amount
this.account = res.account
this.total = res.total
this.list = res.coupons
this.shop = res.detail[0].shop
this.info = res.detail[0].items[0]
this.coupon_price = res.coupon_price
this.amount = res.amount
this.account = res.account
this.total = res.total
this.list = res.coupons
this.shop = res.detail[0].shop
this.info = res.detail[0].items[0]
this.coupon_price = res.coupon_price
} else {
this.order_no = res.order_no
this.order_no = res.order_no
this.nowPay()
}
}).catch(err => {
this.$refs.uToast.show({
uni.showToast({
title: err.message,
type: 'primary',
duration: 3000
icon : 'none'
})
})
},
@@ -268,8 +257,9 @@
if (this.info.is_change) {
this.selectTypeId = id
} else {
this.$refs.uToast.show({
title: '当前商品不支持EB支付'
uni.showToast({
title: '当前商品不支持EB支付',
icon : 'none'
})
}
} else if (id === '2') {