From de256ee199dbc5c0145fee644675cb8c0389cfab Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Wed, 4 Apr 2018 15:20:10 +0800 Subject: [PATCH] =?UTF-8?q?fix[litemall-wx]:=E4=BF=9D=E8=AF=81=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=A7=84=E8=8C=83=E4=B8=80=E8=87=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-wx/pages/goods/goods.js | 38 +++++++++++++++--------------- litemall-wx/pages/goods/goods.wxml | 8 +++---- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/litemall-wx/pages/goods/goods.js b/litemall-wx/pages/goods/goods.js index e7419644..c288181a 100644 --- a/litemall-wx/pages/goods/goods.js +++ b/litemall-wx/pages/goods/goods.js @@ -20,9 +20,9 @@ Page({ number: 1, checkedSpecText: '请选择规格数量', openAttr: false, - noCollectImage: "/static/images/icon_collect.png", - hasCollectImage: "/static/images/icon_collect_checked.png", - collectBackImage: "/static/images/icon_collect.png" + noCollectImage: '/static/images/icon_collect.png', + hasCollectImage: '/static/images/icon_collect_checked.png', + collectBackImage: '/static/images/icon_collect.png' }, getGoodsInfo: function () { let that = this; @@ -35,7 +35,7 @@ Page({ if (_specificationList[0].valueList.length == 1) { _specificationList[0].valueList[0].checked = true that.setData({ - 'checkedSpecText': "已选择:" + _specificationList[0].valueList[0].value + checkedSpecText: '已选择:' + _specificationList[0].valueList[0].value }); } } @@ -53,11 +53,11 @@ Page({ if (res.data.userHasCollect == 1) { that.setData({ - 'collectBackImage': that.data.hasCollectImage + collectBackImage: that.data.hasCollectImage }); } else { that.setData({ - 'collectBackImage': that.data.noCollectImage + collectBackImage: that.data.noCollectImage }); } @@ -105,7 +105,7 @@ Page({ } } this.setData({ - 'specificationList': _specificationList + specificationList: _specificationList }); //重新计算spec改变后的信息 this.changeSpecInfo(); @@ -168,11 +168,11 @@ Page({ }); if (checkedValue.length > 0) { this.setData({ - 'checkedSpecText': checkedValue.join(' ') + checkedSpecText: checkedValue.join(' ') }); } else { this.setData({ - 'checkedSpecText': '请选择规格数量' + checkedSpecText: '请选择规格数量' }); } @@ -220,7 +220,7 @@ Page({ if (this.data.openAttr == false) { this.setData({ openAttr: !this.data.openAttr, - collectBackImage: "/static/images/detail_back.png" + collectBackImage: '/static/images/detail_back.png' }); } }, @@ -232,11 +232,11 @@ Page({ }); if (that.data.userHasCollect == 1) { that.setData({ - 'collectBackImage': that.data.hasCollectImage + collectBackImage: that.data.hasCollectImage }); } else { that.setData({ - 'collectBackImage': that.data.noCollectImage + collectBackImage: that.data.noCollectImage }); } } else { @@ -247,11 +247,11 @@ Page({ if (_res.errno == 0) { if ( _res.data.type == 'add') { that.setData({ - 'collectBackImage': that.data.hasCollectImage + collectBackImage: that.data.hasCollectImage }); } else { that.setData({ - 'collectBackImage': that.data.noCollectImage + collectBackImage: that.data.noCollectImage }); } @@ -276,7 +276,7 @@ Page({ //打开规格选择窗口 this.setData({ openAttr: !this.data.openAttr, - collectBackImage: "/static/images/detail_back.png" + collectBackImage: '/static/images/detail_back.png' }); } else { @@ -319,7 +319,7 @@ Page({ try { wx.setStorageSync('cartId', res.data); wx.navigateTo({ - url: '../shopping/checkout/checkout' + url: '/pages/shopping/checkout/checkout' }) } catch (e) { } @@ -342,7 +342,7 @@ Page({ //打开规格选择窗口 this.setData({ openAttr: !this.data.openAttr, - collectBackImage: "/static/images/detail_back.png" + collectBackImage: '/static/images/detail_back.png' }); } else { @@ -390,11 +390,11 @@ Page({ }); if (that.data.userHasCollect == 1) { that.setData({ - 'collectBackImage': that.data.hasCollectImage + collectBackImage: that.data.hasCollectImage }); } else { that.setData({ - 'collectBackImage': that.data.noCollectImage + collectBackImage: that.data.noCollectImage }); } } else { diff --git a/litemall-wx/pages/goods/goods.wxml b/litemall-wx/pages/goods/goods.wxml index e0464568..7abc0723 100644 --- a/litemall-wx/pages/goods/goods.wxml +++ b/litemall-wx/pages/goods/goods.wxml @@ -16,7 +16,7 @@ {{goods.goodsBrief}} ¥{{goods.retailPrice}} - + {{brand.name}} @@ -24,11 +24,11 @@ {{checkedSpecText}} - + - + 评价({{comment.count > 999 ? '999+' : comment.count}}) 查看全部 @@ -62,7 +62,7 @@ - +