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

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

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