From 26a157bac6ac0d79155c4c47b4c551d1d55e0525 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Tue, 28 Sep 2021 11:08:04 +0800 Subject: [PATCH 1/2] fix storePickerChange --- src/pages/site/manage/manage.vue | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/pages/site/manage/manage.vue b/src/pages/site/manage/manage.vue index 91f2bbf..9e008d5 100644 --- a/src/pages/site/manage/manage.vue +++ b/src/pages/site/manage/manage.vue @@ -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: '加载分类失败!' }) }, From 9d192774faf57ec5587e012012fd1b0a8b0244c6 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Tue, 28 Sep 2021 15:46:34 +0800 Subject: [PATCH 2/2] vtest 1.1.10 --- src/js/api.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/api.js b/src/js/api.js index 4a99094..82d12d2 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -1,6 +1,7 @@ export const ORIGIN = `https://testmanager.ouxuanzhineng.cn`; // 测试 // export const ORIGIN = `https://minimanage.ouxuanzhineng.cn`; // 正式 + export const API = { wechatMiniAppLoginAndSync: `${ORIGIN}/assistant/WechatMiniAppGetToken`, // 小程序授权获取token,为空就登录 WechatMiniApplogin: `${ORIGIN}/assistant/WechatMiniApplogin`, // 小程序登录获取token