[新增体验官]
This commit is contained in:
@@ -21,6 +21,9 @@ import mall from "./interfaces/mall"
|
||||
// 订单
|
||||
import order from "./interfaces/order"
|
||||
|
||||
// 体验官
|
||||
import recruit from "./interfaces/recruit"
|
||||
|
||||
// 地址管理
|
||||
import site from "./interfaces/site"
|
||||
|
||||
@@ -34,6 +37,7 @@ export default {
|
||||
index,
|
||||
mall,
|
||||
order,
|
||||
recruit,
|
||||
site,
|
||||
user
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
import { req, upload } from "../request"
|
||||
|
||||
|
||||
// 是否可以检测
|
||||
const analyze = () => req({
|
||||
url: "ai/skin/analyze"
|
||||
|
||||
30
api/interfaces/recruit.js
Normal file
30
api/interfaces/recruit.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
import { req } from "../request"
|
||||
|
||||
// 体验官首页
|
||||
const index = data => req({
|
||||
url : "experiences",
|
||||
data: data
|
||||
})
|
||||
|
||||
// 申请前置接口
|
||||
const Enroll = (experience_id) => req({
|
||||
url : "experiences/enroll/" + experience_id
|
||||
})
|
||||
|
||||
// 申请前置接口
|
||||
const recruitAdd = (data) => req({
|
||||
url : "experiences/enroll",
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
|
||||
export default ({
|
||||
index,
|
||||
Enroll,
|
||||
recruitAdd
|
||||
})
|
||||
@@ -11,8 +11,8 @@ import {updToken} from './updateToken'
|
||||
// https://shuitest.shuiganying.com/api //测试地址
|
||||
// wx6bd4fcc040bfa025 正式appid
|
||||
// wx3056ec23196eaf02 测试appid
|
||||
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"
|
||||
}
|
||||
@@ -48,6 +48,7 @@ const req = (obj, noToken) => {
|
||||
obj.header.Authorization = ''
|
||||
}
|
||||
wx.request({
|
||||
timeout: '13000',
|
||||
url : api + obj.url,
|
||||
header : obj.header || {},
|
||||
method : obj.method || 'GET',
|
||||
@@ -71,7 +72,7 @@ const req = (obj, noToken) => {
|
||||
},
|
||||
fail: err => {
|
||||
wx.showToast({
|
||||
title : err.errMsg,
|
||||
title : (err.errMsg).indexOf('108') > 0 ? "网络错误,请检查您的网络环境" : err.errMsg,
|
||||
icon : "none"
|
||||
})
|
||||
reject(err)
|
||||
|
||||
3
app.js
3
app.js
@@ -52,6 +52,7 @@ App({
|
||||
isUser : false,
|
||||
userInfo : null,
|
||||
barHeight: '',
|
||||
inviteText: '' // 邀请好友临时存储
|
||||
inviteText: '', // 邀请好友临时存储
|
||||
isExperience: '' // 体验官身份
|
||||
}
|
||||
})
|
||||
10
app.json
10
app.json
@@ -29,7 +29,9 @@
|
||||
"pages/login/personal/personal",
|
||||
"pages/login/agreement/agreement",
|
||||
"pages/mall/webView/webView",
|
||||
"pages/order/logistic/logistic"
|
||||
"pages/order/logistic/logistic",
|
||||
"pages/recruit/index",
|
||||
"pages/recruit/referto/referto"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
@@ -51,6 +53,12 @@
|
||||
"iconPath": "/static/tabBarIcon/tabBar_01.png",
|
||||
"selectedIconPath": "/static/tabBarIcon/tabBar_selected_01.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/recruit/index",
|
||||
"text": "体验官",
|
||||
"iconPath": "/static/tabBarIcon/tabBar_04.png",
|
||||
"selectedIconPath": "/static/tabBarIcon/tabBar_selected_04.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/report/index",
|
||||
"text": "报告",
|
||||
|
||||
@@ -14,9 +14,14 @@ Page({
|
||||
disabled : false, // 支付按钮
|
||||
payStatus : false, // 支付弹框
|
||||
payPrice : '', // 支付金额
|
||||
refertoType: 0,
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
// 体验官 type=1或者type=2 直接面检,不用交钱
|
||||
this.setData({
|
||||
refertoType: options.type
|
||||
})
|
||||
this.setData({
|
||||
openId: options.code
|
||||
})
|
||||
@@ -31,6 +36,13 @@ Page({
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if(this.data.refertoType == '1' || this.data.refertoType == '2') {
|
||||
this.setData({
|
||||
testTitle: '请您开始测肤'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 判断是否可检测
|
||||
this.ifAnalyze();
|
||||
},
|
||||
@@ -144,14 +156,13 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 皮肤检测接口
|
||||
*/
|
||||
checkEnter(img) {
|
||||
wx.$api.index.skinEnter({}, img).then(res => {
|
||||
wx.$api.index.skinEnter({type: this.data.refertoType}, img).then(res => {
|
||||
wx.redirectTo({
|
||||
url: "/pages/report/detail/detail?image_id=" + res.image_id
|
||||
url: "/pages/report/detail/detail?image_id=" + res.image_id + "&type=" + this.data.refertoType
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
@@ -81,7 +81,8 @@ Page({
|
||||
code : this.data.loginCode,
|
||||
encryptedData : enData,
|
||||
iv : iv,
|
||||
invite : getApp().globalData.inviteText || ''
|
||||
invite : getApp().globalData.inviteText || '',
|
||||
is_experience : getApp().globalData.isExperience
|
||||
}).then(res=>{
|
||||
// 存储登录信息
|
||||
wx.setStorage({
|
||||
|
||||
73
pages/recruit/index.js
Normal file
73
pages/recruit/index.js
Normal file
@@ -0,0 +1,73 @@
|
||||
// pages/recruit/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
recruitData: ''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(options.invite != undefined) {
|
||||
getApp().globalData.inviteText = options.invite
|
||||
}
|
||||
if(options.is_experience != undefined) {
|
||||
getApp().globalData.isExperience = options.is_experience
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
// 获取体验官首页
|
||||
this.recruitInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 体验官首页
|
||||
*/
|
||||
recruitInfo() {
|
||||
wx.$api.recruit.index().then(res => {
|
||||
this.setData({
|
||||
recruitData: res.data
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 申请
|
||||
*/
|
||||
applyGo() {
|
||||
if(wx.getStorageSync("token") != ''){
|
||||
if(this.data.recruitData.can.status == 0) {
|
||||
wx.navigateTo({
|
||||
url: './referto/referto?id=' + this.data.recruitData.experience_id
|
||||
})
|
||||
} else{
|
||||
wx.navigateTo({
|
||||
url: '/pages/index/assess/assess?type=1'
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 去登录
|
||||
wx.navigateTo({
|
||||
url: "/pages/login/index"
|
||||
})
|
||||
},
|
||||
|
||||
rejectGo() {
|
||||
wx.showModal({
|
||||
title: '驳回原因提示',
|
||||
showCancel: false,
|
||||
content: this.data.recruitData.can.remark,
|
||||
success: res => {}
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/recruit/index.json
Normal file
4
pages/recruit/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
71
pages/recruit/index.wxml
Normal file
71
pages/recruit/index.wxml
Normal file
@@ -0,0 +1,71 @@
|
||||
<image class="recruit-title" src="https://cdn.shuiganying.com/images/2023/07/07/0ff31357e1b3c2237bbb797a07c9a418.png" mode="widthFix"></image>
|
||||
<view class="recruit">
|
||||
<image class="recruit-back" src="https://cdn.shuiganying.com/images/2023/07/07/a39118138469ebd5ca31eb316ff355aa.png" mode="widthFix"></image>
|
||||
<view class="recruit-cont">
|
||||
<view class="recruit-padding">
|
||||
<view class="recruit-block">
|
||||
<view class="recruit-border">
|
||||
<image class="recruit-img" src="https://cdn.shuiganying.com/images/2023/07/07/843c66b3a2cfcec3c1aff664029d32a8.png" mode="widthFix"></image>
|
||||
<view class="recruit-white">
|
||||
<view class="recruit-label">
|
||||
<view class="recruit-title">
|
||||
<view class="recruit-name">招募人数</view>
|
||||
<view class="recruit-data">{{recruitData.total}}人</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="recruit-label">
|
||||
<view class="recruit-title">
|
||||
<view class="recruit-name">招募时间</view>
|
||||
<view class="recruit-data">{{recruitData.start_at}}</view>
|
||||
</view>
|
||||
<view class="recruit-text">即日起开始报名{{recruitData.total}}人,人满为止</view>
|
||||
</view>
|
||||
<view class="recruit-label">
|
||||
<view class="recruit-title">
|
||||
<view class="recruit-name">招募时间</view>
|
||||
</view>
|
||||
<view class="recruit-text">剩余名额</view>
|
||||
<view class="recruit-number">
|
||||
<view class="recruit-see" wx:for="{{recruitData.surplus.array}}" wx:key="surplus">
|
||||
<image class="recruit-see-img" src="https://cdn.shuiganying.com/images/2023/07/07/ffd0beb9825b9191c0ed2a17e07d57f4.png" mode="widthFix"></image>
|
||||
<text class="recruit-see-text">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 流程 -->
|
||||
<view class="recruit-flow">
|
||||
<image class="recruit-flow-img" src="https://cdn.shuiganying.com/images/2023/07/07/3f13e7baa0d18da70d40e632572dad84.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="recruit-block">
|
||||
<view class="recruit-border">
|
||||
<image class="recruit-img" src="https://cdn.shuiganying.com/images/2023/07/07/76d648d27c8700798cbb96a81d7f2a52.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<view class="recruit-btn">
|
||||
<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>
|
||||
<view class="recruit-btn-text" wx:if="{{recruitData.can.status >= 2 ? 'active' : ''}}">{{recruitData.can.text}}</view>
|
||||
<view class="recruit-btn-text" bindtap="applyGo" wx:else>{{recruitData.can.text}}</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<image class="recruit-btn-img active" src="https://cdn.shuiganying.com/images/2023/07/07/327b691cd8129d8945790fd2e7c34497.png" mode="widthFix"></image>
|
||||
<view class="recruit-btn-text">暂无申请权限</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="reject-tips" bindtap="rejectGo" wx:if="{{recruitData.can.status == 3}}">查看驳回原因</view>
|
||||
<!-- <image src="/static/icons/rejectIcon.png" mode="widthFix"></image> -->
|
||||
</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>
|
||||
205
pages/recruit/index.wxss
Normal file
205
pages/recruit/index.wxss
Normal file
@@ -0,0 +1,205 @@
|
||||
.recruit-title {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.recruit {
|
||||
margin: 10rpx 0;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.recruit-back {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.recruit-cont {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.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: 40rpx;
|
||||
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;
|
||||
}
|
||||
|
||||
.recruit-white::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: calc(50% - 100rpx);
|
||||
top: -18rpx;
|
||||
background-color: #ffde49;
|
||||
height: 36rpx;
|
||||
width: 200rpx;
|
||||
border-radius: 80rpx;
|
||||
}
|
||||
|
||||
.recruit-label {
|
||||
padding: 5rpx 0 5rpx 30rpx;
|
||||
margin: 40rpx 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.recruit-label::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: #5390f4;
|
||||
border-radius: 50rpx;
|
||||
width: 10rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.recruit-title {
|
||||
display: flex;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.recruit-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.recruit-text {
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.recruit-number {
|
||||
position: absolute;
|
||||
right: -2rpx;
|
||||
top: 5rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.recruit-see {
|
||||
position: relative;
|
||||
width: 70rpx;
|
||||
margin: 0 2rpx;
|
||||
}
|
||||
|
||||
.recruit-see-img,
|
||||
.recruit-see-text {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.recruit-see-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.recruit-see-text {
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
width: 70rpx;
|
||||
line-height: 90rpx;
|
||||
font-weight: 600;
|
||||
font-size: 54rpx;
|
||||
}
|
||||
|
||||
/* 流程 */
|
||||
.recruit-flow {
|
||||
text-align: center;
|
||||
margin: 60rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.recruit-flow-img {
|
||||
width: 55%;
|
||||
}
|
||||
|
||||
.recruit-btn {
|
||||
position: relative;
|
||||
margin: 60rpx 0 30rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.recruit-btn-img,
|
||||
.recruit-btn-text {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.recruit-btn-text {
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.recruit-btn-img.active {
|
||||
-webkit-filter: grayscale(100%);
|
||||
-moz-filter: grayscale(100%);
|
||||
-ms-filter: grayscale(100%);
|
||||
-o-filter: grayscale(100%);
|
||||
filter: grayscale(100%);
|
||||
filter: gray;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.reject-tips {
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #5390f4;
|
||||
}
|
||||
|
||||
/* .reject-tips image {
|
||||
width: 38rpx;
|
||||
display: inline-block;
|
||||
} */
|
||||
176
pages/recruit/referto/referto.js
Normal file
176
pages/recruit/referto/referto.js
Normal file
@@ -0,0 +1,176 @@
|
||||
// pages/recruit/referto/referto.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
experienceId: '',
|
||||
typesArr : [],
|
||||
typesIndex : 0,
|
||||
refertoStatus: false,
|
||||
paySuccess : false, // 兑换成功显示
|
||||
|
||||
// 市级选择
|
||||
cityArr : [],
|
||||
cityId : 0,
|
||||
cityIndex : 0,
|
||||
|
||||
// 区域选择
|
||||
regiArr : [],
|
||||
regiId : 0,
|
||||
regiIndex : 0
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
experienceId: options.id
|
||||
})
|
||||
// 获取申请前置接口
|
||||
this.recruitInfo(options.id);
|
||||
|
||||
this.setData({
|
||||
paySuccess: true
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 申请前置接口
|
||||
*/
|
||||
recruitInfo(id) {
|
||||
wx.$api.recruit.Enroll(id).then(res => {
|
||||
let areas = [
|
||||
{
|
||||
city: "请选择城市",
|
||||
city_id: null,
|
||||
experience_area_id: null,
|
||||
surplus: null
|
||||
}
|
||||
]
|
||||
this.setData({
|
||||
typesArr : [{experience_type_id: null, name: "请选择体验内容"}, ...res.data.types],
|
||||
cityArr : [...areas, ...res.data.areas],
|
||||
})
|
||||
|
||||
// 获取区级列表
|
||||
this.regilist(res.data.areas[this.data.cityIndex].city_id)
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 市级下拉筛选
|
||||
*/
|
||||
cityDrop(e) {
|
||||
let city = this.data.cityArr,
|
||||
index = e.detail.value,
|
||||
citycode = city[index].city_id
|
||||
if (index != this.data.cityIndex) {
|
||||
this.setData({
|
||||
cityIndex : index,
|
||||
cityId : citycode
|
||||
})
|
||||
|
||||
// 获取市级列表
|
||||
this.regilist(citycode)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 区列表
|
||||
*/
|
||||
regilist(areaId) {
|
||||
wx.$api.site.create({
|
||||
parent_id: areaId
|
||||
}).then(res=>{
|
||||
this.setData({
|
||||
regiArr : [{id: null, name: "请选择区域", parent_id: null}, ...res.data],
|
||||
regiId : null,
|
||||
regiIndex : 0
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 区下拉筛选
|
||||
*/
|
||||
regiDrop(e) {
|
||||
let newIndex = e.detail.value
|
||||
this.setData({
|
||||
regiIndex : newIndex,
|
||||
regiId : this.data.regiArr[newIndex].id
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 体验内容筛选
|
||||
*/
|
||||
tasteDrop(e) {
|
||||
let newIndex = e.detail.value
|
||||
this.setData({
|
||||
typesIndex : newIndex
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交表单
|
||||
*/
|
||||
siteform(e) {
|
||||
let value = e.detail.value
|
||||
let errMsg = ''
|
||||
if(this.data.regiId === null) errMsg = "请选择区域"
|
||||
if(this.data.cityId === null || this.data.cityArr[this.data.cityIndex].experience_area_id === null) errMsg = "请选择城市"
|
||||
if(this.data.typesArr[this.data.typesIndex].experience_type_id === null) errMsg = "请选择体验内容"
|
||||
|
||||
if(errMsg != ''){
|
||||
wx.showToast({
|
||||
title: errMsg,
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
let data = {
|
||||
name : value.name,
|
||||
address : value.address,
|
||||
city_id : this.data.cityId,
|
||||
district_id : this.data.regiId,
|
||||
experience_id : this.data.experienceId,
|
||||
experience_area_id : this.data.cityArr[this.data.cityIndex].experience_area_id,
|
||||
experience_type_id : this.data.typesArr[this.data.typesIndex].experience_type_id
|
||||
}
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
wx.$api.recruit.recruitAdd(data).then(res => {
|
||||
this.setData({
|
||||
refertoStatus: true
|
||||
})
|
||||
}).catch(() =>{
|
||||
this.setData({
|
||||
disabled: false
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭弹框,跳转首页
|
||||
*/
|
||||
refertoTap() {
|
||||
this.setData({
|
||||
refertoStatus: false
|
||||
})
|
||||
wx.switchTab({
|
||||
url: '/pages/recruit/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/recruit/referto/referto.json
Normal file
4
pages/recruit/referto/referto.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "申请体验馆"
|
||||
}
|
||||
67
pages/recruit/referto/referto.wxml
Normal file
67
pages/recruit/referto/referto.wxml
Normal file
@@ -0,0 +1,67 @@
|
||||
<image class="referto-img" src="https://cdn.shuiganying.com/images/2023/07/07/80b66f6a79ff3ef3dc6b32ae1b9d1abf.png" mode="widthFix"></image>
|
||||
<view class="referto-cont">
|
||||
<view class="referto-blue">
|
||||
<view class="referto-drop"><text></text><text></text><text></text><image src="/static/icons/refertoEdit.png" mode="widthFix"></image></view>
|
||||
<view class="referto-white">
|
||||
<view class="referto-title">
|
||||
<view class="referto-title-name"><text>活动报名</text></view>
|
||||
<view class="referto-title-tips">activity</view>
|
||||
</view>
|
||||
<form bindsubmit="siteform" class="site-form">
|
||||
<view class="site-input">
|
||||
<label>体验内容</label>
|
||||
<picker bindchange="tasteDrop" value="{{typesIndex}}" range="{{typesArr}}" range-key="name" class="conneColor">
|
||||
<view class="picker">
|
||||
{{ typesArr[typesIndex].name }}
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>姓名</label>
|
||||
<input placeholder="请输入姓名" name="name" type="text"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>选择城市 <text wx:if="{{cityIndex > 0}}">({{'此地区剩余名额' + cityArr[cityIndex].surplus + '人'}})</text></label>
|
||||
<picker bindchange="cityDrop" value="{{cityIndex}}" range="{{cityArr}}" range-key="city" class="conneColor">
|
||||
<view class="picker">
|
||||
{{ cityArr[cityIndex].city }}
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>选择区域</label>
|
||||
<picker bindchange="regiDrop" value="{{regiIndex}}" range="{{regiArr}}" range-key="name" class="conneColor">
|
||||
<view class="picker">
|
||||
{{ regiArr[regiIndex].name }}
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<input placeholder="请输入详细地址" name="address" type="text"></input>
|
||||
</view>
|
||||
<view class="site-btn" wx:if="{{cityArr[cityIndex].surplus != 0}}">
|
||||
<button form-type="submit" size="mini" disabled="{{disabled}}">提交申请</button>
|
||||
</view>
|
||||
<view class="site-btn active" wx:else>
|
||||
<text>剩余名额为0,不可申请</text>
|
||||
</view>
|
||||
</form>
|
||||
<image class="referto-back" src="https://cdn.shuiganying.com/images/2023/07/07/5a376e923d0ba914c307d7f33da2ab7d.png" mode="widthFix"></image>
|
||||
</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/07/0a62178990571065b1332066abdfa09f.png" mode="widthFix"></image>
|
||||
<navigator class="refertoCont-name" hover-class="none" url="/pages/index/assess/assess?type=1" open-type="reLaunch">去面部检测 ></navigator>
|
||||
<image class="refertoCont-close" bindtap="refertoTap" src="https://cdn.shuiganying.com/images/2023/07/07/f9975891c1efa9b5fcd59fe33a75ed60.png" mode="widthFix"></image>
|
||||
</view>
|
||||
|
||||
<!-- <view class="pack-center pages-hint grey" wx:if="{{paySuccess}}">
|
||||
<image src="/static/icons/loadingGif.gif"></image>
|
||||
<view>疯狂加载中...</view>
|
||||
</view> -->
|
||||
250
pages/recruit/referto/referto.wxss
Normal file
250
pages/recruit/referto/referto.wxss
Normal file
@@ -0,0 +1,250 @@
|
||||
page {
|
||||
background-image: linear-gradient(to top, #6fbaf0, #6fbaf0);
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.referto-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.referto-cont {
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.referto-blue {
|
||||
background-color: #0e55ad;
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
top: -20rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.referto-blue::after,
|
||||
.referto-blue::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: rgba(14, 85, 173, .2);
|
||||
left: 20rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.referto-blue::after {
|
||||
z-index: -2;
|
||||
width: calc(100% - 40rpx);
|
||||
left: 20rpx;
|
||||
top: -20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.referto-blue::before {
|
||||
z-index: -1;
|
||||
width: calc(100% - 80rpx);
|
||||
left: 40rpx;
|
||||
top: -40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.referto-drop {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.referto-drop image {
|
||||
width: 40rpx;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
}
|
||||
|
||||
.referto-drop text {
|
||||
display: inline-block;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #ffaf59;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.referto-drop text:nth-child(2) {
|
||||
background-color: #7fe2ff;
|
||||
}
|
||||
|
||||
.referto-drop text:nth-child(3) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.referto-white {
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.referto-back {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.referto-title {
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.referto-title-name {
|
||||
flex: 1;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.referto-title-name text {
|
||||
background-color: #1e6dce;
|
||||
padding: 0 30rpx;
|
||||
line-height: 68rpx;
|
||||
font-size: 34rpx;
|
||||
border-radius: 20rpx 0 20rpx 0;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.referto-title-tips {
|
||||
text-transform: uppercase;
|
||||
font-size: 44rpx;
|
||||
line-height: 68rpx;
|
||||
color: #eef6ff;
|
||||
}
|
||||
|
||||
.site-form {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-input {
|
||||
position: relative;
|
||||
line-height: 90rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.site-input label text {
|
||||
color: #ee291b;
|
||||
}
|
||||
|
||||
.site-input input,
|
||||
.site-input picker {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background-color: #f9fcff;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.site-input image {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: calc(50% + 22rpx);
|
||||
}
|
||||
|
||||
.site-btn {
|
||||
padding: 20rpx 30rpx;
|
||||
margin: 60rpx 0;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.site-btn button[size="mini"],
|
||||
.site-btn text {
|
||||
display: inline-block;
|
||||
background: #1e6dce;
|
||||
border-radius: 80rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
font-size: 30rpx;
|
||||
color: white;
|
||||
padding: 0 80rpx;
|
||||
}
|
||||
|
||||
.site-btn.active text {
|
||||
background: #b4b4b4;
|
||||
}
|
||||
|
||||
.site-btn button[disabled] {
|
||||
background: #7789ff !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.site-switch {
|
||||
font-size: 32rpx;
|
||||
margin: 30rpx;
|
||||
display: flex;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.site-switch text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.site-switch-active {
|
||||
color: #797979;
|
||||
}
|
||||
|
||||
.site-input textarea {
|
||||
background-color: #f9fcff;
|
||||
padding: 30rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-height: 40rpx;
|
||||
}
|
||||
|
||||
.refertoEject {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
z-index: 1000;
|
||||
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: 10000;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.refertoCont.active {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.refertoCont-name {
|
||||
background-image: linear-gradient(to bottom, #ffb70a, #ff7e1c);
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
margin-bottom: 50rpx;
|
||||
padding: 0 60rpx;
|
||||
border: 4rpx solid #ffffff;
|
||||
line-height: 80rpx;
|
||||
border-radius: 90rpx;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.refertoCont-close {
|
||||
width: 68rpx;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
@@ -9,6 +9,7 @@ const max = 200; // 最大宽度 单位px
|
||||
|
||||
Page({
|
||||
data: {
|
||||
Type : '', //接口来源
|
||||
barHeight : getApp().globalData.barHeight, // 状态栏高度
|
||||
isFixedTop : 0,
|
||||
loading : true,
|
||||
@@ -36,6 +37,11 @@ Page({
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
this.setData({
|
||||
Type: options.type
|
||||
})
|
||||
|
||||
this.setData({
|
||||
imageId: options.image_id
|
||||
})
|
||||
|
||||
@@ -380,7 +380,11 @@
|
||||
|
||||
<!-- 按钮 -->
|
||||
<view class="footer {{footerPop ? 'active' : ''}}">
|
||||
<view class="footer-flex">
|
||||
<view class="footer-flex" wx:if="{{Type == '1' || Type == '2'}}">
|
||||
<navigator hover-class="none" url="/pages/index/index" class="footer-flex-btn footer-flex-share" open-type="switchTab">返回首页</navigator>
|
||||
<navigator hover-class="none" url="/pages/mall/index" open-type="switchTab" class="footer-flex-btn">产品推荐</navigator>
|
||||
</view>
|
||||
<view class="footer-flex" wx:else>
|
||||
<navigator hover-class="none" url="../share/share" class="footer-flex-btn footer-flex-share">邀请好友</navigator>
|
||||
<navigator hover-class="none" url="/pages/mall/index" open-type="switchTab" class="footer-flex-btn">产品推荐</navigator>
|
||||
</view>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.17.0",
|
||||
"appid": "wx6bd4fcc040bfa025",
|
||||
"appid": "wx3056ec23196eaf02",
|
||||
"projectname": "miniprogram-92",
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/health/article/article",
|
||||
"query": "id=2",
|
||||
"pathName": "pages/user/code/code",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
@@ -70,6 +70,13 @@
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/recruit/referto/referto",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
BIN
static/icons/refertoEdit.png
Normal file
BIN
static/icons/refertoEdit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/icons/rejectIcon.png
Normal file
BIN
static/icons/rejectIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
static/tabBarIcon/tabBar_04.png
Normal file
BIN
static/tabBarIcon/tabBar_04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
static/tabBarIcon/tabBar_selected_04.png
Normal file
BIN
static/tabBarIcon/tabBar_selected_04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Reference in New Issue
Block a user