提交 78f1f18a authored 作者: lidongxu's avatar lidongxu

feat(storelist): 新增:促销移动端终端门店列表对接接口完成

上级 b50700ee
......@@ -9,4 +9,6 @@
--van-link-color: #f12528;
// 顶部导航背景色
--van-nav-bar-background: #f2f1f6;
}
\ No newline at end of file
// 返回顶部按钮大小
--van-back-top-size: 48px;
}
......@@ -13,9 +13,9 @@
<div class="header-wrap">
<span>终端门店列表</span>
<!-- 搜索区域 -->
<van-search v-model="query.name"
<van-search v-model="query.col"
placeholder="请输入勤策终端编码/名称"
@update:model-value="getTerminalStoreListFn"
@update:model-value="handlerSearch"
class="search-bar" />
</div>
<!-- 结果列表 -->
......@@ -61,7 +61,7 @@ const router = useRouter();
/*************** 终端门店列表 *******************/
const query = reactive({
name: '',
col: '',
pageNum: 1,
pageSize: 10
})
......@@ -73,7 +73,7 @@ const showEmpty = ref(false); // 无数据显示图状态
// 监听搜索结果列表变化,控制搜索空结果状态显示图
watch(resultList, (newVal) => {
showEmpty.value = newVal.length === 0 && query.name.trim() !== '';
showEmpty.value = newVal.length === 0 && query.col.trim() !== '';
});
const getTerminalStoreListFn = async () => {
......@@ -99,6 +99,12 @@ const loadMore = () => {
getTerminalStoreListFn()
}
const handlerSearch = () => {
query.pageNum = 1
resultList.value = []
getTerminalStoreListFn()
}
/*******新增终端********/
const addNewTerminal = () => {
router.push({
......@@ -106,7 +112,6 @@ const addNewTerminal = () => {
})
}
// 门店点击
const handleClickStore = (item) => {
router.push({
......@@ -125,7 +130,6 @@ const handleClickStore = (item) => {
$base-width: 375px;
$base-font-size: 16px;
.mobile-page-container {
// width: $base-width;
margin: 0 auto;
......
......@@ -67,7 +67,7 @@ export default defineConfig(({ mode, command }) => {
rootValue: 37.5,
propList: ['*'],
exclude: file => {
const dirList = ["vant", "mobile/views"]
const dirList = ["vant", "mobile/pages"]
return !dirList.some(item => file.includes(item))
}
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论