Commit 00ddee60 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents fddf2745 4cbb3697
<template> <template>
<div class="menu"> <div class="menu">
<img @click="gotopage('/services_shop')" src="../assets/imgs/home_img_logo.png" alt class="logo" /> <img
@click="gotopage('/services_shop')"
src="../assets/imgs/home_img_logo.png"
alt
class="logo"
/>
<div style="float:right;cursor: pointer;position:relative;" class="user_hover"> <div style="float:right;cursor: pointer;position:relative;" class="user_hover">
<span <span
v-if="userInfo.user_name && userInfo.user_name != ''" v-if="userInfo.user_name && userInfo.user_name != ''"
...@@ -17,12 +22,14 @@ ...@@ -17,12 +22,14 @@
<div <div
v-for="(item, index) in user_arr" v-for="(item, index) in user_arr"
:key="index + 700" :key="index + 700"
@click="gotopage(item.path)" @click="gotopage(item.visit_url)"
>{{ item.name }}</div> >{{ item.menu_name }}</div>
<div @click="gotopage('logout')">退出登录</div>
</div> </div>
<div v-if="userInfo.user_name && userInfo.user_name != ''" class="sj"></div> <div v-if="userInfo.user_name && userInfo.user_name != ''" class="sj"></div>
</div> </div>
<div <div
v-if="show_shop_menu"
style="float:right;cursor: pointer;position:relative;" style="float:right;cursor: pointer;position:relative;"
class="shop_hover" class="shop_hover"
@click="gotopage('/shop/shopping_cart')" @click="gotopage('/shop/shopping_cart')"
...@@ -38,7 +45,10 @@ ...@@ -38,7 +45,10 @@
:key="'shopping' + index" :key="'shopping' + index"
class="shop_list_cell shop_line" class="shop_list_cell shop_line"
> >
<img :src="item.service_id == 0 ? item.application.logo : item.service.cover" class="shop_img" /> <img
:src="item.service_id == 0 ? item.application.logo : item.service.cover"
class="shop_img"
/>
<div class="shop_cell_msgs"> <div class="shop_cell_msgs">
<p <p
@click="getDetail(item.id)" @click="getDetail(item.id)"
...@@ -92,14 +102,15 @@ export default { ...@@ -92,14 +102,15 @@ export default {
menu_arr: [], menu_arr: [],
now_menu: "", now_menu: "",
user_arr: [ user_arr: [
{ name: "个人档案", path: "/user/user_info" }, // { name: "个人档案", path: "/user/user_info" },
{ name: "消息通知", path: "/user/message" }, // { name: "消息通知", path: "/user/message" },
{ name: "订单管理", path: "/user/order_list" }, // { name: "订单管理", path: "/user/order_list" },
{ name: "关于BD-aPaaS", path: "" }, // { name: "关于BD-aPaaS", path: "" },
{ name: "退出登录", path: "logout" } // { name: "退出登录", path: "logout" }
], ],
shopping_list: [], shopping_list: [],
menuCartNum: 0 menuCartNum: 0,
show_shop_menu: false
}; };
}, },
mounted() { mounted() {
...@@ -182,14 +193,30 @@ export default { ...@@ -182,14 +193,30 @@ export default {
}, },
getMenuIndex() { getMenuIndex() {
let visit_url = window.sessionStorage.getItem("menuVisitUrl"); let visit_url = window.sessionStorage.getItem("menuVisitUrl");
console.log(visit_url); this.now_menu = visit_url ? visit_url : "";
this.now_menu = visit_url ? visit_url : "/services_shop";
}, },
getNowMenu() { getNowMenu() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => { this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.menu_arr = let arr =
(response.data.data[0] && response.data.data[0].Child) || []; (response.data.data[0] && response.data.data[0].Child) || [];
let shop_index = arr.findIndex(
item => item.visit_url == "/shop/shopping_cart"
);
if (shop_index != -1) {
arr.splice(shop_index, 1);
this.show_shop_menu = true;
} else {
this.show_shop_menu = false;
}
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);
} else {
}
this.menu_arr = arr;
console.log(this.user_arr);
this.getMenuIndex(); this.getMenuIndex();
} }
}); });
......
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
let arr = response.data.data[0].Child; let arr = response.data.data[0].Child;
let shopArr = []; let shopArr = [];
arr.forEach(item => { arr.forEach(item => {
if (item.visit_url == "/services_shop") { if (item.visit_url == "/shop") {
shopArr = item.Child; shopArr = item.Child;
} }
}); });
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</el-form-item> </el-form-item>
<el-form-item prop="preson"> <el-form-item prop="preson">
<p class="formname">部门联系人:</p> <p class="formname">部门联系人:</p>
<el-input v-model="formInline.preson" placeholder="申请人"></el-input> <el-input v-model="formInline.preson" placeholder="联系人"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="phone"> <el-form-item prop="phone">
<p class="formname">联系电话:</p> <p class="formname">联系电话:</p>
......
...@@ -290,7 +290,7 @@ export default { ...@@ -290,7 +290,7 @@ export default {
[1010, 120, 130, 520, 160, 1120, 110, 100], [1010, 120, 130, 520, 160, 1120, 110, 100],
[100, 1210, 130, 1530, 160, 120, 110, 1200] [100, 1210, 130, 1530, 160, 120, 110, 1200]
], ],
legend: ["aaa1", "bbb1"] legend: ["被调用次数", "调用次数"]
}, },
toplistData: [ toplistData: [
{ {
......
...@@ -433,7 +433,7 @@ export default { ...@@ -433,7 +433,7 @@ export default {
[1010, 120, 130, 520, 160, 1120, 110, 100], [1010, 120, 130, 520, 160, 1120, 110, 100],
[100, 1210, 130, 1530, 160, 120, 110, 1200] [100, 1210, 130, 1530, 160, 120, 110, 1200]
], ],
legend: ["aaa1", "bbb1"] legend: ["被调用次数", "调用次数"]
}, },
topology_datas: {} topology_datas: {}
}), }),
......
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