Commit 2e976a0e authored by 吴颖's avatar 吴颖

Merge branch 'wuying' into 'master'

'细节优化'

See merge request !70
parents be7bf73c 73496ad6
...@@ -58,7 +58,7 @@ App({ ...@@ -58,7 +58,7 @@ App({
codeChangeToken(code, cb) { codeChangeToken(code, cb) {
let that = this let that = this
wx.request({ wx.request({
url: 'https://wandoutiyu.xueyoubangedu.com/api/getsessionkey', url: that.globalData.baseUrl + 'getsessionkey',
data: { data: {
code: code code: code
}, },
...@@ -87,7 +87,7 @@ App({ ...@@ -87,7 +87,7 @@ App({
wx.checkSession({ wx.checkSession({
success() { success() {
wx.request({ wx.request({
url: 'https://wandoutiyu.xueyoubangedu.com/api/saveinfo', url: that.globalData.baseUrl + 'saveinfo',
data: { data: {
encryptedData: encodeURIComponent(info.encryptedData), encryptedData: encodeURIComponent(info.encryptedData),
iv: encodeURIComponent(info.iv), iv: encodeURIComponent(info.iv),
...@@ -130,6 +130,8 @@ App({ ...@@ -130,6 +130,8 @@ App({
}, },
globalData: { globalData: {
// baseUrl: 'https://wandoutiyu.xueyoubangedu.com/api/', //线上接口
baseUrl: 'https://wandoutiyu.test.xueyoubangedu.com/api/', //测试接口
extAppid: 'wx6e6eaca9cc1c406d', // 当前appid extAppid: 'wx6e6eaca9cc1c406d', // 当前appid
userInfo: '', //微信user信息 userInfo: '', //微信user信息
userTel: '', // 手机号 userTel: '', // 手机号
......
...@@ -9,38 +9,41 @@ Page({ ...@@ -9,38 +9,41 @@ Page({
showCoach: false, showCoach: false,
user_id: '', user_id: '',
role_type: '2', role_type: '2',
telPhone: '',
gender: [ gender: [
{ {
key : 1, key : 1,
name: 'famale',
value: '', value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png', icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png' iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
}, },
{ {
key: 2, key: 2,
name: 'male',
value: '', value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png', icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png' iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
}, },
], ],
selectedIndex: '',
name: '',
telPhone: '',
age: '',
subject: '',
major: '',
certificate: ''
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
user_id: wx.getStorageSync('userInfo').id user_id: wx.getStorageSync('userInfo').id
}) })
console.log(this.data.user_id)
}, },
// 性别选择 // 性别选择
gender: function (e) { gender: function (e) {
var index = e.currentTarget.dataset.index; var key = e.currentTarget.dataset.key;
this.setData({ this.setData({
selectedIndex: index, selectedIndex: key,
}) })
console.log(this.data.selectedIndex)
}, },
showPopup() { showPopup() {
this.setData({ this.setData({
...@@ -53,37 +56,31 @@ Page({ ...@@ -53,37 +56,31 @@ Page({
}) })
}, },
name(e) { name(e) {
console.log(e.detail);
this.setData({ this.setData({
name: e.detail name: e.detail
}) })
}, },
tel(e) { tel(e) {
console.log(e.detail);
this.setData({ this.setData({
telPhone: e.detail telPhone: e.detail
}) })
}, },
age(e) { age(e) {
console.log(e.detail);
this.setData({ this.setData({
age: e.detail age: e.detail
}) })
}, },
subject(e) { subject(e) {
console.log(e.detail);
this.setData({ this.setData({
subject: e.detail subject: e.detail
}) })
}, },
major(e) { major(e) {
console.log(e.detail);
this.setData({ this.setData({
major: e.detail major: e.detail
}) })
}, },
certificate(e) { certificate(e) {
console.log(e.detail);
this.setData({ this.setData({
certificate: e.detail certificate: e.detail
}) })
...@@ -111,6 +108,9 @@ Page({ ...@@ -111,6 +108,9 @@ Page({
base.newRequest(params) base.newRequest(params)
} else { } else {
base.toast('授权失败,无法查看') base.toast('授权失败,无法查看')
this.setData({
telPhone: ''
})
} }
}, },
apply() { apply() {
...@@ -121,6 +121,15 @@ Page({ ...@@ -121,6 +121,15 @@ Page({
if(this.data.selectedIndex == '' || this.data.selectedIndex == undefined){ if(this.data.selectedIndex == '' || this.data.selectedIndex == undefined){
base.toast('性别不能为空') base.toast('性别不能为空')
return 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){ if(this.data.age == '' || this.data.age == undefined){
base.toast('年龄不能为空') base.toast('年龄不能为空')
...@@ -137,7 +146,7 @@ Page({ ...@@ -137,7 +146,7 @@ Page({
role_type: this.data.role_type, role_type: this.data.role_type,
mobile: this.data.telPhone, mobile: this.data.telPhone,
true_name: this.data.name, true_name: this.data.name,
sex: this.data.selectedIndex + 1, sex: this.data.selectedIndex,
age: this.data.age, age: this.data.age,
subject: this.data.subject, subject: this.data.subject,
major: this.data.major, major: this.data.major,
......
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
<view class="btn"> <view class="btn">
<button class="save" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">申请成为教练</button> <button class="save" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">申请成为教练</button>
</view> </view>
<!-- <view class="btn">
<button class="save" catchtap="showPopup">申请成为教练</button>
</view> -->
</view> </view>
<!-- 填写信息弹窗 --> <!-- 填写信息弹窗 -->
...@@ -23,14 +18,13 @@ ...@@ -23,14 +18,13 @@
<view class="center"> <view class="center">
<van-field value="{{ value }}" placeholder="请输入真实姓名" border="{{ true }}" bind:change="name" /> <van-field value="{{ value }}" placeholder="请输入真实姓名" border="{{ true }}" bind:change="name" />
<view class="sexBox"> <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> <text class="genderText">{{item.value}}</text>
<image wx:if="{{item.key == selectedIndex}}" class="genderImg" src="{{item.iconActive}}"></image> <image wx:if="{{item.key == selectedIndex}}" class="genderImg" src="{{item.iconActive}}"></image>
<image wx:else class="genderImg" src="{{item.icon}}"></image> <image wx:else class="genderImg" src="{{item.icon}}"></image>
</view> </view>
</view> </view>
<!-- <view class="phone">{{telPhone}}</view> --> <van-field value="{{ telPhone ? telPhone : '' }}" placeholder="请输入手机号" border="{{ true }}" bind:change="tel" maxlength='11' />
<van-field value="{{ telPhone ? telPhone : '' }}" 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="age" />
<van-field value="{{ value }}" placeholder="请输入擅长科目" border="{{ true }}" bind:change="subject" /> <van-field value="{{ value }}" placeholder="请输入擅长科目" border="{{ true }}" bind:change="subject" />
<van-field value="{{ value }}" placeholder="请输入所选专业 (选填)" border="{{ true }}" bind:change="major" /> <van-field value="{{ value }}" placeholder="请输入所选专业 (选填)" border="{{ true }}" bind:change="major" />
......
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
border: none; border: none;
background: linear-gradient(-18deg, #FF6B0F 0%, #FF984D 100%); background: linear-gradient(-18deg, #FF6B0F 0%, #FF984D 100%);
border-radius: 40rpx; border-radius: 40rpx;
color: #000000;
font-size: 30rpx;
text-align: center; text-align: center;
line-height: 50rpx; font-size: 30rpx;
font-weight: bold;
color: #FFFFFF;
} }
/* 填写信息弹窗样式 */ /* 填写信息弹窗样式 */
......
...@@ -10,24 +10,28 @@ Page({ ...@@ -10,24 +10,28 @@ Page({
status: '0', status: '0',
curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png', curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png',
role_type: '2', role_type: '2',
telPhone: '',
gender: [ gender: [
{ {
key : 1, key : 1,
name: 'famale',
value: '', value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png', icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png' iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
}, },
{ {
key: 2, key: 2,
name: 'male',
value: '', value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png', icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png' iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
}, },
], ],
userTel : ''
selectedIndex: '',
name: '',
userTel : '',
age: '',
subject: '',
major: '',
certificate: ''
}, },
/** /**
...@@ -51,9 +55,9 @@ Page({ ...@@ -51,9 +55,9 @@ Page({
}, },
// 性别选择 // 性别选择
gender: function (e) { gender: function (e) {
var index = e.currentTarget.dataset.index; var key = e.currentTarget.dataset.key;
this.setData({ this.setData({
selectedIndex: index, selectedIndex: key,
}) })
console.log(this.data.selectedIndex) console.log(this.data.selectedIndex)
}, },
...@@ -73,31 +77,27 @@ Page({ ...@@ -73,31 +77,27 @@ Page({
}) })
}, },
name(e) { name(e) {
console.log(e.detail);
this.setData({ this.setData({
name: e.detail name: e.detail
}) })
}, },
age(e) { age(e) {
console.log(e.detail);
this.setData({ this.setData({
age: e.detail age: e.detail
}) })
}, },
subject(e) { subject(e) {
console.log(e.detail);
this.setData({ this.setData({
subject: e.detail subject: e.detail
}) })
}, },
major(e) { major(e) {
console.log(e.detail);
this.setData({ this.setData({
major: e.detail major: e.detail
}) })
}, },
certificate(e) { certificate(e) {
console.log(e.detail);
this.setData({ this.setData({
certificate: e.detail certificate: e.detail
}) })
...@@ -127,6 +127,15 @@ Page({ ...@@ -127,6 +127,15 @@ Page({
if(this.data.selectedIndex == '' || this.data.selectedIndex == undefined){ if(this.data.selectedIndex == '' || this.data.selectedIndex == undefined){
base.toast('性别不能为空') base.toast('性别不能为空')
return 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){ if(this.data.age == '' || this.data.age == undefined){
base.toast('年龄不能为空') base.toast('年龄不能为空')
......
...@@ -24,14 +24,13 @@ ...@@ -24,14 +24,13 @@
<view class="center"> <view class="center">
<van-field value="{{ value }}" placeholder="请输入真实姓名" border="{{ true }}" bind:change="name" /> <van-field value="{{ value }}" placeholder="请输入真实姓名" border="{{ true }}" bind:change="name" />
<view class="sexBox"> <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> <text class="genderText">{{item.value}}</text>
<image wx:if="{{item.key == selectedIndex}}" class="genderImg" src="{{item.iconActive}}"></image> <image wx:if="{{item.key == selectedIndex}}" class="genderImg" src="{{item.iconActive}}"></image>
<image wx:else class="genderImg" src="{{item.icon}}"></image> <image wx:else class="genderImg" src="{{item.icon}}"></image>
</view> </view>
</view> </view>
<!-- <view class="phone">{{userTel}}</view> --> <van-field value="{{ userTel ? userTel : '' }}" placeholder="请输入手机号" border="{{ true }}" bind:change="tel" maxlength='11' />
<van-field value="{{ userTel ? userTel : '' }}" 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="age" />
<van-field value="{{ value }}" placeholder="请输入擅长科目" border="{{ true }}" bind:change="subject" /> <van-field value="{{ value }}" placeholder="请输入擅长科目" border="{{ true }}" bind:change="subject" />
<van-field value="{{ value }}" placeholder="请输入所选专业 (选填)" border="{{ true }}" bind:change="major" /> <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"> <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> <swiper-item>
<image src="https://wdty.xueyoubangedu.com/wandou/firstopen1.png"></image> <image src="https://wdty.xueyoubangedu.com/wandou/firstopen1.png"></image>
</swiper-item> </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{ .pic{
width: 690rpx; width: 690rpx;
height: 750rpx; height: 750rpx;
margin: 100rpx 30rpx; margin: 100rpx 30rpx;
} }
.pic swiper {
width: 690rpx;
height: 800rpx;
}
swiper-item image{ swiper-item image{
width: 100%; width: 100%;
height: 750rpx; height: 750rpx;
...@@ -52,10 +15,10 @@ swiper-item image{ ...@@ -52,10 +15,10 @@ swiper-item image{
.save { .save {
position: absolute; position: absolute;
bottom: 200rpx; bottom: 40rpx;
left: 50rpx; left: 65rpx;
right: 50rpx; right: 65rpx;
width: 650rpx !important; width: 620rpx !important;
height: 80rpx !important; height: 80rpx !important;
line-height: 80rpx !important; line-height: 80rpx !important;
text-align: center; text-align: center;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
border: 1px solid #FFC600; border: 1px solid #FFC600;
border-radius: 15rpx; border-radius: 15rpx;
text-align: center; text-align: center;
margin: 56rpx auto 30rpx; margin: 30rpx auto;
overflow: hidden; overflow: hidden;
} }
.tablist text{ .tablist text{
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
border: 1px solid #FFC600; border: 1px solid #FFC600;
border-radius: 15rpx; border-radius: 15rpx;
text-align: center; text-align: center;
margin: 56rpx auto 30rpx; margin: 30rpx auto;
overflow: hidden; overflow: hidden;
} }
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<view class="til">请选择教学科目</view> <view class="til">请选择教学科目</view>
<view class="select">(可多选)</view> <view class="select">(可多选)</view>
</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'> <block wx:for='{{subjectList}}' wx:key='index'>
<view class="{{item.isChecked ? 'active' : ''}}" catchtap="chooseOne" data-index='{{index}}' data-item='{{item}}'>{{item.name}}</view> <view class="{{item.isChecked ? 'active' : ''}}" catchtap="chooseOne" data-index='{{index}}' data-item='{{item}}'>{{item.name}}</view>
</block> </block>
......
...@@ -111,7 +111,7 @@ page { ...@@ -111,7 +111,7 @@ page {
width: 580rpx; width: 580rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 10rpx; border-radius: 10rpx;
padding: 51rpx 20rpx; padding: 51rpx 0;
} }
.top .til{ .top .til{
text-align: center; text-align: center;
...@@ -128,6 +128,7 @@ page { ...@@ -128,6 +128,7 @@ page {
} }
.subject { .subject {
margin-top: 60rpx; margin-top: 60rpx;
padding-left: 40rpx;
} }
.subject>view{ .subject>view{
width: 156rpx; width: 156rpx;
...@@ -139,6 +140,7 @@ page { ...@@ -139,6 +140,7 @@ page {
border-radius: 28px; border-radius: 28px;
color: #B4BC4D; color: #B4BC4D;
margin-bottom: 20rpx; margin-bottom: 20rpx;
margin-right: 15rpx;
} }
.subject>view.active{ .subject>view.active{
background: linear-gradient(13deg, #AAB247 0%, #B4BC4D 100%); background: linear-gradient(13deg, #AAB247 0%, #B4BC4D 100%);
......
{ {
"description": "项目配置文件", "description": "项目配置文件",
"packOptions": { "packOptions": {
"ignore": [] "ignore": []
}, },
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"es6": true, "es6": true,
"enhance": false, "enhance": false,
"postcss": true, "postcss": true,
"preloadBackgroundData": false, "preloadBackgroundData": false,
"minified": true, "minified": true,
"newFeature": false, "newFeature": false,
"coverView": true, "coverView": true,
"nodeModules": false, "nodeModules": false,
"autoAudits": false, "autoAudits": false,
"showShadowRootInWxmlPanel": true, "showShadowRootInWxmlPanel": true,
"scopeDataCheck": false, "scopeDataCheck": false,
"uglifyFileName": false, "uglifyFileName": false,
"checkInvalidKey": true, "checkInvalidKey": true,
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"bundle": false, "bundle": false,
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": false, "useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,
"useMultiFrameRuntime": false, "useMultiFrameRuntime": false,
"useApiHook": true, "useApiHook": true,
"enableEngineNative": false, "enableEngineNative": false,
"userConfirmedBundleSwitch": false, "userConfirmedBundleSwitch": false,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"minifyWXSS": true "minifyWXSS": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.14.0", "libVersion": "2.14.0",
"appid": "wx6e6eaca9cc1c406d", "appid": "wx6e6eaca9cc1c406d",
"projectname": "wandouchengzhang_coach", "projectname": "wandouchengzhang_coach",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
}, },
"scripts": {}, "scripts": {},
"isGameTourist": false, "isGameTourist": false,
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},
"condition": { "condition": {
"search": { "search": {
"current": -1, "list": []
"list": [] },
}, "conversation": {
"conversation": { "list": []
"current": -1, },
"list": [] "plugin": {
}, "list": []
"plugin": { },
"list": [] "game": {
}, "list": []
"game": { },
"list": [] "gamePlugin": {
}, "list": []
"gamePlugin": { },
"list": [] "miniprogram": {
}, "list": [
"miniprogram": { {
"list": [ "id": -1,
{ "name": "pages/tabbar/personal/personal",
"id": -1, "pathName": "pages/tabbar/personal/personal",
"name": "pages/tabbar/personal/personal", "query": "",
"pathName": "pages/tabbar/personal/personal", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/tabbar/personal/personal",
"id": -1, "pathName": "pages/tabbar/personal/personal",
"name": "pages/tabbar/personal/personal", "query": "",
"pathName": "pages/tabbar/personal/personal", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/my/parents/parents",
"id": -1, "pathName": "pages/my/parents/parents",
"name": "pages/my/parents/parents", "query": "",
"pathName": "pages/my/parents/parents", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/tabbar/personal/personal",
"id": -1, "pathName": "pages/tabbar/personal/personal",
"name": "pages/tabbar/personal/personal", "query": "",
"pathName": "pages/tabbar/personal/personal", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/my/teachingArea/teachingArea",
"id": -1, "pathName": "pages/my/teachingArea/teachingArea",
"name": "pages/my/teachingArea/teachingArea", "query": "",
"pathName": "pages/my/teachingArea/teachingArea", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/index/classManagement/classManagement",
"id": -1, "pathName": "pages/index/classManagement/classManagement",
"name": "pages/index/classManagement/classManagement", "query": "",
"pathName": "pages/index/classManagement/classManagement", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/index/courseInstant/courseInstant",
"id": -1, "pathName": "pages/index/courseInstant/courseInstant",
"name": "pages/index/courseInstant/courseInstant", "query": "",
"pathName": "pages/index/courseInstant/courseInstant", "scene": null
"query": "", },
"scene": null {
}, "id": 7,
{ "name": "pages/index/classDetail/classDetail",
"id": 7, "pathName": "pages/index/classDetail/classDetail",
"name": "pages/index/classDetail/classDetail", "query": "",
"pathName": "pages/index/classDetail/classDetail", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/team/teamDetail/teamDetail",
"id": -1, "pathName": "pages/team/teamDetail/teamDetail",
"name": "pages/team/teamDetail/teamDetail", "query": "",
"pathName": "pages/team/teamDetail/teamDetail", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/index/performance/performance",
"id": -1, "pathName": "pages/index/performance/performance",
"name": "pages/index/performance/performance", "query": "",
"pathName": "pages/index/performance/performance", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/index/evaluation/evaluation",
"id": -1, "pathName": "pages/index/evaluation/evaluation",
"name": "pages/index/evaluation/evaluation", "query": "",
"pathName": "pages/index/evaluation/evaluation", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "个人中心",
"id": -1, "pathName": "pages/tabbar/personal/personal",
"name": "个人中心", "query": "",
"pathName": "pages/tabbar/personal/personal", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/tabbar/class/class",
"id": -1, "pathName": "pages/tabbar/class/class",
"name": "pages/tabbar/class/class", "query": "",
"pathName": "pages/tabbar/class/class", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/team/teamDetail/teamDetail",
"id": -1, "pathName": "pages/team/teamDetail/teamDetail",
"name": "pages/team/teamDetail/teamDetail", "query": "",
"pathName": "pages/team/teamDetail/teamDetail", "scene": null
"query": "", },
"scene": null {
}, "id": -1,
{ "name": "pages/sign/apply/apply",
"id": -1, "pathName": "pages/sign/apply/apply",
"name": "pages/sign/apply/apply", "scene": null
"pathName": "pages/sign/apply/apply", }
"scene": null ]
} }
] }
}
}
} }
\ No newline at end of file
...@@ -3,8 +3,8 @@ var app = getApp() ...@@ -3,8 +3,8 @@ var app = getApp()
const qiniuUploader = require("./qiniuUploader.js"); const qiniuUploader = require("./qiniuUploader.js");
class Base { class Base {
constructor() { constructor() {
this.baseUrl = 'https://wandoutiyu.xueyoubangedu.com/api/' //线上接口 // this.baseUrl = 'https://wandoutiyu.xueyoubangedu.com/api/' //线上接口
// this.baseUrl = 'https://wandoutiyu.test.xueyoubangedu.com/api/' //测试接口 this.baseUrl = 'https://wandoutiyu.test.xueyoubangedu.com/api/' //测试接口
} }
newRequest(params, flag = false, tips = true) { newRequest(params, flag = false, tips = true) {
let that = this let that = this
...@@ -22,9 +22,7 @@ class Base { ...@@ -22,9 +22,7 @@ class Base {
}, },
success: function (res) { success: function (res) {
params.ischeckedCallback && params.ischeckedCallback() //防止用户多次点击,请求完成后让用户可点 params.ischeckedCallback && params.ischeckedCallback() //防止用户多次点击,请求完成后让用户可点
if (wx.showLoading()) { wx.hideLoading() //隐藏加载动画
wx.hideLoading() //隐藏加载动画
}
if (res.statusCode == 200) { if (res.statusCode == 200) {
let rstcode = res.data.meta.code.toString() //接口返回的错误码 let rstcode = res.data.meta.code.toString() //接口返回的错误码
if (rstcode == '200') { 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