Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
34319509
Commit
34319509
authored
Sep 10, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2020/09/10 18:43
parent
e1bb0850
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
10 deletions
+25
-10
src/components/menu.vue
src/components/menu.vue
+13
-10
src/components/shopping-cart/shopping-cart-com.vue
src/components/shopping-cart/shopping-cart-com.vue
+8
-0
src/store/index.js
src/store/index.js
+4
-0
No files found.
src/components/menu.vue
View file @
34319509
<
template
>
<div
class=
"menu"
>
<img
src=
"../assets/imgs/home_img_logo.png"
alt
class=
"logo"
/>
<img
src=
"../assets/imgs/home_img_logo.png"
alt
class=
"logo"
/>
<div
style=
"float:right;cursor: pointer;position:relative;"
class=
"user_hover"
>
<span
v-if=
"userInfo.user_name && userInfo.user_name != ''"
...
...
@@ -149,17 +145,21 @@ export default {
},
getRouter
()
{
return
this
.
$route
.
path
;
}
}
,
},
watch
:
{
getMenuCartState
(
newVal
)
{
this
.
getList
();
},
getRouter
(
val
)
{
if
(
val
==
"
/services_shop
"
||
val
==
"
/technical_support
"
||
val
==
"
/workplace
"
)
{
if
(
val
==
"
/services_shop
"
||
val
==
"
/technical_support
"
||
val
==
"
/workplace
"
)
{
this
.
now_menu
=
val
;
}
}
}
,
},
methods
:
{
change_now_hover
(
n
)
{
...
...
@@ -183,7 +183,10 @@ export default {
deleteItem
(
id
)
{
let
query
=
[
id
];
this
.
$api
.
serviceShop
.
delShoppingCart
(
query
).
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$store
.
commit
(
"
setCartState
"
);
this
.
getList
();
}
});
},
getDetail
()
{
...
...
@@ -224,7 +227,7 @@ export default {
},
getMenuIndex
()
{
this
.
now_menu
=
this
.
$route
.
path
;
console
.
log
(
this
.
now_menu
)
console
.
log
(
this
.
now_menu
)
;
},
getNowMenu
()
{
this
.
$api
.
general
.
getNowMenu
({
teamName
:
"
APAAS3
"
}).
then
((
response
)
=>
{
...
...
src/components/shopping-cart/shopping-cart-com.vue
View file @
34319509
...
...
@@ -96,6 +96,14 @@ export default {
);
return
num
;
},
getCartState
()
{
return
this
.
$store
.
state
.
cartState
;
},
},
watch
:
{
getCartState
(
newVal
)
{
this
.
getList
();
},
},
methods
:
{
getList
()
{
...
...
src/store/index.js
View file @
34319509
...
...
@@ -19,6 +19,7 @@ const store = new Vuex.Store({
],
// 应用管理列表,onlyRead
shoppingCart
:
[],
//购物车
menuCartState
:
0
,
//购物车操作都要修改这个值,menu监听这个值的变化实时获取购物车列表
cartState
:
0
,
znztParams
:
null
,
//智能制图传入过来的数据
appBuilderParams
:
null
,
//应用程序传入过来的数据
znztIdParams
:
''
,
//智能制图服务id
...
...
@@ -61,6 +62,9 @@ const store = new Vuex.Store({
setMenuCartState
(
state
)
{
state
.
menuCartState
++
;
},
setCartState
(
state
)
{
state
.
cartState
++
;
},
setZnztParams
(
state
,
newValue
)
{
state
.
znztParams
=
newValue
;
},
...
...
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