Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sensorConsult
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglw
sensorConsult
Commits
1c27661d
Commit
1c27661d
authored
1 year ago
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页接口
parent
fad1579b
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
147 additions
and
85 deletions
+147
-85
common.js
src/api/common.js
+39
-1
add.vue
src/views/backstage/contentMgt/homePage/add.vue
+5
-0
view.vue
src/views/backstage/contentMgt/homePage/view.vue
+43
-37
homeFooter.vue
src/views/homepage/components/homeFooter.vue
+9
-8
searchPanel.vue
src/views/homepage/components/searchPanel.vue
+15
-5
titleMenus.vue
src/views/homepage/components/titleMenus.vue
+9
-2
titleMenusV2.vue
src/views/homepage/components/titleMenusV2.vue
+11
-2
index.vue
src/views/homepage/index.vue
+16
-30
No files found.
src/api/common.js
View file @
1c27661d
...
...
@@ -388,8 +388,46 @@ export const HttpReq = {
}).
then
((
res
)
=>
{
return
res
})
}
},
// web端接口列表
webClientApi
:
{
// 首页-头部文件
homePageGetHeader
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/header?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-搜索推荐
homePageGetSearch
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/search?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-热门排行
homePageGetRank
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/rank?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-合作伙伴
homePageGetPartners
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/partners?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-友情链接
homePageGetFriendshipUrl
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/friendshipUrl?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
xxx
:
null
id
:
null
}
}
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/homePage/add.vue
View file @
1c27661d
...
...
@@ -49,6 +49,11 @@
<el-input
v-model=
"formData.content"
placeholder=
"单行输入"
class=
"cell-input"
/>
</div>
</el-form-item>
<el-form-item
label=
"链接:"
class=
"form-cell"
prop=
"url"
>
<div
class=
"cell-box"
>
<el-input
v-model=
"formData.url"
placeholder=
"单行输入"
class=
"cell-input"
/>
</div>
</el-form-item>
<el-form-item
label=
"顺序:"
class=
"form-cell"
prop=
"sort"
>
<div
class=
"cell-box"
>
<el-input
v-model.number=
"formData.sort"
type=
"number"
placeholder=
"请输入数字"
class=
"cell-input"
/>
...
...
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/homePage/view.vue
View file @
1c27661d
This diff is collapsed.
Click to expand it.
src/views/homepage/components/homeFooter.vue
View file @
1c27661d
...
...
@@ -20,6 +20,7 @@
</div>
</
template
>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
data
()
{
return
{
...
...
@@ -51,20 +52,20 @@ export default {
{
name
:
'
采购商常见问题
'
,
url
:
''
},
{
name
:
'
供应商常见问题
'
,
url
:
''
}
]
},
{
name
:
'
友情链接
'
,
list
:
[
{
name
:
'
佛山英沃传感科技有限公司佛山英沃传感科技有限公司
'
,
url
:
''
},
{
name
:
'
佛山英沃传感科技有限公司
'
,
url
:
''
},
{
name
:
'
佛山英沃传感科技有限公司
'
,
url
:
''
}
]
}
]
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
HttpReq
.
webClientApi
.
homePageGetFriendshipUrl
({
preview
:
false
}).
then
((
res
)
=>
{
this
.
dataList
.
push
({
name
:
'
友情链接
'
,
list
:
res
.
data
.
friendshipUrl
})
})
})
},
methods
:
{
...
...
This diff is collapsed.
Click to expand it.
src/views/homepage/components/searchPanel.vue
View file @
1c27661d
...
...
@@ -11,23 +11,25 @@
<el-button
icon=
"el-icon-search"
class=
"btn"
>
搜索
</el-button>
</div>
<div
class=
"search-keyword"
>
<span
v-for=
"(item, index) in keywords"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'keyword')"
>
{{
item
}}
</span>
<span
v-for=
"(item, index) in keywords"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'keyword')"
>
{{
item
.
name
}}
</span>
</div>
<div
class=
"search-keyword-title"
>
<div
class=
"title-s"
>
品牌
</div>
</div>
<div
class=
"search-keyword-label"
>
<span
v-for=
"(item, index) in brands"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'brand')"
>
{{
item
}}
</span>
<span
v-for=
"(item, index) in brands"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'brand')"
>
{{
item
.
name
}}
</span>
</div>
<div
class=
"search-keyword-title"
>
<div
class=
"title-s"
>
供应商
</div>
</div>
<div
class=
"search-keyword-label"
>
<span
v-for=
"(item, index) in suppliers"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'supplier')"
>
{{
item
}}
</span>
<span
v-for=
"(item, index) in suppliers"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'supplier')"
>
{{
item
.
name
}}
</span>
</div>
</div>
</
template
>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
dicts
:
[
'
product_type
'
,
'
area_province
'
],
data
()
{
...
...
@@ -40,12 +42,20 @@ export default {
},
mounted
()
{
this
.
$nextTick
(()
=>
{
HttpReq
.
webClientApi
.
homePageGetSearch
({
preview
:
false
}).
then
((
res
)
=>
{
this
.
keywords
=
res
.
data
.
keywords
this
.
brands
=
res
.
data
.
brands
this
.
suppliers
=
res
.
data
.
suppliers
})
})
},
methods
:
{
keywordClick
(
item
,
type
)
{
if
(
item
.
url
)
{
this
.
$router
.
push
({
path
:
item
.
url
})
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/views/homepage/components/titleMenus.vue
View file @
1c27661d
...
...
@@ -6,6 +6,8 @@
</div>
</
template
>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
props
:
{
menuIndex
:
{
...
...
@@ -23,9 +25,14 @@ export default {
},
mounted
()
{
this
.
$nextTick
(()
=>
{
HttpReq
.
webClientApi
.
homePageGetHeader
({
preview
:
false
}).
then
((
res
)
=>
{
this
.
menus
=
res
.
data
.
menus
this
.
currentMenuObj
=
this
.
menuIndex
>
this
.
menus
.
length
?
{
name
:
'
个人中心
'
,
url
:
'
/console
'
}
:
this
.
menus
[
this
.
menuIndex
]
this
.
$store
.
dispatch
(
'
app/setCurrentMenu
'
,
this
.
currentMenuObj
)
})
})
},
methods
:
{
menuClick
(
item
)
{
...
...
This diff is collapsed.
Click to expand it.
src/views/homepage/components/titleMenusV2.vue
View file @
1c27661d
...
...
@@ -7,6 +7,8 @@
</div>
</
template
>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
props
:
{
menuIndex
:
{
...
...
@@ -24,9 +26,16 @@ export default {
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
HttpReq
.
webClientApi
.
homePageGetHeader
({
preview
:
false
}).
then
((
res
)
=>
{
this
.
menus
=
res
.
data
.
menus
this
.
currentMenuObj
=
this
.
menuIndex
>
this
.
menus
.
length
?
{
name
:
'
个人中心
'
,
url
:
'
/console
'
}
:
this
.
menus
[
this
.
menuIndex
]
this
.
$store
.
dispatch
(
'
app/setCurrentMenu
'
,
this
.
currentMenuObj
)
})
})
})
},
methods
:
{
menuClick
(
item
)
{
...
...
This diff is collapsed.
Click to expand it.
src/views/homepage/index.vue
View file @
1c27661d
...
...
@@ -147,7 +147,7 @@
<div
style=
"padding: 20px 30px"
>
<div
v-for=
"(item,index) in partners"
:key=
"'pt_'+index"
class=
"partners-card"
:title=
"item.name"
>
<a
:href=
"item.url||'http://www.minestar.cn'"
target=
"_blank"
>
<el-image
:src=
"item.imgSrc?imgSrcStart+
'/img'+item.imgSrc:defaultImgLogo"
fit=
"contain
"
style=
"width: 100%;height: 100%"
/>
<el-image
:src=
"item.imgSrc?imgSrcStart+
item.imgSrc:defaultImgLogo
"
style=
"width: 100%;height: 100%"
/>
</a>
</div>
</div>
...
...
@@ -168,6 +168,7 @@ import languageSetting from './components/languageSetting'
import
searchPanel
from
'
./components/searchPanel
'
import
homeFooter
from
'
./components/homeFooter
'
import
inquiryView
from
'
./components/inquiryView
'
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
components
:
{
floatBtn
,
titleMenus
,
userLogin
,
languageSetting
,
searchPanel
,
homeFooter
,
inquiryView
},
...
...
@@ -361,41 +362,26 @@ export default {
}
],
topAreas
:
[],
topSuppliers
:
[
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
},
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
},
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
},
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
},
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
},
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
},
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
},
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
}
],
topProducts
:
[
{
name
:
'
wiwo1002热能工程压力变送器
'
,
id
:
123
},
{
name
:
'
wiwo1002热能工程压力变送器
'
,
id
:
123
},
{
name
:
'
wiwo1002热能工程压力变送器
'
,
id
:
123
},
{
name
:
'
wiwo1002热能工程压力变送器
'
,
id
:
123
},
{
name
:
'
wiwo1002热能工程压力变送器
'
,
id
:
123
},
{
name
:
'
wiwo1002热能工程压力变送器
'
,
id
:
123
},
{
name
:
'
wiwo1002热能工程压力变送器
'
,
id
:
123
},
{
name
:
'
wiwo1002热能工程压力变送器
'
,
id
:
123
}
],
partners
:
[
{
name
:
'
xxxxxxxx
'
,
imgSrc
:
''
,
url
:
''
},
{
name
:
'
xxxxxxxx
'
,
imgSrc
:
''
,
url
:
''
},
{
name
:
'
xxxxxxxx
'
,
imgSrc
:
''
,
url
:
''
},
{
name
:
'
xxxxxxxx
'
,
imgSrc
:
''
,
url
:
''
},
{
name
:
'
xxxxxxxx
'
,
imgSrc
:
''
,
url
:
''
},
{
name
:
'
xxxxxxxx
'
,
imgSrc
:
''
,
url
:
''
},
{
name
:
'
xxxxxxxx
'
,
imgSrc
:
''
,
url
:
''
}
],
topSuppliers
:
[],
topProducts
:
[],
partners
:
[],
throttle
:
null
,
// 节流器
throttleTime
:
300
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
HttpReq
.
webClientApi
.
homePageGetRank
({
preview
:
false
}).
then
((
res
)
=>
{
this
.
topSuppliers
=
res
.
data
.
topSuppliers
this
.
topProducts
=
res
.
data
.
topProducts
})
HttpReq
.
webClientApi
.
homePageGetPartners
({
preview
:
false
}).
then
((
res
)
=>
{
this
.
partners
=
res
.
data
.
partners
})
const
random
=
(
min
,
max
)
=>
{
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
))
+
min
}
...
...
This diff is collapsed.
Click to expand it.
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