From 3c7d940ba8a6f4727ca02e7a7d733f0a5f413168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Mon, 3 Oct 2022 12:47:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E6=8F=90=E4=BA=A4parseInt?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/m-buy/goods.vue | 2 +- components/m-goods-list/common.vue | 2 +- components/m-goods-list/list.vue | 2 +- pages/navigation/search/searchPage.vue | 2 +- pages/order/fillorder.vue | 2 +- pages/product/goods.vue | 2 +- .../product/promotion/-promotion-assemble-promotions.vue | 2 +- pages/product/product/shop/-shop.vue | 2 +- pages/product/shopList.vue | 2 +- pages/tabbar/cart/cartList.vue | 2 +- pages/tabbar/home/template/tpl_goods.vue | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue index a6cef91..924a9a2 100644 --- a/components/m-buy/goods.vue +++ b/components/m-buy/goods.vue @@ -209,7 +209,7 @@ if (typeof val == "undefined") { return val; } - return val.toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, closeMask() { diff --git a/components/m-goods-list/common.vue b/components/m-goods-list/common.vue index dd46e5d..fe65b55 100644 --- a/components/m-goods-list/common.vue +++ b/components/m-goods-list/common.vue @@ -44,7 +44,7 @@ return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, // 数据去重一下 只显示一次 减免 劵 什么的 diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue index 636decc..2642594 100644 --- a/components/m-goods-list/list.vue +++ b/components/m-goods-list/list.vue @@ -184,7 +184,7 @@ if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, // 数据去重一下 只显示一次 减免 劵 什么的 diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue index 0de7f91..758b727 100644 --- a/pages/navigation/search/searchPage.vue +++ b/pages/navigation/search/searchPage.vue @@ -376,7 +376,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, // 展示更多数据 diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue index 238bb51..930a851 100644 --- a/pages/order/fillorder.vue +++ b/pages/order/fillorder.vue @@ -460,7 +460,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, //发票回调 选择发票之后刷新购物车 async callbackInvoice(val) { diff --git a/pages/product/goods.vue b/pages/product/goods.vue index 1f59271..90a9a57 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -757,7 +757,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, /**选择商品 */ diff --git a/pages/product/product/promotion/-promotion-assemble-promotions.vue b/pages/product/product/promotion/-promotion-assemble-promotions.vue index b007f31..aef1a4a 100644 --- a/pages/product/product/promotion/-promotion-assemble-promotions.vue +++ b/pages/product/product/promotion/-promotion-assemble-promotions.vue @@ -146,7 +146,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, getCountDownTime(val) { let date = new Date(val); diff --git a/pages/product/product/shop/-shop.vue b/pages/product/product/shop/-shop.vue index 521952c..a04e234 100644 --- a/pages/product/product/shop/-shop.vue +++ b/pages/product/product/shop/-shop.vue @@ -53,7 +53,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, // 点击商品 clickGoods(val) { diff --git a/pages/product/shopList.vue b/pages/product/shopList.vue index 873205d..967abf2 100644 --- a/pages/product/shopList.vue +++ b/pages/product/shopList.vue @@ -87,7 +87,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, async init() { let res = await getStoreList(this.params); diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue index 3bdd5ef..a0ebc9a 100644 --- a/pages/tabbar/cart/cartList.vue +++ b/pages/tabbar/cart/cartList.vue @@ -264,7 +264,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, /** diff --git a/pages/tabbar/home/template/tpl_goods.vue b/pages/tabbar/home/template/tpl_goods.vue index 8d85f30..9fb7fa0 100644 --- a/pages/tabbar/home/template/tpl_goods.vue +++ b/pages/tabbar/home/template/tpl_goods.vue @@ -63,7 +63,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, handleClick(item) { uni.navigateTo({