From 8525b5c780d8855eca89c46790627c00b3d83c79 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 12 三月 2025 17:36:21 +0800 Subject: [PATCH] fix: 二期需求 --- packages/components/src/views/userAccount/EditElectricUserAccount.vue | 17 ++- packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeBaseForm.vue | 19 ++++ packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue | 1 packages/components/src/views/Order/OrderApplyRefundView.vue | 2 packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep1.vue | 23 +++-- packages/components/src/views/userAccount/EditPhoneUserAccount.vue | 17 ++- packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue | 1 packages/components/src/styles/nut.scss | 10 ++ packages/components/src/views/GasBillRecharge/GasBillRechargeStep2.vue | 23 +++-- packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue | 1 packages/services/api/typings.d.ts | 9 + packages/core/src/lifeRecharge.ts | 1 packages/components/src/views/userAccount/EditGasUserAccount.vue | 17 ++- packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep1.vue | 24 ++++-- packages/core/src/lifeRechargeServices.ts | 39 +++++++-- packages/components/src/styles/card.scss | 5 + packages/services/api/LifePay.ts | 4 17 files changed, 149 insertions(+), 64 deletions(-) diff --git a/packages/components/src/styles/card.scss b/packages/components/src/styles/card.scss index ed333a1..c5f3f12 100644 --- a/packages/components/src/styles/card.scss +++ b/packages/components/src/styles/card.scss @@ -65,5 +65,10 @@ .par-account-list { .nut-radio--button { margin-bottom: 20px !important; + + &:last-child { + margin-right: 20px !important; + margin-bottom: 20px !important; + } } } diff --git a/packages/components/src/styles/nut.scss b/packages/components/src/styles/nut.scss index e94c6e9..797cfdc 100644 --- a/packages/components/src/styles/nut.scss +++ b/packages/components/src/styles/nut.scss @@ -168,4 +168,14 @@ .pro-form-item-tips { word-break: break-all; } + + .nut-dialog__header { + height: 44px; + } + + .nut-dialog__footer { + .nut-button--plain { + border-width: 1px; + } + } } diff --git a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep2.vue b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep2.vue index 77f4644..d7051d8 100644 --- a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep2.vue +++ b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep2.vue @@ -1,18 +1,21 @@ <template> <GasBillRechargeBaseForm ref="formRef" v-model:form="preSetForm"> <NutFormItem label="澶囨敞淇℃伅" class="bole-form-item" prop="remark"> - <NutInput - v-model.trim="preSetForm.remark" - class="bole-input-text" + <NutTextarea placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" - type="text" - max-length="30" - /> + placeholderClass="bole-input-text-placeholder" + autoSize + class="bole-input-textarea" + v-model="preSetForm.remark" + :max-length="30" + limit-show + > + </NutTextarea> </NutFormItem> <div class="common-content"> <NutButton class="recharge-button" type="primary" @click="handleNext"> <div class="recharge-button-inner"> - <div class="recharge-button-text">绔嬪嵆鍏呭��</div> + <div class="recharge-button-text">淇濆瓨</div> </div> </NutButton> <NutButton class="recharge-button" type="primary" plain @click="goToPrevious"> @@ -25,7 +28,11 @@ </template> <script setup lang="ts"> -import { Button as NutButton, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro'; +import { + Button as NutButton, + FormItem as NutFormItem, + Textarea as NutTextarea, +} from '@nutui/nutui-taro'; import { reactive, ref, computed, watch } from 'vue'; import GasBillRechargeBaseForm from './GasBillRechargeBaseForm.vue'; import { useGasBillRechargeContext } from './context'; diff --git a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue index f6b4e20..58b7052 100644 --- a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue +++ b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue @@ -226,6 +226,7 @@ try { let params: LifeGasDataCreateLifePayOrderInput = { userId: blLifeRecharge.accountModel.userId, + channelId: blLifeRecharge.accountModel.channlesNum, productData: { parValue: props.isDev ? 0.1 : form.parValue, gasOrgType: form.gasOrgType, diff --git a/packages/components/src/views/Order/OrderApplyRefundView.vue b/packages/components/src/views/Order/OrderApplyRefundView.vue index c60938f..3b5574c 100644 --- a/packages/components/src/views/Order/OrderApplyRefundView.vue +++ b/packages/components/src/views/Order/OrderApplyRefundView.vue @@ -8,7 +8,7 @@ > <NutFormItem class="bole-form-item" prop="refundApplyRemark" required> <NutTextarea - placeholder="璇峰~鍐欐偍闇�瑕佸厖鍊肩殑鎵嬫満鍙风爜" + placeholder="璇疯緭鍏ラ��娆惧師鍥�" placeholderClass="bole-input-text-placeholder" autoSize class="bole-input-textarea" diff --git a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeBaseForm.vue b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeBaseForm.vue index fb99f51..361678e 100644 --- a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeBaseForm.vue +++ b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeBaseForm.vue @@ -7,7 +7,7 @@ class="order-bill-recharge phone" > <NutFormItem label="閫夋嫨杩愯惀鍟�:" class="bole-form-item" prop="ispCode" required> - <NutRadioGroup v-model="form.ispCode" direction="horizontal"> + <NutRadioGroup v-model="form.ispCode" direction="horizontal" @change="handleIspCodeChange"> <BlRadio :label="key" v-for="(val, key) in BlLifeRecharge.constants.IspCodeText" @@ -39,6 +39,11 @@ /> </NutFormItem> <slot></slot> + <NutDialog + title="鎻愮ず" + content="鐢典俊鍙厖鍊煎尯鍩熷寘鎷細骞夸笢銆佹睙鑻忋�佹箹鍖椼�佸洓宸濄�佹睙瑗裤�佹渤鍖椼�佹渤鍗椼�佺寤恒�佽窘瀹併�傚叾瀹冨尯鍩熸鍦ㄥ垎鎵规杩涜缁存姢涓紝鍦ㄦ鏈熼棿鍙兘浼氬嚭鐜板厖鍊间笉鎴愬姛骞惰嚜鍔ㄩ��娆剧殑鎯呭喌锛岃鎮ㄨ皡瑙c��" + v-model:visible="dialogVisible" + /> </NutForm> </template> @@ -48,12 +53,13 @@ FormItem as NutFormItem, RadioGroup as NutRadioGroup, Input as NutInput, + Dialog as NutDialog, } from '@nutui/nutui-taro'; import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; import { reactive, ref, computed } from 'vue'; import BlRadio from '../../components/Radio/Radio.vue'; import { FormValidator } from '../../utils'; -import { BlLifeRecharge } from '@life-payment/core-vue'; +import { BlLifeRecharge, LifeRechargeConstants } from '@life-payment/core-vue'; defineOptions({ name: 'PhoneBillRechargeBaseForm', @@ -74,6 +80,15 @@ name: [{ required: true, message: '璇疯緭鍏ュ鍚�' }], }); +const dialogVisible = ref(false); + +function handleIspCodeChange(ispCode: LifeRechargeConstants.IspCode) { + console.log('ispCode: ', ispCode); + if (ispCode === LifeRechargeConstants.IspCode.dianxin) { + dialogVisible.value = true; + } +} + const formRef = ref<any>(null); defineExpose({ diff --git a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep1.vue b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep1.vue index ca42ed0..5878244 100644 --- a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep1.vue +++ b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep1.vue @@ -1,18 +1,21 @@ <template> <PhoneBillRechargeBaseForm ref="formRef" v-model:form="form"> <NutFormItem label="澶囨敞淇℃伅" class="bole-form-item" prop="remark"> - <NutInput - v-model.trim="form.remark" - class="bole-input-text" + <NutTextarea placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" - type="text" - max-length="30" - /> + placeholderClass="bole-input-text-placeholder" + autoSize + class="bole-input-textarea" + v-model="form.remark" + :max-length="30" + limit-show + > + </NutTextarea> </NutFormItem> <div class="common-content"> <nut-button class="recharge-button" type="primary" @click="handleNext"> <div class="recharge-button-inner"> - <div class="recharge-button-text">绔嬪嵆鍏呭��</div> + <div class="recharge-button-text">淇濆瓨</div> </div> </nut-button> <nut-button class="recharge-button" type="primary" plain @click="goToNext"> @@ -25,7 +28,11 @@ </template> <script setup lang="ts"> -import { Button as NutButton, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro'; +import { + Button as NutButton, + FormItem as NutFormItem, + Textarea as NutTextarea, +} from '@nutui/nutui-taro'; import { reactive, ref, computed, provide } from 'vue'; import PhoneBillRechargeBaseForm from './PhoneBillRechargeBaseForm.vue'; import { usePhoneBillRechargeContext } from './context'; diff --git a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue index 73fd93e..77a5c5c 100644 --- a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue +++ b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue @@ -215,6 +215,7 @@ try { let params: LifePhoneDataCreateLifePayOrderInput = { userId: blLifeRecharge.accountModel.userId, + channelId: blLifeRecharge.accountModel.channlesNum, productData: { ispCode: form.ispCode, parValue: props.isDev ? 0.1 : form.parValue, diff --git a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep1.vue b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep1.vue index 99073a6..bc5630f 100644 --- a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep1.vue +++ b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep1.vue @@ -1,18 +1,21 @@ <template> <ElectricBillRechargeBaseForm ref="formRef" v-model:form="form"> <NutFormItem label="澶囨敞淇℃伅" class="bole-form-item" prop="remark"> - <NutInput - v-model.trim="form.remark" - class="bole-input-text" + <NutTextarea placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" - type="text" - max-length="30" - /> + placeholderClass="bole-input-text-placeholder" + autoSize + class="bole-input-textarea" + v-model="form.remark" + :max-length="30" + limit-show + > + </NutTextarea> </NutFormItem> <div class="common-content"> <nut-button class="recharge-button" type="primary" @click="handleNext"> <div class="recharge-button-inner"> - <div class="recharge-button-text">绔嬪嵆鍏呭��</div> + <div class="recharge-button-text">淇濆瓨</div> </div> </nut-button> <nut-button class="recharge-button" type="primary" plain @click="goToNext"> @@ -25,7 +28,12 @@ </template> <script setup lang="ts"> -import { Button as NutButton, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro'; +import { + Button as NutButton, + FormItem as NutFormItem, + Input as NutInput, + Textarea as NutTextarea, +} from '@nutui/nutui-taro'; import { reactive, ref } from 'vue'; import { useElectricBillRechargeContext } from './context'; import ElectricBillRechargeBaseForm from './ElectricBillRechargeBaseForm.vue'; diff --git a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue index 1bc4f9c..0fabeac 100644 --- a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue +++ b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue @@ -232,6 +232,7 @@ try { let params: LifeElectricDataCreateLifePayOrderInput = { userId: blLifeRecharge.accountModel.userId, + channelId: blLifeRecharge.accountModel.channlesNum, productData: { parValue: props.isDev ? 0.1 : form.parValue, electricType: form.electricType, diff --git a/packages/components/src/views/userAccount/EditElectricUserAccount.vue b/packages/components/src/views/userAccount/EditElectricUserAccount.vue index 5a45bac..d094b25 100644 --- a/packages/components/src/views/userAccount/EditElectricUserAccount.vue +++ b/packages/components/src/views/userAccount/EditElectricUserAccount.vue @@ -2,13 +2,16 @@ <LoadingLayout :loading="isLoading"> <ElectricBillRechargeBaseForm ref="formRef" v-model:form="form"> <NutFormItem label="澶囨敞淇℃伅" class="bole-form-item" prop="remark"> - <NutInput - v-model.trim="form.remark" - class="bole-input-text" + <NutTextarea placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" - type="text" - max-length="30" - /> + placeholderClass="bole-input-text-placeholder" + autoSize + class="bole-input-textarea" + v-model="form.remark" + :max-length="30" + limit-show + > + </NutTextarea> </NutFormItem> <div class="common-content"> <NutButton class="recharge-button" type="primary" @click="handleSave"> @@ -23,7 +26,7 @@ <script setup lang="ts"> import ElectricBillRechargeBaseForm from '../electricBillRecharge/ElectricBillRechargeBaseForm.vue'; -import { Button as NutButton } from '@nutui/nutui-taro'; +import { Button as NutButton, Textarea as NutTextarea } from '@nutui/nutui-taro'; import { reactive, ref, computed } from 'vue'; import { useLifeRechargeContext, diff --git a/packages/components/src/views/userAccount/EditGasUserAccount.vue b/packages/components/src/views/userAccount/EditGasUserAccount.vue index 91f751e..f03cd9c 100644 --- a/packages/components/src/views/userAccount/EditGasUserAccount.vue +++ b/packages/components/src/views/userAccount/EditGasUserAccount.vue @@ -13,13 +13,16 @@ </NutFormItem> </template> <NutFormItem label="澶囨敞淇℃伅" class="bole-form-item" prop="remark"> - <NutInput - v-model.trim="form.remark" - class="bole-input-text" + <NutTextarea placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" - type="text" - max-length="30" - /> + placeholderClass="bole-input-text-placeholder" + autoSize + class="bole-input-textarea" + v-model="form.remark" + :max-length="30" + limit-show + > + </NutTextarea> </NutFormItem> <div class="common-content"> <NutButton class="recharge-button" type="primary" @click="handleSave"> @@ -34,7 +37,7 @@ <script setup lang="ts"> import GasBillRechargeBaseForm from '../GasBillRecharge/GasBillRechargeBaseForm.vue'; -import { Button as NutButton } from '@nutui/nutui-taro'; +import { Button as NutButton, Textarea as NutTextarea } from '@nutui/nutui-taro'; import { reactive, ref, computed } from 'vue'; import { useLifeRechargeContext, diff --git a/packages/components/src/views/userAccount/EditPhoneUserAccount.vue b/packages/components/src/views/userAccount/EditPhoneUserAccount.vue index acd9924..93654be 100644 --- a/packages/components/src/views/userAccount/EditPhoneUserAccount.vue +++ b/packages/components/src/views/userAccount/EditPhoneUserAccount.vue @@ -2,13 +2,16 @@ <LoadingLayout :loading="isLoading"> <PhoneBillRechargeBaseForm ref="formRef" v-model:form="form"> <NutFormItem label="澶囨敞淇℃伅" class="bole-form-item" prop="remark"> - <NutInput - v-model.trim="form.remark" - class="bole-input-text" + <NutTextarea placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" - type="text" - max-length="30" - /> + placeholderClass="bole-input-text-placeholder" + autoSize + class="bole-input-textarea" + v-model="form.remark" + :max-length="30" + limit-show + > + </NutTextarea> </NutFormItem> <div class="common-content"> <NutButton class="recharge-button" type="primary" @click="handleSave"> @@ -23,7 +26,7 @@ <script setup lang="ts"> import PhoneBillRechargeBaseForm from '../PhoneBillRecharge/PhoneBillRechargeBaseForm.vue'; -import { Button as NutButton } from '@nutui/nutui-taro'; +import { Button as NutButton, Textarea as NutTextarea } from '@nutui/nutui-taro'; import { reactive, ref, computed } from 'vue'; import { useLifeRechargeContext, diff --git a/packages/core/src/lifeRecharge.ts b/packages/core/src/lifeRecharge.ts index 87b10eb..0842aba 100644 --- a/packages/core/src/lifeRecharge.ts +++ b/packages/core/src/lifeRecharge.ts @@ -19,6 +19,7 @@ this.accountModel = new BlLifeRechargeAccountModel({ userId: options.userId, phoneNumber: options.phoneNumber, + channlesNum: options.channlesNum, }); } diff --git a/packages/core/src/lifeRechargeServices.ts b/packages/core/src/lifeRechargeServices.ts index ef65c43..e62802a 100644 --- a/packages/core/src/lifeRechargeServices.ts +++ b/packages/core/src/lifeRechargeServices.ts @@ -18,12 +18,17 @@ ...axiosConfig, // baseURL: process.env.NODE_ENV === 'development' ? '/' : 'https://api.81812333.com', requestInterceptors: [ - // [ - // (config) => { - // console.log('config2: ', config); - // return config; - // }, - // ], + [ + (config) => { + if (config.params) { + config.params.checkChannelId = this.ctx.accountModel.channlesNum; + } + if (config.data) { + config.data.checkChannelId = this.ctx.accountModel.channlesNum; + } + return config; + }, + ], ...axiosConfig.requestInterceptors, ], timeout: 10 * 1000, @@ -122,14 +127,15 @@ } /** 鏍规嵁璁㈠崟鍙疯幏鍙栨敮浠樼姸鎬� GET /api/LifePay/GetPayStatusByOrderNo */ - async getPayStatusByOrderNo(params: APIgetPayStatusByOrderNoParams, options?: RequestConfig) { + async getPayStatusByOrderNo(body: GetPayStatusByOrderNoInput, options?: RequestConfig) { return this.request<LifeRechargeConstants.LifePayStatusEnum>( '/api/LifePay/GetPayStatusByOrderNo', { - method: 'GET', - params: { - ...params, + method: 'POST', + headers: { + 'Content-Type': 'application/json', }, + data: body, ...(options || {}), } ); @@ -372,6 +378,8 @@ export interface LifePhoneDataCreateLifePayOrderInput { userId?: string; + /** 娓犻亾Id */ + channelId?: string; productData?: LifePhoneData; } @@ -392,6 +400,8 @@ export interface LifeElectricDataCreateLifePayOrderInput { userId?: string; + /** 娓犻亾Id */ + channelId?: string; productData?: LifeElectricData; } @@ -599,6 +609,8 @@ export interface LifeGasDataCreateLifePayOrderInput { userId?: string; + /** 娓犻亾Id */ + channelId?: string; productData?: LifeGasData; } @@ -691,7 +703,7 @@ } export interface ChannelsBaseInput { - channelId?: string; + checkChannelId?: string; } export interface AreaInfo { @@ -707,3 +719,8 @@ /** 蹇�熸绱� */ quickQuery?: string; } + +export interface GetPayStatusByOrderNoInput { + checkChannelId?: string; + orderNo?: string; +} diff --git a/packages/services/api/LifePay.ts b/packages/services/api/LifePay.ts index 1383efa..bf9f909 100644 --- a/packages/services/api/LifePay.ts +++ b/packages/services/api/LifePay.ts @@ -248,13 +248,13 @@ }); } -/** 鏍规嵁璁㈠崟鍙疯幏鍙栨敮浠樼姸鎬� GET /api/LifePay/GetPayStatusByOrderNo */ +/** 鏍规嵁璁㈠崟鍙疯幏鍙栨敮浠樼姸鎬� POST /api/LifePay/GetPayStatusByOrderNo */ export async function getPayStatusByOrderNo( body: API.GetPayStatusByOrderNoInput, options?: API.RequestConfig ) { return request<API.LifePayStatusEnum>('/api/LifePay/GetPayStatusByOrderNo', { - method: 'GET', + method: 'POST', headers: { 'Content-Type': 'application/json', }, diff --git a/packages/services/api/typings.d.ts b/packages/services/api/typings.d.ts index 6ada37f..1bb20cd 100644 --- a/packages/services/api/typings.d.ts +++ b/packages/services/api/typings.d.ts @@ -518,6 +518,7 @@ } interface AddUpdateUserAccountInput { + checkChannelId?: string; id?: string; /** 鐢ㄦ埛缂栧彿 */ userId?: string; @@ -12329,7 +12330,7 @@ interface LifeElectricDataCreateLifePayOrderInput { userId?: string; - /** 娓犻亾Id */ + /** 娓犻亾鍚嶇О */ channelId?: string; checkChannelId?: string; productData?: LifeElectricData; @@ -12350,7 +12351,7 @@ interface LifeGasDataCreateLifePayOrderInput { userId?: string; - /** 娓犻亾Id */ + /** 娓犻亾鍚嶇О */ channelId?: string; checkChannelId?: string; productData?: LifeGasData; @@ -12445,7 +12446,7 @@ interface LifePhoneDataCreateLifePayOrderInput { userId?: string; - /** 娓犻亾Id */ + /** 娓犻亾鍚嶇О */ channelId?: string; checkChannelId?: string; productData?: LifePhoneData; @@ -16444,6 +16445,7 @@ } interface QueryUserAccountAllListInput { + checkChannelId?: string; /** 鐢ㄦ埛Id */ userId?: string; lifePayOrderType?: LifePayOrderTypeEnum; @@ -16965,6 +16967,7 @@ } interface RefundUserLifePayOrderInput { + checkChannelId?: string; id?: string; /** 鐢ㄦ埛Id */ userId?: string; -- Gitblit v1.9.1