paysuccess.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view class="pages">
  3. <view class="icon-wrap u-flex u-row-center" v-if="success=='true'">
  4. <u-icon name="checkmark" color="#fff" size="80"></u-icon>
  5. </view>
  6. <view class="icon-wrap u-flex u-row-center" v-else style="background-color: #FFB100;">
  7. <u-icon name="close" color="#fff" size="80"></u-icon>
  8. </view>
  9. <view class="title">{{title}}</view>
  10. <view class="full-btn" v-if="success=='true'" @click="btnClick">查看兑换码</view>
  11. <view class="msg" v-else>{{msg}}</view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. title:'兑换成功',
  19. codeData:null,
  20. msg:null,
  21. success:null,
  22. }
  23. },
  24. onShow() {
  25. },
  26. onLoad(page) {
  27. this.codeData = page.codeData;
  28. this.msg = page.msg;
  29. this.success = page.success;
  30. console.log('success',this.success);
  31. if(this.success=='true'){
  32. this.title = '兑换成功';
  33. }else{
  34. this.title = '兑换失败';
  35. }
  36. uni.setNavigationBarTitle({
  37. title:this.title
  38. });
  39. },
  40. methods: {
  41. btnClick(){
  42. uni.$u.route('/center/paycode', {
  43. qrContent: this.codeData,
  44. });
  45. // uni.reLaunch({url: `/center/paycode?qrContent=${this.codeData}`});
  46. }
  47. }
  48. }
  49. </script>
  50. <style>
  51. page{
  52. background-color: #F5F5F5;
  53. }
  54. </style>
  55. <style lang="scss" scoped>
  56. .pages{
  57. text-align: center;
  58. }
  59. .icon-wrap{
  60. width: 180rpx;
  61. height: 180rpx;
  62. margin: 120rpx auto 20rpx;
  63. padding: 20rpx;
  64. background-color: #00EFB2;
  65. border-radius: 50%;
  66. }
  67. .title{
  68. font-size: 34rpx;
  69. font-family: PingFangSC-Semibold, PingFang SC;
  70. font-weight: 600;
  71. color: #333333;
  72. line-height: 48rpx;
  73. margin-bottom: 120rpx;
  74. }
  75. .full-btn{
  76. margin: 20rpx 10%;
  77. background-color: #009AEF;
  78. }
  79. .msg{
  80. font-size: 30rpx;
  81. font-family: PingFangSC-Regular, PingFang SC;
  82. font-weight: 400;
  83. color: #999999;
  84. line-height: 42rpx;
  85. }
  86. </style>