Merge branch 'dev' into test
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
1
components.d.ts
vendored
1
components.d.ts
vendored
@@ -50,6 +50,7 @@ declare module '@vue/runtime-core' {
|
|||||||
Pay: typeof import('./src/components/Pay.vue')['default']
|
Pay: typeof import('./src/components/Pay.vue')['default']
|
||||||
Popup: typeof import('./src/components/Popup.vue')['default']
|
Popup: typeof import('./src/components/Popup.vue')['default']
|
||||||
RichEditor: typeof import('./src/components/RichEditor.vue')['default']
|
RichEditor: typeof import('./src/components/RichEditor.vue')['default']
|
||||||
|
StoreList: typeof import('./src/components/StoreList.vue')['default']
|
||||||
Ucharts: typeof import('./src/components/Ucharts.vue')['default']
|
Ucharts: typeof import('./src/components/Ucharts.vue')['default']
|
||||||
Upload: typeof import('./src/components/Upload.vue')['default']
|
Upload: typeof import('./src/components/Upload.vue')['default']
|
||||||
UserModal: typeof import('./src/components/UserModal.vue')['default']
|
UserModal: typeof import('./src/components/UserModal.vue')['default']
|
||||||
|
|||||||
60
src/components/StoreList.vue
Normal file
60
src/components/StoreList.vue
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="flex justify-center">
|
||||||
|
<view
|
||||||
|
class="bg-white rounded-[15px] mt-3 p-2 w-[95%] flex items-center"
|
||||||
|
v-for="(item, index) in storeList"
|
||||||
|
:key="index"
|
||||||
|
@click="goDetail(item)">
|
||||||
|
<image
|
||||||
|
class="w-[200px] h-[200px] rounded-[15px] mr-2"
|
||||||
|
:src="item.head_photo" />
|
||||||
|
<view class="flex-1">
|
||||||
|
<view class="text-[#333333] text-[30px] font-bold">{{
|
||||||
|
item.name
|
||||||
|
}}</view>
|
||||||
|
<nut-rate
|
||||||
|
spacing="1"
|
||||||
|
active-color="rgba(252, 207, 10, 1)"
|
||||||
|
v-model="item.rate" />
|
||||||
|
<view class="text-[#9E9E9E] text-[25px]">销量:10000</view>
|
||||||
|
<view class="text-[#9E9E9E] text-[25px]"
|
||||||
|
>营业时间:{{ item.week_start }}-{{ item.week_end }}</view
|
||||||
|
>
|
||||||
|
<view class="text-[#999999] text-[23px]">{{ item.address }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {getStoreList} from '@/api/home';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
import {ref} from 'vue';
|
||||||
|
const name = defineModel({
|
||||||
|
default: '',
|
||||||
|
});
|
||||||
|
|
||||||
|
const storeList = ref<any>([]);
|
||||||
|
|
||||||
|
Taro.useLoad(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
const getList = async () => {
|
||||||
|
const res = await getStoreList({
|
||||||
|
name: name.value,
|
||||||
|
});
|
||||||
|
storeList.value = res.data.data;
|
||||||
|
};
|
||||||
|
|
||||||
|
const goDetail = item => {
|
||||||
|
Taro.setStorageSync('mer_info', item);
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: `/pages/mer/mer_detail/index`,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss"></style>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Taro from '@tarojs/taro';
|
import Taro from '@tarojs/taro';
|
||||||
import {ref} from 'vue';
|
import {ref} from 'vue';
|
||||||
import {getHomeList} from '@/api/home';
|
import {getHomeList, getStoreList} from '@/api/home';
|
||||||
import MerList from '@/components/MerList.vue';
|
import MerList from '@/components/MerList.vue';
|
||||||
import {showTips} from '@/utils';
|
import {showTips} from '@/utils';
|
||||||
|
|
||||||
@@ -74,10 +74,13 @@ const clickSearch = () => {
|
|||||||
title: '请输入商家名称再搜索',
|
title: '请输入商家名称再搜索',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
});
|
});
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: `/pages/search/index?name=${searchVal.value}`,
|
||||||
|
});
|
||||||
searchVal.value = '';
|
searchVal.value = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
Taro.useLoad(() => {
|
Taro.useLoad(async () => {
|
||||||
getNavLists();
|
getNavLists();
|
||||||
getUserLocal();
|
getUserLocal();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Taro from '@tarojs/taro';
|
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 {Ref, ref} from 'vue';
|
||||||
import {calculateDistance} from '@/utils';
|
import {calculateDistance} from '@/utils';
|
||||||
import {getGoodList, getMerCategory} from '@/api/goods';
|
import {getGoodList, getMerCategory} from '@/api/goods';
|
||||||
|
|||||||
@@ -2,20 +2,33 @@
|
|||||||
import {ref, onMounted} from 'vue';
|
import {ref, onMounted} from 'vue';
|
||||||
import Taro from '@tarojs/taro';
|
import Taro from '@tarojs/taro';
|
||||||
import MerList from '@/components/MerList.vue';
|
import MerList from '@/components/MerList.vue';
|
||||||
|
import Storelist from '@/components/StoreList.vue';
|
||||||
|
|
||||||
const classId = ref();
|
const classId = ref();
|
||||||
|
|
||||||
|
const name = ref('');
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const e = Taro.getCurrentInstance().router?.params as any;
|
const e = Taro.getCurrentInstance().router?.params as any;
|
||||||
Taro.setNavigationBarTitle({
|
if (e.id) {
|
||||||
title: e.name,
|
Taro.setNavigationBarTitle({
|
||||||
});
|
title: e.name,
|
||||||
classId.value = Number(e.id);
|
});
|
||||||
|
classId.value = Number(e.id);
|
||||||
|
} else {
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: '搜索列表',
|
||||||
|
});
|
||||||
|
name.value = e.name;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MerList v-model="classId" />
|
<view>
|
||||||
|
<MerList v-if="classId" v-model="classId" />
|
||||||
|
<Storelist v-else v-model="name" />
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss"></style>
|
<style lang="scss"></style>
|
||||||
|
|||||||
@@ -338,9 +338,9 @@ const closePay = () => {
|
|||||||
const t_id = ref();
|
const t_id = ref();
|
||||||
|
|
||||||
const openCode = () => {
|
const openCode = () => {
|
||||||
|
if (goodInfo.value.status === 2) return;
|
||||||
url.value = `https://api.pwmqr.com/qrcode/create?url=${goodInfo.value.oid}`;
|
url.value = `https://api.pwmqr.com/qrcode/create?url=${goodInfo.value.oid}`;
|
||||||
isShowCode.value = true;
|
isShowCode.value = true;
|
||||||
if (goodInfo.value.status === 2) return;
|
|
||||||
t_id.value = setInterval(() => {
|
t_id.value = setInterval(() => {
|
||||||
getOrderDetail();
|
getOrderDetail();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user