Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
b68151cb
Unverified
Commit
b68151cb
authored
Jul 13, 2018
by
Menethil
Committed by
GitHub
Jul 13, 2018
Browse files
Merge pull request #1 from linlinjava/master
update
parents
126d027a
02679509
Changes
251
Hide whitespace changes
Inline
Side-by-side
litemall-wx/pages/cart/cart.wxml
View file @
b68151cb
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</view>
</view>
<view class="attr">{{ isEditCart ? '已选择:' : ''}}{{item.goodsSpecificationValues||''}}</view>
<view class="attr">{{ isEditCart ? '已选择:' : ''}}{{item.goodsSpecificationValues||''}}</view>
<view class="b">
<view class="b">
<text class="price">¥{{item.
retailP
rice}}</text>
<text class="price">¥{{item.
p
rice}}</text>
<view class="selnum">
<view class="selnum">
<view class="cut" bindtap="cutNumber" data-item-index="{{index}}">-</view>
<view class="cut" bindtap="cutNumber" data-item-index="{{index}}">-</view>
<input value="{{item.number}}" class="number" disabled="true" type="number" />
<input value="{{item.number}}" class="number" disabled="true" type="number" />
...
...
litemall-wx/pages/catalog/catalog.wxml
View file @
b68151cb
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</scroll-view>
</scroll-view>
<scroll-view class="cate" scroll-y="true">
<scroll-view class="cate" scroll-y="true">
<navigator url="url" class="banner">
<navigator url="url" class="banner">
<image class="image" src="{{currentCategory.
wapBanner
Url}}"></image>
<image class="image" src="{{currentCategory.
pic
Url}}"></image>
<view class="txt">{{currentCategory.frontName}}</view>
<view class="txt">{{currentCategory.frontName}}</view>
</navigator>
</navigator>
<view class="hd">
<view class="hd">
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</view>
</view>
<view class="bd">
<view class="bd">
<navigator url="/pages/category/category?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:key="id" wx:for="{{currentSubCategoryList}}">
<navigator url="/pages/category/category?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:key="id" wx:for="{{currentSubCategoryList}}">
<image class="icon" src="{{item.
wapBanner
Url}}"></image>
<image class="icon" src="{{item.
pic
Url}}"></image>
<text class="txt">{{item.name}}</text>
<text class="txt">{{item.name}}</text>
</navigator>
</navigator>
</view>
</view>
...
...
litemall-wx/pages/category/category.wxml
View file @
b68151cb
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</view>
</view>
<view class="b">
<view class="b">
<navigator class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}" url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{goodsList}}" wx:key="id" wx:for-item="iitem" wx:for-index="iindex" >
<navigator class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}" url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{goodsList}}" wx:key="id" wx:for-item="iitem" wx:for-index="iindex" >
<image class="img" src="{{iitem.
listP
icUrl}}" background-size="cover"></image>
<image class="img" src="{{iitem.
p
icUrl}}" background-size="cover"></image>
<text class="name">{{iitem.name}}</text>
<text class="name">{{iitem.name}}</text>
<text class="price">¥{{iitem.retailPrice}}</text>
<text class="price">¥{{iitem.retailPrice}}</text>
</navigator>
</navigator>
...
...
litemall-wx/pages/comment/comment.js
View file @
b68151cb
...
@@ -7,7 +7,7 @@ Page({
...
@@ -7,7 +7,7 @@ Page({
comments
:
[],
comments
:
[],
allCommentList
:
[],
allCommentList
:
[],
picCommentList
:
[],
picCommentList
:
[],
type
Id
:
0
,
type
:
0
,
valueId
:
0
,
valueId
:
0
,
showType
:
0
,
showType
:
0
,
allCount
:
0
,
allCount
:
0
,
...
@@ -18,7 +18,7 @@ Page({
...
@@ -18,7 +18,7 @@ Page({
},
},
getCommentCount
:
function
()
{
getCommentCount
:
function
()
{
let
that
=
this
;
let
that
=
this
;
util
.
request
(
api
.
CommentCount
,
{
valueId
:
that
.
data
.
valueId
,
type
Id
:
that
.
data
.
type
Id
}).
then
(
function
(
res
)
{
util
.
request
(
api
.
CommentCount
,
{
valueId
:
that
.
data
.
valueId
,
type
:
that
.
data
.
type
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
that
.
setData
({
allCount
:
res
.
data
.
allCount
,
allCount
:
res
.
data
.
allCount
,
...
@@ -31,7 +31,7 @@ Page({
...
@@ -31,7 +31,7 @@ Page({
let
that
=
this
;
let
that
=
this
;
util
.
request
(
api
.
CommentList
,
{
util
.
request
(
api
.
CommentList
,
{
valueId
:
that
.
data
.
valueId
,
valueId
:
that
.
data
.
valueId
,
type
Id
:
that
.
data
.
type
Id
,
type
:
that
.
data
.
type
,
size
:
that
.
data
.
size
,
size
:
that
.
data
.
size
,
page
:
(
that
.
data
.
showType
==
0
?
that
.
data
.
allPage
:
that
.
data
.
picPage
),
page
:
(
that
.
data
.
showType
==
0
?
that
.
data
.
allPage
:
that
.
data
.
picPage
),
showType
:
that
.
data
.
showType
showType
:
that
.
data
.
showType
...
@@ -57,7 +57,7 @@ Page({
...
@@ -57,7 +57,7 @@ Page({
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
// 页面初始化 options为页面跳转所带来的参数
// 页面初始化 options为页面跳转所带来的参数
this
.
setData
({
this
.
setData
({
type
Id
:
options
.
type
Id
,
type
:
options
.
type
,
valueId
:
options
.
valueId
valueId
:
options
.
valueId
});
});
this
.
getCommentCount
();
this
.
getCommentCount
();
...
...
litemall-wx/pages/commentPost/commentPost.js
View file @
b68151cb
...
@@ -5,7 +5,7 @@ var api = require('../../config/api.js');
...
@@ -5,7 +5,7 @@ var api = require('../../config/api.js');
Page
({
Page
({
data
:
{
data
:
{
orderId
:
0
,
orderId
:
0
,
type
Id
:
0
,
type
:
0
,
valueId
:
0
,
valueId
:
0
,
orderGoods
:
{},
orderGoods
:
{},
content
:
''
,
content
:
''
,
...
@@ -102,7 +102,7 @@ Page({
...
@@ -102,7 +102,7 @@ Page({
var
that
=
this
;
var
that
=
this
;
that
.
setData
({
that
.
setData
({
orderId
:
options
.
orderId
,
orderId
:
options
.
orderId
,
type
Id
:
options
.
type
Id
,
type
:
options
.
type
,
valueId
:
options
.
valueId
valueId
:
options
.
valueId
});
});
this
.
getOrderComment
();
this
.
getOrderComment
();
...
@@ -131,7 +131,7 @@ Page({
...
@@ -131,7 +131,7 @@ Page({
}
}
util
.
request
(
api
.
CommentPost
,
{
util
.
request
(
api
.
CommentPost
,
{
type
Id
:
that
.
data
.
type
Id
,
type
:
that
.
data
.
type
,
valueId
:
that
.
data
.
valueId
,
valueId
:
that
.
data
.
valueId
,
content
:
that
.
data
.
content
,
content
:
that
.
data
.
content
,
star
:
that
.
data
.
star
,
star
:
that
.
data
.
star
,
...
...
litemall-wx/pages/goods/goods.js
View file @
b68151cb
...
@@ -40,7 +40,7 @@ Page({
...
@@ -40,7 +40,7 @@ Page({
// 如果仅仅存在一种货品,那么商品价格应该和货品价格一致
// 如果仅仅存在一种货品,那么商品价格应该和货品价格一致
// 这里检测一下
// 这里检测一下
let
_productPrice
=
res
.
data
.
productList
[
0
].
retailP
rice
;
let
_productPrice
=
res
.
data
.
productList
[
0
].
p
rice
;
let
_goodsPrice
=
res
.
data
.
info
.
retailPrice
;
let
_goodsPrice
=
res
.
data
.
info
.
retailPrice
;
if
(
_productPrice
!=
_goodsPrice
){
if
(
_productPrice
!=
_goodsPrice
){
console
.
error
(
'
商品数量价格和货品不一致
'
);
console
.
error
(
'
商品数量价格和货品不一致
'
);
...
@@ -75,7 +75,7 @@ Page({
...
@@ -75,7 +75,7 @@ Page({
});
});
}
}
WxParse
.
wxParse
(
'
goodsDetail
'
,
'
html
'
,
res
.
data
.
info
.
goodsD
esc
,
that
);
WxParse
.
wxParse
(
'
goodsDetail
'
,
'
html
'
,
res
.
data
.
info
.
d
esc
,
that
);
that
.
getGoodsRelated
();
that
.
getGoodsRelated
();
}
}
...
@@ -161,7 +161,7 @@ Page({
...
@@ -161,7 +161,7 @@ Page({
},
},
getCheckedSpecKey
:
function
()
{
getCheckedSpecKey
:
function
()
{
let
checkedValue
=
this
.
getCheckedSpecValue
().
map
(
function
(
v
)
{
let
checkedValue
=
this
.
getCheckedSpecValue
().
map
(
function
(
v
)
{
return
v
.
value
Id
;
return
v
.
value
Text
;
});
});
return
checkedValue
;
return
checkedValue
;
...
@@ -206,9 +206,9 @@ Page({
...
@@ -206,9 +206,9 @@ Page({
}
}
let
checkedProduct
=
checkedProductArray
[
0
];
let
checkedProduct
=
checkedProductArray
[
0
];
if
(
checkedProduct
.
goodsN
umber
>
0
){
if
(
checkedProduct
.
n
umber
>
0
){
this
.
setData
({
this
.
setData
({
checkedSpecPrice
:
checkedProduct
.
retailP
rice
,
checkedSpecPrice
:
checkedProduct
.
p
rice
,
soldout
:
false
soldout
:
false
});
});
}
}
...
@@ -231,7 +231,7 @@ Page({
...
@@ -231,7 +231,7 @@ Page({
},
},
getCheckedProductItem
:
function
(
key
)
{
getCheckedProductItem
:
function
(
key
)
{
return
this
.
data
.
productList
.
filter
(
function
(
v
)
{
return
this
.
data
.
productList
.
filter
(
function
(
v
)
{
if
(
v
.
goodsS
pecification
Id
s
.
toString
()
==
key
.
toString
())
{
if
(
v
.
s
pecifications
.
toString
()
==
key
.
toString
())
{
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
...
@@ -293,7 +293,7 @@ Page({
...
@@ -293,7 +293,7 @@ Page({
}
}
}
else
{
}
else
{
//添加或是取消收藏
//添加或是取消收藏
util
.
request
(
api
.
CollectAddOrDelete
,
{
type
Id
:
0
,
valueId
:
this
.
data
.
id
},
"
POST
"
)
util
.
request
(
api
.
CollectAddOrDelete
,
{
type
:
0
,
valueId
:
this
.
data
.
id
},
"
POST
"
)
.
then
(
function
(
res
)
{
.
then
(
function
(
res
)
{
let
_res
=
res
;
let
_res
=
res
;
if
(
_res
.
errno
==
0
)
{
if
(
_res
.
errno
==
0
)
{
...
@@ -354,7 +354,7 @@ Page({
...
@@ -354,7 +354,7 @@ Page({
let
checkedProduct
=
checkedProductArray
[
0
];
let
checkedProduct
=
checkedProductArray
[
0
];
//验证库存
//验证库存
if
(
checkedProduct
.
goodsN
umber
<=
0
)
{
if
(
checkedProduct
.
n
umber
<=
0
)
{
wx
.
showToast
({
wx
.
showToast
({
image
:
'
/static/images/icon_error.png
'
,
image
:
'
/static/images/icon_error.png
'
,
title
:
'
没有库存
'
title
:
'
没有库存
'
...
@@ -420,7 +420,7 @@ Page({
...
@@ -420,7 +420,7 @@ Page({
let
checkedProduct
=
checkedProductArray
[
0
];
let
checkedProduct
=
checkedProductArray
[
0
];
//验证库存
//验证库存
if
(
checkedProduct
.
goodsN
umber
<=
0
)
{
if
(
checkedProduct
.
n
umber
<=
0
)
{
wx
.
showToast
({
wx
.
showToast
({
image
:
'
/static/images/icon_error.png
'
,
image
:
'
/static/images/icon_error.png
'
,
title
:
'
没有库存
'
title
:
'
没有库存
'
...
...
litemall-wx/pages/goods/goods.wxml
View file @
b68151cb
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</view>
</view>
<view class="comments" wx:if="{{comment.count > 0}}">
<view class="comments" wx:if="{{comment.count > 0}}">
<view class="h">
<view class="h">
<navigator url="/pages/comment/comment?valueId={{goods.id}}&type
Id
=0">
<navigator url="/pages/comment/comment?valueId={{goods.id}}&type=0">
<text class="t">评价({{comment.count > 999 ? '999+' : comment.count}})</text>
<text class="t">评价({{comment.count > 999 ? '999+' : comment.count}})</text>
<text class="i">查看全部</text>
<text class="i">查看全部</text>
</navigator>
</navigator>
...
@@ -54,8 +54,8 @@
...
@@ -54,8 +54,8 @@
<view class="goods-attr">
<view class="goods-attr">
<view class="t">商品参数</view>
<view class="t">商品参数</view>
<view class="l">
<view class="l">
<view class="item" wx:for="{{attribute}}" wx:key="
name
">
<view class="item" wx:for="{{attribute}}" wx:key="
item
">
<text class="left">{{item.
nam
e}}</text>
<text class="left">{{item.
attribut
e}}</text>
<text class="right">{{item.value}}</text>
<text class="right">{{item.value}}</text>
</view>
</view>
</view>
</view>
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
<view class="b">
<view class="b">
<view class="item" wx:for="{{relatedGoods}}" wx:key="id">
<view class="item" wx:for="{{relatedGoods}}" wx:key="id">
<navigator url="/pages/goods/goods?id={{item.id}}">
<navigator url="/pages/goods/goods?id={{item.id}}">
<image class="img" src="{{item.
listP
icUrl}}" background-size="cover"></image>
<image class="img" src="{{item.
p
icUrl}}" background-size="cover"></image>
<text class="name">{{item.name}}</text>
<text class="name">{{item.name}}</text>
<text class="price">¥{{item.retailPrice}}</text>
<text class="price">¥{{item.retailPrice}}</text>
</navigator>
</navigator>
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
</view>
</view>
<view wx:if="{{openAttr}}" class="attr-pop">
<view wx:if="{{openAttr}}" class="attr-pop">
<view class="img-info">
<view class="img-info">
<image class="img" src="{{goods.p
rimaryP
icUrl}}"></image>
<image class="img" src="{{goods.picUrl}}"></image>
<view class="info">
<view class="info">
<view class="c">
<view class="c">
<view class="p">价格:¥{{checkedSpecPrice}}</view>
<view class="p">价格:¥{{checkedSpecPrice}}</view>
...
...
litemall-wx/pages/hotGoods/hotGoods.js
View file @
b68151cb
...
@@ -13,6 +13,7 @@ Page({
...
@@ -13,6 +13,7 @@ Page({
goodsList
:
[],
goodsList
:
[],
categoryId
:
0
,
categoryId
:
0
,
currentSortType
:
'
default
'
,
currentSortType
:
'
default
'
,
currentSort
:
'
add_time
'
,
currentSortOrder
:
'
desc
'
,
currentSortOrder
:
'
desc
'
,
page
:
1
,
page
:
1
,
size
:
100
size
:
100
...
@@ -42,7 +43,7 @@ Page({
...
@@ -42,7 +43,7 @@ Page({
getGoodsList
:
function
(){
getGoodsList
:
function
(){
var
that
=
this
;
var
that
=
this
;
util
.
request
(
api
.
GoodsList
,
{
isHot
:
1
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
,
order
:
that
.
data
.
currentSortOrder
,
sort
:
that
.
data
.
currentSort
Type
,
categoryId
:
that
.
data
.
categoryId
})
util
.
request
(
api
.
GoodsList
,
{
isHot
:
true
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
,
order
:
that
.
data
.
currentSortOrder
,
sort
:
that
.
data
.
currentSort
,
categoryId
:
that
.
data
.
categoryId
})
.
then
(
function
(
res
)
{
.
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
that
.
setData
({
...
@@ -80,7 +81,8 @@ Page({
...
@@ -80,7 +81,8 @@ Page({
this
.
setData
({
this
.
setData
({
categoryFilter
:
!
this
.
data
.
categoryFilter
,
categoryFilter
:
!
this
.
data
.
categoryFilter
,
currentSortType
:
'
category
'
,
currentSortType
:
'
category
'
,
currentSortOrder
:
'
asc
'
currentSort
:
'
add_time
'
,
currentSortOrder
:
'
desc
'
});
});
break
;
break
;
case
'
priceSort
'
:
case
'
priceSort
'
:
...
@@ -90,6 +92,7 @@ Page({
...
@@ -90,6 +92,7 @@ Page({
}
}
this
.
setData
({
this
.
setData
({
currentSortType
:
'
price
'
,
currentSortType
:
'
price
'
,
currentSort
:
'
retail_price
'
,
currentSortOrder
:
tmpSortOrder
,
currentSortOrder
:
tmpSortOrder
,
categoryFilter
:
false
categoryFilter
:
false
});
});
...
@@ -100,6 +103,7 @@ Page({
...
@@ -100,6 +103,7 @@ Page({
//综合排序
//综合排序
this
.
setData
({
this
.
setData
({
currentSortType
:
'
default
'
,
currentSortType
:
'
default
'
,
currentSort
:
'
add_time
'
,
currentSortOrder
:
'
desc
'
,
currentSortOrder
:
'
desc
'
,
categoryFilter
:
false
,
categoryFilter
:
false
,
categoryId
:
0
,
categoryId
:
0
,
...
...
litemall-wx/pages/hotGoods/hotGoods.wxml
View file @
b68151cb
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<view class="b">
<view class="b">
<block wx:for="{{goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
<block wx:for="{{goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
<navigator class="item {{iindex % 2 == 0 ? 'item-b' : '' }}" url="../goods/goods?id={{iitem.id}}">
<navigator class="item {{iindex % 2 == 0 ? 'item-b' : '' }}" url="../goods/goods?id={{iitem.id}}">
<image class="img" src="{{iitem.
listP
icUrl}}" background-size="cover"></image>
<image class="img" src="{{iitem.
p
icUrl}}" background-size="cover"></image>
<text class="name">{{iitem.name}}</text>
<text class="name">{{iitem.name}}</text>
<text class="price">¥{{iitem.retailPrice}}</text>
<text class="price">¥{{iitem.retailPrice}}</text>
</navigator>
</navigator>
...
...
litemall-wx/pages/index/index.wxml
View file @
b68151cb
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<view class="b">
<view class="b">
<view class="item" wx:for="{{newGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
<view class="item" wx:for="{{newGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
<navigator url="../goods/goods?id={{item.id}}">
<navigator url="../goods/goods?id={{item.id}}">
<image class="img" src="{{item.
listP
icUrl}}" background-size="cover"></image>
<image class="img" src="{{item.
p
icUrl}}" background-size="cover"></image>
<text class="name">{{item.name}}</text>
<text class="name">{{item.name}}</text>
<text class="price">¥{{item.retailPrice}}</text>
<text class="price">¥{{item.retailPrice}}</text>
</navigator>
</navigator>
...
@@ -64,11 +64,11 @@
...
@@ -64,11 +64,11 @@
<view class="b">
<view class="b">
<view class="item" wx:for="{{hotGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
<view class="item" wx:for="{{hotGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
<navigator url="/pages/goods/goods?id={{item.id}}">
<navigator url="/pages/goods/goods?id={{item.id}}">
<image class="img" src="{{item.
listP
icUrl}}" background-size="cover"></image>
<image class="img" src="{{item.
p
icUrl}}" background-size="cover"></image>
<view class="right">
<view class="right">
<view class="text">
<view class="text">
<text class="name">{{item.name}}</text>
<text class="name">{{item.name}}</text>
<text class="desc">{{item.
goods_
brief}}</text>
<text class="desc">{{item.brief}}</text>
<text class="price">¥{{item.retailPrice}}</text>
<text class="price">¥{{item.retailPrice}}</text>
</view>
</view>
</view>
</view>
...
@@ -88,10 +88,10 @@
...
@@ -88,10 +88,10 @@
<scroll-view scroll-x class="list">
<scroll-view scroll-x class="list">
<view class="item" wx:for="{{topics}}" wx:for-index="index" wx:for-item="item" wx:key="id">
<view class="item" wx:for="{{topics}}" wx:for-index="index" wx:for-item="item" wx:key="id">
<navigator url="../topicDetail/topicDetail?id={{item.id}}">
<navigator url="../topicDetail/topicDetail?id={{item.id}}">
<image class="img" src="{{item.
sceneP
icUrl}}" background-size="cover"></image>
<image class="img" src="{{item.
p
icUrl}}" background-size="cover"></image>
<view class="np">
<view class="np">
<text class="name">{{item.title}}</text>
<text class="name">{{item.title}}</text>
<text class="price">¥{{item.price
Info
}}元起</text>
<text class="price">¥{{item.price}}元起</text>
</view>
</view>
<text class="desc">{{item.subtitle}}</text>
<text class="desc">{{item.subtitle}}</text>
</navigator>
</navigator>
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
<block wx:for="{{item.goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
<block wx:for="{{item.goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
<view class="item {{iindex % 2 == 0 ? '' : 'item-b'}}">
<view class="item {{iindex % 2 == 0 ? '' : 'item-b'}}">
<navigator url="../goods/goods?id={{iitem.id}}" class="a">
<navigator url="../goods/goods?id={{iitem.id}}" class="a">
<image class="img" src="{{iitem.
listP
icUrl}}" background-size="cover"></image>
<image class="img" src="{{iitem.
p
icUrl}}" background-size="cover"></image>
<text class="name">{{iitem.name}}</text>
<text class="name">{{iitem.name}}</text>
<text class="price">¥{{iitem.retailPrice}}</text>
<text class="price">¥{{iitem.retailPrice}}</text>
</navigator>
</navigator>
...
...
litemall-wx/pages/index/index.wxss
View file @
b68151cb
...
@@ -96,12 +96,12 @@
...
@@ -96,12 +96,12 @@
display: block;
display: block;
font-size: 33rpx;
font-size: 33rpx;
height: 43rpx;
height: 43rpx;
color: #
333
;
color: #
fff
;
}
}
.a-brand .mt .price, .a-brand .mt .unit {
.a-brand .mt .price, .a-brand .mt .unit {
font-size: 25rpx;
font-size: 25rpx;
color: #
999
;
color: #
fff
;
}
}
.a-brand .item-1 {
.a-brand .item-1 {
...
...
litemall-wx/pages/newGoods/newGoods.js
View file @
b68151cb
...
@@ -13,6 +13,7 @@ Page({
...
@@ -13,6 +13,7 @@ Page({
goodsList
:
[],
goodsList
:
[],
categoryId
:
0
,
categoryId
:
0
,
currentSortType
:
'
default
'
,
currentSortType
:
'
default
'
,
currentSort
:
'
add_time
'
,
currentSortOrder
:
'
desc
'
,
currentSortOrder
:
'
desc
'
,
page
:
1
,
page
:
1
,
size
:
100
size
:
100
...
@@ -30,7 +31,7 @@ Page({
...
@@ -30,7 +31,7 @@ Page({
getGoodsList
:
function
()
{
getGoodsList
:
function
()
{
var
that
=
this
;
var
that
=
this
;
util
.
request
(
api
.
GoodsList
,
{
isNew
:
1
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
,
order
:
that
.
data
.
currentSortOrder
,
sort
:
that
.
data
.
currentSort
Type
,
categoryId
:
that
.
data
.
categoryId
})
util
.
request
(
api
.
GoodsList
,
{
isNew
:
true
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
,
order
:
that
.
data
.
currentSortOrder
,
sort
:
that
.
data
.
currentSort
,
categoryId
:
that
.
data
.
categoryId
})
.
then
(
function
(
res
)
{
.
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
that
.
setData
({
...
@@ -67,7 +68,8 @@ Page({
...
@@ -67,7 +68,8 @@ Page({
this
.
setData
({
this
.
setData
({
categoryFilter
:
!
this
.
data
.
categoryFilter
,
categoryFilter
:
!
this
.
data
.
categoryFilter
,
currentSortType
:
'
category
'
,
currentSortType
:
'
category
'
,
currentSortOrder
:
'
asc
'
currentSort
:
'
add_time
'
,
currentSortOrder
:
'
desc
'
});
});
break
;
break
;
case
'
priceSort
'
:
case
'
priceSort
'
:
...
@@ -77,6 +79,7 @@ Page({
...
@@ -77,6 +79,7 @@ Page({
}
}
this
.
setData
({
this
.
setData
({
currentSortType
:
'
price
'
,
currentSortType
:
'
price
'
,
currentSort
:
'
retail_price
'
,
currentSortOrder
:
tmpSortOrder
,
currentSortOrder
:
tmpSortOrder
,
categoryFilter
:
false
categoryFilter
:
false
});
});
...
@@ -87,6 +90,7 @@ Page({
...
@@ -87,6 +90,7 @@ Page({
//综合排序
//综合排序
this
.
setData
({
this
.
setData
({
currentSortType
:
'
default
'
,
currentSortType
:
'
default
'
,
currentSort
:
'
add_time
'
,
currentSortOrder
:
'
desc
'
,
currentSortOrder
:
'
desc
'
,
categoryFilter
:
false
,
categoryFilter
:
false
,
categoryId
:
0
categoryId
:
0
...
...
litemall-wx/pages/newGoods/newGoods.wxml
View file @
b68151cb
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<view class="b">
<view class="b">
<block wx:for="{{goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
<block wx:for="{{goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
<navigator class="item {{iindex % 2 == 0 ? 'item-b' : '' }}" url="../goods/goods?id={{iitem.id}}">
<navigator class="item {{iindex % 2 == 0 ? 'item-b' : '' }}" url="../goods/goods?id={{iitem.id}}">
<image class="img" src="{{iitem.
listP
icUrl}}" background-size="cover"></image>
<image class="img" src="{{iitem.
p
icUrl}}" background-size="cover"></image>
<text class="name">{{iitem.name}}</text>
<text class="name">{{iitem.name}}</text>
<text class="price">¥{{iitem.retailPrice}}</text>
<text class="price">¥{{iitem.retailPrice}}</text>
</navigator>
</navigator>
...
...
litemall-wx/pages/shopping/addressAdd/addressAdd.js
View file @
b68151cb
...
@@ -287,7 +287,7 @@ Page({
...
@@ -287,7 +287,7 @@ Page({
return
false
;
return
false
;
}
}
if
(
!
check
.
isValidPhone
(
this
.
data
.
mobile
))
{
if
(
!
check
.
isValidPhone
(
address
.
mobile
))
{
util
.
showErrorToast
(
'
手机号不正确
'
);
util
.
showErrorToast
(
'
手机号不正确
'
);
return
false
;
return
false
;
}
}
...
...
litemall-wx/pages/shopping/checkout/checkout.js
View file @
b68151cb
...
@@ -162,6 +162,11 @@ Page({
...
@@ -162,6 +162,11 @@ Page({
}
}
});
});
}
}
else
{
wx
.
redirectTo
({
url
:
'
/pages/payResult/payResult?status=0&orderId=
'
+
orderId
});
}
});
});
}
else
{
}
else
{
...
...
litemall-wx/pages/shopping/checkout/checkout.wxml
View file @
b68151cb
...
@@ -72,8 +72,8 @@
...
@@ -72,8 +72,8 @@
<text class="name">{{item.goodsName}}</text>
<text class="name">{{item.goodsName}}</text>
<text class="number">x{{item.number}}</text>
<text class="number">x{{item.number}}</text>
</view>
</view>
<view class="m">{{item.
goodsS
pecification
Value
s}}</view>
<view class="m">{{item.
s
pecifications}}</view>
<view class="b">¥{{item.
retailP
rice}}</view>
<view class="b">¥{{item.
p
rice}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
litemall-wx/pages/topic/topic.wxml
View file @
b68151cb
<view class="container">
<view class="container">
<scroll-view class="topic-list" scroll-y="true" scroll-top="{{scrollTop}}">
<scroll-view class="topic-list" scroll-y="true" scroll-top="{{scrollTop}}">
<navigator class="item" wx:for="{{topicList}}" wx:key="id" url="../topicDetail/topicDetail?id={{item.id}}">
<navigator class="item" wx:for="{{topicList}}" wx:key="id" url="../topicDetail/topicDetail?id={{item.id}}">
<image class="img" src="{{item.
sceneP
icUrl}}"></image>
<image class="img" src="{{item.
p
icUrl}}"></image>
<view class="info">
<view class="info">
<text class="title">{{item.title}}</text>
<text class="title">{{item.title}}</text>
<text class="desc">{{item.subtitle}}</text>
<text class="desc">{{item.subtitle}}</text>
<text class="price">{{item.price
Info
}}元起</text>
<text class="price">{{item.price}}元起</text>
</view>
</view>
</navigator>
</navigator>
<view class="page" wx:if="{{showPage}}">
<view class="page" wx:if="{{showPage}}">
...
...
litemall-wx/pages/topicComment/topicComment.js
View file @
b68151cb
...
@@ -8,7 +8,7 @@ Page({
...
@@ -8,7 +8,7 @@ Page({
comments
:
[],
comments
:
[],
allCommentList
:
[],
allCommentList
:
[],
picCommentList
:
[],
picCommentList
:
[],
type
Id
:
0
,
type
:
0
,
valueId
:
0
,
valueId
:
0
,
showType
:
0
,
showType
:
0
,
allCount
:
0
,
allCount
:
0
,
...
@@ -19,7 +19,7 @@ Page({
...
@@ -19,7 +19,7 @@ Page({
},
},
getCommentCount
:
function
()
{
getCommentCount
:
function
()
{
let
that
=
this
;
let
that
=
this
;
util
.
request
(
api
.
CommentCount
,
{
valueId
:
that
.
data
.
valueId
,
type
Id
:
that
.
data
.
type
Id
}).
then
(
function
(
res
)
{
util
.
request
(
api
.
CommentCount
,
{
valueId
:
that
.
data
.
valueId
,
type
:
that
.
data
.
type
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
that
.
setData
({
...
@@ -33,7 +33,7 @@ Page({
...
@@ -33,7 +33,7 @@ Page({
let
that
=
this
;
let
that
=
this
;
util
.
request
(
api
.
CommentList
,
{
util
.
request
(
api
.
CommentList
,
{
valueId
:
that
.
data
.
valueId
,
valueId
:
that
.
data
.
valueId
,
type
Id
:
that
.
data
.
type
Id
,
type
:
that
.
data
.
type
,
size
:
that
.
data
.
size
,
size
:
that
.
data
.
size
,
page
:
(
that
.
data
.
showType
==
0
?
that
.
data
.
allPage
:
that
.
data
.
picPage
),
page
:
(
that
.
data
.
showType
==
0
?
that
.
data
.
allPage
:
that
.
data
.
picPage
),
showType
:
that
.
data
.
showType
showType
:
that
.
data
.
showType
...
@@ -59,7 +59,7 @@ Page({
...
@@ -59,7 +59,7 @@ Page({
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
// 页面初始化 options为页面跳转所带来的参数
// 页面初始化 options为页面跳转所带来的参数
this
.
setData
({
this
.
setData
({
type
Id
:
options
.
type
Id
,
type
:
options
.
type
,
valueId
:
options
.
valueId
valueId
:
options
.
valueId
});
});
this
.
getCommentCount
();
this
.
getCommentCount
();
...
...
litemall-wx/pages/topicCommentPost/topicCommentPost.js
View file @
b68151cb
...
@@ -97,7 +97,7 @@ Page({
...
@@ -97,7 +97,7 @@ Page({
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
if
(
parseInt
(
options
.
type
Id
)
!==
1
){
if
(
parseInt
(
options
.
type
)
!==
1
){
return
;
return
;
}
}
...
@@ -131,7 +131,7 @@ Page({
...
@@ -131,7 +131,7 @@ Page({
}
}
util
.
request
(
api
.
CommentPost
,
{
util
.
request
(
api
.
CommentPost
,
{
type
Id
:
1
,
type
:
1
,
valueId
:
that
.
data
.
valueId
,
valueId
:
that
.
data
.
valueId
,
content
:
that
.
data
.
content
,
content
:
that
.
data
.
content
,
star
:
that
.
data
.
star
,
star
:
that
.
data
.
star
,
...
...
litemall-wx/pages/topicCommentPost/topicCommentPost.wxml
View file @
b68151cb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view class="post-comment">
<view class="post-comment">
<view class="goods">
<view class="goods">
<view class="img">
<view class="img">
<image src="{{topic.
sceneP
icUrl}}"></image>
<image src="{{topic.
p
icUrl}}"></image>
</view>
</view>
<view class="info">
<view class="info">
<view class="t">
<view class="t">
...
...
Prev
1
…
8
9
10
11
12
13
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment