Commit be62932b authored by 石盼盼's avatar 石盼盼

Merge branch 'shipanpan' into 'master'

Shipanpan

See merge request !37
parents aad0b7a6 3bb582ba
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
.elegant_today { .elegant_today {
color: #000; 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-size: 62rpx 62rpx;
background-color: transparent; background-color: transparent; */
} }
.elegant_choosed { .elegant_choosed {
......
const app = getApp()
import {
Base
} from '../../../utils/base.js';
const base = new Base()
Page({ Page({
/**
* 页面的初始数据
*/
data: { data: {
success : true, success: true,
type: '1', status: '0',
curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png' curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png',
role_type: '2',
telPhone: ''
}, },
/** /**
...@@ -14,7 +18,7 @@ Page({ ...@@ -14,7 +18,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
type: options.type status: options.status ? options.status : '0'
}) })
}, },
copy: function (e) { copy: function (e) {
...@@ -33,5 +37,26 @@ Page({ ...@@ -33,5 +37,26 @@ Page({
wx.previewImage({ wx.previewImage({
urls: [this.data.curImage] 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 @@ ...@@ -13,7 +13,7 @@
</view> </view>
</view> --> </view> -->
<view> <view>
<view class="one" wx:if="{{ success }}"> <view class="one" wx:if="{{ status == 0 }}">
<image src="/images/loading.png"></image> <image src="/images/loading.png"></image>
<view>您的申请正在审核中</view> <view>您的申请正在审核中</view>
</view> </view>
......
...@@ -20,11 +20,12 @@ Page({ ...@@ -20,11 +20,12 @@ Page({
callback: (data) => { callback: (data) => {
let status; let status;
if (data.length == 0) { // 没有申请过 if (data.length == 0) { // 没有申请过
status = 1
} else if (data.status_display == '待审核') {
status = 2
} else {
status = 3 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) this.getLogin(status)
} }
...@@ -32,15 +33,15 @@ Page({ ...@@ -32,15 +33,15 @@ Page({
base.newRequest(params) base.newRequest(params)
}, },
getLogin(status) { getLogin(status) {
if (status == 3) { if (status == 1) {
wx.switchTab({ wx.switchTab({
url: '/pages/tabbar/index/index', url: '/pages/tabbar/index/index',
}) })
} else if (status == 2) { } else if (status == 2 || status == 0) {
wx.redirectTo({ wx.redirectTo({
url: '/pages/sign/applyResult/applyResult', url: '/pages/sign/applyResult/applyResult?status=' + status,
}) })
} else if (status == 1) { } else if (status == 3) {
wx.redirectTo({ wx.redirectTo({
url: '/pages/sign/apply/apply', url: '/pages/sign/apply/apply',
}) })
......
...@@ -11,7 +11,7 @@ Page({ ...@@ -11,7 +11,7 @@ Page({
*/ */
data: { data: {
coach_id: '', coach_id: '',
isOpen: false, // isOpen: false,
daysColor: [], daysColor: [],
today: '', // 今天日期 today: '', // 今天日期
curDate: '', curDate: '',
...@@ -89,6 +89,16 @@ Page({ ...@@ -89,6 +89,16 @@ Page({
afterCalendarRender(e) { 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 = []; let daysColor = [];
this.data.allList.forEach(function (el) { this.data.allList.forEach(function (el) {
daysColor.push({ daysColor.push({
...@@ -98,7 +108,7 @@ Page({ ...@@ -98,7 +108,7 @@ Page({
class: 'circle_data' class: 'circle_data'
}) })
}) })
const calendar = this.selectComponent('#calendar').calendar // const calendar = this.selectComponent('#calendar').calendar;
calendar.setDateStyle(daysColor) calendar.setDateStyle(daysColor)
}, },
afterTapDate(e) { afterTapDate(e) {
...@@ -176,11 +186,11 @@ Page({ ...@@ -176,11 +186,11 @@ Page({
} }
}, },
// 日历展开与否 // 日历展开与否
open() { // open() {
this.setData({ // this.setData({
isOpen: !this.data.isOpen // isOpen: !this.data.isOpen
}) // })
}, // },
goclassManagement: function (e) { goclassManagement: function (e) {
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
let classTime = this.data.curDate + ' ' + item.start_time + '' + item.end_time let classTime = this.data.curDate + ' ' + item.start_time + '' + item.end_time
......
<view class="tabContent"> <view class="tabContent">
<view class="rili"> <view class="rili">
<view class="board {{isOpen? 'heightBoard' : ''}}"> <view class="board">
<calendar <calendar
id="calendar" id="calendar"
config="{{calendarConfig}}" config="{{calendarConfig}}"
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
bind:whenChangeMonth="whenChangeMonth" bind:whenChangeMonth="whenChangeMonth"
/> />
</view> </view>
<view class="riliShow"> <!-- <view class="riliShow">
<view class="flex-h flex-vc flex-hc" catchtap="open"> <view class="flex-h flex-vc flex-hc" catchtap="open">
<text>{{isOpen ? '收起':'更多日期'}}</text> <text>{{isOpen ? '收起':'更多日期'}}</text>
<text class="iconfont icongengduo {{isOpen ? 'up': 'down'}}"></text> <text class="iconfont icongengduo {{isOpen ? 'up': 'down'}}"></text>
</view> </view>
</view> </view> -->
</view> </view>
<wxs module="util"> <wxs module="util">
var time = function() { var time = function() {
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
background: #FFFFFF; background: #FFFFFF;
border-radius: 0; border-radius: 0;
overflow: hidden; overflow: hidden;
height: 220rpx; /* height: 220rpx; */
height: 560rpx;
} }
.heightBoard { .heightBoard {
height: auto; height: auto;
......
...@@ -18,9 +18,9 @@ Page({ ...@@ -18,9 +18,9 @@ Page({
let status; let status;
if (data.length == 0) { // 没有申请过 if (data.length == 0) { // 没有申请过
status = 3 status = 3
} else if (data.status == 2) { } else if (data.status == 2 || data.status == 0) { // 待审核或者审核失败
status = 2 status = data.status
} else { // 通过 } else if (data.status == 1){ // 通过
app.globalData.coach_id = data.wxuser.coach.id app.globalData.coach_id = data.wxuser.coach.id
status = 1 status = 1
} }
...@@ -37,9 +37,9 @@ Page({ ...@@ -37,9 +37,9 @@ Page({
wx.switchTab({ wx.switchTab({
url: '/pages/tabbar/index/index', url: '/pages/tabbar/index/index',
}) })
} else if (status == 2) { } else if (status == 2 || status == 0) {
wx.redirectTo({ wx.redirectTo({
url: '/pages/sign/applyResult/applyResult', url: '/pages/sign/applyResult/applyResult?status=' + status,
}) })
} else if (status == 3) { } else if (status == 3) {
wx.redirectTo({ wx.redirectTo({
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
} }
function getQiniuToken(callback) { function getQiniuToken(callback) {
var that = this // var that = this
wx.request({ wx.request({
url: config.qiniuUploadTokenURL, url: config.qiniuUploadTokenURL,
data: { data: {
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
} }
} else if (res.data.meta.code == 400) { } else if (res.data.meta.code == 400) {
app.getSessionKey(function () { 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