Browse Source

add black ls api

feat-230721
刘嘉炜 2 years ago
parent
commit
ffb762b8fa
  1. 2
      src/pages/index/index.vue
  2. 2
      src/pages/write_off/operate/operate.vue
  3. 1
      src/subpackage/blacklist/js/api.js
  4. 80
      src/subpackage/blacklist/pages/abnormal_list/abnormal_list.vue

2
src/pages/index/index.vue

@ -220,6 +220,8 @@
brandInfo: indexData&&indexData.brand ? indexData.brand : null,
});
}
if(tabInfo.id === 10)return util.routeTo(tabInfo.path + `?brand_id=${indexData.brand.id}`,'nT');
util.routeTo(tabInfo.path,'nT');
},

2
src/pages/write_off/operate/operate.vue

@ -69,7 +69,7 @@ export default {
//
getStoreList({
page=1,
page_size=9999,
page_size=99999,
brand_id='',
}){
return servers.get({

1
src/subpackage/blacklist/js/api.js

@ -2,6 +2,7 @@ import { ORIGIN } from '../../../js/api';
export const BLACKLIST_API = {
stadiumList:`${ORIGIN}/admin/stadium/list`, // 店铺列表
identifyRecords:`${ORIGIN}/admin/stadium/identify/records`, // 疑似逃票的记录
}

80
src/subpackage/blacklist/pages/abnormal_list/abnormal_list.vue

@ -2,19 +2,19 @@
<view class="abnormal-list">
<view class="al-stadium-change">
<view class="asc-name">当前门店</view>
<picker>
<picker :range="stadiumLs" range-key="name" @change="stadiumChange">
<view class="asc-frame">
<view class="af-content">
<view class="ac-txt">全部</view>
<view class="ac-txt">{{ selectStadium.name || '全部' }}</view>
<image class="ac-icon" mode="aspectFit" src="/subpackage/blacklist/static/images/arrow.png"></image>
</view>
</view>
</picker>
</view>
<view class="al-date">
<picker>
<picker mode="date" @change="dateChange">
<view class="ad-content">
<view class="ac-txt">核销日期2020-08-27</view>
<view class="ac-txt">核销日期{{ curDate || '' }}</view>
<image class="ac-icon" mode="aspectFit" src="/subpackage/blacklist/static/images/triangle.png"></image>
</view>
</picker>
@ -50,16 +50,86 @@
</template>
<script>
import server from '../../js/server';
import util from '../../../../utils/util';
import { BLACKLIST_API } from '../../js/api';
export default {
data(){
return {
stadiumLs: [],
selectStadium: {},
curDate: '',
}
},
async onLoad(options){
try{
let _date = this.curDate = util.formatDate({});
let _stadiumLs = await this.getStoreList({});
this.getRecords({
brand_id: options.brand_id,
verify_time: _date
});
}catch(err){
console.warn('get records ls err --->', err);
}
},
methods: {
getRecords({
authority = 'wx',
brand_id = 63,
stadium_id = '',
page = 1,
page_size = 15,
verify_time = ''
}){
server.get({
url: BLACKLIST_API.identifyRecords,
data: {
authority, brand_id, page, page_size,
stadium_id, verify_time
},
failMsg: '加载列表失败!'
})
.then(res => {
console.warn('getRecords->', res);
})
},
dateChange(e){
this.curDate = e.detail.value || '-'
},
stadiumChange(e){
let { stadiumLs } = this;
this.selectStadium = stadiumLs[e.detail.value]
},
operateBtn(){
util.showModal({
title: '提示',
content: '确定将该用户拉入黑名单吗?确定后用户将不能再进入小程序',
showCancel: true,
})
}
},
//
getStoreList({
page=1,
page_size=99999,
brand_id='',
}){
return server.get({
url: BLACKLIST_API.stadiumList,
data: {
page,
page_size,
brand_id,
},
failMsg: '获取店铺列表失败!'
})
.then(res=>{
let _list = res.list || [];
_list.unshift({ name: '全部', id: 0 })
this.stadiumLs = _list;
return _list
})
},
}
}
</script>

Loading…
Cancel
Save