This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {getHomeList} from '@/api/home';
|
||||
import {getHomeList, getStoreList} from '@/api/home';
|
||||
import MerList from '@/components/MerList.vue';
|
||||
import {showTips} from '@/utils';
|
||||
|
||||
@@ -74,10 +74,13 @@ const clickSearch = () => {
|
||||
title: '请输入商家名称再搜索',
|
||||
icon: 'none',
|
||||
});
|
||||
Taro.navigateTo({
|
||||
url: `/pages/search/index?name=${searchVal.value}`,
|
||||
});
|
||||
searchVal.value = '';
|
||||
};
|
||||
|
||||
Taro.useLoad(() => {
|
||||
Taro.useLoad(async () => {
|
||||
getNavLists();
|
||||
getUserLocal();
|
||||
});
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {Cart2, Left, Home, Uploader, Plus, Minus} from '@nutui/icons-vue-taro';
|
||||
import {Left, Home, Plus, Minus} from '@nutui/icons-vue-taro';
|
||||
import {Ref, ref} from 'vue';
|
||||
import {calculateDistance} from '@/utils';
|
||||
import {getGoodList, getMerCategory} from '@/api/goods';
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -338,9 +338,9 @@ const closePay = () => {
|
||||
const t_id = ref();
|
||||
|
||||
const openCode = () => {
|
||||
if (goodInfo.value.status === 2) return;
|
||||
url.value = `https://api.pwmqr.com/qrcode/create?url=${goodInfo.value.oid}`;
|
||||
isShowCode.value = true;
|
||||
if (goodInfo.value.status === 2) return;
|
||||
t_id.value = setInterval(() => {
|
||||
getOrderDetail();
|
||||
}, 1000);
|
||||
|
||||
Reference in New Issue
Block a user