wangtao 6 tháng trước cách đây
mục cha
commit
8ca6888e1d
37 tập tin đã thay đổi với 117 bổ sung24 xóa
  1. 43 0
      src/components/baPing/index.vue
  2. 2 1
      src/config.js
  3. 2 0
      src/main.js
  4. 7 7
      src/manifest.json
  5. 1 0
      src/pages/business/common/projectMange/record/details.vue
  6. 1 0
      src/pages/business/common/projectMange/record/index.vue
  7. 1 0
      src/pages/business/zhaf/signIn/index.vue
  8. 1 0
      src/pages/business/zhaf/xunJian/collect/components/collectDetail.vue
  9. 1 0
      src/pages/business/zhaf/xunJian/collect/components/collectRecord.vue
  10. 1 0
      src/pages/business/zhaf/xunJian/collect/index.vue
  11. 1 0
      src/pages/business/zhaf/xunJian/error/errorDisposition.vue
  12. 1 0
      src/pages/business/zhaf/xunJian/error/errorList.vue
  13. 1 0
      src/pages/business/zhaf/xunJian/error/errorListDetail.vue
  14. 1 0
      src/pages/business/zhaf/xunJian/error/index.vue
  15. 1 0
      src/pages/business/zhaf/xunJian/plan/components/content.vue
  16. 1 0
      src/pages/business/zhaf/xunJian/plan/components/report.vue
  17. 1 0
      src/pages/business/zhaf/xunJian/plan/components/siteDetails.vue
  18. 1 0
      src/pages/business/zhaf/xunJian/plan/index.vue
  19. 1 0
      src/pages/business/zhaf/xunJian/record/index.vue
  20. 1 0
      src/pages/business/zhaf/xunJian/xunJian.vue
  21. 6 2
      src/pages/common/appMessage/details.vue
  22. 1 0
      src/pages/common/appMessage/index.vue
  23. 1 0
      src/pages/common/textview/index.vue
  24. 0 1
      src/pages/index.vue
  25. 1 0
      src/pages/info.vue
  26. 4 2
      src/pages/login.vue
  27. 1 0
      src/pages/mine.vue
  28. 1 0
      src/pages/mine/about/index.vue
  29. 1 0
      src/pages/mine/avatar/index.vue
  30. 1 0
      src/pages/mine/help/index.vue
  31. 1 0
      src/pages/mine/info/index.vue
  32. 1 0
      src/pages/mine/msg/index.vue
  33. 1 0
      src/pages/mine/secure/fingerprint/index.vue
  34. 1 0
      src/pages/mine/secure/index.vue
  35. 1 0
      src/pages/mine/secure/loginLog/index.vue
  36. 24 10
      src/plugins/keyListen.plugins.js
  37. 1 1
      src/store/modules/xunJian.js

+ 43 - 0
src/components/baPing/index.vue

@@ -0,0 +1,43 @@
+<template>
+  <div class="homeReturn" @touchstart="handle('start')" @touchend="handle('end')" v-if="config.appInfo.appid == '__UNI__BF1A1F0'"></div>
+</template>
+<script setup>
+/*----------------------------------公共方法引入-----------------------------------*/
+import config from "@/config";
+import { xunJianStores } from "@/store/modules/index";
+import { ref } from "vue";
+const timestamp = ref(0);
+function handle(type) {
+  if (type =='start') {
+    timestamp.value = new Date().getTime();
+  }
+  if (type =='end') {
+    if(new Date().getTime() - timestamp.value >3000){
+      uni.showModal({
+        title:"提示",
+        editable:true,
+        placeholderText:"请输入霸屏退出密码",
+        success(res) {
+            if (res.confirm) {
+                xunJianStores().modal.exitPassword = res.content
+                xunJianStores().modalConfirm()
+            } else if (res.cancel) {
+                console.log('用户点击了取消');
+            }
+        }
+      })
+    }
+  }
+}
+</script>
+<style>
+.homeReturn{
+  position: fixed;
+  z-index: 1000;
+  top:4px;
+  right:80px;
+  width:50px;
+  height:50px;
+  background: red;
+}
+</style>

