12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <template>
- <view>
- <u-popup :show="activityShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5" @touchmove.prevent.stop>
- <view class="choiceShow-wrap">
- <view style="width: 400rpx; height: 400rpx;line-height: 400rpx; text-align: center;">
- 是否帮好友助力
- </view>
- <button @click="activityHelp()">确定助力</button>
- </view>
- </u-popup>
- <u-popup :show="closeShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5" @touchmove.prevent.stop>
- <view class="choiceShow-wrap">
- <view style="width: 400rpx; height: 400rpx;line-height: 400rpx; text-align: center;">
- 助力成功
- </view>
- <button @click="close()">取消</button>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- import env from '../../config/env.js'
- import $http from '@/utils/request.js'
- export default {
- name:"activity-help",
- props: {
- activityShow: {
- type: [Boolean],
- default: false
- },
- inviteCode: {
- type: [String],
- default: {}
- },
- marketingId: {
- type: [String],
- default: {}
- },
-
- },
- data() {
- return {
- closeShow: false,
- };
- },
- onShow(){
- // this.activity()
- },
- methods: {
- activity() {
- console.log(this.marketingId);
- console.log(this.inviteCode);
- },
-
- //关闭
- close() {
- this.$emit('close')
- },
-
- success(id) {
- this.$emit('success', id)
- },
-
- activityHelp() {
- console.log(this.marketingId);
- console.log(this.inviteCode);
- uni.showLoading({
- title: '助力中'
- });
- $http.post('/api/v1/mp/user/marketing/help', {
- inviteCode:this.inviteCode,
- marketingId: this.marketingId
- }).then(res => {
- uni.hideLoading();
- if(res.code == 0){
- this.closeShow = true
- }
- this.close()
- })
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- </style>
|