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
732cdb39
Commit
732cdb39
authored
Aug 16, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收藏
parent
4040b07d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
115 additions
and
38 deletions
+115
-38
common.js
src/api/common.js
+10
-0
cisnet_logo.png
src/assets/home_images/cisnet_logo.png
+0
-0
cisnet_logo_b.png
src/assets/home_images/cisnet_logo_b.png
+0
-0
request.js
src/utils/request.js
+19
-6
collectPro.vue
src/views/homepage/console/collectPro.vue
+9
-4
collectSup.vue
src/views/homepage/console/collectSup.vue
+18
-7
index.vue
src/views/homepage/index.vue
+9
-4
login.vue
src/views/homepage/login.vue
+13
-1
hardware.vue
src/views/homepage/product/hardware.vue
+9
-4
index.vue
src/views/homepage/product/index.vue
+9
-4
details.vue
src/views/homepage/supplier/details.vue
+10
-4
index.vue
src/views/homepage/supplier/index.vue
+9
-4
No files found.
src/api/common.js
View file @
732cdb39
...
@@ -535,6 +535,16 @@ export const HttpReq = {
...
@@ -535,6 +535,16 @@ export const HttpReq = {
method
:
'
get
'
method
:
'
get
'
})
})
},
},
// 收藏产品-供应商
collectProductOrSupplier
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/collectProductOrSupplier
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
id
:
null
id
:
null
}
}
}
}
...
...
src/assets/home_images/cisnet_logo.png
View replaced file @
4040b07d
View file @
732cdb39
6.67 KB
|
W:
|
H:
7.35 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/assets/home_images/cisnet_logo_b.png
View replaced file @
4040b07d
View file @
732cdb39
7.02 KB
|
W:
|
H:
7.65 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/utils/request.js
View file @
732cdb39
...
@@ -6,6 +6,7 @@ import { getToken } from '@/utils/auth'
...
@@ -6,6 +6,7 @@ import { getToken } from '@/utils/auth'
import
Config
from
'
@/settings
'
import
Config
from
'
@/settings
'
import
Cookies
from
'
js-cookie
'
import
Cookies
from
'
js-cookie
'
const
backUrlList
=
[
'
/dashboard
'
,
'
/system
'
,
'
/monitor
'
,
'
/sys-tools
'
,
'
/backstage
'
]
// 后台路由
// 创建axios实例
// 创建axios实例
const
service
=
axios
.
create
({
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
NODE_ENV
===
'
production
'
?
process
.
env
.
VUE_APP_BASE_API
:
'
/
'
,
// api 的 base_url
baseURL
:
process
.
env
.
NODE_ENV
===
'
production
'
?
process
.
env
.
VUE_APP_BASE_API
:
'
/
'
,
// api 的 base_url
...
@@ -56,14 +57,26 @@ service.interceptors.response.use(
...
@@ -56,14 +57,26 @@ service.interceptors.response.use(
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
}
}
}
}
console
.
log
(
code
)
if
(
code
)
{
if
(
code
)
{
if
(
code
===
401
)
{
if
(
code
===
401
)
{
store
.
dispatch
(
'
LogOut
'
).
then
(()
=>
{
const
findUrl
=
(
urlList
,
path
)
=>
{
// 用户登录界面提示
let
flag
=
false
Cookies
.
set
(
'
point
'
,
401
)
urlList
.
forEach
(
url
=>
{
location
.
reload
()
if
(
path
.
indexOf
(
url
)
!==
-
1
)
{
})
flag
=
true
}
})
return
flag
}
if
(
findUrl
(
backUrlList
,
window
.
location
.
href
))
{
store
.
dispatch
(
'
LogOut
'
).
then
(()
=>
{
Cookies
.
set
(
'
point
'
,
401
)
location
.
reload
()
})
}
else
{
Cookies
.
set
(
'
loginTip
'
,
401
)
router
.
push
({
path
:
`/login?redirect=
${
window
.
location
.
pathname
}
`
})
}
}
else
if
(
code
===
403
)
{
}
else
if
(
code
===
403
)
{
router
.
push
({
path
:
'
/401
'
})
router
.
push
({
path
:
'
/401
'
})
}
else
{
}
else
{
...
...
src/views/homepage/console/collectPro.vue
View file @
732cdb39
...
@@ -206,11 +206,16 @@ export default {
...
@@ -206,11 +206,16 @@ export default {
},
},
// 点击收藏
// 点击收藏
storeShowcase
(
item
,
type
)
{
storeShowcase
(
item
,
type
)
{
item
.
isStore
=
!
item
.
isStore
HttpReq
.
webClientApi
.
collectProductOrSupplier
({
this
.
$message
.
warning
({
id
:
item
.
id
,
message
:
`您
${
item
.
isStore
?
''
:
'
已取消
'
}
收藏了该产品!`
collect
:
!
item
.
isStore
,
type
:
type
}).
then
((
res
)
=>
{
item
.
isStore
=
!
item
.
isStore
this
.
$message
.
warning
({
message
:
res
.
msg
})
})
})
console
.
log
(
item
,
type
)
},
},
// 跳转到详情
// 跳转到详情
goToDetails
(
item
,
path
)
{
goToDetails
(
item
,
path
)
{
...
...
src/views/homepage/console/collectSup.vue
View file @
732cdb39
...
@@ -27,9 +27,9 @@
...
@@ -27,9 +27,9 @@
</div>
</div>
<div
class=
"sup_area"
>
<div
class=
"sup_area"
>
<img
src=
"@/assets/home_images/locate.png"
>
<img
src=
"@/assets/home_images/locate.png"
>
<span>
{{
item
.
area
}}
</span>
<span
:title=
"item.area"
>
{{
item
.
area
}}
</span>
<img
v-if=
"item.isStore"
class=
"touch"
src=
"@/assets/home_images/to_like_h.png"
title=
"点击取消收藏"
style=
"
right:-12px;top:7
px"
@
click=
"storeShowcase(item, 'supplier')"
>
<img
v-if=
"item.isStore"
class=
"touch"
src=
"@/assets/home_images/to_like_h.png"
title=
"点击取消收藏"
style=
"
position: absolute;top: 58px;right: 220
px"
@
click=
"storeShowcase(item, 'supplier')"
>
<img
v-else
class=
"touch"
src=
"@/assets/home_images/to_like.png"
title=
"点击收藏"
style=
"
right:-12px;top:7
px"
@
click=
"storeShowcase(item, 'supplier')"
>
<img
v-else
class=
"touch"
src=
"@/assets/home_images/to_like.png"
title=
"点击收藏"
style=
"
position: absolute;top: 58px;right: 220
px"
@
click=
"storeShowcase(item, 'supplier')"
>
</div>
</div>
<div
style=
"margin: 25px 40px"
>
<div
style=
"margin: 25px 40px"
>
<div
class=
"block-c"
>
<div
class=
"block-c"
>
...
@@ -80,6 +80,7 @@ import languageSetting from '../components/languageSettingV2'
...
@@ -80,6 +80,7 @@ import languageSetting from '../components/languageSettingV2'
import
homeFooter
from
'
../components/homeFooter
'
import
homeFooter
from
'
../components/homeFooter
'
import
inquiryView
from
'
../components/inquiryView
'
import
inquiryView
from
'
../components/inquiryView
'
import
userMenus
from
'
../components/userMenus
'
import
userMenus
from
'
../components/userMenus
'
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
export
default
{
components
:
{
titleMenus
,
userLogin
,
languageSetting
,
homeFooter
,
inquiryView
,
userMenus
},
components
:
{
titleMenus
,
userLogin
,
languageSetting
,
homeFooter
,
inquiryView
,
userMenus
},
...
@@ -163,11 +164,16 @@ export default {
...
@@ -163,11 +164,16 @@ export default {
},
},
// 点击收藏
// 点击收藏
storeShowcase
(
item
,
type
)
{
storeShowcase
(
item
,
type
)
{
item
.
isStore
=
!
item
.
isStore
HttpReq
.
webClientApi
.
collectProductOrSupplier
({
this
.
$message
.
warning
({
id
:
item
.
id
,
message
:
`您
${
item
.
isStore
?
''
:
'
已取消
'
}
收藏了该产品!`
collect
:
!
item
.
isStore
,
type
:
type
}).
then
((
res
)
=>
{
item
.
isStore
=
!
item
.
isStore
this
.
$message
.
warning
({
message
:
res
.
msg
})
})
})
console
.
log
(
item
,
type
)
},
},
// 跳转到详情
// 跳转到详情
goToDetails
(
item
,
path
)
{
goToDetails
(
item
,
path
)
{
...
@@ -267,9 +273,14 @@ export default {
...
@@ -267,9 +273,14 @@ export default {
}
}
}
}
.sup_area
{
.sup_area
{
width
:
460px
;
padding
:
10px
0
;
padding
:
10px
0
;
color
:
#666666
;
color
:
#666666
;
font-size
:
18px
;
font-size
:
18px
;
overflow
:hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
-o-text-overflow
:ellipsis
;
img
{
img
{
position
:relative
;
position
:relative
;
top
:
4px
;
top
:
4px
;
...
...
src/views/homepage/index.vue
View file @
732cdb39
...
@@ -277,11 +277,16 @@ export default {
...
@@ -277,11 +277,16 @@ export default {
},
},
// 点击收藏
// 点击收藏
storeShowcase
(
item
,
type
)
{
storeShowcase
(
item
,
type
)
{
item
.
isStore
=
!
item
.
isStore
HttpReq
.
webClientApi
.
collectProductOrSupplier
({
this
.
$message
.
warning
({
id
:
item
.
id
,
message
:
`您
${
item
.
isStore
?
''
:
'
已取消
'
}
收藏了该产品!`
collect
:
!
item
.
isStore
,
type
:
type
}).
then
((
res
)
=>
{
item
.
isStore
=
!
item
.
isStore
this
.
$message
.
warning
({
message
:
res
.
msg
})
})
})
console
.
log
(
item
,
type
)
},
},
// 跳转到详情
// 跳转到详情
goToDetails
(
item
,
path
)
{
goToDetails
(
item
,
path
)
{
...
...
src/views/homepage/login.vue
View file @
732cdb39
...
@@ -173,6 +173,7 @@ export default {
...
@@ -173,6 +173,7 @@ export default {
this
.
getCookie
()
this
.
getCookie
()
// token 过期提示
// token 过期提示
this
.
point
()
this
.
point
()
this
.
loginTip
()
},
},
beforeDestroy
()
{
beforeDestroy
()
{
if
(
this
.
timer
)
{
if
(
this
.
timer
)
{
...
@@ -289,7 +290,7 @@ export default {
...
@@ -289,7 +290,7 @@ export default {
}
}
this
.
$store
.
dispatch
(
'
Login
'
,
user
).
then
(()
=>
{
this
.
$store
.
dispatch
(
'
Login
'
,
user
).
then
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
this
.
$router
.
push
({
path
:
'
/console
'
})
this
.
$router
.
push
({
path
:
this
.
redirect
||
'
/console
'
})
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
this
.
getCode
()
this
.
getCode
()
...
@@ -311,6 +312,17 @@ export default {
...
@@ -311,6 +312,17 @@ export default {
})
})
Cookies
.
remove
(
'
point
'
)
Cookies
.
remove
(
'
point
'
)
}
}
},
loginTip
()
{
const
point
=
Cookies
.
get
(
'
loginTip
'
)
!==
undefined
if
(
point
)
{
this
.
$notify
({
message
:
'
当前操作需要您先登录,请登录!
'
,
type
:
'
warning
'
,
duration
:
5000
})
Cookies
.
remove
(
'
loginTip
'
)
}
}
}
}
}
}
}
...
...
src/views/homepage/product/hardware.vue
View file @
732cdb39
...
@@ -219,11 +219,16 @@ export default {
...
@@ -219,11 +219,16 @@ export default {
},
},
// 点击收藏
// 点击收藏
storeShowcase
(
item
,
type
)
{
storeShowcase
(
item
,
type
)
{
item
.
isStore
=
!
item
.
isStore
HttpReq
.
webClientApi
.
collectProductOrSupplier
({
this
.
$message
.
warning
({
id
:
item
.
id
,
message
:
`您
${
item
.
isStore
?
''
:
'
已取消
'
}
收藏了该产品!`
collect
:
!
item
.
isStore
,
type
:
type
}).
then
((
res
)
=>
{
item
.
isStore
=
!
item
.
isStore
this
.
$message
.
warning
({
message
:
res
.
msg
})
})
})
console
.
log
(
item
,
type
)
},
},
// 跳转到详情
// 跳转到详情
goToDetails
(
item
,
path
)
{
goToDetails
(
item
,
path
)
{
...
...
src/views/homepage/product/index.vue
View file @
732cdb39
...
@@ -281,11 +281,16 @@ export default {
...
@@ -281,11 +281,16 @@ export default {
},
},
// 点击收藏
// 点击收藏
storeShowcase
(
item
,
type
)
{
storeShowcase
(
item
,
type
)
{
item
.
isStore
=
!
item
.
isStore
HttpReq
.
webClientApi
.
collectProductOrSupplier
({
this
.
$message
.
warning
({
id
:
item
.
id
,
message
:
`您
${
item
.
isStore
?
''
:
'
已取消
'
}
收藏了该产品!`
collect
:
!
item
.
isStore
,
type
:
type
}).
then
((
res
)
=>
{
item
.
isStore
=
!
item
.
isStore
this
.
$message
.
warning
({
message
:
res
.
msg
})
})
})
console
.
log
(
item
,
type
)
},
},
// 跳转到详情
// 跳转到详情
goToDetails
(
item
,
path
)
{
goToDetails
(
item
,
path
)
{
...
...
src/views/homepage/supplier/details.vue
View file @
732cdb39
...
@@ -265,6 +265,7 @@ import languageSetting from '../components/languageSettingV2'
...
@@ -265,6 +265,7 @@ import languageSetting from '../components/languageSettingV2'
import
homeFooter
from
'
../components/homeFooter
'
import
homeFooter
from
'
../components/homeFooter
'
import
inquiryView
from
'
../components/inquiryView
'
import
inquiryView
from
'
../components/inquiryView
'
import
floatInquiryView
from
'
../components/floatInquiryView
'
import
floatInquiryView
from
'
../components/floatInquiryView
'
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
export
default
{
components
:
{
titleMenus
,
userLogin
,
languageSetting
,
homeFooter
,
inquiryView
,
floatInquiryView
},
components
:
{
titleMenus
,
userLogin
,
languageSetting
,
homeFooter
,
inquiryView
,
floatInquiryView
},
...
@@ -472,11 +473,16 @@ export default {
...
@@ -472,11 +473,16 @@ export default {
},
},
// 点击收藏
// 点击收藏
storeShowcase
(
item
,
type
)
{
storeShowcase
(
item
,
type
)
{
item
.
isStore
=
!
item
.
isStore
HttpReq
.
webClientApi
.
collectProductOrSupplier
({
this
.
$message
.
warning
({
id
:
item
.
id
,
message
:
`您
${
item
.
isStore
?
''
:
'
已取消
'
}
收藏了该产品!`
collect
:
!
item
.
isStore
,
type
:
type
}).
then
((
res
)
=>
{
item
.
isStore
=
!
item
.
isStore
this
.
$message
.
warning
({
message
:
res
.
msg
})
})
})
console
.
log
(
item
,
type
)
},
},
// 跳转到详情
// 跳转到详情
goToDetails
(
item
,
path
)
{
goToDetails
(
item
,
path
)
{
...
...
src/views/homepage/supplier/index.vue
View file @
732cdb39
...
@@ -228,11 +228,16 @@ export default {
...
@@ -228,11 +228,16 @@ export default {
},
},
// 点击收藏
// 点击收藏
storeShowcase
(
item
,
type
)
{
storeShowcase
(
item
,
type
)
{
item
.
isStore
=
!
item
.
isStore
HttpReq
.
webClientApi
.
collectProductOrSupplier
({
this
.
$message
.
warning
({
id
:
item
.
id
,
message
:
`您
${
item
.
isStore
?
''
:
'
已取消
'
}
收藏了该产品!`
collect
:
!
item
.
isStore
,
type
:
type
}).
then
((
res
)
=>
{
item
.
isStore
=
!
item
.
isStore
this
.
$message
.
warning
({
message
:
res
.
msg
})
})
})
console
.
log
(
item
,
type
)
},
},
pageChange
(
e
)
{
pageChange
(
e
)
{
this
.
page
=
e
this
.
page
=
e
...
...
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