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
Show 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 {
api
}
=
requestModule
;
/**
* 获取首页信息
* @returns
*/
export
const
fetchHomeInfo
=
()
=>
api
.
get
(
'/c/user/index'
);
export
const
fetchHomeJSON
=
()
=>
api
.
get
(
'/c/front/content'
,{
type
:
'home'
});
\ No newline at end of file
export
const
fetchBrandJSON
=
()
=>
api
.
get
(
'/c/front/content'
,{
type
:
'brand'
});
\ No newline at end of file
mock/brand.js
View file @
bbef66cc
...
...
@@ -31,7 +31,7 @@ export const brandObj = {
"productTabList"
:
[
"全部"
,
"母婴全阶"
,
"功能营养"
,
"儿童产品"
,
"北纬47°"
],
"product
InfoList
"
:
[
"product"
:
[
[
{
"bgUrl"
:
"brandpage/pic_0_1.png"
,
...
...
mock/node_brand.js
View file @
bbef66cc
...
...
@@ -31,7 +31,7 @@ var a ={
"productTabList"
:
[
"全部"
,
"母婴全阶"
,
"功能营养"
,
"儿童产品"
,
"北纬47°"
],
"productInfoLis
t"
:
[
"produc
t"
:
[
[
{
"bgUrl"
:
"brandpage/pic_0_1.png"
,
...
...
@@ -256,7 +256,7 @@ var a ={
"qrUrl"
:
"brandpage/qrhxf_wxxd.png"
}
]
}
}
var
b
=
JSON
.
stringify
(
JSON
.
stringify
(
a
));
console
.
log
(
b
);
\ No newline at end of file
pages/search/search.vue
View file @
bbef66cc
...
...
@@ -230,7 +230,7 @@
keyword
:
this
.
searchValue
}).
then
(
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 @@
<
script
>
import
{
brandObj
}
from
'../mock/brand'
;
import
{
fetchBrandJSON
}
from
'../api/brand'
;
export
default
{
data
()
{
return
{
...
...
@@ -157,15 +158,15 @@ export default {
}
},
mounted
()
{
this
.
swiperList
=
brandObj
.
swiperList
;
this
.
productTabList
=
brandObj
.
productTabList
;
this
.
productInfoList
=
brandObj
.
productInfoList
;
this
.
esgInfoList
=
brandObj
.
esgInfoList
;
this
.
qrInfoList
=
brandObj
.
qrInfoList
;
this
.
ipDesc
=
brandObj
.
ipDesc
;
this
.
swiperIconList
=
brandObj
.
swiperIconList
;
this
.
currentVideoUrl
=
brandObj
.
videoUrl
;
//
this.initBrandInfo();
//
this.swiperList = brandObj.swiperList;
//
this.productTabList = brandObj.productTabList;
//
this.productInfoList = brandObj.productInfoList;
//
this.esgInfoList = brandObj.esgInfoList;
//
this.qrInfoList = brandObj.qrInfoList;
//
this.ipDesc = brandObj.ipDesc;
//
this.swiperIconList = brandObj.swiperIconList;
//
this.currentVideoUrl=brandObj.videoUrl;
this
.
initBrandInfo
();
},
methods
:
{
async
initBrandInfo
(){
...
...
@@ -173,7 +174,7 @@ export default {
if
(
data
){
this
.
swiperList
=
data
.
swiperList
;
this
.
productTabList
=
data
.
productTabList
;
this
.
productInfoList
=
data
.
product
InfoList
;
this
.
productInfoList
=
data
.
product
;
this
.
esgInfoList
=
data
.
esgInfoList
;
this
.
qrInfoList
=
data
.
qrInfoList
;
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