Commit de256ee1 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-wx]:保证代码规范一致。

parent 08a81451
......@@ -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 {
......
......@@ -16,7 +16,7 @@
<text class="desc">{{goods.goodsBrief}}</text>
<text class="price">¥{{goods.retailPrice}}</text>
<view class="brand" wx:if="{{brand.name}}">
<navigator url="../brandDetail/brandDetail?id={{brand.id}}">
<navigator url="/pages/brandDetail/brandDetail?id={{brand.id}}">
<text>{{brand.name}}</text>
</navigator>
</view>
......@@ -24,11 +24,11 @@
</view>
<view class="section-nav section-attr" bindtap="switchAttrPop">
<view class="t">{{checkedSpecText}}</view>
<image class="i" src="../../static/images/address_right.png" background-size="cover"></image>
<image class="i" src="/static/images/address_right.png" background-size="cover"></image>
</view>
<view class="comments" wx:if="{{comment.count > 0}}">
<view class="h">
<navigator url="../comment/comment?valueId={{goods.id}}&typeId=0">
<navigator url="/pages/comment/comment?valueId={{goods.id}}&typeId=0">
<text class="t">评价({{comment.count > 999 ? '999+' : comment.count}})</text>
<text class="i">查看全部</text>
</navigator>
......@@ -62,7 +62,7 @@
</view>
<view class="detail">
<import src="../../lib/wxParse/wxParse.wxml" />
<import src="/lib/wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
</view>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment