Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wx-shopping-mall
Project
Project
Details
Activity
Releases
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
engine
wx-shopping-mall
Commits
3732e84f
Commit
3732e84f
authored
Jun 02, 2020
by
Aivs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加我的EB
parent
5ffa6e8d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
328 additions
and
1 deletion
+328
-1
app.json
app.json
+1
-0
clockin-list.js
pages/clockin-list/clockin-list.js
+169
-0
clockin-list.json
pages/clockin-list/clockin-list.json
+6
-0
clockin-list.wxml
pages/clockin-list/clockin-list.wxml
+26
-0
clockin-list.wxss
pages/clockin-list/clockin-list.wxss
+120
-0
index.js
pages/ucenter/index/index.js
+5
-0
index.wxml
pages/ucenter/index/index.wxml
+1
-1
No files found.
app.json
View file @
3732e84f
{
"pages"
:
[
"pages/index/index"
,
"pages/clockin-list/clockin-list"
,
"pages/index2/index2"
,
"pages/search/search"
,
"pages/hotGoods/hotGoods"
,
...
...
pages/clockin-list/clockin-list.js
0 → 100644
View file @
3732e84f
const
app
=
getApp
();
import
{
request
,
formateWeek
}
from
'../../utils/util.js'
;
import
api
from
'../../config/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
lists
:
[],
dataForm
:
{
page
:
1
,
limit
:
15
,
appId
:
2030001
,
searchAppId
:
2030001
,
},
types
:
{
0
:
'每日打卡'
,
1
:
'目标步数达成'
,
2
:
'赛程奖励'
,
},
totalPage
:
0
,
EBitems
:
[
{
name
:
'戈友商城EB'
,
},
{
name
:
'戈友圈EB'
,
},
{
name
:
'工商大道EB'
,
},
],
selindex
:
0
,
allEB
:
[
{
name
:
'全部'
,
},
{
name
:
'收入'
,
},
{
name
:
'支出'
,
},
],
ebindex
:
0
,
},
/**
* 获取已报名过的信息
*/
getData
()
{
const
userId
=
wx
.
getStorageSync
(
'userInfo'
).
userId
;
request
(
api
.
detailPoint
,
{
...
this
.
data
.
dataForm
,
userId
},
'GET'
).
then
((
res
)
=>
{
if
(
res
.
errno
===
0
)
{
console
.
log
(
res
);
const
page
=
this
.
data
.
page
;
const
items
=
res
.
data
.
userPointRecordInApp
;
console
.
log
([...
this
.
data
.
lists
,
...
items
]);
this
.
setData
({
lists
:
this
.
data
.
dataForm
.
page
>
1
?
[...
this
.
data
.
lists
,
...
items
]
:
items
,
totalRemainPoint
:
res
.
data
.
userRemainPoint
,
totalPage
:
Math
.
ceil
(
res
.
data
.
totalLength
/
this
.
data
.
dataForm
.
limit
),
});
}
else
{
wx
.
showToast
({
title
:
res
.
errmsg
,
//提示的内容,
icon
:
'none'
,
//图标,
duration
:
2000
,
//延迟时间,
success
:
(
res
)
=>
{},
});
if
(
res
.
errno
===
501
)
{
this
.
setData
({
requestMethods
:
'initData'
,
author
:
true
,
});
}
}
});
},
selectItem
(
e
)
{
this
.
setData
({
selindex
:
e
.
currentTarget
.
dataset
.
index
,
});
let
searchAppId
=
2030001
;
// if (e.currentTarget.dataset.index == 1) {
// searchAppId = 2030001;
// }
switch
(
e
.
currentTarget
.
dataset
.
index
){
case
0
:
searchAppId
=
2030001
;
break
;
case
1
:
searchAppId
=
2010001
;
break
;
case
2
:
searchAppId
=
2060001
;
break
;
}
this
.
setData
({
lists
:
[],
totalRemainPoint
:
''
,
'dataForm.searchAppId'
:
searchAppId
,
});
this
.
getData
();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
getData
();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
lists
:
[],
'dataForm.page'
:
1
,
});
this
.
getData
();
setTimeout
(()
=>
{
wx
.
stopPullDownRefresh
();
},
300
);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
const
dataForm
=
this
.
data
.
dataForm
;
if
(
dataForm
.
page
>=
this
.
data
.
totalPage
)
{
wx
.
showToast
({
title
:
'已没有更多数据'
,
icon
:
'none'
,
duration
:
2000
,
});
}
else
{
this
.
setData
({
'dataForm.page'
:
dataForm
.
page
+
1
,
});
this
.
getData
();
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{},
});
pages/clockin-list/clockin-list.json
0 → 100644
View file @
3732e84f
{
"navigationBarTitleText"
:
"EB明细"
,
"enablePullDownRefresh"
:
true
,
"backgroundTextStyle"
:
"dark"
,
"usingComponents"
:
{}
}
\ No newline at end of file
pages/clockin-list/clockin-list.wxml
0 → 100644
View file @
3732e84f
<view class='container'>
<view class="top">
<!-- <view class="top-name">我的EB</view> -->
<view class='EB {{selindex==index?"ebwhite":""}}' wx:for='{{EBitems}}' wx:for-index='index' wx:key='index' bindtap='selectItem' data-index='{{index}}' >{{item.name}}</view>
</view>
<view class='content'>
<view class="lists">
<view class="list listtotal">
<view class="list-left">
<view class="list-content">总EB:<text class='count'>{{totalRemainPoint}}</text></view>
</view>
</view>
<view class="list allbox" wx:for="{{lists}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="">
<view class="list-content">{{item.appPointServiceName}}</view>
<view class="time">{{item.addTime}}</view>
</view>
<view class="">
<view class="count"><text wx:if='{{item.point>=0}}'>+</text>{{item.point}}EB</view>
</view>
</view>
</view>
</view>
<login loginshow="{{author}}" wx:if="{{author}}" bind:close="close"></login>
</view>
\ No newline at end of file
pages/clockin-list/clockin-list.wxss
0 → 100644
View file @
3732e84f
page {
background: #F5F5F5;
}
.container {
width: 100%;
background: #E31436
}
.flex{
display: flex;
justify-content: flex-start;
align-items: center;
}
.top {
width: 100%;
height: 110rpx;
overflow: hidden;
display: flex;
justify-content: flex-start;
}
.top-name {
font-size:36rpx;
color:rgba(255,255,255,1);
margin: 38rpx 40rpx 31rpx 40rpx;
line-height: 1;
}
.top-detail {
display: flex;
justify-content: space-between;
}
.content {
width: 100%;
padding-top: 24rpx;
padding-bottom: 30rpx;
background:rgba(246,246,246,1);
border-radius:40rpx 40rpx 0px 0px;
overflow: hidden;
}
.lists {
margin: 0 auto;
}
.list {
display: flex;
justify-content: space-between;
line-height: 1;
border-bottom: 2rpx dashed #989898;
overflow: hidden;
}
.listtotal{
height: 90rpx;
}
.list-left {
flex: 1;
margin-top: 30rpx;
padding:0 45rpx;
}
.list-content {
font-size:28rpx;
font-weight:400;
color:rgba(74,74,74,1);
}
.list-right {
margin-top: 28rpx;
}
.time {
font-size:24rpx;
font-weight:400;
color:rgba(152,152,152,1);
margin-top: 10rpx;
}
.count {
font-size:30rpx;
font-weight:400;
color:rgba(254,100,80,1);
}
.EB{
font-size:20rpx;
font-family:Helvetica;
color:rgba(255,255,255,1);
line-height:44rpx;
height:44rpx;
border-radius:40rpx;
border:1px solid rgba(255,255,255,1);
margin:28rpx;
padding:0 20rpx;
}
.ebwhite{
background-color: #fff;
color:#4A4A4A;
}
.allebitem{
font-size:28rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(17,17,17,1);
line-height:40rpx;
margin-left:55rpx;
height: 50rpx;
}
.allebitem:first-child{
margin-left:0;
}
.allbox{
padding:26rpx 45rpx;
}
.yboder{
border-bottom: 1px solid rgba(254,100,80,1);
}
.backwhite{
background-color: #fff;
}
\ No newline at end of file
pages/ucenter/index/index.js
View file @
3732e84f
...
...
@@ -92,6 +92,11 @@ Page({
});
}
},
goEBlist
(){
wx
.
navigateTo
({
url
:
'/pages/clockin-list/clockin-list'
,
})
},
goOrderIndex
(
e
)
{
if
(
this
.
data
.
hasLogin
)
{
let
tab
=
e
.
currentTarget
.
dataset
.
index
...
...
pages/ucenter/index/index.wxml
View file @
3732e84f
...
...
@@ -100,7 +100,7 @@
<text class='my-menu-name'>领券中心</text>
<image class='my-menu-arrow' src='/static/images/ucenter-more.png'></image>
</view>
<view class='my-menu my-integral'>
<view class='my-menu my-integral'
bindtap='goEBlist'
>
<view class='menu-icon'>
<image class='my-menu-icon' style="width:34rpx; height: 34rpx;" src="/static/images/my-integral.png"></image>
</view>
...
...
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