Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
bbef66cc
Commit
bbef66cc
authored
Jun 10, 2025
by
张九刚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新品牌API请求,优化品牌数据结构,调整搜索页面数据格式,动态加载品牌信息
parent
74249ea7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
271 additions
and
275 deletions
+271
-275
brand.js
api/brand.js
+1
-6
brand.js
mock/brand.js
+1
-1
node_brand.js
mock/node_brand.js
+257
-257
search.vue
pages/search/search.vue
+1
-1
Brand.vue
views/Brand.vue
+11
-10
No files found.
api/brand.js
View file @
bbef66cc
...
@@ -3,10 +3,5 @@ const {
...
@@ -3,10 +3,5 @@ const {
api
api
}
=
requestModule
;
}
=
requestModule
;
/**
* 获取首页信息
* @returns
*/
export
const
fetchHomeInfo
=
()
=>
api
.
get
(
'/c/user/index'
);
export
const
fetchHomeJSON
=
()
=>
api
.
get
(
'/c/front/content'
,{
type
:
'home'
});
export
const
fetchBrandJSON
=
()
=>
api
.
get
(
'/c/front/content'
,{
type
:
'brand'
});
\ No newline at end of file
\ No newline at end of file
mock/brand.js
View file @
bbef66cc
...
@@ -31,7 +31,7 @@ export const brandObj = {
...
@@ -31,7 +31,7 @@ export const brandObj = {
"productTabList"
:
[
"productTabList"
:
[
"全部"
,
"母婴全阶"
,
"功能营养"
,
"儿童产品"
,
"北纬47°"
"全部"
,
"母婴全阶"
,
"功能营养"
,
"儿童产品"
,
"北纬47°"
],
],
"product
InfoList
"
:
[
"product"
:
[
[
[
{
{
"bgUrl"
:
"brandpage/pic_0_1.png"
,
"bgUrl"
:
"brandpage/pic_0_1.png"
,
...
...
mock/node_brand.js
View file @
bbef66cc
This diff is collapsed.
Click to expand it.
pages/search/search.vue
View file @
bbef66cc
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
keyword
:
this
.
searchValue
keyword
:
this
.
searchValue
}).
then
(
res
=>
{
}).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
// this.resultList=res.data || []
;
this
.
resultList
=
res
.
data
||
{
'tool'
:[],
'content'
:[],
'product'
:[]}
;
});
});
}
}
}
}
...
...
views/Brand.vue
View file @
bbef66cc
...
@@ -131,6 +131,7 @@
...
@@ -131,6 +131,7 @@
<
script
>
<
script
>
import
{
brandObj
}
from
'../mock/brand'
;
import
{
brandObj
}
from
'../mock/brand'
;
import
{
fetchBrandJSON
}
from
'../api/brand'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -157,15 +158,15 @@ export default {
...
@@ -157,15 +158,15 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
swiperList
=
brandObj
.
swiperList
;
//
this.swiperList = brandObj.swiperList;
this
.
productTabList
=
brandObj
.
productTabList
;
//
this.productTabList = brandObj.productTabList;
this
.
productInfoList
=
brandObj
.
productInfoList
;
//
this.productInfoList = brandObj.productInfoList;
this
.
esgInfoList
=
brandObj
.
esgInfoList
;
//
this.esgInfoList = brandObj.esgInfoList;
this
.
qrInfoList
=
brandObj
.
qrInfoList
;
//
this.qrInfoList = brandObj.qrInfoList;
this
.
ipDesc
=
brandObj
.
ipDesc
;
//
this.ipDesc = brandObj.ipDesc;
this
.
swiperIconList
=
brandObj
.
swiperIconList
;
//
this.swiperIconList = brandObj.swiperIconList;
this
.
currentVideoUrl
=
brandObj
.
videoUrl
;
//
this.currentVideoUrl=brandObj.videoUrl;
//
this.initBrandInfo();
this
.
initBrandInfo
();
},
},
methods
:
{
methods
:
{
async
initBrandInfo
(){
async
initBrandInfo
(){
...
@@ -173,7 +174,7 @@ export default {
...
@@ -173,7 +174,7 @@ export default {
if
(
data
){
if
(
data
){
this
.
swiperList
=
data
.
swiperList
;
this
.
swiperList
=
data
.
swiperList
;
this
.
productTabList
=
data
.
productTabList
;
this
.
productTabList
=
data
.
productTabList
;
this
.
productInfoList
=
data
.
product
InfoList
;
this
.
productInfoList
=
data
.
product
;
this
.
esgInfoList
=
data
.
esgInfoList
;
this
.
esgInfoList
=
data
.
esgInfoList
;
this
.
qrInfoList
=
data
.
qrInfoList
;
this
.
qrInfoList
=
data
.
qrInfoList
;
this
.
ipDesc
=
data
.
ipDesc
;
this
.
ipDesc
=
data
.
ipDesc
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment