修改支付成功页面

This commit is contained in:
tangxinyue 2026-07-07 09:14:19 +08:00
parent a2ab06de2b
commit 1b65430bd2
4 changed files with 490 additions and 480 deletions

View File

@ -29,7 +29,7 @@ export function createApp() {
app.config.globalProperties.$system = plus.os.name; app.config.globalProperties.$system = plus.os.name;
// #endif // #endif
app.config.globalProperties.$systemInfo = systemInfo app.config.globalProperties.$systemInfo = systemInfo
uni.setStorageSync('version', '1.0.6.sp17') uni.setStorageSync('version', '1.0.6.sp20')
app.config.globalProperties.$version = uni.getStorageSync('version') app.config.globalProperties.$version = uni.getStorageSync('version')
app.use(globalMethods); app.use(globalMethods);
return { return {

View File

@ -1,8 +1,8 @@
<template> <template>
<!-- 水印 --> <!-- 水印 -->
<view v-if="$isVip()"> <view v-if="$isVip()">
<watermark dark="light" source="uni_alipay_transfer" /> <watermark dark="light" source="uni_alipay_pay-successful" />
<liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_transfer')"> <liu-drag-button :canDocking="false" @clickBtn="$goRechargePage('watermark', 'uni_alipay_pay-successful')">
<c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie> <c-lottie ref="cLottieRef" :src='$watermark()' width="94px" height='74px' :loop="true"></c-lottie>
</liu-drag-button> </liu-drag-button>
</view> </view>
@ -10,7 +10,7 @@
<!-- 蓝色背景区域 --> <!-- 蓝色背景区域 -->
<view class="header-section"> <view class="header-section">
<nav-bar ref="navBarRef" bgColor="transparent" :isBack="false" :buttonGroup="buttonGroup" <nav-bar ref="navBarRef" bgColor="transparent" :isBack="false" :buttonGroup="buttonGroup"
@button-click="handleButtonClick"> tipLayerType="pay-successful-tip" isTipLayer tipLayerText="修改支付数据" @button-click="handleButtonClick">
<template v-slot:right> <template v-slot:right>
<view class="nav-link w100" <view class="nav-link w100"
style="display: flex; align-items: center; justify-content: flex-end; white-space: nowrap; padding: 0;"> style="display: flex; align-items: center; justify-content: flex-end; white-space: nowrap; padding: 0;">
@ -27,7 +27,7 @@
<!-- 转账状态信息 --> <!-- 转账状态信息 -->
<view class="success-info"> <view class="success-info">
<view class="amount-box"> <view class="amount-box" @click="goEdit">
<text class="symbol">¥</text> <text class="symbol">¥</text>
<text class="amount alipay-font">{{ Number(payData.money).toFixed(2) }}</text> <text class="amount alipay-font">{{ Number(payData.money).toFixed(2) }}</text>
</view> </view>
@ -75,7 +75,9 @@
<view class="banner-info"> <view class="banner-info">
<view class="text-content"> <view class="text-content">
<text class="b-title"> <text class="b-title">
<text v-if="payData.style1.couponlist[0].price && payData.style1.couponlist[0].price > 0" style="color: #EA4833;">{{ payData.style1.couponlist[0].price }}</text> <text
v-if="payData.style1.couponlist[0].price && payData.style1.couponlist[0].price > 0"
style="color: #EA4833;">{{ payData.style1.couponlist[0].price }}</text>
{{ payData.style1.couponlist[0].title }} {{ payData.style1.couponlist[0].title }}
</text> </text>
<text class="b-desc"> <text class="b-desc">
@ -224,79 +226,86 @@
</template> </template>
<script setup> <script setup>
import { import {
ref, ref,
onMounted, onMounted,
reactive, reactive,
getCurrentInstance getCurrentInstance
} from 'vue'; } from 'vue';
import { import {
onShow, onShow,
onLoad onLoad
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
import { import {
util util
} from '@/utils/common.js'; } from '@/utils/common.js';
import { defaultData } from './data.json'; import {
const { defaultData
} from './data.json';
const {
appContext, appContext,
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
const statusBarHeight = ref(0); const statusBarHeight = ref(0);
const PAY_STORAGE_KEY = 'alipay_pay_successful_data'; const PAY_STORAGE_KEY = 'alipay_pay_successful_data';
const payData = ref(defaultData); const payData = ref(defaultData);
const bannerImages = [ const bannerImages = [
'/static/image/balance/transfer/bottom-banner-1.png', '/static/image/balance/transfer/bottom-banner-1.png',
'/static/image/balance/transfer/bottom-banner-2.png' '/static/image/balance/transfer/bottom-banner-2.png'
]; ];
// //
const loadStorageData = () => { const loadStorageData = () => {
const savedData = uni.getStorageSync(PAY_STORAGE_KEY); const savedData = uni.getStorageSync(PAY_STORAGE_KEY);
if (savedData) { if (savedData) {
payData.value = savedData; payData.value = savedData;
} }
}; };
loadStorageData(); loadStorageData();
const navBarRef = ref(null); const navBarRef = ref(null);
const buttonGroup = ref([ const buttonGroup = ref([{
{ name: '编辑支付数据', action: 'edit' } name: '编辑支付数据',
]); action: 'edit'
const handleButtonClick = (button) => { }]);
const handleButtonClick = (button) => {
if (button.action === 'edit') { if (button.action === 'edit') {
goEdit()
}
};
const goEdit = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/balance/pay-successful/edit' url: '/pages/balance/pay-successful/edit'
}); });
} }
};
const toggleBanner = () => { const toggleBanner = () => {
const currentIndex = bannerImages.indexOf(payData.value.style1.bannerUrl); const currentIndex = bannerImages.indexOf(payData.value.style1.bannerUrl);
const nextIndex = (currentIndex + 1) % bannerImages.length; const nextIndex = (currentIndex + 1) % bannerImages.length;
payData.value.style1.bannerUrl = bannerImages[nextIndex]; payData.value.style1.bannerUrl = bannerImages[nextIndex];
uni.setStorageSync(PAY_STORAGE_KEY, payData.value); uni.setStorageSync(PAY_STORAGE_KEY, payData.value);
}; };
onLoad(() => { onLoad(() => {
// //
proxy.$apiUserEvent('all', { proxy.$apiUserEvent('all', {
type: 'click', type: 'click',
key: 'transfer', key: 'pay-successful',
value: "转账" value: "支付成功"
})
}) })
})
onMounted(() => { onMounted(() => {
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();
if (systemInfo.statusBarHeight) { if (systemInfo.statusBarHeight) {
statusBarHeight.value = systemInfo.statusBarHeight; statusBarHeight.value = systemInfo.statusBarHeight;
} }
}); });
onShow(() => { onShow(() => {
loadStorageData(); loadStorageData();
// #ifdef APP-PLUS // #ifdef APP-PLUS
util.setAndroidSystemBarColor('#F5F5F5') util.setAndroidSystemBarColor('#F5F5F5')
@ -310,22 +319,22 @@ onShow(() => {
plus.navigator.setStatusBarStyle("light"); plus.navigator.setStatusBarStyle("light");
}, 500); }, 500);
// #endif // #endif
}) })
const goBack = () => { const goBack = () => {
uni.navigateBack(); uni.navigateBack();
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import "@/common/main.css"; @import "@/common/main.css";
.container { .container {
min-height: 100vh; min-height: 100vh;
background-color: #F5F5F5; background-color: #F5F5F5;
} }
.header-section { .header-section {
height: 860rpx; height: 860rpx;
background: linear-gradient(181deg, #3884FD 60%, rgba(30, 128, 253, 0.5) 81.75%, rgba(30, 128, 253, 0) 100%); background: linear-gradient(181deg, #3884FD 60%, rgba(30, 128, 253, 0.5) 81.75%, rgba(30, 128, 253, 0) 100%);
@ -341,31 +350,31 @@ const goBack = () => {
::v-deep .tipLayer { ::v-deep .tipLayer {
position: absolute; position: absolute;
} }
} }
.status-bar { .status-bar {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0 40rpx; padding: 0 40rpx;
} }
.nav-link { .nav-link {
padding: 0 30rpx; padding: 0 30rpx;
text-align: right; text-align: right;
font-size: 28rpx; font-size: 28rpx;
line-height: 28rpx; line-height: 28rpx;
color: #fff; color: #fff;
} }
.success-info { .success-info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.pay-success-card { .pay-success-card {
margin: 24rpx; margin: 24rpx;
margin-top: 16rpx; margin-top: 16rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
@ -403,9 +412,9 @@ const goBack = () => {
line-height: 20rpx; line-height: 20rpx;
} }
} }
} }
.status-box { .status-box {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 10rpx; margin-top: 10rpx;
@ -423,9 +432,9 @@ const goBack = () => {
font-weight: 500; font-weight: 500;
line-height: 34rpx; line-height: 34rpx;
} }
} }
.amount-box { .amount-box {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
color: #fff; color: #fff;
@ -442,9 +451,9 @@ const goBack = () => {
line-height: 92rpx; line-height: 92rpx;
font-weight: 500; font-weight: 500;
} }
} }
.details-box { .details-box {
width: 100%; width: 100%;
padding: 0 46rpx; padding: 0 46rpx;
@ -463,23 +472,23 @@ const goBack = () => {
} }
} }
} }
.content-section { .content-section {
padding: 24rpx; padding: 24rpx;
padding-bottom: 16rpx; padding-bottom: 16rpx;
// background-color: #F5F5F5; // background-color: #F5F5F5;
border-radius: 30rpx 30rpx 0 0; border-radius: 30rpx 30rpx 0 0;
} }
.card { .card {
background-color: #fff; background-color: #fff;
border-radius: 20rpx; border-radius: 20rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.02); box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.02);
} }
.fliggy-card { .fliggy-card {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
@ -523,9 +532,9 @@ const goBack = () => {
} }
} }
} }
.banner-footer { .banner-footer {
padding: 24rpx; padding: 24rpx;
position: relative; position: relative;
display: flex; display: flex;
@ -606,9 +615,9 @@ const goBack = () => {
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
} }
.footer-section { .footer-section {
padding: 0px 40rpx 0; padding: 0px 40rpx 0;
margin-top: 50rpx; margin-top: 50rpx;
position: absolute; position: absolute;
@ -632,16 +641,16 @@ const goBack = () => {
font-size: 32rpx; font-size: 32rpx;
background-color: transparent; background-color: transparent;
} }
} }
.main-content { .main-content {
position: absolute; position: absolute;
left: 0; left: 0;
top: 190px; top: 190px;
width: 100%; width: 100%;
} }
.promo-card { .promo-card {
// padding: 30rpx; // padding: 30rpx;
margin: 16rpx; margin: 16rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
@ -749,5 +758,5 @@ const goBack = () => {
border-radius: 26rpx; border-radius: 26rpx;
} }
} }
} }
</style> </style>

View File

@ -1018,7 +1018,7 @@ onUnload(() => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
margin-bottom: 32rpx; margin-bottom: 10rpx;
} }
.menu-item { .menu-item {
@ -1055,6 +1055,7 @@ onUnload(() => {
.activity-box { .activity-box {
margin: 0 32rpx; margin: 0 32rpx;
margin-top: 20rpx;
} }
.footer-box { .footer-box {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB