feat: 优化金刚区活动品类路由与测试组局,完善管理后台退款、小程序海报推广与下单流程
这个提交包含在:
@@ -105,7 +105,7 @@
|
||||
<text class="cell-label">优惠券</text>
|
||||
<view class="cell-right">
|
||||
<text class="coupon-val">-¥{{ discount }} (新人首单立减)</text>
|
||||
<text class="arrow">></text>
|
||||
<image class="arrow" :src="ICONS.chevronRight" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -976,8 +976,9 @@ const handlePay = async () => {
|
||||
font-weight: 600;
|
||||
}
|
||||
.arrow {
|
||||
font-size: 24rpx;
|
||||
color: var(--text-muted);
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,24 +61,63 @@
|
||||
<!-- Tab 1: 专属太阳码海报 -->
|
||||
<view class="tab-pane-poster" v-if="distActiveTab === 'poster'">
|
||||
<view class="poster-preview-card">
|
||||
<!-- 顶部认证徽标 -->
|
||||
<view class="poster-badge">官方认证邀请码</view>
|
||||
<text class="poster-hero-title">电竞陪伴 · 同城玩乐</text>
|
||||
<text class="poster-hero-sub">寻找心仪陪伴师,立享新人首单礼包</text>
|
||||
<text class="poster-hero-sub">寻找心仪陪伴师 · 立享新人专属礼包</text>
|
||||
|
||||
<view class="suncode-box">
|
||||
<view class="suncode-ring">
|
||||
<view class="sun-dot" v-for="d in 12" :key="d"></view>
|
||||
<view class="suncode-center">
|
||||
<image class="suncode-avatar" :src="user.avatar || defaultAvatar" mode="aspectFill" />
|
||||
<!-- 推荐人信息条 -->
|
||||
<view class="poster-inviter-pill">
|
||||
<image class="inviter-avatar" :src="user.avatar || defaultAvatar" mode="aspectFill" />
|
||||
<text class="inviter-name">推荐人:{{ user.nickname || '同城生活陪伴推荐官' }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 核心微信小程序推广太阳码卡片 (支持屏幕直接长按识别或扫码) -->
|
||||
<view class="poster-code-card">
|
||||
<image
|
||||
v-if="wxacodeUrl && !wxacodeLoadError"
|
||||
class="wxacode-img"
|
||||
:src="wxacodeUrl"
|
||||
mode="aspectFit"
|
||||
:show-menu-by-longpress="true"
|
||||
@error="wxacodeLoadError = true"
|
||||
/>
|
||||
<view v-else class="qrcode-fallback-box">
|
||||
<view class="qr-matrix-grid">
|
||||
<view
|
||||
v-for="(row, rIdx) in previewQrMatrix"
|
||||
:key="rIdx"
|
||||
class="qr-row"
|
||||
>
|
||||
<view
|
||||
v-for="(cell, cIdx) in row"
|
||||
:key="cIdx"
|
||||
class="qr-cell"
|
||||
:class="{ 'cell-dark': cell, 'cell-light': !cell }"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qr-avatar-center">
|
||||
<image class="qr-avatar-img" :src="user.avatar || defaultAvatar" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
<text class="suncode-hint">微信长按或扫码进入</text>
|
||||
</view>
|
||||
|
||||
<view class="poster-footer-code">
|
||||
<text class="lbl">邀请码:</text>
|
||||
<text class="val">PW{{ user.id || '' }}</text>
|
||||
<!-- 扫码操作指引 -->
|
||||
<view class="poster-guide-box">
|
||||
<text class="guide-title">微信长按识别或扫一扫进入小程序</text>
|
||||
<text class="guide-sub">新用户授权登录即可自动绑定上下级返佣关系</text>
|
||||
</view>
|
||||
|
||||
<!-- 专属邀请码金色卡片 -->
|
||||
<view class="poster-gold-code-card">
|
||||
<text class="gold-lbl">您的专属官方邀请码</text>
|
||||
<text class="gold-code">PW{{ user.id || '' }}</text>
|
||||
<text class="gold-tip">(支持微信扫码直达,或手动输入邀请码)</text>
|
||||
</view>
|
||||
|
||||
<!-- 保障标语 -->
|
||||
<text class="poster-sec-tag">同城陪伴 · 真实认证 · 资金托管保障</text>
|
||||
</view>
|
||||
|
||||
<view class="poster-actions-row">
|
||||
@@ -207,6 +246,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 离屏海报 Canvas (600 x 900) -->
|
||||
<canvas
|
||||
canvas-id="promotePosterCanvas"
|
||||
id="promotePosterCanvas"
|
||||
class="hidden-poster-canvas"
|
||||
style="width: 600px; height: 900px;"
|
||||
></canvas>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -225,6 +272,7 @@ import { ICONS } from '@/common/icons.js';
|
||||
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
|
||||
import { getNavBarInfo } from '@/common/nav.js';
|
||||
import { useShare } from '@/common/share.js';
|
||||
import { generateQRCodeMatrix } from '@/common/qrcode.js';
|
||||
|
||||
const currentThemeKey = ref(getCurrentThemeKey());
|
||||
const navInfo = ref(getNavBarInfo());
|
||||
@@ -241,11 +289,24 @@ const user = ref({
|
||||
invitedCount: 0
|
||||
});
|
||||
|
||||
const wxacodeLoadError = ref(false);
|
||||
const wxacodeUrl = computed(() => {
|
||||
const uid = user.value.id || normalizeUserId();
|
||||
if (!uid) return '';
|
||||
return `https://peiww.gynhc.com/api/distribution/wxacode?code=PW${uid}`;
|
||||
});
|
||||
|
||||
const previewQrMatrix = computed(() => {
|
||||
const uid = user.value.id || normalizeUserId();
|
||||
if (!uid) return [];
|
||||
return generateQRCodeMatrix(`https://peiww.gynhc.com/invite?code=PW${uid}`, 3);
|
||||
});
|
||||
|
||||
useShare(() => {
|
||||
const uid = normalizeUserId();
|
||||
return {
|
||||
title: '邀请你加入同城陪伴,海量高颜值大神随心约,立享新人专属礼包!',
|
||||
timelineTitle: '加入同城陪伴,海量高颜值大神随心约,同城组局随心享!',
|
||||
title: '【邀请好礼】邀请你加入同城陪伴,高颜值大神随心约,立享新人专属礼包!',
|
||||
timelineTitle: '同城生活陪伴 · 专业游戏陪玩与生活陪伴,邀请好友享双重丰厚礼遇!',
|
||||
path: '/pages/index/index',
|
||||
params: {
|
||||
code: uid ? `PW${uid}` : '',
|
||||
@@ -334,19 +395,296 @@ const copyInviteLink = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const savePosterImage = () => {
|
||||
const isGeneratingPoster = ref(false);
|
||||
|
||||
// 圆角矩形绘制辅助函数
|
||||
const drawRoundedRect = (ctx, x, y, width, height, radius, fill, stroke) => {
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x + radius, y);
|
||||
ctx.lineTo(x + width - radius, y);
|
||||
ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
|
||||
ctx.lineTo(x + width, y + height - radius);
|
||||
ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
|
||||
ctx.lineTo(x + radius, y + height);
|
||||
ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
|
||||
ctx.lineTo(x, y + radius);
|
||||
ctx.quadraticCurveTo(x, y, x + radius, y);
|
||||
ctx.closePath();
|
||||
if (fill) ctx.fill();
|
||||
if (stroke) ctx.stroke();
|
||||
ctx.restore();
|
||||
};
|
||||
|
||||
// 绘制轻量高保真 QR Code 矩阵到 Canvas
|
||||
const drawQRCodeOnCanvas = (ctx, matrix, x, y, size) => {
|
||||
const count = matrix.length;
|
||||
const cellSize = size / count;
|
||||
ctx.save();
|
||||
ctx.setFillStyle('#0F172A');
|
||||
for (let r = 0; r < count; r++) {
|
||||
for (let c = 0; c < count; c++) {
|
||||
if (matrix[r][c]) {
|
||||
const px = x + c * cellSize;
|
||||
const py = y + r * cellSize;
|
||||
ctx.fillRect(px, py, Math.ceil(cellSize), Math.ceil(cellSize));
|
||||
}
|
||||
}
|
||||
}
|
||||
ctx.restore();
|
||||
};
|
||||
|
||||
// 下载网络图片为本地临时文件
|
||||
const downloadImageToLocal = (url) => {
|
||||
return new Promise((resolve) => {
|
||||
if (!url || typeof url !== 'string' || !url.startsWith('http')) {
|
||||
resolve('');
|
||||
return;
|
||||
}
|
||||
uni.downloadFile({
|
||||
url,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200 && res.tempFilePath) {
|
||||
resolve(res.tempFilePath);
|
||||
} else {
|
||||
resolve('');
|
||||
}
|
||||
},
|
||||
fail: () => resolve('')
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const savePosterImage = async () => {
|
||||
const uid = normalizeUserId();
|
||||
if (!uid) {
|
||||
uni.showToast({ title: '请先登录后再分享', icon: 'none' });
|
||||
uni.showToast({ title: '请先登录后再保存海报', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
const link = `https://peiww.gynhc.com/invite?code=PW${uid}`;
|
||||
uni.setClipboardData({
|
||||
data: link,
|
||||
success: () => {
|
||||
uni.showToast({ title: '邀请链接已复制,可粘贴到微信分享', icon: 'none', duration: 2200 });
|
||||
|
||||
if (isGeneratingPoster.value) return;
|
||||
isGeneratingPoster.value = true;
|
||||
uni.showLoading({ title: '正在绘制海报...', mask: true });
|
||||
|
||||
try {
|
||||
const avatarUrl = user.value.avatar || defaultAvatar;
|
||||
const wxacodeApi = `https://peiww.gynhc.com/api/distribution/wxacode?code=PW${uid}`;
|
||||
|
||||
// 并发预加载用户头像与微信小程序码(太阳码)
|
||||
const [localAvatar, localWxacode] = await Promise.all([
|
||||
downloadImageToLocal(avatarUrl),
|
||||
downloadImageToLocal(wxacodeApi)
|
||||
]);
|
||||
|
||||
const ctx = uni.createCanvasContext('promotePosterCanvas');
|
||||
const W = 600;
|
||||
const H = 900;
|
||||
|
||||
// 1. 背景渐变 (深邃暗夜流光)
|
||||
const bgGradient = ctx.createLinearGradient(0, 0, 0, H);
|
||||
bgGradient.addColorStop(0, '#0F172A');
|
||||
bgGradient.addColorStop(0.5, '#1E1B4B');
|
||||
bgGradient.addColorStop(1, '#0A0F1D');
|
||||
ctx.setFillStyle(bgGradient);
|
||||
ctx.fillRect(0, 0, W, H);
|
||||
|
||||
// 2. 顶部微光光晕
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
ctx.arc(300, 50, 240, 0, Math.PI * 2);
|
||||
ctx.setFillStyle('rgba(99, 102, 241, 0.16)');
|
||||
ctx.fill();
|
||||
ctx.restore();
|
||||
|
||||
// 3. 内层立体卡片边框
|
||||
ctx.save();
|
||||
ctx.setFillStyle('rgba(255, 255, 255, 0.03)');
|
||||
ctx.setStrokeStyle('rgba(255, 255, 255, 0.12)');
|
||||
ctx.setLineWidth(2);
|
||||
drawRoundedRect(ctx, 36, 36, 528, 828, 28, true, true);
|
||||
ctx.restore();
|
||||
|
||||
// 4. 顶部认证徽标
|
||||
ctx.save();
|
||||
ctx.setFillStyle('rgba(99, 102, 241, 0.25)');
|
||||
ctx.setStrokeStyle('rgba(129, 140, 248, 0.45)');
|
||||
ctx.setLineWidth(1.5);
|
||||
drawRoundedRect(ctx, 205, 62, 190, 34, 17, true, true);
|
||||
ctx.setFontSize(15);
|
||||
ctx.setFillStyle('#818CF8');
|
||||
ctx.setTextAlign('center');
|
||||
ctx.setTextBaseline('middle');
|
||||
ctx.fillText('官方认证邀请码', 300, 79);
|
||||
ctx.restore();
|
||||
|
||||
// 5. 标题与副标题
|
||||
ctx.save();
|
||||
ctx.setTextAlign('center');
|
||||
ctx.setFontSize(30);
|
||||
ctx.setFillStyle('#FFFFFF');
|
||||
ctx.fillText('电竞陪伴 · 同城玩乐', 300, 138);
|
||||
|
||||
ctx.setFontSize(16);
|
||||
ctx.setFillStyle('#94A3B8');
|
||||
ctx.fillText('寻找心仪陪伴师 · 立享新人专属礼包', 300, 172);
|
||||
ctx.restore();
|
||||
|
||||
// 6. 推荐人个人信息横条 (头像 + 昵称)
|
||||
ctx.save();
|
||||
ctx.setFillStyle('rgba(255, 255, 255, 0.06)');
|
||||
ctx.setStrokeStyle('rgba(255, 255, 255, 0.1)');
|
||||
ctx.setLineWidth(1);
|
||||
drawRoundedRect(ctx, 130, 196, 340, 50, 25, true, true);
|
||||
|
||||
// 小头像
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
ctx.arc(162, 221, 18, 0, Math.PI * 2);
|
||||
ctx.clip();
|
||||
if (localAvatar) {
|
||||
ctx.drawImage(localAvatar, 144, 203, 36, 36);
|
||||
} else {
|
||||
ctx.setFillStyle('#4338CA');
|
||||
ctx.fillRect(144, 203, 36, 36);
|
||||
}
|
||||
});
|
||||
ctx.restore();
|
||||
|
||||
ctx.setTextAlign('left');
|
||||
ctx.setTextBaseline('middle');
|
||||
ctx.setFontSize(16);
|
||||
ctx.setFillStyle('#F8FAFC');
|
||||
const nickText = user.value.nickname ? `推荐人:${user.value.nickname}` : '同城生活陪伴推荐官';
|
||||
const displayNick = nickText.length > 12 ? nickText.slice(0, 11) + '…' : nickText;
|
||||
ctx.fillText(displayNick, 190, 221);
|
||||
ctx.restore();
|
||||
|
||||
// 7. 核心推广二维码 / 小程序码展示区 (居中白色立体卡片)
|
||||
const codeCardX = 160;
|
||||
const codeCardY = 265;
|
||||
const codeCardSize = 280;
|
||||
|
||||
// 白色圆角卡片底衬
|
||||
ctx.save();
|
||||
ctx.setFillStyle('#FFFFFF');
|
||||
ctx.setStrokeStyle('rgba(255, 255, 255, 0.3)');
|
||||
ctx.setLineWidth(2);
|
||||
drawRoundedRect(ctx, codeCardX, codeCardY, codeCardSize, codeCardSize, 20, true, true);
|
||||
ctx.restore();
|
||||
|
||||
// 优先绘制微信官方小程序码(太阳码)
|
||||
if (localWxacode) {
|
||||
ctx.drawImage(localWxacode, codeCardX + 15, codeCardY + 15, codeCardSize - 30, codeCardSize - 30);
|
||||
} else {
|
||||
// 降级兜底:通过轻量矩阵库直接绘制高清晰度二维码
|
||||
const qrMatrix = generateQRCodeMatrix(`https://peiww.gynhc.com/invite?code=PW${uid}`, 3);
|
||||
drawQRCodeOnCanvas(ctx, qrMatrix, codeCardX + 20, codeCardY + 20, codeCardSize - 40);
|
||||
|
||||
// 二维码中心放置微型头像或标识
|
||||
if (localAvatar) {
|
||||
ctx.save();
|
||||
ctx.setFillStyle('#FFFFFF');
|
||||
drawRoundedRect(ctx, 276, 381, 48, 48, 8, true, false);
|
||||
ctx.beginPath();
|
||||
ctx.arc(300, 405, 20, 0, Math.PI * 2);
|
||||
ctx.clip();
|
||||
ctx.drawImage(localAvatar, 280, 385, 40, 40);
|
||||
ctx.restore();
|
||||
}
|
||||
}
|
||||
|
||||
// 8. 扫码操作指引文案
|
||||
ctx.save();
|
||||
ctx.setTextAlign('center');
|
||||
ctx.setFontSize(16);
|
||||
ctx.setFillStyle('#818CF8');
|
||||
ctx.fillText('微信长按识别或扫一扫进入小程序', 300, 574);
|
||||
|
||||
ctx.setFontSize(13);
|
||||
ctx.setFillStyle('#94A3B8');
|
||||
ctx.fillText('新用户授权登录即可自动绑定上下级返佣关系', 300, 600);
|
||||
ctx.restore();
|
||||
|
||||
// 9. 专属邀请码金色卡片 (提供手动输入兜底)
|
||||
ctx.save();
|
||||
ctx.setFillStyle('rgba(245, 158, 11, 0.12)');
|
||||
ctx.setStrokeStyle('rgba(245, 158, 11, 0.45)');
|
||||
ctx.setLineWidth(2);
|
||||
drawRoundedRect(ctx, 80, 630, 440, 115, 20, true, true);
|
||||
|
||||
ctx.setTextAlign('center');
|
||||
ctx.setFontSize(15);
|
||||
ctx.setFillStyle('#F59E0B');
|
||||
ctx.fillText('您的专属官方邀请码', 300, 662);
|
||||
|
||||
ctx.setFontSize(38);
|
||||
ctx.setFillStyle('#FBBF24');
|
||||
ctx.fillText(`PW${uid}`, 300, 712);
|
||||
ctx.restore();
|
||||
|
||||
// 10. 底部保障与版权
|
||||
ctx.save();
|
||||
ctx.setTextAlign('center');
|
||||
ctx.setFontSize(14);
|
||||
ctx.setFillStyle('#64748B');
|
||||
ctx.fillText('同城陪伴 · 真实认证 · 资金托管保障', 300, 805);
|
||||
ctx.restore();
|
||||
|
||||
// 10. 执行绘制并输出临时文件
|
||||
ctx.draw(false, () => {
|
||||
setTimeout(() => {
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: 'promotePosterCanvas',
|
||||
fileType: 'png',
|
||||
quality: 1,
|
||||
success: (res) => {
|
||||
const filePath = res.tempFilePath;
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath,
|
||||
success: () => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '海报已保存至相册!',
|
||||
icon: 'success',
|
||||
duration: 2500
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
// 若相册权限受限或系统阻止,自动唤起全屏图片预览,支持微信长按保存/转发
|
||||
uni.previewImage({
|
||||
urls: [filePath],
|
||||
current: filePath,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '长按海报可保存到相册或发送给好友',
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
// 降级为复制链接
|
||||
const link = `https://peiww.gynhc.com/invite?code=PW${uid}`;
|
||||
uni.setClipboardData({
|
||||
data: link,
|
||||
success: () => {
|
||||
uni.showToast({ title: '邀请链接已复制,可粘贴分享', icon: 'none', duration: 2200 });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
} catch (err) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '生成海报异常,请重试', icon: 'none' });
|
||||
} finally {
|
||||
isGeneratingPoster.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleBindInviteCode = async () => {
|
||||
@@ -461,6 +799,17 @@ onShow(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.hidden-poster-canvas {
|
||||
position: fixed;
|
||||
left: -9999px;
|
||||
bottom: -9999px;
|
||||
width: 600px;
|
||||
height: 900px;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
z-index: -999;
|
||||
}
|
||||
|
||||
.promote-page {
|
||||
min-height: 100vh;
|
||||
background-color: #0A0F1D;
|
||||
@@ -670,74 +1019,159 @@ onShow(() => {
|
||||
.poster-hero-sub {
|
||||
font-size: 22rpx;
|
||||
color: #94A3B8;
|
||||
margin-bottom: 36rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.suncode-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.poster-inviter-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-bottom: 32rpx;
|
||||
gap: 12rpx;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 30rpx;
|
||||
padding: 8rpx 20rpx 8rpx 10rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.suncode-ring {
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
.inviter-avatar {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx dashed #6366F1;
|
||||
}
|
||||
|
||||
.inviter-name {
|
||||
font-size: 24rpx;
|
||||
color: #F8FAFC;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.poster-code-card {
|
||||
width: 380rpx;
|
||||
height: 380rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
padding: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 16rpx 40rpx rgba(0, 0, 0, 0.35);
|
||||
box-sizing: border-box;
|
||||
|
||||
.wxacode-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.qrcode-fallback-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.sun-dot {
|
||||
position: absolute;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
background: #818CF8;
|
||||
border-radius: 50%;
|
||||
.qr-matrix-grid {
|
||||
width: 320rpx;
|
||||
height: 320rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.qr-row {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.qr-cell {
|
||||
flex: 1;
|
||||
|
||||
&.cell-dark {
|
||||
background-color: #0F172A;
|
||||
}
|
||||
|
||||
&.cell-light {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.suncode-center {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid #6366F1;
|
||||
overflow: hidden;
|
||||
.qr-avatar-center {
|
||||
position: absolute;
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
|
||||
|
||||
.suncode-avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.qr-avatar-img {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.suncode-hint {
|
||||
.poster-guide-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-bottom: 12rpx;
|
||||
|
||||
.guide-title {
|
||||
font-size: 26rpx;
|
||||
color: #818CF8;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.guide-sub {
|
||||
font-size: 22rpx;
|
||||
color: #64748B;
|
||||
color: #94A3B8;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.poster-footer-code {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 14rpx;
|
||||
padding: 12rpx 28rpx;
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
gap: 10rpx;
|
||||
.poster-gold-code-card {
|
||||
width: 100%;
|
||||
background: rgba(245, 158, 11, 0.1);
|
||||
border: 1px solid rgba(245, 158, 11, 0.35);
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx 16rpx;
|
||||
margin: 16rpx 0 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
.lbl {
|
||||
.gold-lbl {
|
||||
font-size: 22rpx;
|
||||
color: #94A3B8;
|
||||
color: #F59E0B;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.val {
|
||||
font-size: 28rpx;
|
||||
.gold-code {
|
||||
font-size: 46rpx;
|
||||
font-weight: 800;
|
||||
color: #F59E0B;
|
||||
color: #FBBF24;
|
||||
letter-spacing: 2rpx;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.gold-tip {
|
||||
font-size: 20rpx;
|
||||
color: #D97706;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.poster-sec-tag {
|
||||
font-size: 20rpx;
|
||||
color: #64748B;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1156,35 +1590,50 @@ onShow(() => {
|
||||
color: #78716C;
|
||||
}
|
||||
|
||||
.suncode-box {
|
||||
.suncode-ring {
|
||||
border-color: #EA580C;
|
||||
.poster-inviter-pill {
|
||||
background: #FFF7ED;
|
||||
border-color: #FED7AA;
|
||||
|
||||
.sun-dot {
|
||||
background: #F97316;
|
||||
}
|
||||
.inviter-name {
|
||||
color: #431407;
|
||||
}
|
||||
}
|
||||
|
||||
.suncode-center {
|
||||
border-color: #EA580C;
|
||||
}
|
||||
.poster-code-card {
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #FED7AA;
|
||||
box-shadow: 0 10rpx 28rpx rgba(234, 88, 12, 0.1);
|
||||
}
|
||||
|
||||
.poster-guide-box {
|
||||
.guide-title {
|
||||
color: #EA580C;
|
||||
}
|
||||
|
||||
.suncode-hint {
|
||||
.guide-sub {
|
||||
color: #78716C;
|
||||
}
|
||||
}
|
||||
|
||||
.poster-footer-code {
|
||||
background: #FFF7ED;
|
||||
.poster-gold-code-card {
|
||||
background: #FFFDF9;
|
||||
border-color: #FED7AA;
|
||||
|
||||
.lbl {
|
||||
color: #78716C;
|
||||
}
|
||||
|
||||
.val {
|
||||
.gold-lbl {
|
||||
color: #EA580C;
|
||||
}
|
||||
|
||||
.gold-code {
|
||||
color: #EA580C;
|
||||
}
|
||||
|
||||
.gold-tip {
|
||||
color: #9A3412;
|
||||
}
|
||||
}
|
||||
|
||||
.poster-sec-tag {
|
||||
color: #A8A29E;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
<view class="content-card channel-card">
|
||||
<view class="card-section-head">
|
||||
<text class="section-title">支付方式</text>
|
||||
<view class="section-badge-green">官方官方推荐</view>
|
||||
<view class="section-badge-green">官方推荐</view>
|
||||
</view>
|
||||
|
||||
<view class="channel-list">
|
||||
@@ -189,16 +189,22 @@
|
||||
<!-- 底部固定确认支付操作栏 -->
|
||||
<view class="fixed-submit-bar">
|
||||
<view class="submit-summary">
|
||||
<view class="summary-top">
|
||||
<text class="summary-label">实付金额:</text>
|
||||
<text class="summary-currency">¥</text>
|
||||
<text class="summary-val">{{ currentPayAmount.toFixed(2) }}</text>
|
||||
<view class="summary-main">
|
||||
<text class="summary-label">实付金额</text>
|
||||
<view class="summary-amount-wrap">
|
||||
<text class="summary-currency">¥</text>
|
||||
<text class="summary-val-integer">{{ payAmountParts.integer }}</text>
|
||||
<text class="summary-val-decimal">.{{ payAmountParts.decimal }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="summary-sub" v-if="currentBonusAmount > 0">
|
||||
<text class="sub-text">预计到账 ¥{{ currentTotalCredit.toFixed(2) }} (赠 ¥{{ currentBonusAmount }})</text>
|
||||
<text class="sub-text">预计到账 ¥{{ currentTotalCredit.toFixed(2) }}</text>
|
||||
<text class="sub-bonus-tag">含立赠¥{{ currentBonusAmount }}</text>
|
||||
</view>
|
||||
<view class="summary-sub" v-else>
|
||||
<text class="sub-text">预计实际到账 ¥{{ currentTotalCredit.toFixed(2) }}</text>
|
||||
<text class="sub-text">预计到账 ¥{{ currentTotalCredit.toFixed(2) }}</text>
|
||||
<text class="sub-tip-dot">·</text>
|
||||
<text class="sub-tip-text">即时生效</text>
|
||||
</view>
|
||||
</view>
|
||||
<button
|
||||
@@ -269,6 +275,13 @@ const currentPayAmount = computed(() => {
|
||||
return tier ? Number(tier.amount) : 0;
|
||||
});
|
||||
|
||||
// 实付金额整数与小数拆分
|
||||
const payAmountParts = computed(() => {
|
||||
const str = Number(currentPayAmount.value || 0).toFixed(2);
|
||||
const [integer, decimal] = str.split('.');
|
||||
return { integer, decimal: decimal || '00' };
|
||||
});
|
||||
|
||||
// 当前赠送金额 (档位或自定义命中规则)
|
||||
const currentBonusAmount = computed(() => {
|
||||
if (isCustomMode.value) {
|
||||
@@ -1077,7 +1090,7 @@ onShow(() => {
|
||||
}
|
||||
|
||||
.bottom-spacer {
|
||||
height: 180rpx;
|
||||
height: calc(180rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1088,64 +1101,131 @@ onShow(() => {
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
background: rgba(10, 15, 29, 0.95);
|
||||
backdrop-filter: blur(20px);
|
||||
background: rgba(10, 15, 29, 0.96);
|
||||
backdrop-filter: blur(24px);
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
padding: 20rpx 28rpx;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
box-shadow: 0 -10rpx 36rpx rgba(0, 0, 0, 0.45);
|
||||
padding: 24rpx 32rpx;
|
||||
padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
|
||||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
.submit-summary {
|
||||
.summary-top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.summary-main {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 8rpx;
|
||||
|
||||
.summary-label {
|
||||
font-size: 24rpx;
|
||||
color: #94A3B8;
|
||||
font-weight: 500;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.summary-currency {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #10B981;
|
||||
margin-left: 4rpx;
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
.summary-amount-wrap {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
|
||||
.summary-val {
|
||||
font-size: 44rpx;
|
||||
font-weight: 800;
|
||||
color: #10B981;
|
||||
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
.summary-currency {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #10B981;
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
.summary-val-integer {
|
||||
font-size: 48rpx;
|
||||
font-weight: 800;
|
||||
color: #10B981;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
line-height: 1;
|
||||
letter-spacing: -0.5rpx;
|
||||
}
|
||||
|
||||
.summary-val-decimal {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #10B981;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.summary-sub {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
margin-top: 8rpx;
|
||||
|
||||
.sub-text {
|
||||
font-size: 22rpx;
|
||||
color: #94A3B8;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.sub-bonus-tag {
|
||||
font-size: 20rpx;
|
||||
color: #F59E0B;
|
||||
background: rgba(245, 158, 11, 0.15);
|
||||
border: 1px solid rgba(245, 158, 11, 0.25);
|
||||
padding: 2rpx 10rpx;
|
||||
border-radius: 8rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.sub-tip-dot {
|
||||
font-size: 20rpx;
|
||||
color: #64748B;
|
||||
}
|
||||
|
||||
.sub-tip-text {
|
||||
font-size: 20rpx;
|
||||
color: #64748B;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-submit-recharge {
|
||||
background: linear-gradient(135deg, #10B981 0%, #059669 100%);
|
||||
color: #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
margin: 0;
|
||||
min-width: 250rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
padding: 0 44rpx;
|
||||
border-radius: 44rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
padding: 0 48rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
border-radius: 42rpx;
|
||||
border: none;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(135deg, #10B981 0%, #059669 100%);
|
||||
box-shadow: 0 8rpx 24rpx rgba(16, 185, 129, 0.35);
|
||||
border: none;
|
||||
outline: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
opacity: 0.45;
|
||||
box-shadow: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&:active:not(.disabled) {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1377,29 +1457,46 @@ onShow(() => {
|
||||
}
|
||||
|
||||
.fixed-submit-bar {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
border-top-color: #E7E5E4;
|
||||
box-shadow: 0 -8rpx 32rpx rgba(28, 25, 23, 0.06);
|
||||
|
||||
.submit-summary {
|
||||
.summary-top {
|
||||
.summary-main {
|
||||
.summary-label {
|
||||
color: #78716C;
|
||||
}
|
||||
|
||||
.summary-currency,
|
||||
.summary-val {
|
||||
color: #EA580C;
|
||||
.summary-amount-wrap {
|
||||
.summary-currency,
|
||||
.summary-val-integer,
|
||||
.summary-val-decimal {
|
||||
color: #EA580C;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.summary-sub .sub-text {
|
||||
color: #D97706;
|
||||
.summary-sub {
|
||||
.sub-text {
|
||||
color: #78716C;
|
||||
}
|
||||
|
||||
.sub-bonus-tag {
|
||||
background: #FFF7ED;
|
||||
color: #EA580C;
|
||||
border-color: rgba(234, 88, 12, 0.25);
|
||||
}
|
||||
|
||||
.sub-tip-dot,
|
||||
.sub-tip-text {
|
||||
color: #A8A29E;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-submit-recharge {
|
||||
background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%);
|
||||
box-shadow: 0 8rpx 24rpx rgba(234, 88, 12, 0.3);
|
||||
background: linear-gradient(135deg, #FF6B00 0%, #EA580C 100%);
|
||||
box-shadow: 0 8rpx 24rpx rgba(234, 88, 12, 0.35);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户