Преглед изворни кода

feat: 优化报表入口权限与登录流程

- 根据权限控制瑞恒、瑞鹰报表入口展示
- 清理登录页及个人中心重复冗余代码
- 移除个人中心版本信息入口
- 更新开发环境接口地址
- 升级应用版本至 1.3.6
- 增加热更新包地址日志
Zimo пре 1 недеља
родитељ
комит
30eb51fe5b
7 измењених фајлова са 86 додато и 481 уклоњено
  1. 2 2
      android/simpleDemo/build.gradle
  2. 2 2
      config/env.dev.js
  3. 2 2
      manifest.json
  4. 42 67
      pages/home/index.vue
  5. 0 70
      pages/user/index.vue
  6. 37 338
      pages/user/login.vue
  7. 1 0
      utils/hot-update.js

+ 2 - 2
android/simpleDemo/build.gradle

@@ -10,8 +10,8 @@ android {
         minSdkVersion 21
         // targetSdkVersion 33
         targetSdk 33
-        versionCode 10305
-        versionName "1.3.5"
+        versionCode 10306
+        versionName "1.3.6"
         multiDexEnabled true
         compileOptions {
             sourceCompatibility JavaVersion.VERSION_1_8

+ 2 - 2
config/env.dev.js

@@ -1,7 +1,7 @@
 // 开发环境配置
 export default {
-  // apiUrl: "https://iot.deepoil.cc:5443",
-  apiUrl: "http://192.168.188.86:48080",
+  apiUrl: "https://iot.deepoil.cc:5443",
+  // apiUrl: "http://192.168.188.86:48080",
   // apiUrl: "https://aims.deepoil.cc", //正式
   apiUrlSuffix: "/admin-api",
   // 其他开发环境配置...

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
   "name": "DeepOil",
   "appid": "__UNI__6E4BC49",
   "description": "",
-  "versionName": "1.3.2",
-  "versionCode": 10302,
+  "versionName": "1.3.6",
+  "versionCode": 10306,
   "transformPx": false,
   /* 5+App特有相关 */
   "app-plus": {

+ 42 - 67
pages/home/index.vue

@@ -5,7 +5,7 @@
     <view class="page-content flex-col">
       <!-- <uni-row class="row-full">
         <uni-col class="daiban-tixing flex-row align-center justify-between">
-        
+
           <swiper
             class="dt-swiper"
             circular="true"
@@ -25,14 +25,14 @@
                 style="margin-top: 10px"
               >
                 <view class="dt-status green">
-                  
+
                   {{ item1.status }}
                 </view>
                 <view class="dt-content">
-                 
+
                   {{ item1.type + "-" + item1.title }}
                 </view>
-            
+
               </view>
               <view
                 v-if="item2"
@@ -40,14 +40,14 @@
                 style="margin-bottom: 10px"
               >
                 <view class="dt-status green">
-                  
+
                   {{ item2?.status }}
                 </view>
                 <view class="dt-content">
-                
+
                   {{ item2?.type + "-" + item2?.title }}
                 </view>
-              
+
               </view>
             </swiper-item>
           </swiper>
@@ -60,8 +60,7 @@
         <uni-col
           :span="12"
           class="yunxingjilu flex-col justify-between"
-          @click="navigatorTo('/pages/recordFilling/list')"
-        >
+          @click="navigatorTo('/pages/recordFilling/list')">
           <view class="half-title">
             {{ $t("home.operationRecordFilling") }}
           </view>
@@ -73,8 +72,7 @@
         <uni-col
           :span="12"
           class="baoyang flex-col justify-between"
-          @click="navigatorTo('/pages/maintenance/index')"
-        >
+          @click="navigatorTo('/pages/maintenance/index')">
           <view class="half-title">
             {{ $t("home.maintenanceWorkOrder") }}
           </view>
@@ -88,8 +86,7 @@
         <uni-col
           :span="12"
           class="shebeiweixiu flex-col justify-between"
-          @click="navigatorTo('/pages/repair/index')"
-        >
+          @click="navigatorTo('/pages/repair/index')">
           <view class="half-title">
             {{ $t("home.equipmentMaintenance") }}
           </view>
@@ -101,8 +98,7 @@
         <uni-col
           :span="12"
           class="xunjian flex-col justify-between"
-          @click="navigatorTo('/pages/inspection/index')"
-        >
+          @click="navigatorTo('/pages/inspection/index')">
           <view class="half-title">
             {{ $t("home.inspectionWorkOrder") }}
           </view>
@@ -115,8 +111,7 @@
         <!-- 故障上报 -->
         <uni-col
           class="guzhang flex-row align-center"
-          @click="navigatorTo('/pages/fault/index')"
-        >
+          @click="navigatorTo('/pages/fault/index')">
           <view class="half-title" style="margin-right: 10px">
             {{ $t("home.faultReporting") }}
           </view>
@@ -130,8 +125,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="navigatorTo('/pages/ruiDu/index')"
-          v-if="isShowRuiduDaily"
-        >
+          v-if="isShowRuiduDaily">
           <image src="/static/home/ribao.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -149,8 +143,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="openRuiDuReportPopup"
-          v-if="rdReportStatisticsFlag"
-        >
+          v-if="rdReportStatisticsFlag">
           <image src="/static/home/ribao.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -169,7 +162,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="openRuiHengReportPopup"
-        >
+          v-if="rhReportApprovalFlag">
           <image src="/static/home/rh.png" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -187,7 +180,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="openRuiYingReportPopup"
-        >
+          v-if="ryReportStatisticsFlag">
           <image src="/static/home/ruiying.png" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -204,8 +197,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="navigatorTo('/pages/ruihen-task/index')"
-          v-if="rhTaskFlag"
-        >
+          v-if="rhTaskFlag">
           <image src="/static/home/ribao.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -222,8 +214,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="navigatorTo('/pages/ruihen/index?type=edit')"
-          v-if="rhReportFlag"
-        >
+          v-if="rhReportFlag">
           <image src="/static/home/ribao.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -240,8 +231,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="navigatorTo('/pages/ruihen/index?type=approval')"
-          v-if="rhReportApprovalFlag"
-        >
+          v-if="rhReportApprovalFlag">
           <image src="/static/home/ribao.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -258,8 +248,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="navigatorTo('/pages/ruiying/index?type=edit')"
-          v-if="ryReportFlag"
-        >
+          v-if="ryReportFlag">
           <image src="/static/home/ribao.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -276,8 +265,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="navigatorTo('/pages/ruiying/index?type=approval')"
-          v-if="ryReportApprovalFlag"
-        >
+          v-if="ryReportApprovalFlag">
           <image src="/static/home/ribao.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -294,8 +282,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="navigatorTo('/pages/ruiyingx/index?type=edit')"
-          v-if="ryXjReportFlag"
-        >
+          v-if="ryXjReportFlag">
           <image src="/static/home/ribao.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -312,8 +299,7 @@
         <view
           class="card-cell flex-row align-center justify-between"
           @click="navigatorTo('/pages/ruiyingx/index?type=approval')"
-          v-if="ryXjReportApprovalFlag"
-        >
+          v-if="ryXjReportApprovalFlag">
           <image src="/static/home/ribao.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -330,8 +316,7 @@
         <!-- 库存查询 -->
         <view
           class="card-cell flex-row align-center justify-between"
-          @click="navigatorTo('/pages/inventory/index')"
-        >
+          @click="navigatorTo('/pages/inventory/index')">
           <image src="/static/home/kucun.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -348,8 +333,7 @@
         <!-- 保养查询 -->
         <view
           class="card-cell flex-row align-center justify-between"
-          @click="navigatorTo('/pages/maintenance/search')"
-        >
+          @click="navigatorTo('/pages/maintenance/search')">
           <image src="/static/home/taizhang.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -366,8 +350,7 @@
         <!-- 设备台账 -->
         <view
           class="card-cell flex-row align-center justify-between"
-          @click="navigatorTo('/pages/ledger/index')"
-        >
+          @click="navigatorTo('/pages/ledger/index')">
           <image src="/static/home/taizhang.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -384,12 +367,10 @@
         <!-- 设备状态变更 -->
         <view
           class="card-cell flex-row align-center justify-between"
-          @click="navigatorTo('/pages/statusChange/index')"
-        >
+          @click="navigatorTo('/pages/statusChange/index')">
           <image
             src="/static/home/zhuangtaibiangeng.svg"
-            mode="aspectFill"
-          ></image>
+            mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
               <view class="title">
@@ -405,8 +386,7 @@
         <!-- 设备责任人 -->
         <view
           class="card-cell flex-row align-center justify-between"
-          @click="navigatorTo('/pages/deviceUser/index')"
-        >
+          @click="navigatorTo('/pages/deviceUser/index')">
           <image src="/static/home/deviceUser.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -423,8 +403,7 @@
         <!-- 设备实时数据监控 -->
         <view
           class="card-cell flex-row align-center justify-between"
-          @click="navigatorTo('/pages/realTimeData/index')"
-        >
+          @click="navigatorTo('/pages/realTimeData/index')">
           <image src="/static/home/shujujiankong.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -441,8 +420,7 @@
         <!-- 统计分析 -->
         <view
           class="card-cell flex-row align-center justify-between"
-          @click="navigatorTo('/pages/statistic/index')"
-        >
+          @click="navigatorTo('/pages/statistic/index')">
           <image src="/static/home/tongjifenxi.svg" mode="aspectFill"></image>
           <view class="cell-con flex-row align-center justify-between">
             <view class="cell-text flex-row align-center justify-start">
@@ -464,24 +442,21 @@
       ref="ruiDuReportPopup"
       type="bottom"
       background-color="#fff"
-      border-radius="10px 10px 0 0"
-    >
+      border-radius="10px 10px 0 0">
       <view class="report-popup">
         <view class="report-popup-header">
           {{ $t("ruiDuReport.selectTitle") }}
         </view>
         <view
           class="report-popup-item"
-          @click="navigateToRuiDuReport('/pages/ruiDuReport/daily-detail')"
-        >
+          @click="navigateToRuiDuReport('/pages/ruiDuReport/daily-detail')">
           {{ $t("ruiDuReport.dailyDetail") }}
         </view>
         <view
           class="report-popup-item"
           @click="
             navigateToRuiDuReport('/pages/ruiDuReport/daily-team-statistic')
-          "
-        >
+          ">
           {{ $t("ruiDuReport.dailyTeamStatistic") }}
         </view>
         <view class="report-popup-cancel" @click="closeRuiDuReportPopup">
@@ -495,16 +470,14 @@
       ref="ruiHengReportPopup"
       type="bottom"
       background-color="#fff"
-      border-radius="10px 10px 0 0"
-    >
+      border-radius="10px 10px 0 0">
       <view class="report-popup">
         <view class="report-popup-header">
           {{ $t("ruiHengReport.selectTitle") }}
         </view>
         <view
           class="report-popup-item"
-          @click="navigateToRuiHengReport('/pages/ruiHengReport/index')"
-        >
+          @click="navigateToRuiHengReport('/pages/ruiHengReport/index')">
           {{ $t("ruiDuReport.dailyDetail") }}
         </view>
 
@@ -519,16 +492,14 @@
       ref="ruiYingReportPopup"
       type="bottom"
       background-color="#fff"
-      border-radius="10px 10px 0 0"
-    >
+      border-radius="10px 10px 0 0">
       <view class="report-popup">
         <view class="report-popup-header">
           {{ $t("ruiYingReport.selectTitle") }}
         </view>
         <view
           class="report-popup-item"
-          @click="navigateToRuiYingReport('/pages/ruiYingReport/index')"
-        >
+          @click="navigateToRuiYingReport('/pages/ruiYingReport/index')">
           {{ $t("ruiDuReport.dailyDetail") }}
         </view>
 
@@ -610,6 +581,8 @@ onMounted(async () => {
 // 是否展示瑞都日报入口
 const isShowRuiduDaily = ref(false);
 const rdReportStatisticsFlag = ref(false);
+const ryReportStatisticsFlag = ref(false);
+const rhReportStatisticsFlag = ref(false);
 const rhReportFlag = ref(false);
 const rhTaskFlag = ref(false);
 const rhReportApprovalFlag = ref(false);
@@ -627,9 +600,11 @@ const getLoginUser = async () => {
     // isShowRuiduDaily.value = true;
     rhReportFlag.value = response.data.rhReportFlag;
     rhTaskFlag.value = response.data.rhReportFlag;
+    rhReportStatisticsFlag.value = response.data.rhReportStatisticsFlag;
     // rhTaskFlag.value = true;
     rhReportApprovalFlag.value = response.data.rhReportApprovalFlag;
     ryReportFlag.value = response.data.ryReportFlag;
+    ryReportStatisticsFlag.value = response.data.ryReportStatisticsFlag;
     // ryReportFlag.value = true;
     ryReportApprovalFlag.value = response.data.ryReportApprovalFlag;
     // ryReportApprovalFlag.value = true;

+ 0 - 70
pages/user/index.vue

@@ -122,21 +122,6 @@
             <uni-icons type="right" :color="'#CACCCF'" size="15" />
           </view>
         </view>
-        <view class="card-cell flex-row align-center justify-between">
-          <image src="/static/user/guanyuwomen.svg" mode="aspectFill"></image>
-          <view class="cell-con flex-row align-center justify-between">
-            <view class="cell-text flex-row align-center justify-start">
-              <view class="title">
-                {{ $t("user.aboutUs") }}
-              </view>
-              <view class="subtitle">
-                {{ $t("user.currentVersion") + " " + version }}
-              </view>
-            </view>
-            <uni-icons type="right" :color="'#CACCCF'" size="15" />
-          </view>
-        </view>
-
         <!-- <view
           class="card-cell flex-row align-center justify-between"
           @click="logout"
@@ -262,9 +247,6 @@ onShow(() => {
 .page {
   padding: 10px !important;
 }
-.page {
-  padding: 10px !important;
-}
 
 .mine-container {
   width: 100%;
@@ -293,14 +275,6 @@ onShow(() => {
   width: 100%;
   height: 55px;
   padding: 15px 0;
-.navgator {
-  position: fixed;
-  top: 1.5625rem;
-  left: 0;
-  width: 100%;
-  height: 55px;
-  padding: 15px 0;
-
   z-index: 2;
   // background-image: url('/static/common/nav-back.png');
 }
@@ -393,9 +367,6 @@ onShow(() => {
   }
 }
 
-.text {
-  height: 19px;
-  width: 100%;
 .text {
   height: 19px;
   width: 100%;
@@ -411,14 +382,6 @@ onShow(() => {
   font-weight: bold;
 }
 
-.menu-list {
-  height: 274px;
-  background: #ffffff;
-  border-radius: 6px;
-  margin-top: 10px;
-  padding: 20px;
-  box-sizing: border-box;
-}
 .menu-list {
   height: 274px;
   background: #ffffff;
@@ -428,9 +391,6 @@ onShow(() => {
   box-sizing: border-box;
 }
 
-.card-cell {
-  width: 100%;
-  height: 50px;
 .card-cell {
   width: 100%;
   height: 50px;
@@ -440,19 +400,7 @@ onShow(() => {
     height: 32px;
   }
 }
-  image {
-    width: 32px;
-    height: 32px;
-  }
-}
 
-.cell-con {
-  margin-left: 20px;
-  margin-right: 10px;
-  width: calc(100% - 32px - 20px - 10px);
-  height: 100%;
-  border-bottom: 0.5px solid #cacccf;
-}
 .cell-con {
   margin-left: 20px;
   margin-right: 10px;
@@ -461,28 +409,15 @@ onShow(() => {
   border-bottom: 0.5px solid #cacccf;
 }
 
-.cell-text {
-  font-weight: 500;
 .cell-text {
   font-weight: 500;
 
-  .title {
-    font-size: 14px;
-    color: #333333;
-    line-height: 20px;
-  }
   .title {
     font-size: 14px;
     color: #333333;
     line-height: 20px;
   }
 
-  .subtitle {
-    font-size: 12px;
-    color: #999999;
-    line-height: 17px;
-    margin-left: 10px;
-  }
   .subtitle {
     font-size: 12px;
     color: #999999;
@@ -495,9 +430,4 @@ onShow(() => {
     height: 10px;
   }
 }
-  .icon {
-    width: 6px;
-    height: 10px;
-  }
-}
 </style>

+ 37 - 338
pages/user/login.vue

@@ -3,9 +3,7 @@
     <view class="login-top">
       <image class="back-img" src="../../static/login/login-back.png"></image>
       <view class="login-text">
-        <view class="text">
-          {{ $t("login.welcome") }}
-        </view>
+        <view class="text"> {{ $t("login.welcome") }}</view>
         <view class="text">
           {{ $t("app.appName") }}
         </view>
@@ -16,8 +14,7 @@
         class="login-form"
         ref="formRef"
         :modelValue="loginData"
-        :rules="loginRules"
-      >
+        :rules="loginRules">
         <uni-forms-item name="username" class="margin-bt">
           <!-- type="number" -->
           <uni-easyinput
@@ -25,8 +22,7 @@
             v-model="loginData.username"
             :placeholder="$t('login.enterUsername')"
             :placeholderStyle="placeholderStyle"
-            :styles="inputStyles"
-          />
+            :styles="inputStyles" />
         </uni-forms-item>
         <uni-forms-item name="password" class="margin-bt">
           <uni-easyinput
@@ -34,8 +30,7 @@
             v-model="loginData.password"
             :placeholder="$t('login.enterPassword')"
             :placeholderStyle="placeholderStyle"
-            :styles="inputStyles"
-          />
+            :styles="inputStyles" />
         </uni-forms-item>
       </uni-forms>
       <button type="primary" @click="formSubmit(formRef)">
@@ -51,45 +46,6 @@
       </view>
     </view>
 
-    <!-- <view class="uni-padding-wrap">
-    <!-- <view class="uni-padding-wrap">
-			<view>
-				<checkbox-group @change="handleChange">
-					<label>
-						<checkbox :value="true" :checked="isChecked" style="transform: scale(0.6)" />
-					</label>
-				</checkbox-group>
-			</view>
-
-						<view class="uni-title">
-				已阅读并同意
-				<text style="text-decoration: underline" @click="goPrivacy">《隐私政策》</text>
-
-				和
-				<text style="text-decoration: underline" @click="goAgreement">《用户服务协议》</text>
-			</view>
-
-			<uni-popup ref="privacyRef">
-				<scroll-view scroll-y="true" class="privacy" style="height: 500px; border-radius: 20rpx">
-					<view style="background-color: #fff; padding: 0 50rpx; border-radius: 20rpx">
-						<Privacy />
-					</view>
-				</scroll-view>
-			</uni-popup>
-
-			<uni-popup ref="aggRef">
-				<scroll-view scroll-y="true" class="privacy" style="height: 500px; border-radius: 20rpx">
-					<view style="background-color: #fff; padding: 0 50rpx; border-radius: 20rpx">
-						<Agg />
-					</view>
-				</scroll-view>
-			</uni-popup>
-		</view> -->
-
-    <!-- 引用语言选择组件 -->
-    <language-popup ref="languagePopupRef" />
-    <upgrade ref="upgradeRef" />
-  </view>
     <!-- 引用语言选择组件 -->
     <language-popup ref="languagePopupRef" />
     <upgrade ref="upgradeRef" />
@@ -107,33 +63,20 @@ import {
   getInfo,
   getTokenByUserId,
 } from "@/api/login.js";
-import {
-  appLogin,
-  dingTalkLogin,
-  dingTalkLoginH5,
-  getInfo,
-  getTokenByUserId,
-} from "@/api/login.js";
 // 引入配置文件
 import config from "@/utils/config";
-import config from "@/utils/config";
 // 引入数据库操作
 import { saveUser } from "@/utils/appDb";
-import { saveUser } from "@/utils/appDb";
 // 引入本地存储操作
 import { setUserId, setToken, setDeptId, setUserInfo } from "@/utils/auth.js";
-import { setUserId, setToken, setDeptId, setUserInfo } from "@/utils/auth.js";
 // 引入组件
 import Upgrade from "@/components/upgrade.vue";
 import LanguagePopup from "@/components/language-popup.vue";
-import Upgrade from "@/components/upgrade.vue";
-import LanguagePopup from "@/components/language-popup.vue";
 
 // 引入钉钉JSAPI -- 仅在H5环境下使用
 let dd = null;
 // #ifdef H5
 import * as dingTalkJsApi from "dingtalk-jsapi";
-import * as dingTalkJsApi from "dingtalk-jsapi";
 dd = dingTalkJsApi;
 // #endif
 
@@ -142,47 +85,17 @@ const t = appContext.config.globalProperties.$t;
 const languagePopupRef = ref(null);
 
 const openLanguagePopup = () => {
-  languagePopupRef.value.open();
-  languagePopupRef.value.open();
-};
-
-let isChecked = ref(false);
-let my_value = ref(false);
-
-const handleChange = (val) => {
-  my_value.value = val.detail.value[0];
-  my_value.value = val.detail.value[0];
+  languagePopupRef.value?.open();
 };
 
-// let privacyRef = ref(null);
-// let aggRef = ref(null);
-
-// const goPrivacy = () => {
-// 	privacyRef.value.open();
-// };
-
-// const goAgreement = () => {
-// 	aggRef.value.open();
-// };
-
 // 判断当前环境是否在钉钉环境
 const isDingTalk = () => {
   const ua = window.navigator.userAgent.toLowerCase();
   console.log("🚀 ~ 当前环境 ~ ua:", ua);
   return ua.includes("dingtalk") || ua.includes("dingtalkwork");
-  const ua = window.navigator.userAgent.toLowerCase();
-  console.log("🚀 ~ 当前环境 ~ ua:", ua);
-  return ua.includes("dingtalk") || ua.includes("dingtalkwork");
 };
 
-const dingTalkAutoLogin = async () => {
-  // 判断是否在钉钉环境
-  if (!isDingTalk()) {
-    console.log("当前环境不是钉钉环境,无法自动登录");
-    return;
-  }
-  // 执行钉钉微应用免登逻辑
-  loginWithDingTalkH5();
+const dingTalkAutoLogin = () => {
   // 判断是否在钉钉环境
   if (!isDingTalk()) {
     console.log("当前环境不是钉钉环境,无法自动登录");
@@ -214,39 +127,6 @@ const loginWithDingTalk = async () => {
     }
   });
   // #endif
-  // #ifdef APP
-  const plugin = uni.requireNativePlugin("DingTalk");
-  // 钉钉登录,这里无法使用async,否则java端会报参数错误
-  plugin.login((res) => {
-    console.log(res);
-    if (res.success === 1) {
-      dingTalkLogin({
-        type: 20,
-        code: res.code,
-        state: res.state,
-      }).then((res) => {
-        console.log(res);
-        handleLoginSuccess(res);
-      });
-    } else if (res.success === 2) {
-      uni.showToast({ title: t("login.dingTalkError"), icon: "none" });
-      console.error("APP端钉钉登录失败:", res);
-    }
-  });
-  // #endif
-
-  // #ifdef H5
-  if (isDingTalk()) {
-    if (!dd) {
-      uni.showToast({ title: t("login.dingTalkJsapiMissing"), icon: "none" });
-      return;
-    }
-    loginWithDingTalkH5();
-  } else {
-    console.log("当前是普通 H5 环境,无法使用钉钉登录");
-    uni.showToast({ title: t("login.h5DingTalk"), icon: "none" });
-  }
-  // #endif
   // #ifdef H5
   if (isDingTalk()) {
     if (!dd) {
@@ -266,10 +146,6 @@ const loginWithDingTalkH5 = async () => {
   console.log("🚀 ~ loginWithDingTalkH5 ~ corpId:", corpId);
   const clientId = config.default.clientId;
   console.log("🚀 ~ loginWithDingTalkH5 ~ clientId:", clientId);
-  const corpId = config.default.corpId;
-  console.log("🚀 ~ loginWithDingTalkH5 ~ corpId:", corpId);
-  const clientId = config.default.clientId;
-  console.log("🚀 ~ loginWithDingTalkH5 ~ clientId:", clientId);
 
   if (!corpId || !clientId) {
     console.error("缺少必要参数");
@@ -302,37 +178,6 @@ const loginWithDingTalkH5 = async () => {
       });
     },
   });
-  if (!corpId || !clientId) {
-    console.error("缺少必要参数");
-    return;
-  }
-  dd.requestAuthCode({
-    corpId,
-    clientId,
-    success: async (result) => {
-      console.log("🚀 ~ loginWithDingTalkH5 ~ result:", result);
-      const { code } = result;
-      dingTalkLoginH5({
-        type: 10,
-        state: new Date().getTime(),
-        code: code,
-      })
-        .then((res) => {
-          console.log("🚀 ~ loginWithDingTalkH5 ~ res:", res);
-          handleLoginSuccess(res);
-        })
-        .catch((err) => {
-          console.log("🚀 ~ loginWithDingTalkH5 ~ err:", err);
-        });
-    },
-    fail: (err) => {
-      console.log("🚀 ~ loginWithDingTalkH5 ~ err:", err);
-      uni.showToast({
-        title: "获取code失败:" + JSON.stringify(err),
-        icon: "none",
-      });
-    },
-  });
 };
 
 onLoad(async (options) => {
@@ -340,7 +185,7 @@ onLoad(async (options) => {
     "onLoad Login",
     uni.getLocale(),
     11,
-    uni.getStorageSync("language"),
+    uni.getStorageSync("language")
   );
 
   console.log(options);
@@ -364,25 +209,6 @@ onLoad(async (options) => {
     dingTalkAutoLogin();
   }
   // #endif
-  // 保存钉钉消息传递的参数
-  if (options.userId) {
-    uni.setStorageSync("dingTalkJson", JSON.stringify(options));
-    const isLoggedIn = uni.getStorageSync("userId");
-    if (!isLoggedIn) {
-      const result = await getTokenByUserId(options.userId);
-      await handleLoginSuccess(result);
-    }
-  }
-  // #ifdef H5
-  // 当前环境为H5时,判断是否是通过钉钉微应用打开的链接
-  // 获取当前Url地址
-  const url = window.location.href;
-  console.log("当前环境为H5时 当前Url地址:", url);
-  // 判断是否是通过钉钉微应用打开的链接
-  if (url.includes("/deepoil")) {
-    dingTalkAutoLogin();
-  }
-  // #endif
 });
 
 onMounted(() => {
@@ -403,13 +229,10 @@ onMounted(() => {
   }
 });
 
-const placeholderStyle = ref("color:#797979;font-weight:500;font-size:16px");
 const placeholderStyle = ref("color:#797979;font-weight:500;font-size:16px");
 const inputStyles = reactive({
   backgroundColor: "#F0F3FB",
   color: "#797979",
-  backgroundColor: "#F0F3FB",
-  color: "#797979",
 });
 const loginData = reactive({
   username: "",
@@ -432,169 +255,59 @@ const loginRules = ref({
       },
     ],
   },
-  username: {
-    rules: [
-      {
-        required: true,
-        errorMessage: t("login.enterUsername"),
-      },
-    ],
-  },
-  password: {
-    rules: [
-      {
-        required: true,
-        errorMessage: t("login.enterPassword"),
-      },
-    ],
-  },
 });
 
 const formRef = ref();
 const formSubmit = async (formEl) => {
-  // if (!my_value.value) {
-  // 	uni.showToast({
-  // 		title: '请阅读并同意隐私政策和用户服务协议',
-  // 		icon: 'none', // 可选 success/error/loading/none
-  // 		duration: 2000, // 持续时间,单位ms
-  // 		mask: true // 是否显示透明蒙层,防止触摸穿透
-  // 	});
-  // if (!my_value.value) {
-  // 	uni.showToast({
-  // 		title: '请阅读并同意隐私政策和用户服务协议',
-  // 		icon: 'none', // 可选 success/error/loading/none
-  // 		duration: 2000, // 持续时间,单位ms
-  // 		mask: true // 是否显示透明蒙层,防止触摸穿透
-  // 	});
-
-  // 	return;
-  // }
-  if (!formEl) return;
-  await formEl
-    .validate()
-    .then((res) => {
-      appLogin({
-        ...loginData,
-        // rememberMe: ,
-        // tenantName: ""
-      })
-        .then(async (result) => {
-          console.log("result,", result.data);
-          if (result) {
-            await saveUser({
-              name: loginData.username,
-              pwd: loginData.password,
-            });
-            await handleLoginSuccess(result);
-          }
-        })
-        .finally(() => {});
-    })
-    .catch((err) => {
-      console.log("err", err);
-    });
-  // 	return;
-  // }
   if (!formEl) return;
-  await formEl
-    .validate()
-    .then((res) => {
-      appLogin({
-        ...loginData,
-        // rememberMe: ,
-        // tenantName: ""
-      })
-        .then(async (result) => {
-          console.log("result,", result.data);
-          if (result) {
-            await saveUser({
-              name: loginData.username,
-              pwd: loginData.password,
-            });
-            await handleLoginSuccess(result);
-          }
-        })
-        .finally(() => {});
-    })
-    .catch((err) => {
-      console.log("err", err);
+
+  try {
+    await formEl.validate();
+    const result = await appLogin({ ...loginData });
+
+    if (!result) return;
+
+    console.log("result,", result.data);
+    await saveUser({
+      name: loginData.username,
+      pwd: loginData.password,
     });
+    await handleLoginSuccess(result);
+  } catch (err) {
+    console.log("err", err);
+  }
 };
 
 const handleLoginSuccess = async (result) => {
-  if (result) {
-    await setUserId(result.data.userId);
-    await setToken(result.data);
-    await getInfo().then(async (res) => {
-      // console.log('useres', res)
-      const data = JSON.stringify({
-        user: res.data.user,
-        roles: res.data.roles,
-      });
-      // console.log('data', data)
-      await setUserInfo(data);
-      await setDeptId(res.data.user.deptId);
-  if (result) {
-    await setUserId(result.data.userId);
-    await setToken(result.data);
-    await getInfo().then(async (res) => {
-      // console.log('useres', res)
-      const data = JSON.stringify({
-        user: res.data.user,
-        roles: res.data.roles,
-      });
-      // console.log('data', data)
-      await setUserInfo(data);
-      await setDeptId(res.data.user.deptId);
+  if (!result) return;
 
-      await uni.switchTab({
-        url: "/pages/entry/index",
-      });
-    });
-  }
+  await setUserId(result.data.userId);
+  await setToken(result.data);
+
+  const res = await getInfo();
+  const data = JSON.stringify({
+    user: res.data.user,
+    roles: res.data.roles,
+  });
+
+  await setUserInfo(data);
+  await setDeptId(res.data.user.deptId);
+  await uni.switchTab({
+    url: "/pages/entry/index",
+  });
 };
 </script>
 
 <style lang="scss" scoped>
-.privacy {
-  height: 60vh;
-  width: 85vw;
-  overflow: hidden;
-  height: 60vh;
-  width: 85vw;
-  overflow: hidden;
-}
-
-.uni-padding-wrap {
-  display: flex;
-  z-index: 999;
-  justify-content: center;
-  align-items: center;
-  padding: 0 10rpx;
-  display: flex;
-  z-index: 999;
-  justify-content: center;
-  align-items: center;
-  padding: 0 10rpx;
-}
-.uni-title {
-  font-size: 12px;
-  font-size: 12px;
-}
 .login-top {
   position: relative;
   width: 100%;
   height: 422rpx;
-  position: relative;
-  width: 100%;
-  height: 422rpx;
 }
 
 .back-img {
   width: 100%;
   height: 100%;
-  width: 100%;
-  height: 100%;
 }
 
 .login-text {
@@ -612,20 +325,6 @@ const handleLoginSuccess = async (result) => {
   display: flex;
   justify-content: center;
   flex-direction: column;
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  position: absolute;
-  top: 0;
-  left: 0;
-  color: #ffffff;
-  font-size: 40rpx;
-  font-family: "Negreta,PingFang SC";
-  font-weight: 600;
-  padding: 0 56rpx;
-  display: flex;
-  justify-content: center;
-  flex-direction: column;
 
   .text {
     width: 100%;

+ 1 - 0
utils/hot-update.js

@@ -431,6 +431,7 @@ const confirmHotUpdate = (payload) => {
  * - resolve(tempFilePath) 返回下载到本地后的临时文件路径。
  */
 const downloadWgtPackage = (wgtUrl) => {
+  console.log("wgtUrl :>> ", wgtUrl);
   return new Promise((resolve, reject) => {
     uni.showLoading({
       title: "下载更新中",