页面兼容调整
Some checks failed
deploy / deploy (push) Has been cancelled

This commit is contained in:
sjeam 2025-07-23 14:18:19 +08:00
parent 3b1e06937d
commit 3ccdc86f3c
8 changed files with 276 additions and 135 deletions

View File

@ -2,7 +2,7 @@
VITE_APP_ENV=development
# 接口地址
VITE_API_BASE_URL=http://localhost:8080
VITE_API_BASE_URL=https://test.shop.lihaink.cn
# 删除console
VITE_DROP_CONSOLE=false

2
env/.env.production vendored
View File

@ -2,7 +2,7 @@
VITE_APP_ENV=production
# 接口地址
VITE_API_BASE_URL=http://localhost:8080/prod
VITE_API_BASE_URL=https://test.shop.lihaink.cn
# 删除console
VITE_DROP_CONSOLE=true

View File

@ -78,6 +78,7 @@
},
"devDependencies": {
"@antfu/eslint-config": "4.13.0",
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@dcloudio/types": "^3.4.8",
"@dcloudio/uni-automator": "3.0.0-4060420250429001",
"@dcloudio/uni-cli-shared": "3.0.0-4060420250429001",

20
pnpm-lock.yaml generated
View File

@ -48,6 +48,9 @@ importers:
'@antfu/eslint-config':
specifier: 4.13.0
version: 4.13.0(@typescript-eslint/utils@8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-plugin@0.63.6(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(@vue/compiler-sfc@3.5.13)(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)
'@babel/plugin-proposal-private-property-in-object':
specifier: 7.21.11
version: 7.21.11(@babel/core@7.27.1)
'@dcloudio/types':
specifier: ^3.4.8
version: 3.4.15
@ -367,6 +370,13 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0-0
'@babel/plugin-proposal-private-property-in-object@7.21.11':
resolution: {integrity: sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==}
engines: {node: '>=6.9.0'}
deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.
peerDependencies:
'@babel/core': ^7.0.0-0
'@babel/plugin-syntax-async-generators@7.8.4':
resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==}
peerDependencies:
@ -6363,6 +6373,16 @@ snapshots:
dependencies:
'@babel/core': 7.27.1
'@babel/plugin-proposal-private-property-in-object@7.21.11(@babel/core@7.27.1)':
dependencies:
'@babel/core': 7.27.1
'@babel/helper-annotate-as-pure': 7.27.1
'@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.27.1)
'@babel/helper-plugin-utils': 7.27.1
'@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.27.1)
transitivePeerDependencies:
- supports-color
'@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.27.1)':
dependencies:
'@babel/core': 7.27.1

View File

@ -1,27 +1,20 @@
<style>
.flex-sub-cart {
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
width: 100%;
/* height: 100%; */
bottom: 20rpx;
position: fixed;
border:none;
}
.box-botton{
height: 80rpx;
border: 2px solid #59cb56;
border-radius: 40rpx;
background-color: #5acb5617;
margin: 0rpx 20rpx!important;
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
width: 100%;
/* height: 100%; */
bottom: 10rpx;
position: fixed;
border: none;
}
.detail_box {
border-top: 2rpx solid #dfdfdf;
border-radius: 5rpx;
background-color: #ffffff;
border-top: 2rpx solid #dfdfdf;
border-radius: 5rpx;
background-color: #ffffff;
}
</style>
<template>
@ -29,72 +22,52 @@
<up-navbar class="" style="" :autoBack="true" bgColor="#00000000" :fixed="true" titleColor="#595757FF"
leftIconColor="#FFFFFFFF">
</up-navbar>
<up-swiper height="480rpx" :list="list4" keyName="url" :autoplay="false"></up-swiper>
<up-swiper height="480rpx" :list="list4" keyName="url" :autoplay="false"></up-swiper>
<view class="detail_box">
<up-cell
class=" "
style=""
title="青椒泡椒肉丁"
label="现在是毛豆大上市的季节,煮毛豆炒青豆都好吃,特别营养。毛豆中还含有丰富的食物纤维,不仅能改善便秘,还有利于血压和胆固醇的降低。"
>
<view class="detail_box">
<up-cell class=" " style="" title="青椒泡椒肉丁"
label="现在是毛豆大上市的季节,煮毛豆炒青豆都好吃,特别营养。毛豆中还含有丰富的食物纤维,不仅能改善便秘,还有利于血压和胆固醇的降低。">
</up-cell>
<view class="p-2">
<view class="p-2">
<view class="flex box-border flex-row pb-2 ps-2 pe-2" style="" @click="addCart">
<up-text class="" size="28rpx"
:text="'食材配置'" :flex1="true" align="left" wordWrap="normal"
<up-text class="" size="28rpx" :text="'食材配置'" :flex1="true" align="left" wordWrap="normal"
:show="true" lines="1" decoration="none">
</up-text>
<up-text
class=""
color="#59CB56"
size="28rpx"
text="加入食谱清单"
:flex1="true"
prefixIcon="plus"
align="right"
wordWrap="normal"
:show="true"
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
decoration="none"
>
<up-text class="" color="#59CB56" size="28rpx" text="加入食谱清单" :flex1="true" prefixIcon="plus"
align="right" wordWrap="normal" :show="true"
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
decoration="none">
</up-text>
</view>
<view class="flex box-border flex-row p-2" style=""
v-for="(item,index) in goods_list_detail" :key="index"
>
<up-text class="" size="26rpx"
color="#9b9b9b"
:text="item.name+item.label" :flex1="true" align="left" wordWrap="normal"
:show="true" lines="1" decoration="none">
</up-text>
<up-text
class=""
color="#9b9b9b"
size="24rpx"
:text="item.num+item.unit_name"
:flex1="true"
align="right"
wordWrap="normal"
:show="true"
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
decoration="none"
>
</up-text>
</view>
<z-paging :fixed="false" height="calc(100vh - 900rpx)" width="calc(100vw - 50rpx)"
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" ref="pagingRefSC"
v-model="matchedItems_sc" class="fv-page flex-col ">
<view class="flex" style="padding:20rpx" v-for="(item, index) in goods_list_detail"
:key="index">
<up-text class="" size="26rpx" color="#9b9b9b" :text="item.name + item.label" :flex1="true"
align="left" wordWrap="normal" :show="true" lines="1" decoration="none">
</up-text>
<up-text class="" color="#9b9b9b" size="24rpx" :text="item.num + item.unit_name" :flex1="true"
align="right" wordWrap="normal" :show="true"
iconStyle="font-size: 28rpx;font-weight: bold;margin-right:10rpx;color: #59CB56;"
decoration="none">
</up-text>
</view>
</z-paging>
</view>
</view>
<view class="flex box-border flex-sub-cart" @click="addCart">
<u-icon style="margin: 20rpx;" size="80rpx" slot="right" color="#59CB56" name="shopping-cart-fill"></u-icon>
<u-text class="box-botton" style="" color="#59CB56" size="26rpx"
:text="'加入食谱清单'" :flex1="true" align="center" wordWrap="normal" :show="true"
iconStyle="26rpx" decoration="none">
</u-text>
</view>
<view class="flex box-border flex-sub-cart" @click="addCart">
<u-icon custom-style="margin: 20rpx;" size="80rpx" slot="right" color="#59CB56"
name="shopping-cart-fill"></u-icon>
<u-text class=""
custom-style="width: calc(100vw - 220rpx);text-align:center;display: flex; justify-content: center; align-items: center;height: 70rpx;border: 2px solid #59cb56;border-radius: 40rpx;background-color: #5acb5617;margin: 0rpx 20rpx!important;"
color="#59CB56" size="26rpx" :text="'加入食谱清单'" :flex1="true" align="center" wordWrap="normal"
:show="true" iconStyle="26rpx" decoration="none">
</u-text>
</view>
</view>
</template>
@ -104,7 +77,7 @@ import { reactive } from 'vue';
// onBeforeMount, onMounted, onBeforeUnmount, onUnmounted,
// onBeforeUpdate, onUpdated, nextTick, defineProps, toRaw } from 'vue'
import { onLoad, onShow } from '@dcloudio/uni-app'
const matchedItems_sc =ref([])
//
onLoad((options) => {
// loadData()
@ -131,51 +104,129 @@ const list4 = reactive([
// url URLURL
//
},
]);
]);
function changeSC(){
}
const goods_list_detail = [
{
id: 1,
name: "猪肉",
label: "",
image: " ",
disabled: true,
num: 100,
unit_name: "g",
default_num: 100,
},
{
id: 2,
name: "毛豆",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
},
{
id: 3,
name: "食用油",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "g",
default_num: 100,
},
{
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
},
{
id: 1,
name: "猪肉",
label: "",
image: " ",
disabled: true,
num: 100,
unit_name: "g",
default_num: 100,
},
{
id: 2,
name: "毛豆",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
},
{
id: 3,
name: "食用油",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "g",
default_num: 100,
},
{
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
},
{
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
},
{
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
}, {
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
}, {
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
}, {
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
}, {
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
}, {
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
},
{
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
},
{
id: 4,
name: "豆瓣酱",
label: "(建议食材)",
disabled: false,
num: 100,
unit_name: "ml",
default_num: 100,
},
];
//
function addCart() {
function addCart () {
uni.switchTab({
url: '/pages/tab/list/index'
});

View File

@ -39,8 +39,9 @@
<u-icon slot="right" name="arrow-right"></u-icon>
</view>
</view>
<z-paging ref="pagingRefSC" v-model="matchedItems_sc" @query="changeSC('')" style="top:300rpx;bottom: 110rpx"
class="fv-page flex-col px-2">
<z-paging :fixed="false" height="calc(100vh - 350rpx)" width="calc(100vw - 50rpx)"
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" ref="pagingRefSC"
v-model="matchedItems_sc" @query="changeSC()" class="fv-page flex-col ">
<view v-for="(item, index) in matchedItems_sc" :key="index">
<u-cell>
<template #icon>
@ -149,6 +150,56 @@ export default defineComponent({
unit_name: 'ml',
default_num: 100,
},
{
id: 4,
name: '豆瓣酱',
label: '青椒肉丝',
image: 'https://s3.bmp.ovh/imgs/2024/12/16/35bc6d28ab1c8bc7.png',
disabled: false,
num: 100,
unit_name: 'ml',
default_num: 100,
},
{
id: 4,
name: '豆瓣酱',
label: '青椒肉丝',
image: 'https://s3.bmp.ovh/imgs/2024/12/16/35bc6d28ab1c8bc7.png',
disabled: false,
num: 100,
unit_name: 'ml',
default_num: 100,
},
{
id: 4,
name: '豆瓣酱',
label: '青椒肉丝',
image: 'https://s3.bmp.ovh/imgs/2024/12/16/35bc6d28ab1c8bc7.png',
disabled: false,
num: 100,
unit_name: 'ml',
default_num: 100,
},
{
id: 4,
name: '豆瓣酱',
label: '青椒肉丝',
image: 'https://s3.bmp.ovh/imgs/2024/12/16/35bc6d28ab1c8bc7.png',
disabled: false,
num: 100,
unit_name: 'ml',
default_num: 100,
},
{
id: 4,
name: '豆瓣酱',
label: '青椒肉丝',
image: 'https://s3.bmp.ovh/imgs/2024/12/16/35bc6d28ab1c8bc7.png',
disabled: false,
num: 100,
unit_name: 'ml',
default_num: 100,
},
],
},
};

View File

@ -30,9 +30,9 @@ body {
<up-navbar class=" " style="font-weight: bold;" leftIcon="" title="食谱菜单" titleColor="#303133" bgColor="#FFFFFFFF"
titleWidth="600rpx" height="80rpx" leftIconSize="40rpx" leftIconColor="#303133" :safeAreaInsetTop="true"
:placeholder="true" :fixed="true"></up-navbar>
<up-search class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2" placeholder="输入食谱" :clearabled="true"
<up-search v-model="keyword_sp" class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2" placeholder="输入食谱" :clearabled="true"
:showAction="false" inputAlign="left" borderColor="transparent" searchIconColor="#909399" color="#606266"
placeholderColor="#909399" searchIcon="search" margin="10rpx" maxlength="-1" height="60rpx" v-model="keyword_sp"
placeholderColor="#909399" searchIcon="search" margin="10rpx" maxlength="-1" height="60rpx"
@change="changeSP">
</up-search>
<u-scroll-list :indicator="false">
@ -40,13 +40,16 @@ body {
<view class="scroll-list__goods-item " v-for="(item, index) in list" :key="index"
:class="(index === menuIndex) ? 'row-active' : ''" @click="handleClick(index)"
:style="{ backgroundColor: item.bgColor }">
<image class="scroll-list__goods-item__image" :src="item.image" :class="(index === menuIndex) ? 'border-row-active' : ''"></image>
<image class="scroll-list__goods-item__image" :src="item.image"
:class="(index === menuIndex) ? 'border-row-active' : ''"></image>
<text class="scroll-list__goods-item__text">{{ item.name }}</text>
</view>
</view>
</u-scroll-list>
<z-paging ref="pagingRefSP" v-model="matchedItems_sp" loading-more-default-text=""
style="bottom: 100rpx;top:360rpx;width: 200rpx;right:0; padding: 0px;" class="fv-page flex-col px-4">
<z-paging v-model="matchedItems_sp" :fixed="false" height="calc(100vh - 360rpx)" width="200rpx" ref="pagingRefSP"
loading-more-default-text="" style=" left:0; padding: 0px; position: fixed;" class="fv-page flex-col px-4">
<u-scroll-list :indicator="false">
<view class="scroll-list" style="flex-direction: column;">
<view class="scroll-list__goods-item-column " v-for="(item, index) in list" :key="index"
@ -62,9 +65,8 @@ body {
</view>
</u-scroll-list>
</z-paging>
<z-paging ref="pagingRefSP" v-model="matchedItems_sp" @query="changeSP"
style="bottom: 100rpx;top:360rpx; width: calc(100% - 220rpx);left: unset; background-color: #FFFFFFFF;"
<z-paging ref="pagingRefSP" v-model="matchedItems_sp" @query="changeSP" :fixed="false" height="calc(100vh - 360rpx)"
width="calc(100vw - 220rpx)" style="right: 0; background-color: #FFFFFFFF; position: fixed;"
class="fv-page flex-col px-4">
<view v-for="(item, index) in goods_list" :key="index">
@ -87,6 +89,7 @@ body {
</up-cell>
</view>
</z-paging>
</view>
</template>
@ -796,7 +799,7 @@ export default defineComponent({
// menuIndex.value = index;
this.menuIndex = index;
CommonApi.goodsMenu({ key: 123 }).catch((res) => {
if (res.status == 200) {
if (res.status === 200) {
// this.tabList = res.data.menuList;
this.tabList = this.list1
console.log(res);

View File

@ -1,3 +1,10 @@
<style scoped>
.paging-content{
height: 200px;
/* display: flex; */
}
</style>
<template>
<view>
<u-popup :show="propShow" :round="10" mode="bottom" @close="close" @open="open">
@ -59,7 +66,7 @@
<up-navbar
class="" style="font-size: 28rpx;font-weight: bold;" left-icon="arrow-left" title-color="#FFFFFFFF"
bg-color="#FFFFFFFF" title-width="600rpx" height="80rpx" left-icon-size="40rpx" left-icon-color="#303133"
bg-color="#FFFFFFFF" title-width="800rpx" height="80rpx" width="200rpx" left-icon-size="40rpx" left-icon-color="#303133"
:safe-area-inset-top="true" :placeholder="true" :fixed="true"
>
<template #left>
@ -72,7 +79,7 @@
/>
</template>
</up-navbar>
<view v-show="currentTab" class="flex-col">
<view v-if="currentTab" class="flex-col">
<up-search
v-model="keyword_sc" class="flex,flex-row p-1" style="" shape="round" bg-color="#f2f2f2" placeholder="输入食材"
:clearabled="true" :show-action="false" input-align="left" border-color="transparent" search-icon-color="#909399"
@ -92,7 +99,7 @@
</up-text> -->
</view>
</view>
<view v-show="!currentTab" class="flex-col">
<view v-if="!currentTab" class="flex-col">
<up-search
v-model="keyword_sp" class="flex,flex-row p-1" style="" shape="round" bg-color="#f2f2f2" placeholder="输入食谱"
:clearabled="true" :show-action="false" input-align="left" border-color="transparent" search-icon-color="#909399"
@ -119,8 +126,12 @@
</view>
<z-paging
v-show="!currentTab" ref="pagingRefSP" v-model="matchedItems_sp" style="top:240rpx;bottom: 100rpx"
class="fv-page flex-col px-4" @query="changeSP"
:fixed="false"
height="calc(100vh - 320rpx)"
width="calc(100vw - 50rpx)"
:paging-style="{'background-color':'#FFFFFFFF','padding':'20rpx'} "
v-if="!currentTab" ref="pagingRefSP" v-model="matchedItems_sp"
class="fv-page flex-col " @query="changeSP"
>
<up-checkbox-group v-model="checkboxValue" placement="column" @change="checkboxChange">
<up-cell-group class=" " style="" :border="true">
@ -167,8 +178,12 @@
</z-paging>
<z-paging
v-show="currentTab" ref="pagingRefSC" v-model="matchedItems_sc" style="top:240rpx;bottom: 100rpx"
class="fv-page flex-col px-4" @query="changeSC"
:fixed="false"
height="calc(100vh - 320rpx)"
width="calc(100vw - 50rpx)"
:paging-style="{'background-color':'#FFFFFFFF','padding':'20rpx'} "
v-if="currentTab" ref="pagingRefSC" v-model="matchedItems_sc"
class="fv-page flex-col " @query="changeSC"
>
<view v-for="(item, index) in matchedItems_sc" :key="index">
<u-cell>