detail.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="box">
  3. <image class="box-img" src="../../images/tongxingma.png"></image>
  4. <view class="box-info">
  5. <view class="box-info-title">您的通行码</view>
  6. <view class="box-info-img">
  7. <image v-if="info" class="box-info-qrcode" :src="info.qrcode"></image>
  8. </view>
  9. <view class="box-info-desc">请持通行码至保安人员认证通过哦~</view>
  10. <view class="box-info-org" v-if="info">{{info.orgName}}</view>
  11. <view class="box-info-greet">欢迎您</view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. var app = getApp();
  17. export default {
  18. data() {
  19. return {
  20. info: null
  21. }
  22. },
  23. onLoad() {
  24. var that = this;
  25. const eventChannel = this.getOpenerEventChannel()
  26. // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
  27. eventChannel.on('acceptDataFromOpenerPage', function(data) {
  28. that.info = data;
  29. })
  30. },
  31. methods: {
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. page{
  37. background-color: $theme-color;
  38. }
  39. .box{
  40. position: relative;
  41. width: 100%;
  42. height: 100%;
  43. }
  44. .box-img{
  45. display: block;
  46. width: 642rpx;
  47. height: 974rpx;
  48. margin: 0 auto;
  49. }
  50. .box-info{
  51. position: absolute;
  52. z-index: 100;
  53. width: 750rpx;
  54. left: 0;
  55. top: 0;
  56. bottom: 0;
  57. text-align: center;
  58. }
  59. .box-info-title{
  60. font-size: 28rpx;
  61. color: $theme-color;
  62. font-weight: blod;
  63. margin-top: 160rpx;
  64. }
  65. .box-info-img{
  66. width: 324rpx;
  67. height: 324rpx;
  68. border: 1rpx solid #CCCCCC;
  69. margin: 0 auto;
  70. border-radius: 40rpx;
  71. padding: 19rpx;
  72. margin-top: 20rpx;
  73. margin-bottom: 10rpx;
  74. }
  75. .box-info-qrcode{
  76. width: 314rpx;
  77. height: 314rpx;
  78. }
  79. .box-info-desc{
  80. color: #8C8C8C;
  81. font-size: 24rpx;
  82. }
  83. .box-info-org{
  84. color: $theme-color;
  85. font-size: 50rpx;
  86. margin-top: 60rpx;
  87. }
  88. .box-info-greet{
  89. color: $theme-color;
  90. font-size: 140rpx;
  91. }
  92. </style>