Commit 1fae4902 authored by 吴颖's avatar 吴颖

Merge branch 'master' of...

Merge branch 'master' of http://gitlab.xueyoubangedu.com/shipanpan/wandouchengzhang_coach into wuying
parents 91b7f6d4 b9ce6834
......@@ -7,9 +7,10 @@
.elegant_today {
color: #000;
background: url('https://wdty.xueyoubangedu.com/wandou/today.png') no-repeat;
background: #FFFFFF;
/* background: url('https://wdty.xueyoubangedu.com/wandou/today.png') no-repeat;
background-size: 62rpx 62rpx;
background-color: transparent;
background-color: transparent; */
}
.elegant_choosed {
......
......@@ -22,6 +22,8 @@ Page({
isMoment: true, // 课程瞬间是否能点击
curTime: '', // 当前时间
isrefresh: false
},
/**
......@@ -39,6 +41,17 @@ Page({
})
this.getDetail()
},
onShow() {
this.setData({
isrefresh: this.data.isrefresh? this.data.isrefresh : false
})
if (this.data.isrefresh) {
this.getDetail()
this.setData({
isrefresh: false
})
}
},
getDate() {
let date = util.formatTime(new Date())
let newDate = new Date()
......@@ -115,6 +128,7 @@ Page({
let class_single_id = e.currentTarget.dataset.class_single_id
let course_id = e.currentTarget.dataset.course_id
console.log(course_id)
console.log(class_single_id)
wx.navigateTo({
url: '/pages/index/evaluation/evaluation?child_id=' + child_id + '&class_id=' + class_id + '&class_single_id=' + class_single_id + '&course_id=' + course_id,
})
......
......@@ -90,12 +90,16 @@ Page({
},
// 保存
save: function () {
let Score = true
this.data.scoreArr.map((e) => {
if(e.score == 0){
base.toast('运动表现分值不能为0')
Score = false;
return
}
});
if (!Score) return
if (this.data.value =='') {
base.toast('教练评语不能为空')
return
......@@ -111,7 +115,6 @@ Page({
badge_ids: this.data.badge_ids.toString(),
class_id: this.data.class_id,
class_single_id: this.data.class_single_id,
// coach_id : 5,
coach_id: app.globalData.coach_id,
},
type: 'POST',
......@@ -119,16 +122,16 @@ Page({
let params = {
url: 'coach/comment_save',
data: {
// coach_id : 5,
coach_id: app.globalData.coach_id,
lesson_id: this.data.class_single_id,
child_id: this.data.child_id,
comment_score: JSON.stringify(obj),
commnet: this.data.value
comment: this.data.value
},
type: 'POST',
callback: (data) => {
base.toast('保存成功')
base.goBack(2)
}
}
base.newRequest(params)
......
......@@ -28,7 +28,7 @@
</block>
<block wx:else>
<view class="empty">
<van-empty class="custom-image" image="/images/without.png" description="暂无课程" />
<van-empty class="custom-image" image="/images/without.png" description="暂无回复" />
</view>
</block>
</view>
\ No newline at end of file
......@@ -22,6 +22,7 @@ Page({
*/
onLoad: function (options) {
this.getCitylist()
this.getMyarea()
},
showCitypop(e) {
this.setData({
......@@ -34,6 +35,22 @@ Page({
show: false
})
},
getMyarea : function () {
let params = {
url:'coach/myarea',
data : {
coach_id: app.globalData.coach_id,
},
callback : (data) => {
console.log(data)
this.setData({
myarea : data
})
}
}
base.newRequest(params)
},
getCitylist: function () {
let params = {
url: 'coach/city',
......
......@@ -4,9 +4,9 @@
</view>
<view class="select">选择意向区域</view>
<view class="item" wx:for="{{forIndex}}" wx:key="index">
<view class="every flex-h flex-vc flex-hb">
<view>意向区域{{index+1}}</view>
<view bindtap="showCitypop" data-index="{{index+1}}">
<view class="every flex-h flex-vc">
<view class="one">意向区域{{index+1}}</view>
<view class="two" bindtap="showCitypop" data-index="{{index+1}}">
<text wx:if="{{index == 0}}">{{first_area_name}}</text>
<text wx:if="{{index == 1}}">{{second_area_name}}</text>
<text wx:if="{{index == 2}}">{{third_area_name}}</text>
......
......@@ -128,3 +128,12 @@ color: #1A1A1A;
text-align: center;
line-height: 80rpx;
}
.one{
width: 150rpx;
}
.two{
width: 600rpx;
text-align: right;
}
\ No newline at end of file
const app = getApp()
import {
Base
} from '../../../utils/base.js';
const base = new Base()
Page({
/**
* 页面的初始数据
*/
data: {
success : true,
type: '1',
curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png'
success: true,
status: '0',
curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png',
role_type: '2',
telPhone: ''
},
/**
......@@ -14,7 +18,7 @@ Page({
*/
onLoad: function (options) {
this.setData({
type: options.type
status: options.status ? options.status : '0'
})
},
copy: function (e) {
......@@ -33,5 +37,26 @@ Page({
wx.previewImage({
urls: [this.data.curImage]
})
},
save() {
let params = {
url: 'apply',
type: 'POST',
data: {
role_type: this.data.role_type,
mobile: wx.getStorageSync('userTel')
},
callback: (data) => {
wx.redirectTo({
url: '/pages/sign/applyResult/applyResult?status=0',
})
},
confirmback: () => {
wx.redirectTo({
url: '/pages/sign/applyResult/applyResult?status=2',
})
}
}
base.newRequest(params)
}
})
\ No newline at end of file
......@@ -13,7 +13,7 @@
</view>
</view> -->
<view>
<view class="one" wx:if="{{ success }}">
<view class="one" wx:if="{{ status == 0 }}">
<image src="/images/loading.png"></image>
<view>您的申请正在审核中</view>
</view>
......
......@@ -20,11 +20,12 @@ Page({
callback: (data) => {
let status;
if (data.length == 0) { // 没有申请过
status = 1
} else if (data.status_display == '待审核') {
status = 2
} else {
status = 3
} else if (data.status == 2 || data.status == 0) { // 待审核或者审核失败
status = data.status
} else if (data.status == 1){ // 通过
app.globalData.coach_id = data.wxuser.coach.id
status = 1
}
this.getLogin(status)
}
......@@ -32,15 +33,15 @@ Page({
base.newRequest(params)
},
getLogin(status) {
if (status == 3) {
if (status == 1) {
wx.switchTab({
url: '/pages/tabbar/index/index',
})
} else if (status == 2) {
} else if (status == 2 || status == 0) {
wx.redirectTo({
url: '/pages/sign/applyResult/applyResult',
url: '/pages/sign/applyResult/applyResult?status=' + status,
})
} else if (status == 1) {
} else if (status == 3) {
wx.redirectTo({
url: '/pages/sign/apply/apply',
})
......
......@@ -7,6 +7,7 @@ const base = new Base()
Page({
data: {
show : false,
activeIndex: 1,
coach_id: '',
role_id: '2',
......@@ -34,6 +35,16 @@ Page({
this.getList(1)
this.getList(2)
},
showPopup : function (){
this.setData({
show : true
})
},
onClose : function (){
this.setData({
show : false
})
},
changeTab(e) {
let index = e.currentTarget.dataset.index
if (this.data.activeIndex != index) {
......
......@@ -24,7 +24,7 @@
<view class="num">{{detail ? detail.total_revenue: 0}}</view>
<view class="small">已结算</view>
</view>
<van-icon class="question_icon" name="question-o" />
<van-icon class="question_icon" name="question-o" catchtap="showPopup" />
</view>
<view class="content1" wx:if="{{profitList.length > 0}}">
......@@ -63,11 +63,14 @@
<view class="small">已结算</view>
</view>
<van-icon class="question_icon" name="question-o" />
<van-icon class="question_icon" name="question-o" catchtap="showPopup" />
<view class="share" catchtap="withdrawClick">全部提现</view>
</view>
<view class="tip">提示:每周二为提现日!其他日不支持提现</view>
<view class="tips">
<image src="/images/tipbg.png"></image>
<text>提示:每周二为提现日!其他日不支持提现</text>
</view>
<view class="content1" wx:if='{{withdrawList.length > 0}}'>
<view class="content1_head flex-h flex-vc">
<view style="width:50%">日期</view>
......@@ -92,3 +95,17 @@
</view>
</view>
</view>
<view class="cityBox" wx:if="{{ show }}" catchtap="onClose">
<view class="cityContent">
<view class="cityTitle">
收益规则
<text class="iconfont iconguanbi1" catchtap="onClose"></text>
</view>
<view class="cityCenter">
<view>1.每节课程完成后预计收益变为已结算收益,每节课程完成后预计收益变为已结算收益;</view>
<view>2.已结算的收益可以于每周二在提现页面进行提现,目前平台支持提现至微信账户。</view>
</view>
<view class="cityConfirm" catchtap="onClose">我知道了</view>
</view>
</view>
\ No newline at end of file
......@@ -105,10 +105,12 @@
box-shadow: 0 10rpx 20rpx 10rpx rgba(239, 240, 241, 0.72);
position: relative;
}
.detailed .item-one {
text-align: center;
width: 50%;
}
.detailed .item-one .num {
color: #FFDEAA;
font-size: 50rpx;
......@@ -126,6 +128,7 @@
position: absolute;
top: 46rpx;
left: 344rpx;
opacity: 0.3;
}
.question_icon {
......@@ -150,7 +153,7 @@
right: 0;
}
.tip {
/* .tip {
width: 690rpx;
height: 53rpx;
background: #FFF2DD;
......@@ -160,6 +163,30 @@
text-align: left;
padding-left: 12rpx;
margin-left: 30rpx;
} */
.tips {
width: 690rpx;
margin-bottom: 30rpx;
margin-left: 30rpx;
font-size: 24rpx;
color: #7F5C37;
height: 53rpx;
position: relative;
}
.tips image {
width: 100%;
height: 100%;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.tips text {
color: #7F5C37;
position: absolute;
left: 24rpx;
line-height: 53rpx;
}
/* table表格 */
......@@ -197,3 +224,63 @@
.content1_body_th:nth-child(2n) {
background: #F7F8FA;
}
/* 弹窗样式 */
.cityBox {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
z-index: 20;
}
.cityContent {
width: 500rpx;
height: auto;
background: #FFFFFF;
border-radius: 10rpx;
margin: 40% auto;
padding: 54rpx 0 51rpx 0;
position: relative;
}
.cityTitle {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #1A1A1A;
width: 100%;
text-align: center;
margin-bottom: 58rpx;
}
.cityTitle text {
position: absolute;
right: 39rpx;
top: 43rpx;
color: #CCCCCC;
}
.cityCenter {
padding-left: 40rpx;
padding-right: 40rpx;
color: #808080;
font-size: 26rpx;
line-height: 46rpx;
}
.cityConfirm {
width: 345rpx;
height: 68rpx;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 34rpx;
text-align: center;
line-height: 68rpx;
margin: 29rpx auto 0 auto;
font-size: 28rpx;
color: #1A1A1A;
}
......@@ -11,7 +11,7 @@ Page({
*/
data: {
coach_id: '',
isOpen: false,
// isOpen: false,
daysColor: [],
today: '', // 今天日期
curDate: '',
......@@ -89,6 +89,16 @@ Page({
afterCalendarRender(e) {
const calendar = this.selectComponent('#calendar').calendar;
const toSet = [
{
year: this.data.curDate.split('-')[0],
month: this.data.curDate.split('-')[1],
date: this.data.curDate.split('-')[2],
}
]
calendar.setDateStyle(toSet)
calendar.setSelectedDates(toSet)
let daysColor = [];
this.data.allList.forEach(function (el) {
daysColor.push({
......@@ -98,7 +108,7 @@ Page({
class: 'circle_data'
})
})
const calendar = this.selectComponent('#calendar').calendar
// const calendar = this.selectComponent('#calendar').calendar;
calendar.setDateStyle(daysColor)
},
afterTapDate(e) {
......@@ -176,11 +186,11 @@ Page({
}
},
// 日历展开与否
open() {
this.setData({
isOpen: !this.data.isOpen
})
},
// open() {
// this.setData({
// isOpen: !this.data.isOpen
// })
// },
goclassManagement: function (e) {
let item = e.currentTarget.dataset.item
let classTime = this.data.curDate + ' ' + item.start_time + '' + item.end_time
......
<view class="tabContent">
<view class="rili">
<view class="board {{isOpen? 'heightBoard' : ''}}">
<view class="board">
<calendar
id="calendar"
config="{{calendarConfig}}"
......@@ -9,12 +9,12 @@
bind:whenChangeMonth="whenChangeMonth"
/>
</view>
<view class="riliShow">
<!-- <view class="riliShow">
<view class="flex-h flex-vc flex-hc" catchtap="open">
<text>{{isOpen ? '收起':'更多日期'}}</text>
<text class="iconfont icongengduo {{isOpen ? 'up': 'down'}}"></text>
</view>
</view>
</view> -->
</view>
<wxs module="util">
var time = function() {
......
......@@ -23,7 +23,8 @@
background: #FFFFFF;
border-radius: 0;
overflow: hidden;
height: 220rpx;
/* height: 220rpx; */
height: 560rpx;
}
.heightBoard {
height: auto;
......
......@@ -47,7 +47,7 @@ Page({
},
callback:(data)=>{
this.setData({
userInfo: data.wx_user,
userInfo: data,
userTel: data.wx_user.tel.substr(0, 3) + '****' + data.wx_user.tel.substring(7, 11)
})
}
......@@ -77,6 +77,9 @@ Page({
getSubjectlist: function () {
let params = {
url: 'coach/course',
data:{
coach_id: app.globalData.coach_id,
},
callback: (data) => {
this.setData({
subjectList: data
......@@ -118,7 +121,7 @@ Page({
let params = {
url: 'coach/save_course',
data: {
coach_id: 4,
coach_id: app.globalData.coach_id,
course_ids: JSON.stringify(newArr)
},
type: 'POST',
......@@ -127,6 +130,7 @@ Page({
this.setData({
subjectShow: false
})
this.getInfo()
}
}
base.newRequest(params)
......@@ -138,7 +142,7 @@ Page({
success(res) {
if (res.confirm) {
wx.makePhoneCall({
phoneNumber: '400-181-5358'
phoneNumber: '15630107218'
})
}
}
......
<view class="personInf">
<view class="head flex-h flex-vc flex-hb" wx:if='{{showUserInfo}}' catchtap="goUserInfo">
<view class="headLeft flex-h flex-vc">
<image src="{{userInfo.avatarurl}}"></image>
<image src="{{userInfo.wx_user.avatarurl}}"></image>
<view>
<view class="name">{{userInfo.nickname}}</view>
<view class="name">{{userInfo.wx_user.nickname}}</view>
<view class="tel">{{userTel}}</view>
</view>
</view>
......
......@@ -33,7 +33,7 @@
</view>
<view class="item" wx:for="{{lessonList}}" wx:key="index" data-id="{{item.id}}" wx:for-index="idx" >
<image src="/images/select_circle.png" wx:if="{{item.lesson_status == 1}}"></image>
<image src="/images/circle.png" wx:else></image>
<image src="/images/sex_unselect.png" wx:else></image>
<view class="line" wx:if="{{idx != lessonList.length - 1}}"></view>
<view class="{{item.lesson_status == 1 ? 'lesson' : 'unlesson'}}">第{{item.class_index}}节课</view>
<view class="date">日期:{{item.class_date}}</view>
......
......@@ -18,9 +18,9 @@ Page({
let status;
if (data.length == 0) { // 没有申请过
status = 3
} else if (data.status == 2) {
status = 2
} else { // 通过
} else if (data.status == 2 || data.status == 0) { // 待审核或者审核失败
status = data.status
} else if (data.status == 1){ // 通过
app.globalData.coach_id = data.wxuser.coach.id
status = 1
}
......@@ -37,9 +37,9 @@ Page({
wx.switchTab({
url: '/pages/tabbar/index/index',
})
} else if (status == 2) {
} else if (status == 2 || status == 0) {
wx.redirectTo({
url: '/pages/sign/applyResult/applyResult',
url: '/pages/sign/applyResult/applyResult?status=' + status,
})
} else if (status == 3) {
wx.redirectTo({
......
......@@ -111,7 +111,7 @@
}
function getQiniuToken(callback) {
var that = this
// var that = this
wx.request({
url: config.qiniuUploadTokenURL,
data: {
......@@ -127,7 +127,7 @@
}
} else if (res.data.meta.code == 400) {
app.getSessionKey(function () {
that.getQiniuToken(callback)
getQiniuToken(callback)
})
}
},
......
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