Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-10-28 15:03:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
56564222492398ffcb31a13a94bef0cbab64a294
56564222
1 parent
c79eefb6
新增产品未上架的提示和图片
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
src/views/product/index.vue
src/views/search.vue
src/views/product/index.vue
View file @
5656422
<!--
* @Date: 2024-09-27 16:53:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-28 1
1:43:10
* @LastEditTime: 2024-10-28 1
5:03:09
* @FilePath: /hager/src/views/product/index.vue
* @Description: 文件描述
-->
...
...
@@ -33,7 +33,7 @@
<div class="product-list">
<div class="product-item" v-for="(item, index) in product_list" :key="index">
<div class="product-item-img">
<img style="width: 100%; height: auto;" :src="item.product_status === 'publish' ? item.cover :
'https://cdn.ipadbiz.cn/hager/img/product/%E7%BB%84%20130@2x.png'
">
<img style="width: 100%; height: auto;" :src="item.product_status === 'publish' ? item.cover :
no_product_img
">
</div>
<p @click="goToDetail(item)" class="product-item-title">{{ item.product_name }}</p>
</div>
...
...
@@ -44,7 +44,7 @@
<div v-else class="product-list">
<div class="product-item xs" v-for="(item, index) in product_list" :key="index">
<div @click="goToDetail(item)" class="product-item-img xs">
<img style="width: 100%; height: auto;" :src="item.product_status === 'publish' ? item.cover :
'https://cdn.ipadbiz.cn/hager/img/product/%E7%BB%84%20130@2x.png'
">
<img style="width: 100%; height: auto;" :src="item.product_status === 'publish' ? item.cover :
no_product_img
">
</div>
<p @click="goToDetail(item)" class="product-item-title">{{ item.product_name }}</p>
</div>
...
...
@@ -86,6 +86,7 @@ export default {
}]
}],
product_list: [],
no_product_img: 'https://cdn.ipadbiz.cn/hager/img/no-product-img.png',
}
},
async mounted () {
...
...
src/views/search.vue
View file @
5656422
<!--
* @Date: 2024-10-20 16:57:48
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-2
7 12:01:2
4
* @LastEditTime: 2024-10-2
8 15:03:1
4
* @FilePath: /hager/src/views/search.vue
* @Description: 文件描述
-->
...
...
@@ -106,6 +106,7 @@ export default {
limit: 10,
news_max_page: 0,
case_max_page: 0,
no_product_img: 'https://cdn.ipadbiz.cn/hager/img/no-product-img.png',
}
},
watch: {
...
...
@@ -163,7 +164,7 @@ export default {
// 新增不可用状态的图片
this.product_list.forEach(item => {
if (item.product_status === 'apply') {
item.cover =
'https://cdn.ipadbiz.cn/hager/img/product/%E7%BB%84%20130@2x.png'
item.cover =
this.no_product_img
}
})
this.solution_list = data.solution;
...
...
Please
register
or
login
to post a comment