Commit 4876fdc0 by xuningning

完善页面需求

parent e96f5d81
......@@ -148,7 +148,7 @@
去支付
</view>
<span style="color: #D61A62;font-size: 32rpx;">{{allprice}}</span>
<span style="color: #D61A62;"></span><span>2件,合计:</span>
<span style="color: #D61A62;"></span><span>{{goodsnum}}件,合计:</span>
</view>
</view>
<u-toast ref="uToast"></u-toast>
......@@ -178,7 +178,8 @@
isbuycode: false,
delivery_store_id: 0,
flag: false,
payType: 1
payType: 1,
goodsnum: 0
}
},
onShow() {
......@@ -285,8 +286,7 @@
this.columns = ['送货上门']
}
console.log(res.data)
}).catch(err => {
})
}).catch(err => {})
},
getLocation() {
let _this = this
......@@ -327,6 +327,7 @@
this.$request('/checkout-buy-order', 'POST', this.confirOrderObj).then(res => {
this.OrderInfo = [];
this.allprice = 0;
_this.goodsnum = 0;
let baseData = res.data;
this.OrderInfo.push(res.data)
for (let i in this.OrderInfo) {
......@@ -335,9 +336,9 @@
_this.allprice = _this.$utils.amend(_this.allprice, addNum, "+")
// this.allprice = this.allprice + (Number(this.OrderInfo[i].goods_price) * this.OrderInfo[i]
// .num)
_this.goodsnum += _this.OrderInfo[i].num
}
}).catch(err => {
})
}).catch(err => {})
},
//获取确定订单详情-购物车
checkout_buy_carorder() {
......@@ -345,6 +346,7 @@
this.$request('/checkout-cart-order', 'POST', this.confirOrderObj).then(res => {
this.OrderInfo = [];
this.allprice = 0;
_this.goodsnum = 0;
this.OrderInfo = res.data;
for (let i in this.OrderInfo) {
console.log(this.allpriceallprice)
......@@ -353,6 +355,7 @@
let addNum = _this.$utils.amend(_this.OrderInfo[i].goods_price, _this.OrderInfo[i].num,
"*");
_this.allprice = _this.$utils.amend(_this.allprice, addNum, "+")
_this.goodsnum += _this.OrderInfo[i].num
}
}).catch(err => {
uni.showToast({
......
{
"component": true,
"usingComponents": {
"u-icon": "/node-modules/uview-ui/components/u-icon/u-icon"
},
"component": true
}
}
\ No newline at end of file
{
"component": true,
"usingComponents": {
"u-icon": "/node-modules/uview-ui/components/u-icon/u-icon",
"u-badge": "/node-modules/uview-ui/components/u-badge/u-badge"
},
"component": true
}
}
\ No newline at end of file
......@@ -389,7 +389,8 @@ var _default = {
isbuycode: false,
delivery_store_id: 0,
flag: false,
payType: 1
payType: 1,
goodsnum: 0
};
},
onShow: function onShow() {
......@@ -537,6 +538,7 @@ var _default = {
this.$request('/checkout-buy-order', 'POST', this.confirOrderObj).then(function (res) {
_this4.OrderInfo = [];
_this4.allprice = 0;
_this.goodsnum = 0;
var baseData = res.data;
_this4.OrderInfo.push(res.data);
for (var i in _this4.OrderInfo) {
......@@ -544,6 +546,7 @@ var _default = {
_this.allprice = _this.$utils.amend(_this.allprice, addNum, "+");
// this.allprice = this.allprice + (Number(this.OrderInfo[i].goods_price) * this.OrderInfo[i]
// .num)
_this.goodsnum += _this.OrderInfo[i].num;
}
}).catch(function (err) {});
},
......@@ -554,6 +557,7 @@ var _default = {
this.$request('/checkout-cart-order', 'POST', this.confirOrderObj).then(function (res) {
_this5.OrderInfo = [];
_this5.allprice = 0;
_this.goodsnum = 0;
_this5.OrderInfo = res.data;
for (var i in _this5.OrderInfo) {
console.log(_this5.allpriceallprice);
......@@ -561,6 +565,7 @@ var _default = {
// .num)
var addNum = _this.$utils.amend(_this.OrderInfo[i].goods_price, _this.OrderInfo[i].num, "*");
_this.allprice = _this.$utils.amend(_this.allprice, addNum, "+");
_this.goodsnum += _this.OrderInfo[i].num;
}
}).catch(function (err) {
uni.showToast({
......
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