调整字段和样式

This commit is contained in:
weiwei committed 2025-03-10 18:11:09 +08:00
1 parent fa8ec6a1ce
commit 3ee3cabcdb
5 files changed
+379 -395

No files matched your search

+23 -18
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, reactive, nextTick } from "vue"
import { reactive, nextTick } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
@@ -15,7 +15,6 @@ import ProductRow from "./components/product-row.vue"
import ProductCar from "./components/product-car.vue"
import ProductTotal from "./components/product-total.vue"
const data = {}
const state = reactive<any>({
detailId: null,
totPrice: 0,
@@ -41,9 +40,14 @@ onShow(() => {
})
const getDetail = async () => {
uni.showLoading({
title: "加载中...",
mask: true,
})
const _pa = { id: state.detailId }
const { data } = await merchantApi.detail(_pa)
state.detail = data
uni.hideLoading()
}
const getShopCar = async () => {
@@ -237,15 +241,19 @@ const doFood = () => {
</view>
</view>
<view class="m-t-10rpx second-text-28">
<text>营业时间</text>
<text class="m-l-10rpx">
{{ state.detail.jobStartTime }}
~
{{ state.detail.jobEndTime }}
</text>
<view>营业时间:</view>
<view class="second-text-24">
{{ state.detail.jobTime?.split(",")[0] ? "早:" + state.detail.jobTime?.split(",")[0] : "" }}
</view>
<view class="second-text-24">
{{ state.detail.jobTime?.split(",")[1] ? "中:" + state.detail.jobTime?.split(",")[1] : "" }}
</view>
<view class="second-text-24">
{{ state.detail.jobTime?.split(",")[2] ? "晚:" + state.detail.jobTime?.split(",")[2] : "" }}
</view>
</view>
<view class="m-t-10rpx second-text-28">
<text>食堂地址</text>
<view v-if="state.detail.addressDes" class="m-t-10rpx second-text-28">
<text>食堂地址:</text>
<text class="m-l-10rpx">{{ state.detail.addressDes }}</text>
</view>
</view>
@@ -283,6 +291,7 @@ const doFood = () => {
<view class="h-15rpx" />
<view class="flex-row">
<scroll-view
v-if="state.classifyList.length > 0"
scroll-y
:style="{ height: getHeight() }"
class="menu w-200rpx h-full p-l-12rpx p-b-20rpx bg-#f6f6f6"
@@ -299,7 +308,7 @@ const doFood = () => {
</view>
</view>
</scroll-view>
<scroll-view scroll-y :style="{ height: getHeight() }" class="flex-1 p-b-20rpx">
<scroll-view v-if="state.shopList.length > 0" scroll-y :style="{ height: getHeight() }" class="flex-1 p-b-20rpx">
<view v-for="(pV, pI) in state.shopList" :key="pI">
<view class="m-x-15rpx">
<product-row
@@ -318,17 +327,13 @@ const doFood = () => {
</view>
</view>
</scroll-view>
<view v-else class="mx-auto mt-10 second-text-28">暂无商品</view>
</view>
</tm-sticky>
<!-- end 商品 end -->
<template #main-bottom>
<view class="car z-200 p-x-30rpx p-y-30rpx bg-white">
<product-total
:totPrice="state.totPrice"
:totCount="state.totCount"
@doContainer="doVisibleCar"
@submit="doPay"
/>
<view v-if="state.classifyList.length > 0" class="car z-200 p-x-30rpx p-y-30rpx bg-white">
<product-total :totPrice="state.totPrice" :totCount="state.totCount" @doContainer="doVisibleCar" @submit="doPay" />
</view>
</template>
</crud-layout>
+2 -2
View File
@@ -13,7 +13,7 @@ import { filePath } from "@@/utils/file"
const data = {
tabs: [
{ id: null, name: "全部", disabled: false },
// { id: null, name: "全部", disabled: false },
{ id: 1, name: "早餐", disabled: false },
{ id: 2, name: "午餐", disabled: false },
{ id: 3, name: "晚餐", disabled: false },
@@ -107,7 +107,7 @@ const doProduct = (v: any) => {
@scroll="pageHook.scroll"
>
<template #top>
<view class="bg-#1777FF p-15rpx pt-10">
<view class="bg-#1777FF p-15rpx">
<scroll-view scroll-x class="whitespace-nowrap">
<view class="flex-row items-center space-x-15rpx">
<view
+4 -6
View File
@@ -63,12 +63,10 @@ const toDetail = async (v: any) => {
</view>
</view>
<view class="m-t-10rpx second-text-28">
<text>营业时间</text>
<text class="m-l-10rpx">
{{ v.jobStartTime }}
~
{{ v.jobEndTime }}
</text>
<view>营业时间:</view>
<view class="second-text-24">{{ v.jobTime?.split(",")[0] ? "早:" + v.jobTime?.split(",")[0] : "" }}</view>
<view class="second-text-24">{{ v.jobTime?.split(",")[1] ? "中:" + v.jobTime?.split(",")[1] : "" }}</view>
<view class="second-text-24">{{ v.jobTime?.split(",")[2] ? "晚:" + v.jobTime?.split(",")[2] : "" }}</view>
</view>
<view v-if="v.addressDes" class="m-t-10rpx second-text-28">
<text>食堂地址</text>