Commit 4876fdc0 by xuningning

完善页面需求

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