14 Commits da2598ddb5 ... 59330ac8dd

Autor SHA1 Mensaje Fecha
  gez 59330ac8dd Merge branch 'wangtao' of uskycloud/usky-web-mobile into master hace 2 meses
  wangtao 9291c726b5 优化app滑动问题 hace 2 meses
  gez 29a189aa63 Merge branch 'wangtao' of uskycloud/usky-web-mobile into master hace 2 meses
  wangtao 2fc524809b 修复日报填写时,项目列表选项无法滑动问题 hace 2 meses
  gez b8004e9f14 Merge branch 'wangtao' of uskycloud/usky-web-mobile into master hace 2 meses
  wangtao 5f500bae11 租户切换时联动轮播图 hace 2 meses
  王涛 49378eff74 Merge branch 'wangtao' of uskycloud/usky-web-mobile into master hace 2 meses
  gez 2b1d622e3f Merge branch 'wangtao' of uskycloud/usky-web-mobile into master hace 2 meses
  wangtao 8636ce8bf1 租户切换功能完成 hace 2 meses
  wangtao acf27c5c5d 首页获取openid调整 hace 3 meses
  wangtao e0b51978ab 修复小程序跳转后首页无法获取租户ID hace 3 meses
  wangtao 23b458672d 在首页接收小程序传参 hace 3 meses
  wangtao 6d6f9a7ce4 登录页接收微信小程序传参 hace 3 meses
  fanghuisheng 17a9dcdbc1 Merge branch 'fanghuisheng' of uskycloud/usky-web-mobile into master hace 3 meses

+ 25 - 23
src/pages/business/common/projectMange/write/components/template1.vue

@@ -149,29 +149,31 @@
   <u-datetime-picker :show="timeShow" v-model="timeValue" mode="datetime" :closeOnClickOverlay="true" @cancel="timeShow = false" @confirm="timeConfirm"></u-datetime-picker>
 
   <u-modal :show="modalShow" title="" :confirmText="'确定'" :cancelText="'取消'" :zoom="false" :showCancelButton="true" @confirm="modalConfirm" @cancel="modalShow = false">
-    <view class="slot-content" style="max-height: 45vh; overflow: auto">
-      <view v-if="projectsList.length > 0">
-        <u-checkbox-group v-model="projectsCheck" placement="row" :size="14" style="max-height: 100%; overflow: auto">
-          <view class="checkbox-group-title">最近使用</view>
-          <block v-for="(item, index) in projectsList">
-            <u-checkbox
-              v-if="item.submissions > 0"
-              :customStyle="{ marginBottom: '8px', width: '50%' }"
-              :label="item.projectName + ' (' + item.submissions + '次)'"
-              :name="item.id"
-              :activeColor="proxy.$settingStore.themeColor.color"
-            >
-            </u-checkbox>
-          </block>
-          <u-line class="u-line" color="info" style="margin: 10px 0"></u-line>
-
-          <view class="checkbox-group-title">其他</view>
-
-          <block v-for="(item, index) in projectsList">
-            <u-checkbox v-if="!item.submissions" :customStyle="{ marginBottom: '8px', width: '50%' }" :label="item.projectName" :name="item.id" :activeColor="proxy.$settingStore.themeColor.color">
-            </u-checkbox>
-          </block>
-        </u-checkbox-group>
+    <view class="slot-content" style="max-height: 45vh; overflow: scroll !important;">
+      <view v-if="projectsList.length > 0" >
+        <scroll-view scroll-y style="height: 100%; max-height: 300px;">
+          <u-checkbox-group v-model="projectsCheck" placement="row" :size="14" >
+            <view class="checkbox-group-title">最近使用</view>
+              <block v-for="(item, index) in projectsList" >
+                <u-checkbox
+                  v-if="item.submissions > 0"
+                  :customStyle="{ marginBottom: '8px', width: '50%' }"
+                  :label="item.projectName + ' (' + item.submissions + '次)'"
+                  :name="item.id"
+                  :activeColor="proxy.$settingStore.themeColor.color"
+                >
+                </u-checkbox>
+              </block>
+            <u-line class="u-line" color="info" style="margin: 10px 0"></u-line>
+
+            <view class="checkbox-group-title">其他</view>
+
+            <block v-for="(item, index) in projectsList">
+              <u-checkbox v-if="!item.submissions" :customStyle="{ marginBottom: '8px', width: '50%' }" :label="item.projectName" :name="item.id" :activeColor="proxy.$settingStore.themeColor.color">
+              </u-checkbox>
+            </block>
+          </u-checkbox-group>
+        </scroll-view>
 
         <!-- <u-checkbox-group v-else v-model="projectsCheck" placement="row" :size="14"  style="max-height: 100%; overflow: auto">
         <u-checkbox

