add success page

This commit is contained in:
2025-08-17 22:15:20 +08:00
parent b6216570d9
commit 0cf49194e4
11 changed files with 308 additions and 15 deletions

View File

@@ -0,0 +1,91 @@
// pages/success/success.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 退出小程序
*/
exitApp() {
wx.showModal({
title: '退出提示',
content: '确定要退出小程序吗?',
confirmText: '退出',
confirmColor: '#ff4d4f',
cancelText: '取消',
success: (res) => {
if (res.confirm) {
wx.exitMiniProgram()
}
}
})
},
/**
* 返回修改
*/
viewDetails() {
wx.navigateBack()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,18 @@
<view class="center-container">
<view class="content-box">
<!-- 成功图标 -->
<!-- <image src="/images/success.png" class="success-icon"></image> -->
<!-- 数据上传完成提示 -->
<view class="upload-tip">
<text class="tip-title">数据上传已完成!</text>
<text class="tip-desc">您录入的信息已成功提交至服务器!</text>
</view>
<!-- 操作按钮 -->
<view class="action-buttons">
<button class="detail-btn" bindtap="viewDetails">返回修改</button>
<button class="exit-btn" bindtap="exitApp">退出</button>
</view>
</view>
</view>

View File

@@ -0,0 +1,95 @@
/* pages/successPage/successPage.wxss */
/* 基础页面设置 */
page {
height: 100%;
background-color: #f8f8f8;
}
/* 居中容器 */
.center-container {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
padding: 40rpx;
box-sizing: border-box;
}
/* 内容盒子 */
.content-box {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
max-width: 600rpx;
padding: 60rpx 40rpx;
background: white;
border-radius: 24rpx;
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
}
/* 成功图标 */
.success-icon {
width: 160rpx;
height: 160rpx;
margin-bottom: 50rpx;
}
/* 上传提示 */
.upload-tip {
text-align: center;
margin-bottom: 60rpx;
}
.tip-title {
display: block;
font-size: 38rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
}
.tip-desc {
display: block;
font-size: 30rpx;
color: #666;
line-height: 1.6;
}
/* 操作按钮区域 */
.action-buttons {
width: 100%;
display: flex;
justify-content: space-between;
}
/* 按钮基础样式 */
.action-buttons button {
width: 48%;
height: 90rpx;
line-height: 90rpx;
border-radius: 50rpx;
font-size: 32rpx;
}
/* 退出按钮样式 */
.exit-btn {
background-color: #ff4d4f;
color: white;
}
/* 查看详情按钮样式 */
.detail-btn {
background-color: #07c160;
color: white;
}
/* 按钮点击效果 */
button::after {
border: none;
}
button:active {
opacity: 0.8;
}