From 4efe3e5b43694ff4ddbe80067f08eb2d6253d76e Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Wed, 19 Jun 2019 00:44:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=BC=9D=E9=9A=99=EF=BC=8C=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E9=80=82=E9=85=8Dicon=E4=BB=B7=E6=A0=BC=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/GoodsService.php | 2 +- .../old/alipay/pages/goods-detail/goods-detail.acss | 11 +++++++++++ .../old/alipay/pages/goods-detail/goods-detail.axml | 3 ++- .../old/alipay/pages/goods-detail/goods-detail.js | 6 +++++- .../old/weixin/pages/goods-detail/goods-detail.js | 6 +++++- .../old/weixin/pages/goods-detail/goods-detail.wxml | 3 ++- .../old/weixin/pages/goods-detail/goods-detail.wxss | 11 +++++++++++ public/static/index/default/css/common.css | 2 +- 8 files changed, 38 insertions(+), 6 deletions(-) diff --git a/application/service/GoodsService.php b/application/service/GoodsService.php index ac0b40cf8..cf697f9d5 100755 --- a/application/service/GoodsService.php +++ b/application/service/GoodsService.php @@ -1309,7 +1309,7 @@ class GoodsService { return DataReturn('请填写有效的规格销售价格', -1); } - if(empty($data[0][1])) + if(!isset($data[0][1]) || $data[0][1] < 0) { return DataReturn('请填写规格库存', -1); } diff --git a/public/appmini/old/alipay/pages/goods-detail/goods-detail.acss b/public/appmini/old/alipay/pages/goods-detail/goods-detail.acss index ad2d6e4c8..e334424a0 100755 --- a/public/appmini/old/alipay/pages/goods-detail/goods-detail.acss +++ b/public/appmini/old/alipay/pages/goods-detail/goods-detail.acss @@ -195,4 +195,15 @@ } .page { padding-bottom: 100rpx; +} + +/* + * 价格icon + */ + .price-icon { + background:#FF5722; + color:#fff; + padding:2px 5px; + line-height:20px; + border-radius:1px; } \ No newline at end of file diff --git a/public/appmini/old/alipay/pages/goods-detail/goods-detail.axml b/public/appmini/old/alipay/pages/goods-detail/goods-detail.axml index 56bc906df..893d3381e 100755 --- a/public/appmini/old/alipay/pages/goods-detail/goods-detail.axml +++ b/public/appmini/old/alipay/pages/goods-detail/goods-detail.axml @@ -27,6 +27,7 @@ + {{show_field_price_text}} ¥{{goods.price}} ¥{{goods.original_price}} @@ -49,7 +50,7 @@ 详情 - + {{items}} diff --git a/public/appmini/old/alipay/pages/goods-detail/goods-detail.js b/public/appmini/old/alipay/pages/goods-detail/goods-detail.js index c133e7270..a8e084fac 100755 --- a/public/appmini/old/alipay/pages/goods-detail/goods-detail.js +++ b/public/appmini/old/alipay/pages/goods-detail/goods-detail.js @@ -28,6 +28,8 @@ Page({ goods_spec_base_original_price: 0, goods_spec_base_inventory: 0, goods_spec_base_images: '', + + show_field_price_text: null, }, onLoad(params) { @@ -93,7 +95,9 @@ Page({ goods_spec_base_price: data.goods.price, goods_spec_base_original_price: data.goods.original_price, goods_spec_base_inventory: data.goods.inventory, - goods_spec_base_images: data.goods.images + goods_spec_base_images: data.goods.images, + + show_field_price_text: data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null, }); // 不能选择规格处理 diff --git a/public/appmini/old/weixin/pages/goods-detail/goods-detail.js b/public/appmini/old/weixin/pages/goods-detail/goods-detail.js index a2614eae1..fcfda459b 100755 --- a/public/appmini/old/weixin/pages/goods-detail/goods-detail.js +++ b/public/appmini/old/weixin/pages/goods-detail/goods-detail.js @@ -28,6 +28,8 @@ Page({ goods_spec_base_original_price: 0, goods_spec_base_inventory: 0, goods_spec_base_images: '', + + show_field_price_text: null, }, onLoad(params) { @@ -93,7 +95,9 @@ Page({ goods_spec_base_price: data.goods.price, goods_spec_base_original_price: data.goods.original_price, goods_spec_base_inventory: data.goods.inventory, - goods_spec_base_images: data.goods.images + goods_spec_base_images: data.goods.images, + + show_field_price_text: data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null, }); // 不能选择规格处理 diff --git a/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml b/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml index b1f24cdfc..5ec853ec0 100755 --- a/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml +++ b/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml @@ -27,6 +27,7 @@ + {{show_field_price_text}} ¥{{goods.price}} ¥{{goods.original_price}} @@ -49,7 +50,7 @@ 详情 - + {{items}} diff --git a/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxss b/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxss index 2d97e848a..23f0bc42e 100755 --- a/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxss +++ b/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxss @@ -202,4 +202,15 @@ } .page { padding-bottom: 100rpx; +} + +/* + * 价格icon + */ + .price-icon { + background:#FF5722; + color:#fff; + padding:2px 5px; + line-height:20px; + border-radius:1px; } \ No newline at end of file diff --git a/public/static/index/default/css/common.css b/public/static/index/default/css/common.css index 0e22235d2..c76b19714 100755 --- a/public/static/index/default/css/common.css +++ b/public/static/index/default/css/common.css @@ -14,7 +14,6 @@ time, mark, audio, video { margin: 0; padding: 0; border: 0; - vertical-align: baseline; font-family: arial,"Lantinghei SC","Microsoft Yahei"; font-style: normal; } @@ -649,6 +648,7 @@ ul.am-dropdown-content > .am-active > a:focus, max-width: 100px; max-height: 45px; padding: 5px; + line-height: 30px; } .shop-navigation .wap-logo img { max-width: 100%;