|
|
@ -249,7 +249,6 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
timeSlotChange(e){ |
|
|
|
console.log(e); |
|
|
|
let _timestamp = new Date(e.detail.value.replace(/\-/g, '/')).getTime(); // 当天0点时间 |
|
|
|
if(new Date().getTime() - _timestamp > 24*60*60*1000)return util.showNone('请选择正确时间!'); // 一天前 |
|
|
|
let _dateArr = this.getDateList({ |
|
|
@ -257,7 +256,7 @@ export default { |
|
|
|
}) || []; |
|
|
|
this.dateList = _dateArr; |
|
|
|
this.curDateInfo = _dateArr[0] || {}; |
|
|
|
console.log(_dateArr) |
|
|
|
|
|
|
|
this.$nextTick(_=>this.refreshVenues()); |
|
|
|
}, |
|
|
|
// 刷新场地信息 |
|
|
@ -267,6 +266,7 @@ export default { |
|
|
|
util.showLoad(); |
|
|
|
this.venueList = []; |
|
|
|
this.boardInfo = null; |
|
|
|
this.selectedVenueList = []; |
|
|
|
let _res = await this.getVenueList({ |
|
|
|
type_key: curTypeInfo.key || '', |
|
|
|
stadium_id: curStoreInfo.id || '', |
|
|
@ -395,10 +395,29 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
// |
|
|
|
storePickerChange(e){ |
|
|
|
async storePickerChange(e){ |
|
|
|
let { storeList } = this; |
|
|
|
this.curStoreInfo = storeList[e.detail.value]; |
|
|
|
this.$nextTick(_=>this.refreshVenues()); |
|
|
|
let _curStore = storeList[e.detail.value] || {}; |
|
|
|
this.curStoreInfo = _curStore; |
|
|
|
this.venueList = []; |
|
|
|
this.boardInfo = null; |
|
|
|
this.typeList = []; // 类型列表 |
|
|
|
this.curTypeInfo = {}; // 当前类型 |
|
|
|
this.selectedVenueList = []; |
|
|
|
try{ |
|
|
|
let _typeInfo = await this.getClassify({ stadium_id: _curStore.id }); |
|
|
|
let _typeList = _typeInfo || []; |
|
|
|
this.typeList = _typeList; |
|
|
|
if(!_typeList.length)return util.showNone('没有球类信息!'); |
|
|
|
let _curType = _typeList[0]; |
|
|
|
this.curTypeInfo = _curType; |
|
|
|
this.$nextTick(_=>this.refreshVenues()); |
|
|
|
}catch(err){ |
|
|
|
util.showNone('切换门店失败!稍后重试!'); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
typePckerChange(e){ |
|
|
|
console.log(e) |
|
|
@ -428,10 +447,10 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 球类列表 |
|
|
|
getClassify({stadium_id}){ |
|
|
|
getClassify({ stadium_id }){ |
|
|
|
return servers.get({ |
|
|
|
url: API.venue.venueTypes, |
|
|
|
data: {stadium_id}, |
|
|
|
data: { stadium_id }, |
|
|
|
failMsg: '加载分类失败!' |
|
|
|
}) |
|
|
|
}, |
|
|
|