Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
c5a0eeeb
Commit
c5a0eeeb
authored
Aug 09, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 列表页状态
parent
78b8e6e3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
8 deletions
+20
-8
statusPoint.wxss
src/component/statusPoint/statusPoint.wxss
+1
-1
pointDetail.wxml
src/pages/pointDetail/pointDetail.wxml
+0
-4
pointList.js
src/pages/pointList/pointList.js
+18
-2
pointList.wxml
src/pages/pointList/pointList.wxml
+1
-1
No files found.
src/component/statusPoint/statusPoint.wxss
View file @
c5a0eeeb
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
overflow: hidden;
overflow: hidden;
}
}
.status-tips {
.status-tips {
width: 1
43
rpx;
width: 1
30
rpx;
height: 58rpx;
height: 58rpx;
margin-top: 12px;
margin-top: 12px;
box-sizing: border-box;
box-sizing: border-box;
...
...
src/pages/pointDetail/pointDetail.wxml
View file @
c5a0eeeb
<!--pages/pointDetail/pointDetail.wxml-->
<!--pages/pointDetail/pointDetail.wxml-->
<wxs src="./tools.wxs" module="tools" />
<wxs src="./tools.wxs" module="tools" />
<!--
<view class="status-tips" wx:if="{{currentStatus == 2 && currentTimeStatus == 1}}">进行中 >></view>
<view class="status-tips" wx:if="{{currentStatus == 3}}"> 已失效 </view>
<view class="status-tips" wx:if="{{currentTimeStatus == 2}}">已结束</view>-->
<status-img imgHeight="{{imgHeight}}" img="{{detailImage}}" currentStatus="{{currentStatus}}" currentTimeStatus="{{currentTimeStatus}}"/>
<status-img imgHeight="{{imgHeight}}" img="{{detailImage}}" currentStatus="{{currentStatus}}" currentTimeStatus="{{currentTimeStatus}}"/>
<view class="detail-info border_box" wx:if="{{goal}}">
<view class="detail-info border_box" wx:if="{{goal}}">
...
...
src/pages/pointList/pointList.js
View file @
c5a0eeeb
...
@@ -8,7 +8,9 @@ wxService.page({
...
@@ -8,7 +8,9 @@ wxService.page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
pointList
:
[]
pointList
:
[],
currentStatus
:
2
,
// 活动状态 1 未生效 2 生效中 3 已失效 0 已删除
currentTimeStatus
:
1
,
// 1 进行中 2 已结束
},
},
/**
/**
...
@@ -36,11 +38,23 @@ wxService.page({
...
@@ -36,11 +38,23 @@ wxService.page({
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
data
.
forEach
(
item
=>
{
data
.
forEach
(
item
=>
{
// 是否在有效期
let
timeFlag
=
1
let
endT
=
item
.
endTime
let
endT
=
item
.
endTime
let
startT
=
item
.
startTime
// ios 兼容
// ios 兼容
let
currentEndTime
=
(
new
Date
(
endT
.
replace
(
/-/g
,
'/'
))).
getTime
();
let
currentEndTime
=
(
new
Date
(
endT
.
replace
(
/-/g
,
'/'
))).
getTime
();
let
currentstartTime
=
(
new
Date
(
startT
.
replace
(
/-/g
,
'/'
))).
getTime
();
let
currentTime
=
(
new
Date
()).
getTime
();
let
currentTime
=
(
new
Date
()).
getTime
();
// 开始时间 小于 现在 && 小于 结束时间 进行中
if
(
currentstartTime
<
currentTime
&&
currentTime
<
currentEndTime
)
{
timeFlag
=
1
}
else
if
(
currentEndTime
<
currentTime
)
{
// 结束时间 小于 现在时间 已结束
timeFlag
=
2
}
let
distancetime
=
currentEndTime
-
currentTime
let
distancetime
=
currentEndTime
-
currentTime
let
result
=
{
let
result
=
{
day
:
'00'
,
day
:
'00'
,
...
@@ -68,7 +82,9 @@ wxService.page({
...
@@ -68,7 +82,9 @@ wxService.page({
}
}
item
.
countdown
=
result
item
.
countdown
=
result
this
.
setData
({
this
.
setData
({
pointList
:
data
pointList
:
data
,
currentStatus
:
data
.
status
,
currentTimeStatus
:
timeFlag
},
()
=>
{
},
()
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
this
.
getPointConsumptionCount
(
item
.
id
)
this
.
getPointConsumptionCount
(
item
.
id
)
...
...
src/pages/pointList/pointList.wxml
View file @
c5a0eeeb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<view class="point-list border_box">
<view class="point-list border_box">
<block wx:for="{{pointList}}" wx:key="item">
<block wx:for="{{pointList}}" wx:key="item">
<view class="point border_box" data-id="{{item.id}}" bindtap="handleDetail">
<view class="point border_box" data-id="{{item.id}}" bindtap="handleDetail">
<status-img img="{{item.listImage}}" />
<status-img img="{{item.listImage}}"
currentStatus="{{currentStatus}}" currentTimeStatus="{{currentTimeStatus}}"-
/>
<view class="progress weui-flex df-j--bt">
<view class="progress weui-flex df-j--bt">
<view class="rate">进度:
<view class="rate">进度:
<span wx:if="{{item.surplusExchangeCount}}">
<span wx:if="{{item.surplusExchangeCount}}">
...
...
Write
Preview
Markdown
is supported
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