猎豆优选小程序

wxServiceDialog.vue 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <u-mask :show="isShow" :mask-click-able="false">
  3. <view class="service-dialog-wrap">
  4. <view class="content-wrap">
  5. <image class="top-img" src="/static/imgs/money-icon.png" />
  6. <view class="title">活动攻略</view>
  7. <text :user-select="true" class="keyword-wrap">{{ keyword }}</text>
  8. <u-divider color="#aaa" half-width="52" border-color="#D8D8D8" bg-color="transparent" margin-top="34">参与步骤</u-divider>
  9. <view class="step-wrap">
  10. <text class="tips">点击复制并联系客服</text>
  11. <image class="rt-icon" src="/static/imgs/rt-black-icon.png" />
  12. <text class="tips">口令发送给客服</text>
  13. </view>
  14. <view class="btn">复制并联系客服
  15. <button class="contact-btn" open-type="contact" @click="onClickToContact" @contact="onContact" />
  16. </view>
  17. </view>
  18. <image
  19. class="service-dialog-close"
  20. src="/static/imgs/close.png"
  21. mode="widthFix"
  22. @click="onClickClose"
  23. />
  24. </view>
  25. </u-mask>
  26. </template>
  27. <script>
  28. const app = getApp();
  29. export default {
  30. name: "wxServiceDialog",
  31. props: {
  32. keyword: {
  33. type: String,
  34. default: () => "",
  35. },
  36. },
  37. data() {
  38. return {
  39. isShow: false,
  40. };
  41. },
  42. mounted() {
  43. this.handleShowDialog();
  44. },
  45. methods: {
  46. handleShowDialog() {
  47. uni.setStorageSync('wxServiceDialogFlag', true)
  48. this.isShow = true;
  49. },
  50. onClickClose() {
  51. this.$emit('cancel')
  52. },
  53. onClickToContact() {
  54. this.$copyEvent({ text: this.keyword })
  55. this.$emit('confirm', { keyword: this.keyword })
  56. },
  57. onContact(e) {
  58. console.log('onContact => e ', e)
  59. },
  60. },
  61. };
  62. </script>
  63. <style scoped lang="scss">
  64. .service-dialog-wrap {
  65. display: flex;
  66. flex-direction: column;
  67. align-items: center;
  68. justify-content: center;
  69. height: 100%;
  70. width: 100%;
  71. .content-wrap {
  72. position: relative;
  73. display: flex;
  74. flex-direction: column;
  75. align-items: center;
  76. padding-bottom: 56rpx;
  77. width: 620rpx;
  78. background: url('~@/static/imgs/loginReindBg.png') #fff no-repeat;
  79. background-size: 100%;
  80. border-radius: 82rpx 82rpx 36rpx 36rpx;
  81. .top-img {
  82. position: absolute;
  83. left: 50%;
  84. top: -90rpx;
  85. transform: translateX(-50%);
  86. width: 316rpx;
  87. height: 211rpx;
  88. }
  89. .title {
  90. margin-top: 100rpx;
  91. font-size: 44rpx;
  92. font-weight: 600;
  93. color: #333;
  94. line-height: 60rpx;
  95. text-align: center;
  96. }
  97. .keyword-wrap {
  98. margin-top: 44rpx;
  99. width: 540rpx;
  100. border-radius: 16rpx;
  101. border: 2rpx dashed #333;
  102. font-size: 28rpx;
  103. font-weight: 400;
  104. color: #333;
  105. line-height: 40rpx;
  106. padding: 30rpx 10rpx;
  107. text-align: center;
  108. }
  109. .step-wrap {
  110. display: flex;
  111. align-items: center;
  112. margin-top: 34rpx;
  113. .tips {
  114. padding: 4rpx 8rpx;
  115. font-size: 28rpx;
  116. font-weight: 400;
  117. color: #444;
  118. line-height: 40rpx;
  119. background: #F4F4F4;
  120. border-radius: 12rpx;
  121. }
  122. .rt-icon {
  123. margin: 0 4rpx;
  124. width: 20rpx;
  125. height: 20rpx;
  126. }
  127. }
  128. .btn {
  129. position: relative;
  130. margin-top: 56rpx;
  131. width: 548rpx;
  132. height: 108rpx;
  133. background: linear-gradient(90deg, #FF9048 0%, #FB3F3C 100%);
  134. border-radius: 54rpx;
  135. font-size: 36rpx;
  136. font-weight: 400;
  137. color: #FFF;
  138. line-height: 108rpx;
  139. text-align: center;
  140. .contact-btn {
  141. position: absolute;
  142. top: 0;
  143. bottom: 0;
  144. left: 0;
  145. right: 0;
  146. opacity: 0;
  147. }
  148. }
  149. }
  150. .service-dialog-close {
  151. margin-top: 40rpx;
  152. width: 60rpx;
  153. height: 60rpx;
  154. }
  155. }
  156. </style>