+ 2 - 1
src/config.js

@@ -9,7 +9,8 @@ export default {
   //#endif
 
   //#ifdef H5
-  baseUrl: import.meta.env.MODE === "production" ? `https://${window.location.host}/prod-api` : `http://192.168.123.165:801/dev-api`,
+  // baseUrl: import.meta.env.MODE === "production" ? `https://${window.location.host}/prod-api` : `http://192.168.10.165:801/dev-api`,
+  baseUrl: "https://gateWay.usky.cn/prod-api",
   //#endif
 
   websiteUrl: "https://qhome.usky.cn",

+ 2 - 0
src/main.js

@@ -21,6 +21,7 @@ import oaUpgrade from "@/components/oa-upgrade/index"
 import oaTransForm from "@/components/oa-transForm/index"
 import oaTtsAudio from "@/components/oa-ttsAudio/index"
 import oaWeather from "@/components/oa-weather/index"
+import baPing from "@/components/baPing/index"
 
 export function createApp() {
   const app = createSSRApp(App);
@@ -38,6 +39,7 @@ export function createApp() {
   app.component('oa-transForm', oaTransForm)
   app.component('oa-ttsAudio', oaTtsAudio)
   app.component('oa-weather', oaWeather)
+  app.component('baPing', baPing)
   
 
   // 挂载全局json导出

+ 7 - 7
src/manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "综合智慧云",
-    "appid" : "__UNI__36DE3A0",
-    "description" : "综合智慧云APP,是一款助力于企业数字化的应用平台,帮助企业提升办公效率,实现组织数字化和业务数字化。",
-    "versionName" : "2.2.4",
-    "versionCode" : 24,
+    "name" : "智能巡更",
+    "appid" : "__UNI__BF1A1F0",
+    "description" : "智能巡更app,是一款用于监督和记录巡逻人员按照预定路线和时间进行巡逻的系统。",
+    "versionName" : "2.2.0",
+    "versionCode" : 20,
     "transformPx" : false,
     "app-plus" : {
         "compatible" : {
@@ -191,7 +191,7 @@
             "checkSiteMap" : false
         },
         "usingComponents" : true,
-        "navigateToMiniProgramAppIdList":["wxf5ad8734295d43f8"]
+        "navigateToMiniProgramAppIdList" : [ "wxf5ad8734295d43f8" ]
     },
     "mp-alipay" : {
         "usingComponents" : true
@@ -207,7 +207,7 @@
     },
     "h5" : {
         "publicPath" : "./",
-        "title" : "综合智慧云",
+        "title" : "智能巡更",
         "router" : {
             "mode" : "hash"
         },

+ 1 - 0
src/pages/business/common/projectMange/record/details.vue

@@ -101,6 +101,7 @@
       </view>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/common/projectMange/record/index.vue

@@ -179,6 +179,7 @@
     @cancel="modal.show = false"
     @close="modal.show = false"
   ></u-modal>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/signIn/index.vue

@@ -28,6 +28,7 @@
       </view>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/collect/components/collectDetail.vue

@@ -28,6 +28,7 @@
       </view>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/collect/components/collectRecord.vue

@@ -47,6 +47,7 @@
       </view>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/collect/index.vue

@@ -75,6 +75,7 @@
       </uni-popup>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/error/errorDisposition.vue

@@ -32,6 +32,7 @@
       </view>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/error/errorList.vue

@@ -39,6 +39,7 @@
       </view>
     </view>
   </oa-scroll>
+  <baPing />
 </template>
 <script setup>
 /*----------------------------------依赖引入-----------------------------------*/

+ 1 - 0
src/pages/business/zhaf/xunJian/error/errorListDetail.vue

@@ -127,6 +127,7 @@
       </view>
     </view>
   </oa-scroll>
+  <baPing />
 </template>
 <script setup>
 /*----------------------------------依赖引入-----------------------------------*/

+ 1 - 0
src/pages/business/zhaf/xunJian/error/index.vue

@@ -57,6 +57,7 @@
       ></u-picker>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/plan/components/content.vue

@@ -86,6 +86,7 @@
       <oa-ttsAudio v-if="audioUrl" :audioUrl="audioUrl" :audioBool="true"></oa-ttsAudio>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/plan/components/report.vue

@@ -69,6 +69,7 @@
       </oaMovable>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/plan/components/siteDetails.vue

@@ -68,6 +68,7 @@
       </view>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/plan/index.vue

@@ -122,6 +122,7 @@
       <drawer v-if="scanArray.length > 0" :scanArray="scanArray" :scanBool="scanBool" @scanClose="scanClose"></drawer>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/record/index.vue

@@ -22,6 +22,7 @@
       </view>
     </view>
   </view>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/business/zhaf/xunJian/xunJian.vue

@@ -33,6 +33,7 @@
       </view>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 6 - 2
src/pages/common/appMessage/details.vue

@@ -4,12 +4,13 @@
       <view class="uni-body view-content">{{ data?.infoContent || "" }}</view>
       <text class="uni-body view-time">{{ data?.createTime ? data.createTime.replace("T", " ") : "" }}</text>
     </uni-card>
+    <baPing />
   </view>
 </template>
 
 <script setup>
 /*----------------------------------依赖引入-----------------------------------*/
-import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
+import { onReady, onLoad, onShow, onNavigationBarButtonTap, onBackPress } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
 /*----------------------------------接口引入-----------------------------------*/
 import { getMceList } from "@/api/mine/info.js";
@@ -30,7 +31,10 @@ function init(options) {
     data.value = requset.data.records[0];
   });
 }
-
+onBackPress((event) => {
+  console.log("backbutton",new Date().getTime())
+  uni.setStorageSync("backbutton", "top");
+})
 onLoad((options) => {
   init(options);
 });

+ 1 - 0
src/pages/common/appMessage/index.vue

@@ -35,6 +35,7 @@
       </view>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/common/textview/index.vue

@@ -4,6 +4,7 @@
     <h3 style="text-align: center; line-height: 45px">{{ state.contentTitle }}</h3>
     <view>{{ state.content }}</view>
   </view>
+  <baPing />
 </template>
 
 <script setup>

+ 0 - 1
src/pages/index.vue

@@ -110,7 +110,6 @@ const state = reactive({
 });
 
 const { dialogFlag } = toRefs(state);
-
 /**
  * @初始化
  */

+ 1 - 0
src/pages/info.vue

@@ -56,6 +56,7 @@
   </oa-scroll>
 
   <oa-tabbar :tabbarValue="1" :tabbarList="proxy.$constData.homeTabbar"></oa-tabbar>
+  <baPing />
 </template>
 
 <script setup>

+ 4 - 2
src/pages/login.vue

@@ -40,7 +40,7 @@
       <view class="middle-switch">
         <text class="switch-loginMethod" @click="switchMode(1)">{{ switchText === "验证码登录" ? "账号密码登录" : "验证码登录" }}</text>
         <view style="margin: auto"></view>
-        <text class="switch-register" @click="switchMode(2)">注册账号</text>
+        <text class="switch-register" @click="switchMode(2)" v-if="config.appInfo.appid === '__UNI__BF1A1F0'">注册账号</text>
       </view>
       <!--#endif-->
 
@@ -91,6 +91,7 @@
       </view>
     </view>
   </u-modal>
+  <baPing />
 </template>
 
 <script setup>
@@ -183,8 +184,9 @@ function init() {
 
   if (window.location.host) {
     linkUrl.value = window.location.host;
-    // linkUrl.value = "192.168.123.165:13200";
+    // linkUrl.value = "192.168.10.165:13200";
     // linkUrl.value = "localhost:81";
+    linkUrl.value = "xf.usky.cn:13212";
     useStore.GetMobileTenantConfig({ url: linkUrl.value });
   }
   //#endif

+ 1 - 0
src/pages/mine.vue

@@ -174,6 +174,7 @@
   <oa-upgrade ref="oaUpgradeRef" :themesColor="proxy.$settingStore.themeColor.color" />
 
   <oa-tabbar :tabbarValue="2" :tabbarList="proxy.$constData.homeTabbar"></oa-tabbar>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/mine/about/index.vue

@@ -50,6 +50,7 @@
       <u-text :text="filingInfo.code" :href="filingInfo.href" mode="link" align="center" size="12"></u-text>
     </view>
   </view>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/mine/avatar/index.vue

@@ -44,6 +44,7 @@
       <canvas canvas-id="myCanvas" :style="'position:absolute;border: 1px solid red; width:' + imageW + 'px;height:' + imageH + 'px;top:-9999px;left:-9999px;'"></canvas>
     </view>
   </view>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/mine/help/index.vue

@@ -24,6 +24,7 @@
       </view>
     </view>
   </view>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/mine/info/index.vue

@@ -129,6 +129,7 @@
       </view>
     </view>
   </u-modal>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/mine/msg/index.vue

@@ -12,6 +12,7 @@
       </view>
     </view>
   </view>
+  <baPing />
 </template>
 <script setup>
 /*----------------------------------依赖引入-----------------------------------*/

+ 1 - 0
src/pages/mine/secure/fingerprint/index.vue

@@ -22,6 +22,7 @@
       </view>
     </view>
   </u-modal>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/mine/secure/index.vue

@@ -110,6 +110,7 @@
       </view>
     </view>
   </u-modal>
+  <baPing />
 </template>
 
 <script setup>

+ 1 - 0
src/pages/mine/secure/loginLog/index.vue

@@ -38,6 +38,7 @@
       </view>
     </template>
   </oa-scroll>
+  <baPing />
 </template>
 
 <script setup>

+ 24 - 10
src/plugins/keyListen.plugins.js

@@ -15,16 +15,30 @@ export default {
         let main = plus.android.runtimeMainActivity();
         that.openListen();
         if (needStopSystem) {
-            plus.key.addEventListener("backbutton", function (e) {
-                // main.stopLockTask()//按返回键恢复
-                // main.startLockTask()//阻止系统home建和近期任务键
-                // main.unregisterReceiver(receiver); //同时停止接收home和recent点击
-                const pages = getCurrentPages(); // 获取当前页面栈
-                const currentPage = pages[pages.length - 1]; // 最后一个元素即为当前页面
-                xunJianStores().modal.show = currentPage.route === 'pages/login' ? true : false
-                console.log('监听返回')
-                e.preventDefault();
-            });
+            // if(plus.os.name == "Android"){
+                plus.key.addEventListener("backbutton", function (e) {
+                    let that2 = e
+                    setTimeout(()=>{
+                        console.log(1,new Date().getTime(),e)
+                        if(!uni.getStorageSync("backbutton")){
+                            uni.setStorageSync("backbutton","bottom")
+                        }
+                        // console.log(2)
+                        if(uni.getStorageSync("backbutton") == "bottom"){
+                            // main.stopLockTask()//按返回键恢复
+                            // main.startLockTask()//阻止系统home建和近期任务键
+                            // main.unregisterReceiver(receiver); //同时停止接收home和recent点击
+                            console.log('监听物理返回')
+                            that2.preventDefault();
+                        }else{
+                            console.log('监听组件返回')
+                            uni.setStorageSync("backbutton","bottom")
+                        }
+                    })
+                    
+                },false);
+            // }
+            
         } else {
         }
 

+ 1 - 1
src/store/modules/xunJian.js

@@ -24,7 +24,7 @@ const xunJianStores = defineStore(`storage-xunJian`, {
     modal: {
       show: false,
       exitPassword: "",
-      newExitPassword: "Usky-1707",//系统退出密码
+      newExitPassword: "123456",//系统退出密码
     }
   }),
   unistorage: true,