diff --git a/pages/order/product-waitpay/product-waitpay.vue b/pages/order/product-waitpay/product-waitpay.vue index 237cbdc..69f2893 100644 --- a/pages/order/product-waitpay/product-waitpay.vue +++ b/pages/order/product-waitpay/product-waitpay.vue @@ -89,7 +89,7 @@ class="shrink-0 image_9" src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FjIVFaWXA-rmb.png" /> - {{ sumprice }} + {{ sumprice.toFixed(2) }} @@ -122,7 +122,7 @@ class="shrink-0 image_9" src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FjIVFaWXA-rmb.png" /> - {{ sumprice }} + {{ sumprice.toFixed(2) }} @@ -142,7 +142,7 @@ src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FJmxvlQvD-rmbpink.png" /> 应付: - {{ sumprice }} + {{ sumprice.toFixed(2) }} 微信支付 @@ -162,6 +162,7 @@ import { onLoad , onShow } from "@dcloudio/uni-app"; import { baseUrl } from '../../../api/request'; import addressComponentVue from '../component/addressComponent.vue'; //导入组件 import { stateMap } from '../../../common/global'; +import { sum } from 'mathjs'; //一些暂时变量 const sumprice = ref(0) //总价格 //11.4开发 不应该删掉的 @@ -255,13 +256,16 @@ const getProduct = async ()=> { header: { cookie: wx.getStorageSync('cookie') }, - data: JSON.stringify(totalInfo.value) + data: { + idList: totalInfo.value + } }) console.log('展示订单页面的商品信息-->',res.data); if( res.data.code === 1 ) { dealRes(res) } } + const dealRes =(res)=> { //处理来自后端的数据 productArr.value = res.data.data console.log('productArr--->',productArr.value); diff --git a/unpackage/dist/dev/mp-weixin/pages/order/product-waitpay/product-waitpay.js b/unpackage/dist/dev/mp-weixin/pages/order/product-waitpay/product-waitpay.js index ec20210..6dea0ca 100644 --- a/unpackage/dist/dev/mp-weixin/pages/order/product-waitpay/product-waitpay.js +++ b/unpackage/dist/dev/mp-weixin/pages/order/product-waitpay/product-waitpay.js @@ -101,7 +101,9 @@ const _sfc_main = { header: { cookie: common_vendor.wx$1.getStorageSync("cookie") }, - data: JSON.stringify(totalInfo.value) + data: { + idList: totalInfo.value + } }); console.log("展示订单页面的商品信息-->", res.data); if (res.data.code === 1) { @@ -212,9 +214,9 @@ const _sfc_main = { }; }), g: common_vendor.t(productArr.value.length), - h: common_vendor.t(sumprice.value), - i: common_vendor.t(sumprice.value), - j: common_vendor.t(sumprice.value), + h: common_vendor.t(sumprice.value.toFixed(2)), + i: common_vendor.t(sumprice.value.toFixed(2)), + j: common_vendor.t(sumprice.value.toFixed(2)), k: common_vendor.o(createOrder), l: common_vendor.sr(popup, "eda1e8f0-0", { "k": "popup" diff --git a/unpackage/dist/dev/mp-weixin/project.private.config.json b/unpackage/dist/dev/mp-weixin/project.private.config.json index 5802338..9db7702 100644 --- a/unpackage/dist/dev/mp-weixin/project.private.config.json +++ b/unpackage/dist/dev/mp-weixin/project.private.config.json @@ -7,6 +7,34 @@ "condition": { "miniprogram": { "list": [ + { + "name": "pages/Shopping-cart/productmain/testproductmain", + "pathName": "pages/Shopping-cart/productmain/testproductmain", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "pages/workshop/index/index", + "pathName": "pages/workshop/index/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "pages/workshop/productmain/productmain", + "pathName": "pages/workshop/productmain/productmain", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "pages/Shopping-cart/newaddress_Info/newaddress_Info", + "pathName": "pages/Shopping-cart/newaddress_Info/newaddress_Info", + "query": "", + "launchMode": "default", + "scene": null + }, { "name": "pages/home/home", "pathName": "pages/home/home",