[新增体验官]
This commit is contained in:
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 => {}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user