+ 33 - 29
src/pages/index.vue

@@ -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;

+ 3 - 11
src/pages/login.vue

@@ -17,7 +17,7 @@
       </view>
 
       <view class="middle-input" v-if="switchText == '验证码登录'">
-        <u-input v-model="phone" prefixIcon="phone" placeholder="请输入手机号" :maxlength="11" :adjustPosition="false" />
+        <u-input type="number" v-model="phone" prefixIcon="phone" placeholder="请输入手机号" :maxlength="11" :adjustPosition="false" />
         <u-input v-model="verify" prefixIcon="email" placeholder="请输入验证码" :maxlength="6" :adjustPosition="false">
           <template #suffix>
             <button class="verify" @click="getVerifyCode">{{ !useStore.codeTime ? "获取验证码" : useStore.codeTime + "s" }}</button>
@@ -91,6 +91,7 @@
       </view>
     </view>
   </u-modal>
+  
 </template>
 
 <script setup>
@@ -258,7 +259,7 @@ function submitRes() {
 
 /** 获取登录数据 */
 function login(data) {
-  proxy.$modal.loading("登录中,请耐心等待...");
+  proxy.$modal.loading( "登录中,请耐心等待...");
 
   useStore.Login(data).then(() => {
     /** 获取用户信息 */
@@ -299,15 +300,6 @@ function handlePrivacy() {
 onShow(() => {
   init();
 });
-
-onLoad((options) => {
-  if (options.dataToken) {
-    localStorage.setItem("App-Token", options.dataToken);
-    localStorage.setItem("type", "innerH5");
-    useStore.GetInfo();
-    proxy.$tab.reLaunch("/pages/index");
-  }
-});
 </script>
 
 <style lang="scss" scoped>

+ 5 - 1
src/pages/mine.vue

@@ -74,7 +74,12 @@
             <view class="list-cell list-cell-arrow" @click="handleToUpgrade" v-if="proxy.$common.isVisible()">
               <view class="menu-item">
                 <view class="iconfont oaIcon-jianchagengxin menu-item-icon"></view>
+                <!-- #ifdef  MP-WEIXIN -->
+                <view>查看版本号</view>
+                <!--#endif-->
+                <!-- #ifndef  MP-WEIXIN -->
                 <view>检查更新</view>
+                <!--#endif-->
               </view>
             </view>
             <view class="list-cell list-cell-arrow" @click="proxy.$tab.navigateTo(`/pages/mine/secure/loginLog/index`)">
@@ -228,7 +233,6 @@ function handleToUpgrade() {
     },
   });
 }
-
 /**
  * @推送设置
  */

BIN
src/static/images/common/approveMessage.png


BIN
src/static/images/common/reportMessage.png


+ 11 - 2
src/store/modules/setting.js

@@ -325,8 +325,14 @@ const settingStores = defineStore("storage-setting", {
                 data.appKey = platform === "android" ? "625265d978931967076754b784b676fe" : "625265d978931967076754b784b676fe"
             }
 
-            modal.loading("加载中");
-            checkUpdates(data)
+            // #ifdef MP-WEIXIN 
+                //用于正式环境
+                const accountInfo = uni.getAccountInfoSync();
+                modal.msg(accountInfo.miniProgram.version);
+            // #endif
+            // #ifndef  MP-WEIXIN
+                modal.loading("加载中");
+                checkUpdates(data)
                 .then((res) => {
                     if (res.code == 0 && res.data.buildHaveNewVersion == true) {
                         //安卓手机弹窗升级
@@ -349,6 +355,9 @@ const settingStores = defineStore("storage-setting", {
                 }).catch((err) => {
                     modal.closeLoading();
                 });
+            // #endif
+             
+            
         },
 
         /**