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
Jul 21, 2023
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 = {
...
@@ -388,8 +388,46 @@ export const HttpReq = {
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
return
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
}
}
}
}
src/views/backstage/contentMgt/homePage/add.vue
View file @
1c27661d
...
@@ -49,6 +49,11 @@
...
@@ -49,6 +49,11 @@
<el-input
v-model=
"formData.content"
placeholder=
"单行输入"
class=
"cell-input"
/>
<el-input
v-model=
"formData.content"
placeholder=
"单行输入"
class=
"cell-input"
/>
</div>
</div>
</el-form-item>
</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"
>
<el-form-item
label=
"顺序:"
class=
"form-cell"
prop=
"sort"
>
<div
class=
"cell-box"
>
<div
class=
"cell-box"
>
<el-input
v-model.number=
"formData.sort"
type=
"number"
placeholder=
"请输入数字"
class=
"cell-input"
/>
<el-input
v-model.number=
"formData.sort"
type=
"number"
placeholder=
"请输入数字"
class=
"cell-input"
/>
...
...
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 @@
...
@@ -20,6 +20,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -51,20 +52,20 @@ export default {
...
@@ -51,20 +52,20 @@ export default {
{
name
:
'
采购商常见问题
'
,
url
:
''
},
{
name
:
'
采购商常见问题
'
,
url
:
''
},
{
name
:
'
供应商常见问题
'
,
url
:
''
}
{
name
:
'
供应商常见问题
'
,
url
:
''
}
]
]
},
{
name
:
'
友情链接
'
,
list
:
[
{
name
:
'
佛山英沃传感科技有限公司佛山英沃传感科技有限公司
'
,
url
:
''
},
{
name
:
'
佛山英沃传感科技有限公司
'
,
url
:
''
},
{
name
:
'
佛山英沃传感科技有限公司
'
,
url
:
''
}
]
}
}
]
]
}
}
},
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
HttpReq
.
webClientApi
.
homePageGetFriendshipUrl
({
preview
:
false
}).
then
((
res
)
=>
{
this
.
dataList
.
push
({
name
:
'
友情链接
'
,
list
:
res
.
data
.
friendshipUrl
})
})
})
})
},
},
methods
:
{
methods
:
{
...
...
src/views/homepage/components/searchPanel.vue
View file @
1c27661d
...
@@ -11,23 +11,25 @@
...
@@ -11,23 +11,25 @@
<el-button
icon=
"el-icon-search"
class=
"btn"
>
搜索
</el-button>
<el-button
icon=
"el-icon-search"
class=
"btn"
>
搜索
</el-button>
</div>
</div>
<div
class=
"search-keyword"
>
<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>
<div
class=
"search-keyword-title"
>
<div
class=
"search-keyword-title"
>
<div
class=
"title-s"
>
品牌
</div>
<div
class=
"title-s"
>
品牌
</div>
</div>
</div>
<div
class=
"search-keyword-label"
>
<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>
<div
class=
"search-keyword-title"
>
<div
class=
"search-keyword-title"
>
<div
class=
"title-s"
>
供应商
</div>
<div
class=
"title-s"
>
供应商
</div>
</div>
</div>
<div
class=
"search-keyword-label"
>
<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>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
export
default
{
dicts
:
[
'
product_type
'
,
'
area_province
'
],
dicts
:
[
'
product_type
'
,
'
area_province
'
],
data
()
{
data
()
{
...
@@ -40,12 +42,20 @@ export default {
...
@@ -40,12 +42,20 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
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
:
{
methods
:
{
keywordClick
(
item
,
type
)
{
keywordClick
(
item
,
type
)
{
if
(
item
.
url
)
{
this
.
$router
.
push
({
path
:
item
.
url
})
}
}
}
}
}
}
}
...
...
src/views/homepage/components/titleMenus.vue
View file @
1c27661d
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
export
default
{
props
:
{
props
:
{
menuIndex
:
{
menuIndex
:
{
...
@@ -23,9 +25,14 @@ export default {
...
@@ -23,9 +25,14 @@ export default {
},
},
mounted
()
{
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
.
currentMenuObj
=
this
.
menuIndex
>
this
.
menus
.
length
?
{
name
:
'
个人中心
'
,
url
:
'
/console
'
}
:
this
.
menus
[
this
.
menuIndex
]
this
.
$store
.
dispatch
(
'
app/setCurrentMenu
'
,
this
.
currentMenuObj
)
this
.
$store
.
dispatch
(
'
app/setCurrentMenu
'
,
this
.
currentMenuObj
)
})
})
})
},
},
methods
:
{
methods
:
{
menuClick
(
item
)
{
menuClick
(
item
)
{
...
...
src/views/homepage/components/titleMenusV2.vue
View file @
1c27661d
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
export
default
{
props
:
{
props
:
{
menuIndex
:
{
menuIndex
:
{
...
@@ -24,9 +26,16 @@ export default {
...
@@ -24,9 +26,16 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
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
.
currentMenuObj
=
this
.
menuIndex
>
this
.
menus
.
length
?
{
name
:
'
个人中心
'
,
url
:
'
/console
'
}
:
this
.
menus
[
this
.
menuIndex
]
this
.
$store
.
dispatch
(
'
app/setCurrentMenu
'
,
this
.
currentMenuObj
)
this
.
$store
.
dispatch
(
'
app/setCurrentMenu
'
,
this
.
currentMenuObj
)
})
})
})
})
},
},
methods
:
{
methods
:
{
menuClick
(
item
)
{
menuClick
(
item
)
{
...
...
src/views/homepage/index.vue
View file @
1c27661d
...
@@ -147,7 +147,7 @@
...
@@ -147,7 +147,7 @@
<div
style=
"padding: 20px 30px"
>
<div
style=
"padding: 20px 30px"
>
<div
v-for=
"(item,index) in partners"
:key=
"'pt_'+index"
class=
"partners-card"
:title=
"item.name"
>
<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"
>
<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>
</a>
</div>
</div>
</div>
</div>
...
@@ -168,6 +168,7 @@ import languageSetting from './components/languageSetting'
...
@@ -168,6 +168,7 @@ import languageSetting from './components/languageSetting'
import
searchPanel
from
'
./components/searchPanel
'
import
searchPanel
from
'
./components/searchPanel
'
import
homeFooter
from
'
./components/homeFooter
'
import
homeFooter
from
'
./components/homeFooter
'
import
inquiryView
from
'
./components/inquiryView
'
import
inquiryView
from
'
./components/inquiryView
'
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
export
default
{
components
:
{
floatBtn
,
titleMenus
,
userLogin
,
languageSetting
,
searchPanel
,
homeFooter
,
inquiryView
},
components
:
{
floatBtn
,
titleMenus
,
userLogin
,
languageSetting
,
searchPanel
,
homeFooter
,
inquiryView
},
...
@@ -361,41 +362,26 @@ export default {
...
@@ -361,41 +362,26 @@ export default {
}
}
],
],
topAreas
:
[],
topAreas
:
[],
topSuppliers
:
[
topSuppliers
:
[],
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
},
topProducts
:
[],
{
name
:
'
中山市三角镇凌创传感器厂
'
,
id
:
123
},
partners
:
[],
{
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
:
''
}
],
throttle
:
null
,
// 节流器
throttle
:
null
,
// 节流器
throttleTime
:
300
throttleTime
:
300
}
}
},
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
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
)
=>
{
const
random
=
(
min
,
max
)
=>
{
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
))
+
min
return
Math
.
floor
(
Math
.
random
()
*
(
max
-
min
))
+
min
}
}
...
...
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