diff --git a/src/components/menu.vue b/src/components/menu.vue index 8d54780111dbd70d86978f3008cf60a51365661b..fdf75df8581f573d8810262959a6dab293a2d5d3 100644 --- a/src/components/menu.vue +++ b/src/components/menu.vue @@ -12,7 +12,10 @@ class="user" >{{ userInfo.user_name }} 请登录 - +
@@ -24,11 +27,19 @@ @click="gotopage(item.visit_url)" > {{ item.menu_name }} - +
退出登录
-
+
- {{ v.menu_name }} -
+ >{{ v.menu_name }} -
+
@@ -117,8 +130,8 @@ export default { ], shopping_list: [], menuCartNum: 0, - now_hover:-1, - show_shop_menu: false + now_hover: -1, + show_shop_menu: false, }; }, mounted() { @@ -139,15 +152,17 @@ export default { watch: { getMenuCartState(newVal) { this.getList(); - } + }, }, methods: { - change_now_hover(n){ - this.now_hover = n + change_now_hover(n) { + this.now_hover = n; }, gotopage(n) { if (n == "logout") { - window.location.href = gisServiceUrl + "/portal/sharing/rest/oauth2/signout?client_id=arcgisonline&redirect_uri=https://apaas3.wodcloud.com/iam/api/logout"; + window.location.href = + gisServiceUrl + + `/portal/sharing/rest/oauth2/signout?client_id=arcgisonline&redirect_uri=${window.location.protocol}//${window.location.host}/iam/api/logout`; } else if (n == "login") { let path = this.$route.path; window.location.href = "/iam/login/#/login?ReturnUrl=" + path; @@ -160,7 +175,7 @@ export default { }, deleteItem(id) { let query = [id]; - this.$api.serviceShop.delShoppingCart(query).then(response => { + this.$api.serviceShop.delShoppingCart(query).then((response) => { this.getList(); }); }, @@ -189,7 +204,7 @@ export default { } }, getList() { - this.$api.serviceShop.getShoppingCart().then(response => { + this.$api.serviceShop.getShoppingCart().then((response) => { if (response.data.success == "1") { this.menuCartNum = response.data.data.valid ? response.data.data.valid.length @@ -207,12 +222,12 @@ export default { this.now_menu = visit_url ? visit_url : ""; }, getNowMenu() { - this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => { + this.$api.general.getNowMenu({ teamName: "APAAS3" }).then((response) => { if (response.data.success == 1) { let arr = (response.data.data[0] && response.data.data[0].Child) || []; let shop_index = arr.findIndex( - item => item.visit_url == "/shop/shopping_cart" + (item) => item.visit_url == "/shop/shopping_cart" ); if (shop_index != -1) { arr.splice(shop_index, 1); @@ -220,7 +235,7 @@ export default { } else { this.show_shop_menu = false; } - let user_index = arr.findIndex(item => item.visit_url == "/user"); + let user_index = arr.findIndex((item) => item.visit_url == "/user"); if (user_index != -1) { this.user_arr = arr[user_index].Child; arr.splice(user_index, 1); @@ -231,8 +246,8 @@ export default { this.getMenuIndex(); } }); - } - } + }, + }, }; @@ -297,7 +312,7 @@ export default { float: right; width: 185px; font-size: 16px; - height:84px; + height: 84px; text-align: center; cursor: pointer; position: relative; diff --git a/src/pages/example/example_com_flow.vue b/src/pages/example/example_com_flow.vue index 601f11e3f967f466ca3ebcc4de226197e86be58e..bf146811d51e4777237526e2f1b0efd17ba9efbe 100644 --- a/src/pages/example/example_com_flow.vue +++ b/src/pages/example/example_com_flow.vue @@ -6,7 +6,7 @@