showGuide.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <view class="pop-view" v-if='visible'>
  3. <view class="pop-maskView" :style="{
  4. 'background-color': maskBgColor,
  5. zIndex: zIndex - 1
  6. }" @tap.stop="handleMaskTap"
  7. @touchmove.stop.prevent="moveHandle">
  8. </view>
  9. <view class="pop-content">
  10. <image class="backImg" src="https://dm.static.elab-plus.com/yezhu/h5/showGuideImg.png" mode="aspectFit"></image>
  11. <view class="closeBtn" @click="hide">
  12. <image class="closeImg" src="https://dm.static.elab-plus.com/yezhu/h5/icon_closeBtn.png" mode="aspectFit"></image>
  13. </view>
  14. <view class="registBtn" @click="registAction">立即注册</view>
  15. <view class="lookBtn" @click="hide">先去逛逛</view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default{
  21. props: {
  22. title: String,
  23. maskColor: {
  24. type: String,
  25. default: 'rgba(0, 0, 0, 0.3)'
  26. },
  27. zIndex: {
  28. type: Number,
  29. default: 999
  30. },
  31. maskTapHide: {
  32. type: Boolean,
  33. default: true
  34. },
  35. isShowTitle: {
  36. type: Boolean,
  37. default: true
  38. },
  39. isShowClose: {
  40. type: Boolean,
  41. default: true
  42. },
  43. isShowConfirm: {
  44. type: Boolean,
  45. default: true
  46. },
  47. isScannerOption:{
  48. type:Boolean,
  49. default:false
  50. },
  51. marginSize:{
  52. type: String,
  53. default: '20rpx'
  54. }
  55. },
  56. data(){
  57. return {
  58. visible: false,
  59. containerVisible: false,
  60. maskBgColor: '',
  61. selectValue: [0],
  62. selIdx: 0,
  63. color2:''
  64. }
  65. },
  66. mounted() {
  67. let app = getApp();
  68. this.globalData = app.globalData;
  69. this.color2 = this.globalData.color2;
  70. },
  71. methods:{
  72. show() {
  73. this.visible = true
  74. setTimeout(() => {
  75. this.maskBgColor = this.maskColor
  76. this.containerVisible = true
  77. }, 20)
  78. },
  79. hide() {
  80. this.maskBgColor = ''
  81. this.containerVisible = false
  82. this.visible = false
  83. this.$emit('close')
  84. },
  85. handleMaskTap() {
  86. if (this.maskTapHide) {
  87. this.hide()
  88. }
  89. },
  90. moveHandle() {},
  91. registAction() {
  92. this.hide()
  93. this.$emit('registAction')
  94. }
  95. },
  96. components:{
  97. }
  98. }
  99. </script>
  100. <style scoped lang="scss">
  101. .pop-view {
  102. position: relative;
  103. .pop-maskView {
  104. position: fixed;
  105. top: 0;
  106. right: 0;
  107. left: 0;
  108. bottom: 0;
  109. }
  110. .pop-content {
  111. position: fixed;
  112. z-index: 1000;
  113. width: 628rpx;
  114. height: 894rpx;
  115. top: calc((100% - 894rpx) / 2 - 50rpx);
  116. left: calc((100% - 628rpx) / 2);
  117. .backImg {
  118. position: absolute;
  119. top: 0;
  120. left: 0;
  121. width: 100%;
  122. height: 100%;
  123. }
  124. .closeBtn {
  125. position: absolute;
  126. z-index: 1000;
  127. right: 50rpx;
  128. top: 100rpx;
  129. width: 50rpx;
  130. height: 50rpx;
  131. padding: 10rpx;
  132. box-sizing: border-box;
  133. .closeImg {
  134. width: 100%;
  135. height: 100%;
  136. }
  137. }
  138. .registBtn {
  139. width: 280rpx;
  140. height: 72rpx;
  141. background: #ffffff;
  142. border-radius: 36rpx;
  143. box-shadow: 0rpx 6rpx 12rpx 0rpx rgba(0,0,0,0.16);
  144. position: absolute;
  145. bottom: 36rpx;
  146. line-height: 72rpx;
  147. text-align: center;
  148. left: calc((100% - 280rpx) / 2 - 10rpx);
  149. font-size: 36rpx;
  150. font-family: Verdana, Verdana-Bold;
  151. font-weight: 700;
  152. color: #f07423;
  153. letter-spacing: 0.72px;
  154. }
  155. .lookBtn {
  156. font-size: 24rpx;
  157. font-family: Verdana, Verdana-Bold;
  158. font-weight: 700;
  159. text-align: left;
  160. color: rgba(255,255,255,0.80);
  161. line-height: 46rpx;
  162. position: absolute;
  163. bottom: 46rpx;
  164. right: 56rpx;
  165. }
  166. }
  167. }
  168. </style>