|
|
@ -82,7 +82,10 @@ export default { |
|
|
|
}, |
|
|
|
data(){ |
|
|
|
return { |
|
|
|
optionsQuery: {}, |
|
|
|
optionsQuery: { |
|
|
|
// stadium_id_filter |
|
|
|
// brand_id |
|
|
|
}, |
|
|
|
stadiumList: [], |
|
|
|
curStadium: {}, |
|
|
|
sceneList: [], |
|
|
@ -98,7 +101,7 @@ export default { |
|
|
|
onReachBottom(){ |
|
|
|
let { curStadium, optionsQuery, curScene, curDate, curType, page } = this; |
|
|
|
let _query = { |
|
|
|
brand_id: optionsQuery.brand_id, |
|
|
|
brand_id: optionsQuery.brand_id || '', |
|
|
|
stadium_id: curStadium.val || '', |
|
|
|
time_str: curDate, |
|
|
|
scene: curScene.scene, |
|
|
@ -119,7 +122,7 @@ export default { |
|
|
|
this.$nextTick(_=>this.refreshList()); |
|
|
|
}, |
|
|
|
async initPage(options){ |
|
|
|
let _stadiumLs = await this.getStoreList(options.stadium_id); |
|
|
|
let _stadiumLs = await this.getStoreList(options.stadium_id_filter); |
|
|
|
let _sceneLs = await this.getSceneList(); |
|
|
|
this.curDate = util.formatDate({}); |
|
|
|
this.$nextTick(_=>this.refreshList()); |
|
|
@ -130,7 +133,7 @@ export default { |
|
|
|
this.recordLs = []; |
|
|
|
|
|
|
|
let _query = { |
|
|
|
brand_id: optionsQuery.brand_id, |
|
|
|
brand_id: optionsQuery.brand_id || '', |
|
|
|
stadium_id: curStadium.val || '', |
|
|
|
time_str: curDate, |
|
|
|
scene: curScene.scene, |
|
|
@ -192,12 +195,12 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 店铺列表 |
|
|
|
getStoreList(stadium_id = ''){ |
|
|
|
getStoreList(stadium_id_filter = ''){ |
|
|
|
let { optionsQuery } = this; |
|
|
|
return servers.get({ |
|
|
|
url: API.consumeCountStadiumList, |
|
|
|
data: { |
|
|
|
brand_id: optionsQuery.brand_id, |
|
|
|
brand_id: optionsQuery.brand_id || '', |
|
|
|
}, |
|
|
|
failMsg: '加载店铺列表失败!', |
|
|
|
|
|
|
@ -205,16 +208,14 @@ export default { |
|
|
|
.then(res=>{ |
|
|
|
let _list = res || []; |
|
|
|
let _cur = null; |
|
|
|
if(!!stadium_id){ |
|
|
|
let _fiLs = _list.filter(e=> +e.val == stadium_id); |
|
|
|
// 页面传参 undefined => 'undefined' |
|
|
|
if(stadium_id_filter != undefined&&stadium_id_filter != 'undefined'){ |
|
|
|
let _fiLs = _list.filter(e=> e.val == stadium_id_filter); |
|
|
|
if(_fiLs.length)_cur = _fiLs[0]; |
|
|
|
} |
|
|
|
|
|
|
|
if(_cur&&_cur.val){ |
|
|
|
this.curStadium = _cur; |
|
|
|
}else if(optionsQuery.stadium_id == 0){ |
|
|
|
let _fLs = _list.filter(e=> +e.val == -1); |
|
|
|
if(_fLs.length)this.curStadium = _fLs[0] || {}; |
|
|
|
}else{ |
|
|
|
this.curStadium = _list[0] || {}; |
|
|
|
} |
|
|
@ -227,7 +228,7 @@ export default { |
|
|
|
return servers.get({ |
|
|
|
url: API.consumeCountGetScene, |
|
|
|
data: { |
|
|
|
brand_id: optionsQuery.brand_id, |
|
|
|
brand_id: optionsQuery.brand_id || '', |
|
|
|
stadium_id: curStadium.val || '', |
|
|
|
}, |
|
|
|
failMsg: '加载场景列表失败!', |
|
|
|