Commit 5d03a842 authored by 石盼盼's avatar 石盼盼

教练申请页面,财务接口增加参数

parent 9611b500
......@@ -58,7 +58,7 @@ App({
codeChangeToken(code, cb) {
let that = this
wx.request({
url: 'https://wandoutiyu.xueyoubangedu.com/api/getsessionkey',
url: 'https://wandoutiyu.test.xueyoubangedu.com/api/getsessionkey',
data: {
code: code
},
......@@ -87,7 +87,7 @@ App({
wx.checkSession({
success() {
wx.request({
url: 'https://wandoutiyu.xueyoubangedu.com/api/saveinfo',
url: 'https://wandoutiyu.test.xueyoubangedu.com/api/saveinfo',
data: {
encryptedData: encodeURIComponent(info.encryptedData),
iv: encodeURIComponent(info.iv),
......
......@@ -6,9 +6,24 @@ const base = new Base()
Page({
data: {
showCoach: false,
user_id: '',
role_type: '2',
telPhone: ''
telPhone: '',
gender: [
{
name: 'male',
value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
},
{
name: 'famale',
value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
},
],
},
onLoad: function (options) {
......@@ -17,6 +32,54 @@ Page({
})
console.log(this.data.user_id)
},
// 性别选择
gender: function (e) {
var index = e.currentTarget.dataset.index;
this.setData({
selectedIndex: index,
})
console.log(this.data.selectedIndex)
},
showPopup() {
this.setData({
showCoach: true
})
},
Close() {
this.setData({
showCoach: false
})
},
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
})
},
getPhoneNumber: function (e) {
var that = this
......@@ -30,11 +93,11 @@ Page({
type: "POST",
callback: (data) => {
this.setData({
telPhone: data.phoneNumber
telPhone: data.phoneNumber,
showCoach : true
})
app.globalData.userTel = data.phoneNumber
wx.setStorageSync('userTel', data.phoneNumber)
that.apply()
},
}
base.newRequest(params)
......@@ -48,14 +111,20 @@ Page({
type: 'POST',
data: {
role_type: this.data.role_type,
mobile: this.data.telPhone
mobile: this.data.telPhone,
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)=>{
callback: (data) => {
wx.redirectTo({
url: '/pages/sign/applyResult/applyResult?type=success',
})
},
confirmback:()=>{
confirmback: () => {
wx.redirectTo({
url: '/pages/sign/applyResult/applyResult?type=fail',
})
......
......@@ -7,5 +7,34 @@
<button class="save" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">申请成为教练</button>
</view>
<!-- <view class="btn">
<button class="save" catchtap="showPopup">申请成为教练</button>
</view> -->
</view>
<!-- 填写信息弹窗 -->
<view class="cityBox" wx:if="{{ showCoach }}">
<view class="txContent">
<view class="top">
<view class="title">请填写申请信息</view>
<text class="iconfont iconguanbi1" catchtap="Close"></text>
</view>
<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="{{index}}" bindtap="gender">
<text class="genderText">{{item.value}}</text>
<image wx:if="{{index == 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="{{ 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" />
<van-field value="{{ value }}" placeholder="请输入相关证书 (选填)" border="{{ true }}" bind:change="certificate" />
</view>
<button class="submit" bindtap="apply">提交</button>
</view>
</view>
\ No newline at end of file
.img {
width: 690rpx;
height: 2652rpx;
margin: 30rpx auto 300rpx;
margin: 30rpx auto 150rpx;
}
.img image {
......@@ -22,10 +21,145 @@
width: 620rpx;
height: 80rpx;
border: none;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
background: linear-gradient(-18deg, #FF6B0F 0%, #FF984D 100%);
border-radius: 40rpx;
color: #000000;
font-size: 30rpx;
text-align: center;
line-height: 50rpx;
}
/* 填写信息弹窗样式 */
.cityBox {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
z-index: 20;
}
.txContent {
width: 610rpx;
background: #FFFFFF;
border-radius: 10rpx;
margin: 24% auto;
position: relative;
padding-top: 44rpx;
padding-bottom: 20rpx;
}
.txContent .title {
color: #1A1A1A;
font-size: 34rpx;
text-align: center;
font-weight: bold;
}
.iconguanbi1 {
position: absolute;
top: 26rpx;
right: 28rpx;
color: #CCCCCC;
}
.center {
font-size: 26rpx;
color: #808080;
line-height: 42rpx;
padding: 30rpx 28rpx 0;
}
.input1 {
width: 490rpx;
height: 60rpx;
border-bottom: 1px solid #EBEBEB;
margin: 0 auto;
line-height: 60rpx;
margin-bottom: 20rpx;
}
.submit {
width: 320rpx;
height: 72rpx;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 36px;
color: #1A1A1A;
font-size: 28rpx;
text-align: center;
line-height: 48rpx;
margin: 50rpx 140rpx 20rpx;
}
.inputbox {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 490rpx;
height: 80rpx;
line-height: 80rpx;
border-bottom: 1px solid #f1f1f1;
font-size: 26rpx;
color: #000000;
margin: 0 auto;
}
.sexBox{
overflow: hidden;
width: 490rpx;
height: 80rpx;
margin: 0 auto;
border-bottom: 1rpx solid #ebedf0;
}
.gender{
float: left;
line-height: 80rpx;
margin-right: 50rpx;
color: #000000;
font-size: 26rpx;
}
.gender image{
width: 27rpx;
height: 27rpx;
vertical-align: middle;
}
.gender .genderText{
margin-right: 10rpx;
}
.inpbox {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.inp {
position: relative;
width: 100%;
height: 80rpx;
}
.radiogroup {
display: flex;
flex-direction: row;
}
.radiobox {
display: flex;
flex-direction: row;
}
.radiotxt {
margin-right: 10rpx;
}
.phone {
width: 490rpx;
height: 80rpx;
margin: 0 auto;
line-height: 80rpx;
border-bottom: 1rpx solid #ebedf0;
}
\ No newline at end of file
......@@ -10,7 +10,21 @@ Page({
status: '0',
curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png',
role_type: '2',
telPhone: ''
telPhone: '',
gender: [
{
name: 'male',
value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
},
{
name: 'famale',
value: '',
icon: 'https://wdty.xueyoubangedu.com/wandou/sexUnselected.png',
iconActive: 'https://wdty.xueyoubangedu.com/wandou/sexSelected.png'
},
],
},
/**
......@@ -21,6 +35,64 @@ Page({
status: options.status ? options.status : '0'
})
},
showPopup() {
this.setData({
showCoach: true
})
},
Close() {
this.setData({
showCoach: false
})
},
// 性别选择
gender: function (e) {
var index = e.currentTarget.dataset.index;
this.setData({
selectedIndex: index,
})
console.log(this.data.selectedIndex)
},
showPopup() {
this.setData({
showCoach: true
})
},
Close() {
this.setData({
showCoach: false
})
},
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
})
},
copy: function (e) {
wx.setClipboardData({
data: 'bu15333212792',
......
......@@ -21,7 +21,35 @@
<image src="/images/fail.png"></image>
<view class="fail">抱歉,您的申请未通过</view>
<view class="button">
<view class="apply" bindtap="save">重新申请</view>
<view class="apply" bindtap="showPopup">重新申请</view>
</view>
</view>
</view>
<!-- 填写信息弹窗 -->
<view class="cityBox" wx:if="{{ showCoach }}">
<view class="txContent">
<view class="top">
<view class="title">请填写申请信息</view>
<text class="iconfont iconguanbi1" catchtap="Close"></text>
</view>
<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="{{index}}" bindtap="gender">
<text class="genderText">{{item.value}}</text>
<image wx:if="{{index == 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="{{ 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" />
<van-field value="{{ value }}" placeholder="请输入相关证书 (选填)" border="{{ true }}" bind:change="certificate" />
</view>
<button class="submit" bindtap="save">提交</button>
</view>
</view>
\ No newline at end of file
......@@ -105,3 +105,138 @@
text-align: center;
line-height: 80rpx;
}
/* 填写信息弹窗样式 */
.cityBox {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
z-index: 20;
}
.txContent {
width: 610rpx;
background: #FFFFFF;
border-radius: 10rpx;
margin: 24% auto;
position: relative;
padding-top: 44rpx;
padding-bottom: 20rpx;
}
.txContent .title {
color: #1A1A1A;
font-size: 34rpx;
text-align: center;
font-weight: bold;
}
.iconguanbi1 {
position: absolute;
top: 26rpx;
right: 28rpx;
color: #CCCCCC;
}
.center {
font-size: 26rpx;
color: #808080;
line-height: 42rpx;
padding: 30rpx 28rpx 0;
}
.input1 {
width: 490rpx;
height: 60rpx;
border-bottom: 1px solid #EBEBEB;
margin: 0 auto;
line-height: 60rpx;
margin-bottom: 20rpx;
}
.submit {
width: 320rpx;
height: 72rpx;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 36px;
color: #1A1A1A;
font-size: 28rpx;
text-align: center;
line-height: 48rpx;
margin: 50rpx 140rpx 20rpx;
}
.inputbox {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 490rpx;
height: 80rpx;
line-height: 80rpx;
border-bottom: 1px solid #f1f1f1;
font-size: 26rpx;
color: #000000;
margin: 0 auto;
}
.sexBox{
overflow: hidden;
width: 490rpx;
height: 80rpx;
margin: 0 auto;
border-bottom: 1rpx solid #ebedf0;
}
.gender{
float: left;
line-height: 80rpx;
margin-right: 50rpx;
color: #000000;
font-size: 26rpx;
}
.gender image{
width: 27rpx;
height: 27rpx;
vertical-align: middle;
}
.gender .genderText{
margin-right: 10rpx;
}
.inpbox {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.inp {
position: relative;
width: 100%;
height: 80rpx;
}
.radiogroup {
display: flex;
flex-direction: row;
}
.radiobox {
display: flex;
flex-direction: row;
}
.radiotxt {
margin-right: 10rpx;
}
.phone {
width: 490rpx;
height: 80rpx;
margin: 0 auto;
line-height: 80rpx;
border-bottom: 1rpx solid #ebedf0;
}
\ No newline at end of file
......@@ -96,6 +96,7 @@ Page({
url: 'commission',
data: {
wx_user_id: this.data.user_id,
role_id: this.data.role_id
},
callback: (data) => {
this.setData({
......@@ -206,7 +207,8 @@ Page({
type: 'POST',
data: {
wx_user_id: this.data.user_id,
amount: this.data.detail.unrealized_revenue
amount: this.data.detail.unrealized_revenue,
role_id: this.data.role_id
},
callback:(data)=>{
base.toast('提现成功')
......
......@@ -21,22 +21,22 @@
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"enableEngineNative": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"bundle": false
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.14.0",
......@@ -50,6 +50,14 @@
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"list": []
},
......@@ -160,50 +168,9 @@
"scene": null
},
{
"name": "财务",
"pathName": "pages/tabbar/financial/financial",
"query": "",
"scene": null
},
{
"name": "课程管理详情页面",
"pathName": "pages/index/classManagement/classManagement",
"query": "",
"scene": null
},
{
"name": "申请成为教练",
"id": -1,
"name": "pages/sign/apply/apply",
"pathName": "pages/sign/apply/apply",
"query": "",
"scene": null
},
{
"name": "课程瞬间上传",
"pathName": "pages/index/courseInstant/courseInstant",
"query": "type=check&lesson_id=93",
"scene": null
},
{
"name": "教学区域",
"pathName": "pages/my/teachingArea/teachingArea",
"query": "",
"scene": null
},
{
"name": "课程管理",
"pathName": "pages/index/classManagement/classManagement",
"query": "classTime=2020-11-28 10:00~11:00&class_id=23&lesson_id=85",
"scene": null
},
{
"name": "运动评价",
"pathName": "pages/index/evaluation/evaluation",
"query": "child_id=341&class_id=25&class_single_id=93&course_id=1001",
"scene": null
},
{
"name": "pages/tabbar/index/index",
"pathName": "pages/tabbar/index/index",
"scene": null
}
]
......
......@@ -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
......
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