From b397ba232f32881e6bae1acb01374883c38116cd Mon Sep 17 00:00:00 2001 From: linxi Date: Wed, 9 Oct 2024 18:07:04 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9A=E5=BA=B7=E5=85=BB=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E6=8E=A5=EF=BC=8C=E7=BB=86=E8=8A=82=E8=B0=83?= =?UTF-8?q?=E4=BC=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/health.js | 20 ++- pkg_product/views/healthFoodDetails.vue | 75 ++++++---- pkg_product/views/healthFoods.vue | 180 ++++++++++++++++++------ pkg_product/views/healthSanctum.vue | 57 +++++--- 4 files changed, 248 insertions(+), 84 deletions(-) diff --git a/api/health.js b/api/health.js index 47ceac1..fa1d0a8 100644 --- a/api/health.js +++ b/api/health.js @@ -50,6 +50,24 @@ export function getRank(params) { * @param {*} params * @returns */ -export function getFood(params) { +export function getFoods(params) { return request.get("/wellness/place/food", params) +} + +/** + * 康养生活-配方详情 + * @param {*} id + * @returns + */ +export function getFoodDetails(id) { + return request.get("/wellness/recipe/" + id) +} + +/** + * 康养生活-配方列表 + * @param {*} params + * @returns + */ +export function getRecipe(params) { + return request.get("/wellness/recipe", params) } \ No newline at end of file diff --git a/pkg_product/views/healthFoodDetails.vue b/pkg_product/views/healthFoodDetails.vue index b8fd672..5531f49 100644 --- a/pkg_product/views/healthFoodDetails.vue +++ b/pkg_product/views/healthFoodDetails.vue @@ -1,12 +1,11 @@ @@ -170,7 +192,8 @@ align-items: center; justify-content: flex-start; margin-right: 24rpx; - padding: 0 20rpx; + // padding: 20rpx; + overflow: hidden; } .step-item:last-child{ margin-right: 0 !important; @@ -203,6 +226,7 @@ height: 90rpx; background: rgba(63,20,20,0.39); border-radius: 20rpx; + overflow: hidden; } .primary-item{ } @@ -229,6 +253,7 @@ background: rgba(180,18,18,0.39); border-radius: 40rpx; box-sizing: border-box; + overflow: hidden; } .details-list-wrap{ background: #F2F2F2; diff --git a/pkg_product/views/healthFoods.vue b/pkg_product/views/healthFoods.vue index f9fa1e3..abc66e2 100644 --- a/pkg_product/views/healthFoods.vue +++ b/pkg_product/views/healthFoods.vue @@ -1,18 +1,24 @@ \ No newline at end of file diff --git a/pkg_product/views/healthSanctum.vue b/pkg_product/views/healthSanctum.vue index 0a67a90..8192aec 100644 --- a/pkg_product/views/healthSanctum.vue +++ b/pkg_product/views/healthSanctum.vue @@ -12,8 +12,11 @@ - - 旅居预约 + + + + + 旅居预约 @@ -29,12 +32,18 @@ - - + + {{ item.areaName }} - {{ item.address }} - + {{ item.address }} + @@ -51,16 +60,7 @@ export default { return { tabs: [], items: [], - traveItems: [ - {img: '', value: ''}, - {img: '', value: ''}, - {img: '', value: ''}, - {img: '', value: ''}, - {img: '', value: ''}, - {img: '', value: ''}, - {img: '', value: ''}, - {img: '', value: ''}, - ], + traveItems: [], actived: 0, cityId: '', cityName: '', @@ -70,12 +70,13 @@ export default { }, onLoad(opts) { this.cityId = opts.city - this.cityName = opts.cityName + this.cityName = decodeURIComponent(decodeURIComponent(opts.cityName)) getCategory().then(res => { this.tabs = res.data this.categoryId = res.data[0].id this.getList() }) + this.getTop() }, methods: { handleTab(index, tab) { @@ -103,7 +104,27 @@ export default { }, search() { this.getList() - } + }, + getTop() { + const params = { + goodCityId: this.cityId, + categoryId: 0, + page: 1, + limit: 9999 + } + getWellnessPlace(params).then(res => { + // console.log(res); + this.traveItems = res.data.records + }) + }, + toStore(id) { + this.$yrouter.push({ + path: '/pagesInn/inn/innHome', + query: { + id: id + } + }) + }, } }