qrcode.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <div class="qrcode">
  3. <img class="qrcodebg" :src="require(`@/assets/images/mobile/kuangti/fenxiang.png`)" alt="">
  4. <div class="brightness"></div>
  5. <div class="qrcodecon">
  6. <h3>分享</h3>
  7. <div class="ctitle">
  8. <span>邀请好友一起观展吧!</span>
  9. <span>请长按下方图片下载二维码分享给好友</span>
  10. </div>
  11. <div class="ul">
  12. <div class="li">
  13. <p v-if="!currentPano.name" v-html="currentPano.name"></p>
  14. <div class="xiala" v-else>
  15. <span @click="isShowUl=!isShowUl">
  16. {{currentPano.name}}
  17. <img :src="require(`@/assets/images/project/icon/jiantour.png`)" alt="">
  18. </span>
  19. <ul class="brightness" v-if="isShowUl">
  20. <li @click="isShowUl=false,currentPano.name='四川省返乡创业'" v-for="(item,i) in 2" :key="i">
  21. 四川省返乡创业
  22. </li>
  23. </ul>
  24. </div>
  25. <img :src="require(`@/assets/images/project/qrcode.jpg`)" alt="" />
  26. </div>
  27. <div class="li">
  28. <p v-html="currentItem.name"></p>
  29. <img :src="require(`@/assets/images/project/qrcode.jpg`)" alt="" />
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </template>
  35. <script>
  36. export default {
  37. props:['currentPano','currentItem'],
  38. data(){
  39. return {
  40. isShowUl:false
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="less" scoped>
  46. @w:100%;
  47. @fixw:8px;
  48. .qrcode{
  49. width: @w;
  50. height: 100%;
  51. position: relative;
  52. .qrcodebg{
  53. width: @w;
  54. position: absolute;
  55. z-index: 999;
  56. pointer-events: none;
  57. bottom: 0;
  58. left: 0;
  59. }
  60. .qrcodecon{
  61. width: 100%;
  62. height: 100%;
  63. text-align: center;
  64. padding: 20px 0 0;
  65. position: relative;
  66. >h3{
  67. font-weight: normal;
  68. font-size: 16px;
  69. position: absolute;
  70. top: 20px;
  71. left: 20px;
  72. }
  73. .ctitle{
  74. margin-top: 40px;
  75. text-align: center;
  76. >span{
  77. display: block;
  78. &:first-of-type{
  79. font-size: 18px;
  80. font-weight: bold;
  81. margin-bottom: 2px;
  82. }
  83. &:last-of-type{
  84. font-size: 12px;
  85. color: rgba(255, 255, 255, 0.7);
  86. }
  87. }
  88. }
  89. >.ul{
  90. width: 100%;
  91. height: calc(100% - 100px);
  92. overflow-y: auto;
  93. padding: 10px;
  94. >.li{
  95. text-align: center;
  96. width: 100%;
  97. margin-top: 10px;
  98. >p,.xiala{
  99. font-size: 14px;
  100. line-height: 1.5;
  101. display: flex;
  102. align-items: center;
  103. justify-content: center;
  104. }
  105. .xiala{
  106. width: 50%;
  107. margin: 0 auto 10px;
  108. position: relative;
  109. >span{
  110. border: 1px solid #fff;
  111. display: inline-block;
  112. border-radius: 4px;
  113. width: 100%;
  114. padding: 10px 30px 10px 10px;
  115. position: relative;
  116. cursor: pointer;
  117. overflow: hidden;
  118. text-overflow:ellipsis;
  119. white-space: nowrap;
  120. >img{
  121. position: absolute;
  122. right: 12px;
  123. transform: rotate(90deg);
  124. top: 33%;
  125. width: 8px;
  126. }
  127. }
  128. >ul{
  129. position: absolute;
  130. top: 110%;
  131. padding: 0 10px;
  132. width: 100%;
  133. z-index: 99;
  134. clip-path:none!important;
  135. border-radius: 4px;
  136. overflow: hidden;
  137. height: auto;
  138. >li{
  139. text-align: left;
  140. line-height: 1.5;
  141. border-bottom: dashed 1px #fff;
  142. padding: 10px 0;
  143. cursor: pointer;
  144. font-size: 16px;
  145. &:last-of-type{
  146. border-bottom: none;
  147. }
  148. }
  149. }
  150. }
  151. >img{
  152. max-width: 150px;
  153. width: 50%;
  154. margin: 10px 0 ;
  155. }
  156. }
  157. }
  158. }
  159. }
  160. </style>