From f83f74863b05def138a5c87c3084e0de0dc01392 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 04 六月 2025 18:07:15 +0800
Subject: [PATCH] feat: UI
---
apps/taro/src/subpackages/my/AgentRecruitment/AgentRecruitment.vue | 64 ++++++++++++
packages/components/src/views/Mine/GeneratePromotionCodeView.vue | 83 ++++++++++++++++
apps/taro/src/subpackages/my/generatePromotionCode.vue/generatePromotionCode.config.ts | 3
apps/taro/src/app.config.ts | 2
apps/taro/src/assets/mine/icon-mine-channel.png | 0
apps/taro/src/pages/mine/index.vue | 8 +
apps/taro/src/constants/router.ts | 4
apps/taro/src/subpackages/my/AgentRecruitmentPoster/AgentRecruitmentPoster.vue | 38 +++++++
apps/taro/src/subpackages/my/applyAgent/applyAgent.vue | 2
apps/taro/src/assets/mine/icon-mine-agent-recruitment.png | 0
packages/components/src/index.ts | 1
apps/taro/src/subpackages/my/generatePromotionCode.vue/generatePromotionCode.vue | 41 ++++++++
apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue | 2
apps/taro/src/constants/img.ts | 6 +
apps/taro/src/subpackages/my/AgentRecruitmentPoster/AgentRecruitmentPoster.config.ts | 3
15 files changed, 247 insertions(+), 10 deletions(-)
diff --git a/apps/taro/src/app.config.ts b/apps/taro/src/app.config.ts
index 83268bf..746931c 100644
--- a/apps/taro/src/app.config.ts
+++ b/apps/taro/src/app.config.ts
@@ -117,6 +117,8 @@
'applyAgent/applyAgent',
'applyResult/applyResult',
'AgentRecruitment/AgentRecruitment',
+ 'AgentRecruitmentPoster/AgentRecruitmentPoster',
+ 'generatePromotionCode/generatePromotionCode',
'promotionQrcode/promotionQrcode',
],
},
diff --git a/apps/taro/src/assets/mine/icon-mine-agent-recruitment.png b/apps/taro/src/assets/mine/icon-mine-agent-recruitment.png
new file mode 100644
index 0000000..2bfb075
--- /dev/null
+++ b/apps/taro/src/assets/mine/icon-mine-agent-recruitment.png
Binary files differ
diff --git a/apps/taro/src/assets/mine/icon-mine-channel.png b/apps/taro/src/assets/mine/icon-mine-channel.png
new file mode 100644
index 0000000..463a97e
--- /dev/null
+++ b/apps/taro/src/assets/mine/icon-mine-channel.png
Binary files differ
diff --git a/apps/taro/src/constants/img.ts b/apps/taro/src/constants/img.ts
index 6e700ad..b6af7e6 100644
--- a/apps/taro/src/constants/img.ts
+++ b/apps/taro/src/constants/img.ts
@@ -15,6 +15,12 @@
// Bg: `${OssBasePath}/matchMakingMini/assets/mine/icon-bg.png`,
Bg: `${OssBasePath}/lifePayment/assets/common/icon-home-page-bg.png`,
IdBg: `${OssBasePath}/matchMakingMini/assets/mine/icon-id-bg.png`,
+
+ AgentRecruitmentBg: `${OssBasePath}/lifePayment/assets/mine/icon-agent-recruitment-bg.png`,
+ AgentRecruitmentRetail: `${OssBasePath}/lifePayment/assets/mine/icon-agent-recruitment-retail.png`,
+ AgentRecruitmentBrand: `${OssBasePath}/lifePayment/assets/mine/icon-agent-recruitment-brand.png`,
+ AgentRecruitmentArea: `${OssBasePath}/lifePayment/assets/mine/icon-agent-recruitment-area.png`,
+ AgentRecruitmentPoster: `${OssBasePath}/lifePayment/assets/mine/icon-agent-recruitment-poster.png`,
},
setting: {
ToggleBg: `${OssBasePath}/matchMakingMini/assets/setting/icon-toggle-bg.png`,
diff --git a/apps/taro/src/constants/router.ts b/apps/taro/src/constants/router.ts
index 72ae156..2f7a672 100644
--- a/apps/taro/src/constants/router.ts
+++ b/apps/taro/src/constants/router.ts
@@ -27,6 +27,8 @@
promotionQrcode = '/subpackages/my/promotionQrcode/promotionQrcode',
dashboard = '/subpackages/my/dashboard/dashboard',
applyAgent = '/subpackages/my/applyAgent/applyAgent',
- AgentRecruitment = '/subpackages/my/AgentRecruitment/AgentRecruitment',
+ agentRecruitment = '/subpackages/my/AgentRecruitment/AgentRecruitment',
+ agentRecruitmentPoster = '/subpackages/my/AgentRecruitmentPoster/AgentRecruitmentPoster',
+ generatePromotionCode = '/subpackages/my/generatePromotionCode/generatePromotionCode',
applyResult = '/subpackages/my/applyResult/applyResult',
}
diff --git a/apps/taro/src/pages/mine/index.vue b/apps/taro/src/pages/mine/index.vue
index dbd871b..5b64b7f 100644
--- a/apps/taro/src/pages/mine/index.vue
+++ b/apps/taro/src/pages/mine/index.vue
@@ -23,7 +23,7 @@
<template v-if="isChannelAccount">
<ListItemV2 :icon="IconMineDataBoard" title="鏁版嵁鐪嬫澘" @click="goDashboard"></ListItemV2>
<ListItemV2
- :icon="IconMinePromotion"
+ :icon="IconMineChannel"
title="娓犻亾浜岀淮鐮�"
@click="goShareQrcode"
></ListItemV2>
@@ -34,7 +34,7 @@
@click="goPromotionQrcode"
></ListItemV2>
<ListItemV2
- :icon="IconMinePromotion"
+ :icon="IconMineAgentRecruitment"
title="浠g悊鎷涘嫙"
@click="goAgentRecruitment"
></ListItemV2>
@@ -65,6 +65,8 @@
import IconMineUserId from '@/assets/mine/icon-mine-userId.png';
import IconMineDataBoard from '@/assets/mine/icon-mine-data-board.png';
import IconMinePromotion from '@/assets/mine/icon-mine-promotion.png';
+import IconMineChannel from '@/assets/mine/icon-mine-channel.png';
+import IconMineAgentRecruitment from '@/assets/mine/icon-mine-agent-recruitment.png';
import IconMineCustomerService from '@/assets/mine/icon-mine-customer-service.png';
import IconMineExist from '@/assets/mine/icon-mine-exist.png';
import { useSystemStore } from '@/stores/modules/system';
@@ -112,7 +114,7 @@
const goShareQrcode = useAccessLogin(() => goPage(RouterPath.shareQrcode));
const goPromotionQrcode = useAccessLogin(() => goPage(RouterPath.promotionQrcode));
const goDashboard = useAccessLogin(() => goPage(RouterPath.dashboard));
-const goAgentRecruitment = useAccessLogin(() => goPage(RouterPath.AgentRecruitment));
+const goAgentRecruitment = useAccessLogin(() => goPage(RouterPath.agentRecruitment));
async function goLogout() {
try {
diff --git a/apps/taro/src/subpackages/my/AgentRecruitment/AgentRecruitment.vue b/apps/taro/src/subpackages/my/AgentRecruitment/AgentRecruitment.vue
index b24bfe9..bc2bba2 100644
--- a/apps/taro/src/subpackages/my/AgentRecruitment/AgentRecruitment.vue
+++ b/apps/taro/src/subpackages/my/AgentRecruitment/AgentRecruitment.vue
@@ -1,7 +1,26 @@
<template>
- <PageLayout title="浠g悊鎷涘嫙" class="applyAgent-page-wrapper" hasBgColor :needAuth="false">
- <ContentScrollView hasPaddingTop style="background-color: transparent">
- <div>AgentRecruitment</div>
+ <PageLayout title="浠g悊鎷涘嫙" class="agentRecruitment-page-wrapper" hasBgColor :needAuth="false">
+ <ContentScrollView :paddingH="false">
+ <div class="agentRecruitment-page-content">
+ <img :src="OssAssets.mine.AgentRecruitmentBg" class="agentRecruitment-page-bg" />
+ <div class="agentRecruitment-page-main">
+ <img
+ class="agentRecruitment-page-img-item retail"
+ :src="OssAssets.mine.AgentRecruitmentRetail"
+ alt=""
+ />
+ <img
+ class="agentRecruitment-page-img-item brand"
+ :src="OssAssets.mine.AgentRecruitmentBrand"
+ alt=""
+ />
+ <img
+ class="agentRecruitment-page-img-item"
+ :src="OssAssets.mine.AgentRecruitmentArea"
+ alt=""
+ />
+ </div>
+ </div>
</ContentScrollView>
<PageFooter>
<PageFooterBtn type="primary" @click="submit">绔嬪嵆鐢宠</PageFooterBtn>
@@ -11,7 +30,7 @@
<script setup lang="ts">
import { PageLayout } from '@/components';
-import { RouterPath } from '@/constants';
+import { RouterPath, OssAssets } from '@/constants';
defineOptions({
name: 'AgentRecruitment',
@@ -23,3 +42,40 @@
});
}
</script>
+
+<style lang="scss">
+@import '@/styles/common.scss';
+
+.agentRecruitment-page-content {
+ width: 100%;
+ height: 100%;
+ position: relative;
+
+ .agentRecruitment-page-bg {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+
+ .agentRecruitment-page-main {
+ position: absolute;
+ top: 930px;
+ left: 0;
+ width: 100%;
+
+ .agentRecruitment-page-img-item {
+ width: 100%;
+ height: auto;
+ object-fit: cover;
+
+ &.retail {
+ margin-bottom: 32px;
+ }
+
+ &.brand {
+ margin-bottom: 20px;
+ }
+ }
+ }
+}
+</style>
diff --git a/apps/taro/src/subpackages/my/AgentRecruitmentPoster/AgentRecruitmentPoster.config.ts b/apps/taro/src/subpackages/my/AgentRecruitmentPoster/AgentRecruitmentPoster.config.ts
new file mode 100644
index 0000000..305fdb1
--- /dev/null
+++ b/apps/taro/src/subpackages/my/AgentRecruitmentPoster/AgentRecruitmentPoster.config.ts
@@ -0,0 +1,3 @@
+export default definePageConfig({
+ disableScroll: true,
+});
diff --git a/apps/taro/src/subpackages/my/AgentRecruitmentPoster/AgentRecruitmentPoster.vue b/apps/taro/src/subpackages/my/AgentRecruitmentPoster/AgentRecruitmentPoster.vue
new file mode 100644
index 0000000..91b22b1
--- /dev/null
+++ b/apps/taro/src/subpackages/my/AgentRecruitmentPoster/AgentRecruitmentPoster.vue
@@ -0,0 +1,38 @@
+<template>
+ <PageLayout
+ title="浠g悊鎷涘嫙"
+ class="agentRecruitmentPoster-page-wrapper"
+ hasBgColor
+ :needAuth="false"
+ >
+ <ContentScrollView :paddingH="false">
+ <div class="agentRecruitmentPoster-page-content">
+ <img :src="OssAssets.mine.AgentRecruitmentPoster" class="agentRecruitmentPoster-page-bg" />
+ </div>
+ </ContentScrollView>
+ </PageLayout>
+</template>
+
+<script setup lang="ts">
+import { PageLayout } from '@/components';
+import { RouterPath, OssAssets } from '@/constants';
+
+defineOptions({
+ name: 'AgentRecruitmentPoster',
+});
+</script>
+
+<style lang="scss">
+@import '@/styles/common.scss';
+
+.agentRecruitmentPoster-page-content {
+ width: 100%;
+ height: 100%;
+
+ .agentRecruitmentPoster-page-bg {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+}
+</style>
diff --git a/apps/taro/src/subpackages/my/applyAgent/applyAgent.vue b/apps/taro/src/subpackages/my/applyAgent/applyAgent.vue
index da2982f..61edcaa 100644
--- a/apps/taro/src/subpackages/my/applyAgent/applyAgent.vue
+++ b/apps/taro/src/subpackages/my/applyAgent/applyAgent.vue
@@ -4,7 +4,7 @@
<ApplyAgentView @submit="submit" ref="applyAgentViewRef" />
</ContentScrollView>
<PageFooter>
- <PageFooterBtn type="primary" @click="handleSubmit">鎻愪氦鐢宠</PageFooterBtn>
+ <PageFooterBtn type="primary" @click="handleSubmit">绔嬪嵆鎻愪氦</PageFooterBtn>
</PageFooter>
</PageLayout>
</template>
diff --git a/apps/taro/src/subpackages/my/generatePromotionCode.vue/generatePromotionCode.config.ts b/apps/taro/src/subpackages/my/generatePromotionCode.vue/generatePromotionCode.config.ts
new file mode 100644
index 0000000..305fdb1
--- /dev/null
+++ b/apps/taro/src/subpackages/my/generatePromotionCode.vue/generatePromotionCode.config.ts
@@ -0,0 +1,3 @@
+export default definePageConfig({
+ disableScroll: true,
+});
diff --git a/apps/taro/src/subpackages/my/generatePromotionCode.vue/generatePromotionCode.vue b/apps/taro/src/subpackages/my/generatePromotionCode.vue/generatePromotionCode.vue
new file mode 100644
index 0000000..be38334
--- /dev/null
+++ b/apps/taro/src/subpackages/my/generatePromotionCode.vue/generatePromotionCode.vue
@@ -0,0 +1,41 @@
+<template>
+ <PageLayout
+ title="鐢熸垚鎺ㄥ箍鐮�"
+ class="generatePromotionCode-page-wrapper"
+ hasBgColor
+ :needAuth="false"
+ >
+ <ContentScrollView hasPaddingTop style="background-color: transparent">
+ <GeneratePromotionCodeView @submit="submit" ref="generatePromotionCodeViewRef" />
+ </ContentScrollView>
+ <PageFooter>
+ <PageFooterBtn type="primary" @click="handleSubmit">鐢熸垚鎴戠殑鎺ㄥ箍鐮�</PageFooterBtn>
+ </PageFooter>
+ </PageLayout>
+</template>
+
+<script setup lang="ts">
+import { PageLayout } from '@/components';
+import { RouterPath } from '@/constants';
+import { GeneratePromotionCodeView } from '@life-payment/components';
+import { goBack } from '@/utils';
+import type { ComponentExposed } from 'vue-component-type-helpers';
+
+defineOptions({
+ name: 'generatePromotionCode',
+});
+
+const generatePromotionCodeViewRef = useTemplateRef<
+ ComponentExposed<typeof GeneratePromotionCodeView>
+>('generatePromotionCodeViewRef');
+
+function handleSubmit() {
+ generatePromotionCodeViewRef.value?.handleSubmit?.();
+}
+
+function submit() {
+ RouteHelper.navigateTo({
+ url: RouterPath.applyResult,
+ });
+}
+</script>
diff --git a/apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue b/apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue
index c464a25..371efe9 100644
--- a/apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue
+++ b/apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue
@@ -56,7 +56,7 @@
.promotion-qrcode-page-wrapper {
.promotion-qrcode-content {
- margin-top: 306px;
+ margin-top: 480px;
width: 100%;
height: 788px;
background-size: 100% 100%;
diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts
index 2b7329a..4c613d1 100644
--- a/packages/components/src/index.ts
+++ b/packages/components/src/index.ts
@@ -19,4 +19,5 @@
export { default as ShareQrcodeView } from './views/Mine/ShareQrcodeView.vue';
export { default as Dashboard } from './views/Mine/Dashboard.vue';
export { default as ApplyAgentView } from './views/Mine/ApplyAgentView.vue';
+export { default as GeneratePromotionCodeView } from './views/Mine/GeneratePromotionCodeView.vue';
export * from './utils';
diff --git a/packages/components/src/views/Mine/GeneratePromotionCodeView.vue b/packages/components/src/views/Mine/GeneratePromotionCodeView.vue
new file mode 100644
index 0000000..b4b40d3
--- /dev/null
+++ b/packages/components/src/views/Mine/GeneratePromotionCodeView.vue
@@ -0,0 +1,83 @@
+<template>
+ <NutForm
+ :model-value="form"
+ ref="formRef"
+ :rules="rules"
+ label-position="top"
+ class="order-bill-recharge phone chunk-form"
+ >
+ <NutFormItem label="濮撳悕" class="bole-form-item" prop="name" required>
+ <NutInput
+ v-model.trim="form.name"
+ class="bole-input-text"
+ placeholder="璇峰~鍐欐偍鐨勫鍚�"
+ type="text"
+ />
+ </NutFormItem>
+ <NutFormItem label="鑱旂郴鏂瑰紡" class="bole-form-item" prop="phoneNumber" required>
+ <NutInput
+ v-model.trim="form.phoneNumber"
+ class="bole-input-text"
+ placeholder="璇峰~鍐欐偍鐨勮仈绯绘柟寮�"
+ type="text"
+ />
+ </NutFormItem>
+ </NutForm>
+</template>
+
+<script setup lang="ts">
+import { Form as NutForm, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro';
+import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types';
+import { reactive, ref } from 'vue';
+import { useLifeRechargeContext } from '@life-payment/core-vue';
+import { FormValidator } from '../../utils';
+
+defineOptions({
+ name: 'ApplyAgentView',
+});
+
+const emit = defineEmits<{
+ (e: 'submit'): void;
+}>();
+
+const form = reactive({
+ name: '',
+ phoneNumber: '',
+});
+
+const rules = reactive<FormRules>({
+ name: [{ required: true, message: '璇峰~鍐欐偍鐨勫鍚�' }],
+ phoneNumber: [
+ { required: true, message: '璇峰~鍐欐偍鐨勮仈绯绘柟寮�' },
+ { validator: FormValidator.validatorPhoneNumber, message: '璇疯緭鍏ユ纭殑鎵嬫満鍙�' },
+ ],
+});
+
+const { blLifeRecharge } = useLifeRechargeContext();
+
+const formRef = ref<any>(null);
+
+function handleSubmit() {
+ if (!formRef.value) return;
+ formRef.value.validate().then(({ valid, errors }: any) => {
+ if (valid) {
+ refundUserLifePayOrder();
+ }
+ });
+}
+
+async function refundUserLifePayOrder() {
+ try {
+ // let params = {
+ // userId: blLifeRecharge.accountModel.userId,
+ // refundApplyRemark: form.refundApplyRemark,
+ // };
+ // let res = await blLifeRecharge.services.refundUserLifePayOrder(params);
+ emit('submit');
+ } catch (error) {}
+}
+
+defineExpose({
+ handleSubmit,
+});
+</script>
--
Gitblit v1.9.1