页面
Some checks are pending
Auto Merge Main to Other Branches / Merge main into i18n (push) Waiting to run
Auto Merge Main to Other Branches / Merge main into base-sard-ui (push) Waiting to run

This commit is contained in:
sjeam 2025-09-05 10:08:04 +08:00
parent a5220394a1
commit d5019d0c9c
2 changed files with 28 additions and 18 deletions

View File

@ -46,7 +46,7 @@
<wd-img radius="10rpx" :width="'160rpx'" :height="'100rpx'" :src="item.image" />
<view
class="absolute bottom-5 text-center left-0 right-0 text-white text-center text-gray-500 font-size-3 bg-black bg-opacity-20"
class="absolute bottom-5 text-center left-5 right-5 text-white text-center text-gray-500 font-size-3 bg-black bg-opacity-20"
>
{{ item.name }}
</view>
@ -113,6 +113,7 @@ export default defineComponent({
}
},
async onLoad(option) {
console.log(option)
this.getCategory()
this.getDetail(1)
},

View File

@ -158,7 +158,7 @@
美丽乡村风貌展示厅
</text>
</view>
<wd-button type="primary" size="small">
<wd-button type="primary" size="small" @click="switchTab(eat_id)">
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
</wd-button>
</view>
@ -216,7 +216,7 @@
精选好物不容错过
</text>
</view>
<wd-button type="primary" size="small">
<wd-button type="primary" size="small" @click="switchTab(live_id)">
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
</wd-button>
</view>
@ -225,7 +225,7 @@
</view>
<view class="p-1">
<wd-row class=" ">
<wd-col :span="12" v-for="item in product_30">
<wd-col :span="12" v-for="item in index_live">
<view
class="p-1"
style=""
@ -239,12 +239,12 @@
<view class="py-2">
<wd-card custom-class="card-content">
<view style="height: 200rpx">
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.image" />
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.cover" />
</view>
<view class="ps-2 pt-2 font-size-4 font-bold">{{ item.store_name }}</view>
<view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.store_info }}</view>
<view class="ps-2 pt-2 font-size-4 font-bold">{{ item.title }}</view>
<view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.description }}</view>
<view class="ps-2 pt-2 pb-2">
<view class="text-sm text-gray-500 text-left">
<!-- <view class="text-sm text-gray-500 text-left">
<wd-text size="20rpx" color="red" :text="item.price" mode="price" prefix="¥" />
<wd-text size="20rpx" color="red" text="券后价" mode="text" prefix=" " />
<wd-text
@ -255,7 +255,7 @@
decoration="line-through"
prefix="¥"
/>
</view>
</view> -->
</view>
</wd-card>
</view>
@ -274,7 +274,7 @@
热门咨询一键掌握新鲜事
</text>
</view>
<wd-button type="primary" size="small">
<wd-button type="primary" size="small" @click="switchTab(play_id)">
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
</wd-button>
</view>
@ -283,7 +283,7 @@
</view>
<view class="p-2">
<view class="py-2" v-for="item in index_eat" @click="goPage(item)">
<view class="py-2" v-for="item in index_play" @click="goPage(item)">
<wd-card custom-class="card-content">
<view class="content p-2" style="align-items: normal">
<view style="width: 280rpx; height: 200rpx">
@ -314,7 +314,7 @@
好玩儿路线一网打尽
</text>
</view>
<wd-button type="primary" size="small">
<wd-button type="primary" size="small" @click="switchTab(purchase_id)">
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
</wd-button>
</view>
@ -323,7 +323,7 @@
</view>
<view class="p-1">
<wd-row class=" ">
<wd-col :span="12" v-for="item in index_eat">
<wd-col :span="12" v-for="item in index_live">
<view class="p-1">
<view class="py-2" @click="goPage(item)">
<wd-card custom-class="card-content">
@ -380,6 +380,11 @@ export default defineComponent({
index_eat: {},
index_live: {},
index_play: {},
eat_id: 1,
live_id: 7,
play_id: 8,
purchase_id: 6,
index_purchase: {},
current_item: {},
currentTab: 1,
@ -423,12 +428,12 @@ export default defineComponent({
},
async getArticle() {
this.index_eat = await this.getIndex(1)
this.index_eat = await this.getIndex(this.eat_id)
this.current_item = this.index_eat[0] || {}
this.index_live = await this.getIndex(2)
this.index_live = await this.getIndex(this.live_id)
this.index_play = await this.getIndex(3)
this.index_purchase = await this.getIndex(4)
this.index_play = await this.getIndex(this.play_id)
this.index_purchase = await this.getIndex(this.purchase_id)
},
async getIndex(category_id) {
const res = await getArticleIndexAPI({ category_id: category_id })
@ -456,7 +461,11 @@ export default defineComponent({
// url: `/pages/web_view/index?target=${item.url}&title=${item.name}`,
// })
// },
switchTab(index) {
uni.switchTab({
url: '/pages/about/index?category_id=' + index,
})
},
more(item) {
console.log(item)
if (item.type == 1) {