Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wandouchengzhang_coach
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
石盼盼
wandouchengzhang_coach
Commits
73496ad6
Commit
73496ad6
authored
Dec 14, 2020
by
吴颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'细节优化'
parent
be7bf73c
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
248 additions
and
286 deletions
+248
-286
app.js
app.js
+4
-2
apply.js
pages/sign/apply/apply.js
+24
-15
apply.wxml
pages/sign/apply/apply.wxml
+2
-8
apply.wxss
pages/sign/apply/apply.wxss
+3
-3
applyResult.js
pages/sign/applyResult/applyResult.js
+20
-11
applyResult.wxml
pages/sign/applyResult/applyResult.wxml
+2
-3
login.wxml
pages/sign/login/login.wxml
+1
-13
login.wxss
pages/sign/login/login.wxss
+8
-45
class.wxss
pages/tabbar/class/class.wxss
+1
-1
financial.wxss
pages/tabbar/financial/financial.wxss
+1
-1
personal.wxml
pages/tabbar/personal/personal.wxml
+1
-1
personal.wxss
pages/tabbar/personal/personal.wxss
+3
-1
project.config.json
project.config.json
+175
-177
base.js
utils/base.js
+3
-5
No files found.
app.js
View file @
73496ad6
...
...
@@ -58,7 +58,7 @@ App({
codeChangeToken
(
code
,
cb
)
{
let
that
=
this
wx
.
request
({
url
:
'
https://wandoutiyu.xueyoubangedu.com/api/
getsessionkey
'
,
url
:
that
.
globalData
.
baseUrl
+
'
getsessionkey
'
,
data
:
{
code
:
code
},
...
...
@@ -87,7 +87,7 @@ App({
wx
.
checkSession
({
success
()
{
wx
.
request
({
url
:
'
https://wandoutiyu.xueyoubangedu.com/api/
saveinfo
'
,
url
:
that
.
globalData
.
baseUrl
+
'
saveinfo
'
,
data
:
{
encryptedData
:
encodeURIComponent
(
info
.
encryptedData
),
iv
:
encodeURIComponent
(
info
.
iv
),
...
...
@@ -130,6 +130,8 @@ App({
},
globalData
:
{
// baseUrl: 'https://wandoutiyu.xueyoubangedu.com/api/', //线上接口
baseUrl
:
'
https://wandoutiyu.test.xueyoubangedu.com/api/
'
,
//测试接口
extAppid
:
'
wx6e6eaca9cc1c406d
'
,
// 当前appid
userInfo
:
''
,
//微信user信息
userTel
:
''
,
// 手机号
...
...
pages/sign/apply/apply.js
View file @
73496ad6
...
...
@@ -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
,
...
...
pages/sign/apply/apply.wxml
View file @
73496ad6
...
...
@@ -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" />
...
...
pages/sign/apply/apply.wxss
View file @
73496ad6
...
...
@@ -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;
}
/* 填写信息弹窗样式 */
...
...
pages/sign/applyResult/applyResult.js
View file @
73496ad6
...
...
@@ -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
(
'
年龄不能为空
'
)
...
...
pages/sign/applyResult/applyResult.wxml
View file @
73496ad6
...
...
@@ -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" />
...
...
pages/sign/login/login.wxml
View file @
73496ad6
<!-- <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>
...
...
pages/sign/login/login.wxss
View file @
73496ad6
/* .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: 20
0rpx;
left:
50
rpx;
right:
50
rpx;
width: 6
5
0rpx !important;
bottom: 4
0rpx;
left:
65
rpx;
right:
65
rpx;
width: 6
2
0rpx !important;
height: 80rpx !important;
line-height: 80rpx !important;
text-align: center;
...
...
pages/tabbar/class/class.wxss
View file @
73496ad6
...
...
@@ -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{
...
...
pages/tabbar/financial/financial.wxss
View file @
73496ad6
...
...
@@ -6,7 +6,7 @@
border: 1px solid #FFC600;
border-radius: 15rpx;
text-align: center;
margin:
56rpx auto 30rpx
;
margin:
30rpx auto
;
overflow: hidden;
}
...
...
pages/tabbar/personal/personal.wxml
View file @
73496ad6
...
...
@@ -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>
...
...
pages/tabbar/personal/personal.wxss
View file @
73496ad6
...
...
@@ -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%);
...
...
project.config.json
View file @
73496ad6
...
...
@@ -51,11 +51,9 @@
"simulatorPluginLibVersion"
:
{},
"condition"
:
{
"search"
:
{
"current"
:
-1
,
"list"
:
[]
},
"conversation"
:
{
"current"
:
-1
,
"list"
:
[]
},
"plugin"
:
{
...
...
utils/base.js
View file @
73496ad6
...
...
@@ -3,8 +3,8 @@ var app = getApp()
const
qiniuUploader
=
require
(
"
./qiniuUploader.js
"
);
class
Base
{
constructor
()
{
this
.
baseUrl
=
'
https://wandoutiyu.xueyoubangedu.com/api/
'
//线上接口
//
this.baseUrl = 'https://wandoutiyu.test.xueyoubangedu.com/api/' //测试接口
//
this.baseUrl = 'https://wandoutiyu.xueyoubangedu.com/api/' //线上接口
this
.
baseUrl
=
'
https://wandoutiyu.test.xueyoubangedu.com/api/
'
//测试接口
}
newRequest
(
params
,
flag
=
false
,
tips
=
true
)
{
let
that
=
this
...
...
@@ -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
'
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment