commission--yt-commit
This commit is contained in:
38
pages/course/waitPayOrder/waitPayOrder.js
Normal file
38
pages/course/waitPayOrder/waitPayOrder.js
Normal file
@ -0,0 +1,38 @@
|
||||
Page({
|
||||
|
||||
data: {
|
||||
// 初始倒计时字符串
|
||||
countdown: '30分00秒'
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
// 启动倒计时(总秒数 = 29*60 + 17)
|
||||
this.initCountdown(30 * 60 );
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化倒计时
|
||||
* @param {number} totalSeconds 初始总秒数
|
||||
*/
|
||||
initCountdown(totalSeconds) {
|
||||
this.countdownTimer = setInterval(() => {
|
||||
if (totalSeconds <= 0) {
|
||||
clearInterval(this.countdownTimer);
|
||||
this.setData({ countdown: '00分00秒' });
|
||||
return;
|
||||
}
|
||||
totalSeconds--;
|
||||
const m = Math.floor(totalSeconds / 60);
|
||||
const s = totalSeconds % 60;
|
||||
const mm = m < 10 ? '0' + m : '' + m;
|
||||
const ss = s < 10 ? '0' + s : '' + s;
|
||||
this.setData({ countdown: `${mm}分${ss}秒` });
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
// 页面卸载时清除定时器
|
||||
clearInterval(this.countdownTimer);
|
||||
}
|
||||
|
||||
});
|
3
pages/course/waitPayOrder/waitPayOrder.json
Normal file
3
pages/course/waitPayOrder/waitPayOrder.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
79
pages/course/waitPayOrder/waitPayOrder.wxml
Normal file
79
pages/course/waitPayOrder/waitPayOrder.wxml
Normal file
@ -0,0 +1,79 @@
|
||||
<view class="flex-col page">
|
||||
<view class="flex-col group">
|
||||
<view class="flex-col section">
|
||||
<!-- 订单状态 + 倒计时 -->
|
||||
<view class="flex-row justify-between self-stretch group_2">
|
||||
<text class="font">订单状态</text>
|
||||
<view class="flex-row group_3">
|
||||
<text class="font_2 text">请在{{countdown}}内完成支付</text>
|
||||
<text class="font_2 text_2 ml-37">待支付</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 课程信息 -->
|
||||
<view class="flex-row self-stretch group_4 mt-15">
|
||||
<image
|
||||
class="shrink-0 image"
|
||||
src="https://ide.code.fun/api/image?token=6859f7a14ae84d0012334fa9&name=9c2a22f14e2bd768cbd40d939693e4a8.png"
|
||||
/>
|
||||
<text class="flex-1 self-start font_3 text_3 ml-7">
|
||||
区块链和加密数字货币(随报随学认证班)(随报随学认证班)
|
||||
</text>
|
||||
</view>
|
||||
<!-- 课程价格 -->
|
||||
<text class="self-end font_3 text_4 mt-15">¥999.00</text>
|
||||
</view>
|
||||
|
||||
<!-- 订单详情 -->
|
||||
<view class="mt-16 flex-col section_2">
|
||||
<view class="self-start group_5">
|
||||
<text class="font text_5">订单编号:</text>
|
||||
<text class="font_4">202506191307440406460485418</text>
|
||||
</view>
|
||||
<view class="flex-row items-baseline self-start group_6">
|
||||
<text class="shrink-0 font text_6">下单时间:</text>
|
||||
<text class="flex-1 font_5 ml-3">2025-06-19 16:08:15</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start self-stretch relative group_7">
|
||||
<view class="flex-col section_3">
|
||||
<view class="self-stretch divider"></view>
|
||||
<view class="flex-row self-stretch group_8 mt-17">
|
||||
<text class="font text_7">支付方式:</text>
|
||||
<text class="ml-8 font text_8">微信支付</text>
|
||||
</view>
|
||||
<view class="flex-row items-center self-stretch mt-17">
|
||||
<text class="font text_9">交易号:</text>
|
||||
<text class="font_4 ml-23">4002506191307440406460485418</text>
|
||||
</view>
|
||||
<text class="self-start font text_10 mt-17">交付时间:</text>
|
||||
</view>
|
||||
<text class="font_5 text_11 pos">2025-06-19 08:48:35</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 价格明细 -->
|
||||
<view class="mt-16 flex-col section_4">
|
||||
<view class="flex-row justify-between items-center">
|
||||
<text class="font text_12">课程价格</text>
|
||||
<text class="font_4">¥1999.9</text>
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center mt-11">
|
||||
<text class="font text_13">价格折扣</text>
|
||||
<text class="font_4 text_14">-¥10</text>
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center group_9 mt-11">
|
||||
<text class="font_2 text_15">订单金额</text>
|
||||
<text class="font_4 text_16">¥999</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view class="flex-row mt-389">
|
||||
<view class="flex-col justify-start items-center text-wrapper">
|
||||
<text class="font_3 text_17">取消</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-center text-wrapper_2">
|
||||
<text class="font_3 text_18">立即支付</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
208
pages/course/waitPayOrder/waitPayOrder.wxss
Normal file
208
pages/course/waitPayOrder/waitPayOrder.wxss
Normal file
@ -0,0 +1,208 @@
|
||||
.ml-37 {
|
||||
margin-left: 69.38rpx;
|
||||
}
|
||||
.ml-7 {
|
||||
margin-left: 13.13rpx;
|
||||
}
|
||||
.mt-15 {
|
||||
margin-top: 28.13rpx;
|
||||
}
|
||||
.ml-3 {
|
||||
margin-left: 5.63rpx;
|
||||
}
|
||||
.ml-23 {
|
||||
margin-left: 40.13rpx;
|
||||
}
|
||||
.mt-17 {
|
||||
margin-top: 31.88rpx;
|
||||
}
|
||||
.mt-11 {
|
||||
margin-top: 20.63rpx;
|
||||
}
|
||||
.mt-389 {
|
||||
margin-top: 729.38rpx;
|
||||
}
|
||||
|
||||
/* 整体布局 */
|
||||
.page {
|
||||
padding-top: 26.25rpx;
|
||||
background-color: #f8f8f8;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.group {
|
||||
padding: 0 18.75rpx;
|
||||
}
|
||||
|
||||
/* 调整首屏 section 右边内边距,不让价格太贴边 */
|
||||
.section {
|
||||
padding: 0 22.5rpx 33.75rpx 22.5rpx;
|
||||
filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040);
|
||||
background-color: #ffffff;
|
||||
border-radius: 7.22rpx;
|
||||
}
|
||||
|
||||
/* 订单详情区 */
|
||||
.group_2 {
|
||||
padding: 33.75rpx 0 26.25rpx;
|
||||
border-bottom: solid 1.88rpx #e3e3e3;
|
||||
}
|
||||
.group_3 {
|
||||
margin-right: 18.75rpx;
|
||||
}
|
||||
.font_2 {
|
||||
font-size: 26.25rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 24.23rpx;
|
||||
color: #f84947;
|
||||
}
|
||||
.text {
|
||||
line-height: 24.56rpx;
|
||||
}
|
||||
.text_2 {
|
||||
line-height: 24.17rpx;
|
||||
}
|
||||
.group_4 {
|
||||
margin-right: 33.75rpx;
|
||||
}
|
||||
.image {
|
||||
border-radius: 9.38rpx;
|
||||
width: 208.13rpx;
|
||||
height: 133.13rpx;
|
||||
}
|
||||
.font_3 {
|
||||
font-size: 30rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 27.64rpx;
|
||||
}
|
||||
.text_3 {
|
||||
color: #000000;
|
||||
line-height: 35.63rpx;
|
||||
}
|
||||
.text_4 {
|
||||
color: #3d3d3d;
|
||||
line-height: 22.76rpx;
|
||||
}
|
||||
|
||||
/* 订单详情二级区 */
|
||||
.section_2 {
|
||||
padding: 33.75rpx 22.5rpx 0;
|
||||
background-color: #ffffff;
|
||||
border-radius: 7.39rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
}
|
||||
.group_5 {
|
||||
line-height: 24.28rpx;
|
||||
}
|
||||
.font_4 {
|
||||
font-size: 26.25rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 19.93rpx;
|
||||
color: #323232;
|
||||
}
|
||||
.group_6 {
|
||||
margin-top: 30rpx;
|
||||
width: 369.94rpx;
|
||||
}
|
||||
.font_5 {
|
||||
font-size: 26.25rpx;
|
||||
line-height: 31.88rpx;
|
||||
color: #323232;
|
||||
}
|
||||
.group_7 {
|
||||
margin-top: 11.25rpx;
|
||||
padding-bottom: 26.25rpx;
|
||||
}
|
||||
.section_3 {
|
||||
padding-top: 9.38rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.divider {
|
||||
background-color: #cccccc;
|
||||
height: 1.88rpx;
|
||||
}
|
||||
.group_8 {
|
||||
padding: 0 3.75rpx;
|
||||
}
|
||||
.font {
|
||||
font-size: 26.25rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 24.23rpx;
|
||||
color: #696969;
|
||||
}
|
||||
.text_7 {
|
||||
line-height: 24.36rpx;
|
||||
}
|
||||
.text_6 {
|
||||
line-height: 31.88rpx;
|
||||
}
|
||||
.text_5 {
|
||||
line-height: 24.28rpx;
|
||||
}
|
||||
.text_8 {
|
||||
color: #323232;
|
||||
}
|
||||
.text_9 {
|
||||
line-height: 24.52rpx;
|
||||
}
|
||||
.text_10 {
|
||||
line-height: 24.43rpx;
|
||||
}
|
||||
.text_11 {
|
||||
width: 270rpx;
|
||||
}
|
||||
.pos {
|
||||
position: absolute;
|
||||
left: 141.05rpx;
|
||||
top: 142.92rpx;
|
||||
}
|
||||
|
||||
/* 调整价格明细区右边内边距 */
|
||||
.section_4 {
|
||||
padding: 22.5rpx 22.5rpx 0 22.5rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 4.01rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
}
|
||||
.text_12 {
|
||||
line-height: 24.41rpx;
|
||||
}
|
||||
.text_13 {
|
||||
line-height: 24.41rpx;
|
||||
}
|
||||
.text_14 {
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.group_9 {
|
||||
padding: 22.5rpx 0 18.75rpx;
|
||||
border-top: solid 1.88rpx #e3e3e3;
|
||||
}
|
||||
.text_15 {
|
||||
line-height: 24.49rpx;
|
||||
}
|
||||
.text_16 {
|
||||
color: #f84947;
|
||||
}
|
||||
|
||||
/* 底部按钮 */
|
||||
.text-wrapper {
|
||||
padding: 37.5rpx 0;
|
||||
flex: 1 1 375rpx;
|
||||
background-color: #ffffff;
|
||||
height: 105rpx;
|
||||
}
|
||||
.text-wrapper_2 {
|
||||
padding: 37.5rpx 0;
|
||||
flex: 1 1 375rpx;
|
||||
background-color: #ff8d1a;
|
||||
height: 105rpx;
|
||||
}
|
||||
.text_17 {
|
||||
color: #323232;
|
||||
}
|
||||
.text_18 {
|
||||
color: #ffffff;
|
||||
line-height: 27.81rpx;
|
||||
}
|
Reference in New Issue
Block a user