Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
zhiliang-light-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
8fa3e323
authored
2019-10-21 19:06:03 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
844a810d
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
131 additions
and
40 deletions
src/component/seckill-order-comp/seckill-order-comp.scss
src/component/seckill-order-comp/seckill-order-comp.wxml
src/image/index/index-c1.png
src/pages/auction-bid-detail/auction-bid-detail.js
src/pages/auction-detail/auction-detail.js
src/pages/auction-detail/auction-detail.wxml
src/pages/auction-list/auction-list.js
src/pages/auction-mine/auction-mine.js
src/pages/index/index.scss
src/pages/integral-detail/integral-detail.js
src/pages/integral-detail/integral-detail.scss
src/pages/integral-detail/integral-detail.wxml
src/pages/my-message/my-message.js
src/pages/my-message/my-message.scss
src/pages/my-message/my-message.wxml
src/pages/my-qrcode/my-qrcode.js
src/pages/rank/rank.js
src/pages/rank/rank.wxml
src/pages/scan-result/scan-result.js
src/pages/scan-result/scan-result.wxml
src/pages/seckill-detail/seckill-detail.js
src/pages/seckill-detail/seckill-detail.wxml
src/pages/seckill-list/seckill-list.js
src/pages/seckill-mine/seckill-mine.js
src/component/seckill-order-comp/seckill-order-comp.scss
View file @
8fa3e32
...
...
@@ -57,6 +57,10 @@
justify-content
:
flex-start
;
flex-wrap
:
wrap
;
.num
{
font-size
:
32px
;
}
.tt
{
font-size
:
24px
;
width
:
100%
;
...
...
src/component/seckill-order-comp/seckill-order-comp.wxml
View file @
8fa3e32
...
...
@@ -13,21 +13,23 @@
<view class="tt t1">{{productInfo.seckillName}}</view>
<block wx:if="{{productInfo.minNum == productInfo.maxNum}}">
<!-- 固定个数 -->
<view class="tt t2">
<view class="tt t2"
wx:if="{{orderStatus != 1}}"
>
<view class="t2-1">{{productInfo.minNum}}个</view>
<view class="t2-2">数量不可修改</view>
</view>
<view class="num" wx:else>{{num}}个</view>
</block>
<block wx:else>
<!-- 不定个数 -->
<view class="tt t2">
<view class="tt t2"
wx:if="{{orderStatus != 1}}"
>
<view class="t2-1">
<van-stepper bind:change="onStepperChange" value="{{ num }}" min="{{productInfo.minNum}}" max="{{productInfo.maxNum}}" integer />
</view>
<view class="t2-2">可选填{{productInfo.minNum}}-{{productInfo.maxNum}}个</view>
</view>
<view class="num" wx:else>{{num}}个</view>
</block>
<view class="tt t3 price">¥{{filter.Fen2Yuan(productInfo.
origin
alPrice*num)}}</view>
<view class="tt t3 price">¥{{filter.Fen2Yuan(productInfo.
speci
alPrice*num)}}</view>
</view>
</view>
<!-- 无存库 -->
...
...
src/image/index/index-c1.png
View file @
8fa3e32
38.6 KB
|
W:
|
H:
38.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/pages/auction-bid-detail/auction-bid-detail.js
View file @
8fa3e32
...
...
@@ -64,7 +64,7 @@ Page({
}).
then
((
result
)
=>
{
let
dataList
=
result
.
list
;
dataList
.
forEach
(
element
=>
{
element
.
recordTime
=
new
Date
(
element
.
recordTime
).
toString
(
"yyyy.MM.dd
hh
:mm:ss"
);
element
.
recordTime
=
new
Date
(
element
.
recordTime
).
toString
(
"yyyy.MM.dd
HH
:mm:ss"
);
element
.
memberPhone
=
element
.
memberPhone
.
substr
(
0
,
3
)
+
'****'
+
element
.
memberPhone
.
substr
(
7
);
});
dataList
=
this
.
data
.
dataList
.
concat
(
dataList
);
...
...
src/pages/auction-detail/auction-detail.js
View file @
8fa3e32
...
...
@@ -199,7 +199,7 @@ Page({
}).
then
((
result
)
=>
{
let
priceInfo
=
result
.
list
||
[];
priceInfo
.
forEach
(
element
=>
{
element
.
recordTime
=
new
Date
(
element
.
recordTime
).
toString
(
"yyyy.MM.dd
hh
:mm:ss"
);
element
.
recordTime
=
new
Date
(
element
.
recordTime
).
toString
(
"yyyy.MM.dd
HH
:mm:ss"
);
element
.
memberPhone
=
element
.
memberPhone
.
substr
(
0
,
3
)
+
'****'
+
element
.
memberPhone
.
substr
(
7
);
});
this
.
setData
({
...
...
@@ -332,7 +332,7 @@ Page({
if
(
!
result
)
return
;
let
priceInfo
=
result
.
list
||
[];
priceInfo
.
forEach
(
element
=>
{
element
.
recordTime
=
new
Date
(
element
.
recordTime
).
toString
(
"yyyy.MM.dd
hh
:mm:ss"
);
element
.
recordTime
=
new
Date
(
element
.
recordTime
).
toString
(
"yyyy.MM.dd
HH
:mm:ss"
);
element
.
memberPhone
=
element
.
memberPhone
.
substr
(
0
,
3
)
+
'****'
+
element
.
memberPhone
.
substr
(
7
);
});
this
.
setData
({
...
...
src/pages/auction-detail/auction-detail.wxml
View file @
8fa3e32
...
...
@@ -11,7 +11,7 @@
<swiper class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{5000}}" duration="{{500}}">
<block wx:for="{{productInfo.auctionImages}}" wx:key="{{index}}">
<swiper-item>
<image class="swiper-image" src="{{item}}" mode="aspectFi
ll
" />
<image class="swiper-image" src="{{item}}" mode="aspectFi
t
" />
</swiper-item>
</block>
</swiper>
...
...
src/pages/auction-list/auction-list.js
View file @
8fa3e32
...
...
@@ -98,7 +98,7 @@ Page({
}).
then
((
result
)
=>
{
let
dataList
=
result
.
list
;
dataList
.
forEach
(
element
=>
{
element
.
dateStr
=
new
Date
(
element
.
startTime
).
toString
(
"yyyy.MM.dd
hh:mm"
)
+
" - "
+
new
Date
(
element
.
endTime
).
toString
(
"yyyy.MM.dd hh
:mm"
);
element
.
dateStr
=
new
Date
(
element
.
startTime
).
toString
(
"yyyy.MM.dd
HH:mm"
)
+
" - "
+
new
Date
(
element
.
endTime
).
toString
(
"yyyy.MM.dd HH
:mm"
);
});
dataList
=
this
.
data
.
dataList
.
concat
(
dataList
);
this
.
setData
({
...
...
src/pages/auction-mine/auction-mine.js
View file @
8fa3e32
...
...
@@ -64,7 +64,7 @@ Page({
let
dataList
=
result
.
list
;
dataList
=
this
.
data
.
dataList
.
concat
(
dataList
);
dataList
.
forEach
(
element
=>
{
element
.
dateStr
=
new
Date
(
element
.
auctionTime
).
toString
(
"yyyy.MM.dd
hh
:mm"
);
element
.
dateStr
=
new
Date
(
element
.
auctionTime
).
toString
(
"yyyy.MM.dd
HH
:mm"
);
});
console
.
log
(
"dataList:"
,
dataList
);
this
.
setData
({
...
...
src/pages/index/index.scss
View file @
8fa3e32
...
...
@@ -82,7 +82,7 @@ $contentWidth:670px;
.t1
{
font-size
:
22px
;
margin
:
0
12px
0
;
color
:
#
333333
;
color
:
#
808080
;
text-align
:
center
;
}
}
...
...
src/pages/integral-detail/integral-detail.js
View file @
8fa3e32
...
...
@@ -15,6 +15,7 @@ Page({
total
:
0
,
page
:
1
,
size
:
10
,
isShowAll
:
false
,
status
:
""
,
dataList
:
[],
navIndex
:
0
,
...
...
@@ -154,10 +155,13 @@ Page({
/**
* 积分概览
*/
queryPointsOverview
()
{
queryPointsOverview
(
isAll
=
false
)
{
this
.
setData
({
isShowAll
:
isAll
})
return
new
Promise
((
resolve
,
reject
)
=>
{
let
year
=
this
.
data
.
dateStr
.
slice
(
0
,
4
);
let
month
=
this
.
data
.
dateStr
.
slice
(
5
,
7
);
let
year
=
isAll
?
""
:
this
.
data
.
dateStr
.
slice
(
0
,
4
);
let
month
=
isAll
?
""
:
this
.
data
.
dateStr
.
slice
(
5
,
7
);
app
.
post
({
url
:
app
.
api
.
pointsOverview
,
data
:
{
...
...
@@ -184,7 +188,16 @@ Page({
});
},
/**
* 请求所有数据
*/
onShowAllHandler
()
{
this
.
resetPage
();
this
.
queryPointsOverview
(
true
);
},
bindDateChange
(
e
)
{
console
.
log
(
"bindDateChange:"
,
e
)
this
.
setData
({
dateStr
:
e
.
detail
.
value
})
...
...
src/pages/integral-detail/integral-detail.scss
View file @
8fa3e32
...
...
@@ -29,7 +29,7 @@ $contentWidth:690px;
.header
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
flex-
end
;
align-items
:
flex-
start
;
.info
{
font-size
:
32px
;
...
...
@@ -41,6 +41,13 @@ $contentWidth:690px;
}
}
.sel-wrap
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
flex-end
;
}
.sel
{
font-size
:
28px
;
color
:
#3680EB
;
...
...
@@ -60,6 +67,15 @@ $contentWidth:690px;
margin-left
:
8px
;
}
}
.sel2
{
display
:
inline-block
;
width
:
auto
;
}
.show-all
{
opacity
:
.5
;
}
}
.func-wrap
{
...
...
src/pages/integral-detail/integral-detail.wxml
View file @
8fa3e32
...
...
@@ -10,6 +10,10 @@
<span class="t1">{{userInfo.memberPoints}}</span>
分
</view>
<view class="sel-wrap">
<view class="sel sel2 {{isShowAll ? 'show-all':''}}" bindtap="onShowAllHandler">
显示全部月份
</view>
<picker mode="date" fields="month" value="{{date}}" bindchange="bindDateChange">
<view class="sel">
<image class="icon" mode="aspectFit" src="../../image/icon/icon-calendar.png" />
...
...
@@ -18,6 +22,7 @@
</view>
</picker>
</view>
</view>
<!-- 时间 -->
<!-- <view class="time">
<view class="sel">
...
...
src/pages/my-message/my-message.js
View file @
8fa3e32
import
{
getBindtapData
}
from
'../../utils/util'
;
let
Date
=
require
(
'../../utils/date.js'
);
let
app
=
getApp
();
Page
({
...
...
@@ -51,6 +52,9 @@ Page({
}).
then
((
result
)
=>
{
let
dataList
=
result
.
announcementItems
;
dataList
=
this
.
data
.
dataList
.
concat
(
dataList
);
dataList
.
forEach
(
element
=>
{
element
.
dateStr
=
new
Date
(
element
.
announcementTime
).
toString
(
"yyyy.MM.dd HH:mm:ss"
)
});
this
.
setData
({
dataList
:
dataList
,
total
:
result
.
total
...
...
src/pages/my-message/my-message.scss
View file @
8fa3e32
...
...
@@ -57,6 +57,11 @@ $contentWidth:690px;
.t2
{
color
:
#E62435
;
}
.no
{
color
:
#666666
;
// padding-left: 12px;
}
}
}
...
...
@@ -64,6 +69,10 @@ $contentWidth:690px;
margin
:
16px
auto
0
;
color
:
#666666
;
}
.code
{
font-size
:
20px
;
}
}
}
}
...
...
src/pages/my-message/my-message.wxml
View file @
8fa3e32
...
...
@@ -11,7 +11,10 @@
<view class="news">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="border news-item">
<view class="tit">
<view class="tit-item">{{item.announcementTitle}}</view>
<view class="tit-item">
{{item.announcementTitle}}
<span class="no">{{item.dateStr}}</span>
</view>
<view class="tit-item">
<span bindtap="tagReadItem" data-data="{{item}}" data-index="{{index}}" wx:if="{{item.read == 0}}" class="t1">
标记已读
...
...
@@ -22,6 +25,7 @@
</view>
</view>
<view class="desc">{{item.announcementContent}}</view>
<view class="desc code">订单编号: {{item.announcementCode}}</view>
</view>
<!-- 11wx:if="{{dataList.length <= 0}}" -->
</view>
...
...
src/pages/my-qrcode/my-qrcode.js
View file @
8fa3e32
...
...
@@ -99,9 +99,20 @@ Page({
textAlign
:
"center"
,
zIndex
:
11
,
text
:
userInfo
.
nickname
,
},
{
},
{
x
:
690
/
2
,
y
:
720
,
y
:
640
,
width
:
690
,
fontSize
:
28
,
color
:
"#666666"
,
textAlign
:
"center"
,
zIndex
:
11
,
text
:
userInfo
.
memberCode
,
},
{
x
:
690
/
2
,
y
:
740
,
width
:
690
,
fontSize
:
28
,
color
:
"#666666"
,
...
...
@@ -117,7 +128,8 @@ Page({
textAlign
:
"center"
,
zIndex
:
11
,
text
:
"扫码即获专属积分,兑换超值奖品"
,
}];
}
];
let
posterData
=
{
width
:
690
,
...
...
src/pages/rank/rank.js
View file @
8fa3e32
...
...
@@ -13,6 +13,7 @@ Page({
historyRankInfoList
:
[],
historyIndex
:
0
,
isInit
:
false
},
onShareAppMessage
()
{},
showAuth
()
{
...
...
@@ -31,6 +32,9 @@ Page({
* 推广积分排行
*/
queryActivity
()
{
this
.
setData
({
isInit
:
false
})
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
setData
({
rankInfo
:
{}
...
...
@@ -42,7 +46,12 @@ Page({
key
:
status
}
}).
then
((
result
)
=>
{
// console.log("result:", result)
let
rankInfo
=
this
.
formatRankInfo
(
result
,
status
);
// console.log("rankInfo:", rankInfo)
this
.
setData
({
isInit
:
true
})
if
(
rankInfo
)
{
this
.
setData
({
rankInfo
:
rankInfo
...
...
@@ -58,6 +67,9 @@ Page({
* 推广积分排行
*/
queryActivityHistory
()
{
this
.
setData
({
isInit
:
false
})
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
setData
({
rankInfo
:
{}
...
...
@@ -73,6 +85,7 @@ Page({
}).
then
((
result
)
=>
{
let
historyRankInfoList
=
result
.
list
;
this
.
setData
({
isInit
:
true
,
historyRankInfoList
:
historyRankInfoList
})
console
.
log
(
"rankInfo 2:"
,
historyRankInfoList
);
...
...
src/pages/rank/rank.wxml
View file @
8fa3e32
...
...
@@ -17,7 +17,7 @@
</view>
<!-- 排行 -->
<view class="border rank">
<block wx:if="{{rankInfo && rankInfo.memberList > 0}}">
<block wx:if="{{rankInfo && rankInfo.memberList
.length
> 0}}">
<!-- 功能区 -->
<view class="rank-func">
<view class="rank-func-item">
...
...
@@ -93,10 +93,12 @@
</view>
</view>
</block>
<view class="empty-tips">
<block wx:else>
<view class="empty-tips" wx:if="{{isInit}}">
<!-- <span class="iconfont iconempty"></span> -->
<view class="tips">暂未开启积分排行,敬请期待</view>
</view>
</block>
</view>
<!-- 我的奖励按钮 -->
<view wx:if="{{status == 'promotion'}}" class="btn-wrap">
...
...
src/pages/scan-result/scan-result.js
View file @
8fa3e32
...
...
@@ -10,6 +10,7 @@ Page({
qrCodeCode
:
""
,
prizeInfo
:
null
,
//扫码结果
userInfo
:
{},
//用户信息
scaning
:
false
,
},
onShareAppMessage
()
{},
showAuth
()
{
...
...
@@ -57,20 +58,30 @@ Page({
/**
* 扫积分码功能 扫积分码
*/
queryScanIntegralQrcode
()
{
queryScanIntegralQrcode
(
c
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
{
code
}
=
this
.
data
;
if
(
c
)
code
=
c
;
if
(
code
)
{
wx
.
showLoading
({
title
:
"扫码中"
,
mask
:
true
,
})
this
.
setData
({
scaning
:
true
,
})
app
.
post
({
url
:
app
.
api
.
scanIntegralQrcode
,
data
:
{
qrCodeCode
:
code
}
}).
then
((
result
)
=>
{
wx
.
hideLoading
();
this
.
setData
({
prizeInfo
:
result
prizeInfo
:
result
,
scaning
:
false
})
if
(
result
.
qrCodeStatus
!=
1
)
{
wx
.
setNavigationBarTitle
({
...
...
@@ -78,8 +89,10 @@ Page({
})
}
}).
catch
((
err
)
=>
{
wx
.
hideLoading
();
this
.
setData
({
prizeInfo
:
{}
prizeInfo
:
{},
scaning
:
false
})
wx
.
setNavigationBarTitle
({
title
:
'积分获取失败'
...
...
@@ -107,17 +120,10 @@ Page({
success
(
res
)
{
// 扫码结果
let
q
=
res
.
result
;
// 获取积分码
let
c
=
getQueryByUrl
(
"c"
,
q
);
if
(
c
)
{
// app.router.push({
// path: "scanResult",
// query: {
// code: c
// }
// })
_this
.
queryScanIntegralQrcode
();
_this
.
queryScanIntegralQrcode
(
c
);
}
else
{
wx
.
showModal
({
content
:
'未发现积分码,换一个二维码试试'
,
...
...
@@ -137,8 +143,8 @@ Page({
*/
onMyIntegralHandler
(
evt
)
{
app
.
router
.
push
({
openType
:
"re
Launch
"
,
path
:
"
userCenter
"
openType
:
"re
direct
"
,
path
:
"
integralDetail
"
})
},
...
...
src/pages/scan-result/scan-result.wxml
View file @
8fa3e32
...
...
@@ -3,7 +3,7 @@
<view class="app__bg bg"></view>
<view class="app__content main">
<view class="top-space"></view>
<view class="content">
<view class="content"
wx:if="{{!scaning}}"
>
<view wx:if="{{prizeInfo}}" class="border scan">
<view wx:if="{{prizeInfo.qrCodeStatus == 1}}" class="result success">
<text class="tips tips1">恭喜获得{{prizeInfo.pointNum}}积分!</text>
...
...
src/pages/seckill-detail/seckill-detail.js
View file @
8fa3e32
...
...
@@ -173,7 +173,8 @@ Page({
orderStatus
:
1
,
})
wx
.
showModal
({
content
:
'下单成功'
,
title
:
"恭喜您"
,
content
:
'秒杀成功'
,
showCancel
:
false
,
success
(
res
)
{}
})
...
...
src/pages/seckill-detail/seckill-detail.wxml
View file @
8fa3e32
...
...
@@ -11,7 +11,7 @@
<swiper class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{5000}}" duration="{{500}}">
<block wx:for="{{productInfo.seckillImages}}" wx:key="{{index}}">
<swiper-item>
<image class="swiper-image" src="{{item}}" mode="aspectFi
ll
" />
<image class="swiper-image" src="{{item}}" mode="aspectFi
t
" />
</swiper-item>
</block>
</swiper>
...
...
@@ -20,8 +20,8 @@
<view class="func">
<view class="arrow"></view>
<view class="func-ele func-left">
<text class="price">¥{{filter.Fen2Yuan(productInfo.
origin
alPrice)}}</text>
<text class="t1 line-th">¥{{filter.Fen2Yuan(productInfo.
speci
alPrice)}}</text>
<text class="price">¥{{filter.Fen2Yuan(productInfo.
speci
alPrice)}}</text>
<text class="t1 line-th">¥{{filter.Fen2Yuan(productInfo.
origin
alPrice)}}</text>
<text class="t1">仅剩{{productInfo.stock}}个</text>
</view>
<view class="func-ele func-right {{productInfo.status != 1 || isTimeEnd ? 'disable' : ''}}">
...
...
src/pages/seckill-list/seckill-list.js
View file @
8fa3e32
...
...
@@ -93,7 +93,7 @@ Page({
}).
then
((
result
)
=>
{
let
dataList
=
result
.
list
;
dataList
.
forEach
(
element
=>
{
element
.
dateStr
=
new
Date
(
element
.
startTime
).
toString
(
"yyyy.MM.dd
hh:mm"
)
+
" - "
+
new
Date
(
element
.
endTime
).
toString
(
"yyyy.MM.dd hh
:mm"
);
element
.
dateStr
=
new
Date
(
element
.
startTime
).
toString
(
"yyyy.MM.dd
HH:mm"
)
+
" - "
+
new
Date
(
element
.
endTime
).
toString
(
"yyyy.MM.dd HH
:mm"
);
});
dataList
=
this
.
data
.
dataList
.
concat
(
dataList
);
this
.
setData
({
...
...
src/pages/seckill-mine/seckill-mine.js
View file @
8fa3e32
...
...
@@ -65,7 +65,7 @@ Page({
let
dataList
=
result
.
list
;
dataList
=
this
.
data
.
dataList
.
concat
(
dataList
);
dataList
.
forEach
(
element
=>
{
element
.
dateStr
=
new
Date
(
element
.
seckillOrderTime
).
toString
(
"yyyy.MM.dd
hh
:mm"
);
element
.
dateStr
=
new
Date
(
element
.
seckillOrderTime
).
toString
(
"yyyy.MM.dd
HH
:mm"
);
});
console
.
log
(
"dataList:"
,
dataList
);
this
.
setData
({
...
...
Please
register
or
sign in
to post a comment