From 1910e9f27373b8b4da75f076762025ceb3419965 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 12 六月 2025 15:40:50 +0800
Subject: [PATCH] fix: 暂时隐藏电信充值通道
---
apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue | 48 +++++++++++++++++++++++++++++++++++++-----------
1 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue b/apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue
index ee5a193..67bcd46 100644
--- a/apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue
+++ b/apps/taro/src/subpackages/my/promotionQrcode/InnerPage.vue
@@ -5,21 +5,25 @@
class="promotion-qrcode-content-qrcode"
:style="{ backgroundImage: `url(${OssAssets.common.PromotionQrcodeCodeBG})` }"
>
- <ShareQrcodeView :channles-num="userChannles[0]?.channlesNum" :size="150" />
+ <div class="share-qrcode-view">
+ <img v-if="link" :src="link" class="share-qrcode-view-img" />
+ </div>
<div class="promotion-qrcode-content-qrcode-tips">闀挎寜浜岀淮鐮佸垎浜ソ鍙�</div>
</div>
- <div class="promotion-qrcode-content-btn">鐐瑰嚮涓嬭浇浜岀淮鐮�</div>
+ <div class="promotion-qrcode-content-btn" @click="downloadQrcode">鐐瑰嚮涓嬭浇浜岀淮鐮�</div>
</div>
</ContentView>
</template>
<script setup lang="ts">
-import { ShareQrcodeView, ResultWithoutBG } from '@life-payment/components';
import { useLifeRechargeContext } from '@life-payment/core-vue';
import Taro from '@tarojs/taro';
import { useSystemStore } from '@/stores/modules/system';
import { CSSProperties, useTemplateRef } from 'vue';
import { OssAssets } from '@/constants';
+import { createQrCodeImg } from '@/components/Qrcode/utils/qrcode';
+import { downloadBase64File, Message } from '@/utils';
+import { isInAlipay } from '@/utils/env';
defineOptions({
name: 'InnerPage',
@@ -28,16 +32,21 @@
// const { virtualUserInfo } = useUser();
const { blLifeRecharge } = useLifeRechargeContext();
-const userChannles = computed(() =>
- (blLifeRecharge.accountModel.userChannles ?? []).filter(
- (x) => x.switchType !== blLifeRecharge.constants.LifePaySwitchTypeEnum.寰俊灏忕▼搴�
- )
-);
+const qrcodeRef = ref();
-const channlesType = ref(userChannles.value[0]?.channlesNum ?? '');
+const router = Taro.useRouter();
-watch(userChannles, (val) => {
- channlesType.value = val?.[0]?.channlesNum ?? '';
+const promoterIdNumber = router.params?.promoterIdNumber ?? '';
+
+// const link = computed(
+// () =>
+// `${CLIENT_ORIGIN}/subpackages/my/AgentRecruitment/AgentRecruitment?promoterIdNumber=${promoterIdNumber}`
+// );
+const link = computed(() => {
+ const url = `${CLIENT_ORIGIN}/subpackages/my/AgentRecruitment/AgentRecruitment?promoterIdNumber=${promoterIdNumber}`;
+ return createQrCodeImg(url, {
+ size: 300,
+ });
});
const systemStore = useSystemStore();
@@ -49,6 +58,18 @@
backgroundImage: `url(${OssAssets.common.PromotionQrcodeContentBG})`,
} as CSSProperties)
);
+
+function downloadQrcode() {
+ // Taro.saveImageToPhotosAlbum({
+ // filePath: link.value,
+ // });
+ if (isInAlipay) {
+ Message.warning('鍙湪娴忚鍣ㄦ墦寮�姝ょ綉椤典笅杞芥枃浠躲��');
+ } else {
+ // TODO 杩橀渶瑕佸仛灏忕▼搴忎笅杞界殑鍏煎
+ downloadBase64File(link.value, '鎺ㄥ箍浜岀淮鐮�');
+ }
+}
</script>
<style lang="scss">
@@ -107,5 +128,10 @@
margin-top: -20px;
padding: 0;
}
+
+ .share-qrcode-view-img {
+ width: 300px;
+ height: 300px;
+ }
}
</style>
--
Gitblit v1.9.1