Commit 34319509 authored by 刘殿昕's avatar 刘殿昕

2020/09/10 18:43

parent e1bb0850
<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) => {
......
......@@ -96,6 +96,14 @@ export default {
);
return num;
},
getCartState() {
return this.$store.state.cartState;
},
},
watch: {
getCartState(newVal) {
this.getList();
},
},
methods: {
getList() {
......
......@@ -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;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment