Commit 0a3089d6 authored by 石盼盼's avatar 石盼盼

修改合并冲突

parents c8ec38fa 9b5fba64
......@@ -58,7 +58,11 @@ App({
codeChangeToken(code, cb) {
let that = this
wx.request({
<<<<<<< HEAD
url: 'https://wandoutiyu.test.xueyoubangedu.com/api/getsessionkey',
=======
url: that.globalData.baseUrl + 'getsessionkey',
>>>>>>> 9b5fba64e12f4260ccfb533045accbeb74c16f37
data: {
code: code
},
......@@ -87,11 +91,15 @@ App({
wx.checkSession({
success() {
wx.request({
<<<<<<< HEAD
url: 'https://wandoutiyu.test.xueyoubangedu.com/api/saveinfo',
=======
url: that.globalData.baseUrl + 'saveinfo',
>>>>>>> 9b5fba64e12f4260ccfb533045accbeb74c16f37
data: {
encryptedData: encodeURIComponent(info.encryptedData),
iv: encodeURIComponent(info.iv),
token: wx.getStorageSync('token')
token: that.globalData.token
},
header: {
'app': 'coach'
......@@ -130,6 +138,8 @@ App({
},
globalData: {
// baseUrl: 'https://wandoutiyu.xueyoubangedu.com/api/', //线上接口
baseUrl: 'https://wandoutiyu.test.xueyoubangedu.com/api/', //测试接口
extAppid: 'wx6e6eaca9cc1c406d', // 当前appid
userInfo: '', //微信user信息
userTel: '', // 手机号
......
......@@ -29,7 +29,6 @@ Page({
coach_id: app.globalData.coach_id
})
this.getMyarea()
this.getCitylist()
},
getMyarea: function () {
......@@ -54,7 +53,7 @@ Page({
region_id: data.city != null && data.city.region_id != '' ? data.city.region_id : '',
city_id: data.city != null && data.city.city_id != '' ? data.city.id : '',
})
console.log(this.data.currentArea)
this.getCitylist()
}
}
base.newRequest(params)
......
......@@ -9,38 +9,41 @@ Page({
showCoach: false,
user_id: '',
role_type: '2',
telPhone: '',
gender: [
{
key : 1,
name: 'famale',
value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
},
{
key: 2,
name: 'male',
value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
},
],
selectedIndex: '',
name: '',
telPhone: '',
age: '',
subject: '',
major: '',
certificate: ''
},
onLoad: function (options) {
this.setData({
user_id: wx.getStorageSync('userInfo').id
})
console.log(this.data.user_id)
},
// 性别选择
// 性别选择
gender: function (e) {
var index = e.currentTarget.dataset.index;
var key = e.currentTarget.dataset.key;
this.setData({
selectedIndex: index,
selectedIndex: key,
})
console.log(this.data.selectedIndex)
},
showPopup() {
this.setData({
......@@ -53,37 +56,31 @@ Page({
})
},
name(e) {
console.log(e.detail);
this.setData({
name: e.detail
})
},
tel(e) {
console.log(e.detail);
this.setData({
telPhone: e.detail
})
},
age(e) {
console.log(e.detail);
this.setData({
age: e.detail
})
},
subject(e) {
console.log(e.detail);
this.setData({
subject: e.detail
})
},
major(e) {
console.log(e.detail);
this.setData({
major: e.detail
})
},
certificate(e) {
console.log(e.detail);
this.setData({
certificate: e.detail
})
......@@ -111,6 +108,9 @@ Page({
base.newRequest(params)
} else {
base.toast('授权失败,无法查看')
this.setData({
telPhone: ''
})
}
},
apply() {
......@@ -121,6 +121,15 @@ Page({
if(this.data.selectedIndex == '' || this.data.selectedIndex == undefined){
base.toast('性别不能为空')
return
}
const reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if (!this.data.telPhone) {
base.toast('请输入手机号')
return
}
if (!reg.test(this.data.telPhone)) {
base.toast('手机号格式不正确')
return
}
if(this.data.age == '' || this.data.age == undefined){
base.toast('年龄不能为空')
......@@ -137,7 +146,7 @@ Page({
role_type: this.data.role_type,
mobile: this.data.telPhone,
true_name: this.data.name,
sex: this.data.selectedIndex + 1,
sex: this.data.selectedIndex,
age: this.data.age,
subject: this.data.subject,
major: this.data.major,
......
......@@ -6,11 +6,6 @@
<view class="btn">
<button class="save" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">申请成为教练</button>
</view>
<!-- <view class="btn">
<button class="save" catchtap="showPopup">申请成为教练</button>
</view> -->
</view>
<!-- 填写信息弹窗 -->
......@@ -23,14 +18,13 @@
<view class="center">
<van-field value="{{ value }}" placeholder="请输入真实姓名" border="{{ true }}" bind:change="name" />
<view class="sexBox">
<view class="gender" wx:for="{{gender}}" wx:key="index" data-index="{{item.key}}" bindtap="gender">
<view class="gender" wx:for="{{gender}}" wx:key="index" data-key="{{item.key}}" bindtap="gender">
<text class="genderText">{{item.value}}</text>
<image wx:if="{{item.key == selectedIndex}}" class="genderImg" src="{{item.iconActive}}"></image>
<image wx:else class="genderImg" src="{{item.icon}}"></image>
</view>
</view>
<!-- <view class="phone">{{telPhone}}</view> -->
<van-field value="{{ telPhone ? telPhone : '' }}" placeholder="请输入手机号" border="{{ true }}" bind:change="tel" />
<van-field value="{{ telPhone ? telPhone : '' }}" placeholder="请输入手机号" border="{{ true }}" bind:change="tel" maxlength='11' />
<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" />
......
......@@ -23,10 +23,10 @@
border: none;
background: linear-gradient(-18deg, #FF6B0F 0%, #FF984D 100%);
border-radius: 40rpx;
color: #000000;
font-size: 30rpx;
text-align: center;
line-height: 50rpx;
font-size: 30rpx;
font-weight: bold;
color: #FFFFFF;
}
/* 填写信息弹窗样式 */
......
......@@ -10,24 +10,28 @@ Page({
status: '0',
curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png',
role_type: '2',
telPhone: '',
gender: [
{
key : 1,
name: 'famale',
value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
},
{
key: 2,
name: 'male',
value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
},
],
userTel : ''
selectedIndex: '',
name: '',
userTel : '',
age: '',
subject: '',
major: '',
certificate: ''
},
/**
......@@ -51,9 +55,9 @@ Page({
},
// 性别选择
gender: function (e) {
var index = e.currentTarget.dataset.index;
var key = e.currentTarget.dataset.key;
this.setData({
selectedIndex: index,
selectedIndex: key,
})
console.log(this.data.selectedIndex)
},
......@@ -73,31 +77,27 @@ Page({
})
},
name(e) {
console.log(e.detail);
this.setData({
name: e.detail
})
},
age(e) {
console.log(e.detail);
this.setData({
age: e.detail
})
},
subject(e) {
console.log(e.detail);
this.setData({
subject: e.detail
})
},
major(e) {
console.log(e.detail);
this.setData({
major: e.detail
})
},
certificate(e) {
console.log(e.detail);
this.setData({
certificate: e.detail
})
......@@ -127,6 +127,15 @@ Page({
if(this.data.selectedIndex == '' || this.data.selectedIndex == undefined){
base.toast('性别不能为空')
return
}
const reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if (!this.data.userTel) {
base.toast('请输入手机号')
return
}
if (!reg.test(this.data.userTel)) {
base.toast('手机号格式不正确')
return
}
if(this.data.age == '' || this.data.age == undefined){
base.toast('年龄不能为空')
......
......@@ -24,14 +24,13 @@
<view class="center">
<van-field value="{{ value }}" placeholder="请输入真实姓名" border="{{ true }}" bind:change="name" />
<view class="sexBox">
<view class="gender" wx:for="{{gender}}" wx:key="index" data-index="{{item.key}}" bindtap="gender">
<view class="gender" wx:for="{{gender}}" wx:key="index" data-key="{{item.key}}" bindtap="gender">
<text class="genderText">{{item.value}}</text>
<image wx:if="{{item.key == selectedIndex}}" class="genderImg" src="{{item.iconActive}}"></image>
<image wx:else class="genderImg" src="{{item.icon}}"></image>
</view>
</view>
<!-- <view class="phone">{{userTel}}</view> -->
<van-field value="{{ userTel ? userTel : '' }}" placeholder="请输入手机号" border="{{ true }}" bind:change="tel" />
<van-field value="{{ userTel ? userTel : '' }}" placeholder="请输入手机号" border="{{ true }}" bind:change="tel" maxlength='11' />
<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" />
......
<!-- <view class="loginBox">
<view class="logo-view">
<image src="/images/my/login.png"></image>
</view>
<view class="title">豌豆教练</view>
<button class="flex-h flex-vc flex-hc" open-type="getUserInfo" bindgetuserinfo="userInfoHandler" catchtap="checkVisions">
<image src="/images/my/wx.png"></image>
微信一键注册/登录
</button>
<view class="desc">请登录查看更多内容</view>
</view> -->
<view class="pic">
<swiper indicator-dots="true" autoplay="true" style="width:690rpx;height:750rpx">
<swiper indicator-dots="true" autoplay="true" style="width:690rpx" indicator-active-color='#FFC600' indicator-color='#E1E2E6'>
<swiper-item>
<image src="https://wdty.xueyoubangedu.com/wandou/firstopen1.png"></image>
</swiper-item>
......
/* .loginBox {
padding-top: 174rpx;
}
.logo-view image {
display: block;
margin: 0 auto 41rpx auto;
width: 216rpx;
height: 216rpx;
}
.loginBox .title {
color: #333;
font-weight: bold;
text-align: center;
font-size: 36rpx;
font-weight: bold;
color: #000000;
}
.loginBox button {
width: 620rpx !important;
height: 82rpx !important;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
color: #000000;
border-radius: 41rpx;
margin: 184rpx auto 30rpx auto;
font-size: 30rpx;
border: none;
outline: none;
}
.loginBox button image {
width: 45rpx;
height: 36rpx;
margin-right: 14rpx;
}
.desc {
font-size: 24rpx;
color: #999999;
text-align: center;
} */
.pic{
width: 690rpx;
height: 750rpx;
margin: 100rpx 30rpx;
}
.pic swiper {
width: 690rpx;
height: 800rpx;
}
swiper-item image{
width: 100%;
height: 750rpx;
......@@ -52,10 +15,10 @@ swiper-item image{
.save {
position: absolute;
bottom: 200rpx;
left: 50rpx;
right: 50rpx;
width: 650rpx !important;
bottom: 40rpx;
left: 65rpx;
right: 65rpx;
width: 620rpx !important;
height: 80rpx !important;
line-height: 80rpx !important;
text-align: center;
......
......@@ -6,7 +6,7 @@
border: 1px solid #FFC600;
border-radius: 15rpx;
text-align: center;
margin: 56rpx auto 30rpx;
margin: 30rpx auto;
overflow: hidden;
}
.tablist text{
......
......@@ -6,7 +6,7 @@
border: 1px solid #FFC600;
border-radius: 15rpx;
text-align: center;
margin: 56rpx auto 30rpx;
margin: 30rpx auto;
overflow: hidden;
}
......
......@@ -63,7 +63,7 @@
<view class="til">请选择教学科目</view>
<view class="select">(可多选)</view>
</view>
<view class="subject flex-h flex-hw flex-ha">
<view class="subject flex-h flex-hw">
<block wx:for='{{subjectList}}' wx:key='index'>
<view class="{{item.isChecked ? 'active' : ''}}" catchtap="chooseOne" data-index='{{index}}' data-item='{{item}}'>{{item.name}}</view>
</block>
......
......@@ -111,7 +111,7 @@ page {
width: 580rpx;
background-color: #FFFFFF;
border-radius: 10rpx;
padding: 51rpx 20rpx;
padding: 51rpx 0;
}
.top .til{
text-align: center;
......@@ -128,6 +128,7 @@ page {
}
.subject {
margin-top: 60rpx;
padding-left: 40rpx;
}
.subject>view{
width: 156rpx;
......@@ -139,6 +140,7 @@ page {
border-radius: 28px;
color: #B4BC4D;
margin-bottom: 20rpx;
margin-right: 15rpx;
}
.subject>view.active{
background: linear-gradient(13deg, #AAB247 0%, #B4BC4D 100%);
......
......@@ -51,11 +51,9 @@
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
......
......@@ -22,9 +22,7 @@ class Base {
},
success: function (res) {
params.ischeckedCallback && params.ischeckedCallback() //防止用户多次点击,请求完成后让用户可点
if (wx.showLoading()) {
wx.hideLoading() //隐藏加载动画
}
if (res.statusCode == 200) {
let rstcode = res.data.meta.code.toString() //接口返回的错误码
if (rstcode == '200') {
......
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