帮忙用uniapp 写一个报名成功页面

在uni-app中,创建一个简单的报名成功页面可以如下所示:

<template>
  <view class="success-page">
    <view class="header">报名成功</view>
    
    <image class="icon" src="/static/images/success.png" mode="widthFix"></image>

    <view class="content">
      您已成功提交报名信息!我们将在审核后通过短信或邮件通知您后续事宜,请留意查收。
    </view>

    <button class="btn" type="primary" @tap="redirectToHome">返回首页</button>
  </view>
</template>

<script>
export default {
  methods: {
    redirectToHome() {
      uni.switchTab({
        url: '/pages/index/index' // 替换为你的首页路径
      });
    }
  }
};
</script>

<style scoped>
.success-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 30px;
}

.header {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

.icon {
  width: 200px;
  height: 200px;
  margin-bottom: 30px;
}

.content {
  font-size: 16px;
  color: #666;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 30px;
}

.btn {
  width: 80%;
  margin-top: 30px;
}
</style>

这个示例代码定义了一个显示“报名成功”信息的页面,包含一个图标、一段提示文字以及一个跳转到首页的按钮。样式上确保了内容居中显示,并且提供了一种简洁明了的视觉反馈。

请注意替换redirectToHome方法中的URL为你实际项目的首页路径。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值