Fix(千县名品/店铺):[#2227]底部的产业项目无法点击进入二级页面查看项目列表

This commit is contained in:
lifizer
2024-08-28 14:47:58 +08:00
parent dce2377383
commit 4a354a7dcf
3 changed files with 41 additions and 17 deletions
+36 -13
View File
@@ -26,18 +26,17 @@
class="icon" class="icon"
/> />
</view> </view>
<!-- <image <view v-if="currentList.length === 0" class="no-data-txt">
:src="webUrl + '/home/no-data-bg.png'" 暂无数据~
mode="widthFix" </view>
class="loadend"
/> -->
</view> </view>
<goo-skeleton v-else /> <goo-skeleton v-else />
</view> </view>
</template> </template>
<script> <script>
import { import {
getCountyFamousInvestmentFile getCountyFamousInvestmentFile,
getCountyFamousIndustryProjectFile
} from '@/api/qianxian' } from '@/api/qianxian'
import { pageListenMixins } from '@/mixins/pageListenMixins' import { pageListenMixins } from '@/mixins/pageListenMixins'
export default { export default {
@@ -55,18 +54,36 @@ export default {
}, },
onLoad(options) { onLoad(options) {
const id = options.id const id = options.id
this.getListReq(id) const type = options.type || 'investment'
const title = options.title || ''
if (title) {
uni.setNavigationBarTitle({ title })
}
this.getListReq(id, type)
}, },
methods: { methods: {
handleSearch() { handleSearch() {
this.currentList = this.list.filter(item => item.title.indexOf(this.keyword) > -1) this.currentList = this.list.filter(item => item.title.indexOf(this.keyword) > -1)
}, },
getListReq(id) { getListReq(id, type) {
getCountyFamousInvestmentFile({ let reqFn = null
countyFamousDataId: id, let params = {}
page: 1, if (type === 'investment') {
limit: 9999 reqFn = getCountyFamousInvestmentFile
}).then(res => { params = {
countyFamousDataId: id,
page: 1,
limit: 9999
}
} else {
reqFn = getCountyFamousIndustryProjectFile
params = {
industryProjectId: id,
page: 1,
limit: 9999
}
}
reqFn(params).then(res => {
const { success, data } = res const { success, data } = res
if (success) { if (success) {
this.isLoad = true this.isLoad = true
@@ -126,5 +143,11 @@ export default {
.loadend { .loadend {
width: 100%; width: 100%;
} }
.no-data-txt {
text-align: center;
line-height: 200rpx;
color: #999;
font-size: 36rpx;
}
} }
</style> </style>
+4 -3
View File
@@ -360,6 +360,7 @@
<image <image
:src="item.image" :src="item.image"
class="img" class="img"
@click="gotoInvestment(item.title, 'project', item.id)"
/> />
</view> </view>
</view> </view>
@@ -412,7 +413,7 @@
</view> </view>
</view> </view>
<view v-if="investmentFileList.length > 0" class="more-btn-wrap"> <view v-if="investmentFileList.length > 0" class="more-btn-wrap">
<view class="more-btn" @click="gotoInvestment"> <view class="more-btn" @click="gotoInvestment('', 'investment')">
更多政策 更多政策
</view> </view>
</view> </view>
@@ -949,8 +950,8 @@ export default {
} }
}) })
}, },
gotoInvestment() { gotoInvestment(title = '', type = 'investment', id = '') {
uni.navigateTo({ url: `/pkg_product/views/famousQianxianInvestment?id=${this.id}` }) uni.navigateTo({ url: `/pkg_product/views/famousQianxianInvestment?id=${id || this.id}&title=${title}&type=${type}` })
}, },
villageItemClick(item) { villageItemClick(item) {
uni.navigateTo({ url: `/pkg_product/views/famousQianxianVillageShop?id=${item.id}` }) uni.navigateTo({ url: `/pkg_product/views/famousQianxianVillageShop?id=${item.id}` })
@@ -444,7 +444,7 @@ export default {
line-height: 48rpx; line-height: 48rpx;
} }
.inn-owner { .inn-owner {
width: calc(100% - 160rpx); width: calc(100% - 240rpx);
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;