商店页面
This commit is contained in:
1 parent
b7c70196a9
commit
a14266bce8
4 files changed
+93
-7
No files matched your search
@@ -16,6 +16,13 @@
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/tabbar/shop",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商店",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/tabbar/order",
|
||||
"style": {
|
||||
@@ -251,6 +258,12 @@
|
||||
"iconPath": "static/tabbar/home.png",
|
||||
"selectedIconPath": "static/tabbar/home-select.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/tabbar/shop",
|
||||
"text": "商店",
|
||||
"iconPath": "static/tabbar/home.png",
|
||||
"selectedIconPath": "static/tabbar/home-select.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/tabbar/order",
|
||||
"text": "订单",
|
||||
|
||||
@@ -4,7 +4,7 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { isEmpty } from "radash";
|
||||
|
||||
import { hooks, router } from "@@/index";
|
||||
import { applyApi, faceApi } from "@@/api";
|
||||
import { faceApi } from "@@/api";
|
||||
const uploadPhotoBaseUrl = import.meta.env.VITE_APP_DEV_SERVICE;
|
||||
|
||||
const state = reactive<any>({
|
||||
@@ -17,11 +17,7 @@ const applyForm = reactive<any>({
|
||||
});
|
||||
const uploadFileUrl = ref<any>("");
|
||||
const applyFormRules = reactive<any>({
|
||||
faceImg: [
|
||||
{ required: true, message: "请上传人脸图片" },
|
||||
{ required: true, min: 1, message: "最少上传1张人脸图片" },
|
||||
{ required: true, max: 10, message: "最多上传10张人脸图片" },
|
||||
],
|
||||
faceImg: [{ required: true, message: "请上传人脸图片" }],
|
||||
});
|
||||
onLoad(async (options: any) => {
|
||||
const { type, id } = options;
|
||||
|
||||
@@ -43,7 +43,7 @@ import { faceApi } from "@@/api";
|
||||
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
// status: data.tabs[0].id,
|
||||
pagesize: 10,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
|
||||
import { hooks, router } from "@@/index";
|
||||
import { merchantApi } from "@@/api";
|
||||
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
pagesize: 10,
|
||||
type: "shop",
|
||||
},
|
||||
});
|
||||
|
||||
onLoad(() => {});
|
||||
onShow(() => {
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false);
|
||||
}
|
||||
});
|
||||
|
||||
const pageRef = ref<any>(null);
|
||||
const pageHook = hooks.usePage(pageRef, merchantApi.page, null, "data.list");
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="10"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<view
|
||||
class="flex-row card p-20rpx m-b-20rpx"
|
||||
v-for="(v, i) in pageHook.list"
|
||||
:key="i"
|
||||
@tap="router.jump('/pages/merchant/detail', { id: v.id })"
|
||||
>
|
||||
<image class="w-160rpx h-160rpx rounded-12rpx" :src="v.logo" mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row-center sub-text-34">
|
||||
<text> {{ v.name }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<tm-tag size="s">{{ v.deptStr }}</tm-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-t-10rpx second-text-28">
|
||||
<text>营业时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ hooks.useTime(v.applianceStartTime, "{h}:{i}") }}
|
||||
~
|
||||
{{ hooks.useTime(v.applianceEndTime, "{h}:{i}") }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-if="v.addressDes" class="m-t-10rpx second-text-28">
|
||||
<text>食堂地址</text>
|
||||
<text class="m-l-10rpx">{{ v.addressDes }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
</template>
|
||||
Reference in new issue
Block a user