商品选购及下单页面的金额出现超长小数位的问题修复
This commit is contained in:
parent
f4197ec3b0
commit
4787c3e75e
|
|
@ -11,9 +11,9 @@ export default {
|
|||
title: '加载中'
|
||||
})
|
||||
// request 触发前拼接 url
|
||||
// args.url = 'https://www.opsoul.com' + args.url;
|
||||
args.url = 'https://www.opsoul.com' + args.url;
|
||||
// args.url = 'http://192.168.2.42:80' + args.url;
|
||||
args.url = 'http://127.0.0.1:80' + args.url;
|
||||
// args.url = 'http://127.0.0.1:80' + args.url;
|
||||
if (args.data && Object.prototype && Object.prototype.toString.call(args.data) === '[object Object]') {
|
||||
args.data.deptId = globalData.deptId;
|
||||
args.data.from = globalData.from;
|
||||
|
|
@ -88,7 +88,6 @@ export default {
|
|||
async getCurArea() {
|
||||
try{
|
||||
let curLocation = uni.getStorageSync('curLocation');
|
||||
console.log(curLocation)
|
||||
if (curLocation && curLocation.updateTimes) {
|
||||
let curTimes = new Date().getTime();
|
||||
let deltaSeconds = curTimes - Number(curLocation.updateTimes);
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@
|
|||
loadTotalPrice() {
|
||||
// 计算totalprice
|
||||
this.pickedProductList.forEach((obj) => {
|
||||
this.totalPrice += Number(obj.totalMoney)
|
||||
this.totalPrice = Math.round((this.totalPrice + Number(obj.totalMoney)) * 100) / 100;
|
||||
})
|
||||
},
|
||||
bindEvent() {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
changePiecesNum(piecesNum, index) {
|
||||
let spec = this.pickList[index];
|
||||
let price = spec.salePrice ? spec.salePrice : spec.price;
|
||||
this.totalPrice -= price * (spec.pickCount - piecesNum);
|
||||
this.totalPrice = Math.round((this.totalPrice - price * (spec.pickCount - piecesNum)) * 100)/100;
|
||||
this.totalPickCount -= spec.pickCount - piecesNum
|
||||
this.pickList[index].pickCount = piecesNum;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue