activity-help.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <view>
  3. <!-- 确认助力 -->
  4. <u-popup :show="activityShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5"
  5. @touchmove.prevent.stop>
  6. <view class="activityShow">
  7. <view class="activityShow-one">
  8. <image src="../../static/logo.png" mode="" class="activityShow-one-img"></image>
  9. </view>
  10. <view class="activityShow-two">
  11. <image src="../../static/activity/anniu.png" mode="" class="activityShow-two-img"></image>
  12. <text class="activityShow-two-text ells-one">张三</text>
  13. </view>
  14. <view class="activityShow-three">邀请您一起免费抽奖</view>
  15. <image class="activityShow-four" src="../../static/activity/tupian.png" mode=""></image>
  16. <view class="activityShow-five">一起免费抽奖</view>
  17. <view class="activityShow-six">收下好意可以帮助好友完成抽奖助力</view>
  18. <view class="activityShow-seven" @click="activityHelp()">
  19. <image src="../../static/activity/yuanjiao.png" mode="" class="activityShow-seven-img"></image>
  20. <view class="activityShow-seven-view">收下好意</view>
  21. </view>
  22. </view>
  23. </u-popup>
  24. <!-- 助力成功 -->
  25. <u-popup :show="closeShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5"
  26. @touchmove.prevent.stop>
  27. <view class="closeShow">
  28. <view class="closeShow-one">
  29. <image class="closeShow-one-imgone" src="../../static/activity/beijing.png" mode=""></image>
  30. <image class="closeShow-one-imgtwo" src="../../static/activity/beijingtwo.png" mode=""></image>
  31. <view class="closeShow-one-view">助力成功!</view>
  32. </view>
  33. <view class="closeShow-two" @click="close()">
  34. <image class="closeShow-two-img" src="../../static/activity/yuanjiao.png" mode=""></image>
  35. <view class="closeShow-two-view">确定</view>
  36. </view>
  37. </view>
  38. </u-popup>
  39. </view>
  40. </template>
  41. <script>
  42. import env from '../../config/env.js'
  43. import $http from '@/utils/request.js'
  44. export default {
  45. name: "activity-help",
  46. props: {
  47. //显示与隐藏
  48. activityShow: {
  49. type: [Boolean],
  50. default: false
  51. },
  52. //邀请码
  53. inviteCode: {
  54. type: [String],
  55. default: {}
  56. },
  57. //活动id
  58. marketingId: {
  59. type: [String],
  60. default: {}
  61. },
  62. },
  63. data() {
  64. return {
  65. closeShow: false, //邀请助力成功隐藏
  66. };
  67. },
  68. methods: {
  69. //关闭
  70. close() {
  71. this.$emit('close')
  72. },
  73. //确定助力
  74. activityHelp() {
  75. uni.showLoading({
  76. title: '助力中'
  77. });
  78. $http.post('/api/v1/mp/user/marketing/help', {
  79. inviteCode: this.inviteCode,
  80. marketingId: this.marketingId
  81. }).then(res => {
  82. uni.hideLoading();
  83. if (res.code == 0) {
  84. this.closeShow = true
  85. } else if (res.code == 500) {
  86. uni.$u.toast(res.msg);
  87. this.close()
  88. } else {}
  89. })
  90. }
  91. },
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .activityShow {
  96. text-align: center;
  97. width: 600rpx;
  98. &-one {
  99. position: relative;
  100. &-img {
  101. position: absolute;
  102. top: -75rpx;
  103. left: 235rpx;
  104. height: 134rpx;
  105. width: 134rpx;
  106. border-radius: 100%;
  107. background-color: #FDFDFC;
  108. }
  109. }
  110. &-two {
  111. position: relative;
  112. margin-top: 25rpx;
  113. &-img {
  114. width: 198rpx;
  115. height: 48rpx;
  116. }
  117. &-text {
  118. width: 170rpx;
  119. position: absolute;
  120. left: 220rpx;
  121. top: 6rpx;
  122. font-size: 28rpx;
  123. color: #FDFDFC;
  124. font-weight: bold;
  125. text-align: center;
  126. }
  127. }
  128. &-three {
  129. font-size: 36rpx;
  130. font-weight: bold;
  131. color: #333;
  132. }
  133. &-four {
  134. width: 410rpx;
  135. height: 362rpx;
  136. }
  137. &-five {
  138. color: #FF8B0A;
  139. font-size: 73rpx;
  140. font-family: YouSheBiaoTiHei;
  141. font-weight: 400;
  142. }
  143. &-six {
  144. color: #F78B3C;
  145. font-size: 26rpx;
  146. line-height: 60rpx;
  147. }
  148. &-seven {
  149. position: relative;
  150. &-img {
  151. width: 340rpx;
  152. height: 88rpx;
  153. margin-top: 20rpx;
  154. margin-bottom: 40rpx;
  155. }
  156. &-view {
  157. font-size: 34rpx;
  158. color: #FDFBFB;
  159. position: absolute;
  160. top: 40rpx;
  161. left: 235rpx;
  162. }
  163. }
  164. }
  165. .closeShow {
  166. text-align: center;
  167. width: 600rpx;
  168. height: 700rpx;
  169. &-one {
  170. &-imgone {
  171. width: 600rpx;
  172. height: 500rpx;
  173. }
  174. &-imgtwo {
  175. position: absolute;
  176. left: -42rpx;
  177. top: 235rpx;
  178. height: 160rpx;
  179. width: 690rpx;
  180. }
  181. &-view {
  182. font-size: 122rpx;
  183. font-family: YouSheBiaoTiHei;
  184. position: absolute;
  185. top: 235rpx;
  186. left: 55rpx;
  187. color: #fff;
  188. }
  189. }
  190. &-two {
  191. position: relative;
  192. &-img {
  193. width: 340rpx;
  194. height: 88rpx;
  195. margin-top: 40rpx;
  196. margin-bottom: 40rpx;
  197. }
  198. &-view {
  199. font-size: 34rpx;
  200. color: #FDFBFB;
  201. position: absolute;
  202. top: 60rpx;
  203. left: 255rpx;
  204. }
  205. }
  206. }
  207. </style>