none-hd.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view class="model" v-if="show">
  3. <image
  4. :src="`${constant.imgUrl}/ghs/home/deserve.png`"
  5. class="noData_img"
  6. ></image>
  7. <view class="no_data_text">{{title}}</view>
  8. <view class="freeApply" @click="apply">{{btnText}}</view>
  9. <view class="experience" v-if="expreShow" @click="experienceClick">体验</view>
  10. <view class="experFrame">
  11. <view v-if="rightShow">
  12. <input
  13. v-model="experCode"
  14. class="experInput"
  15. placeholder="请输入体验码"
  16. type="number"
  17. />
  18. <text class="admin-button-com small blue" @click="rightClick">确定</text>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. props: {
  26. show: {
  27. type: Boolean,
  28. default: true,
  29. },
  30. btnText: {
  31. type: String,
  32. default: '',
  33. },
  34. title: {
  35. type: String,
  36. default: '',
  37. },
  38. authShow: {
  39. type: Boolean,
  40. default: false,
  41. }
  42. },
  43. watch: {
  44. authShow(val) {
  45. this.expreShow = val
  46. }
  47. },
  48. data() {
  49. return {
  50. constant: this.$constant,
  51. experCode: '',
  52. expreShow: false,
  53. rightShow: false
  54. };
  55. },
  56. methods: {
  57. apply() {
  58. this.$emit('bthClick')
  59. },
  60. experienceClick(){
  61. console.log('abc123')
  62. this.rightShow = true
  63. this.expreShow = false
  64. },
  65. rightClick() {
  66. this.$emit('comfirm', this.experCode)
  67. }
  68. },
  69. };
  70. </script>
  71. <style lang="scss" scoped>
  72. .model {
  73. position: fixed;
  74. z-index: 9999;
  75. top: 0;
  76. left: 0;
  77. width: 100vw;
  78. height: 100vh;
  79. background: rgba(0, 0, 0, 0.6);
  80. color: #fff;
  81. overflow: hidden;
  82. text-align: center;
  83. & > .noData_img {
  84. width: 318upx;
  85. height: 318upx;
  86. margin: 332upx auto 0;
  87. }
  88. & > .no_data_text {
  89. font-size: 32upx;
  90. color: #ffffff;
  91. text-align: center;
  92. margin: 50upx 0;
  93. }
  94. & > .freeApply {
  95. width: 376upx;
  96. height: 88upx;
  97. line-height: 88upx;
  98. background: linear-gradient(90deg, #3385ff, #33b0ff);
  99. border-radius: 44upx;
  100. margin: 0 auto;
  101. font-size: 32upx;
  102. color: #ffffff;
  103. text-align: center;
  104. }
  105. &>.experience{
  106. margin-top: 40upx;
  107. color: #fff;
  108. font-size: 30upx;
  109. }
  110. &>.experFrame{
  111. margin-top: 50upx;
  112. height: 50upx;
  113. &>view{
  114. margin: 0 auto;
  115. &>.experInput{
  116. height: 70upx;
  117. width: 250upx;
  118. display: inline-block;
  119. vertical-align: middle;
  120. border-radius: 8upx;
  121. background-color: #fff;
  122. border: 1upx solid #ccc;
  123. color: #666;
  124. padding-left: 20upx;
  125. box-sizing: border-box;
  126. text-align: left;
  127. }
  128. &>text{
  129. display: inline-block;
  130. line-height: 70upx;
  131. padding: 0 20upx;
  132. background-color: #3385FF;
  133. vertical-align: middle;
  134. font-size: 30upx;
  135. margin-left: 20upx;
  136. }
  137. }
  138. }
  139. }
  140. </style>