Commit 9cf820d1 authored by 石盼盼's avatar 石盼盼

申请页面

parent 19cadcaf
......@@ -106,6 +106,22 @@ Page({
}
},
apply() {
if(this.data.name == '' || this.data.name == undefined){
base.toast('真实姓名不能为空')
return
}
if(this.data.selectedIndex == '' || this.data.selectedIndex == undefined){
base.toast('性别不能为空')
return
}
if(this.data.age == '' || this.data.age == undefined){
base.toast('年龄不能为空')
return
}
if( this.data.subject == '' || this.data.subject == undefined){
base.toast('擅长科目不能为空')
return
}
let params = {
url: 'apply',
type: 'POST',
......
......@@ -25,6 +25,7 @@ Page({
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
},
],
userTel : ''
},
/**
......@@ -32,7 +33,8 @@ Page({
*/
onLoad: function (options) {
this.setData({
status: options.status ? options.status : '0'
status: options.status ? options.status : '0',
userTel : wx.getStorageSync('userTel')
})
},
showPopup() {
......@@ -52,47 +54,47 @@ Page({
selectedIndex: index,
})
console.log(this.data.selectedIndex)
},
showPopup() {
},
showPopup() {
this.setData({
showCoach: true
})
},
Close() {
},
Close() {
this.setData({
showCoach: false
})
},
name(e) {
},
name(e) {
console.log(e.detail);
this.setData({
name: e.detail
})
},
age(e) {
},
age(e) {
console.log(e.detail);
this.setData({
age: e.detail
})
},
subject(e) {
},
subject(e) {
console.log(e.detail);
this.setData({
subject: e.detail
})
},
major(e) {
},
major(e) {
console.log(e.detail);
this.setData({
major: e.detail
})
},
certificate(e) {
},
certificate(e) {
console.log(e.detail);
this.setData({
certificate: e.detail
})
},
},
copy: function (e) {
wx.setClipboardData({
data: 'bu15333212792',
......@@ -111,12 +113,34 @@ certificate(e) {
})
},
save() {
if(this.data.name == '' || this.data.name == undefined){
base.toast('真实姓名不能为空')
return
}
if(this.data.selectedIndex == '' || this.data.selectedIndex == undefined){
base.toast('性别不能为空')
return
}
if(this.data.age == '' || this.data.age == undefined){
base.toast('年龄不能为空')
return
}
if( this.data.subject == '' || this.data.subject == undefined){
base.toast('擅长科目不能为空')
return
}
let params = {
url: 'apply',
type: 'POST',
data: {
role_type: this.data.role_type,
mobile: wx.getStorageSync('userTel')
mobile: wx.getStorageSync('userTel'),
true_name: this.data.name,
sex: this.data.selectedIndex,
age: this.data.age,
subject: this.data.subject,
major: this.data.major,
certificate: this.data.certificate
},
callback: (data) => {
wx.redirectTo({
......
<!-- <view class="box">
<view class="icon">
<image src="/images/pic_01.png"></image>
</view>
<view class="text">申请成功</view>
<view class="cont">
<view class="title">添加审核人员,更快管理场馆!</view>
<view class="code" catchtap="prevImage">
<image src="{{curImage}}"></image>
</view>
<view class="save" catchtap="prevImage">长按保存相册</view>
<view class="wx">微信号: bu15333212792<text class="copy" bindtap="copy">复制</text></view>
</view>
</view> -->
<view>
<view class="one" wx:if="{{ status == 0 }}">
<image src="/images/loading.png"></image>
......@@ -43,8 +30,8 @@
<image wx:else class="genderImg" src="{{item.icon}}"></image>
</view>
</view>
<!-- <view class="phone">{{telPhone}}</view> -->
<van-field value="{{ value }}" placeholder="请输入手机号" border="{{ true }}" bind:change="tel" />
<view class="phone">{{userTel}}</view>
<!-- <van-field value="{{ value }}" placeholder="请输入手机号" border="{{ true }}" bind:change="tel" /> -->
<van-field value="{{ value }}" placeholder="请输入年龄" border="{{ true }}" bind:change="age" />
<van-field value="{{ value }}" placeholder="请输入擅长科目" border="{{ true }}" bind:change="subject" />
<van-field value="{{ value }}" placeholder="请输入所选专业 (选填)" border="{{ true }}" bind:change="major" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment