diff --git a/api/interfaces/recruit.js b/api/interfaces/recruit.js index 7a60a74..032c351 100644 --- a/api/interfaces/recruit.js +++ b/api/interfaces/recruit.js @@ -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 }) \ No newline at end of file diff --git a/api/request.js b/api/request.js index 72fcf21..950802d 100644 --- a/api/request.js +++ b/api/request.js @@ -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" } diff --git a/app.json b/app.json index c74c359..922584d 100644 --- a/app.json +++ b/app.json @@ -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", diff --git a/pages/recruit/dailyList/dailyList.js b/pages/recruit/dailyList/dailyList.js new file mode 100644 index 0000000..452e327 --- /dev/null +++ b/pages/recruit/dailyList/dailyList.js @@ -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); + } + } +}) \ No newline at end of file diff --git a/pages/recruit/dailyList/dailyList.json b/pages/recruit/dailyList/dailyList.json new file mode 100644 index 0000000..51ff580 --- /dev/null +++ b/pages/recruit/dailyList/dailyList.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "体验官" +} \ No newline at end of file diff --git a/pages/recruit/dailyList/dailyList.wxml b/pages/recruit/dailyList/dailyList.wxml new file mode 100644 index 0000000..db2d4c2 --- /dev/null +++ b/pages/recruit/dailyList/dailyList.wxml @@ -0,0 +1,27 @@ + + + {{item.status.text}} + + {{item.category.title}} + {{item.created_at}} + + + +1 + + + 驳回原因:{{item.remark}} + + + + 加载中... + + + 没有更多了~ + + + + + + + 暂无数据 + \ No newline at end of file diff --git a/pages/recruit/dailyList/dailyList.wxss b/pages/recruit/dailyList/dailyList.wxss new file mode 100644 index 0000000..f4949b9 --- /dev/null +++ b/pages/recruit/dailyList/dailyList.wxss @@ -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; +} \ No newline at end of file diff --git a/pages/recruit/index.js b/pages/recruit/index.js index 18313df..803f03b 100644 --- a/pages/recruit/index.js +++ b/pages/recruit/index.js @@ -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' }) } }) \ No newline at end of file diff --git a/pages/recruit/index.wxml b/pages/recruit/index.wxml index bd3f7cb..93b5034 100644 --- a/pages/recruit/index.wxml +++ b/pages/recruit/index.wxml @@ -91,7 +91,7 @@ - Hi!张张 + Hi! 今天是你打卡的第{{signDayNumber}} @@ -141,7 +141,8 @@ 每日打卡获得{{signWaterNumber}}水滴,累积打卡 {{signDayCount}}天,可再次兑换1瓶水感应喷雾 - {{canSign ? '打卡': '已打卡'}} + 打卡 + 已打卡 @@ -355,7 +356,7 @@ - + 日常分享 @@ -377,12 +378,60 @@ - - + + 关注公众号 - + - 截图扫码,关注公众号 + 请关注”水感应“公众号以便收到活动通知 + + + + + + + 日常分享 + + + + + {{item.title}} + + + +1分享链接成功可获得水滴 + + + 分享 + 分享 + + 分享记录> + + + + + + + + + + {{dailyTitle}}分享地址 +
+ + + + + 暂不分享 + + +
+
+
+ + + + + 关注公众号 + \ No newline at end of file diff --git a/pages/recruit/index.wxss b/pages/recruit/index.wxss index 855cbeb..1367b16 100644 --- a/pages/recruit/index.wxss +++ b/pages/recruit/index.wxss @@ -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; } \ No newline at end of file diff --git a/pages/recruit/signWrite/signWrite.js b/pages/recruit/signWrite/signWrite.js index b99b934..121118a 100644 --- a/pages/recruit/signWrite/signWrite.js +++ b/pages/recruit/signWrite/signWrite.js @@ -132,7 +132,6 @@ Page({ images : newPictures, suggest : this.data.bidData }).then(res => { - console.log(res) this.setData({ refertoStatus: true, signDayNumber: res.data.signDayNumber, diff --git a/pages/recruit/signWrite/signWrite.json b/pages/recruit/signWrite/signWrite.json index 74a4c3b..51ff580 100644 --- a/pages/recruit/signWrite/signWrite.json +++ b/pages/recruit/signWrite/signWrite.json @@ -1,4 +1,4 @@ { "usingComponents": {}, - "navigationBarTitleText": "体验官签到" + "navigationBarTitleText": "体验官" } \ No newline at end of file diff --git a/pages/recruit/signWrite/signWrite.wxml b/pages/recruit/signWrite/signWrite.wxml index 4c28b9b..eb836eb 100644 --- a/pages/recruit/signWrite/signWrite.wxml +++ b/pages/recruit/signWrite/signWrite.wxml @@ -32,10 +32,10 @@ - + 返回 - + 发布 @@ -60,7 +60,7 @@ +{{signWaterNumber}}水滴 - + 我知道了 diff --git a/pages/recruit/writeList/writeList.js b/pages/recruit/writeList/writeList.js index dfc64e9..9902199 100644 --- a/pages/recruit/writeList/writeList.js +++ b/pages/recruit/writeList/writeList.js @@ -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] + }) + }, + /** * 页面相关事件处理函数--监听用户下拉动作 */ diff --git a/pages/recruit/writeList/writeList.json b/pages/recruit/writeList/writeList.json index 3928faa..51ff580 100644 --- a/pages/recruit/writeList/writeList.json +++ b/pages/recruit/writeList/writeList.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "体验官" } \ No newline at end of file diff --git a/pages/recruit/writeList/writeList.wxml b/pages/recruit/writeList/writeList.wxml index e0c5193..a715558 100644 --- a/pages/recruit/writeList/writeList.wxml +++ b/pages/recruit/writeList/writeList.wxml @@ -22,7 +22,7 @@ {{item.describe}} - + diff --git a/pages/user/index.wxml b/pages/user/index.wxml index 042fd44..50ff932 100644 --- a/pages/user/index.wxml +++ b/pages/user/index.wxml @@ -129,6 +129,11 @@ 常用工具 + + + 水滴账户 + + diff --git a/pages/user/index.wxss b/pages/user/index.wxss index 910f699..924bfe8 100644 --- a/pages/user/index.wxss +++ b/pages/user/index.wxss @@ -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; } \ No newline at end of file diff --git a/pages/water/index.js b/pages/water/index.js new file mode 100644 index 0000000..8ff9125 --- /dev/null +++ b/pages/water/index.js @@ -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); + } + } +}) \ No newline at end of file diff --git a/pages/water/index.json b/pages/water/index.json new file mode 100644 index 0000000..3928faa --- /dev/null +++ b/pages/water/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/water/index.wxml b/pages/water/index.wxml new file mode 100644 index 0000000..27b47be --- /dev/null +++ b/pages/water/index.wxml @@ -0,0 +1,44 @@ + + 水滴的使用规则:可以进行商品兑换 + + + + + 水滴账户 + + + {{score}} + + + + + 水滴明细 + + + + + + {{item.remark}} + + + {{item.amount}}水滴 + + + + 时间:{{item.created_at}} + + + + + 加载中... + + + 没有更多了~ + + + + + + 暂无数据 + + \ No newline at end of file diff --git a/pages/water/index.wxss b/pages/water/index.wxss new file mode 100644 index 0000000..85aa59e --- /dev/null +++ b/pages/water/index.wxss @@ -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; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json index bfdbf9f..ea72c51 100644 --- a/project.config.json +++ b/project.config.json @@ -45,7 +45,7 @@ }, "compileType": "miniprogram", "libVersion": "2.17.0", - "appid": "wx6bd4fcc040bfa025", + "appid": "wx9ae0c63d0c58caeb", "projectname": "miniprogram-92", "condition": {}, "editorSetting": { diff --git a/project.private.config.json b/project.private.config.json index ae43c06..d077ba2 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -84,6 +84,13 @@ "query": "id=1", "launchMode": "default", "scene": null + }, + { + "name": "", + "pathName": "pages/recruit/dailyList/dailyList", + "query": "", + "launchMode": "default", + "scene": null } ] } diff --git a/static/icons/water.png b/static/icons/water.png new file mode 100644 index 0000000..a418aac Binary files /dev/null and b/static/icons/water.png differ diff --git a/static/icons/water_close.png b/static/icons/water_close.png new file mode 100644 index 0000000..b80c744 Binary files /dev/null and b/static/icons/water_close.png differ diff --git a/static/icons/water_icon.png b/static/icons/water_icon.png new file mode 100644 index 0000000..9e73e8b Binary files /dev/null and b/static/icons/water_icon.png differ