Browse Source

预约接口

master
unknown 12 months ago
parent
commit
6193545554
  1. 6
      common/js/mixins.js
  2. 32
      config/api.js
  3. 8
      config/request.js
  4. 4
      config/site.config.js
  5. 2
      manifest.json
  6. 11
      pages.json
  7. 27
      pages/login/login.vue
  8. 4
      pages/other/webView/webView.vue
  9. 51
      pages/recordEntry/operate/mySchedule/mould/mould.vue
  10. 236
      pages/recordEntry/operate/mySchedule/mouldEdit/mouldAdd.vue
  11. 95
      pages/recordEntry/operate/mySchedule/mouldEdit/mouldEdit.vue
  12. 17
      pages/recordEntry/operate/mySchedule/mySchedule.vue
  13. 43
      pages/recordEntry/operate/mySchedule/plan/plan.vue
  14. 10
      pages/tabbar/operateTrain/index.vue

6
common/js/mixins.js

@ -5,7 +5,11 @@ export default {
computed: {
...mapState({
identity: state=> state.user.identity,
role: state=>state.user.vuex_userInfo.roles
role: state=>state.user.vuex_userInfo.roles,
vuex_userInfo: state=>state.user.vuex_userInfo,
vuex_deptId: state=>state.user.vuex_userInfo.user.deptId,
vuex_coachId: state=>state.user.vuex_userInfo.coachId || '1591015108974329858',
}),
},
data() {

32
config/api.js

@ -7,13 +7,41 @@ export const getAgreement = (params, config = {}) => http.post('/util/manage/get
// 验证码登录
export const loginPwd = (data) => http.post('system/auth/login', data, { custom: { noToken: true , 'Tenant-Id': data['Tenant-Id']}})
// 获取个人信息
export const getUserInfo = (data) => http.post('member/user/get', {header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}})
export const getUserInfo = (data) => http.post('member/user/get', {header: {'contentType': 1}})
// 退出登录
export const logOut = (data={}) => http.post('member/auth/logout', data, { custom: { noToken: true }})
// 驾校列表分页
export const schoolPage = (params) => http.get('business/school/page', {params: params})
// 获得租户分页
export const tenantPage = (params) => http.get('system/tenant/pages', {params: params})
export const tenantPage = (params) => http.get('system/tenant/pages', {params: params, custom: { noToken: true }})
// 实操预约记录分页
export const bookingMasterPage = (params) => http.get('business/booking/master/page', {params: params, })
// 获得我的排课详情
export const scheduleClassGetById = (params) => http.get('business/booking/schedule-class/getById', {params: params, })
// 获得排课
export const scheduleClassGet = (params) => http.get('business/booking/schedule-class/get', {params: params, })
// 发布排课计划
export const scheduleClassCreate = (data) => http.post('business/booking/schedule-class/create', data)
// 获取排课日期范围
export const getClassDateLimit = (params) => http.get('business/booking/global-config/getClassDateLimit', {params} ,)
// 获取排课时间段范围
export const getClassTimeLimt = (params) => http.get('business/booking/global-config/getClassTimeLimt', {params} ,)
// 创建排课模板
export const getClassCreate = (data) => http.post('business/booking/schedule-template/create', data ,)
// 排课模板分页
export const scheduleTemplatePage = (params) => http.get('business/booking/schedule-template/page', {params} ,)
// 更新排课模版
export const scheduleTemplateUpdate = (data) => http.post('business/booking/schedule-template/update', data ,)
// 获取排课模版
export const scheduleTemplateGet = (params) => http.get('business/booking/schedule-template/get', {params} ,)

8
config/request.js

@ -3,7 +3,7 @@ import { H5_API, WX_API,httpPrefix } from './site.config.js'
import { checkToken } from './utils'
const ContentType = ['application/json;charset=utf-8', 'application/x-www-form-urlencoded','multipart/form-data', 'application/x-www-form-urlencoded; charset=UTF-8'];
@ -15,7 +15,6 @@ module.exports = (vm) => {
/* config 为默认全局配置*/
config.baseURL = H5_API+ WX_API + prefix; /* 根域名 */
console.log(config)
// config.header['content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
config.header['tenant-id'] = vm.$store.state.user.vuex_TenantId
return config
@ -24,7 +23,10 @@ module.exports = (vm) => {
// 请求拦截
uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
console.log(config)
// config.header['tenant-id'] = config.custom['Tenant-id']
let contentTypeIndex = config.header.contentType
if(contentTypeIndex) {
config.header['content-type'] = ContentType[contentTypeIndex]
}
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
config.data = config.data || {}
// 根据custom参数中配置的是否需要token,添加对应的请求头

4
config/site.config.js

@ -1,8 +1,8 @@
const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
// localIp = false
module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api/' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/',//非代理地址
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48080/',//非代理地址
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/',
httpPrefix: 'admin-api/',
imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/'

2
manifest.json

@ -82,7 +82,7 @@
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://192.168.1.26:48082/",
"target" : "http://192.168.1.39:48080/",
"changeOrigin" : true,
"secure" : true,
"pathRewrite" : {

11
pages.json

@ -139,7 +139,7 @@
}
},
{
"path": "operate/mySchedule/mouldEdit/mouldEdit",
"path": "operate/mySchedule/mouldEdit/mouldAdd",
"style": {
"navigationBarTitleText": "添加编辑模版",
"navigationStyle": "custom",
@ -148,6 +148,15 @@
}
},
{
"path": "operate/mySchedule/mouldEdit/mouldEdit",
"style": {
"navigationBarTitleText": "编辑编辑模版",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"backgroundTextStyle": "dark"
}
},
{
"path": "operate/mySchedule/detail/detail",
"style": {
"navigationBarTitleText": "我的排课详情",

27
pages/login/login.vue

@ -10,7 +10,7 @@
</view>
<view class="form">
<view class="form-item">
<mySelect :value="FormData.tenantName" @click.native="show=true" placeholder="请选择租户编号"/>
<mySelect :value="FormData.tenantName" @click.native="show=true" placeholder="请选择服务地区"/>
</view>
<view class="form-item">
<view class="inputBox my">
@ -59,8 +59,11 @@
title: '请选择您要登录的角色',
showRole: false,
roleObj: {
app_school_principal: '校长',
xinghuiSchoolManager: '实操教练'
schoolManager: '校长',
schoolFinance: '驾校财务',
coach: '实操教练',
examSiteCoach: '考场模拟教练',
bookingSimulationTeacher: '模拟器老师'
}
}
},
@ -105,13 +108,13 @@
// val = ''
// }
if(name=='模拟器老师') {
this.$store.commit('upDateIdentity', val)
uni.reLaunch({
url: '/pages/tabbar/examSimulation/index'
})
return false
}
// if(name=='') {
// this.$store.commit('upDateIdentity', val)
// uni.reLaunch({
// url: '/pages/tabbar/examSimulation/index'
// })
// return false
// }
this.$store.commit('upDateIdentity', name)
uni.reLaunch({
url: '/pages/tabbar/statistics/index'
@ -166,8 +169,8 @@
},
async submitFn() {
this.chooseIdentity('考场模拟教练')
return
// this.chooseIdentity('')
// return
if(!this.btnHighlight) return
const {data: res} = await loginPwd(this.FormData)
this.$store.commit('update_vuex_loginInfo', res)

4
pages/other/webView/webView.vue

@ -1,7 +1,7 @@
<template>
<view>
<web-view :webview-styles="webviewStyles" src="http://192.168.1.20/system/menu"></web-view>
<!-- <web-view :webview-styles="webviewStyles" :src="$store.state.webViewUrl"></web-view> -->
<!-- <web-view :webview-styles="webviewStyles" src="http://192.168.1.20/system/menu"></web-view> -->
<web-view :webview-styles="webviewStyles" :src="$store.state.webViewUrl"></web-view>
</view>
</template>

51
pages/recordEntry/operate/mySchedule/mould/mould.vue

@ -2,36 +2,55 @@
<view class="pageBgImg">
<topNavbar title="模板"></topNavbar>
<view class="pad">
<view class="card">
<view class="card" v-for="(item,index) in list" :key="index">
<view class="tit_row">
<view class="tit">模板标题</view>
<view class="manage" @click="$goPage('/pages/recordEntry/operate/mySchedule/mouldEdit/mouldEdit')">管理</view>
<view class="tit">{{item.templateName}}</view>
<view class="manage" @click="$goPage('/pages/recordEntry/operate/mySchedule/mouldEdit/mouldEdit?id='+item.id)">管理</view>
</view>
<view class="ul">
<view class="li lab">
<view class="text">时间段</view>
<view class="text">最多人数</view>
</view>
<view class="li" v-for="(item,index) in list" :key="index">
<view class="text">{{ item.time}}</view>
<view class="text">{{ item.num }}</view>
<view class="li" v-for="(item2,index2) in item.detailVO" :key="index">
<view class="text">{{ item2.startTime}} <text>-</text> {{item2.endTime}}</view>
<view class="text">{{ item2.personCount }}</view>
</view>
</view>
</view>
</view>
<view class="btn_footer">
<view class="btnBorder" @click="$goPage('/pages/recordEntry/operate/mySchedule/mouldEdit/mouldAdd' )">新增模版</view>
</view>
</view>
</template>
<script>
import { scheduleTemplatePage } from '@/config/api.js'
export default {
data() {
return {
list: [
{time: '7:00-8:00', num: '4人'},
{time: '7:00-8:00', num: '4人'},
{time: '7:00-8:00', num: '4人'},
{time: '7:00-8:00', num: '4人'},
]
list: [],
total: 20,
params: {
pageNo: 1,
pageSize: 20
}
}
},
onLoad() {
this.params.coachId = this.vuex_coachId
this.scheduleTemplatePageFn()
},
methods: {
async scheduleTemplatePageFn() {
const {data: res} = await scheduleTemplatePage(this.params)
this.params.pageNo ++
this.list.push(...res.list)
this.total = res.total
}
}
}
@ -68,4 +87,12 @@
}
}
}
.btn_footer {
display: flex;
justify-content: center;
padding: 30rpx 0;
.btnBorder {
width: 396rpx;
}
}
</style>

236
pages/recordEntry/operate/mySchedule/mouldEdit/mouldAdd.vue

@ -0,0 +1,236 @@
<template>
<view class="pageBgImg">
<topNavbar title="编辑排课模版"></topNavbar>
<view class="pad">
<view class="card">
<view class="tit flex">
<view class="lab">模板标题</view>
<view class="inputBox my">
<u--input placeholder="请输入内容" border="none" v-model="FormData.templateName" ></u--input>
</view>
</view>
</view>
<view class="card timeCon" v-for="(item,index) in FormData.scheduleClassTemplateDetailList">
<view class="deleteIcon" @click="deleteFn(item.id)" v-if="FormData.scheduleClassTemplateDetailList.length>1">
<u-icon name="close-circle-fill" color="#ADADAD" size="22"></u-icon>
</view>
<view class="row">
<view class="lab">选择时间段</view>
<view class="flex">
<view class="timeTag" @click="showTime(index,'startTime')">
<mySelect :value="item.startTime" placeholder="开始时间"></mySelect>
</view>
<view class="line"></view>
<view class="timeTag" @click.capture="showTime(index,'endTime')">
<mySelect :value="item.endTime" placeholder="结束时间"></mySelect>
</view>
</view>
</view>
<view class="row">
<view class="lab">选择人数</view>
<view class="numBox">
<u-number-box v-model="item.personCount" :max="10"></u-number-box>
</view>
</view>
</view>
<view class="add" @click="$u.throttle(addFn, 500)">
<view class="addIcon">
<image src="@/static/images/coach/tianjia.png" mode=""></image>
</view>
<view class="text">添加</view>
</view>
<view class="btnBg" @click="$u.throttle(getClassCreateFn, 500)">保存为模板</view>
</view>
<u-datetime-picker
:show="show"
v-model="value1"
mode="time"
:minHour="datePicker.minHour"
:maxHour="datePicker.maxHour"
:minMinute="datePicker.minMinute"
:maxMinute="datePicker.maxMinute"
@confirm="confirmTime"
></u-datetime-picker>
</view>
</template>
<script>
import { getClassCreate, getClassTimeLimt } from '@/config/api.js'
export default {
data() {
return {
datePicker: {
minHour: 0,
maxHour: 0,
maxMinute: 59,
minMinute: 0
},
FormData: {},
show: false,
value1: '',
tempDateObj: {},//
}
},
onLoad() {
this.initFormData()
this.getClassTimeLimtFn()
},
methods: {
initFormData() {
this.FormData = {
templateName: '',
scheduleClassTemplateDetailList: [
{startTime: '',endTime: '', personCount: 1, id: new Date() * 1}
]}
this.FormData.coachId = this.vuex_coachId
this.FormData.deptId = this.vuex_deptId
},
//
async getClassTimeLimtFn() {
const {data: res} = await getClassTimeLimt({ coachId: this.vuex_coachId})
this.datePicker.minHour = res.currentClassStartTime.split(':')[0]*1
this.datePicker.maxHour = res.currentClassEndTime.split(':')[0]*1
console.log(this.datePicker)
},
//
async getClassCreateFn() {
this.FormData.scheduleClassTemplateDetailList.forEach((item)=>{
})
for(let i=0; i<this.FormData.scheduleClassTemplateDetailList.length; i++) {
let item = this.FormData.scheduleClassTemplateDetailList[i]
if(!item.endTime||!item.startTime||!item.personCount)
return this.$u.toast('请输入完整的信息')
}
const {data: res} = await getClassCreate(this.FormData)
if(res) this.$u.toast('创建成功')
this.initFormData()
},
addFn() {
let obj = {startTime: '',endTime: '', people: 1, id: new Date() * 1}
this.FormData.scheduleClassTemplateDetailList.push(obj)
},
deleteFn(id) {
let arr = this.FormData.scheduleClassTemplateDetailList
if(arr.length==1) return
let index = arr.findIndex(item=>item.id==id)
if(index==-1) return
arr.splice(index, 1)
},
confirmTime(val) {
this.FormData.scheduleClassTemplateDetailList[this.tempDateObj.index][this.tempDateObj.name] = val.value
console.log(val.value)
this.show = false
},
showTime(index, name) {
this.tempDateObj = {
index, name
}
this.show = true
}
}
}
</script>
<style lang="scss" scoped>
.pageBgImg {
.pad {
.card {
padding: 0 28rpx;
margin-bottom: 20rpx;
&.timeCon {
padding: 28rpx;
}
.tit {
height: 96rpx;
background: #FFFFFF;
border-radius: 16px;
.lab {
width: 172rpx;
font-weight: 500;
color: #333333;
}
.inputBox.my {
flex: 1;
}
}
}
.card {
position: relative;
.deleteIcon {
position: absolute;
right: 20rpx;
top: 20rpx
}
.row {
padding: 12rpx 0;
display: flex;
align-items: center;
.lab {
font-size: 30rpx;
width: 172rpx;
flex-shrink: 0;
}
.flex {
.timeTag {
// padding: 8rpx 14rpx;
background: #F8F8F8;
border-radius: 34rpx;
width: 150rpx;
text-align: center;
height: 52rpx;
line-height: 52rpx;
// width:fit-content;
input {
display: block;
width: 100%;
height: 100%;
font-size: 26rpx;
color: #333333;
}
}
.line {
width: 26rpx;
height: 2rpx;
background: #DADADA;
margin: 0 14rpx;
}
}
}
}
.add {
display: flex;
align-items: center;
justify-content: center;
padding-top: 20rpx;
.addIcon {
width: 36rpx;
height: 36rpx;
}
.text {
font-size: 28rpx;
color: $themC;
margin-left: 10rpx;
}
}
.btnBg {
width: 396rpx;
margin: 96rpx auto 20rpx auto;
}
}
}
</style>

95
pages/recordEntry/operate/mySchedule/mouldEdit/mouldEdit.vue

@ -1,90 +1,143 @@
<template>
<view class="pageBgImg">
<topNavbar title="添加编辑模版"></topNavbar>
<topNavbar title="编辑排课模版"></topNavbar>
<view class="pad">
<view class="card">
<view class="tit flex">
<view class="lab">模板标题</view>
<view class="inputBox my">
<u--input placeholder="请输入内容" border="none" v-model="FormData.title" ></u--input>
<u--input placeholder="请输入内容" border="none" v-model="FormData.templateName" ></u--input>
</view>
</view>
</view>
<view class="card timeCon" v-for="(item,index) in FormData.tiemArr">
<view class="deleteIcon" @click="deleteFn(item.id)">
<view class="card timeCon" v-for="(item,index) in FormData.scheduleClassTemplateDetailList">
<view class="deleteIcon" @click="deleteFn(item.id)" v-if="FormData.scheduleClassTemplateDetailList.length>1">
<u-icon name="close-circle-fill" color="#ADADAD" size="22"></u-icon>
</view>
<view class="row">
<view class="lab">选择时间段</view>
<view class="flex">
<view class="timeTag" >
<mySelect :value="item.startTime" @click="showTime(item,'startTime')" placeholder="开始时间"></mySelect>
<view class="timeTag" @click="showTime(index,'startTime')">
<mySelect :value="item.startTime" placeholder="开始时间"></mySelect>
</view>
<view class="line"></view>
<view class="timeTag" @click.capture="showTime(item,'endTime')">
<mySelect :value="item.startTime" @click="showTime(item,'startTime')" placeholder="结束时间"></mySelect>
<view class="timeTag" @click.capture="showTime(index,'endTime')">
<mySelect :value="item.endTime" placeholder="结束时间"></mySelect>
</view>
</view>
</view>
<view class="row">
<view class="lab">选择人数</view>
<view class="numBox">
<u-number-box v-model="item.people" :max="10"></u-number-box>
<u-number-box v-model="item.personCount" :max="10"></u-number-box>
</view>
</view>
</view>
<view class="add" @click="addFn">
<view class="add" @click="$u.throttle(addFn, 500)">
<view class="addIcon">
<image src="@/static/images/coach/tianjia.png" mode=""></image>
</view>
<view class="text">添加</view>
</view>
<view class="btnBg">保存为模板</view>
<view class="btnBg" @click="$u.throttle(getClassCreateFn, 500)">保存为模板</view>
</view>
<u-datetime-picker
:show="show"
v-model="value1"
mode="time"
:minHour="datePicker.minHour"
:maxHour="datePicker.maxHour"
:minMinute="datePicker.minMinute"
:maxMinute="datePicker.maxMinute"
@confirm="confirmTime"
></u-datetime-picker>
</view>
</template>
<script>
import { getClassCreate, getClassTimeLimt, scheduleTemplateGet } from '@/config/api.js'
export default {
data() {
return {
FormData: {
title: '',
tiemArr: [
{startTime: '',endTime: '', people: 1, id: new Date() * 1}
]
datePicker: {
minHour: 0,
maxHour: 0,
maxMinute: 59,
minMinute: 0
},
FormData: {},
show: false,
value1: ''
value1: '',
tempDateObj: {},//
}
},
onLoad(options) {
this.id = options.id
this.scheduleTemplateGetFn()
this.getClassTimeLimtFn()
},
methods: {
initFormData() {
this.FormData = {
templateName: '',
scheduleClassTemplateDetailList: [
{startTime: '',endTime: '', personCount: 1, id: new Date() * 1}
]}
this.FormData.coachId = this.vuex_coachId
this.FormData.deptId = this.vuex_deptId
},
//
async scheduleTemplateGetFn() {
const {data: res} = await scheduleTemplateGet({id: this.id})
},
//
async getClassTimeLimtFn() {
const {data: res} = await getClassTimeLimt({ coachId: this.vuex_coachId, })
this.datePicker.minHour = res.currentClassStartTime.split(':')[0]*1
this.datePicker.maxHour = res.currentClassEndTime.split(':')[0]*1
console.log(this.datePicker)
},
//
async getClassCreateFn() {
this.FormData.scheduleClassTemplateDetailList.forEach((item)=>{
})
for(let i=0; i<this.FormData.scheduleClassTemplateDetailList.length; i++) {
let item = this.FormData.scheduleClassTemplateDetailList[i]
if(!item.endTime||!item.startTime||!item.personCount)
return this.$u.toast('请输入完整的信息')
}
const {data: res} = await getClassCreate(this.FormData)
if(res) this.$u.toast('创建成功')
this.initFormData()
},
addFn() {
let obj = {startTime: '',endTime: '', people: 1, id: new Date() * 1}
this.FormData.tiemArr.push(obj)
this.FormData.scheduleClassTemplateDetailList.push(obj)
},
deleteFn(id) {
let arr = this.FormData.tiemArr
let arr = this.FormData.scheduleClassTemplateDetailList
if(arr.length==1) return
let index = arr.findIndex(item=>item.id==id)
if(index==-1) return
arr.splice(index, 1)
},
confirmTime(val) {
console.log(val.value)
this.FormData.scheduleClassTemplateDetailList[this.tempDateObj.index][this.tempDateObj.name] = val.value
console.log(val.value)
this.show = false
},
showTime(item, name) {
showTime(index, name) {
this.tempDateObj = {
index, name
}
this.show = true
}
}

17
pages/recordEntry/operate/mySchedule/mySchedule.vue

@ -86,6 +86,7 @@
<script>
import mySchedulePopup from './comp/mySchedulePopup'
import { scheduleClassGetById, scheduleClassGet } from '@/config/api.js'
export default {
components: { mySchedulePopup },
data() {
@ -113,7 +114,23 @@
courseIds: []
}
},
onLoad() {
// this.scheduleClassGetByIdFn()
this.scheduleClassGetFn()
},
methods: {
//
async scheduleClassGetByIdFn() {
let id = this.vuex_userInfo.user.id
const {data: res} = await scheduleClassGetById({id})
},
//
async scheduleClassGetFn() {
let id = this.vuex_userInfo.user.id
let coachId = this.vuex_userInfo.user.coachId || '1591015108974329858'
let classDate = '2023-09-18'
const {data: res} = await scheduleClassGet({id, coachId, classDate})
},
changeStep(val) {
if(val==1) {
this.$goPage('/pages/recordEntry/operate/mySchedule/plan/plan')

43
pages/recordEntry/operate/mySchedule/plan/plan.vue

@ -5,9 +5,9 @@
<view class="card">
<view class="row">
<view class="lab">计划日期</view>
<view class="rightCon">
<view class="rightCon" @click="show=true">
<view class="inputBox">
<input type="text" v-model="form.input1" placeholder="请选择">
<input type="text" v-model="form.classDate" placeholder="请选择" disabled style="pointer-events: none;">
</view>
<view class="icon">
<u-icon name="arrow-right" :size="12" :color="'#696B72'"></u-icon>
@ -18,7 +18,7 @@
<view class="lab">选择开课时间段</view>
<view class="rightCon" @click="$goPage('/pages/recordEntry/operate/mySchedule/mould/mould')">
<view class="inputBox">
<input type="text" v-model="form.input1" placeholder="请选择">
<input type="text" v-model="form.input1" placeholder="请选择" disabled style="pointer-events: none;">
</view>
<view class="icon">
<u-icon name="arrow-right" :size="12" :color="'#696B72'"></u-icon>
@ -58,14 +58,26 @@
<view class="btnBg">确认发布</view>
</view>
<u-datetime-picker
:show="show"
:minDate="minDate"
:maxDate="maxDate"
mode="date"
@confirm="changeDate"
></u-datetime-picker>
</view>
</template>
<script>
import { scheduleClassCreate, getClassDateLimit } from '@/config/api.js'
export default {
data() {
return {
minDate: null,
maxDate: null,
show: false,
form: {
classDate: '',
radio1: 1
},
radiolist1: [{
@ -103,10 +115,35 @@
]
}
},
onLoad() {
this.getClassDateLimitFn()
},
methods: {
changeRadio(val) {
console.log(val)
},
//
changeDate(val) {
this.form.classDate = this.$u.date(val.value, 'yyyy-mm-dd')
console.log(val)
},
//
async scheduleClassCreateFn() {
let obj = {
coachId: this.vuex_coachId
}
const {data: res} = await scheduleClassCreate(obj)
},
//
async getClassDateLimitFn() {
let obj = {
coachId: this.vuex_coachId
}
const {data: res} = await getClassDateLimit(obj)
this.minDate = new Date(res.beginDateLimit)*1 + 86400000
this.maxDate = new Date(res.endDateLimit)*1
}
}
}
</script>

10
pages/tabbar/operateTrain/index.vue

@ -55,6 +55,7 @@
</template>
<script>
import { bookingMasterPage } from '@/config/api.js'
export default {
data() {
return {
@ -92,15 +93,24 @@
{lab: '浙00007',id: 2},
]
],
params: {
pageNo: 1,
pageSize: 20
}
}
},
onLoad() {
console.log('我的页面')
this.bookingMasterPageFn()
},
onShow() {
uni.hideTabBar();
},
methods: {
async bookingMasterPageFn() {
const {data: res } = await bookingMasterPage(this.params)
console.log(res)
},
changeTab(item) {
this.currentTab = item.id
},

Loading…
Cancel
Save