|
@@ -40,11 +40,13 @@
|
|
|
const config = ref({ logoUrl: [] });
|
|
|
const indexList = ref([]);
|
|
|
const itemArr = ref([]);
|
|
|
+ const type = ref('0');
|
|
|
// const list = ref([{ name: '奥迪', url: [], type: '0' }, { name: '本田', url: [], type: '0' }, { name: '别克', url: [], type: '0' },
|
|
|
// { name: '奥迪', url: [], type: '0' }, { name: '大众', url: [], type: '0' }, { name: '长城', url: [], type: '0' },
|
|
|
// { name: '福特', url: [], type: '0' }, { name: '丰田', url: [], type: '0' }, { name: '长安', url: [], type: '0' },
|
|
|
// { name: '日产', url: [], type: '0' }]);
|
|
|
- onLoad(async () => {
|
|
|
+ onLoad(async (options) => {
|
|
|
+ type.value = options && options.type
|
|
|
await searchConfig();
|
|
|
await search();
|
|
|
})
|
|
@@ -66,11 +68,17 @@
|
|
|
}
|
|
|
};
|
|
|
const toCommon = (item) => {
|
|
|
- uni.$emit('toRoute', item)
|
|
|
- // 4. 返回上一页面
|
|
|
- uni.navigateBack({
|
|
|
- delta: 1 // 返回的页面数
|
|
|
- })
|
|
|
+ if (type.value == '4') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesHome/search/index?brand=${item.name}`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.$emit('toRoute', item)
|
|
|
+ // 4. 返回上一页面
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1 // 返回的页面数
|
|
|
+ })
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|