Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
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
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
吴迪
gs1
Commits
52ea5a18
Commit
52ea5a18
authored
Dec 08, 2021
by
tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 定制服务调试
parent
b6009ded
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
14 deletions
+33
-14
index.vue
src/views/Home/index.vue
+33
-14
No files found.
src/views/Home/index.vue
View file @
52ea5a18
...
...
@@ -22,9 +22,9 @@
</div>
</div>
</div>
<!--
<div
class=
"d-none d-lg-block banner-tp"
>
-->
<!--
<img
:src=
"el.picIndexPath"
alt=
""
class=
"container"
/>
-->
<!--
</div>
-->
<!--
<div
class=
"d-none d-lg-block banner-tp"
>
-->
<!--
<img
:src=
"el.picIndexPath"
alt=
""
class=
"container"
/>
-->
<!--
</div>
-->
<div
class=
"banner-bg"
>
<img
:src=
"el.picIndexPath"
alt=
""
/>
</div>
...
...
@@ -993,34 +993,52 @@ export default {
},
mounted
()
{
this
.
getCustomService
()
// 从后端获取最新的定制服务
this
.
getCustomServiceFromServer
()
},
methods
:
{
getCustomService
()
{
let
service
=
localStorage
.
getItem
(
'gs-custom-service'
)
||
''
console
.
log
(
'getCustomService-----------'
,
service
)
if
(
service
)
{
if
(
service
)
{
service
=
JSON
.
parse
(
service
)
this
.
update
CustomService
(
service
)
this
.
show
CustomService
(
service
)
}
},
updateCustomService
(
list
){
this
.
dzfw
.
forEach
(
item
=>
{
async
getCustomServiceFromServer
()
{
const
searchGlnRes
=
await
this
.
$api
.
home
.
customService
();
const
{
returnCode
,
data
}
=
searchGlnRes
;
if
(
returnCode
===
"0"
)
{
localStorage
.
setItem
(
'gs-custom-service'
,
JSON
.
stringify
(
data
))
this
.
showCustomService
(
data
)
}
},
showCustomService
(
list
)
{
this
.
dzfw
.
forEach
(
item
=>
{
item
.
isChecked
=
item
.
name
===
"更多定制"
list
.
forEach
(
_item
=>
{
if
(
_item
==
item
.
id
)
{
list
.
forEach
(
_item
=>
{
if
(
_item
==
item
.
id
)
{
item
.
isChecked
=
true
}
})
})
},
setCustomService
()
{
const
service
=
[]
this
.
dzfw
.
forEach
(
item
=>
{
if
(
item
.
isChecked
&&
item
.
name
!==
"更多定制"
)
{
service
.
push
(
parseInt
(
item
.
id
,
10
))
this
.
dzfw
.
forEach
(
item
=>
{
if
(
item
.
isChecked
&&
item
.
name
!==
"更多定制"
)
{
service
.
push
(
parseInt
(
item
.
id
,
10
))
}
})
localStorage
.
setItem
(
'gs-custom-service'
,
JSON
.
stringify
(
service
))
localStorage
.
setItem
(
'gs-custom-service'
,
JSON
.
stringify
(
service
))
this
.
updateCustomService
(
service
)
},
async
updateCustomService
(
service
)
{
const
searchGlnRes
=
await
this
.
$api
.
home
.
updateCustomService
({
service
});
},
// 初始化
init
()
{
...
...
@@ -1187,7 +1205,7 @@ export default {
setTimeout
(()
=>
{
this
.
messageDialog
.
isShow
=
false
;
},
2000
);
}
else
{
}
else
{
this
.
setCustomService
()
}
console
.
log
(
this
.
dzfw
[
i
],
"newValue"
);
...
...
@@ -1667,6 +1685,7 @@ export default {
@media
screen
and
(
max-width
:
992px
)
{
z-index
:
-1
}
img
{
width
:
100%
;
height
:
100%
;
...
...
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