[体验官活动]

This commit is contained in:
2023-07-14 16:44:05 +08:00
parent 49338797af
commit 3ecd1fefa7
27 changed files with 1471 additions and 495 deletions

77
pages/water/index.js Normal file
View File

@@ -0,0 +1,77 @@
/*
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
Page({
/**
* 页面的初始数据
*/
data: {
logsArr : [], // 提货列表数据
score : '', //总数量
page : {}, //分页信息
lodingStats : false, //加载状态
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// 获取账户信息
this.accountInfo()
},
/**
* 获取账户信息
*/
accountInfo(page) {
wx.$api.recruit.score({
page: page
}).then(res => {
let listArr = this.data.logsArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data.logs.data)
this.setData({
score : res.data.score,
logsArr : newData,
page : res.data.logs.page,
lodingStats : false
})
wx.stopPullDownRefresh()
}).catch(err => { })
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
// 获取提货列表
this.pickList();
},
/**
* 上拉加载
*/
onReachBottom(){
this.setData({
lodingStats: true
})
let pageNumber = this.data.page.current
if(this.data.page.has_more){
pageNumber++
// 获取提货列表
this.pickList(pageNumber);
}
}
})

3
pages/water/index.json Normal file
View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

44
pages/water/index.wxml Normal file
View File

@@ -0,0 +1,44 @@
<view class="tips">
水滴的使用规则:可以进行商品兑换
<image src="/static/icons/water_close.png"></image>
</view>
<view class="water">
<view class="water-top">
水滴账户<image src="/static/icons/water_icon.png"></image>
</view>
<view class="water-number">
{{score}}
</view>
</view>
<view class="detailed">
<view class="title">
水滴明细
</view>
<view class="list" wx:if="{{logsArr.length > 0}}">
<view class="item" wx:for="{{logsArr}}" wx:key="logsArr">
<view class="top">
<view class="name">
{{item.remark}}
</view>
<view class="number">
{{item.amount}}<text>水滴</text>
</view>
</view>
<view class="time">
时间:<text>{{item.created_at}}</text>
</view>
</view>
<view class="pagesLoding" wx:if="{{lodingStats}}">
<block wx:if="{{page.has_more}}">
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block wx:else>
没有更多了~
</block>
</view>
</view>
<view class="pages-no" wx:else>
<image src="/static/imgs/cont_null.png" mode="widthFix"></image>
<view>暂无数据</view>
</view>
</view>

133
pages/water/index.wxss Normal file
View File

@@ -0,0 +1,133 @@
.tips {
background-color: #f7edee;
padding: 20rpx 180rpx 20rpx 30rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #b76371;
position: fixed;
width: 100%;
z-index: 9;
top: 0;
left: 0;
}
.tips image {
width: 40rpx;
height: 40rpx;
position: absolute;
right: 20rpx;
top: calc(50% - 24rpx);
}
.water {
background-color: #fff;
text-align: center;
padding: 10rpx 0 40rpx;
position: fixed;
width: 100%;
height: 120rpx;
top: 120rpx;
left: 0;
z-index: 9;
}
.water-top image {
width: 30rpx;
height: 30rpx;
vertical-align: -2rpx;
padding-left: 5rpx;
}
.water-number {
font-size: 62rpx;
margin-top: 10rpx;
color: #5283ea;
font-weight: 600;
}
.detailed {
background-color: #f4f3f9;
left: 0;
top: 320rpx;
height: calc(100vh - 320rpx);
position: absolute;
width: 100%;
overflow: hidden;
overflow-y: scroll;
}
.title {
text-align: center;
color: #5283ea;
position: relative;
line-height: 100rpx;
font-weight: 600;
}
.title::after {
position: absolute;
content: '';
left: calc(50% - 20rpx);
bottom: 0;
width: 40rpx;
height: 6rpx;
border-radius: 10rpx;
background-color: #5283ea;
}
.list {
padding: 30rpx;
box-sizing: border-box;
}
.item {
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 30rpx;
padding: 20rpx;
box-sizing: border-box;
}
.top {
display: flex;
margin-bottom: 10rpx;
}
.name {
flex: 1;
font-weight: 600;
font-size: 30rpx;
}
.number {
color: red;
}
.number text {
color: #9d9d9d;
font-size: 28rpx;
padding-left: 5rpx;
}
.number.active {
color: green;
}
.time {
font-size: 28rpx;
color: #6d6d6d;
}
.pages-no {
background-color: #fff;
margin-top: 30rpx;
text-align: center;
padding: 120rpx 0;
color: #6d6d6d;
font-size: 28rpx;
}
.pages-no image {
width: 180rpx;
}