|
@@ -1,15 +1,12 @@
|
|
|
<template>
|
|
|
<u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
|
|
|
<template #left>
|
|
|
- <view class="u-navbar__content__left__item">
|
|
|
- <view class="u-navbar__content__left__item__title">应用中心</view>
|
|
|
- </view>
|
|
|
- <!-- <view class="u-navbar__content__left__item" v-if="tenantIdList.length == 1">
|
|
|
+ <view class="u-navbar__content__left__item" v-if="tenantIdList.length == 1">
|
|
|
<view class="u-navbar__content__left__item__title">应用中心</view>
|
|
|
</view>
|
|
|
- <view v-if="tenantIdList.length > 1 && accountState">
|
|
|
+ <view class="u-navbar__content__left__item" v-if="tenantIdList.length > 1 && accountState">
|
|
|
<image class="unit-change" src="@/static/images/index/unitChange.png" @click="showLeftStateClick()"></image>
|
|
|
- </view> -->
|
|
|
+ </view>
|
|
|
</template>
|
|
|
<template #center>
|
|
|
<view class="u-navbar__content__left__item"> </view>
|
|
@@ -105,7 +102,7 @@
|
|
|
<image class="list-image" src="@/static/images/index/unit.png" v-if="item.id != useStore.tenantId"></image>
|
|
|
<text class="list-name">{{ item.tenantName }}</text>
|
|
|
<image class="list-right" src="@/static/images/index/right.png" v-if="item.id == useStore.tenantId"></image>
|
|
|
- <text class="list-state">默认企业</text>
|
|
|
+ <!-- <text class="list-state">默认企业</text> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</uni-drawer>
|
|
@@ -191,19 +188,7 @@ function changeTenantId(id) {
|
|
|
})
|
|
|
);
|
|
|
useStore.LogOut().then(() => {
|
|
|
- //#ifdef APP-PLUS
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages/index",
|
|
|
- });
|
|
|
- //#endif
|
|
|
- //#ifndef APP-PLUS
|
|
|
- //#endif
|
|
|
- if (localStorage.getItem("type")) {
|
|
|
- wx.miniProgram.navigateTo({
|
|
|
- appId: "wxf5ad8734295d43f8",
|
|
|
- url: "/pages/login?type=logout",
|
|
|
- });
|
|
|
- } else {
|
|
|
+ proxy.$modal.loading("加载中...");
|
|
|
useStore
|
|
|
.Login({
|
|
|
username: decrypt(info.userName),
|
|
@@ -217,14 +202,16 @@ function changeTenantId(id) {
|
|
|
.then(() => {
|
|
|
// /** 获取用户信息 */
|
|
|
useStore.SET_STORAGE_OBJECT_KEYS({ tenantId: id });
|
|
|
- proxy.$modal.closeLoading();
|
|
|
useStore.GetInfo().then((res) => {
|
|
|
proxy.$settingStore.initThemeColor(storageSystem.get("themeColor")); //初始化默认主题
|
|
|
+ state.recentlyUsed = []
|
|
|
init();
|
|
|
- closeDrawer();
|
|
|
+ setTimeout(() => {
|
|
|
+ showLeftStateClick();
|
|
|
+ proxy.$modal.closeLoading();
|
|
|
+ },1000)
|
|
|
});
|
|
|
});
|
|
|
- }
|
|
|
});
|
|
|
}
|
|
|
/**
|
|
@@ -415,6 +402,7 @@ function getMobileBannerApi() {
|
|
|
getMobileBanner({
|
|
|
tenantId: useStore.tenantId,
|
|
|
}).then((res) => {
|
|
|
+
|
|
|
if (res.data.length > 0) {
|
|
|
state.swiperList = [];
|
|
|
state.swiperBool = res.data[0].openNot == 1 ? true : false;
|
|
@@ -430,6 +418,11 @@ function getMobileBannerApi() {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ }else{
|
|
|
+ state.swiperList=[{
|
|
|
+ url: "http://file.usky.cn/statics/202305/20230526152845A042.jpg",
|
|
|
+ type: "image",
|
|
|
+ }];
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -446,8 +439,21 @@ function getAppRoutersData() {
|
|
|
}
|
|
|
|
|
|
onLoad((options) => {
|
|
|
- uni.hideTabBar(); //隐藏自带tabbar
|
|
|
- init(options);
|
|
|
+ if(options?.xcxData){
|
|
|
+ let xcxData = JSON.parse(decrypt(decodeURIComponent(options.xcxData)))
|
|
|
+ useStore.SET_STORAGE_OBJECT_KEYS({ tenantId: xcxData.tenantId })
|
|
|
+ localStorage.setItem("tenantId", xcxData.tenantId )
|
|
|
+ useStore.Login(JSON.parse(decrypt(decodeURIComponent(options.xcxData)))).then(() => {
|
|
|
+ useStore.GetInfo().then((res) => {
|
|
|
+ proxy.$settingStore.initThemeColor(storageSystem.get("themeColor")); //初始化默认主题
|
|
|
+ uni.hideTabBar(); //隐藏自带tabbar
|
|
|
+ init(options);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ uni.hideTabBar(); //隐藏自带tabbar
|
|
|
+ init(options);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
onShow(() => {
|
|
@@ -540,9 +546,7 @@ onShow(() => {
|
|
|
.unit-change {
|
|
|
width: 18px;
|
|
|
height: 18px;
|
|
|
- position: fixed;
|
|
|
- top: 12px;
|
|
|
- left: 12px;
|
|
|
+ margin-top:14px;
|
|
|
}
|
|
|
.unit {
|
|
|
width: 100vw !important;
|
|
@@ -578,7 +582,7 @@ onShow(() => {
|
|
|
&-right {
|
|
|
position: absolute;
|
|
|
top: 38%;
|
|
|
- right: 30%;
|
|
|
+ right: 10%;
|
|
|
width: 16px;
|
|
|
height: 11px;
|
|
|
vertical-align: middle;
|