<template> <view class="page-cont"> <view class="icon-cont"> <u-icon class="icon" name="checkmark" color="#fff" size="80"></u-icon> <view>支付成功</view> <view class="num-cont"> <view> {{payNum}} </view> <u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image> </view> </view> <view class="back-btn"> <u-button :custom-style="btnStyle" @click="toHome">返回首页</u-button> </view> </view> </template> <script> export default { data() { return { btnStyle: { backgroundColor: '#07c160', color:'#fff' }, payNum: 0 //支付乐豆数 } }, onLoad(option) { console.log(option,'option') this.payNum = option.num // 开启分享 uni.showShareMenu({ withShareTicket: true, menus: ['shareAppMessage', 'shareTimeline'] }) }, methods: { // 返回首页 toHome() { uni.reLaunch({ url: '/pages/index/index' }) } } } </script> <style lang="less"> page{ height: 100%; } .page-cont{ width: 100%; height: 100%; background-color: #fff; padding: 0 40upx; .icon-cont{ width: 100%; height: 400upx; display: flex; flex-direction: column; align-items: center; justify-content: center; .num-cont{ display: flex; color: red; font-size: 36upx; font-weight: 600; } >view{ font-size: 30upx; margin-top: 40upx; } } .icon{ width: 120upx; height: 120upx; background-color: #07c160; display: flex; justify-content: center; border-radius: 50%; } .back-btn{ margin-top: 40upx; } } </style>