wip:
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-17 15:34:07 +08:00
parent eb4dfc0887
commit 1b1b724110
6 changed files with 86 additions and 9 deletions

View File

@@ -2,20 +2,33 @@
import {ref, onMounted} from 'vue';
import Taro from '@tarojs/taro';
import MerList from '@/components/MerList.vue';
import Storelist from '@/components/StoreList.vue';
const classId = ref();
const name = ref('');
onMounted(() => {
const e = Taro.getCurrentInstance().router?.params as any;
Taro.setNavigationBarTitle({
title: e.name,
});
classId.value = Number(e.id);
if (e.id) {
Taro.setNavigationBarTitle({
title: e.name,
});
classId.value = Number(e.id);
} else {
Taro.setNavigationBarTitle({
title: '搜索列表',
});
name.value = e.name;
}
});
</script>
<template>
<MerList v-model="classId" />
<view>
<MerList v-if="classId" v-model="classId" />
<Storelist v-else v-model="name" />
</view>
</template>
<style lang="scss"></style>