bugfix
This commit is contained in:
parent
086ccbff0d
commit
a621c6402a
@ -14,13 +14,13 @@
|
|||||||
<span class="radio-text">企业需求</span>
|
<span class="radio-text">企业需求</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="history-list" v-if="productList.length > 0">
|
<div v-loading="loadingBox" class="history-list" v-if="productList.length > 0">
|
||||||
<div class="history-item" v-for="item in productList" :key="item.id">
|
<div class="history-item" v-for="item in productList" :key="item.id">
|
||||||
<div class="history-date">
|
<div class="history-date">
|
||||||
<span class="date-text">{{ formatBrowseDate(item.create_at) }}</span>
|
<span class="date-text">{{ formatBrowseDate(item.browse_date) }}</span>
|
||||||
<span class="relative-time">{{ getRelativeTime(item.create_at) }}</span>
|
<span class="relative-time">{{ getRelativeTime(item.browse_date) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="follow-content">
|
<div class="history-content">
|
||||||
<productCard
|
<productCard
|
||||||
contentType="favorite"
|
contentType="favorite"
|
||||||
:productList="item.products"
|
:productList="item.products"
|
||||||
@ -44,6 +44,7 @@ export default {
|
|||||||
name: 'followBox',
|
name: 'followBox',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loadingBox:false,
|
||||||
productList: [],
|
productList: [],
|
||||||
value1: null,
|
value1: null,
|
||||||
publish_type: '1', // 默认选择企业商品
|
publish_type: '1', // 默认选择企业商品
|
||||||
@ -67,10 +68,12 @@ export default {
|
|||||||
this.reqFavoriteSearch();
|
this.reqFavoriteSearch();
|
||||||
},
|
},
|
||||||
reqFavoriteSearch() {
|
reqFavoriteSearch() {
|
||||||
|
this.loadingBox = true;
|
||||||
reqFavoriteSearch({
|
reqFavoriteSearch({
|
||||||
url_list: window.location.href,
|
url_list: window.location.href,
|
||||||
publish_type: this.publish_type // 传递发布类型参数
|
publish_type: this.publish_type // 传递发布类型参数
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.loadingBox = false;
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
// 处理数据结构,将product_info的子项提升到上一级
|
// 处理数据结构,将product_info的子项提升到上一级
|
||||||
this.productList = this.flattenProductInfo(res.data.favorites);
|
this.productList = this.flattenProductInfo(res.data.favorites);
|
||||||
@ -235,11 +238,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 关注记录列表样式 */
|
/* 关注记录列表样式 */
|
||||||
.follow-list {
|
.history-list {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.follow-item {
|
.history-item {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@ -249,12 +252,12 @@ export default {
|
|||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.follow-item:hover {
|
.history-item:hover {
|
||||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
|
||||||
/* transform: translateY(-2px); */
|
/* transform: translateY(-2px); */
|
||||||
}
|
}
|
||||||
|
|
||||||
.follow-date {
|
.history-date {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
@ -277,7 +280,7 @@ export default {
|
|||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.follow-content {
|
.history-content {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<span class="radio-text">企业需求</span>
|
<span class="radio-text">企业需求</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="history-list" v-if="productList.length > 0">
|
<div v-loading="loadingBox" class="history-list" v-if="productList.length > 0">
|
||||||
<div class="history-item" v-for="item in productList" :key="item.id">
|
<div class="history-item" v-for="item in productList" :key="item.id">
|
||||||
<div class="history-date">
|
<div class="history-date">
|
||||||
<span class="date-text">{{ formatBrowseDate(item.browse_date) }}</span>
|
<span class="date-text">{{ formatBrowseDate(item.browse_date) }}</span>
|
||||||
@ -44,6 +44,7 @@ export default {
|
|||||||
name: 'historyBox',
|
name: 'historyBox',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loadingBox:false,
|
||||||
productList: [],
|
productList: [],
|
||||||
value1: null,
|
value1: null,
|
||||||
publish_type: '1', // 默认选择企业商品
|
publish_type: '1', // 默认选择企业商品
|
||||||
@ -67,10 +68,12 @@ export default {
|
|||||||
this.reqUserBrowseHistorySearch();
|
this.reqUserBrowseHistorySearch();
|
||||||
},
|
},
|
||||||
reqUserBrowseHistorySearch() {
|
reqUserBrowseHistorySearch() {
|
||||||
|
this.loadingBox = true;
|
||||||
reqUserBrowseHistorySearch({
|
reqUserBrowseHistorySearch({
|
||||||
url_list: window.location.href,
|
url_list: window.location.href,
|
||||||
publish_type: this.publish_type // 传递发布类型参数
|
publish_type: this.publish_type // 传递发布类型参数
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.loadingBox = false;
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
// 处理数据结构,将product_info的子项提升到上一级
|
// 处理数据结构,将product_info的子项提升到上一级
|
||||||
this.productList = this.flattenProductInfo(res.data.history_list);
|
this.productList = this.flattenProductInfo(res.data.history_list);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user