activity-help.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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" style="text-align: center;width: 600rpx; ">
  7. <view style="position: relative;">
  8. <image src="../../static/logo.png" mode="" style="position: absolute;top: -75rpx; left: 235rpx; height: 134rpx;width: 134rpx;border-radius: 100%;background-color: #FDFDFC;"></image>
  9. </view>
  10. <view class="" style="position: relative; margin-top: 25rpx;">
  11. <image src="../../static/activity/anniu.png" mode="" style="width: 198rpx;height: 48rpx;"></image>
  12. <text class="ells-one" style="width: 170rpx; position: absolute;left: 220rpx;top: 6rpx;font-size: 28rpx; color: #FDFDFC;font-weight: bold; text-align: center;">张三</text>
  13. </view>
  14. <view style="font-size: 36rpx;font-weight: bold;color: #333;">邀请您一起免费抽奖</view>
  15. <image src="../../static/activity/tupian.png" mode="" style="width: 410rpx;height: 362rpx;"></image>
  16. <view style="color: #FF8B0A;font-size: 73rpx;font-family: YouSheBiaoTiHei;font-weight: 400;">一起免费抽奖</view>
  17. <view style="color: #F78B3C;font-size: 26rpx;line-height: 60rpx;">收下好意可以帮助好友完成抽奖助力</view>
  18. <view class="activityShow-wrap" style="position: relative;" @click="activityHelp()">
  19. <image src="../../static/activity/yuanjiao.png" mode="" style="width: 340rpx;height: 88rpx;margin-top: 20rpx;margin-bottom: 40rpx;"></image>
  20. <view style="font-size: 34rpx; color: #FDFBFB; position: absolute; top: 40rpx;left: 235rpx;">收下好意</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" @touchmove.prevent.stop>
  26. <!-- <u-popup :show="true" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5" @touchmove.prevent.stop> -->
  27. <view class="closeShow" style="text-align: center;width: 600rpx;height: 700rpx; ">
  28. <view style="position: relative;">
  29. <!-- <image src="../../static/activity/beijing.png" mode="" style="position: absolute;top: 0;left: 0;"></image> -->
  30. <!-- <image src="../../static/activity/beijingtwo.png" mode=""></image> -->
  31. </view>
  32. <view class="closeShow-wrap" style="position: relative;" @click="close()">
  33. <image src="../../static/activity/yuanjiao.png" mode="" style="width: 340rpx;height: 88rpx;margin-top: 20rpx;margin-bottom: 40rpx;"></image>
  34. <view style="font-size: 34rpx; color: #FDFBFB; position: absolute; top: 40rpx;left: 255rpx;">确定</view>
  35. </view>
  36. </view>
  37. </u-popup>
  38. </view>
  39. </template>
  40. <script>
  41. import env from '../../config/env.js'
  42. import $http from '@/utils/request.js'
  43. export default {
  44. name: "activity-help",
  45. props: {
  46. //显示与隐藏
  47. activityShow: {
  48. type: [Boolean],
  49. default: false
  50. },
  51. //邀请码
  52. inviteCode: {
  53. type: [String],
  54. default: {}
  55. },
  56. //活动id
  57. marketingId: {
  58. type: [String],
  59. default: {}
  60. },
  61. },
  62. data() {
  63. return {
  64. closeShow: false, //邀请助力成功隐藏
  65. };
  66. },
  67. methods: {
  68. //关闭
  69. close() {
  70. this.$emit('close')
  71. },
  72. //确定助力
  73. activityHelp() {
  74. uni.showLoading({
  75. title: '助力中'
  76. });
  77. $http.post('/api/v1/mp/user/marketing/help', {
  78. inviteCode: this.inviteCode,
  79. marketingId: this.marketingId
  80. }).then(res => {
  81. uni.hideLoading();
  82. if (res.code == 0) {
  83. this.closeShow = true
  84. } else if (res.code == 500) {
  85. uni.$u.toast(res.msg);
  86. this.close()
  87. } else {}
  88. })
  89. }
  90. },
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. </style>