@ -0,0 +1,41 @@ | |||
<template> | |||
<view class="page__view"> | |||
<!-- 导航栏 --> | |||
<navbar :title="details.paramDesc" leftClick @leftClick="$utils.navigateBack" /> | |||
<image class="img" :src="details.details" mode="widthFix"></image> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
details: {}, | |||
} | |||
}, | |||
onLoad({ paramCode }) { | |||
this.getData(paramCode) | |||
}, | |||
methods: { | |||
async getData(paramCode) { | |||
try { | |||
this.details = await this.$fetch('querySummaryByParamCode', { paramCode }) | |||
} catch (err) { | |||
console.log('err', err) | |||
} | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.img { | |||
width: 100vw; | |||
height: auto; | |||
} | |||
</style> |
@ -0,0 +1,80 @@ | |||
<template> | |||
<view class="page__view"> | |||
<!-- 导航栏 --> | |||
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="list"> | |||
<view class="list-item" | |||
v-for="item in secondCategoryList" | |||
:key="item.id" | |||
@click="jumpToList(item.id, item.title)" | |||
> | |||
<image class="list-item-bg" :src="item.image" mode="scaleToFill"></image> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
pid: null, | |||
title: null, | |||
bannerList: [], | |||
secondCategoryList: [], | |||
} | |||
}, | |||
onLoad(arg) { | |||
const { pid, title } = arg | |||
this.pid = pid | |||
this.title = title | |||
this.getData() | |||
}, | |||
methods: { | |||
async getData() { | |||
try { | |||
this.secondCategoryList = (await this.$fetch('queryCategoryServiceModuleList', { pid: this.pid, pageNo: 1, pageSize: 1000 }))?.records | |||
} catch (err) { | |||
} | |||
}, | |||
jumpToList(categoryId, title) { | |||
uni.navigateTo({ | |||
url: `/pages_order/serve/search?categoryId=${categoryId}&title=${title}` | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.list { | |||
margin: 0 18rpx; | |||
&-item { | |||
position: relative; | |||
font-size: 0; | |||
border-radius: 25rpx; | |||
overflow: hidden; | |||
box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16); | |||
& + & { | |||
margin-top: 32rpx; | |||
} | |||
&-bg { | |||
$w: calc(100vw - 18rpx*2); | |||
width: $w; | |||
height: calc(#{$w} * 179 / 714); | |||
} | |||
} | |||
} | |||
</style> |
@ -0,0 +1,119 @@ | |||
<template> | |||
<view class="page__view"> | |||
<!-- 导航栏 --> | |||
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="top"> | |||
<!-- 搜索栏 --> | |||
<view class="search"> | |||
<uv-search v-model="keyword" placeholder="输入关键词搜索" bgColor="#FBFBFB" @custom="search" @search="search"> | |||
<template #prefix> | |||
<image class="search-icon" src="@/static/image/icon-search.png" mode="widthFix"></image> | |||
</template> | |||
</uv-search> | |||
</view> | |||
</view> | |||
<view class="list"> | |||
<view class="list-item" | |||
v-for="item in list" | |||
:key="item.id" | |||
@click="jumpToDetail(item.id, item.title)" | |||
> | |||
<image class="list-item-bg" :src="item.image" mode="scaleToFill"></image> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import mixinsList from '@/mixins/list.js' | |||
export default { | |||
mixins: [mixinsList], | |||
data() { | |||
return { | |||
title: '搜索', | |||
keyword: '', | |||
queryParams: { | |||
pageNo: 1, | |||
pageSize: 10, | |||
categoryId: '', | |||
title: '', | |||
}, | |||
mixinsListApi: 'queryServiceArticleList', | |||
} | |||
}, | |||
onLoad(arg) { | |||
const { categoryId, title } = arg | |||
this.title = title | |||
this.queryParams.categoryId = categoryId | |||
this.getData() | |||
}, | |||
methods: { | |||
jumpToDetail(articleId) { | |||
uni.navigateTo({ | |||
url: `/pages_order/serve/index?articleId=${articleId}` | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.top { | |||
padding: 49rpx 0 17rpx 0; | |||
box-sizing: border-box; | |||
} | |||
.search { | |||
margin: 0 19rpx; | |||
width: calc(100% - 20rpx * 2); | |||
background-color: #FFFFFF; | |||
border-radius: 37rpx; | |||
padding: 13rpx 0 13rpx 18rpx; | |||
box-sizing: border-box; | |||
display: flex; | |||
align-items: center; | |||
/deep/ .uv-search__action { | |||
color: $uni-color; | |||
padding: 10rpx 18rpx; | |||
} | |||
&-icon { | |||
width: 26rpx; | |||
height: auto; | |||
} | |||
} | |||
.list { | |||
margin: 0 18rpx; | |||
&-item { | |||
position: relative; | |||
font-size: 0; | |||
border-radius: 25rpx; | |||
overflow: hidden; | |||
box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16); | |||
& + & { | |||
margin-top: 32rpx; | |||
} | |||
&-bg { | |||
$w: calc(100vw - 18rpx*2); | |||
width: $w; | |||
height: calc(#{$w} * 179 / 714); | |||
} | |||
} | |||
} | |||
</style> |