Commit 5cc011db authored by 刘殿昕's avatar 刘殿昕

gis登录

parent a3fc300b
<template>
<div class="menu">
<img 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
v-if="userInfo.user_name && userInfo.user_name != ''"
class="user"
>{{ userInfo.user_name }}</span>
>{{ userInfo.user_name }}</span
>
<span v-else @click="gotopage('login')" class="user">请登录</span>
<img
:class="userInfo.picture_path && false ? 'user_pic' : 'user_default'"
......@@ -13,7 +17,10 @@
/>
<span class="has_msg" v-if="unreadMessageCount > 0"></span>
<!-- 菜单图片不需要动态渲染,只用ui给的图标 -->
<div v-if="userInfo.user_name && userInfo.user_name != ''" class="user_menu">
<div
v-if="userInfo.user_name && userInfo.user_name != ''"
class="user_menu"
>
<div
v-for="(item, index) in user_arr"
:key="index + 700"
......@@ -33,20 +40,28 @@
<div
v-if="userInfo.user_name && userInfo.user_name != ''"
class="sj"
:style="now_hover==0?{backgroundColor:'#e56600'}:{}"
:style="now_hover == 0 ? { backgroundColor: '#e56600' } : {}"
></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"
@click="gotopage('/shop/shopping_cart')"
>
<div class="car">
<el-badge v-if="menuCartNum != 0" :value="menuCartNum" :max="99" class="number"></el-badge>
<el-badge
v-if="menuCartNum != 0"
:value="menuCartNum"
:max="99"
class="number"
></el-badge>
<img src="../assets/imgs/home_ic_shop.png" alt class="car_img" />
</div>
<div v-if="userInfo.user_name && userInfo.user_name != ''" class="shop_menu">
<div
v-if="userInfo.user_name && userInfo.user_name != ''"
class="shop_menu"
>
<div class="shop_list_title">最近加入的服务:</div>
<div
v-for="(item, index) in shopping_list"
......@@ -54,33 +69,55 @@
class="shop_list_cell shop_line"
>
<img
:src="item.service_id == 0 ? item.application.logo : item.service.cover"
:src="
item.service_id == 0 ? item.application.logo : item.service.cover
"
class="shop_img"
/>
<div class="shop_cell_msgs">
<p
@click="getDetail(item.id)"
class="shop_cell_name over_one"
>{{ item.service_id == 0 ? item.application.app_name : item.service.name }}</p>
<p
class="shop_cell_msg bover_one"
>{{ item.service_id == 0 ? item.application.ywly_name : item.service.sectors_name }}</p>
<p
class="shop_cell_msg over_one"
>{{ item.service_id == 0 ? item.application.org_name : item.service.organization_name }}</p>
<p @click="getDetail(item.id)" class="shop_cell_name over_one">
{{
item.service_id == 0
? item.application.app_name
: item.service.name
}}
</p>
<p class="shop_cell_msg bover_one">
{{
item.service_id == 0
? item.application.ywly_name
: item.service.sectors_name
}}
</p>
<p class="shop_cell_msg over_one">
{{
item.service_id == 0
? item.application.org_name
: item.service.organization_name
}}
</p>
</div>
<div>
<img @click.stop="deleteItem(item.id)" src="../assets/imgs/ic_delete.png" alt />
<img
@click.stop="deleteItem(item.id)"
src="../assets/imgs/ic_delete.png"
alt
/>
</div>
</div>
<div class="shop_footer">
<el-button @click="settlement" size="small" class="shop_settlement">去购物车申请结算</el-button>
<el-button @click="settlement" size="small" class="shop_settlement"
>去购物车申请结算</el-button
>
</div>
</div>
<div v-if="userInfo.user_name && userInfo.user_name != ''" class="shop_sj"></div>
<div
v-if="userInfo.user_name && userInfo.user_name != ''"
class="shop_sj"
></div>
</div>
<div style="float:right">
<div style="float: right">
<div
v-for="(item, index) in menu_arr"
:key="index + 200"
......@@ -89,19 +126,29 @@
:style="{ color: now_menu == item.visit_url ? '#fff' : '' }"
>
{{ item.menu_name }}
<div class="user_menu" v-if="item.Child && item.Child.length" style="left: 30px;">
<div
class="user_menu"
v-if="item.Child && item.Child.length"
style="left: 30px"
>
<div
v-for="(v, indexs) in item.Child"
:key="indexs + 700"
@mouseleave.stop="change_now_hover(-1)"
@mouseenter.stop="change_now_hover(indexs)"
@click.stop="gotoChildPage(v, item.visit_url)"
>{{ v.menu_name }}</div>
>
{{ v.menu_name }}
</div>
</div>
<div
class="sj"
v-if="item.Child && item.Child.length"
:style="now_hover==0?{backgroundColor:'#e56600',left: '60px'}:{left: '60px'}"
:style="
now_hover == 0
? { backgroundColor: '#e56600', left: '60px' }
: { left: '60px' }
"
></div>
<div class="bottom_show" v-if="now_menu == item.visit_url"></div>
</div>
......@@ -111,6 +158,7 @@
<script>
const gisServiceUrl = window.serviceConfig.gisServiceRoot;
const state = window.serviceConfig.state;
export default {
data() {
return {
......@@ -167,9 +215,13 @@ export default {
},
gotopage(n) {
if (n == "logout") {
window.location.href =
gisServiceUrl +
`/portal/sharing/rest/oauth2/signout?client_id=arcgisonline&redirect_uri=${window.location.protocol}//${window.location.host}/iam/api/logout`;
if (state == "needLogin") {
window.location.href =
gisServiceUrl +
`/portal/sharing/rest/oauth2/signout?client_id=arcgisonline&redirect_uri=${window.location.protocol}//${window.location.host}/iam/api/logout`;
} else {
window.location.href = "/iam/api/logout";
}
} else if (n == "login") {
let path = this.$route.path;
window.location.href = "/iam/login/#/login?ReturnUrl=" + path;
......
......@@ -351,6 +351,7 @@ import { formatDateTime_date } from "@/utils/common";
import { mapGetters, mapState } from "vuex";
import { getCookie } from "../../services/cookie";
var echarts = require("echarts");
const state = window.serviceConfig.state;
export default {
data() {
return {
......@@ -1065,6 +1066,9 @@ export default {
} else {
this.getCurrentUser();
}
if (state != "needLogin") {
this.online_tool_arr.splice(0,1)
}
},
methods: {
//鼠标所在在线工具位置
......
window.serviceConfig = {
gisServiceRoot: 'https://apaasgis.wodcloud.com'
gisServiceRoot: 'https://apaasgis.wodcloud.com',
state: "needLogin" // needLogin / notNeedLogin
};
\ No newline at end of file
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