From a28b79ba47d0766b87969a625e1a30e926093a59 Mon Sep 17 00:00:00 2001 From: wei <1937506227@qq.com> Date: Fri, 24 Oct 2025 14:44:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(home):=20=E6=96=B0=E5=A2=9E=E8=B5=B0?= =?UTF-8?q?=E8=BF=9B=E8=8F=9C=E5=A4=A7=E7=8E=8B=E9=A1=B5=E9=9D=A2=E5=8F=8A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加走进菜大王主页面及详情页,支持图片和视频展示 - 实现视频播放和图片预览功能 - 新增相关API接口和样式文件 - 优化页面布局和交互体验 --- libs/api/index.js | 40 +++++- pages/home/announcement.vue | 52 ++++++++ pages/home/enterKing/enterKing.scss | 81 ++++++++++++ pages/home/enterKing/enterKing.vue | 160 ++++++++++++++++++++++++ pages/home/enterKing/enterKingInfo.scss | 9 ++ pages/home/enterKing/enterKingInfo.vue | 115 +++++++++++++++++ static/enterVegetableKingInfo/video.png | Bin 0 -> 1897 bytes 7 files changed, 456 insertions(+), 1 deletion(-) create mode 100644 pages/home/announcement.vue create mode 100644 pages/home/enterKing/enterKing.scss create mode 100644 pages/home/enterKing/enterKing.vue create mode 100644 pages/home/enterKing/enterKingInfo.scss create mode 100644 pages/home/enterKing/enterKingInfo.vue create mode 100644 static/enterVegetableKingInfo/video.png diff --git a/libs/api/index.js b/libs/api/index.js index 6e67490..6f2538f 100644 --- a/libs/api/index.js +++ b/libs/api/index.js @@ -398,7 +398,7 @@ export function getMenuProductsApi(params = {}) { */ export function newMenusToCartApi(data = {}) { return request({ - errorMessage: "添加菜谱到购物车", + errorMessage: "菜谱", method: "POST", data, header: { @@ -407,3 +407,41 @@ export function newMenusToCartApi(data = {}) { url: "/setmeal/addCaiPu.do", }); } + +// // +// module.exports.getJoinEnterprise = function (postData, success) { +// request('/company/searchCompanyInfo.do', 'GET', postData, success) +// } + +/** + * 获取加入企业列表 + * @param {*} params + */ +export function getJoinEnterpriseApi(params = {}) { + return request({ + errorMessage: "企业列表", + method: "GET", + params, + url: "/company/searchCompanyInfo.do", + }); +} + +// //走进菜大王列表数据 +// module.exports.getNewsList = function (postData, success) { +// request('/webAboutUs/getList.do', 'get', postData, success) +// } + +/** + * 获取走进菜大王列表 + */ +export function getNewsListApi(params = {}) { + return request({ + errorMessage: "菜大王列表", + method: "GET", + params, + url: "/webAboutUs/getList.do", + }); +} +// odule.exports.addCart = function (postData, success) { +// request('/cart/add.do', 'POST', postData, success); +// }; diff --git a/pages/home/announcement.vue b/pages/home/announcement.vue new file mode 100644 index 0000000..3a1ba5c --- /dev/null +++ b/pages/home/announcement.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/pages/home/enterKing/enterKing.scss b/pages/home/enterKing/enterKing.scss new file mode 100644 index 0000000..51c1147 --- /dev/null +++ b/pages/home/enterKing/enterKing.scss @@ -0,0 +1,81 @@ +.grid-item{ + width: 33.33333333333%; + /* height: 63.5vw; */ + height: calc(100% /3); + float: left; + margin-bottom: 10rpx; +} + +.grid-item .box{ + position: relative; +} + +.grid-item .text-box{ + position: absolute; + left: 0; + right: 0; + bottom: 0; + width: 100%; + background-image: linear-gradient(#00000000, rgba(0, 0, 0, 0.842), rgba(0, 0, 0, 0.842)); + padding: 30rpx 10rpx 20rpx 10rpx; + box-sizing: border-box; +} + +.grid-item .text-box .text{ + font-size: 26rpx; + color: #fff; + text-align: center; +} + +.play_btn{ + position:absolute; + top: 50%; + margin-top: -20px; + left: 50%; + margin-left: -20px; + width: 40px; + height: 40px; +} +.play_btn image{ + width: 100%; + height: 100%; +} + +.title{ + /* background: #fff; */ + padding: 30rpx 15rpx; + /* background: #f1f1f1; */ + font-size: 40rpx; + color: #151515; + /* margin-bottom: 30rpx; */ + display: flex; + align-items: center; + /* border-bottom: 1px solid #f1f1f1; */ +} + +.title image{ + width: 50rpx; + height: 30rpx; + margin-right: 20rpx; +} + +.title text{ + position: relative; + padding-left: 20rpx; +} + +.title text::after{ + content: ""; + position: absolute; + top: 50%; + left: 0%; + width: 6rpx; + height: 50%; + border-radius: 14rpx; + background-color: #05B359; + transform: translateY(-50%); +} + +page{ + /* background: #f5f5f5; */ +} diff --git a/pages/home/enterKing/enterKing.vue b/pages/home/enterKing/enterKing.vue new file mode 100644 index 0000000..87867f8 --- /dev/null +++ b/pages/home/enterKing/enterKing.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/pages/home/enterKing/enterKingInfo.scss b/pages/home/enterKing/enterKingInfo.scss new file mode 100644 index 0000000..c8ded51 --- /dev/null +++ b/pages/home/enterKing/enterKingInfo.scss @@ -0,0 +1,9 @@ +#video_box{ + width: 100%; + height: 100%; +} + +video{ + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/pages/home/enterKing/enterKingInfo.vue b/pages/home/enterKing/enterKingInfo.vue new file mode 100644 index 0000000..4237f73 --- /dev/null +++ b/pages/home/enterKing/enterKingInfo.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/static/enterVegetableKingInfo/video.png b/static/enterVegetableKingInfo/video.png new file mode 100644 index 0000000000000000000000000000000000000000..d885a3a8e02c02340b80c9812009fa3c6df9bc46 GIT binary patch literal 1897 zcmV-v2bTDWP)Px+BS}O-RCr$HTUn?aMHD^f(;XG{N8|D(?n_*8i^jO)67|PK1tTVkpn`}fn4lse zXh1Zs;QrwjMHAz0+);5?P|*YxSKMNP=+BY!a%-sc>v`QX)03GY7lv87tLok}Rk!cG zb&6OEBIz&y+W?pp@A+qI@Ew3}7ej8CudFH1#mXW&pYX^BLHH`Kb(2>PXJs`^1)69ZR%c0 zX8^biz^>7!9pmXFYcGk~0EDBvD^uRi?R=7ceh*9}IkvbJK<+GO)pd}y0FX2nz*U)* z3rL<9+0PsTA(R7lJS9Lsy>yl0Z@K`qXRFW@Fq|1Z= zNZJj+N2vpnm4FSx@Zy+~l>N3l$&cIV)z%;Fi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