[体验官活动]
This commit is contained in:
@@ -12,8 +12,9 @@ const index = data => req({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 申请前置接口
|
// 申请前置接口
|
||||||
const Enroll = (experience_id) => req({
|
const Enroll = (experience_id, data) => req({
|
||||||
url : "experiences/enroll/" + experience_id
|
url : "experiences/enroll/" + experience_id,
|
||||||
|
data: data
|
||||||
})
|
})
|
||||||
|
|
||||||
// 申请前置接口
|
// 申请前置接口
|
||||||
@@ -23,8 +24,45 @@ const recruitAdd = (data) => req({
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//小程序入库用户数据(微信授权)
|
||||||
|
const wechatMini = (data) => req({
|
||||||
|
url : "user/socialite/login/wechat/mini/add",
|
||||||
|
method: "POST",
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
|
||||||
|
// 活动打卡日历
|
||||||
|
const signCalendar = (data) => req({
|
||||||
|
url : "experiences/sign_calendar",
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
|
||||||
|
// 活动打卡操作
|
||||||
|
const signLabor = (data) => req({
|
||||||
|
url : "experiences/signs",
|
||||||
|
method: "POST",
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
|
||||||
|
// 打卡记录
|
||||||
|
const signList = (data) => req({
|
||||||
|
url : "experiences/signs",
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
|
||||||
|
// 体验官第一次和第二次比对
|
||||||
|
const skinDiff = (data) => req({
|
||||||
|
url : "ai/skin/diff",
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
|
||||||
export default ({
|
export default ({
|
||||||
index,
|
index,
|
||||||
Enroll,
|
Enroll,
|
||||||
recruitAdd
|
recruitAdd,
|
||||||
|
wechatMini,
|
||||||
|
signCalendar,
|
||||||
|
signLabor,
|
||||||
|
signList,
|
||||||
|
skinDiff
|
||||||
})
|
})
|
||||||
@@ -9,8 +9,9 @@ import {updToken} from './updateToken'
|
|||||||
// 请求方式配置
|
// 请求方式配置
|
||||||
// https://api.shui.shuiganying.com/api //正式地址
|
// https://api.shui.shuiganying.com/api //正式地址
|
||||||
// https://shuitest.shuiganying.com/api //测试地址
|
// https://shuitest.shuiganying.com/api //测试地址
|
||||||
// wx6bd4fcc040bfa025 正式appid
|
// wx6bd4fcc040bfa025 水感应 正式appid
|
||||||
// wx3056ec23196eaf02 测试appid
|
// wx9ae0c63d0c58caeb 测试appid 三猿
|
||||||
|
// wx3056ec23196eaf02 水感应 测试
|
||||||
// const api = "https://api.shui.shuiganying.com/api/" // 正式环境
|
// const api = "https://api.shui.shuiganying.com/api/" // 正式环境
|
||||||
const api = "https://shuitest.shuiganying.com/api/" // 测试环境
|
const api = "https://shuitest.shuiganying.com/api/" // 测试环境
|
||||||
const header = {
|
const header = {
|
||||||
@@ -91,6 +92,9 @@ const req = (obj, noToken) => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const upload = (obj) => {
|
const upload = (obj) => {
|
||||||
|
|
||||||
|
console.log(obj)
|
||||||
|
|
||||||
// header
|
// header
|
||||||
header.Authorization = wx.getStorageSync("token") || ""
|
header.Authorization = wx.getStorageSync("token") || ""
|
||||||
// 处理上传信息
|
// 处理上传信息
|
||||||
|
|||||||
15
app.js
15
app.js
@@ -45,6 +45,18 @@ App({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(wx.getStorageSync("openid") == '') {
|
||||||
|
// 获取code
|
||||||
|
wx.login({
|
||||||
|
success: res => {
|
||||||
|
// 存储openid
|
||||||
|
api.auth.codeOpenid({code: res.code}).then(openidRes => {
|
||||||
|
wx.setStorageSync('openid', openidRes.data)
|
||||||
|
}).catch(err => {})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 挂载api
|
// 挂载api
|
||||||
wx.$api = api
|
wx.$api = api
|
||||||
},
|
},
|
||||||
@@ -53,6 +65,7 @@ App({
|
|||||||
userInfo : null,
|
userInfo : null,
|
||||||
barHeight : '',
|
barHeight : '',
|
||||||
inviteText : '', // 邀请好友临时存储
|
inviteText : '', // 邀请好友临时存储
|
||||||
isExperience: '' // 体验官身份
|
isExperience: '', // 体验官身份
|
||||||
|
experienceAreaId: '' // 体验官区域
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
4
app.json
4
app.json
@@ -31,7 +31,9 @@
|
|||||||
"pages/mall/webView/webView",
|
"pages/mall/webView/webView",
|
||||||
"pages/order/logistic/logistic",
|
"pages/order/logistic/logistic",
|
||||||
"pages/recruit/index",
|
"pages/recruit/index",
|
||||||
"pages/recruit/referto/referto"
|
"pages/recruit/referto/referto",
|
||||||
|
"pages/recruit/signWrite/signWrite",
|
||||||
|
"pages/recruit/writeList/writeList"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
"backgroundTextStyle": "light",
|
"backgroundTextStyle": "light",
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
barHeight : getApp().globalData.barHeight, // 状态栏高度
|
barHeight : getApp().globalData.barHeight, // 状态栏高度
|
||||||
openId : '',
|
|
||||||
nameValue : '', // 姓名
|
nameValue : '', // 姓名
|
||||||
nameStatus: false, // 姓名填写弹框
|
nameStatus: false, // 姓名填写弹框
|
||||||
Analyze : '', // 是否交钱
|
Analyze : '', // 是否交钱
|
||||||
@@ -16,9 +15,6 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.setData({
|
|
||||||
openId: options.code
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
payCode : '', // code获取openid
|
|
||||||
openId : '', // openid
|
|
||||||
disabled : false, // 支付按钮
|
disabled : false, // 支付按钮
|
||||||
payStatus : false, // 支付弹框
|
payStatus : false, // 支付弹框
|
||||||
catchtouchmove: false
|
catchtouchmove: false
|
||||||
@@ -16,26 +14,6 @@ Page({
|
|||||||
if(options.invite != undefined) {
|
if(options.invite != undefined) {
|
||||||
getApp().globalData.inviteText = options.invite
|
getApp().globalData.inviteText = options.invite
|
||||||
}
|
}
|
||||||
wx.login({
|
|
||||||
success: res => {
|
|
||||||
this.setData({
|
|
||||||
payCode: res.code
|
|
||||||
})
|
|
||||||
// 获取openid
|
|
||||||
this.openInfo()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* openid
|
|
||||||
*/
|
|
||||||
openInfo() {
|
|
||||||
wx.$api.auth.codeOpenid({code: this.data.payCode}).then(res => {
|
|
||||||
this.setData({
|
|
||||||
openId: res.data
|
|
||||||
})
|
|
||||||
}).catch(err => {})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,7 +22,7 @@ Page({
|
|||||||
assessGo(){
|
assessGo(){
|
||||||
if(wx.getStorageSync("token") != ''){
|
if(wx.getStorageSync("token") != ''){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/index/assess/assess?code=' + this.data.openId
|
url: '/pages/index/assess/assess?code=' + wx.getStorageSync("openid")
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
barHeight : getApp().globalData.barHeight, // 状态栏高度
|
barHeight : getApp().globalData.barHeight, // 状态栏高度
|
||||||
openId : '',
|
|
||||||
nameValue : '', // 姓名
|
nameValue : '', // 姓名
|
||||||
testTitle : '',
|
testTitle : '',
|
||||||
nameStatus : false, // 姓名填写弹框
|
nameStatus : false, // 姓名填写弹框
|
||||||
@@ -20,19 +19,8 @@ Page({
|
|||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// 体验官 type=1或者type=2 直接面检,不用交钱
|
// 体验官 type=1或者type=2 直接面检,不用交钱
|
||||||
this.setData({
|
this.setData({
|
||||||
refertoType: options.type
|
refertoType: options.type || 0
|
||||||
})
|
})
|
||||||
this.setData({
|
|
||||||
openId: options.code
|
|
||||||
})
|
|
||||||
if(options) {
|
|
||||||
wx.login({
|
|
||||||
success: res => {
|
|
||||||
// 获取openid
|
|
||||||
this.openInfo(res.code)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -47,18 +35,6 @@ Page({
|
|||||||
this.ifAnalyze();
|
this.ifAnalyze();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* openid
|
|
||||||
*/
|
|
||||||
openInfo(code) {
|
|
||||||
wx.$api.auth.codeOpenid({code: code}).then(res => {
|
|
||||||
this.setData({
|
|
||||||
openId: res.data
|
|
||||||
})
|
|
||||||
}).catch(err => {})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否可检测
|
* 是否可检测
|
||||||
*/
|
*/
|
||||||
@@ -192,11 +168,12 @@ Page({
|
|||||||
* 确认支付1元
|
* 确认支付1元
|
||||||
*/
|
*/
|
||||||
payBtn(orderid) {
|
payBtn(orderid) {
|
||||||
|
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: '支付中...',
|
title: '支付中...',
|
||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
wx.$api.index.skinPay(orderid,{type: 'miniapp', openid: this.data.openId}).then(res=>{
|
wx.$api.index.skinPay(orderid,{type: 'miniapp', openid: wx.getStorageSync("openid")}).then(res=>{
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
let payInfo = JSON.parse(res.data.wechat)
|
let payInfo = JSON.parse(res.data.wechat)
|
||||||
wx.requestPayment({
|
wx.requestPayment({
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
payCode : '', // code获取openid
|
|
||||||
openId : '', // openid
|
|
||||||
userLogin : false, // 是否登录
|
userLogin : false, // 是否登录
|
||||||
testTitle : '', // 检测文字
|
testTitle : '', // 检测文字
|
||||||
disabled : false, // 支付按钮
|
disabled : false, // 支付按钮
|
||||||
@@ -21,16 +19,6 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
wx.login({
|
|
||||||
success: res => {
|
|
||||||
this.setData({
|
|
||||||
payCode: res.code
|
|
||||||
})
|
|
||||||
// 获取openid
|
|
||||||
this.openInfo()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// 获取登录状态
|
// 获取登录状态
|
||||||
if(wx.getStorageSync("token") != ''){
|
if(wx.getStorageSync("token") != ''){
|
||||||
this.setData({
|
this.setData({
|
||||||
@@ -46,17 +34,6 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* openid
|
|
||||||
*/
|
|
||||||
openInfo() {
|
|
||||||
wx.$api.auth.codeOpenid({code: this.data.payCode}).then(res => {
|
|
||||||
this.setData({
|
|
||||||
openId: res.data
|
|
||||||
})
|
|
||||||
}).catch(err => {})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否可检测
|
* 是否可检测
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,7 +19,21 @@ Page({
|
|||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
// 获取code
|
// 获取code
|
||||||
this.gainCode();
|
wx.login({
|
||||||
|
success: res => {
|
||||||
|
this.setData({
|
||||||
|
loginCode : res.code
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* openid
|
||||||
|
*/
|
||||||
|
openInfo(code) {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,8 +50,6 @@ Page({
|
|||||||
* 微信授权手机号码
|
* 微信授权手机号码
|
||||||
*/
|
*/
|
||||||
userPhone(e){
|
userPhone(e){
|
||||||
// 获取code
|
|
||||||
this.gainCode();
|
|
||||||
if(e.detail.errMsg == "getPhoneNumber:ok"){
|
if(e.detail.errMsg == "getPhoneNumber:ok"){
|
||||||
this.setData({
|
this.setData({
|
||||||
loading: true
|
loading: true
|
||||||
@@ -53,16 +65,6 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
loading: false
|
loading: false
|
||||||
})
|
})
|
||||||
// 登录过期重新获取code
|
|
||||||
wx.login({
|
|
||||||
success: res=>{
|
|
||||||
this.setData({
|
|
||||||
loginCode: res.code
|
|
||||||
})
|
|
||||||
// 登录
|
|
||||||
this.userLogin(iv,enData)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
@@ -84,6 +86,9 @@ Page({
|
|||||||
invite : getApp().globalData.inviteText || '',
|
invite : getApp().globalData.inviteText || '',
|
||||||
is_experience : getApp().globalData.isExperience || ''
|
is_experience : getApp().globalData.isExperience || ''
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
|
// 存储openid
|
||||||
|
wx.setStorageSync('openid', res.data.openid)
|
||||||
|
|
||||||
// 存储登录信息
|
// 存储登录信息
|
||||||
wx.setStorage({
|
wx.setStorage({
|
||||||
key : 'token',
|
key : 'token',
|
||||||
@@ -109,19 +114,6 @@ Page({
|
|||||||
}).catch(err=>{})
|
}).catch(err=>{})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取code
|
|
||||||
*/
|
|
||||||
gainCode() {
|
|
||||||
wx.login({
|
|
||||||
success: res => {
|
|
||||||
this.setData({
|
|
||||||
loginCode : res.code
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 勾选协议
|
// 勾选协议
|
||||||
radioChange() {
|
radioChange() {
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
payCode : '', // code获取openid
|
|
||||||
openId : '', // openid
|
|
||||||
orderNo : '', // 订单编号
|
orderNo : '', // 订单编号
|
||||||
total : '', // 订单金额
|
total : '', // 订单金额
|
||||||
paySuccess : false, // 兑换成功显示
|
paySuccess : false, // 兑换成功显示
|
||||||
@@ -20,29 +18,7 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {},
|
||||||
wx.login({
|
|
||||||
success: res => {
|
|
||||||
this.setData({
|
|
||||||
payCode: res.code
|
|
||||||
})
|
|
||||||
|
|
||||||
// 获取openid
|
|
||||||
this.openInfo()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* openid
|
|
||||||
*/
|
|
||||||
openInfo() {
|
|
||||||
wx.$api.auth.codeOpenid({code: this.data.payCode}).then(res => {
|
|
||||||
this.setData({
|
|
||||||
openId: res.data
|
|
||||||
})
|
|
||||||
}).catch(err => {})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认支付
|
* 确认支付
|
||||||
@@ -53,7 +29,7 @@ Page({
|
|||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
let that = this
|
let that = this
|
||||||
wx.$api.mall.mallPay(this.data.orderNo,{type: 'miniapp', openid: this.data.openId}).then(res=>{
|
wx.$api.mall.mallPay(this.data.orderNo,{type: 'miniapp', openid: wx.getStorageSync("openid")}).then(res=>{
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
this.setData({
|
this.setData({
|
||||||
disabled: false
|
disabled: false
|
||||||
|
|||||||
@@ -4,7 +4,20 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
recruitData: ''
|
recruitData : '',
|
||||||
|
type : 'flowPath', //flowPath 参与流程 clockIn 打卡
|
||||||
|
|
||||||
|
followState : false,
|
||||||
|
loginCode : '',
|
||||||
|
|
||||||
|
calendarData : [], //日历表
|
||||||
|
canSign : '', //是否可以签到
|
||||||
|
selectMonth : '', //当前月
|
||||||
|
lastMonth : '', //选择下个月
|
||||||
|
nextMonth : '', //选择上个月
|
||||||
|
signDayNumber : '', //累计打卡天数
|
||||||
|
signDayCount : '', //总打卡天数
|
||||||
|
signWaterNumber: '', //总打卡给水滴
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -18,12 +31,23 @@ Page({
|
|||||||
if(options.is_experience != undefined) {
|
if(options.is_experience != undefined) {
|
||||||
getApp().globalData.isExperience = options.is_experience
|
getApp().globalData.isExperience = options.is_experience
|
||||||
}
|
}
|
||||||
|
if(options.experience_area_id != undefined) {
|
||||||
|
getApp().globalData.experienceAreaId = options.experience_area_id
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow() {
|
onShow() {
|
||||||
|
wx.login({
|
||||||
|
success: res => {
|
||||||
|
this.setData({
|
||||||
|
loginCode: res.code
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// 获取体验官首页
|
// 获取体验官首页
|
||||||
this.recruitInfo();
|
this.recruitInfo();
|
||||||
},
|
},
|
||||||
@@ -39,6 +63,25 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
recruitData: res.data
|
recruitData: res.data
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 0可以申请 1需要面检测 5签收-查看物流 6打卡 7第二次面
|
||||||
|
if(res.data.can.status == 6) {
|
||||||
|
// 获取日历
|
||||||
|
this.signInfo();
|
||||||
|
|
||||||
|
// 显示打卡数据
|
||||||
|
this.setData({
|
||||||
|
type : 'clockIn'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// if(res.data.can.status == 7) {
|
||||||
|
// // 获取两次报告对比
|
||||||
|
// this.skinInfo();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 获取两次报告对比
|
||||||
|
this.skinInfo();
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -47,11 +90,22 @@ Page({
|
|||||||
*/
|
*/
|
||||||
applyGo() {
|
applyGo() {
|
||||||
if(wx.getStorageSync("token") != ''){
|
if(wx.getStorageSync("token") != ''){
|
||||||
|
// 0可以申请 1需要面检测 5签收-查看物流 6打卡 7第二次面
|
||||||
if(this.data.recruitData.can.status == 0) {
|
if(this.data.recruitData.can.status == 0) {
|
||||||
|
// 申请体验官
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: './referto/referto?id=' + this.data.recruitData.experience_id
|
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)
|
||||||
|
})
|
||||||
|
} else if(this.data.recruitData.can.status == 6) {
|
||||||
|
// 日历打卡
|
||||||
} else {
|
} else {
|
||||||
|
// 面部检测
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/index/assess/assess?type=1'
|
url: '/pages/index/assess/assess?type=1'
|
||||||
})
|
})
|
||||||
@@ -72,5 +126,106 @@ Page({
|
|||||||
content: this.data.recruitData.can.remark,
|
content: this.data.recruitData.can.remark,
|
||||||
success: res => {}
|
success: res => {}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取code
|
||||||
|
*/
|
||||||
|
followCode() {
|
||||||
|
wx.getUserProfile({
|
||||||
|
desc : "获取你的昵称、头像、地区及性别",
|
||||||
|
success : e => {
|
||||||
|
if(e.errMsg == "getUserProfile:ok"){
|
||||||
|
wx.$api.recruit.wechatMini({
|
||||||
|
code :this.data.loginCode,
|
||||||
|
iv : e.iv,
|
||||||
|
encryptedData: e.encryptedData
|
||||||
|
}).then(res => {
|
||||||
|
// subscribe == 0未关注公众号
|
||||||
|
if (res.data.subscribe == 0) {
|
||||||
|
this.setData({
|
||||||
|
followState: true
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 获取首页数据 subscribe == 1已 关注公众号
|
||||||
|
this.mallData();
|
||||||
|
|
||||||
|
}).catch(err => {})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日历
|
||||||
|
*/
|
||||||
|
signInfo() {
|
||||||
|
wx.$api.recruit.signCalendar({
|
||||||
|
date : this.data.selectMonth,
|
||||||
|
experience_id: this.data.recruitData.experience_id
|
||||||
|
}).then(res => {
|
||||||
|
this.setData({
|
||||||
|
calendarData : res.data.calendar,
|
||||||
|
lastMonth : res.data.lastMonth,
|
||||||
|
nextMonth : res.data.nextMonth,
|
||||||
|
selectMonth : res.data.nowMonth,
|
||||||
|
canSign : res.data.canSign,
|
||||||
|
signDayNumber: res.data.signDayNumber,
|
||||||
|
signDayCount : res.data.signDayCount,
|
||||||
|
signWaterNumber : res.data.signWaterNumber
|
||||||
|
})
|
||||||
|
}).catch(err => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日历数量加减
|
||||||
|
*/
|
||||||
|
couponNumber(e){
|
||||||
|
let val = e.currentTarget.dataset.type
|
||||||
|
if (val == 'plus'){
|
||||||
|
this.setData({
|
||||||
|
selectMonth: this.data.lastMonth
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.setData({
|
||||||
|
selectMonth: this.data.nextMonth
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取日历
|
||||||
|
this.signInfo();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签到弹出
|
||||||
|
*/
|
||||||
|
tapPop() {
|
||||||
|
if(!this.data.canSign) {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: './signWrite/signWrite?experienceId=' + this.data.recruitData.experience_id + '&signDayNumber=' + this.data.signDayNumber
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 两次报告对比
|
||||||
|
*/
|
||||||
|
skinInfo() {
|
||||||
|
wx.$api.recruit.skinDiff().then(res => {
|
||||||
|
console.log(res)
|
||||||
|
}).catch(err => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公众号弹出
|
||||||
|
*/
|
||||||
|
followHide() {
|
||||||
|
this.setData({
|
||||||
|
followState: !this.data.followState
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
<!-- 参与流程 start -->
|
||||||
|
<block wx:if="{{type == 'flowPath'}}">
|
||||||
<image class="recruit-title" src="https://cdn.shuiganying.com/images/2023/07/07/0ff31357e1b3c2237bbb797a07c9a418.png" mode="widthFix"></image>
|
<image class="recruit-title" src="https://cdn.shuiganying.com/images/2023/07/07/0ff31357e1b3c2237bbb797a07c9a418.png" mode="widthFix"></image>
|
||||||
<view class="recruit">
|
<view class="recruit">
|
||||||
<image class="recruit-back" src="https://cdn.shuiganying.com/images/2023/07/07/a39118138469ebd5ca31eb316ff355aa.png" mode="widthFix"></image>
|
<image class="recruit-back" src="https://cdn.shuiganying.com/images/2023/07/07/a39118138469ebd5ca31eb316ff355aa.png" mode="widthFix"></image>
|
||||||
@@ -10,13 +13,13 @@
|
|||||||
<view class="recruit-label">
|
<view class="recruit-label">
|
||||||
<view class="recruit-title">
|
<view class="recruit-title">
|
||||||
<view class="recruit-name">招募人数</view>
|
<view class="recruit-name">招募人数</view>
|
||||||
<view class="recruit-data">{{recruitData.total}}人</view>
|
<view class="recruit-time">{{recruitData.total}}人</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="recruit-label">
|
<view class="recruit-label">
|
||||||
<view class="recruit-title">
|
<view class="recruit-title">
|
||||||
<view class="recruit-name">招募时间</view>
|
<view class="recruit-name">招募时间</view>
|
||||||
<view class="recruit-data">{{recruitData.start_at}}</view>
|
<view class="recruit-time">{{recruitData.start_at}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="recruit-text">即日起开始报名{{recruitData.total}}人,人满为止</view>
|
<view class="recruit-text">即日起开始报名{{recruitData.total}}人,人满为止</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -49,8 +52,9 @@
|
|||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view class="recruit-btn">
|
<view class="recruit-btn">
|
||||||
<block wx:if="{{recruitData.is_show_button}}">
|
<block wx:if="{{recruitData.is_show_button}}">
|
||||||
<image class="recruit-btn-img {{recruitData.can.status >= 2 ? 'active' : ''}}" src="https://cdn.shuiganying.com/images/2023/07/07/327b691cd8129d8945790fd2e7c34497.png" mode="widthFix"></image>
|
<image class="recruit-btn-img {{recruitData.can.status == 2 || recruitData.can.status == 3 || recruitData.can.status == 4 || recruitData.can.status == 8 || recruitData.can.status == 90 || recruitData.can.status == 91 || recruitData.can.status == 92 ? 'active' : ''}}" src="https://cdn.shuiganying.com/images/2023/07/07/327b691cd8129d8945790fd2e7c34497.png" mode="widthFix"></image>
|
||||||
<view class="recruit-btn-text" wx:if="{{recruitData.can.status >= 2 ? 'active' : ''}}">{{recruitData.can.text}}</view>
|
<!-- 0可以申请 1需要面检测 2待审核 3驳回 4待发货 5签收-查看物流 6打卡 7第二次面 8 完成 90 未开始 91已结束 92活动关闭 -->
|
||||||
|
<view class="recruit-btn-text" wx:if="{{recruitData.can.status == 2 || recruitData.can.status == 3 || recruitData.can.status == 4 || recruitData.can.status == 8 || recruitData.can.status == 90 || recruitData.can.status == 91 || recruitData.can.status == 92 ? 'active' : ''}}">{{recruitData.can.text}}</view>
|
||||||
<view class="recruit-btn-text" bindtap="applyGo" wx:else>{{recruitData.can.text}}</view>
|
<view class="recruit-btn-text" bindtap="applyGo" wx:else>{{recruitData.can.text}}</view>
|
||||||
</block>
|
</block>
|
||||||
<block wx:else>
|
<block wx:else>
|
||||||
@@ -69,3 +73,146 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</block>
|
||||||
|
<!-- 参与流程 end -->
|
||||||
|
|
||||||
|
<image class="backImg" src="https://cdn.shuiganying.com/images/2023/07/11/e1dce03b6a99b3a437ae39c9e0139264.png" mode="widthFix"></image>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 打卡 start -->
|
||||||
|
<block wx:if="{{type == 'clockIn'}}">
|
||||||
|
<image class="clockImg" src="https://cdn.shuiganying.com/images/2023/07/10/5637f19fb58750b06b1f07de3777318c.png" mode="widthFix"></image>
|
||||||
|
<view class="clockIn">
|
||||||
|
<view class="recruit-padding">
|
||||||
|
<!-- 日历 -->
|
||||||
|
<view class="recruit-block">
|
||||||
|
<view class="clockIn-border recruit-border">
|
||||||
|
<view class="clockInTitle">
|
||||||
|
<view class="clockInTitle-user">Hi!张张</view>
|
||||||
|
<view class="clockInTitle-text">今天是你打卡的第<view class="clockInTitle-day"><text>{{signDayNumber}}</text></view>天</view>
|
||||||
|
</view>
|
||||||
|
<view class="clockInDate">
|
||||||
|
<image class="clockInDate-img" src="https://cdn.shuiganying.com/images/2023/07/10/af0716c8c3f5f54cf3be7e9e683a0e79.png" mode="widthFix"></image>
|
||||||
|
<view class="date">
|
||||||
|
<view class="arrow-left" bindtap="couponNumber" data-type="remove"><image src="https://cdn.shuiganying.com/images/2023/07/10/49c72011750133f3eafd6be98d2b58e8.png" mode="widthFix"></image></view>
|
||||||
|
<view class="arrow-moon">{{selectMonth}}</view>
|
||||||
|
<view class="arrow-left arrow-right" bindtap="couponNumber" data-type="plus"><image src="https://cdn.shuiganying.com/images/2023/07/10/49c72011750133f3eafd6be98d2b58e8.png" mode="widthFix"></image></view>
|
||||||
|
</view>
|
||||||
|
<view class="list">
|
||||||
|
<view class="week">
|
||||||
|
<view class="week-label">
|
||||||
|
日
|
||||||
|
</view>
|
||||||
|
<view class="week-label">
|
||||||
|
一
|
||||||
|
</view>
|
||||||
|
<view class="week-label">
|
||||||
|
二
|
||||||
|
</view>
|
||||||
|
<view class="week-label">
|
||||||
|
三
|
||||||
|
</view>
|
||||||
|
<view class="week-label">
|
||||||
|
四
|
||||||
|
</view>
|
||||||
|
<view class="week-label">
|
||||||
|
五
|
||||||
|
</view>
|
||||||
|
<view class="week-label">
|
||||||
|
六
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="day">
|
||||||
|
<view class="day-label" wx:for="{{calendarData}}" wx:key="calendar">
|
||||||
|
<block wx:if="{{item.isToday}}"><view class="label-block current">{{item.day}}</view></block>
|
||||||
|
<block wx:else>
|
||||||
|
<view class="label-block {{item.isDisabled ? 'active' : ''}}" wx:if="{{!item.isSign}}">{{item.day}}</view>
|
||||||
|
<image class="label-success" wx:else src="https://cdn.shuiganying.com/images/2023/07/12/e0609d68a04be6b3c0d2b4c8b41e7a9a.png" mode="widthFix"></image>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="total">
|
||||||
|
<view class="total-left">
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 对比 -->
|
||||||
|
<view class="ratio">
|
||||||
|
<view class="ratio-title"><image src="https://cdn.shuiganying.com/images/2023/07/11/ba562256d9a11e2881c9d4627e5f083c.png" mode="widthFix"></image></view>
|
||||||
|
<view class="recruit-block">
|
||||||
|
<view class="clockIn-border recruit-border">
|
||||||
|
<view class="recruit-photo">
|
||||||
|
<view class="recruit-photo-img"><image src="https://cdn.shuiganying.com/images/2023/05/17/8c3c9abc0e3bc265195c52372ec82723.png" mode="scaleToFill"></image></view>
|
||||||
|
<view class="recruit-photo-text">VS</view>
|
||||||
|
<view class="recruit-photo-img"><image src="https://cdn.shuiganying.com/images/2023/05/17/cf1bafbc092493f8c2b6d2e2a8ab2607.png" mode="scaleToFill"></image></view>
|
||||||
|
</view>
|
||||||
|
<view class="recruit-data">
|
||||||
|
<view class="recruit-list">
|
||||||
|
<view class="recruit-list-name">衰老度分析</view>
|
||||||
|
<view class="recruit-list-item">
|
||||||
|
<view class="recruit-list-label">抬头纹:10处</view>
|
||||||
|
<view class="recruit-list-label">抬头纹:10处<image src="/static/icons/drop.png" mode="widthFix"></image></view>
|
||||||
|
</view>
|
||||||
|
<view class="recruit-list-item">
|
||||||
|
<view class="recruit-list-label">鱼尾纹:8处</view>
|
||||||
|
<view class="recruit-list-label">鱼尾纹:2处<image src="/static/icons/flat.png" mode="widthFix"></image></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="recruit-list">
|
||||||
|
<view class="recruit-list-name">衰老度分析</view>
|
||||||
|
<view class="recruit-list-item">
|
||||||
|
<view class="recruit-list-label">抬头纹:10处</view>
|
||||||
|
<view class="recruit-list-label">抬头纹:10处<image src="/static/icons/drop.png" mode="widthFix"></image></view>
|
||||||
|
</view>
|
||||||
|
<view class="recruit-list-item">
|
||||||
|
<view class="recruit-list-label">鱼尾纹:8处</view>
|
||||||
|
<view class="recruit-list-label">鱼尾纹:2处<image src="/static/icons/flat.png" mode="widthFix"></image></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 按钮 -->
|
||||||
|
<view class="clockIn-tool">
|
||||||
|
<view 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 hover-class="none" url="/pages/recruit/writeList/writeList" class="clockIn-btn">
|
||||||
|
<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>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- 临时 -->
|
||||||
|
<!-- <view bindtap="followCode">关注公众安号</view> -->
|
||||||
|
|
||||||
|
<!-- 底部 -->
|
||||||
|
<view class="recruit-bottom">
|
||||||
|
<image class="recruit-bottom-img" src="https://cdn.shuiganying.com/images/2023/07/07/99bbdab2c12d05bb267fb43886f6a5b6.png" mode="widthFix"></image>
|
||||||
|
<view class="recruit-bottom-text">水感应·好“雾”星球</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<!-- 打卡 end -->
|
||||||
|
|
||||||
|
<!-- 公众号弹出 -->
|
||||||
|
<view class="followPop {{followState ? 'active' : ''}}"></view>
|
||||||
|
<view class="followCont {{followState ? 'active' : ''}}">
|
||||||
|
<view class="followText">
|
||||||
|
<view class="weChat-title">关注公众号</view>
|
||||||
|
<image class="weChat-close" src="/static/icons/uricacidClose.png" bindtap="followHide"></image>
|
||||||
|
<image class="weChat-img" src="/static/imgs/weChat_code.jpg" mode="widthFix"></image>
|
||||||
|
<view class="weChat-text">截图扫码,关注公众号</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recruit {
|
.recruit,
|
||||||
|
.clockIn {
|
||||||
margin: 10rpx 0;
|
margin: 10rpx 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
z-index: 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recruit-back {
|
.recruit-back {
|
||||||
@@ -203,3 +205,409 @@
|
|||||||
width: 38rpx;
|
width: 38rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
/* 打卡 */
|
||||||
|
.clockImg {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-tool {
|
||||||
|
display: flex;
|
||||||
|
margin: 80rpx -20rpx 40rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-btn {
|
||||||
|
flex: 2;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
margin: 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-btn-img,
|
||||||
|
.clockIn-btn-text {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-btn-text {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
text-shadow: 4rpx 4rpx 4rpx rgba(0, 0, 0, .3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 公众号关注 */
|
||||||
|
.followPop {
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 99;
|
||||||
|
background-color: rgba(0, 0, 0, .4);
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.followPop.active{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.followCont {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 100;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.followCont.active{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.followText {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
width: 500rpx;
|
||||||
|
margin-left: -250rpx;
|
||||||
|
margin-top: -260rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.followText.active {
|
||||||
|
width: 300px;
|
||||||
|
height: 250rpx;
|
||||||
|
margin-top: -130rpx;
|
||||||
|
margin-left: -150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.weChat-close {
|
||||||
|
position: absolute;
|
||||||
|
right: 30rpx;
|
||||||
|
top: 25rpx;
|
||||||
|
width: 38rpx;
|
||||||
|
height: 38rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weChat-img {
|
||||||
|
width: 60%;
|
||||||
|
margin: 30rpx auto 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weChat-title {
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
border-bottom: 2rpx dashed rgb(236, 236, 236);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weChat-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #9d9d9d;
|
||||||
|
line-height: 60rpx;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockInTitle {
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockInTitle-user {
|
||||||
|
font-size: 36rpx;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockInTitle-text {
|
||||||
|
font-size: 26rpx;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockInTitle-day {
|
||||||
|
position: relative;
|
||||||
|
padding: 0 15rpx;
|
||||||
|
margin: 0 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockInTitle-day text {
|
||||||
|
font-size: 44rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: -20rpx;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 600;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockInTitle-day::after {
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 16rpx;
|
||||||
|
background-color: #87b2f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockInDate {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockInDate-img {
|
||||||
|
position: absolute;
|
||||||
|
top: -128rpx;
|
||||||
|
right: 0;
|
||||||
|
width: 140rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow-left {
|
||||||
|
width: calc(50% - 100rpx);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow-left image {
|
||||||
|
width: 26rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow-left image {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow-right image {
|
||||||
|
transform: rotate(-360deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow-moon {
|
||||||
|
width: 200rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-top: 2rpx solid #d6d6d6;
|
||||||
|
border-bottom: 2rpx solid #d6d6d6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.week {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.week-label {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
width: 14.28%;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total {
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-border {
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total-left {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total-left-text text {
|
||||||
|
color: #ff9000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total-btn {
|
||||||
|
background-color: #5390f4;
|
||||||
|
color: #ffffff;
|
||||||
|
border-radius: 80rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total-btn.active {
|
||||||
|
background-color: #b3b3b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 报告对比 */
|
||||||
|
.backImg {
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 0;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ratio-title {
|
||||||
|
margin: 80rpx 0 30rpx;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ratio-title image {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-photo {
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx 60rpx 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-photo-img {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 140rpx;
|
||||||
|
height: 140rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-photo-img image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-photo-text {
|
||||||
|
width: calc(100% - 280rpx);
|
||||||
|
text-align: center;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 56rpx;
|
||||||
|
line-height: 140rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-data {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0 40rpx 30rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-data::after {
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 50rpx;
|
||||||
|
background-image: linear-gradient(to top, transparent, #ebf3ff);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-list {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-list-name {
|
||||||
|
color: #508df4;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 34rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-list-item {
|
||||||
|
box-sizing: border-box;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-list-label {
|
||||||
|
width: 50%;
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
position: relative;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-list-label::after {
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
left: 0;
|
||||||
|
top: calc(50% - 4rpx);
|
||||||
|
width: 8rpx;
|
||||||
|
height: 8rpx;
|
||||||
|
background-color: #999999;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-list-label:last-child {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-list-label image {
|
||||||
|
width: 28rpx;
|
||||||
|
vertical-align: -4rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.day {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.day-label {
|
||||||
|
width: 14.28%;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-block {
|
||||||
|
background-color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-block.active {
|
||||||
|
color: #c4c4c4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-block.current {
|
||||||
|
color: #5893f4;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-block.current::after {
|
||||||
|
border: 2rpx solid #5893f4;
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
left: calc(50% - 24rpx);
|
||||||
|
top: calc(50% - 26rpx);
|
||||||
|
width: 52rpx;
|
||||||
|
height: 52rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-success {
|
||||||
|
width: 52rpx;
|
||||||
|
vertical-align: -16rpx;
|
||||||
|
}
|
||||||
@@ -48,7 +48,9 @@ Page({
|
|||||||
* 申请前置接口
|
* 申请前置接口
|
||||||
*/
|
*/
|
||||||
recruitInfo(id) {
|
recruitInfo(id) {
|
||||||
wx.$api.recruit.Enroll(id).then(res => {
|
wx.$api.recruit.Enroll(id, {
|
||||||
|
experience_area_id: getApp().globalData.experienceAreaId
|
||||||
|
}).then(res => {
|
||||||
let areas = [
|
let areas = [
|
||||||
{
|
{
|
||||||
city: "请选择城市",
|
city: "请选择城市",
|
||||||
@@ -146,7 +148,8 @@ Page({
|
|||||||
// district_id : this.data.regiId,
|
// district_id : this.data.regiId,
|
||||||
experience_id : this.data.experienceId,
|
experience_id : this.data.experienceId,
|
||||||
experience_area_id : this.data.cityArr[this.data.cityIndex].experience_area_id,
|
experience_area_id : this.data.cityArr[this.data.cityIndex].experience_area_id,
|
||||||
experience_type_id : this.data.typesArr[this.data.typesIndex].experience_type_id
|
experience_type_id : this.data.typesArr[this.data.typesIndex].experience_type_id,
|
||||||
|
invite : getApp().globalData.inviteText
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
disabled: true
|
disabled: true
|
||||||
|
|||||||
143
pages/recruit/signWrite/signWrite.js
Normal file
143
pages/recruit/signWrite/signWrite.js
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
/*
|
||||||
|
* 手太欠
|
||||||
|
* 愿这世界都如故事里一样 美好而动人~
|
||||||
|
*/
|
||||||
|
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
albumArr : [], //商品轮播图
|
||||||
|
experienceId : '', //活动id
|
||||||
|
signDayNumber: '', //累计打卡天数-携带
|
||||||
|
etciData : '', //打卡心得
|
||||||
|
bidData : '', //产品建议
|
||||||
|
refertoStatus: false,//打卡成功弹出
|
||||||
|
signDayNumber: '', //累计打卡天数-最新
|
||||||
|
signWaterNumber: ' '//累计打卡水滴
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
// 个人使用喷雾主要还是以清洁、舒爽为目的,洗脸之后喷上一层喷雾,稍微呆上30s,心理上的幸福感高于它的功能,如果想要利用喷雾来明显改善皮肤状态,要持续使用
|
||||||
|
// 保湿喷雾最基本的就是一定要安全、健康,通常保湿喷雾会在国家药监局有备案。若是不确定是否成分安全健康,大家可以登录国家药监局官网查询备案。
|
||||||
|
|
||||||
|
onLoad(options) {
|
||||||
|
this.setData({
|
||||||
|
experienceId : options.experienceId,
|
||||||
|
signDayNumber: Number(options.signDayNumber) + 1
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传商品封面图片
|
||||||
|
*/
|
||||||
|
addAlbum(){
|
||||||
|
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=>{
|
||||||
|
let albumArr = this.data.albumArr
|
||||||
|
albumArr.push({
|
||||||
|
path: res.path,
|
||||||
|
showpath: res.url
|
||||||
|
})
|
||||||
|
this.setData({
|
||||||
|
albumArr
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
if (i == pathArr.length - 1) {
|
||||||
|
wx.hideLoading()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
wx.showToast({
|
||||||
|
title: '上传图片失败',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品封面图片
|
||||||
|
*/
|
||||||
|
removeAlbum(e){
|
||||||
|
wx.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
})
|
||||||
|
let index = e.currentTarget.dataset.index,
|
||||||
|
atalbum = this.data.albumArr
|
||||||
|
|
||||||
|
wx.showToast({
|
||||||
|
title: '删除成功',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
atalbum.splice(index,1)
|
||||||
|
this.setData({
|
||||||
|
albumArr : atalbum
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心得
|
||||||
|
*/
|
||||||
|
etcinput(e) {
|
||||||
|
this.setData({
|
||||||
|
etciData: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品建议
|
||||||
|
*/
|
||||||
|
bidinput(e) {
|
||||||
|
this.setData({
|
||||||
|
bidData: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签到提交
|
||||||
|
*/
|
||||||
|
tapSign() {
|
||||||
|
let newPictures = []
|
||||||
|
for (let pictures of this.data.albumArr){
|
||||||
|
newPictures.push(pictures.path)
|
||||||
|
}
|
||||||
|
|
||||||
|
wx.$api.recruit.signLabor({
|
||||||
|
experience_id : this.data.experienceId,
|
||||||
|
describe : this.data.etciData,
|
||||||
|
images : newPictures,
|
||||||
|
suggest : this.data.bidData
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.setData({
|
||||||
|
refertoStatus: true,
|
||||||
|
signDayNumber: res.data.signDayNumber,
|
||||||
|
signWaterNumber: res.data.signWaterNumber
|
||||||
|
})
|
||||||
|
}).catch(err => {})
|
||||||
|
},
|
||||||
|
})
|
||||||
4
pages/recruit/signWrite/signWrite.json
Normal file
4
pages/recruit/signWrite/signWrite.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTitleText": "体验官签到"
|
||||||
|
}
|
||||||
67
pages/recruit/signWrite/signWrite.wxml
Normal file
67
pages/recruit/signWrite/signWrite.wxml
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<image class="recruit-title" src="https://cdn.shuiganying.com/images/2023/07/12/5b93be40823821b0a4ab41d5b7b387ac.png" mode="widthFix"></image>
|
||||||
|
<view class="recruit">
|
||||||
|
<view class="recruit-cont">
|
||||||
|
<view class="recruit-padding">
|
||||||
|
<view class="recruit-block">
|
||||||
|
<view class="recruit-border">
|
||||||
|
<view class="frame">
|
||||||
|
<view class="frame-write">
|
||||||
|
<view class="frame-write-name">#使用心得##第{{signDayNumber}}天#</view>
|
||||||
|
<textarea class="frame-write-text" cols="30" rows="10" placeholder="请输入您对本产品的体验感受~" placeholder-style="color: #cde0ff; font-size: 26rpx" bindinput="etcinput"></textarea>
|
||||||
|
</view>
|
||||||
|
<view class="album-list">
|
||||||
|
<view class="album-list-li" wx:for="{{albumArr}}" wx:key="album" wx:for-index="removeIndex">
|
||||||
|
<image class="album-list-img" src="{{item.showpath}}" mode="aspectFill"></image>
|
||||||
|
<view class="album-remove" catchtap="removeAlbum" data-id="{{item.id}}" data-index="{{removeIndex}}">删除
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="album-list-li">
|
||||||
|
<view class="album-list-li-add" bindtap="addAlbum">
|
||||||
|
<image class="album-list-add-icon" src="/static/icons/circle_add.png"></image>
|
||||||
|
<view>上传图片</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="frame-write" style="margin-top: 50rpx;" wx:if="{{signDayNumber == 10}}">
|
||||||
|
<view class="frame-write-name">#产品建议#</view>
|
||||||
|
<textarea class="frame-write-text" placeholder="请输入您对本产品的建议~" placeholder-style="color: #cde0ff; font-size: 26rpx" bindinput="bidinput"></textarea>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 按钮 -->
|
||||||
|
<view class="clockIn-tool">
|
||||||
|
<view 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>
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 底部 -->
|
||||||
|
<view class="recruit-bottom">
|
||||||
|
<image class="recruit-bottom-img" src="https://cdn.shuiganying.com/images/2023/07/07/99bbdab2c12d05bb267fb43886f6a5b6.png" mode="widthFix"></image>
|
||||||
|
<view class="recruit-bottom-text">水感应·好“雾”星球</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 弹出 -->
|
||||||
|
<view class="refertoEject {{refertoStatus ? 'active' : ''}}" catchtouchmove='true'></view>
|
||||||
|
<view class="refertoCont {{refertoStatus ? 'active' : ''}}" catchtouchmove='true'>
|
||||||
|
<image class="refertoCont-img" src="https://cdn.shuiganying.com/images/2023/07/12/66bac7dc880489ef662a3869255356c5.png" mode="widthFix"></image>
|
||||||
|
<view class="refertoCont-text">
|
||||||
|
<view class="refertoCont-title">已累计打卡<text>{{signDayNumber}}</text>天</view>
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
236
pages/recruit/signWrite/signWrite.wxss
Normal file
236
pages/recruit/signWrite/signWrite.wxss
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
.recruit-title {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-padding {
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-block {
|
||||||
|
background-color: #5390f4;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-border {
|
||||||
|
border: 4rpx solid #000000;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
padding: 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-white {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
padding: 5rpx 35rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-tool {
|
||||||
|
display: flex;
|
||||||
|
margin: 80rpx -20rpx 40rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-btn {
|
||||||
|
flex: 2;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
margin: 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-btn-img,
|
||||||
|
.clockIn-btn-text {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-btn-text {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
text-shadow: 4rpx 4rpx 4rpx rgba(0, 0, 0, .3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.recruit-bottom {
|
||||||
|
position: relative;
|
||||||
|
height: 180rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-bottom-img {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-bottom-text {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 9;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.frame {
|
||||||
|
border-top: 4rpx dotted #ffffff;
|
||||||
|
border-bottom: 4rpx dotted #ffffff;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片上传 */
|
||||||
|
|
||||||
|
.album-list{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap:wrap;
|
||||||
|
margin: 30rpx -10rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-list-li{
|
||||||
|
position: relative;
|
||||||
|
width: 30%;
|
||||||
|
padding-top: 30%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-list-img,
|
||||||
|
.album-list-li-add{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #a1c5ff;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-list-li-add{
|
||||||
|
text-align: center;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-list-add-icon{
|
||||||
|
width: 78rpx;
|
||||||
|
height: 78rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-remove{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, .5);
|
||||||
|
color: white;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 50rpx;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.frame-write-name {
|
||||||
|
color: #ffcb5c;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.frame-write-text {
|
||||||
|
color: #cde0ff;
|
||||||
|
line-height: 44rpx;
|
||||||
|
max-height: 120rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 弹出 */
|
||||||
|
/* 弹出 */
|
||||||
|
.refertoEject {
|
||||||
|
position: fixed;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
background-color: rgba(0, 0, 0, .6);
|
||||||
|
z-index: 10000;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refertoEject.active {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refertoCont {
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 100000;
|
||||||
|
padding: 0 15%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refertoCont.active {
|
||||||
|
display: -webkit-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refertoCont-text {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 0 0 20rpx 20rpx;
|
||||||
|
padding: 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refertoCont-img {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refertoCont-tips {
|
||||||
|
margin: 30rpx 0;
|
||||||
|
color: #4284fd;
|
||||||
|
line-height: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refertoCont-icon {
|
||||||
|
width: 50rpx;
|
||||||
|
vertical-align: -10rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refertoCont-tips text {
|
||||||
|
font-size: 44rpx;
|
||||||
|
padding-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refertoCont-btn {
|
||||||
|
background-color: #4284fd;
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 90rpx;
|
||||||
|
border-radius: 80rpx;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 60rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
70
pages/recruit/writeList/writeList.js
Normal file
70
pages/recruit/writeList/writeList.js
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* 手太欠
|
||||||
|
* 愿这世界都如故事里一样 美好而动人~
|
||||||
|
*/
|
||||||
|
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
listsArr : [], // 订单列表
|
||||||
|
page : {}, // 分页信息
|
||||||
|
lodingStats : false,// 加载状态
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
onShow() {
|
||||||
|
// 获取订单列表
|
||||||
|
this.listInfo()
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单列表
|
||||||
|
*/
|
||||||
|
listInfo(page) {
|
||||||
|
wx.$api.recruit.signList({page : page || 1}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
3
pages/recruit/writeList/writeList.json
Normal file
3
pages/recruit/writeList/writeList.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
59
pages/recruit/writeList/writeList.wxml
Normal file
59
pages/recruit/writeList/writeList.wxml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<block wx:if="{{listsArr.length > 0}}">
|
||||||
|
<image class="recruit-title" src="https://cdn.shuiganying.com/images/2023/07/12/5b93be40823821b0a4ab41d5b7b387ac.png" mode="widthFix"></image>
|
||||||
|
<view class="recruit">
|
||||||
|
<view class="recruit-cont">
|
||||||
|
<view class="recruit-padding">
|
||||||
|
<view class="recruit-block" wx:for="{{listsArr}}" wx:key="listArr">
|
||||||
|
<view class="recruit-border">
|
||||||
|
<view class="frame">
|
||||||
|
<view class="frame-write">
|
||||||
|
<view class="frame-write-name">#使用心得##第{{item.day_number}}天#</view>
|
||||||
|
<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">
|
||||||
|
<image class="album-list-img" src="{{items}}" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="frame-write" wx:if="{{item.suggest}}" style="margin-top: 40rpx;">
|
||||||
|
<view class="frame-write-name">#产品建议#</view>
|
||||||
|
<view class="frame-write-text">{{item.suggest}}</view>
|
||||||
|
</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 class="clockIn-tool">
|
||||||
|
<navigator hover-class="none" open-type="switchTab" url="/pages/recruit/index" 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>
|
||||||
|
</navigator>
|
||||||
|
<navigator hover-class="none" open-type="switchTab" url="/pages/report/index" 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>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 底部 -->
|
||||||
|
<view class="recruit-bottom">
|
||||||
|
<image class="recruit-bottom-img" src="https://cdn.shuiganying.com/images/2023/07/07/99bbdab2c12d05bb267fb43886f6a5b6.png" mode="widthFix"></image>
|
||||||
|
<view class="recruit-bottom-text">水感应·好“雾”星球</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<view class="pack-center pages-hint" wx:else>
|
||||||
|
<image src="/static/imgs/text_null.png"></image>
|
||||||
|
<view>暂无数据</view>
|
||||||
|
</view>
|
||||||
159
pages/recruit/writeList/writeList.wxss
Normal file
159
pages/recruit/writeList/writeList.wxss
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
.recruit-title {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-padding {
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-block {
|
||||||
|
background-color: #5390f4;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-border {
|
||||||
|
border: 4rpx solid #000000;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
padding: 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-white {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
padding: 5rpx 35rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-tool {
|
||||||
|
display: flex;
|
||||||
|
margin: 80rpx -20rpx 40rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-btn {
|
||||||
|
flex: 2;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
margin: 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-btn-img,
|
||||||
|
.clockIn-btn-text {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockIn-btn-text {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
text-shadow: 4rpx 4rpx 4rpx rgba(0, 0, 0, .3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.recruit-bottom {
|
||||||
|
position: relative;
|
||||||
|
height: 180rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-bottom-img {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recruit-bottom-text {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 9;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.frame {
|
||||||
|
border-top: 4rpx dotted #ffffff;
|
||||||
|
border-bottom: 4rpx dotted #ffffff;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片上传 */
|
||||||
|
|
||||||
|
.album-list{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap:wrap;
|
||||||
|
margin: 20rpx -10rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-list-li{
|
||||||
|
position: relative;
|
||||||
|
width: 30%;
|
||||||
|
padding-top: 30%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-list-img,
|
||||||
|
.album-list-li-add{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #a1c5ff;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-list-li-add{
|
||||||
|
text-align: center;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-list-add-icon{
|
||||||
|
width: 78rpx;
|
||||||
|
height: 78rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album-remove{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, .5);
|
||||||
|
color: white;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 50rpx;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.frame-write-name {
|
||||||
|
color: #ffcb5c;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.frame-write-text {
|
||||||
|
color: #cde0ff;
|
||||||
|
line-height: 48rpx;
|
||||||
|
}
|
||||||
@@ -10,33 +10,19 @@ Page({
|
|||||||
page : {}, // 分页信息
|
page : {}, // 分页信息
|
||||||
lodingStats : false, // 加载状态
|
lodingStats : false, // 加载状态
|
||||||
disabled : false, // 支付按钮
|
disabled : false, // 支付按钮
|
||||||
payCode : '', // code获取openid
|
|
||||||
openId : '', // openid
|
|
||||||
payStatus : false, // 支付弹框
|
payStatus : false, // 支付弹框
|
||||||
catchtouchmove: false
|
catchtouchmove: false
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {},
|
||||||
},
|
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
wx.login({
|
|
||||||
success: res => {
|
|
||||||
this.setData({
|
|
||||||
payCode: res.code
|
|
||||||
})
|
|
||||||
// 获取openid
|
|
||||||
this.openInfo()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// 获取登录状态
|
// 获取登录状态
|
||||||
if(wx.getStorageSync("token") != ''){
|
if(wx.getStorageSync("token") != ''){
|
||||||
this.setData({
|
this.setData({
|
||||||
userLogin: true,
|
userLogin: true,
|
||||||
disabled : false
|
disabled : false
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取检测结果列表
|
// 获取检测结果列表
|
||||||
this.aiInfo();
|
this.aiInfo();
|
||||||
} else {
|
} else {
|
||||||
@@ -66,24 +52,13 @@ Page({
|
|||||||
}).catch(err => { })
|
}).catch(err => { })
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* openid
|
|
||||||
*/
|
|
||||||
openInfo() {
|
|
||||||
wx.$api.auth.codeOpenid({code: this.data.payCode}).then(res => {
|
|
||||||
this.setData({
|
|
||||||
openId: res.data
|
|
||||||
})
|
|
||||||
}).catch(err => {})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理未登录时的转跳
|
* 处理未登录时的转跳
|
||||||
*/
|
*/
|
||||||
assessGo(){
|
assessGo(){
|
||||||
if(wx.getStorageSync("token") != ''){
|
if(wx.getStorageSync("token") != ''){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/index/assess/assess?code=' + this.data.openId
|
url: '/pages/index/assess/assess?code=' + wx.getStorageSync("openid")
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
// 去登录
|
// 去登录
|
||||||
|
|||||||
@@ -10,14 +10,14 @@
|
|||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"name": "",
|
"name": "",
|
||||||
"pathName": "pages/report/detail/detail",
|
"pathName": "pages/recruit/index",
|
||||||
"query": "",
|
"query": "",
|
||||||
"launchMode": "default",
|
"launchMode": "default",
|
||||||
"scene": null
|
"scene": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "",
|
"name": "",
|
||||||
"pathName": "pages/report/index",
|
"pathName": "pages/recruit/signWrite/signWrite",
|
||||||
"query": "",
|
"query": "",
|
||||||
"launchMode": "default",
|
"launchMode": "default",
|
||||||
"scene": null
|
"scene": null
|
||||||
|
|||||||
BIN
static/icons/circle_add.png
Normal file
BIN
static/icons/circle_add.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
static/icons/drop.png
Normal file
BIN
static/icons/drop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/icons/flat.png
Normal file
BIN
static/icons/flat.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/icons/uricacidClose.png
Normal file
BIN
static/icons/uricacidClose.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 449 B |
BIN
static/imgs/weChat_code.jpg
Normal file
BIN
static/imgs/weChat_code.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
Reference in New Issue
Block a user