checksuccess.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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('/pages/index/index', {
  43. // });
  44. uni.reLaunch({url: `/pages/index/index`});
  45. }
  46. }
  47. }
  48. </script>
  49. <style>
  50. page{
  51. background-color: #F5F5F5;
  52. }
  53. </style>
  54. <style lang="scss" scoped>
  55. .pages{
  56. text-align: center;
  57. }
  58. .icon-wrap{
  59. width: 180rpx;
  60. height: 180rpx;
  61. margin: 120rpx auto 20rpx;
  62. padding: 20rpx;
  63. background-color: #00EFB2;
  64. border-radius: 50%;
  65. }
  66. .title{
  67. font-size: 34rpx;
  68. font-family: PingFangSC-Semibold, PingFang SC;
  69. font-weight: 600;
  70. color: #333333;
  71. line-height: 48rpx;
  72. margin-bottom: 120rpx;
  73. }
  74. .full-btn{
  75. margin: 20rpx 10%;
  76. background-color: #009AEF;
  77. }
  78. .msg{
  79. font-size: 30rpx;
  80. font-family: PingFangSC-Regular, PingFang SC;
  81. font-weight: 400;
  82. color: #999999;
  83. line-height: 42rpx;
  84. }
  85. </style>