[体验官活动]

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

View File

@@ -61,6 +61,30 @@ const signUser = (experience_id) => req({
url : "experiences/sign_user/" + experience_id,
})
// 分享前置
const dailyCreate = () => req({
url : "experiences/daily/create"
})
// 我的分享任务
const dailyList = (data) => req({
url : "experiences/daily",
data: data
})
// 我的分享任务-提交
const dailyPost = (data) => req({
url : "experiences/daily",
method: "POST",
data: data
})
//水滴账户
const score = (data) => req({
url : "user/account/score",
data: data
})
export default ({
index,
Enroll,
@@ -70,5 +94,9 @@ export default ({
signLabor,
signList,
skinDiff,
signUser
signUser,
dailyCreate,
dailyList,
dailyPost,
score
})

View File

@@ -12,8 +12,8 @@ import {updToken} from './updateToken'
// wx6bd4fcc040bfa025 水感应 正式appid
// wx9ae0c63d0c58caeb 测试appid 三猿
// wx3056ec23196eaf02 水感应 测试
const api = "https://api.shui.shuiganying.com/api/" // 正式环境
// const api = "https://shuitest.shuiganying.com/api/" // 测试环境
// const api = "https://api.shui.shuiganying.com/api/" // 正式环境
const api = "https://shuitest.shuiganying.com/api/" // 测试环境
const header = {
"Accept" : "application/json"
}

View File

@@ -33,7 +33,9 @@
"pages/recruit/index",
"pages/recruit/referto/referto",
"pages/recruit/signWrite/signWrite",
"pages/recruit/writeList/writeList"
"pages/recruit/writeList/writeList",
"pages/recruit/dailyList/dailyList",
"pages/water/index"
],
"window": {
"backgroundTextStyle": "light",

View File

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

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "体验官"
}

View File

@@ -0,0 +1,27 @@
<view class="list" wx:if="{{listsArr.length > 0}}">
<view class="item {{item.status.value == 1 ? 'active' : ''}}" wx:for="{{listsArr}}" wx:key="listArr">
<view class="item-status {{item.status.value == 0 ? 'active' : ''}}" wx:if="{{item.status.value != 1}}">{{item.status.text}}</view>
<view class="item-left">
<view class="item-name">{{item.category.title}}</view>
<view class="item-text">{{item.created_at}}</view>
</view>
<view class="item-right">
<view class="item-number">+1</view>
<image class="item-img" src="https://cdn.shuiganying.com/images/2023/07/14/3b0be0d084e44b38c54cd67e1e5cf808.png" mode="widthFix"></image>
</view>
<view class="item-remark" wx:if="{{item.remark}}">驳回原因:<view class="item-remark-text">{{item.remark}}</view></view>
</view>
<view class="pagesLoding" wx:if="{{lodingStats}}">
<block wx:if="{{page.has_more}}">
<image class="pagesLoding-icon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block wx:else>
没有更多了~
</block>
</view>
</view>
<view class="pack-center pages-hint" wx:else>
<image src="/static/imgs/text_null.png"></image>
<view>暂无数据</view>
</view>

View File

@@ -0,0 +1,82 @@
page {
background-color: #f7faff;
}
.item {
padding: 60rpx 30rpx 30rpx;
box-sizing: border-box;
background-color: #ffffff;
margin-bottom: 30rpx;
position: relative;
}
.item.active {
padding-top: 30rpx;
}
.item-status {
position: absolute;
right: 0;
top: 0;
background-color: #40df70;
color: #ffffff;
font-size: 26rpx;
padding: 0 15rpx;
height: 48rpx;
line-height: 48rpx;
border-radius: 0 0 0 4rpx;
}
.item-status.active {
background-color: #5390f4;
}
.item-left {
flex: 1;
}
.item-right {
line-height: 54rpx;
display: flex;
margin-top: 20rpx;
position: absolute;
top: 40rpx;
right: 30rpx;
}
.item-number {
color: #5274f4;
font-weight: 600;
font-size: 38rpx;
margin-right: 10rpx;
}
.item-img {
width: 54rpx;
}
.item-name {
font-weight: 600;
line-height: 60rpx;
font-size: 34rpx;
}
.item-text {
font-size: 28rpx;
color: #90919e;
}
.item-remark {
padding-top: 30rpx;
border-top: 2rpx solid #dadada;
margin-top: 30rpx;
font-size: 28rpx;
display: flex;
color: #90919e;
}
.item-remark-text {
width: calc(100% - 120rpx);
padding-left: 30rpx;
box-sizing: border-box;
}

View File

@@ -8,7 +8,9 @@ Page({
type : 'flowPath', //flowPath 参与流程 clockIn 打卡
followState : false,
followStype : '', //是关闭还是跳转
loginCode : '',
subscribe : '', //是否关注
calendarData : [], //日历表
canSign : '', //是否可以签到
@@ -19,6 +21,11 @@ Page({
signDayCount : '', //总打卡天数
signWaterNumber: '', //总打卡给水滴
skinData : '', //体验对比分析
dailyData : [], //日常任务
dailyId : '', // 日常任务列表id
dailyTitle : '', // 日常任务列表标题
dailyState : false, //日常分享列表弹出
nameState : false, //粘贴地址弹框
},
/**
@@ -65,20 +72,23 @@ Page({
})
// 0可以申请 1需要面检测 5签收-查看物流 6打卡 7第二次面 8完成
// if(res.data.can.status == 6 || res.data.can.status == 7 || res.data.can.status == 8) {
// // 获取日历
// this.signInfo();
if(res.data.can.status == 6 || res.data.can.status == 7 || res.data.can.status == 8) {
// 获取日历
this.signInfo();
// // 显示打卡数据
// this.setData({
// type : 'clockIn'
// })
// }
// 获取日常任务
this.dailyInfo();
// if(res.data.can.status == 8) {
// // 获取两次报告对比
// this.skinInfo();
// }
// 显示打卡数据
this.setData({
type : 'clockIn'
})
}
if(res.data.can.status == 8) {
// 获取两次报告对比
this.skinInfo();
}
}).catch(err => {})
},
@@ -89,6 +99,15 @@ Page({
if(wx.getStorageSync("token") != ''){
// 0可以申请 1需要面检测 5签收-查看物流 6打卡 7第二次面
if(this.data.recruitData.can.status == 0) {
this.setData({
followStype : 'experience'
})
if(!this.data.recruitData.is_subscribe) {
this.setData({
followState: true
})
return
}
// 申请体验官
wx.navigateTo({
url: './referto/referto?id=' + this.data.recruitData.experience_id
@@ -138,17 +157,11 @@ Page({
iv : e.iv,
encryptedData: e.encryptedData
}).then(res => {
console.log('rrrr')
// subscribe == 0未关注公众号
if (res.data.subscribe == 0) {
this.setData({
followState: true
})
return
}
// 获取首页数据 subscribe == 1已 关注公众号
this.mallData();
//subscribe == 1已关注公众号
this.setData({
subscribe: res.data.subscribe
})
}).catch(err => {})
}
},
@@ -202,19 +215,136 @@ Page({
* 签到弹出
*/
tapPop() {
if(this.data.canSign) {
if(!this.data.recruitData.is_subscribe) {
this.setData({
followState: true
})
return
}
wx.navigateTo({
url: './signWrite/signWrite?experienceId=' + this.data.recruitData.experience_id + '&signDayNumber=' + this.data.signDayNumber
})
},
/**
* 签到跳走
*/
tapGo() {
if(this.data.followStype == 'close') {
this.setData({
followState: !this.data.followState
})
return
}
// 微信公众号入库
this.followCode();
this.setData({
followState: !this.data.followState
})
if(this.data.followStype == 'experience') {
// 申请体验官
wx.navigateTo({
url: './referto/referto?id=' + this.data.recruitData.experience_id
})
} else {
// 填写打卡心得
wx.navigateTo({
url: './signWrite/signWrite?experienceId=' + this.data.recruitData.experience_id + '&signDayNumber=' + this.data.signDayNumber
})
}
},
/**
* 打开日常任务弹框
*/
dailyBind() {
this.setData({
dailyState: true
})
},
/**
* 日常任务
*/
dailyInfo() {
wx.$api.recruit.dailyCreate().then(res => {
this.setData({
dailyData: res.data
})
}).catch(err => {})
},
/**
* 日常任务分享
*/
shareTap(e) {
this.setData({
dailyId: e.currentTarget.dataset.id,
dailyTitle: e.currentTarget.dataset.title,
dailyState: false,
nameState: true
})
},
/**
* 关闭日常任务分享
*/
dailyClose() {
this.setData({
dailyState: false
})
},
/**
* 复制分享地址
*/
freeform(val) {
let data = {
category_id : this.data.dailyId,
url : val.detail.value.url,
city_id : this.data.recruitData.experience_id
}
wx.$api.recruit.dailyPost(data).then(res => {
wx.showToast({
title : '提交成功',
icon : "none"
})
this.setData({
nameState: false
})
// 获取日常任务
this.dailyInfo();
}).catch(() =>{})
},
/**
* 关闭复制分享地址
*/
establish() {
this.setData({
nameState: false
})
},
/**
* 分享记录
*/
recordTap() {
wx.navigateTo({
url: '/pages/recruit/dailyList/dailyList',
})
this.setData({
dailyState: false
})
},
/**
* 两次报告对比
*/
skinInfo() {
wx.$api.recruit.skinDiff().then(res => {
console.log(res.data)
this.setData({
skinData: res.data
})
@@ -226,7 +356,8 @@ Page({
*/
followHide() {
this.setData({
followState: !this.data.followState
followState: !this.data.followState,
followStype: 'close'
})
}
})

View File

@@ -91,7 +91,7 @@
<view class="recruit-block">
<view class="clockIn-border recruit-border">
<view class="clockInTitle">
<view class="clockInTitle-user">Hi张张</view>
<view class="clockInTitle-user">Hi</view>
<view class="clockInTitle-text">今天是你打卡的第<view class="clockInTitle-day"><text>{{signDayNumber}}</text></view>天</view>
</view>
<view class="clockInDate">
@@ -141,7 +141,8 @@
<view class="total-left-text">每日打卡获得<text>{{signWaterNumber}}水滴</text>,累积打卡</view>
<view class="total-left-text">{{signDayCount}}天可再次兑换1瓶水感应喷雾</view>
</view>
<view class="total-btn {{canSign ? '' : 'active'}}" bindtap="tapPop">{{canSign ? '打卡': '已打卡'}}</view>
<view class="total-btn" bindtap="tapPop" wx:if="{{canSign}}">打卡</view>
<view class="total-btn active" wx:else>已打卡</view>
</view>
</view>
</view>
@@ -355,7 +356,7 @@
<!-- 按钮 -->
<view class="clockIn-tool">
<view class="clockIn-btn">
<view class="clockIn-btn" bindtap="dailyBind">
<image class="clockIn-btn-img" src="https://cdn.shuiganying.com/images/2023/07/10/81929ad1ad773ad59bc461da4acff445.png" mode="widthFix"></image>
<view class="clockIn-btn-text">日常分享</view>
</view>
@@ -377,12 +378,60 @@
<!-- 打卡 end -->
<!-- 公众号弹出 -->
<view class="followPop {{followState ? 'active' : ''}}"></view>
<view class="followCont {{followState ? 'active' : ''}}">
<view class="followPop {{followState ? 'active' : ''}}" catchtouchmove='true'></view>
<view class="followCont {{followState ? 'active' : ''}}" catchtouchmove='true'>
<view class="followText">
<view class="weChat-title">关注公众号</view>
<image class="weChat-close" src="/static/icons/uricacidClose.png" bindtap="followHide"></image>
<image class="weChat-close" src="/static/icons/uricacidClose.png" bindtap="tapGo"></image>
<image class="weChat-img" src="/static/imgs/weChat_code.jpg" mode="widthFix"></image>
<view class="weChat-text">截图扫码,关注公众号</view>
<view class="weChat-text"><text>请关注”水感应“公众号</text><text>以便收到活动通知</text></view>
</view>
</view>
<!-- 日常分享弹出 -->
<view class="dailyBack {{dailyState ? 'active' : ''}}" catchtouchmove='true'></view>
<view class="dailyCont {{dailyState ? 'active' : ''}}" catchtouchmove='true'>
<view class="dailyCont-img"><image src="https://cdn.shuiganying.com/images/2023/07/14/a6fcd5a3203623f969058c29dd854890.png" mode="widthFix"></image></view>
<view class="dailyCont-white">
<view class="dailyCont-title">日常分享 <image src="/static/icons/reportColse.png" mode="widthFix" bindtap="dailyClose"></image></view>
<view class="dailyCont-list">
<view class="dailyCont-label" wx:for="{{dailyData}}" wx:key="dailyData">
<view class="dailyCont-icon"><image src="{{item.cover}}" mode="widthFix"></image></view>
<view class="dailyCont-text">
<view class="dailyCont-text-name">{{item.title}}</view>
<view class="dailyCont-text-tips">
<image src="https://cdn.shuiganying.com/images/2023/07/14/3b0be0d084e44b38c54cd67e1e5cf808.png" mode="widthFix"></image>
<text>+1</text>分享链接成功可获得水滴
</view>
</view>
<view class="dailyCont-go" data-title="{{item.title}}" data-id="{{item.category_id}}" bindtap="shareTap" wx:if="{{item.can_share}}">分享</view>
<view class="dailyCont-go active" wx:else>分享</view>
</view>
<view class="dailyCont-record"><view class="dailyCont-record-go" bindtap="recordTap">分享记录> </view></view>
</view>
</view>
</view>
<!-- 日常管理连接地址弹框 -->
<view class="publicBack" wx:if="{{nameState}}" catchtouchmove='true'></view>
<view class="publicPop" wx:if="{{nameState}}" catchtouchmove='true'>
<view class="publicPop-cont">
<view class="free-title">{{dailyTitle}}分享地址</view>
<form bindsubmit="freeform" class="site-form">
<view class="free-input">
<input placeholder="请输入您分享的地址" type="text" bindinput="bindinput" name="url"></input>
</view>
<view class="publicPop-btn">
<view class="publicPop-btn-go publicPop-btn-border" bindtap="establish">暂不分享</view>
<button class="publicPop-btn-go" form-type="submit" disabled="{{disabled}}">确定分享</button>
</view>
</form>
</view>
</view>
<!-- 关注漂浮窗 -->
<view class="floating" bindtap="followHide" wx:if="{{!recruitData.is_subscribe}}">
<image class="floating-img" src="https://cdn.shuiganying.com/images/2023/07/14/43ab4bc418a12de6183e11d91cf3e518.png" mode="widthFix"></image>
<view class="floating-name">关注公众号</view>
</view>

View File

@@ -315,10 +315,14 @@
.weChat-text {
font-size: 28rpx;
color: #9d9d9d;
line-height: 60rpx;
line-height: 40rpx;
padding-bottom: 30rpx;
}
.weChat-text text {
display: block;
}
.clockInTitle {
color: #ffffff;
margin-bottom: 30rpx;
@@ -610,4 +614,284 @@
.label-success {
width: 52rpx;
vertical-align: -16rpx;
}
/* 日常分享 */
.dailyBack {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 99;
background-color: rgba(0, 0, 0, .6);
display: none;
}
.dailyBack.active {
display: block;
}
.dailyCont {
position: fixed;
width: 100%;
left: 0;
bottom: -100000%;
z-index: 100;
transition: .2s;
}
.dailyCont.active {
bottom: 0;
}
.dailyCont-img {
text-align: center;
padding: 0 160rpx;
box-sizing: border-box;
}
.dailyCont-img image {
width: 100%;
display: block;
}
.dailyCont-white {
background-color: #ffffff;
border-radius: 30rpx 30rpx 0 0;
overflow: hidden;
}
.dailyCont-title {
text-align: center;
line-height: 100rpx;
color: #ffffff;
background-image: linear-gradient(to left, #88c437, #fffa6d);
font-weight: 600;
font-size: 38rpx;
text-shadow: 0 4rpx 6rpx rgba(102, 170, 9, .6);
position: relative;
}
.dailyCont-title image {
width: 50rpx;
position: absolute;
right: 30rpx;
top: 25rpx;
opacity: .8;
}
.dailyCont-list {
padding: 60rpx 30rpx;
box-sizing: border-box;
}
.dailyCont-label {
border-bottom: 2rpx solid #f0f0f0;
position: relative;
padding-bottom: 30rpx;
margin-bottom: 30rpx;
}
.dailyCont-icon {
width: 94rpx;
height: 94rpx;
border-radius: 50%;
padding: 12rpx;
box-sizing: border-box;
}
.dailyCont-label:nth-child(1) .dailyCont-icon {
background-color: #ffebed;
}
.dailyCont-label:nth-child(2) .dailyCont-icon {
background-color: #f7f7f7;
}
.dailyCont-label:nth-child(3) .dailyCont-icon {
background-color: #effffe;
}
.dailyCont-icon image {
width: 100%;
}
.dailyCont-text {
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 0 120rpx 0 140rpx;
box-sizing: border-box;
}
.dailyCont-go {
position: absolute;
right: 0;
top: 34rpx;
background-image: linear-gradient(to top, #88c437, #88c437);
color: #ffffff;
border-radius: 100rpx;
line-height: 54rpx;
width: 120rpx;
text-align: center;
font-size: 26rpx;
}
.dailyCont-go.active {
background-image: linear-gradient(to top, #d8d8d8, #d8d8d8);
}
.dailyCont-text-tips {
font-size: 26rpx;
color: #90919e;
line-height: 58rpx;
}
.dailyCont-text-tips image {
width: 26rpx;
vertical-align: -2rpx;
}
.dailyCont-text-tips text {
color: #5274f4;
font-weight: 600;
display: inline-block;
margin: 0 10rpx 0 5rpx;
}
.dailyCont-record {
text-align: center;
font-size: 28rpx;
color: #90919e;
line-height: 64rpx;
}
.dailyCont-record-go {
text-decoration:underline;
}
/* 弹出层提示 */
.publicBack {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, .5);
z-index: 99;
}
.publicPop {
left: 50%;
top: 60%;
width: 240px;
margin-left: -120px;
margin-top: -340rpx;
position: fixed;
z-index: 100;
}
.publicPop-cont {
width: 100%;
background-color: #FFFFFF;
border-radius: 30rpx;
text-align: center;
overflow: hidden;
padding: 50rpx 0 0;
box-sizing: border-box;
}
.free-title {
font-weight: 600;
margin-bottom: 40rpx;
font-size: 34rpx;
}
.free-input {
padding: 0 30rpx;
box-sizing: border-box;
height: 90rpx;
line-height: 90rpx;
font-size: 30rpx;
}
.free-input input {
height: 90rpx;
border-radius: 10rpx;
background-color: #f8f8f8;
}
.publicPop-text {
color: #9d9d9d;
font-size: 32rpx;
text-align: center;
}
.publicPop-text text {
color: #000000;
font-size: 40rpx;
display: block;
font-weight: 600;
margin: 20rpx 0 10rpx;
}
.publicPop-btn {
line-height: 80rpx;
margin-top: 70rpx;
font-size: 32rpx;
display: flex;
border-top: 2rpx solid #f8f8f8;
}
.publicPop-btn button {
margin: 0 !important;
padding: 0 !important;
background-color: transparent;
font-weight: normal !important;
color: #6c78f8;
}
.publicPop-btn-go {
width: 50% !important;
text-align: center;
height: 90rpx !important;
line-height: 90rpx !important;
font-size: 30rpx !important;
}
.publicPop-btn-border {
position: relative;
}
.publicPop-btn-border::after {
position: absolute;
content: '';
right: 0;
top: 0;
width: 2rpx;
height: 100rpx;
background-color: #f8f8f8;
}
/* 关注漂浮窗 */
.floating {
position: fixed;
right: -4rpx;
bottom: 10%;
z-index: 9;
padding: 20rpx 15rpx;
text-align: center;
border-radius: 20rpx 0 0 20rpx;
width: 40rpx;
color: #c6501e;
font-weight: 600;
background-image: linear-gradient(to top, #feddc7, #feddc7);
border: 4rpx solid #ffffff;
}
.floating-img {
width: 40rpx;
}

View File

@@ -132,7 +132,6 @@ Page({
images : newPictures,
suggest : this.data.bidData
}).then(res => {
console.log(res)
this.setData({
refertoStatus: true,
signDayNumber: res.data.signDayNumber,

View File

@@ -1,4 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "体验官签到"
"navigationBarTitleText": "体验官"
}

View File

@@ -32,10 +32,10 @@
<!-- 按钮 -->
<view class="clockIn-tool">
<view class="clockIn-btn">
<navigator hover-class="none" open-type="navigateBack" class="clockIn-btn">
<image class="clockIn-btn-img" src="https://cdn.shuiganying.com/images/2023/07/10/81929ad1ad773ad59bc461da4acff445.png" mode="widthFix"></image>
<view class="clockIn-btn-text">返回</view>
</view>
</navigator>
<view class="clockIn-btn" bindtap="tapSign">
<image class="clockIn-btn-img" src="https://cdn.shuiganying.com/images/2023/07/10/c7a52b0906209823c68ca293946ae051.png" mode="widthFix"></image>
<view class="clockIn-btn-text">发布</view>
@@ -60,7 +60,7 @@
<view class="refertoCont-tips">
<image class="refertoCont-icon" src="https://cdn.shuiganying.com/images/2023/07/12/a32b59ad180c847d7056735e2694f83c.png" mode="widthFix"></image><text>+{{signWaterNumber}}</text>水滴
</view>
<navigator hover-class="none" url="/pages/recruit/writeList/writeList" open-type="redirect" class="refertoCont-btn" bindtap="refertoTap">
<navigator hover-class="none" url="/pages/recruit/index" open-type="switchTab" class="refertoCont-btn" bindtap="refertoTap">
我知道了
</navigator>
</view>

View File

@@ -59,6 +59,21 @@ Page({
}).catch(err => {})
},
/**
* 放大相册图片
*/
opneImg(e){
let imgs = [],
index = e.currentTarget.dataset.index
for (let img of e.currentTarget.dataset.imgs){
imgs.push(img)
}
wx.previewImage({
urls : imgs,
current : imgs[index]
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/

View File

@@ -1,3 +1,4 @@
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "体验官"
}

View File

@@ -22,7 +22,7 @@
<view class="frame-write-text">{{item.describe}}</view>
</view>
<view class="album-list" wx:if="{{item.images.length > 0}}">
<view class="album-list-li" wx:for="{{item.images}}" wx:for-item="items" wx:key="itemImages">
<view class="album-list-li" wx:for="{{item.images}}" wx:for-item="items" wx:key="itemImages" bindtap="opneImg" data-index="{{index}}" data-imgs="{{item.images}}">
<image class="album-list-img" src="{{items}}" mode="aspectFill"></image>
</view>
</view>

View File

@@ -129,6 +129,11 @@
常用工具
</view>
<view class="tool-list">
<view class="tool-item" bindtap="userNav" data-url="/pages/water/index">
<image class="tool-item-img" src="https://cdn.shuiganying.com/images/2023/07/14/3848be12fe8f1cd17099ebdc013c06ab.png"></image>
<view class="tool-item-name">水滴账户</view>
<image class="tool-item-arrow" src="/static/icons/orderArrow.png"></image>
</view>
<block wx:if="{{userData.can_share}}">
<view class="tool-item" wx:if="{{userLogin}}">
<image class="tool-item-img" src="https://cdn.shuiganying.com/images/2023/04/13/bb06808b4b3f3b71258ffab830e37973.png"></image>

View File

@@ -1,451 +1,467 @@
page {
background-color: #f4f4f6;
}
/* 头部 */
.userTop {
background-color: #5283ea;
height: 380rpx;
position: relative;
}
.userTop.active {
height: 320rpx;
}
.userTop-url {
height: 190rpx;
position: relative;
}
.userTop-back,
.userTop-cont {
position: absolute;
left: 0;
width: 100%;
}
.userTop-back {
height: 100%;
bottom: 0;
}
.userTop-cont {
padding: 40rpx 60rpx;
box-sizing: border-box;
display: flex;
}
.userTop-head {
width: 110rpx;
height: 110rpx;
border: 4rpx solid #dae6ff;
background-color: #ffffff;
position: relative;
border-radius: 50%;
}
.userTop-head image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 50%;
}
.userTop-name {
line-height: 110rpx;
color: #ffffff;
font-size: 38rpx;
padding-left: 40rpx;
box-sizing: border-box;
display: flex;
}
.userTop-name-vip {
width: 140rpx;
margin-left: 20rpx;
margin-top: 38rpx;
}
.userTop-head-vip{
position: absolute;
bottom: -16rpx;
left: 18%;
font-size: 24rpx;
color: #ffffff;
height: 32rpx;
line-height: 32rpx;
width: 64%;
text-align: center;
border-radius: 80rpx;
background-image: linear-gradient(to right, #ffa340, #ff7707);
}
.bar {
padding: 0 60rpx;
display: flex;
}
.barTips {
display: flex;
line-height: 38rpx;
color: #ffffff;
}
.barTips-center {
line-height: 54rpx;
}
.barTips-name {
flex: 1;
font-size: 26rpx;
}
.barTips-center .barTips-name {
font-weight: 600;
font-size: 28rpx;
}
.barTips-name text {
font-weight: 600;
padding: 0 5rpx;
}
.barTips-text {
font-size: 24rpx;
opacity: .8;
}
.barCont {
width: calc(100% - 170rpx);
}
.barBack {
width: 100%;
height: 6rpx;
position: relative;
border-radius: 200rpx;
margin-top: 15rpx;
}
.barBack::after {
position: absolute;
content: '';
left: 0;
top: 0;
height: 100%;
width: 100%;
background-color: #ffffff;
border-radius: 200rpx;
opacity: .5;
}
.barBack text {
position: absolute;
content: '';
left: 0;
top: 0;
height: 100%;
background-color: #ffffff;
border-radius: 100rpx;
opacity: 1;
}
.barBtn {
background-color: #ffffff;
border-radius: 100rpx;
border: 2rpx solid #ffffff;
width: 120rpx;
text-align: center;
margin-left: 40rpx;
color: #5283ea;
font-size: 24rpx;
height: 54rpx;
line-height: 54rpx;
}
.barBtn-active {
width: 180rpx;
}
.barBtn.active {
opacity: .8;
color: #999;
}
/* 主内容 */
.userCont {
width: 100%;
position: absolute;
top: 285rpx;
padding: 0 30rpx 30rpx;
box-sizing: border-box;
}
.userCont.active {
top: 210rpx;
}
/* 订单 */
.userOrder {
padding: 0 30rpx;
box-sizing: border-box;
width: 100%;
}
.userOrder-cont {
padding: 30rpx 0;
box-sizing: border-box;
border-radius: 20rpx 20rpx 0 0;
background-image: linear-gradient(to top, #eef5ff 5%, #ffffff 90%);
}
.userOrder-title {
display: flex;
margin-bottom: 30rpx;
line-height: 48rpx;
padding: 0 30rpx;
}
.userOrder-title-name {
flex: 1;
font-size: 34rpx;
}
.userOrder-title-more {
color: #a6a7ab;
font-size: 28rpx;
display: flex;
}
.userOrder-title-arrow {
width: 42rpx;
height: 42rpx;
margin-top: 3rpx;
}
.userOrder-list {
display: flex;
}
.userOrder-item {
flex: 4;
text-align: center;
position: relative;
}
.userOrder-item-name {
font-size: 26rpx;
margin-top: 5rpx;
color: #868686;
}
.userOrder-item-icon {
width: 42rpx;
height: 42rpx;
}
.userOrder-item-number {
border-radius: 50%;
color: #ffffff;
background-color: #ff9951;
position: absolute;
top: -15rpx;
right: 40rpx;
font-size: 24rpx;
width: 30rpx;
height: 30rpx;
line-height: 30rpx;
border: 4rpx solid #ffffff;
}
/* 入口 */
.entry {
background-color: #ffffff;
border-radius: 0 0 20rpx 20rpx;
padding: 30rpx 0 0;
box-sizing: border-box;
flex-wrap: wrap;
justify-content: flex-start;
width: 100%;
}
.entry-item {
width: 25%;
display: inline-block;
text-align: center;
font-size: 28rpx;
margin-bottom: 40rpx;
}
.entry-item-img {
width: 56rpx;
height: 56rpx;
display: block;
margin: 0 auto 10rpx;
}
.entry-item-name {
color: #313131;
}
/* 常用工具 */
.tool {
background-color: #ffffff;
border-radius: 20rpx;
padding: 30rpx 0 30rpx 30rpx;
box-sizing: border-box;
margin-top: 30rpx;
}
.tool-title {
margin-bottom: 30rpx;
line-height: 48rpx;
font-size: 34rpx;
}
.tool-list {
margin-top: 50rpx;
}
.tool-item {
display: flex;
padding-bottom: 35rpx;
line-height: 48rpx;
margin-bottom: 35rpx;
border-bottom: 2rpx solid #e1e1e1;
position: relative;
}
.tool-item.btn{
background-color: transparent;
font-weight: normal;
width: 100% !important;
padding: 0 0 40rpx !important;
}
.tool-item.btn::after{
border: none;
}
.tool-item:last-child {
border: none;
margin: 0;
padding-bottom: 15rpx;
}
.tool-item-img {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.tool-item-name {
color: #434343;
}
.tool-item-arrow {
width: 48rpx;
height: 48rpx;
position: absolute;
right: 30rpx;
}
.tool-item-code {
position: absolute;
right: 30rpx;
color: #ff9951;
font-size: 28rpx;
display: flex;
}
.tool-item-copy {
height: 34rpx;
line-height: 34rpx;
border: 2rpx solid #ff9951;
padding: 0 15rpx;
border-radius: 5rpx;
margin-left: 15rpx;
font-size: 26rpx;
margin-top: 4rpx;
}
/* 推荐人弹出 */
.parentEject {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, .6);
z-index: 1000;
display: none;
}
.parentEject.active{
display: block;
}
.parentPop {
width: 80%;
position: fixed;
left: 10%;
top: calc(50% - 200rpx);
z-index: 10001;
height: 400rpx;
display: none;
overflow: hidden;
}
.parentPop.active{
display: block;
}
.parentPop-back,
.parentPop-cont {
height: 320rpx;
position: absolute;
left: 0;
top: 0;
border-radius: 40rpx;
width: 100%;
}
.parentPop-cont {
padding: 60rpx;
box-sizing: border-box;
}
.parentPop-close {
width: 50rpx;
left: calc(50% - 25rpx);
position: absolute;
bottom: 10rpx;
}
.parentPop-img {
width: 220rpx;
position: absolute;
right: 40rpx;
top: 40rpx;
}
.parentPop-head {
width: 94rpx;
height: 94rpx;
border-radius: 100%;
border: 4rpx solid #ffffff;
}
.parentPop-nick {
margin: 10rpx 0 15rpx;
font-weight: 600;
color: #214b9b;
font-size: 32rpx;
}
.parentPop-user {
color: #666666;
page {
background-color: #f4f4f6;
}
/* 头部 */
.userTop {
background-color: #5283ea;
height: 380rpx;
position: relative;
}
.userTop.active {
height: 320rpx;
}
.userTop-url {
height: 190rpx;
position: relative;
}
.userTop-back,
.userTop-cont {
position: absolute;
left: 0;
width: 100%;
}
.userTop-back {
height: 100%;
bottom: 0;
}
.userTop-cont {
padding: 40rpx 60rpx;
box-sizing: border-box;
display: flex;
}
.userTop-head {
width: 110rpx;
height: 110rpx;
border: 4rpx solid #dae6ff;
background-color: #ffffff;
position: relative;
border-radius: 50%;
}
.userTop-head image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 50%;
}
.userTop-name {
line-height: 110rpx;
color: #ffffff;
font-size: 38rpx;
padding-left: 40rpx;
box-sizing: border-box;
display: flex;
}
.userTop-name-vip {
width: 140rpx;
margin-left: 20rpx;
margin-top: 38rpx;
}
.userTop-head-vip{
position: absolute;
bottom: -16rpx;
left: 18%;
font-size: 24rpx;
color: #ffffff;
height: 32rpx;
line-height: 32rpx;
width: 64%;
text-align: center;
border-radius: 80rpx;
background-image: linear-gradient(to right, #ffa340, #ff7707);
}
.bar {
padding: 0 60rpx;
display: flex;
}
.barTips {
display: flex;
line-height: 38rpx;
color: #ffffff;
}
.barTips-center {
line-height: 54rpx;
}
.barTips-name {
flex: 1;
font-size: 26rpx;
}
.barTips-center .barTips-name {
font-weight: 600;
font-size: 28rpx;
}
.barTips-name text {
font-weight: 600;
padding: 0 5rpx;
}
.barTips-text {
font-size: 24rpx;
opacity: .8;
}
.barCont {
width: calc(100% - 170rpx);
}
.barBack {
width: 100%;
height: 6rpx;
position: relative;
border-radius: 200rpx;
margin-top: 15rpx;
}
.barBack::after {
position: absolute;
content: '';
left: 0;
top: 0;
height: 100%;
width: 100%;
background-color: #ffffff;
border-radius: 200rpx;
opacity: .5;
}
.barBack text {
position: absolute;
content: '';
left: 0;
top: 0;
height: 100%;
background-color: #ffffff;
border-radius: 100rpx;
opacity: 1;
}
.barBtn {
background-color: #ffffff;
border-radius: 100rpx;
border: 2rpx solid #ffffff;
width: 120rpx;
text-align: center;
margin-left: 40rpx;
color: #5283ea;
font-size: 24rpx;
height: 54rpx;
line-height: 54rpx;
}
.barBtn-active {
width: 180rpx;
}
.barBtn.active {
opacity: .8;
color: #999;
}
/* 主内容 */
.userCont {
width: 100%;
position: absolute;
top: 285rpx;
padding: 0 30rpx 30rpx;
box-sizing: border-box;
}
.userCont.active {
top: 210rpx;
}
/* 订单 */
.userOrder {
padding: 0 30rpx;
box-sizing: border-box;
width: 100%;
}
.userOrder-cont {
padding: 30rpx 0;
box-sizing: border-box;
border-radius: 20rpx 20rpx 0 0;
background-image: linear-gradient(to top, #eef5ff 5%, #ffffff 90%);
}
.userOrder-title {
display: flex;
margin-bottom: 30rpx;
line-height: 48rpx;
padding: 0 30rpx;
}
.userOrder-title-name {
flex: 1;
font-size: 34rpx;
}
.userOrder-title-more {
color: #a6a7ab;
font-size: 28rpx;
display: flex;
}
.userOrder-title-arrow {
width: 42rpx;
height: 42rpx;
margin-top: 3rpx;
}
.userOrder-list {
display: flex;
}
.userOrder-item {
flex: 4;
text-align: center;
position: relative;
}
.userOrder-item-name {
font-size: 26rpx;
margin-top: 5rpx;
color: #868686;
}
.userOrder-item-icon {
width: 42rpx;
height: 42rpx;
}
.userOrder-item-number {
border-radius: 50%;
color: #ffffff;
background-color: #ff9951;
position: absolute;
top: -15rpx;
right: 40rpx;
font-size: 24rpx;
width: 30rpx;
height: 30rpx;
line-height: 30rpx;
border: 4rpx solid #ffffff;
}
/* 入口 */
.entry {
background-color: #ffffff;
border-radius: 0 0 20rpx 20rpx;
padding: 30rpx 0 0;
box-sizing: border-box;
flex-wrap: wrap;
justify-content: flex-start;
width: 100%;
}
.entry-item {
width: 25%;
display: inline-block;
text-align: center;
font-size: 28rpx;
margin-bottom: 40rpx;
}
.entry-item-img {
width: 56rpx;
height: 56rpx;
display: block;
margin: 0 auto 10rpx;
}
.entry-item-name {
color: #313131;
}
/* 常用工具 */
.tool {
background-color: #ffffff;
border-radius: 20rpx;
padding: 30rpx 0 30rpx 30rpx;
box-sizing: border-box;
margin-top: 30rpx;
}
.tool-title {
margin-bottom: 30rpx;
line-height: 48rpx;
font-size: 34rpx;
}
.tool-list {
margin-top: 50rpx;
}
.tool-item {
display: flex;
padding-bottom: 35rpx;
line-height: 48rpx;
margin-bottom: 35rpx;
border-bottom: 2rpx solid #e1e1e1;
position: relative;
}
.tool-item.btn{
background-color: transparent;
font-weight: normal;
width: 100% !important;
padding: 0 0 40rpx !important;
}
.tool-item.btn::after{
border: none;
}
.tool-item:last-child {
border: none;
margin: 0;
padding-bottom: 15rpx;
}
.tool-item-img {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.tool-item-name {
color: #434343;
}
.tool-item-surplus {
display: flex;
text-align: right;
color: #5390f4;
}
.tool-item-surplus {
position: absolute;
right: 30rpx;
}
.tool-item-surplus image {
width: 48rpx;
height: 48rpx;
}
.tool-item-arrow {
width: 48rpx;
height: 48rpx;
position: absolute;
right: 30rpx;
}
.tool-item-code {
position: absolute;
right: 30rpx;
color: #ff9951;
font-size: 28rpx;
display: flex;
}
.tool-item-copy {
height: 34rpx;
line-height: 34rpx;
border: 2rpx solid #ff9951;
padding: 0 15rpx;
border-radius: 5rpx;
margin-left: 15rpx;
font-size: 26rpx;
margin-top: 4rpx;
}
/* 推荐人弹出 */
.parentEject {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, .6);
z-index: 1000;
display: none;
}
.parentEject.active{
display: block;
}
.parentPop {
width: 80%;
position: fixed;
left: 10%;
top: calc(50% - 200rpx);
z-index: 10001;
height: 400rpx;
display: none;
overflow: hidden;
}
.parentPop.active{
display: block;
}
.parentPop-back,
.parentPop-cont {
height: 320rpx;
position: absolute;
left: 0;
top: 0;
border-radius: 40rpx;
width: 100%;
}
.parentPop-cont {
padding: 60rpx;
box-sizing: border-box;
}
.parentPop-close {
width: 50rpx;
left: calc(50% - 25rpx);
position: absolute;
bottom: 10rpx;
}
.parentPop-img {
width: 220rpx;
position: absolute;
right: 40rpx;
top: 40rpx;
}
.parentPop-head {
width: 94rpx;
height: 94rpx;
border-radius: 100%;
border: 4rpx solid #ffffff;
}
.parentPop-nick {
margin: 10rpx 0 15rpx;
font-weight: 600;
color: #214b9b;
font-size: 32rpx;
}
.parentPop-user {
color: #666666;
}

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;
}

View File

@@ -45,7 +45,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.17.0",
"appid": "wx6bd4fcc040bfa025",
"appid": "wx9ae0c63d0c58caeb",
"projectname": "miniprogram-92",
"condition": {},
"editorSetting": {

View File

@@ -84,6 +84,13 @@
"query": "id=1",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/recruit/dailyList/dailyList",
"query": "",
"launchMode": "default",
"scene": null
}
]
}

BIN
static/icons/water.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

BIN
static/icons/water_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB