| | |
| | | |
| | | const router = Taro.useRouter(); |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const channelConsultationId = router.params?.channelConsultationId ?? ''; |
| | | console.log('channelConsultationId: ', channelConsultationId); |
| | | const consultationId = router.params?.consultationId ?? ''; |
| | | |
| | | async function getPromoter(phoneNumber: string) { |
| | | try { |
| | |
| | | async function getChannelConsultationById() { |
| | | try { |
| | | let params: APIgetChannelConsultationByIdParams = { |
| | | id: channelConsultationId, |
| | | id: consultationId, |
| | | }; |
| | | return await blLifeRecharge.services.getChannelConsultationById(params); |
| | | } catch (error) {} |
| | |
| | | |
| | | async function generate() { |
| | | try { |
| | | if (channelConsultationId) { |
| | | if (consultationId) { |
| | | let res = await getChannelConsultationById(); |
| | | if (res) { |
| | | let promoterIdNumber = await getPromoter(res.phoneNumber); |
| | |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | } |
| | | } catch (error) {} |
| | | } |