Commit 36734e60 authored by Morson's avatar Morson

对接预约时间模块

parent e8dea083
......@@ -5,8 +5,8 @@ const UNI_APP = {
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl: {
apiUrl: 'http://192.168.1.22', //java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
// apiUrl: 'http://192.168.1.22', //java端域名请求头
apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
}
......
......@@ -47,33 +47,19 @@
type: Boolean,
default: true
},
dateList: {
type: Array,
default: []
},
timeList: {
type: Array,
default: []
},
},
data() {
return {
currentDay: 0,
currentTime: null,
dateList: [{
weekDay: '周三',
day: '21',
}, {
weekDay: '周四',
day: '22',
}, {
weekDay: '周五',
day: '23',
}, {
weekDay: '周六',
day: '24',
}, {
weekDay: '周日',
day: '25',
}, {
weekDay: '周一',
day: '26',
}, ],
timeList: ['06:00-08:00', '08:00-10:00', '10:00-12:00', '12:00-14:00', '14:00-16:00', '16:00-18:00',
'18:00-20:00', '20:00-22:00', '22:00-24:00'
],
}
},
computed: {
......@@ -88,13 +74,15 @@
getDateList() {
// 获取日期
},
dateChange(item, index, list) {
async dateChange(item, index, list) {
let data = {
item,
index,
list,
}
this.currentDay = index
let res = await this.$u.api.openTimerange()
debugger
this.$emit('date-change', data)
},
timeChange(item, index, list) {
......
......@@ -134,6 +134,7 @@
},
},
async onLoad(e) {
this.$u.vuex('vuex_token', 'RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5');
this.orderId = 1
this.categoryId = 88
if(e) {
......@@ -144,9 +145,11 @@
title: "数据加载中",
mask: true
})
this.loadCalendar()
await this.initPageData()
},
methods: {
/* 初始化页面数据 */
async initPageData() {
let self = this
let params = {categoryId: self.categoryId}
......@@ -158,6 +161,7 @@
}
uni.hideLoading()
},
/* 组装参数 */
buildConfig() {
let self = this
if(self.config) {
......@@ -169,6 +173,7 @@
})
}
},
/* 初始化参数 */
initParams() {
let self = this
if(self.config) {
......@@ -188,6 +193,17 @@
}
}
},
/* 加载日历数据 */
async loadCalendar() {
let self = this
let res = await this.$u.api.workerCalendar()
if(res && res.code == 200) {
}
debugger
},
/**
* 切换tab项
*/
......
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