Handy_Cao hace 1 año
padre
commit
76b0a59b79

+ 8 - 1
src/packages/mobile/views/swap/detail/Index.vue

@@ -51,6 +51,7 @@ import { useLoginStore, useUserStore } from '@/stores'
 import AppList from '@mobile/components/base/list/index.vue'
 import { getUserId } from '@/services/methods/user'
 import { formatDecimal } from '@/filters'
+import { onActivated } from 'vue'
 
 const Price = defineAsyncComponent(() => import('@mobile/components/modules/quote/price/index.vue'))
 const Chart = defineAsyncComponent(() => import('@mobile/components/modules/hqchart/index.vue'))
@@ -74,7 +75,8 @@ const userStore = useUserStore()
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => onRefresh())
 
 /// 查询用户掉期协议签署表
-const { dataList: protocolList } = useRequest(queryMdUserSwapProtocol, {
+const { dataList: protocolList, run: runMdUserSwapProtocol } = useRequest(queryMdUserSwapProtocol, {
+    manual: true,
     params: {
         userId: getUserId()
     }
@@ -163,4 +165,9 @@ const onListing = () => {
     openComponent('listing')
 }
 
+onActivated(() => {
+    /// 查询
+    runMdUserSwapProtocol()
+})
+
 </script>

+ 3 - 3
src/packages/thj/views/account/protocol/Index.vue

@@ -26,7 +26,7 @@ import { CellGroup, Cell, showFailToast, showToast } from 'vant'
 import { fullloading } from '@/utils/vant';
 import { useNavigation } from '@mobile/router/navigation'
 import { useRequest } from '@/hooks/request'
-import { queryTencentUsereSignRecords, requestInitTencentESS } from '@/services/api/account';
+import { queryTencentUsereSignRecords, requestInitMdUserSwapProtocol } from '@/services/api/account';
 import { useRequestCreateFlowByTemplateDirectly } from '@/business/user/account';
 import plus from '@/utils/h5plus'
 import { getUserId } from '@/services/methods/user'
@@ -55,13 +55,13 @@ const { run } = useRequest(queryTencentUsereSignRecords, {
             dataList.value = res.data
         }  else {
             /// 创建电子签合同
-            initTencentESS()
+            initMdUserSwapProtocol()
         }
     }
 })
 
 /// 创建电子签合同
-const { run: initTencentESS } = useRequest(requestInitTencentESS, {
+const { run: initMdUserSwapProtocol } = useRequest(requestInitMdUserSwapProtocol, {
     manual: true,
     params: {
         userId: getUserId(),