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
Show whitespace changes
Inline
Side-by-side
litemall-wx/pages/topicDetail/topicDetail.js
View file @
b68151cb
...
...
@@ -39,7 +39,7 @@ Page({
},
getCommentList
()
{
let
that
=
this
;
util
.
request
(
api
.
CommentList
,
{
valueId
:
that
.
data
.
id
,
type
Id
:
1
,
showType
:
0
,
page
:
1
,
size
:
5
}).
then
(
function
(
res
)
{
util
.
request
(
api
.
CommentList
,
{
valueId
:
that
.
data
.
id
,
type
:
1
,
showType
:
0
,
page
:
1
,
size
:
5
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
...
...
@@ -55,7 +55,7 @@ Page({
}
else
{
wx
.
navigateTo
({
url
:
'
/pages/topicCommentPost/topicCommentPost?valueId=
'
+
this
.
data
.
id
+
'
&type
Id
=1
'
,
url
:
'
/pages/topicCommentPost/topicCommentPost?valueId=
'
+
this
.
data
.
id
+
'
&type=1
'
,
})
}
},
...
...
litemall-wx/pages/topicDetail/topicDetail.wxml
View file @
b68151cb
...
...
@@ -26,7 +26,7 @@
</view>
</view>
<view class="load" wx:if="{{commentCount > 5}}">
<navigator url="/pages/topicComment/topicComment?valueId={{topic.id}}&type
Id
=1">查看更多</navigator>
<navigator url="/pages/topicComment/topicComment?valueId={{topic.id}}&type=1">查看更多</navigator>
</view>
</view>
<view class="no-comments" wx:if="{{commentList.length <= 0}}">
...
...
@@ -42,7 +42,7 @@
</view>
<view class="b">
<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>
<text class="title">{{item.title}}</text>
</navigator>
</view>
...
...
litemall-wx/pages/ucenter/addressAdd/addressAdd.js
View file @
b68151cb
...
...
@@ -287,7 +287,7 @@ Page({
return
false
;
}
if
(
!
check
.
isValidPhone
(
this
.
data
.
mobile
))
{
if
(
!
check
.
isValidPhone
(
address
.
mobile
))
{
util
.
showErrorToast
(
'
手机号不正确
'
);
return
false
;
}
...
...
litemall-wx/pages/ucenter/collect/collect.js
View file @
b68151cb
...
...
@@ -5,7 +5,7 @@ var app = getApp();
Page
({
data
:
{
type
Id
:
0
,
type
:
0
,
collectList
:
[],
page
:
1
,
size
:
10
,
...
...
@@ -16,7 +16,7 @@ Page({
title
:
'
加载中...
'
,
});
let
that
=
this
;
util
.
request
(
api
.
CollectList
,
{
type
Id
:
that
.
data
.
type
Id
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
}).
then
(
function
(
res
)
{
util
.
request
(
api
.
CollectList
,
{
type
:
that
.
data
.
type
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
collectList
:
that
.
data
.
collectList
.
concat
(
res
.
data
.
collectList
),
...
...
@@ -60,7 +60,8 @@ Page({
openGoods
(
event
)
{
let
that
=
this
;
let
goodsId
=
this
.
data
.
collectList
[
event
.
currentTarget
.
dataset
.
index
].
valueId
;
let
index
=
event
.
currentTarget
.
dataset
.
index
;
let
goodsId
=
this
.
data
.
collectList
[
index
].
valueId
;
//触摸时间距离页面打开的毫秒数
var
touchTime
=
that
.
data
.
touchEnd
-
that
.
data
.
touchStart
;
...
...
@@ -73,7 +74,7 @@ Page({
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
util
.
request
(
api
.
CollectAddOrDelete
,
{
type
Id
:
that
.
data
.
type
Id
,
valueId
:
goodsId
},
'
POST
'
).
then
(
function
(
res
)
{
util
.
request
(
api
.
CollectAddOrDelete
,
{
type
:
that
.
data
.
type
,
valueId
:
goodsId
},
'
POST
'
).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
console
.
log
(
res
.
data
);
wx
.
showToast
({
...
...
@@ -81,7 +82,10 @@ Page({
icon
:
'
success
'
,
duration
:
2000
});
that
.
getCollectList
();
that
.
data
.
collectList
.
splice
(
index
,
1
)
that
.
setData
({
collectList
:
that
.
data
.
collectList
});
}
});
}
...
...
litemall-wx/pages/ucenter/collect/collect.wxml
View file @
b68151cb
...
...
@@ -7,10 +7,10 @@
</view>
<view class="collect-list" wx:else>
<view class="item" bindtap="openGoods" bindtouchstart="touchStart" bindtouchend="touchEnd" wx:for="{{collectList}}" wx:key="id" data-index="{{index}}">
<image class="img" src="{{item.
listP
icUrl}}"></image>
<image class="img" src="{{item.
p
icUrl}}"></image>
<view class="info">
<view class="name">{{item.name}}</view>
<view class="subtitle">{{item.
goodsB
rief}}</view>
<view class="subtitle">{{item.
b
rief}}</view>
<view class="price">¥{{item.retailPrice}}</view>
</view>
</view>
...
...
litemall-wx/pages/ucenter/footprint/footprint.js
View file @
b68151cb
...
...
@@ -41,7 +41,9 @@ Page({
},
deleteItem
(
event
){
let
that
=
this
;
let
footprint
=
event
.
currentTarget
.
dataset
.
footprint
;
let
index
=
event
.
currentTarget
.
dataset
.
index
;
let
iindex
=
event
.
currentTarget
.
dataset
.
iindex
;
let
goodsId
=
this
.
data
.
footprintList
[
index
][
iindex
].
id
;
var
touchTime
=
that
.
data
.
touchEnd
-
that
.
data
.
touchStart
;
console
.
log
(
touchTime
);
//如果按下时间大于350为长按
...
...
@@ -51,15 +53,20 @@ Page({
content
:
'
要删除所选足迹?
'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
util
.
request
(
api
.
FootprintDelete
,
{
footprintId
:
f
oo
tprint
.
i
d
},
'
POST
'
).
then
(
function
(
res
)
{
util
.
request
(
api
.
FootprintDelete
,
{
footprintId
:
g
oo
dsI
d
},
'
POST
'
).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
wx
.
showToast
({
title
:
'
删除成功
'
,
icon
:
'
success
'
,
duration
:
2000
});
that
.
data
.
footprintList
=
[];
that
.
getFootprintList
();
that
.
data
.
footprintList
[
index
].
splice
(
iindex
,
1
)
if
(
that
.
data
.
footprintList
[
index
].
length
==
0
){
that
.
data
.
footprintList
.
splice
(
index
,
1
)
}
that
.
setData
({
footprintList
:
that
.
data
.
footprintList
});
}
});
}
...
...
@@ -67,7 +74,7 @@ Page({
});
}
else
{
wx
.
navigateTo
({
url
:
'
/pages/goods/goods?id=
'
+
footprint
.
goodsId
,
url
:
'
/pages/goods/goods?id=
'
+
goodsId
,
});
}
...
...
litemall-wx/pages/ucenter/footprint/footprint.wxml
View file @
b68151cb
...
...
@@ -6,14 +6,14 @@
</view>
</view>
<view class="footprint" wx:if="{{footprintList.length > 0}}">
<view class="day-item" wx:for="{{footprintList}}" wx:key="*this">
<view class="day-item" wx:for="{{footprintList}}" wx:key="*this"
wx:for-index="index"
>
<view class="day-hd" wx:if="{{item.length > 0}}">{{item[0].addTime}}</view>
<view class="day-list" wx:if="{{item.length > 0}}">
<view class="item" data-
footprint
="{{ii
tem
}}" bindtouchstart="touchStart" bindtouchend="touchEnd" bindtap="deleteItem" wx:for="{{item}}" wx:for-item="iitem" wx:key="id">
<image class="img" src="{{iitem.
listP
icUrl}}"></image>
<view class="item" data-
index="{{index}}" data-iindex
="{{ii
ndex
}}" bindtouchstart="touchStart" bindtouchend="touchEnd" bindtap="deleteItem" wx:for="{{item}}"
wx:for-index="iindex"
wx:for-item="iitem" wx:key="id">
<image class="img" src="{{iitem.
p
icUrl}}"></image>
<view class="info">
<view class="name">{{iitem.name}}</view>
<view class="subtitle">{{iitem.
goodsB
rief}}</view>
<view class="subtitle">{{iitem.
b
rief}}</view>
<view class="price">¥{{iitem.retailPrice}}</view>
</view>
</view>
...
...
litemall-wx/pages/ucenter/order/order.wxml
View file @
b68151cb
...
...
@@ -24,7 +24,7 @@
</view>
<view class="orders">
<navigator url="../orderDetail/orderDetail?id={{item.id}}" class="order" wx:for="{{orderList}}" wx:key="id">
<navigator url="../orderDetail/orderDetail?id={{item.id}}" class="order"
open-type="redirect"
wx:for="{{orderList}}" wx:key="id">
<view class="h">
<view class="l">订单编号:{{item.orderSn}}</view>
<view class="r">{{item.orderStatusText}}</view>
...
...
litemall-wx/pages/ucenter/orderDetail/orderDetail.wxml
View file @
b68151cb
...
...
@@ -32,7 +32,7 @@
<view class="attr">{{item.goodsSpecificationValues}}</view>
<view class="price">¥{{item.retailPrice}}</view>
<view class="btn active" wx:if="{{handleOption.comment}}">
<navigator url="../../commentPost/commentPost?orderId={{item.orderId}}&&valueId={{item.goodsId}}&type
Id
=0">去评价</navigator>
<navigator url="../../commentPost/commentPost?orderId={{item.orderId}}&&valueId={{item.goodsId}}&type=0">去评价</navigator>
</view>
<view class="btn active" wx:if="{{handleOption.rebuy}}">
<navigator url="../../goods/goods?id={{item.goodsId}}">再次购买</navigator>
...
...
litemall-wx/project.config.json
View file @
b68151cb
...
...
@@ -52,13 +52,13 @@
"id"
:
-1
,
"name"
:
"专题评论列表"
,
"pathName"
:
"pages/topicComment/topicComment"
,
"query"
:
"valueId=314&type
Id
=1"
"query"
:
"valueId=314&type=1"
},
{
"id"
:
-1
,
"name"
:
"专题评论添加"
,
"pathName"
:
"pages/topicCommentPost/topicCommentPost"
,
"query"
:
"valueId=314&type
Id
=1"
"query"
:
"valueId=314&type=1"
},
{
"id"
:
-1
,
...
...
@@ -112,7 +112,7 @@
"id"
:
-1
,
"name"
:
"商品评论列表"
,
"pathName"
:
"pages/comment/comment"
,
"query"
:
"valueId=1181000&type
Id
=0"
"query"
:
"valueId=1181000&type=0"
},
{
"id"
:
-1
,
...
...
@@ -163,16 +163,16 @@
"query"
:
"id=1"
},
{
"id"
:
-1
,
"id"
:
22
,
"name"
:
"待评价的订单详情"
,
"pathName"
:
"pages/ucenter/orderDetail/orderDetail"
,
"query"
:
"id=
24
"
"query"
:
"id=
1
"
},
{
"id"
:
-1
,
"name"
:
"购买商品评价"
,
"pathName"
:
"pages/commentPost/commentPost"
,
"query"
:
"orderId=2&type
Id
=0&valueId=1116011"
"query"
:
"orderId=2&type=0&valueId=1116011"
},
{
"id"
:
-1
,
...
...
litemall-wx/utils/util.js
View file @
b68151cb
...
...
@@ -36,7 +36,7 @@ function request(url, data = {}, method = "GET") {
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
data
.
errno
==
4
01
)
{
if
(
res
.
data
.
errno
==
5
01
)
{
// 清除登录相关内容
try
{
wx
.
removeStorageSync
(
'
userInfo
'
);
...
...
Prev
1
…
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