From 2f72647b0e9c4d293f39497183967c386041199d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com> Date: Mon, 28 Jun 2021 16:28:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5banner=E5=8F=AF=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=9B=BE=E7=89=87=20[=E4=BC=98=E5=8C=96]=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=B2=BE=E5=BA=A6=E8=AE=A1=E7=AE=97=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/bigc.js | 1 + pages/goodsDetail/index.vue | 15 ++++++++++++--- pages/order/confirm-order.vue | 11 +++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 common/bigc.js diff --git a/common/bigc.js b/common/bigc.js new file mode 100644 index 0000000..11660e7 --- /dev/null +++ b/common/bigc.js @@ -0,0 +1 @@ +!function(e){"use strict";var r,i=20,s=1,P=1e6,o=-7,f=21,c="[big.js] ",u=c+"Invalid ",b=u+"decimal places",h=u+"rounding mode",x=c+"Division by zero",l={},D=void 0,a=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function R(e,r,t,n){var i=e.c,s=e.e+r+1;if(s++n&&R(e,t,o.RM),2==r&&(n=e.e+t+1);e.c.length=o.PE))s=s.charAt(0)+(1t)for(i-=t;i--;)s+="0";else ii[s]^r?1:-1;return f==c?0:cw[l]?1:-1;break}if(!(h<0))break;for(c=d==f?i:a;d;){if(w[--d]>=1;)r=r.times(r);return i?t.div(n):n},l.round=function(e,r){var t=this.constructor;if(e===D)e=0;else if(e!==~~e||e<-P||P - - + + @@ -153,7 +153,16 @@ let goods_id = this.goods_detail.id; let goods_specs_id = this.goods_detail.specs[0].id this.$url('/pages/order/confirm-order?goods_id='+ goods_id +'&goods_specs_id='+ goods_specs_id); - } + }, + // 预览图片 + lookImg(index){ + let goods_banner = this.goods_detail.banners || []; + let banners = goods_banner.map(item => item.cover); + uni.previewImage({ + urls: banners, + current: index + }) + }, }, onShareAppMessage(){ let goods = this.goods_detail; diff --git a/pages/order/confirm-order.vue b/pages/order/confirm-order.vue index 3f5a3b8..54b68ea 100644 --- a/pages/order/confirm-order.vue +++ b/pages/order/confirm-order.vue @@ -63,7 +63,8 @@ 应付款: - {{Number(orderDetails.goods.specs[0].selling_price*num || 0)}} + + {{ total(num, orderDetails.goods.specs[0].selling_price) }}