From 38391e46a15efcbb032b156d7a56ea4506d942a8 Mon Sep 17 00:00:00 2001 From: zhangjing Date: Mon, 17 Jul 2023 17:33:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E9=AA=8C=E5=AE=98=E6=89=93=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/interfaces/recruit.js | 8 +- api/request.js | 4 +- app.json | 3 +- pages/recruit/expressTrack/expressTrack.js | 25 ++++ pages/recruit/expressTrack/expressTrack.json | 4 + pages/recruit/expressTrack/expressTrack.wxml | 44 ++++++ pages/recruit/expressTrack/expressTrack.wxss | 141 +++++++++++++++++++ pages/recruit/index.js | 102 +++++++++++--- pages/recruit/index.wxml | 64 ++++++--- pages/recruit/index.wxss | 7 +- pages/recruit/referto/referto.wxml | 4 +- pages/recruit/referto/referto.wxss | 18 ++- pages/recruit/signWrite/signWrite.js | 10 +- pages/recruit/signWrite/signWrite.wxml | 4 +- pages/report/detail/detail.js | 2 +- pages/user/setup/setup.js | 1 + pages/user/setup/setup.wxml | 2 +- project.config.json | 2 +- 18 files changed, 389 insertions(+), 56 deletions(-) create mode 100644 pages/recruit/expressTrack/expressTrack.js create mode 100644 pages/recruit/expressTrack/expressTrack.json create mode 100644 pages/recruit/expressTrack/expressTrack.wxml create mode 100644 pages/recruit/expressTrack/expressTrack.wxss diff --git a/api/interfaces/recruit.js b/api/interfaces/recruit.js index 032c351..9ca5f3c 100644 --- a/api/interfaces/recruit.js +++ b/api/interfaces/recruit.js @@ -85,6 +85,11 @@ const score = (data) => req({ data: data }) +//水滴账户 +const kuaiDi = (experience_id) => req({ + url : "experiences/express_track/" + experience_id +}) + export default ({ index, Enroll, @@ -98,5 +103,6 @@ export default ({ dailyCreate, dailyList, dailyPost, - score + score, + kuaiDi }) \ No newline at end of file diff --git a/api/request.js b/api/request.js index 950802d..72fcf21 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 922584d..c5a75da 100644 --- a/app.json +++ b/app.json @@ -35,7 +35,8 @@ "pages/recruit/signWrite/signWrite", "pages/recruit/writeList/writeList", "pages/recruit/dailyList/dailyList", - "pages/water/index" + "pages/water/index", + "pages/recruit/expressTrack/expressTrack" ], "window": { "backgroundTextStyle": "light", diff --git a/pages/recruit/expressTrack/expressTrack.js b/pages/recruit/expressTrack/expressTrack.js new file mode 100644 index 0000000..0b40fa5 --- /dev/null +++ b/pages/recruit/expressTrack/expressTrack.js @@ -0,0 +1,25 @@ + /* + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +Page({ + data: { + logisticArr : '', + expressData : '', + }, + + onLoad(options) { + // 查看物流 + this.h5url(options.id); + }, + + // 查看物流 + h5url(id) { + wx.$api.recruit.kuaiDi(id).then(res => { + this.setData({ + expressData: res.data.express_track + }) + }).catch(err => {}) + } +}) diff --git a/pages/recruit/expressTrack/expressTrack.json b/pages/recruit/expressTrack/expressTrack.json new file mode 100644 index 0000000..e2aeb4c --- /dev/null +++ b/pages/recruit/expressTrack/expressTrack.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "物流信息" +} \ No newline at end of file diff --git a/pages/recruit/expressTrack/expressTrack.wxml b/pages/recruit/expressTrack/expressTrack.wxml new file mode 100644 index 0000000..99ddd78 --- /dev/null +++ b/pages/recruit/expressTrack/expressTrack.wxml @@ -0,0 +1,44 @@ + + + + + + {{expressData.express_name}} + + {{expressData.no}} + + + + 联系电话:{{expressData.mobile}} + + + + + + + 收 + + + {{expressData.full_address}} + + + + + + + {{item.time}} + + + + {{item.context}} + + + + + + + + 暂无物流信息 + \ No newline at end of file diff --git a/pages/recruit/expressTrack/expressTrack.wxss b/pages/recruit/expressTrack/expressTrack.wxss new file mode 100644 index 0000000..1a3b2ad --- /dev/null +++ b/pages/recruit/expressTrack/expressTrack.wxss @@ -0,0 +1,141 @@ +.top { + background-color: #3b7cff; + padding: 30rpx 30rpx 60rpx; + box-sizing: border-box; + display: flex; +} + +.top-logo { + background-color: #ffffff; + border-radius: 10rpx; + width: 100rpx; + height: 100rpx; + padding: 10rpx; + box-sizing: border-box; +} + +.top-logo image { + width: 100%; + height: 100%; +} + +.top-cont { + color: #ffffff; + width: calc(100% - 130rpx); + margin-left: 30rpx; +} + +.top-name { + display: flex; + line-height: 44rpx; + padding: 10rpx 0; +} + +.top-no { + font-size: 26rpx; + padding-left: 30rpx; + opacity: .9; +} + +.top-type { + font-size: 24rpx; +} + +.top-type text { + padding-left: 20rpx; +} + +.address { + color: #333333; + font-size: 24rpx; + display: flex; + padding: 30rpx 30rpx 0; +} + +.address-tips { + width: 54rpx; + text-align: center; + height: 54rpx; + line-height: 54rpx; + border-radius: 50%; + background-color: #EEEEEE; + margin-left: -15rpx; + font-size: 24rpx +} + +.address-text { + width: calc(100% - 74rpx); + margin-left: 20rpx; + padding-top: 10rpx; +} + +.white { + margin-top: -30rpx; + background-color: #ffffff; + border-radius: 20rpx; +} + +.list { + padding: 0 30rpx; + box-sizing: border-box; +} + +.item { + padding-bottom: 40rpx; + padding-left: 40rpx; + box-sizing: border-box; + position: relative; +} + +.item:first-child { + padding-top: 30rpx; +} + +.item::after { + position: absolute; + content: ''; + background-color: #DDDDDD; + width: 14rpx; + height: 14rpx; + border-radius: 50%; + left: 0; + top: calc(50% - 6rpx); + z-index: 3; + border: 2rpx solid #ffffff; +} + +.item::before { + position: absolute; + content: ''; + background-color: #F0F0F0; + width: 2rpx; + height: 100%; + border-radius: 50%; + left: 8rpx; + top: 0; +} + +.item-name { + display: flex; +} + +.item-status { + font-weight: 600; + padding-right: 20rpx; +} + +.item-time { + color: #868686; +} + +.item-text { + color: #868686; + font-size: 24rpx; + line-height: 40rpx; + margin-top: 20rpx; +} + +.item:first-child .item-time, +.item:first-child .item-text { + color: #ff8100 !important; +} diff --git a/pages/recruit/index.js b/pages/recruit/index.js index 803f03b..8c37d7f 100644 --- a/pages/recruit/index.js +++ b/pages/recruit/index.js @@ -4,6 +4,8 @@ Page({ * 页面的初始数据 */ data: { + userLogin : false, + recruitData : '', type : 'flowPath', //flowPath 参与流程 clockIn 打卡 @@ -47,6 +49,10 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { + this.setData({ + followState: false + }) + wx.login({ success: res => { this.setData({ @@ -54,9 +60,22 @@ Page({ }) } }) - + // 获取体验官首页 this.recruitInfo(); + + // 获取登录状态 + if(wx.getStorageSync("token") != ''){ + this.setData({ + userLogin: true + }) + return + } + + this.setData({ + type: 'flowPath', + followState: false + }) }, /** @@ -70,19 +89,18 @@ Page({ this.setData({ recruitData: res.data }) - // 0可以申请 1需要面检测 5签收-查看物流 6打卡 7第二次面 8完成 if(res.data.can.status == 6 || res.data.can.status == 7 || res.data.can.status == 8) { + // 显示打卡数据 + this.setData({ + type : 'clockIn' + }) + // 获取日历 this.signInfo(); // 获取日常任务 this.dailyInfo(); - - // 显示打卡数据 - this.setData({ - type : 'clockIn' - }) } if(res.data.can.status == 8) { @@ -97,12 +115,16 @@ Page({ */ applyGo() { if(wx.getStorageSync("token") != ''){ + this.setData({ + followStype : 'experience' + }) + // 0可以申请 1需要面检测 5签收-查看物流 6打卡 7第二次面 if(this.data.recruitData.can.status == 0) { - this.setData({ - followStype : 'experience' - }) if(!this.data.recruitData.is_subscribe) { + // 微信公众号入库 + this.followCode(); + this.setData({ followState: true }) @@ -113,13 +135,25 @@ Page({ url: './referto/referto?id=' + this.data.recruitData.experience_id }) } else if(this.data.recruitData.can.status == 5) { - var data = JSON.stringify(this.data.recruitData.express) // 查看物流 wx.navigateTo({ - url: `/pages/order/logistic/logistic?newData=` + encodeURIComponent(data) + url: "/pages/recruit/expressTrack/expressTrack?id=" + this.data.recruitData.experience_id }) } else if(this.data.recruitData.can.status == 6) { // 日历打卡 + if(!this.data.recruitData.is_subscribe) { + // 微信公众号入库 + this.followCode(); + + this.setData({ + followState: true + }) + return + } + // 填写打卡心得 + wx.navigateTo({ + url: './signWrite/signWrite?experienceId=' + this.data.recruitData.experience_id + '&signDayNumber=' + this.data.signDayNumber + }) } else { // 面部检测 wx.navigateTo({ @@ -130,6 +164,9 @@ Page({ } // 去登录 + this.setData({ + followState: false + }) wx.navigateTo({ url: "/pages/login/index" }) @@ -148,6 +185,14 @@ Page({ * 获取code */ followCode() { + wx.login({ + success: res => { + this.setData({ + loginCode: res.code + }) + } + }) + wx.getUserProfile({ desc : "获取你的昵称、头像、地区及性别", success : e => { @@ -215,7 +260,13 @@ Page({ * 签到弹出 */ tapPop() { + this.setData({ + followStype : 'experience' + }) if(!this.data.recruitData.is_subscribe) { + // 微信公众号入库 + this.followCode(); + this.setData({ followState: true }) @@ -236,21 +287,27 @@ Page({ }) return } - // 微信公众号入库 - this.followCode(); this.setData({ followState: !this.data.followState }) - if(this.data.followStype == 'experience') { + + // 0可以申请 1需要面检测 5签收-查看物流 6打卡 7第二次面 + if(this.data.recruitData.can.status == 0) { + this.setData({ + followState: false + }) // 申请体验官 wx.navigateTo({ url: './referto/referto?id=' + this.data.recruitData.experience_id }) - } else { + } else if(this.data.recruitData.can.status == 6) { // 填写打卡心得 wx.navigateTo({ url: './signWrite/signWrite?experienceId=' + this.data.recruitData.experience_id + '&signDayNumber=' + this.data.signDayNumber }) + this.setData({ + followState: false + }) } }, @@ -355,9 +412,22 @@ Page({ * 公众号弹出 */ followHide() { + // 微信公众号入库 + this.followCode(); + this.setData({ followState: !this.data.followState, followStype: 'close' }) + }, + + /** + * 第二次免检 + */ + tapSecond() { + // 面部检测 + wx.navigateTo({ + url: '/pages/index/assess/assess?type=2' + }) } }) \ No newline at end of file diff --git a/pages/recruit/index.wxml b/pages/recruit/index.wxml index 93b5034..6f047ae 100644 --- a/pages/recruit/index.wxml +++ b/pages/recruit/index.wxml @@ -1,4 +1,3 @@ - @@ -97,9 +96,13 @@ - + + + {{selectMonth}} - + + + @@ -127,7 +130,9 @@ - {{item.day}} + + {{item.day}} + {{item.day}} @@ -141,21 +146,35 @@ 每日打卡获得{{signWaterNumber}}水滴,累积打卡 {{signDayCount}}天,可再次兑换1瓶水感应喷雾 - 打卡 - 已打卡 + + 请打卡 + 已打卡 + + + 二次面检 + + + 已完成 + - - + + + + - + + + VS - + + + @@ -391,12 +410,17 @@ - + + + - 日常分享 + 日常分享 + - + + + {{item.title}} @@ -407,7 +431,9 @@ 分享 分享 - 分享记录> + + 分享记录> + @@ -431,7 +457,9 @@ - - - 关注公众号 - \ No newline at end of file + + + + 关注公众号 + + \ No newline at end of file diff --git a/pages/recruit/index.wxss b/pages/recruit/index.wxss index 1367b16..f402e60 100644 --- a/pages/recruit/index.wxss +++ b/pages/recruit/index.wxss @@ -347,7 +347,7 @@ .clockInTitle-day text { font-size: 44rpx; position: absolute; - left: 0; + left: -14rpx; top: -20rpx; font-style: italic; font-weight: 600; @@ -449,7 +449,7 @@ color: #ffffff; border-radius: 80rpx; line-height: 64rpx; - padding: 0 40rpx; + padding: 0 20rpx; font-size: 26rpx; } @@ -520,7 +520,8 @@ left: 0; top: 0; height: 50rpx; - background-image: linear-gradient(to top, transparent, #ebf3ff); + /* background: linear-gradient(to top, transparent, #ebf3ff); */ + /* background: -webkit-gradient(linear, top, transparent, color-stop(100%, #ebf3ff)); */ width: 100%; } diff --git a/pages/recruit/referto/referto.wxml b/pages/recruit/referto/referto.wxml index e02be5c..77f8fe1 100644 --- a/pages/recruit/referto/referto.wxml +++ b/pages/recruit/referto/referto.wxml @@ -58,6 +58,8 @@ - 去面部检测 > + + + \ No newline at end of file diff --git a/pages/recruit/referto/referto.wxss b/pages/recruit/referto/referto.wxss index 8da6efa..b76d140 100644 --- a/pages/recruit/referto/referto.wxss +++ b/pages/recruit/referto/referto.wxss @@ -232,15 +232,21 @@ page { } .refertoCont-name { - background-image: linear-gradient(to bottom, #ffb70a, #ff7e1c); - color: #fff; + width: 100%; + /* background-image: linear-gradient(to bottom, #ffb70a, #ff7e1c); + color: #fff; */ display: inline-block; margin-bottom: 50rpx; - padding: 0 60rpx; - border: 4rpx solid #ffffff; + /* padding: 0 60rpx; */ + /* border: 4rpx solid #ffffff; */ line-height: 80rpx; - border-radius: 90rpx; - font-size: 34rpx; + /* border-radius: 90rpx; */ + /* font-size: 34rpx; */ +} + +.refertoCont-name image, +.refertoCont-img { + width: 100%; } .refertoCont-close { diff --git a/pages/recruit/signWrite/signWrite.js b/pages/recruit/signWrite/signWrite.js index 121118a..adaa930 100644 --- a/pages/recruit/signWrite/signWrite.js +++ b/pages/recruit/signWrite/signWrite.js @@ -46,15 +46,17 @@ Page({ let count = 9 - this.data.albumArr.length wx.chooseImage({ count : count, + success : res=>{ // 上传图片 if (res.tempFilePaths){ let pathArr = res.tempFilePaths - wx.showLoading({ - title: '上传中', - }) for (let i = 0; i < pathArr.length; i++){ wx.$api.file.uploadImg(pathArr[i], {}).then(res=>{ + wx.showLoading({ + title: '上传中', + }) + let albumArr = this.data.albumArr albumArr.push({ path: res.path, @@ -63,6 +65,8 @@ Page({ this.setData({ albumArr }) + + wx.hideLoading() }) if (i == pathArr.length - 1) { diff --git a/pages/recruit/signWrite/signWrite.wxml b/pages/recruit/signWrite/signWrite.wxml index eb836eb..2d48a5f 100644 --- a/pages/recruit/signWrite/signWrite.wxml +++ b/pages/recruit/signWrite/signWrite.wxml @@ -7,7 +7,7 @@ #使用心得##第{{signDayNumber}}天# - + @@ -25,7 +25,7 @@ #产品建议# - + diff --git a/pages/report/detail/detail.js b/pages/report/detail/detail.js index fa71296..979b9c6 100644 --- a/pages/report/detail/detail.js +++ b/pages/report/detail/detail.js @@ -43,7 +43,7 @@ Page({ Type: options.type }) - if(this.data.Type == '1' || this.data.Type == '2') { + if(this.data.Type == '1') { this.setData({ refertoStatus: true }) diff --git a/pages/user/setup/setup.js b/pages/user/setup/setup.js index 4b7deeb..387d3f8 100644 --- a/pages/user/setup/setup.js +++ b/pages/user/setup/setup.js @@ -70,6 +70,7 @@ Page({ if(type == 'avatar') { wx.chooseMedia({ count : 1, + mediaType: 'image', success : path => { // 上传图片 wx.$api.file.uploadImg(path.tempFiles[0].tempFilePath, {}).then(res=>{ diff --git a/pages/user/setup/setup.wxml b/pages/user/setup/setup.wxml index aadfaf8..7c00506 100644 --- a/pages/user/setup/setup.wxml +++ b/pages/user/setup/setup.wxml @@ -38,7 +38,7 @@ 出生年月 - + {{birthday != '' ? birthday : '请选择出生年月'}} diff --git a/project.config.json b/project.config.json index ea72c51..bfdbf9f 100644 --- a/project.config.json +++ b/project.config.json @@ -45,7 +45,7 @@ }, "compileType": "miniprogram", "libVersion": "2.17.0", - "appid": "wx9ae0c63d0c58caeb", + "appid": "wx6bd4fcc040bfa025", "projectname": "miniprogram-92", "condition": {}, "editorSetting": {