30个文件已修改
4个文件已添加
68个文件已删除
| | |
| | | VITE_ROUTER_HISTORY = "h5" |
| | | |
| | | # 开发环境后端地址 |
| | | VITE_PROXY_DOMAIN_REAL = "http://localhost:57190" |
| | | VITE_PROXY_DOMAIN_REAL = "http://localhost:58190" |
| | | # VITE_PROXY_DOMAIN_REAL = "https://qianapi.81812333.com" |
| | | # VITE_PROXY_DOMAIN_REAL = "https://testrlywx.boleyuma.com" |
| | | |
| | |
| | | "config": [ |
| | | { |
| | | "requestLibPath": "import { request } from '@/utils/request'", |
| | | "schemaPath": "http://localhost:57190/swagger/v1/swagger.json", |
| | | "schemaPath": "http://localhost:58190/swagger/v1/swagger.json", |
| | | "serversPath": "./src/services" |
| | | } |
| | | ] |
| | |
| | | module.exports = { |
| | | env: { |
| | | NODE_ENV: '"development"', |
| | | BASE_URL: '"http://localhost:57190"', |
| | | BASE_URL: '"http://localhost:58190"', |
| | | BASE_URL_H5: '"/"', |
| | | BASE_URL_JX: '"https://api.jx818.com"', |
| | | |
| | |
| | | devServer: { |
| | | proxy: { |
| | | '/api': { |
| | | target: 'http://localhost:57190', // 目标服务器地址 |
| | | target: 'http://localhost:58190', // 目标服务器地址 |
| | | changeOrigin: true, |
| | | }, |
| | | }, |
| | |
| | | LoginVirtualRes, |
| | | } from '@/utils/storage/auth'; |
| | | import * as accountServices from '@life-payment/services/api/Account'; |
| | | import * as userServices from '@life-payment/services/api/User'; |
| | | import Taro, { useRouter } from '@tarojs/taro'; |
| | | import { ButtonProps } from '@tarojs/components'; |
| | | import { debounce } from 'lodash'; |
| | |
| | | wxMiniAppUserLoginRes: any |
| | | ) { |
| | | try { |
| | | let res: API.IdentityModelTokenCacheItem; |
| | | if (!wxMiniAppUserLoginRes.accessToken) { |
| | | let params: API.WxMiniAppPhoneLoginInput = { |
| | | openId: wxMiniAppUserLoginRes.openId, |
| | | sessionKey: wxMiniAppUserLoginRes.sessionKey, |
| | | encryptedData: detail.encryptedData, |
| | | iv: detail.iv, |
| | | // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }; |
| | | res = await accountServices.wxMiniAppPhoneAuthLogin(params); |
| | | this.loginSuccess(res); |
| | | } |
| | | return res; |
| | | // let res: API.IdentityModelTokenCacheItem; |
| | | // if (!wxMiniAppUserLoginRes.accessToken) { |
| | | // let params: API.WxMiniAppPhoneLoginInput = { |
| | | // openId: wxMiniAppUserLoginRes.openId, |
| | | // sessionKey: wxMiniAppUserLoginRes.sessionKey, |
| | | // encryptedData: detail.encryptedData, |
| | | // iv: detail.iv, |
| | | // // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | // }; |
| | | // res = await accountServices.wxMiniAppPhoneAuthLogin(params); |
| | | // this.loginSuccess(res); |
| | | // } |
| | | // return res; |
| | | return 1; |
| | | } catch (error) { |
| | | console.log('error3: ', error); |
| | | } |
| | | }, |
| | | |
| | | // 用户手机验证码登入 |
| | | async loginByUsername(data: API.PhoneMesssageCodeLoginInput) { |
| | | async loginByUsername(data: any) { |
| | | let res = await accountServices.lifePayPhoneMesssageCodeLogin( |
| | | { |
| | | phoneNumber: data.phoneNumber, |
| | | code: data.code, |
| | | // code: data.code, |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | |
| | | |
| | | // 用户账号密码登入 |
| | | async loginByPassword(data: API.AccessRequestDto) { |
| | | let res = await accountServices.passwordLogin( |
| | | { |
| | | loginName: data.userName, |
| | | password: data.userPassword, |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | | if (res) { |
| | | this.loginSuccess(res); |
| | | } |
| | | return res; |
| | | // let res = await accountServices.passwordLogin( |
| | | // { |
| | | // loginName: data.userName, |
| | | // password: data.userPassword, |
| | | // }, |
| | | // { showLoading: false } |
| | | // ); |
| | | // if (res) { |
| | | // this.loginSuccess(res); |
| | | // } |
| | | // return res; |
| | | }, |
| | | |
| | | async loginSuccess(res: API.IdentityModelTokenCacheItem) { |
| | |
| | | |
| | | async wxMiniAppUserLoginFromScan(wxIndentityRes: API.WxMiniAppIndentityInfo, uuid: string) { |
| | | try { |
| | | let res = await accountServices.wxMiniAppUserLoginFromScan({ |
| | | uId: uuid, |
| | | userName: wxIndentityRes.userName, |
| | | openId: wxIndentityRes.openId, |
| | | }); |
| | | this.loginSuccess(res); |
| | | return res; |
| | | // let res = await accountServices.wxMiniAppUserLoginFromScan({ |
| | | // uId: uuid, |
| | | // userName: wxIndentityRes.userName, |
| | | // openId: wxIndentityRes.openId, |
| | | // }); |
| | | // this.loginSuccess(res); |
| | | // return res; |
| | | return 1; |
| | | } catch (error) {} |
| | | }, |
| | | |
| | |
| | | uuid: string |
| | | ) { |
| | | try { |
| | | let res = await accountServices.wxMiniAppPhoneAuthLoginFromScan({ |
| | | uId: uuid, |
| | | openId: wxIndentityRes.openId, |
| | | sessionKey: wxIndentityRes.sessionKey, |
| | | encryptedData: detail.encryptedData, |
| | | iv: detail.iv, |
| | | // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }); |
| | | this.loginSuccess(res); |
| | | return res; |
| | | // let res = await accountServices.wxMiniAppPhoneAuthLoginFromScan({ |
| | | // uId: uuid, |
| | | // openId: wxIndentityRes.openId, |
| | | // sessionKey: wxIndentityRes.sessionKey, |
| | | // encryptedData: detail.encryptedData, |
| | | // iv: detail.iv, |
| | | // // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | // }); |
| | | // this.loginSuccess(res); |
| | | // return res; |
| | | return 1; |
| | | } catch (error) {} |
| | | }, |
| | | |
| | | async getCurrentUserInfo() { |
| | | try { |
| | | let res = await userServices.getUserInfo({ showLoading: false }); |
| | | if (res) { |
| | | res.originalAvatarUrl = res.avatarUrl; |
| | | res.avatarUrl = res.avatarUrl ? setOSSLink(res.avatarUrl) : DefaultAvatar; |
| | | this.setUserDetail(res); |
| | | this.firstGetUserDetail = false; |
| | | } |
| | | // let res = await userServices.getUserInfo({ showLoading: false }); |
| | | // if (res) { |
| | | // res.originalAvatarUrl = res.avatarUrl; |
| | | // res.avatarUrl = res.avatarUrl ? setOSSLink(res.avatarUrl) : DefaultAvatar; |
| | | // this.setUserDetail(res); |
| | | // this.firstGetUserDetail = false; |
| | | // } |
| | | } catch (error) {} |
| | | }, |
| | | |
| | |
| | | try { |
| | | let loginRes = await Taro.login(); |
| | | if (isLoginByWeb.value) { |
| | | const wxIndentity = await accountServices.getWxIndentity({ |
| | | code: loginRes.code, |
| | | wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }); |
| | | wxIndentityRes.value = wxIndentity; |
| | | if (wxIndentityRes.value.userName) { |
| | | isAccount.value = true; |
| | | } |
| | | // const wxIndentity = await accountServices.getWxIndentity({ |
| | | // code: loginRes.code, |
| | | // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | // }); |
| | | // wxIndentityRes.value = wxIndentity; |
| | | // if (wxIndentityRes.value.userName) { |
| | | // isAccount.value = true; |
| | | // } |
| | | } else { |
| | | const params: API.APIwxMiniAppUserLoginParams = { |
| | | code: loginRes.code, |
| | | wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }; |
| | | wxMiniAppUserLoginRes.value = await accountServices.wxMiniAppUserLogin(params); |
| | | if (wxMiniAppUserLoginRes.value.accessToken) { |
| | | isAccount.value = true; |
| | | } |
| | | // const params = { |
| | | // code: loginRes.code, |
| | | // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | // }; |
| | | // wxMiniAppUserLoginRes.value = await accountServices.wxMiniAppUserLogin(params); |
| | | // if (wxMiniAppUserLoginRes.value.accessToken) { |
| | | // isAccount.value = true; |
| | | // } |
| | | } |
| | | } catch (error) {} |
| | | }); |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import * as commonServices from '@life-payment/services/api/Common'; |
| | | // import * as commonServices from '@life-payment/services/api/Common'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { FormValidator, Message } from '@/utils'; |
| | | import { ProFormCaptcha } from 'senin-mini/components'; |
| | |
| | | }); |
| | | |
| | | async function onGetCaptcha() { |
| | | await commonServices.sendVerificationCode( |
| | | { |
| | | phoneNumber: form.phoneNumber, |
| | | businessType: VerificationCodeBusinessType.LifePayPhoneMesssageCodeLogin, |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | | // await commonServices.sendVerificationCode( |
| | | // { |
| | | // phoneNumber: form.phoneNumber, |
| | | // businessType: VerificationCodeBusinessType.LifePayPhoneMesssageCodeLogin, |
| | | // }, |
| | | // { showLoading: false } |
| | | // ); |
| | | } |
| | | |
| | | async function handleLogin() { |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import LoginPageLayout from '../components/LoginPageLayout/LoginPageLayout.vue'; |
| | | import * as commonServices from '@life-payment/services/api/Common'; |
| | | // import * as commonServices from '@life-payment/services/api/Common'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { FormValidator, Message } from '@/utils'; |
| | | import { ProFormCaptcha } from 'senin-mini/components'; |
| | |
| | | }); |
| | | |
| | | async function onGetCaptcha() { |
| | | await commonServices.sendVerificationCode( |
| | | { |
| | | phoneNumber: form.phoneNumber, |
| | | businessType: VerificationCodeBusinessType.PhoneMesssageCodeRegister, |
| | | }, |
| | | { |
| | | showLoading: false, |
| | | customErrorHandler(error) { |
| | | if (error?.response?.data?.error?.code === ResponseCode.RegisterExistsPhoneNumber) { |
| | | Message.confirm({ |
| | | message: '该手机号已注册,请去登录页登录', |
| | | confirmText: '去登录', |
| | | }).then(() => { |
| | | goLogin(); |
| | | }); |
| | | return true; |
| | | } |
| | | }, |
| | | } |
| | | ); |
| | | // await commonServices.sendVerificationCode( |
| | | // { |
| | | // phoneNumber: form.phoneNumber, |
| | | // businessType: VerificationCodeBusinessType.PhoneMesssageCodeRegister, |
| | | // }, |
| | | // { |
| | | // showLoading: false, |
| | | // customErrorHandler(error) { |
| | | // if (error?.response?.data?.error?.code === ResponseCode.RegisterExistsPhoneNumber) { |
| | | // Message.confirm({ |
| | | // message: '该手机号已注册,请去登录页登录', |
| | | // confirmText: '去登录', |
| | | // }).then(() => { |
| | | // goLogin(); |
| | | // }); |
| | | // return true; |
| | | // } |
| | | // }, |
| | | // } |
| | | // ); |
| | | } |
| | | |
| | | async function handleRegister() { |
| | |
| | | if (state.policyChecked) { |
| | | const { valid } = await formRef.value.validate(); |
| | | if (valid) { |
| | | let params: API.PhoneMesssageCodeRegisterInput = { |
| | | code: form.verificationCode, |
| | | phoneNumber: form.phoneNumber, |
| | | }; |
| | | let res = await accountServices.phoneMesssageCodeRegister(params); |
| | | if (res) { |
| | | Message.success('注册成功', { |
| | | onClosed: () => { |
| | | goLogin(); |
| | | }, |
| | | }); |
| | | } |
| | | // let params: API.PhoneMesssageCodeRegisterInput = { |
| | | // code: form.verificationCode, |
| | | // phoneNumber: form.phoneNumber, |
| | | // }; |
| | | // let res = await accountServices.phoneMesssageCodeRegister(params); |
| | | // if (res) { |
| | | // Message.success('注册成功', { |
| | | // onClosed: () => { |
| | | // goLogin(); |
| | | // }, |
| | | // }); |
| | | // } |
| | | } |
| | | } else { |
| | | noAccess(); |
| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false" style="background-color: #fff"> |
| | | <electricBillRecharge @goPay="goPay" :isDev="isDev" /> |
| | | <electricBillRecharge |
| | | @goPay="goPay" |
| | | :isDev="isDev" |
| | | @paySuccess="handePaySuccess" |
| | | :openId="wxOpenId" |
| | | :isInWeChat="isInWeChat" |
| | | :isInAlipay="isInAlipay" |
| | | :isH5="isWeb" |
| | | :appId="WXPayAppId" |
| | | :isFocus="isFocus" |
| | | /> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | |
| | | import { electricBillRecharge } from '@life-payment/components'; |
| | | import { BlLifeRecharge } from '@life-payment/core-vue'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { isInAlipay, isInWeChat, isH5, isWeb } from '@/utils/env'; |
| | | import { useUser, useFocus } from '@/hooks'; |
| | | import { WXPayAppId } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | |
| | | const isDev = process.env.NODE_ENV === 'development'; |
| | | |
| | | const { wxOpenId } = useUser(); |
| | | const { isFocus } = useFocus(); |
| | | |
| | | function goPay(orderNo: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.电费订单}`, |
| | | }); |
| | | } |
| | | |
| | | function handePaySuccess(orderNo: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.电费订单}`, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false" style="background-color: #fff"> |
| | | <GasBillRecharge @goPay="goPay" :isDev="isDev" /> |
| | | <GasBillRecharge |
| | | @goPay="goPay" |
| | | :isDev="isDev" |
| | | @paySuccess="handePaySuccess" |
| | | :openId="wxOpenId" |
| | | :isInWeChat="isInWeChat" |
| | | :isInAlipay="isInAlipay" |
| | | :isH5="isWeb" |
| | | :appId="WXPayAppId" |
| | | :isFocus="isFocus" |
| | | /> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | |
| | | import { GasBillRecharge } from '@life-payment/components'; |
| | | import { BlLifeRecharge } from '@life-payment/core-vue'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { isInAlipay, isInWeChat, isH5, isWeb } from '@/utils/env'; |
| | | import { useUser, useFocus } from '@/hooks'; |
| | | import { WXPayAppId } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | |
| | | const isDev = process.env.NODE_ENV === 'development'; |
| | | |
| | | const { wxOpenId } = useUser(); |
| | | const { isFocus } = useFocus(); |
| | | |
| | | function goPay(orderNo: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.燃气订单}`, |
| | | }); |
| | | } |
| | | |
| | | function handePaySuccess(orderNo: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.燃气订单}`, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false" style="background-color: #fff"> |
| | | <PhoneBillRecharge @goPay="goPay" :isDev="isDev" /> |
| | | <PhoneBillRecharge |
| | | @goPay="goPay" |
| | | :isDev="isDev" |
| | | @paySuccess="handePaySuccess" |
| | | :openId="wxOpenId" |
| | | :isInWeChat="isInWeChat" |
| | | :isInAlipay="isInAlipay" |
| | | :isH5="isWeb" |
| | | :appId="WXPayAppId" |
| | | :isFocus="isFocus" |
| | | /> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | |
| | | import { PhoneBillRecharge } from '@life-payment/components'; |
| | | import { BlLifeRecharge } from '@life-payment/core-vue'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { isInAlipay, isInWeChat, isH5, isWeb } from '@/utils/env'; |
| | | import { useUser, useFocus } from '@/hooks'; |
| | | import { WXPayAppId } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | |
| | | const isDev = process.env.NODE_ENV === 'development'; |
| | | |
| | | const { wxOpenId } = useUser(); |
| | | const { isFocus } = useFocus(); |
| | | |
| | | function goPay(orderNo: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.话费订单}`, |
| | | }); |
| | | } |
| | | |
| | | function handePaySuccess(orderNo: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.话费订单}`, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | lifePayOrderType: LifeRechargeConstants.LifePayOrderTypeEnum |
| | | ) { |
| | | if (lifePayOrderType === LifeRechargeConstants.LifePayOrderTypeEnum.话费订单) { |
| | | Taro.redirectTo({ |
| | | RouteHelper.redirectTo({ |
| | | url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${lifePayOrderType}`, |
| | | }); |
| | | } else if (lifePayOrderType === LifeRechargeConstants.LifePayOrderTypeEnum.电费订单) { |
| | | Taro.redirectTo({ |
| | | RouteHelper.redirectTo({ |
| | | url: `${RouterPath.rechargeElectricResult}?orderNo=${orderNo}&lifePayOrderType=${lifePayOrderType}`, |
| | | }); |
| | | } else if (lifePayOrderType === LifeRechargeConstants.LifePayOrderTypeEnum.燃气订单) { |
| | | Taro.redirectTo({ |
| | | RouteHelper.redirectTo({ |
| | | url: `${RouterPath.rechargeGasResult}?orderNo=${orderNo}&lifePayOrderType=${lifePayOrderType}`, |
| | | }); |
| | | } |
| | |
| | | url: pathAddExtraParam(option.url, { channelId: blLifeRecharge.accountModel.channlesNum }), |
| | | }); |
| | | } |
| | | |
| | | static redirectTo(option: Taro.redirectTo.Option) { |
| | | return Taro.redirectTo({ |
| | | ...option, |
| | | url: pathAddExtraParam(option.url, { channelId: blLifeRecharge.accountModel.channlesNum }), |
| | | }); |
| | | } |
| | | } |
| | |
| | | "config": [ |
| | | { |
| | | "requestLibPath": "import { request } from '@/utils/request'", |
| | | "schemaPath": "http://localhost:57190/swagger/v1/swagger.json", |
| | | "schemaPath": "http://localhost:58190/swagger/v1/swagger.json", |
| | | "serversPath": "./packages/services" |
| | | } |
| | | ] |
New file |
| | |
| | | <template> |
| | | <NutFormItem label="选择支付方式" class="bole-form-item" prop="lifePayType" required> |
| | | <NutRadioGroup v-model="lifePayType" direction="horizontal"> |
| | | <BlRadio |
| | | :label="Number(lifePayTypeEnum)" |
| | | v-for="(lifePayTypeEnumText, lifePayTypeEnum) in LifeRechargeConstants.LifePayTypeEnumText" |
| | | :key="lifePayTypeEnum" |
| | | shape="button" |
| | | class="select-pay-type-view-form-item-radio" |
| | | > |
| | | <div class="select-pay-type-view-form-item"> |
| | | <img class="select-pay-type-view-form-item-icon" :src="IconMap[lifePayTypeEnum]" /> |
| | | {{ lifePayTypeEnumText }} |
| | | </div> |
| | | </BlRadio> |
| | | </NutRadioGroup> |
| | | </NutFormItem> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { LifeRechargeConstants } from '@life-payment/core-vue'; |
| | | import { FormItem as NutFormItem, RadioGroup as NutRadioGroup } from '@nutui/nutui-taro'; |
| | | import BlRadio from '../Radio/Radio.vue'; |
| | | import IconWeixin from '../../assets/icon-weixin-pay.png'; |
| | | import IconAliPay from '../../assets/icon-alipay.png'; |
| | | |
| | | defineOptions({ |
| | | name: 'SelectPayTypeFormItem', |
| | | }); |
| | | |
| | | const lifePayType = defineModel<LifeRechargeConstants.LifePayTypeEnum>(); |
| | | |
| | | const IconMap = { |
| | | [LifeRechargeConstants.LifePayTypeEnum.WxPay]: IconWeixin, |
| | | [LifeRechargeConstants.LifePayTypeEnum.AliPay]: IconAliPay, |
| | | }; |
| | | </script> |
New file |
| | |
| | | import { |
| | | useLifeRechargeContext, |
| | | SetLifePayOrderPayTypeInput, |
| | | LifeRechargeConstants, |
| | | GetPayOrderForJsAPIInput, |
| | | } from '@life-payment/core-vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { reactive, MaybeRef, unref } from 'vue'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | type UseSelectPayTypeOptions = { |
| | | openId?: MaybeRef<string>; |
| | | isInWeChat?: MaybeRef<boolean>; |
| | | isH5?: MaybeRef<boolean>; |
| | | appId?: MaybeRef<string>; |
| | | }; |
| | | |
| | | export function useSelectPayType(options: UseSelectPayTypeOptions = {}) { |
| | | const { openId, isInWeChat, isH5, appId } = options; |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const state = reactive({ |
| | | show: false, |
| | | msg: '', |
| | | }); |
| | | |
| | | async function invokeAliPay(orderNo: string) { |
| | | try { |
| | | let res = await setLifePayOrderPayType( |
| | | blLifeRecharge.constants.LifePayTypeEnum.AliPay, |
| | | orderNo |
| | | ); |
| | | if (res) { |
| | | location.href = res; |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function setLifePayOrderPayType( |
| | | lifePayType: LifeRechargeConstants.LifePayTypeEnum, |
| | | orderNo: string |
| | | ) { |
| | | try { |
| | | let params: SetLifePayOrderPayTypeInput = { |
| | | orderNo: orderNo, |
| | | lifePayType: lifePayType, |
| | | }; |
| | | return await blLifeRecharge.services.setLifePayOrderPayType(params); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function invokeWeixinPay(orderNo: string) { |
| | | if (unref(isH5)) { |
| | | if (unref(isInWeChat)) { |
| | | handleWeixinPayByJsApi(orderNo); |
| | | } else { |
| | | // try { |
| | | // let res = await setLifePayOrderPayType(blLifeRecharge.constants.LifePayTypeEnum.WxPay); |
| | | // if (res) { |
| | | // location.href = res; |
| | | // } |
| | | // } catch (error) {} |
| | | state.msg = '请在微信中打开'; |
| | | state.show = true; |
| | | } |
| | | } else if (Taro.getEnv() === Taro.ENV_TYPE.WEAPP) { |
| | | handleWeixinPayByMini(orderNo); |
| | | } |
| | | } |
| | | |
| | | async function handleWeixinPayByMini(orderNo: string) { |
| | | try { |
| | | let res = await getPayOrderForJsAPI(orderNo); |
| | | |
| | | if (res) { |
| | | Taro.requestPayment({ |
| | | timeStamp: res.timestamp, |
| | | nonceStr: res.nonceStr, |
| | | package: res.package, |
| | | signType: res.signType as any, |
| | | paySign: res.paySign, |
| | | success: function (res) { |
| | | console.log('res: ', res); |
| | | // if(res.errMsg) |
| | | }, |
| | | fail: function (res) {}, |
| | | }); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function getPayOrderForJsAPI(orderNo: string) { |
| | | try { |
| | | let params: GetPayOrderForJsAPIInput = { |
| | | orderNo: orderNo, |
| | | lifePayType: blLifeRecharge.constants.LifePayTypeEnum.WxPay, |
| | | openId: unref(openId), |
| | | attach: Date.now().toString(), |
| | | payAppId: unref(appId), |
| | | }; |
| | | let res = await blLifeRecharge.services.getPayOrderForJsAPI(params); |
| | | return res; |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleWeixinPayByJsApi(orderNo: string) { |
| | | try { |
| | | let res = await getPayOrderForJsAPI(orderNo); |
| | | |
| | | if (res) { |
| | | //@ts-ignore |
| | | if (WeixinJSBridge) { |
| | | //@ts-ignore |
| | | WeixinJSBridge.invoke( |
| | | 'getBrandWCPayRequest', |
| | | { |
| | | appId: unref(appId), //公众号ID,由商户传入 |
| | | timeStamp: res.timestamp, //时间戳,自1970年以来的秒数 |
| | | nonceStr: res.nonceStr, //随机串 |
| | | package: res.package, |
| | | signType: res.signType, //微信签名方式: |
| | | paySign: res.paySign, //微信签名 |
| | | }, |
| | | function (res) { |
| | | if (res.err_msg == 'get_brand_wcpay_request:ok') { |
| | | // 使用以上方式判断前端返回,微信团队郑重提示: |
| | | //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠,商户需进一步调用后端查单确认支付结果。 |
| | | } else if (res.err_msg == 'system:access_denied') { |
| | | state.msg = '请在手机微信中打开'; |
| | | state.show = true; |
| | | } else { |
| | | // state.msg = res.err_msg; |
| | | // state.show = true; |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | return { |
| | | invokeAliPay, |
| | | invokeWeixinPay, |
| | | state, |
| | | }; |
| | | } |
| | | |
| | | type UseGetPayStatusByOrderNoOptions = { |
| | | orderNo?: MaybeRef<string>; |
| | | enabled?: MaybeRef<boolean>; |
| | | onPaySuccess?: (orderNo: string) => any; |
| | | }; |
| | | |
| | | export function useGetPayStatusByOrderNo(options: UseGetPayStatusByOrderNoOptions = {}) { |
| | | const { orderNo, enabled, onPaySuccess } = options; |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | useQuery({ |
| | | queryKey: ['platformServicePayServices/getPayStatusByOrderNo', orderNo], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getPayStatusByOrderNo( |
| | | { |
| | | orderNo: unref(orderNo), |
| | | }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | onSuccess(data) { |
| | | if (data !== blLifeRecharge.constants.LifePayStatusEnum.未支付) { |
| | | onPaySuccess?.(unref(orderNo)); |
| | | } |
| | | }, |
| | | refetchInterval: 1000 * 3, |
| | | enabled: enabled, |
| | | }); |
| | | } |
| | |
| | | margin-left: 18px; |
| | | color: boleGetCssVar('text-color', 'primary'); |
| | | } |
| | | |
| | | .select-pay-type-view-form-item-radio { |
| | | .nut-radio__button--active { |
| | | // &::after { |
| | | // background-color: transparent; |
| | | // } |
| | | } |
| | | |
| | | .select-pay-type-view-form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | color: #1d1e1e !important; |
| | | .select-pay-type-view-form-item-icon { |
| | | width: 32px; |
| | | height: 32px; |
| | | margin-right: 8px; |
| | | } |
| | | } |
| | | } |
| | |
| | | export * from './validator'; |
| | | export * from './common'; |
| | | export * from './recharge'; |
New file |
| | |
| | | import { LifeRechargeConstants } from '@life-payment/core-vue'; |
| | | |
| | | export function initLifePayType(isInWeChat: boolean, isInAlipay: boolean) { |
| | | if (isInWeChat) { |
| | | return LifeRechargeConstants.LifePayTypeEnum.WxPay; |
| | | } else if (isInAlipay) { |
| | | return LifeRechargeConstants.LifePayTypeEnum.AliPay; |
| | | } |
| | | return LifeRechargeConstants.LifePayTypeEnum.AliPay; |
| | | } |
| | |
| | | v-else-if="current === 'step3'" |
| | | v-bind="props" |
| | | @go-pay="emit('goPay', $event)" |
| | | @paySuccess="emit('paySuccess', $event)" |
| | | /> |
| | | </template> |
| | | |
| | |
| | | import GasBillRechargeStep2 from './GasBillRechargeStep2.vue'; |
| | | import GasBillRechargeStep3 from './GasBillRechargeStep3.vue'; |
| | | import { LifeRechargeConstants } from '@life-payment/core-vue'; |
| | | import { RechargeProps } from '../PhoneBillRecharge/types'; |
| | | |
| | | defineOptions({ |
| | | name: 'GasBillRecharge', |
| | | }); |
| | | |
| | | type Props = { |
| | | isDev?: boolean; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | const props = withDefaults(defineProps<RechargeProps>(), { |
| | | isDev: false, |
| | | }); |
| | | |
| | |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goPay', orderNo: string): void; |
| | | (e: 'paySuccess', orderNo: string): void; |
| | | }>(); |
| | | |
| | | const preSetForm = reactive({ |
| | |
| | | const rules = reactive<FormRules>({ |
| | | province: [{ required: true, message: '请选择所在区域' }], |
| | | city: [{ required: true, message: '请选择所在城市' }], |
| | | gasAccount: [{ required: true, message: '请输入缴费户号', regex: /^\d{13}$/ }], |
| | | // gasAccount: [{ required: true, message: '请输入缴费户号', regex: /^\d{13}$/ }], |
| | | gasAccount: [{ required: true, message: '请输入缴费户号' }], |
| | | areaList: [ |
| | | { required: true, message: '请选择所在城市', validator: FormValidator.validatorArray }, |
| | | ], |
| | |
| | | </NutRadio> |
| | | </NutRadioGroup> |
| | | </NutFormItem> |
| | | <SelectPayTypeFormItem v-model="form.lifePayType"></SelectPayTypeFormItem> |
| | | <div class="common-content"> |
| | | <nut-button class="recharge-button" type="primary" @click="handleSubmit"> |
| | | <div class="recharge-button-inner"> |
| | |
| | | Button as NutButton, |
| | | } from '@nutui/nutui-taro'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { reactive, ref, computed } from 'vue'; |
| | | import { reactive, ref, computed, toRef } from 'vue'; |
| | | import { |
| | | useLifeRechargeContext, |
| | | LifeElectricDataCreateLifePayOrderInput, |
| | |
| | | } from '@life-payment/core-vue'; |
| | | import { useGetRate, useGetGasParValue, useSetUserAccountBySelect } from '../../hooks'; |
| | | import { useGasBillRechargeContext, GasUserAccountExtraProperties } from './context'; |
| | | import { FormValidator } from '../../utils'; |
| | | import { FormValidator, initLifePayType } from '../../utils'; |
| | | import { CustomerServiceTips } from '../../constants'; |
| | | import AccountAddCard from '../../components/Card/AccountAddCard.vue'; |
| | | import AccountCard from '../../components/Card/AccountCard.vue'; |
| | | import RechargeTipsView from '../../components/RechargeTipsView/RechargeTipsView.vue'; |
| | | import ConfirmDialog from '../../components/Dialog/ConfirmDialog.vue'; |
| | | import ConfirmDialogInfoItem from '../../components/Dialog/ConfirmDialogInfoItem.vue'; |
| | | import SelectPayTypeFormItem from '../../components/SelectPayTypeFormItem/SelectPayTypeFormItem.vue'; |
| | | import { useSelectPayType, useGetPayStatusByOrderNo } from '../../hooks/selectPayType'; |
| | | import { RechargeProps } from '../PhoneBillRecharge/types'; |
| | | |
| | | defineOptions({ |
| | | name: 'GasBillRechargeStep3', |
| | | }); |
| | | |
| | | type Props = { |
| | | isDev?: boolean; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | const props = withDefaults(defineProps<RechargeProps>(), { |
| | | isDev: false, |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goPay', orderNo: string): void; |
| | | (e: 'paySuccess', orderNo: string): void; |
| | | }>(); |
| | | |
| | | const { goTo } = useGasBillRechargeContext(); |
| | |
| | | currentUserAccountId: '', |
| | | remark: '', |
| | | areaList: [] as string[], |
| | | lifePayType: initLifePayType(props.isInWeChat, props.isInAlipay), |
| | | }); |
| | | |
| | | const { userAccountAllList, handleUserAccountChange } = useSetUserAccountBySelect({ |
| | |
| | | { required: true, message: '请选择充值金额', validator: FormValidator.validatorNumberNotNull }, |
| | | ], |
| | | currentUserAccountId: [{ required: true, message: '请选择充值户号' }], |
| | | lifePayType: [{ required: true, message: '请选择支付方式' }], |
| | | }); |
| | | |
| | | const formRef = ref<any>(null); |
| | |
| | | confirmDialogVisible.value = true; |
| | | } |
| | | |
| | | const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({ |
| | | openId: toRef(props, 'openId'), |
| | | isInWeChat: toRef(props, 'isInWeChat'), |
| | | isH5: toRef(props, 'isH5'), |
| | | appId: toRef(props, 'appId'), |
| | | }); |
| | | |
| | | const currentOrderNo = ref(''); |
| | | |
| | | async function goPay() { |
| | | try { |
| | | let params: LifeGasDataCreateLifePayOrderInput = { |
| | |
| | | }, |
| | | }; |
| | | let res = await blLifeRecharge.services.createLifePayGasOrder(params); |
| | | emit('goPay', res.orderNo); |
| | | // emit('goPay', res.orderNo); |
| | | if (form.lifePayType === LifeRechargeConstants.LifePayTypeEnum.WxPay) { |
| | | await invokeWeixinPay(res.orderNo); |
| | | } else { |
| | | await invokeAliPay(res.orderNo); |
| | | } |
| | | currentOrderNo.value = res.orderNo; |
| | | } catch (error) {} |
| | | } |
| | | |
| | | useGetPayStatusByOrderNo({ |
| | | orderNo: currentOrderNo, |
| | | enabled: computed(() => props.isFocus && !!currentOrderNo.value), |
| | | onPaySuccess: (orderNo) => { |
| | | emit('paySuccess', orderNo); |
| | | currentOrderNo.value = ''; |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | v-else-if="current === 'step2'" |
| | | v-bind="props" |
| | | @go-pay="emit('goPay', $event)" |
| | | @paySuccess="emit('paySuccess', $event)" |
| | | /> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { computed, provide } from 'vue'; |
| | | import { computed, provide, useAttrs } from 'vue'; |
| | | import { useStepper } from 'senin-mini/hooks'; |
| | | import { PhoneBillRechargeContextKey } from './context'; |
| | | import PhoneBillRechargeStep1 from './PhoneBillRechargeStep1.vue'; |
| | | import PhoneBillRechargeStep2 from './PhoneBillRechargeStep2.vue'; |
| | | import { RechargeProps } from './types'; |
| | | |
| | | defineOptions({ |
| | | name: 'PhoneBillRecharge', |
| | | }); |
| | | |
| | | type Props = { |
| | | isDev?: boolean; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | const props = withDefaults(defineProps<RechargeProps>(), { |
| | | isDev: false, |
| | | }); |
| | | |
| | |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goPay', orderNo: string): void; |
| | | (e: 'paySuccess', orderNo: string): void; |
| | | }>(); |
| | | |
| | | provide(PhoneBillRechargeContextKey, { |
| | |
| | | </NutRadio> |
| | | </NutRadioGroup> |
| | | </NutFormItem> |
| | | <SelectPayTypeFormItem v-model="form.lifePayType"></SelectPayTypeFormItem> |
| | | <div class="common-content"> |
| | | <nut-button class="recharge-button" type="primary" @click="handleSubmit"> |
| | | <div class="recharge-button-inner"> |
| | |
| | | <ConfirmDialogInfoItem label="实付金额" :content="`¥${realParValue}`" danger /> |
| | | </template> |
| | | </ConfirmDialog> |
| | | <NutToast :msg="state.msg" v-model:visible="state.show" type="warn" cover /> |
| | | </NutForm> |
| | | </template> |
| | | |
| | |
| | | Radio as NutRadio, |
| | | Input as NutInput, |
| | | Button as NutButton, |
| | | Toast as NutToast, |
| | | } from '@nutui/nutui-taro'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { reactive, ref, computed, provide } from 'vue'; |
| | | import { FormValidator } from '../../utils'; |
| | | import { reactive, ref, computed, toRef } from 'vue'; |
| | | import { FormValidator, initLifePayType } from '../../utils'; |
| | | import { |
| | | useLifeRechargeContext, |
| | | BlLifeRecharge, |
| | |
| | | import AccountAddCard from '../../components/Card/AccountAddCard.vue'; |
| | | import AccountCard from '../../components/Card/AccountCard.vue'; |
| | | import { usePhoneBillRechargeContext, PhoneUserAccountExtraProperties } from './context'; |
| | | import SelectPayTypeFormItem from '../../components/SelectPayTypeFormItem/SelectPayTypeFormItem.vue'; |
| | | import { useSelectPayType, useGetPayStatusByOrderNo } from '../../hooks/selectPayType'; |
| | | import { RechargeProps } from './types'; |
| | | |
| | | defineOptions({ |
| | | name: 'PhoneBillRechargeStep2', |
| | | }); |
| | | |
| | | type Props = { |
| | | isDev?: boolean; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | const props = withDefaults(defineProps<RechargeProps>(), { |
| | | isDev: false, |
| | | }); |
| | | |
| | |
| | | name: '', |
| | | currentUserAccountId: '', |
| | | remark: '', |
| | | lifePayType: initLifePayType(props.isInWeChat, props.isInAlipay), |
| | | }); |
| | | |
| | | const { userAccountAllList, handleUserAccountChange } = useSetUserAccountBySelect({ |
| | |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goPay', orderNo: string): void; |
| | | (e: 'paySuccess', orderNo: string): void; |
| | | }>(); |
| | | |
| | | const { lifePayPhoneRate } = useGetRate(); |
| | |
| | | { required: true, message: '请选择充值金额', validator: FormValidator.validatorNumberNotNull }, |
| | | ], |
| | | currentUserAccountId: [{ required: true, message: '请选择充值手机号' }], |
| | | lifePayType: [{ required: true, message: '请选择支付方式' }], |
| | | }); |
| | | |
| | | const formRef = ref<any>(null); |
| | |
| | | confirmDialogVisible.value = true; |
| | | } |
| | | |
| | | const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({ |
| | | openId: toRef(props, 'openId'), |
| | | isInWeChat: toRef(props, 'isInWeChat'), |
| | | isH5: toRef(props, 'isH5'), |
| | | appId: toRef(props, 'appId'), |
| | | }); |
| | | |
| | | const currentOrderNo = ref(''); |
| | | |
| | | async function goPay() { |
| | | try { |
| | | let params: LifePhoneDataCreateLifePayOrderInput = { |
| | |
| | | }, |
| | | }; |
| | | let res = await blLifeRecharge.services.createLifePayPhoneOrder(params); |
| | | emit('goPay', res.orderNo); |
| | | // emit('goPay', res.orderNo); |
| | | if (form.lifePayType === LifeRechargeConstants.LifePayTypeEnum.WxPay) { |
| | | await invokeWeixinPay(res.orderNo); |
| | | } else { |
| | | await invokeAliPay(res.orderNo); |
| | | } |
| | | currentOrderNo.value = res.orderNo; |
| | | } catch (error) {} |
| | | } |
| | | |
| | | useGetPayStatusByOrderNo({ |
| | | orderNo: currentOrderNo, |
| | | enabled: computed(() => props.isFocus && !!currentOrderNo.value), |
| | | onPaySuccess: (orderNo) => { |
| | | emit('paySuccess', orderNo); |
| | | currentOrderNo.value = ''; |
| | | }, |
| | | }); |
| | | </script> |
New file |
| | |
| | | export type RechargeProps = { |
| | | isDev?: boolean; |
| | | openId?: string; |
| | | isInWeChat?: boolean; |
| | | isH5?: boolean; |
| | | appId?: string; |
| | | isFocus?: boolean; |
| | | isInAlipay?: boolean; |
| | | }; |
| | |
| | | <template> |
| | | <MainCell title="生活缴费"> |
| | | <Grid square :gutter="20" :column-num="3" class="recharge-grid-wrapper"> |
| | | <Grid square :gutter="20" :column-num="2" class="recharge-grid-wrapper"> |
| | | <GridItem class="recharge-grid-item" text="话费" @click="emit('phoneBillRecharge')"> |
| | | <img :src="IconFreePhone" class="recharge-grid-item-icon" /> |
| | | </GridItem> |
| | | <GridItem class="recharge-grid-item" text="电费" @click="emit('electricityBillRecharge')"> |
| | | <img :src="IconFreeDian" class="recharge-grid-item-icon" /> |
| | | </GridItem> |
| | | <GridItem class="recharge-grid-item" text="燃气" @click="emit('gasBillRecharge')"> |
| | | <!-- <GridItem class="recharge-grid-item" text="燃气" @click="emit('gasBillRecharge')"> |
| | | <img :src="IconFreeGas" class="recharge-grid-item-icon" /> |
| | | </GridItem> |
| | | </GridItem> --> |
| | | </Grid> |
| | | </MainCell> |
| | | </template> |
| | |
| | | <script setup lang="ts"> |
| | | import IconWeixin from '../../assets/icon-weixin-pay.png'; |
| | | import IconAliPay from '../../assets/icon-alipay.png'; |
| | | import { |
| | | useLifeRechargeContext, |
| | | SetLifePayOrderPayTypeInput, |
| | | LifeRechargeConstants, |
| | | GetPayOrderForJsAPIInput, |
| | | } from '@life-payment/core-vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { LifeRechargeConstants } from '@life-payment/core-vue'; |
| | | import { Toast as NutToast } from '@nutui/nutui-taro'; |
| | | import { onMounted, reactive, ref, computed } from 'vue'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { computed, toRef } from 'vue'; |
| | | import { useSelectPayType, useGetPayStatusByOrderNo } from '../../hooks/selectPayType'; |
| | | |
| | | defineOptions({ |
| | | name: 'SelectPayTypeView', |
| | |
| | | (e: 'payOrderForJsAPISuccess'): void; |
| | | }>(); |
| | | |
| | | const state = reactive({ |
| | | show: false, |
| | | msg: '', |
| | | const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({ |
| | | openId: toRef(props, 'openId'), |
| | | isInWeChat: toRef(props, 'isInWeChat'), |
| | | isH5: toRef(props, 'isH5'), |
| | | appId: toRef(props, 'appId'), |
| | | }); |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | async function handleAliPay() { |
| | | try { |
| | | let res = await setLifePayOrderPayType(blLifeRecharge.constants.LifePayTypeEnum.AliPay); |
| | | if (res) { |
| | | location.href = res; |
| | | } |
| | | } catch (error) {} |
| | | function handleAliPay() { |
| | | invokeAliPay(props.orderNo); |
| | | } |
| | | |
| | | async function handleWeixinPay() { |
| | | if (props.isH5) { |
| | | if (props.isInWeChat) { |
| | | handleWeixinPayByJsApi(); |
| | | } else { |
| | | // try { |
| | | // let res = await setLifePayOrderPayType(blLifeRecharge.constants.LifePayTypeEnum.WxPay); |
| | | // if (res) { |
| | | // location.href = res; |
| | | // } |
| | | // } catch (error) {} |
| | | state.msg = '请在微信中打开'; |
| | | state.show = true; |
| | | } |
| | | } else if (Taro.getEnv() === Taro.ENV_TYPE.WEAPP) { |
| | | handleWeixinPayByMini(); |
| | | } |
| | | function handleWeixinPay() { |
| | | invokeWeixinPay(props.orderNo); |
| | | } |
| | | |
| | | async function getPayOrderForJsAPI() { |
| | | try { |
| | | let params: GetPayOrderForJsAPIInput = { |
| | | orderNo: props.orderNo, |
| | | lifePayType: blLifeRecharge.constants.LifePayTypeEnum.WxPay, |
| | | openId: props.openId, |
| | | attach: Date.now().toString(), |
| | | payAppId: props.appId, |
| | | }; |
| | | let res = await blLifeRecharge.services.getPayOrderForJsAPI(params); |
| | | return res; |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleWeixinPayByJsApi() { |
| | | try { |
| | | let res = await getPayOrderForJsAPI(); |
| | | |
| | | if (res) { |
| | | //@ts-ignore |
| | | if (WeixinJSBridge) { |
| | | //@ts-ignore |
| | | WeixinJSBridge.invoke( |
| | | 'getBrandWCPayRequest', |
| | | { |
| | | appId: props.appId, //公众号ID,由商户传入 |
| | | timeStamp: res.timestamp, //时间戳,自1970年以来的秒数 |
| | | nonceStr: res.nonceStr, //随机串 |
| | | package: res.package, |
| | | signType: res.signType, //微信签名方式: |
| | | paySign: res.paySign, //微信签名 |
| | | }, |
| | | function (res) { |
| | | if (res.err_msg == 'get_brand_wcpay_request:ok') { |
| | | // 使用以上方式判断前端返回,微信团队郑重提示: |
| | | //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠,商户需进一步调用后端查单确认支付结果。 |
| | | } else if (res.err_msg == 'system:access_denied') { |
| | | state.msg = '请在手机微信中打开'; |
| | | state.show = true; |
| | | } else { |
| | | // state.msg = res.err_msg; |
| | | // state.show = true; |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleWeixinPayByMini() { |
| | | try { |
| | | let res = await getPayOrderForJsAPI(); |
| | | |
| | | if (res) { |
| | | Taro.requestPayment({ |
| | | timeStamp: res.timestamp, |
| | | nonceStr: res.nonceStr, |
| | | package: res.package, |
| | | signType: res.signType as any, |
| | | paySign: res.paySign, |
| | | success: function (res) { |
| | | console.log('res: ', res); |
| | | // if(res.errMsg) |
| | | }, |
| | | fail: function (res) {}, |
| | | }); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function setLifePayOrderPayType(lifePayType: LifeRechargeConstants.LifePayTypeEnum) { |
| | | try { |
| | | let params: SetLifePayOrderPayTypeInput = { |
| | | orderNo: props.orderNo, |
| | | lifePayType: lifePayType, |
| | | }; |
| | | return await blLifeRecharge.services.setLifePayOrderPayType(params); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | useQuery({ |
| | | queryKey: ['platformServicePayServices/getPayStatusByOrderNo', props.orderNo], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getPayStatusByOrderNo( |
| | | { |
| | | orderNo: props.orderNo, |
| | | }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | onSuccess(data) { |
| | | if (data !== blLifeRecharge.constants.LifePayStatusEnum.未支付) { |
| | | emit('paySuccess', props.orderNo, props.lifePayOrderType); |
| | | } |
| | | }, |
| | | refetchInterval: 1000 * 3, |
| | | useGetPayStatusByOrderNo({ |
| | | orderNo: toRef(props, 'orderNo'), |
| | | enabled: computed(() => props.isFocus), |
| | | onPaySuccess() { |
| | | emit('paySuccess', props.orderNo, props.lifePayOrderType); |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | Button as NutButton, |
| | | } from '@nutui/nutui-taro'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { reactive, ref, computed } from 'vue'; |
| | | import { reactive, ref, computed, toRef } from 'vue'; |
| | | import { |
| | | useLifeRechargeContext, |
| | | LifeElectricDataCreateLifePayOrderInput, |
| | |
| | | import ConfirmDialog from '../../components/Dialog/ConfirmDialog.vue'; |
| | | import ConfirmDialogInfoItem from '../../components/Dialog/ConfirmDialogInfoItem.vue'; |
| | | import { useGetRate, useGetElectricParValue, useSetUserAccountBySelect } from '../../hooks'; |
| | | import { FormValidator } from '../../utils'; |
| | | import { FormValidator, initLifePayType } from '../../utils'; |
| | | import { CustomerServiceTips } from '../../constants'; |
| | | import AccountAddCard from '../../components/Card/AccountAddCard.vue'; |
| | | import AccountCard from '../../components/Card/AccountCard.vue'; |
| | | import { useElectricBillRechargeContext, ElectricUserAccountExtraProperties } from './context'; |
| | | import SelectPayTypeFormItem from '../../components/SelectPayTypeFormItem/SelectPayTypeFormItem.vue'; |
| | | import { useSelectPayType, useGetPayStatusByOrderNo } from '../../hooks/selectPayType'; |
| | | import { RechargeProps } from '../PhoneBillRecharge/types'; |
| | | |
| | | defineOptions({ |
| | | name: 'ElectricBillRechargeStep2', |
| | | }); |
| | | |
| | | type Props = { |
| | | isDev?: boolean; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | const props = withDefaults(defineProps<RechargeProps>(), { |
| | | isDev: false, |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goPay', orderNo: string): void; |
| | | (e: 'paySuccess', orderNo: string): void; |
| | | }>(); |
| | | |
| | | const { goTo } = useElectricBillRechargeContext(); |
| | |
| | | sixID: '', |
| | | currentUserAccountId: '', |
| | | remark: '', |
| | | lifePayType: initLifePayType(props.isInWeChat, props.isInAlipay), |
| | | }); |
| | | |
| | | const { userAccountAllList, handleUserAccountChange } = useSetUserAccountBySelect({ |
| | |
| | | { required: true, message: '请选择充值金额', validator: FormValidator.validatorNumberNotNull }, |
| | | ], |
| | | currentUserAccountId: [{ required: true, message: '请选择充值户号' }], |
| | | lifePayType: [{ required: true, message: '请选择支付方式' }], |
| | | }); |
| | | |
| | | const formRef = ref<any>(null); |
| | |
| | | confirmDialogVisible.value = true; |
| | | } |
| | | |
| | | const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({ |
| | | openId: toRef(props, 'openId'), |
| | | isInWeChat: toRef(props, 'isInWeChat'), |
| | | isH5: toRef(props, 'isH5'), |
| | | appId: toRef(props, 'appId'), |
| | | }); |
| | | |
| | | const currentOrderNo = ref(''); |
| | | |
| | | async function goPay() { |
| | | try { |
| | | let params: LifeElectricDataCreateLifePayOrderInput = { |
| | |
| | | }, |
| | | }; |
| | | let res = await blLifeRecharge.services.createLifePayElectricOrder(params); |
| | | emit('goPay', res.orderNo); |
| | | // emit('goPay', res.orderNo); |
| | | if (form.lifePayType === LifeRechargeConstants.LifePayTypeEnum.WxPay) { |
| | | await invokeWeixinPay(res.orderNo); |
| | | } else { |
| | | await invokeAliPay(res.orderNo); |
| | | } |
| | | currentOrderNo.value = res.orderNo; |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | |
| | | v-else-if="current === 'step2'" |
| | | v-bind="props" |
| | | @go-pay="emit('goPay', $event)" |
| | | @paySuccess="emit('paySuccess', $event)" |
| | | /> |
| | | </template> |
| | | |
| | |
| | | import { ElectricBillRechargeContextKey } from './context'; |
| | | import ElectricBillRechargeStep1 from './ElectricBillRechargeStep1.vue'; |
| | | import ElectricBillRechargeStep2 from './ElectricBillRechargeStep2.vue'; |
| | | import { RechargeProps } from '../PhoneBillRecharge/types'; |
| | | |
| | | defineOptions({ |
| | | name: 'electricBillRecharge', |
| | | }); |
| | | |
| | | type Props = { |
| | | isDev?: boolean; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | const props = withDefaults(defineProps<RechargeProps>(), { |
| | | isDev: false, |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goPay', orderNo: string): void; |
| | | (e: 'paySuccess', orderNo: string): void; |
| | | }>(); |
| | | |
| | | const stepperInfo = useStepper(['step1', 'step2'], 'step2'); |
| | |
| | | AliPay = 20, |
| | | } |
| | | |
| | | export const LifePayTypeEnumText = { |
| | | [LifePayTypeEnum.WxPay]: '微信支付', |
| | | [LifePayTypeEnum.AliPay]: '支付宝支付', |
| | | }; |
| | | |
| | | export enum LifePayOrderTypeEnum { |
| | | 话费订单 = 10, |
| | | 电费订单 = 20, |
| | |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 根据绑定邮箱判断用户是否已存在 POST /api/Account/AnyUserByBindEmail */ |
| | | export async function anyUserByBindEmail( |
| | | body: API.AnyUserByBindEmailInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/Account/AnyUserByBindEmail', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 根据手机号判断用户是否已存在 POST /api/Account/AnyUserByPhoneNumber */ |
| | | export async function anyUserByPhoneNumber( |
| | | body: API.AnyUserByPhoneNumberInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/Account/AnyUserByPhoneNumber', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 绑定用户账户邮箱 POST /api/Account/BindUserEmail */ |
| | | export async function bindUserEmail(body: API.BindUserEmailInput, options?: API.RequestConfig) { |
| | | return request<number>('/api/Account/BindUserEmail', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 用户根据当前密码修改密码 POST /api/Account/ChangePasswordFromCurrentPwd */ |
| | | export async function changePasswordFromCurrentPwd( |
| | | body: API.ChangePasswordFromCurrentPwdInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/ChangePasswordFromCurrentPwd', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 用户根据手机号修改密码验证码 POST /api/Account/ChangePasswordFromPhoneNumber */ |
| | | export async function changePasswordFromPhoneNumber( |
| | | body: API.ChangePasswordFromPhoneNumberInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/ChangePasswordFromPhoneNumber', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 未登录下根据手机号修改密码验证码(忘记密码) POST /api/Account/ChangePasswordWithNoLogin */ |
| | | export async function changePasswordWithNoLogin( |
| | | body: API.ChangePasswordFromPhoneNumberInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/ChangePasswordWithNoLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 修改账号 POST /api/Account/ChangeUserName */ |
| | | export async function changeUserName(body: API.ChangeUserNameInput, options?: API.RequestConfig) { |
| | | return request<number>('/api/Account/ChangeUserName', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 管理员更改用户登录手机号 POST /api/Account/ChangeUserPhoneNumberForAdmin */ |
| | | export async function changeUserPhoneNumberForAdmin( |
| | | body: API.ChangePhoneNumberInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/ChangeUserPhoneNumberForAdmin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 用户更改登录手机号 POST /api/Account/ChangeUserPhoneNumberForUser */ |
| | | export async function changeUserPhoneNumberForUser( |
| | | body: API.ChangeUserPhoneNumberForUserInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/ChangeUserPhoneNumberForUser', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 管理员创建用户 POST /api/Account/CreateUserForAdmin */ |
| | | export async function createUserForAdmin( |
| | | body: API.CreateUserForAdminInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/CreateUserForAdmin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 生成账号 POST /api/Account/GenerateUserName */ |
| | | export async function generateUserName( |
| | | body: API.GenerateUserNameInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/Account/GenerateUserName', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取生活缴费用户身份会话信息 GET /api/Account/GetLifePayWxIndentity */ |
| | | export async function getLifePayWxIndentity( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取扫码登录二维码信息 GET /api/Account/GetQrCodeForLogin */ |
| | | export async function getQrCodeForLogin(options?: API.RequestConfig) { |
| | | return request<API.QrCodeLogin>('/api/Account/GetQrCodeForLogin', { |
| | | method: 'GET', |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取扫码登录结果 GET /api/Account/GetQrCodeLoginResult */ |
| | | export async function getQrCodeLoginResult( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetQrCodeLoginResultParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.WxMiniAppLoginInfo>('/api/Account/GetQrCodeLoginResult', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 电子签登录 POST /api/Account/GetTokenForUserSign */ |
| | | export async function getTokenForUserSign(body: API.AccessRequestDto, options?: API.RequestConfig) { |
| | | return request<API.IdentityModelTokenCacheItem>('/api/Account/GetTokenForUserSign', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 此处后端没有提供注释 POST /api/Account/GetTokenForWeb */ |
| | | export async function getTokenForWeb(body: API.AccessRequestDto, options?: API.RequestConfig) { |
| | | return request<API.IdentityModelTokenCacheItem>('/api/Account/GetTokenForWeb', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取微信小程序用户身份会话信息 GET /api/Account/GetWxIndentity */ |
| | | export async function getWxIndentity( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetWxIndentityParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.WxMiniAppIndentityInfo>('/api/Account/GetWxIndentity', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取学社公众号文章 GET /api/Account/GetWxPublishWriting */ |
| | | export async function getWxPublishWriting(options?: API.RequestConfig) { |
| | | return request<API.InformationShowListDtoPageOutput>('/api/Account/GetWxPublishWriting', { |
| | | method: 'GET', |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 判断用户绑定邮箱是否重复 GET /api/Account/IsRepeatByBindEmail */ |
| | | export async function isRepeatByBindEmail( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIisRepeatByBindEmailParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/Account/IsRepeatByBindEmail', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 企业名称是否重复 GET /api/Account/IsRepeatByIsRepeatByEnterpriseName */ |
| | | export async function isRepeatByIsRepeatByEnterpriseName( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIisRepeatByIsRepeatByEnterpriseNameParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/Account/IsRepeatByIsRepeatByEnterpriseName', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 判断用户手机号是否重复 GET /api/Account/IsRepeatByPhoneNumber */ |
| | | export async function isRepeatByPhoneNumber( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIisRepeatByPhoneNumberParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/Account/IsRepeatByPhoneNumber', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** life pay手机验证码登录 POST /api/Account/LifePayPhoneMesssageCodeLogin */ |
| | | export async function lifePayPhoneMesssageCodeLogin( |
| | | body: API.LifePayPhoneMesssageCodeLoginInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/Account/LifePayPhoneMesssageCodeLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 密码登录 POST /api/Account/PasswordLogin */ |
| | | export async function passwordLogin(body: API.PasswordLoginInput, options?: API.RequestConfig) { |
| | | return request<API.IdentityModelTokenCacheItem>('/api/Account/PasswordLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 验证码登录 POST /api/Account/PhoneMesssageCodeLogin */ |
| | | export async function phoneMesssageCodeLogin( |
| | | body: API.PhoneMesssageCodeLoginInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.IdentityModelTokenCacheItem>('/api/Account/PhoneMesssageCodeLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 手机号验证码注册注册 POST /api/Account/PhoneMesssageCodeRegister */ |
| | | export async function phoneMesssageCodeRegister( |
| | | body: API.PhoneMesssageCodeRegisterInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/PhoneMesssageCodeRegister', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 重置密码并发送手机通知新密码 POST /api/Account/ResetPasswordWithMicroNotify */ |
| | | export async function resetPasswordWithMicroNotify( |
| | | body: API.ResetPasswordBaseInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/ResetPasswordWithMicroNotify', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 发送登录注册短信验证码 POST /api/Account/SendPhoneMesssageCode */ |
| | | export async function sendPhoneMesssageCode( |
| | | body: API.SendPhoneMesssageCodeInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/SendPhoneMesssageCode', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 解绑用户邮箱 POST /api/Account/UnbindingUserEmail */ |
| | | export async function unbindingUserEmail( |
| | | body: API.UnbindingUserEmailInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/UnbindingUserEmail', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 解绑用户手机号 POST /api/Account/UnbindingUserPhoneNumber */ |
| | | export async function unbindingUserPhoneNumber( |
| | | body: API.UnbindingUserPhoneNumber, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/Account/UnbindingUserPhoneNumber', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 识别营业执照 GET /api/Account/VatLicense */ |
| | | export async function vatLicense( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIvatLicenseParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.LicenseOcrModel>('/api/Account/VatLicense', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 小程序手机授权注册登录 POST /api/Account/WxMiniAppPhoneAuthLogin */ |
| | | export async function wxMiniAppPhoneAuthLogin( |
| | | body: API.WxMiniAppPhoneLoginInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.IdentityModelTokenCacheItem>('/api/Account/WxMiniAppPhoneAuthLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 小程序扫码手机授权注册登录 POST /api/Account/WxMiniAppPhoneAuthLoginFromScan */ |
| | | export async function wxMiniAppPhoneAuthLoginFromScan( |
| | | body: API.WxMiniAppPhoneAuthLoginFromScanInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.IdentityModelTokenCacheItem>('/api/Account/WxMiniAppPhoneAuthLoginFromScan', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 已有小程序用户确认登录 GET /api/Account/WxMiniAppUserLogin */ |
| | | export async function wxMiniAppUserLogin( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIwxMiniAppUserLoginParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<any>('/api/Account/WxMiniAppUserLogin', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 已有小程序用户扫码确认登录 POST /api/Account/WxMiniAppUserLoginFromScan */ |
| | | export async function wxMiniAppUserLoginFromScan( |
| | | body: API.WxMiniAppUserLoginFromScanInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.IdentityModelTokenCacheItem>('/api/Account/WxMiniAppUserLoginFromScan', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 单笔转账到支付宝账户、单笔转账到银行卡、C2C现金红包、B2C现金红包单据状态变更后触发的通知 POST /api/AliPayNotify/FundTransOrderChangedForRecharge */ |
| | | export async function fundTransOrderChangedForRecharge( |
| | | body: API.FundOrderChangedInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<any>('/api/AliPayNotify/FundTransOrderChangedForRecharge', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 用户签约结果通知 POST /api/AliPayNotify/NotityPageSign */ |
| | | export async function notityPageSign(options?: API.RequestConfig) { |
| | | return request<any>('/api/AliPayNotify/NotityPageSign', { |
| | | method: 'POST', |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 此处后端没有提供注释 GET /api/AliPayNotify/TestAliRechargeNotify */ |
| | | export async function testAliRechargeNotify( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | |
| | | import * as AbpApplicationConfiguration from './AbpApplicationConfiguration'; |
| | | import * as Account from './Account'; |
| | | import * as ACOOLYNotify from './ACOOLYNotify'; |
| | | import * as AdvertiseBoard from './AdvertiseBoard'; |
| | | import * as AdvertiseOnShow from './AdvertiseOnShow'; |
| | | import * as Alipay from './Alipay'; |
| | | import * as AlipayEcsignNotify from './AlipayEcsignNotify'; |
| | | import * as AliPayNotify from './AliPayNotify'; |
| | | import * as Area from './Area'; |
| | | import * as BaseModule from './BaseModule'; |
| | | import * as BestSign from './BestSign'; |
| | | import * as BestSignCallBack from './BestSignCallBack'; |
| | | import * as CaiNiao from './CaiNiao'; |
| | | import * as CaiNiaoCallBack from './CaiNiaoCallBack'; |
| | | import * as CircleFriend from './CircleFriend'; |
| | | import * as Common from './Common'; |
| | | import * as CompanyInsure from './CompanyInsure'; |
| | | import * as Consult from './Consult'; |
| | | import * as CooperationApply from './CooperationApply'; |
| | | import * as Customer from './Customer'; |
| | | import * as EnterpriseMaterial from './EnterpriseMaterial'; |
| | | import * as Features from './Features'; |
| | | import * as FirstPartyCompany from './FirstPartyCompany'; |
| | | import * as Fund from './Fund'; |
| | | import * as HeadHunter from './HeadHunter'; |
| | | import * as HelpQuestion from './HelpQuestion'; |
| | | import * as IdentityRole from './IdentityRole'; |
| | | import * as IdentityUser from './IdentityUser'; |
| | | import * as IdentityUserLookup from './IdentityUserLookup'; |
| | | import * as IncentivePayments from './IncentivePayments'; |
| | | import * as IndustrialPark from './IndustrialPark'; |
| | | import * as IndustryBody from './IndustryBody'; |
| | | import * as IndustryMating from './IndustryMating'; |
| | | import * as Information from './Information'; |
| | | import * as Insurance from './Insurance'; |
| | | import * as InsureConsult from './InsureConsult'; |
| | | import * as InsureMarketProduct from './InsureMarketProduct'; |
| | | import * as InsureOfflineBill from './InsureOfflineBill'; |
| | | import * as InsureOrganization from './InsureOrganization'; |
| | | import * as InsureSupplier from './InsureSupplier'; |
| | | import * as LgGigWorker from './LgGigWorker'; |
| | | import * as LgGigWorkerCustomerTemplateParam from './LgGigWorkerCustomerTemplateParam'; |
| | | import * as LgGigWorkerReCharge from './LgGigWorkerReCharge'; |
| | | import * as LgGigWorkerSignChannelSetting from './LgGigWorkerSignChannelSetting'; |
| | | import * as LgGigWorkerSignFreeSetting from './LgGigWorkerSignFreeSetting'; |
| | | import * as LgGigWorkerSignSetting from './LgGigWorkerSignSetting'; |
| | | import * as LifePay from './LifePay'; |
| | | import * as Message from './Message'; |
| | | import * as OpenInformation from './OpenInformation'; |
| | | import * as OperateHistory from './OperateHistory'; |
| | | import * as Order from './Order'; |
| | | import * as ParkOrHR from './ParkOrHR'; |
| | | import * as ParkReward from './ParkReward'; |
| | | import * as Permissions from './Permissions'; |
| | | import * as PhoneMessage from './PhoneMessage'; |
| | | import * as PhonMessageHistory from './PhonMessageHistory'; |
| | | import * as PingAn from './PingAn'; |
| | | import * as PingAnBEDL from './PingAnBEDL'; |
| | | import * as PingAnELCP from './PingAnELCP'; |
| | | import * as PingAnJGF from './PingAnJGF'; |
| | | import * as PlatformServicePay from './PlatformServicePay'; |
| | | import * as PlatUserAccountSetting from './PlatUserAccountSetting'; |
| | | import * as Product from './Product'; |
| | | import * as Profile from './Profile'; |
| | | import * as Purchase from './Purchase'; |
| | | import * as Recharge from './Recharge'; |
| | | import * as Resource from './Resource'; |
| | | import * as SearchSetting from './SearchSetting'; |
| | | import * as Setting from './Setting'; |
| | | import * as Statistics from './Statistics'; |
| | | import * as SysOrg from './SysOrg'; |
| | | import * as SystemNotice from './SystemNotice'; |
| | | import * as Tenant from './Tenant'; |
| | | import * as TencentUser from './TencentUser'; |
| | | import * as Test from './Test'; |
| | | import * as ThirdPartCallBack from './ThirdPartCallBack'; |
| | | import * as Training from './Training'; |
| | | import * as User from './User'; |
| | | import * as UserRole from './UserRole'; |
| | | import * as Version from './Version'; |
| | | import * as Wallet from './Wallet'; |
| | | import * as WalletChannel from './WalletChannel'; |
| | | import * as Withdraw from './Withdraw'; |
| | | import * as WxNotify from './WxNotify'; |
| | | import * as WxPayNotify from './WxPayNotify'; |
| | | export default { |
| | | AbpApiDefinition, |
| | | AbpApplicationConfiguration, |
| | | Account, |
| | | ACOOLYNotify, |
| | | AdvertiseBoard, |
| | | AdvertiseOnShow, |
| | | Alipay, |
| | | AlipayEcsignNotify, |
| | | AliPayNotify, |
| | | Area, |
| | | BaseModule, |
| | | BestSign, |
| | | BestSignCallBack, |
| | | CaiNiao, |
| | | CaiNiaoCallBack, |
| | | CircleFriend, |
| | | Common, |
| | | CompanyInsure, |
| | | Consult, |
| | | CooperationApply, |
| | | Customer, |
| | | EnterpriseMaterial, |
| | | Features, |
| | | FirstPartyCompany, |
| | | Fund, |
| | | HeadHunter, |
| | | HelpQuestion, |
| | | IdentityRole, |
| | | IdentityUser, |
| | | IdentityUserLookup, |
| | | IncentivePayments, |
| | | IndustrialPark, |
| | | IndustryBody, |
| | | IndustryMating, |
| | | Information, |
| | | Insurance, |
| | | InsureConsult, |
| | | InsureMarketProduct, |
| | | InsureOfflineBill, |
| | | InsureOrganization, |
| | | InsureSupplier, |
| | | LgGigWorker, |
| | | LgGigWorkerCustomerTemplateParam, |
| | | LgGigWorkerReCharge, |
| | | LgGigWorkerSignChannelSetting, |
| | | LgGigWorkerSignFreeSetting, |
| | | LgGigWorkerSignSetting, |
| | | LifePay, |
| | | Message, |
| | | OpenInformation, |
| | | OperateHistory, |
| | | Order, |
| | | ParkOrHR, |
| | | ParkReward, |
| | | Permissions, |
| | | PhoneMessage, |
| | | PhonMessageHistory, |
| | | PingAn, |
| | | PingAnBEDL, |
| | | PingAnELCP, |
| | | PingAnJGF, |
| | | PlatformServicePay, |
| | | PlatUserAccountSetting, |
| | | Product, |
| | | Profile, |
| | | Purchase, |
| | | Recharge, |
| | | Resource, |
| | | SearchSetting, |
| | | Setting, |
| | | Statistics, |
| | | SysOrg, |
| | | SystemNotice, |
| | | Tenant, |
| | | TencentUser, |
| | | Test, |
| | | ThirdPartCallBack, |
| | | Training, |
| | | User, |
| | | UserRole, |
| | | Version, |
| | | Wallet, |
| | | WalletChannel, |
| | | Withdraw, |
| | | WxNotify, |
| | | WxPayNotify, |
| | | }; |