diff --git a/common/js/request.js b/common/js/request.js index d2e17d4..c87f6ca 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -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); diff --git a/pages/order/order-detail.vue b/pages/order/order-detail.vue index d6d14c4..aa8c3ba 100644 --- a/pages/order/order-detail.vue +++ b/pages/order/order-detail.vue @@ -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() { diff --git a/pages/product/product-pick.vue b/pages/product/product-pick.vue index 4b08df2..aaea760 100644 --- a/pages/product/product-pick.vue +++ b/pages/product/product-pick.vue @@ -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; },