From 7eb002b8aa27e616b8b98074bee97861ea922451 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期二, 09 九月 2025 14:48:29 +0800 Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp --- packages/services/apiV2/enterpriseWallet.ts | 15 +++++++ apps/cMiniApp/src/subpackages/mine/mineAgreementSignDetail/InnerPage.vue | 27 +++++++------ apps/cMiniApp/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue | 6 +-- apps/cMiniApp/.eslintrc-auto-import.json | 3 + apps/cMiniApp/config/prod.js | 1 apps/cMiniApp/src/subpackages/login/registerForm/registerForm.vue | 5 +- apps/cMiniApp/auto-imports.d.ts | 2 + packages/utils/message.tsx | 3 + apps/cMiniApp/src/constants/app.ts | 2 + packages/services/apiV2/typings.d.ts | 25 ++++++++++++ apps/cMiniApp/config/dev.js | 1 packages/constants/apiEnum.ts | 16 ++++++++ apps/cMiniApp/src/pages/mine/index.vue | 6 ++- 13 files changed, 89 insertions(+), 23 deletions(-) diff --git a/apps/cMiniApp/.eslintrc-auto-import.json b/apps/cMiniApp/.eslintrc-auto-import.json index a8acf55..4ef9371 100644 --- a/apps/cMiniApp/.eslintrc-auto-import.json +++ b/apps/cMiniApp/.eslintrc-auto-import.json @@ -105,6 +105,7 @@ "watchSyncEffect": true, "useUpdateResume": true, "useAccessReal": true, - "useLaunchOptions": true + "useLaunchOptions": true, + "APP_ENV": true } } diff --git a/apps/cMiniApp/auto-imports.d.ts b/apps/cMiniApp/auto-imports.d.ts index 6ec898a..6ba5ad4 100644 --- a/apps/cMiniApp/auto-imports.d.ts +++ b/apps/cMiniApp/auto-imports.d.ts @@ -5,6 +5,7 @@ // Generated by unplugin-auto-import export {} declare global { + const APP_ENV: typeof import('./src/constants/app')['APP_ENV'] const AppLocalConfig: typeof import('./src/constants/app')['AppLocalConfig'] const BackType: typeof import('./src/constants/enum')['BackType'] const EffectScope: typeof import('vue')['EffectScope'] @@ -119,6 +120,7 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { + readonly APP_ENV: UnwrapRef<typeof import('./src/constants/app')['APP_ENV']> readonly AppLocalConfig: UnwrapRef<typeof import('./src/constants/app')['AppLocalConfig']> readonly BackType: UnwrapRef<typeof import('./src/constants/enum')['BackType']> readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> diff --git a/apps/cMiniApp/config/dev.js b/apps/cMiniApp/config/dev.js index 90b4816..bf3e92a 100644 --- a/apps/cMiniApp/config/dev.js +++ b/apps/cMiniApp/config/dev.js @@ -5,6 +5,7 @@ NODE_ENV: '"development"', BASE_URL: '"http://localhost:53780"', BASE_URL_JX: '"https://api.jx818.com"', + APP_ENV: '"development"', OSS_URL: '"https://waterdroptest2.oss-cn-hangzhou.aliyuncs.com/"', WEMAP_KEY: 'T2UBZ-N563J-ZCHFF-XDOXN-VCH7S-CJB2T', diff --git a/apps/cMiniApp/config/prod.js b/apps/cMiniApp/config/prod.js index 58c9cd5..53a2a6c 100644 --- a/apps/cMiniApp/config/prod.js +++ b/apps/cMiniApp/config/prod.js @@ -3,6 +3,7 @@ NODE_ENV: '"production"', BASE_URL: '"https://lgdapi.81812333.com"', BASE_URL_JX: '"https://lgdapi.jx818.com"', + APP_ENV: '"production"', OSS_URL: '"https://parkmanagement.oss-cn-hangzhou.aliyuncs.com"', diff --git a/apps/cMiniApp/src/constants/app.ts b/apps/cMiniApp/src/constants/app.ts index 0d00408..fb95289 100644 --- a/apps/cMiniApp/src/constants/app.ts +++ b/apps/cMiniApp/src/constants/app.ts @@ -4,3 +4,5 @@ userType: EnumUserType.Personal, clientType: EnumClientType.Wxmp, }; + +export const APP_ENV = process.env.APP_ENV; diff --git a/apps/cMiniApp/src/pages/mine/index.vue b/apps/cMiniApp/src/pages/mine/index.vue index 74f192b..0804ffb 100644 --- a/apps/cMiniApp/src/pages/mine/index.vue +++ b/apps/cMiniApp/src/pages/mine/index.vue @@ -120,9 +120,11 @@ const { goLoginFn } = useGoLogin(); const bgHeight = computed(() => 133 + systemStore.navHeight); -Taro.useDidShow(() => { +Taro.useDidShow(({ scene }) => { if (isLogin.value) { - updateUserInfo(); + setTimeout(() => { + updateUserInfo(); + }, 300); } }); diff --git a/apps/cMiniApp/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue b/apps/cMiniApp/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue index 0a234f5..6c4c260 100644 --- a/apps/cMiniApp/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue +++ b/apps/cMiniApp/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue @@ -40,6 +40,7 @@ import { useUserStore } from '@/stores/modules/user'; import Taro from '@tarojs/taro'; import * as authServices from '@12333/services/apiV2/auth'; +import { APP_ENV } from '@/constants'; defineOptions({ name: 'verificationCodeLoginForm', @@ -78,13 +79,10 @@ }, { showLoading: false, getResponse: true } ); - - if (res && process.env.APP_ENV === 'staging') { + if (res && APP_ENV === 'staging') { // @ts-ignore form.verificationCode = res?.data?.extras?.code ?? ''; } - // @ts-ignore - return res?.data?.data; } async function handleLogin() { diff --git a/apps/cMiniApp/src/subpackages/login/registerForm/registerForm.vue b/apps/cMiniApp/src/subpackages/login/registerForm/registerForm.vue index f2e14fb..d30a855 100644 --- a/apps/cMiniApp/src/subpackages/login/registerForm/registerForm.vue +++ b/apps/cMiniApp/src/subpackages/login/registerForm/registerForm.vue @@ -62,6 +62,7 @@ import Taro from '@tarojs/taro'; import { ResponseCode } from '@12333/constants'; import * as authServices from '@12333/services/apiV2/auth'; +import { APP_ENV } from '@/constants'; defineOptions({ name: 'registerForm', @@ -109,12 +110,10 @@ } ); - if (res && process.env.APP_ENV === 'staging') { + if (res && APP_ENV === 'staging') { // @ts-ignore form.verificationCode = res?.data?.extras?.code ?? ''; } - // @ts-ignore - return res?.data?.data; } async function handleRegister() { diff --git a/apps/cMiniApp/src/subpackages/mine/mineAgreementSignDetail/InnerPage.vue b/apps/cMiniApp/src/subpackages/mine/mineAgreementSignDetail/InnerPage.vue index 4f6e1e2..8d607b3 100644 --- a/apps/cMiniApp/src/subpackages/mine/mineAgreementSignDetail/InnerPage.vue +++ b/apps/cMiniApp/src/subpackages/mine/mineAgreementSignDetail/InnerPage.vue @@ -130,24 +130,27 @@ const goToSign = useAccessReal(async () => { try { - // if (detail.value?.contractTemplateAccess === EnumElectronSignAccess.BestSign) { let params: API.PersonalUserElectronSignCommand = { id: detail.value?.id, }; let res = await enterpriseEmployeeServices.personalUserElectronSign(params); if (res) { - const encodedUrl = encodeURIComponent(res.signContractLongUrl); - Taro.navigateTo({ url: `${RouterPath.extraPage}?url=${encodedUrl}` }); + if (detail.value?.contractTemplateAccess === EnumElectronSignAccess.AlipaySign) { + try { + await Message.confirm({ + message: `绛剧害鐭俊宸插彂閫佽嚦鎮�${hiddenPhone( + detail.value?.contactPhoneNumber + )}鐨勬墜鏈猴紝璇峰強鏃舵煡鐪嬪苟绛剧害`, + cancelText: '鏈敹鍒扮煭淇�', + }); + } catch (error) { + goToSign(); + } + } else { + const encodedUrl = encodeURIComponent(res.signContractLongUrl); + Taro.navigateTo({ url: `${RouterPath.extraPage}?url=${encodedUrl}` }); + } } - // } - // if (detail.value?.contractTemplateAccess === EnumElectronSignAccess.AlipaySign) { - // Message.confirm({ - // message: `绛剧害鐭俊宸插彂閫佽嚦鎮�${hiddenPhone( - // detail.value?.contactPhoneNumber - // )}鐨勬墜鏈猴紝璇峰強鏃舵煡鐪嬪苟绛剧害`, - // showCancelBtn: false, - // }); - // } } catch (error) {} }); Taro.useDidShow(() => { diff --git a/packages/constants/apiEnum.ts b/packages/constants/apiEnum.ts index c852ec0..22dda89 100644 --- a/packages/constants/apiEnum.ts +++ b/packages/constants/apiEnum.ts @@ -167,6 +167,22 @@ Stop = 999, } +/** 浼佷笟閽卞寘浜ゆ槗鐘舵�� */ +export enum EnumEnterpriseWalletTransactionStatus { + /**寰呮彁浜� */ + WaitSubmit = 1, + /**寰呮敮浠� */ + WaitPay = 10, + /**澶勭悊涓� */ + Dealing = 20, + /**鎴愬姛 */ + Success = 30, + /**閫�绁� */ + Refund = 40, + /**澶辫触 */ + Fail = 50, +} + /** 浼佷笟閽卞寘浜ゆ槗绫诲瀷 */ export enum EnumEnterpriseWalletTransactionType { /**鍏呭�� */ diff --git a/packages/services/apiV2/enterpriseWallet.ts b/packages/services/apiV2/enterpriseWallet.ts index f47a980..b03ba6d 100644 --- a/packages/services/apiV2/enterpriseWallet.ts +++ b/packages/services/apiV2/enterpriseWallet.ts @@ -310,3 +310,18 @@ } ); } + +/** 浼佷笟閽卞寘杞处 POST /api/user/enterpriseWallet/transferEnterpriseWallet */ +export async function transferEnterpriseWallet( + body: API.TransferEnterpriseWalletCommand, + options?: API.RequestConfig +) { + return request<string>('/api/user/enterpriseWallet/transferEnterpriseWallet', { + method: 'POST', + headers: { + 'Content-Type': 'application/json-patch+json', + }, + data: body, + ...(options || {}), + }); +} diff --git a/packages/services/apiV2/typings.d.ts b/packages/services/apiV2/typings.d.ts index 9923d34..bf11281 100644 --- a/packages/services/apiV2/typings.d.ts +++ b/packages/services/apiV2/typings.d.ts @@ -646,6 +646,21 @@ Stop = 999, } + enum EnumEnterpriseWalletTransactionStatus { + /**寰呮彁浜� */ + WaitSubmit = 1, + /**寰呮敮浠� */ + WaitPay = 10, + /**澶勭悊涓� */ + Dealing = 20, + /**鎴愬姛 */ + Success = 30, + /**閫�绁� */ + Refund = 40, + /**澶辫触 */ + Fail = 50, + } + enum EnumEnterpriseWalletTransactionType { /**鍏呭�� */ Recharge = 10, @@ -3366,7 +3381,7 @@ remark?: string; /** 璁㈠崟鏀粯鏃堕棿 */ transDate?: string; - transactionStatus?: EnumWalletTransactionStatus; + transactionStatus?: EnumEnterpriseWalletTransactionStatus; } interface GetExceptionLogsQuery { @@ -5757,6 +5772,14 @@ remark?: string; } + interface TransferEnterpriseWalletCommand { + access?: EnumEnterpriseWalletAccess; + /** 閲戦 */ + amount?: number; + /** 鍏呭�煎娉� */ + remark?: string; + } + interface UpdatePhoneNumberVerifyCodeCommand { /** 鎵嬫満鍙风爜 */ phoneNumber: string; diff --git a/packages/utils/message.tsx b/packages/utils/message.tsx index 1ddf523..fb8abd6 100644 --- a/packages/utils/message.tsx +++ b/packages/utils/message.tsx @@ -25,6 +25,7 @@ title?: string; message?: string | VNode; confirmText?: string; + cancelText?: string; showCancelBtn?: boolean; }; @@ -34,6 +35,7 @@ title = '鎻愮ず', message = '纭畾瑕佸垹闄よ鏁版嵁鍚�?', confirmText = '纭', + cancelText = '鍙栨秷', showCancelBtn = true, } = options; return new Promise((resolve, reject) => { @@ -49,6 +51,7 @@ visible={open.value} content={message} showCancelBtn={showCancelBtn} + cancelText={cancelText} onCancel={() => { onClose(); reject(); -- Gitblit v1.9.1