li.shaoyi 1 vuosi sitten
vanhempi
commit
a4f10d943d

+ 1 - 0
.gitignore

@@ -1,5 +1,6 @@
 .DS_Store
 node_modules
+/dist
 /app/dist
 /app/dist_electron
 

+ 2 - 2
oem/zrwyt/config/appconfig.json

@@ -1,8 +1,8 @@
 {
   "appId": "com.muchinfo.zrwyt",
   "appName": "中融文遗通",
-  "version": "1.0.20",
-  "versionCode": "100020",
+  "version": "1.0.21",
+  "versionCode": "100021",
   "apiUrl": "http://192.168.31.134:8080/cfg?key=test_134",
   "tradeChannel": "ws",
   "modules": [

+ 5 - 1
src/packages/mobile/views/error/404.vue

@@ -1,3 +1,7 @@
 <template>
-    <div>404</div>
+    <app-view>
+        <template #header>
+            <app-navbar title="404"></app-navbar>
+        </template>
+    </app-view>
 </template>

+ 1 - 9
src/packages/sbyj/views/home/index.vue

@@ -64,15 +64,7 @@ const onTabClick = (index: number) => {
   if (name !== 'home-mine' || loginStore.token) {
     routerTo(name, true)
   } else {
-    fullloading((hideLoading) => {
-      userLogin(true).then(() => {
-        routerTo(name, true)
-      }).catch(() => {
-        routerTo('user-login')
-      }).finally(() => {
-        hideLoading()
-      })
-    }, '加载中...')
+    routerTo('user-login')
   }
 }
 

+ 9 - 14
src/packages/zrwyt/views/account/protocol/Index.vue

@@ -14,8 +14,7 @@
             </CellGroup>
             <CellGroup inset>
                 <template v-for="(item, index) in dataList" :key="index">
-                    <Cell :title="item.templatename" :icon="iconName(item.recordstatus)" @click="signer(item)"
-                        is-link />
+                    <Cell :title="item.templatename" :icon="iconName(item.recordstatus)" @click="signer(item)" is-link />
                 </template>
             </CellGroup>
         </div>
@@ -28,7 +27,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
+import { shallowRef, onMounted } from 'vue'
 import { CellGroup, Cell, showFailToast, showToast } from 'vant'
 import { fullloading, dialog } from '@/utils/vant';
 import { useNavigation } from '@mobile/router/navigation'
@@ -40,10 +39,8 @@ import { getUserId } from '@/services/methods/user'
 import { useUserStore } from '@/stores'
 import { decryptAES } from '@/services/websocket/package/crypto'
 import eventBus from '@/services/bus'
-import { investorDel, modifyPassword, requestAddAuth, requestAddUser, requestBankCard4, requestCaptcaResend, requestCaptchaVerify, requestCreateContract, requestCreateContractAndAddSigner, requestCreateFlowByTemplateDirectly, requestSignCompleted, requestWillFace } from '@/services/api/account'
 
-
-const { getQueryStringToNumber, router } = useNavigation()
+const { getQueryStringToNumber } = useNavigation()
 /// 所属机构
 const memberUserId = getQueryStringToNumber('memberUserId')
 /// userStore
@@ -53,7 +50,7 @@ const { createTemplate, createFormData } = useRequestCreateContract()
 /// 电子签合同信息
 const dataList = shallowRef<Model.UsereSignRecordsRsq[]>([])
 /// 用户信息
-const { customername, cardnum, bankaccount, bankbankname, mobile2 } =  userStore.userInfo
+const { customername, cardnum, bankaccount, bankbankname, mobile2 } = userStore.userInfo
 /// 查询
 const { run } = useRequest(queryUsereSignRecords, {
     params: {
@@ -64,7 +61,7 @@ const { run } = useRequest(queryUsereSignRecords, {
     onSuccess: (res) => {
         if (res.data != null && res.data.length != 0) {
             dataList.value = res.data
-        } 
+        }
     }
 })
 
@@ -106,10 +103,10 @@ const signer = (item: Model.UsereSignRecordsRsq) => {
                 /// 更新数据
                 run()
                 dialog({
-                    message: '立即签署协议!',
+                    message: '是否立即签署协议?',
                     showCancelButton: true,
                     cancelButtonText: '暂不签署',
-                    confirmButtonText: '签署'
+                    confirmButtonText: '立即签署'
                 }).then(() => {
                     openWebview(res.data.signUrl)
                 })
@@ -127,9 +124,7 @@ const documentVisibilityStateNotify = eventBus.$on('DocumentVisibilityStateNotif
     }
 })
 
-const onClose = () => {
-    router.back()
+onMounted(() => {
     documentVisibilityStateNotify.cancel()
-}
-
+})
 </script>

+ 7 - 5
src/services/bus/index.ts

@@ -1,19 +1,20 @@
 import { v4 } from 'uuid'
-import { EventKey, EventMessage } from './types'
+import { EventKey, MessageEvent } from './types'
 
 /**
  * 事件总线
  */
 export default new (class {
-    private eventMap = new Map<string, EventMessage>();
+    private eventMap = new Map<string, MessageEvent>();
 
-    /** 订阅事件 */
-    $on(eventKey: EventKey | EventKey[], callback: EventMessage['callback']) {
+    /** 监听事件 */
+    $on(eventKey: EventKey | EventKey[], callback: MessageEvent['callback'], once = false) {
         const uuid = v4();
         const keys = Array.isArray(eventKey) ? eventKey : [eventKey];
 
         this.eventMap.set(uuid, {
             keys,
+            once,
             callback
         })
 
@@ -26,9 +27,10 @@ export default new (class {
 
     /** 触发事件 */
     $emit(eventKey: EventKey, ...data: unknown[]) {
-        for (const e of this.eventMap.values()) {
+        for (const [uuid, e] of this.eventMap.entries()) {
             if (e.keys.includes(eventKey)) {
                 e.callback(...data);
+                e.once && this.eventMap.delete(uuid);
             }
         }
     }

+ 5 - 4
src/services/bus/types.ts

@@ -1,7 +1,7 @@
 /**
- * 事件码
+ * 消息名称
  */
-export enum EventCode {
+export enum MessageName {
     DocumentVisibilityStateNotify, // 窗口页面状态通知
     QuotePushNotify, // 行情推送通知
     QuoteServerStatusNotify, // 行情服务连接状态通知
@@ -23,12 +23,13 @@ export enum EventCode {
 /**
  * 事件key
  */
-export type EventKey = keyof typeof EventCode
+export type EventKey = keyof typeof MessageName
 
 /**
  * 事件消息
  */
-export interface EventMessage {
+export interface MessageEvent {
     keys: EventKey[];
+    once: boolean; // 是否只触发一次
     callback: (...data: unknown[]) => void;
 }