| | |
| | | ] |
| | | } |
| | | }, |
| | | "libVersion": "3.7.3" |
| | | "libVersion": "3.8.7" |
| | | } |
| | |
| | | |
| | | function submit(value: string) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.applyResult}?promoterIdNumber=${value}`, |
| | | url: `${RouterPath.applyResult}?channelConsultationId=${value}`, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import { ResultWithoutBG } from '@life-payment/components'; |
| | | import { |
| | | APIgetChannelConsultationByIdParams, |
| | | APIgetPromoterParams, |
| | | CreateOrUpdatePromoterInput, |
| | | useLifeRechargeContext, |
| | | } from '@life-payment/core-vue'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'applyAgent', |
| | | name: 'applyResult', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const promoterIdNumber = router.params?.promoterIdNumber ?? ''; |
| | | const channelConsultationId = router.params?.channelConsultationId ?? ''; |
| | | console.log('channelConsultationId: ', channelConsultationId); |
| | | |
| | | function generate() { |
| | | async function getPromoter(phoneNumber: string) { |
| | | try { |
| | | let params: APIgetPromoterParams = { |
| | | phoneNumber: phoneNumber, |
| | | }; |
| | | return await blLifeRecharge.services.getPromoter(params); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function getChannelConsultationById() { |
| | | try { |
| | | let params: APIgetChannelConsultationByIdParams = { |
| | | id: channelConsultationId, |
| | | }; |
| | | return await blLifeRecharge.services.getChannelConsultationById(params); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function createOrUpdatePromoter(name: string, phoneNumber: string) { |
| | | try { |
| | | let params: CreateOrUpdatePromoterInput = { |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | name: name, |
| | | phoneNumber: phoneNumber, |
| | | }; |
| | | return await blLifeRecharge.services.createOrUpdatePromoter(params); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function generate() { |
| | | try { |
| | | if (channelConsultationId) { |
| | | let res = await getChannelConsultationById(); |
| | | if (res) { |
| | | let promoterIdNumber = await getPromoter(res.phoneNumber); |
| | | if (promoterIdNumber) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.generatePromotionCode}?promoterIdNumber=${promoterIdNumber}`, |
| | | url: `${RouterPath.promotionQrcode}?promoterIdNumber=${promoterIdNumber}`, |
| | | }); |
| | | } else { |
| | | let promoterIdNumber = await createOrUpdatePromoter(res.name, res.phoneNumber); |
| | | if (promoterIdNumber) { |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.promotionQrcode}?promoterIdNumber=${res}`, |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | |
| | | companyName: form.companyName, |
| | | customerResources: form.customerResources, |
| | | }; |
| | | console.log('params: ', params); |
| | | let res = await blLifeRecharge.services.createChannelConsultation(params); |
| | | if (res) { |
| | | emit('submit', res); |
| | |
| | | } |
| | | |
| | | /** 创建或更新推广员 POST /api/Promoter/CreateOrUpdatePromoter */ |
| | | async createOrUpdatePromoter(body: API.CreateOrUpdatePromoterInput, options?: API.RequestConfig) { |
| | | async createOrUpdatePromoter(body: CreateOrUpdatePromoterInput, options?: RequestConfig) { |
| | | return this.request<string>('/api/Promoter/CreateOrUpdatePromoter', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取渠道咨询Id GET /api/Promoter/GetChannelConsultationById */ |
| | | async getChannelConsultationById( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: APIgetChannelConsultationByIdParams, |
| | | options?: RequestConfig |
| | | ) { |
| | | return this.request<ChannelConsultationDto>('/api/Promoter/GetChannelConsultationById', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取推广员信息 GET /api/Promoter/GetPromoter */ |
| | | async getPromoter( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: APIgetPromoterParams, |
| | | options?: RequestConfig |
| | | ) { |
| | | return this.request<PromoterDto>('/api/Promoter/GetPromoter', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | /** 备注 */ |
| | | remark?: string; |
| | | } |
| | | |
| | | export interface APIgetChannelConsultationByIdParams { |
| | | id?: string; |
| | | } |
| | | |
| | | export type LifePayChannelAgentType = 1 | 2 | 3; |
| | | |
| | | export type LifePayChannelConsultationFollowupStatus = 1 | 2 | 3 | 4; |
| | | |
| | | export interface ChannelConsultationDto { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 咨询时间 */ |
| | | creationTime?: string; |
| | | /** 咨询人 */ |
| | | name?: string; |
| | | agentType?: LifePayChannelAgentType; |
| | | /** 联系方式 */ |
| | | phoneNumber?: string; |
| | | /** 公司名称 */ |
| | | companyName?: string; |
| | | /** 客户资源 */ |
| | | customerResources?: string; |
| | | /** ID */ |
| | | promoterIdNumber?: string; |
| | | /** 推广员 */ |
| | | promoterName?: string; |
| | | /** 联系方式 */ |
| | | promoterPhoneNumber?: string; |
| | | followupStatus?: LifePayChannelConsultationFollowupStatus; |
| | | /** 最近回访 */ |
| | | lastFollowupTime?: string; |
| | | /** 回访记录 */ |
| | | followupRemark?: string; |
| | | } |
| | | |
| | | export interface APIgetPromoterParams { |
| | | phoneNumber?: string; |
| | | } |
| | | |
| | | export interface PromoterDto { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 咨询时间 */ |
| | | creationTime?: string; |
| | | /** ID */ |
| | | idNumber?: string; |
| | | /** 推广员 */ |
| | | name?: string; |
| | | /** 联系方式 */ |
| | | phoneNumber?: string; |
| | | /** 点击数 */ |
| | | clickCount?: number; |
| | | /** 申请数 */ |
| | | applyCount?: number; |
| | | /** 备注 */ |
| | | remark?: string; |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 话费订单查询 POST /api/LifePay/QueryPhoneOrder */ |
| | | export async function queryPhoneOrder( |
| | | body: API.QueryPhoneOrderRequestInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.QueryPhoneOrderResponse>('/api/LifePay/QueryPhoneOrder', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 退款生活缴费订单 POST /api/LifePay/RefundLifePayOrder */ |
| | | export async function refundLifePayOrder( |
| | | body: API.RefundLifePayOrderInput, |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取渠道咨询Id GET /api/Promoter/GetChannelConsultationById */ |
| | | export async function getChannelConsultationById( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetChannelConsultationByIdParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.ChannelConsultationDto>('/api/Promoter/GetChannelConsultationById', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取渠道咨询回访记录 GET /api/Promoter/GetChannelConsultationFollowupList */ |
| | | export async function getChannelConsultationFollowupList( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 获取推广员信息 GET /api/Promoter/GetPromoter */ |
| | | export async function getPromoter( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetPromoterParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.PromoterDto>('/api/Promoter/GetPromoter', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取推广员列表 POST /api/Promoter/GetPromoters */ |
| | | export async function getPromoters(body: API.GetPromotersInput, options?: API.RequestConfig) { |
| | | return request<API.PromoterDtoPageOutput>('/api/Promoter/GetPromoters', { |
| | |
| | | scope?: string; |
| | | } |
| | | |
| | | type ACOOLYStatusEnum = 10 | 20 | 30 | 40 | 50 | 60; |
| | | type ACOOLYStatusEnum = 10 | 20 | 30 | 40 | 50 | 51 | 60; |
| | | |
| | | interface ActionApiDescriptionModel { |
| | | uniqueName?: string; |
| | |
| | | orderNo?: string; |
| | | } |
| | | |
| | | interface APIgetChannelConsultationByIdParams { |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetChannelConsultationFollowupListParams { |
| | | /** 渠道咨询Id */ |
| | | id?: string; |
| | |
| | | |
| | | interface APIgetParams { |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetPromoterParams { |
| | | phoneNumber?: string; |
| | | } |
| | | |
| | | interface APIgetRolesIdRolesParams { |
| | |
| | | permissions?: PermissionGrantInfoDto[]; |
| | | } |
| | | |
| | | interface PhoneChargeOrderOutput { |
| | | outOrderNo?: string; |
| | | busiOrderNo?: string; |
| | | parValue?: number; |
| | | payAmount?: number; |
| | | status?: string; |
| | | statusText?: string; |
| | | } |
| | | |
| | | interface PhoneParValueOutput { |
| | | ispCode?: string; |
| | | ispName?: string; |
| | |
| | | operateHistoryType?: OperateHistoryTypeEnum; |
| | | } |
| | | |
| | | interface QueryPhoneOrderRequestInput { |
| | | requestNo?: string; |
| | | partnerId?: string; |
| | | service?: string; |
| | | version?: string; |
| | | protocol?: string; |
| | | context?: string; |
| | | ext?: string; |
| | | returnUrl?: string; |
| | | notifyUrl?: string; |
| | | outOrderNo?: string; |
| | | busiOrderNo?: string; |
| | | } |
| | | |
| | | interface QueryPhoneOrderResponse { |
| | | success?: boolean; |
| | | requestNo?: string; |
| | | partnerId?: string; |
| | | service?: string; |
| | | version?: string; |
| | | protocol?: string; |
| | | context?: string; |
| | | ext?: any; |
| | | code?: string; |
| | | message?: string; |
| | | detail?: string; |
| | | phoneChargeOrder?: PhoneChargeOrderOutput; |
| | | } |
| | | |
| | | interface QueryUserAccountAllListInput { |
| | | pageModel?: Pagination; |
| | | checkChannelId?: string; |