1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <template>
| <view class="popActivity" :class="isShow?'show':''">
| <view class="popActivity_box">
| <view class="selectCoupon" @click="handleSelect"></view>
| <image class="popActivity_img" src="https://ossacmall.bluedeer.com.cn/app/static/images/new_user_coupon.png"
| mode="widthFix">
| </image>
| <!-- <view class="popActivity_btn" @click="handleSelect"></view> -->
| <view class="popActivity_close" @click="hide"></view>
| </view>
| </view>
|
| </template>
|
| <script>
| import {
| getNewUserGift
| } from '@/api/api.js'
| export default {
| name: "popNewuser",
| data() {
| return {
| isShow: false,
| };
| },
| methods: {
| show() {
| let that = this;
| // that.isShow = true;
| // return
| const status = uni.getStorageSync('hidePopNewuser')
| if (status == 'true') {
| that.hide()
| return
| }
| getNewUserGift().then(res => {
| console.log("getNewUserGift:::", res)
| if (res.data && res.data.newUser && res.data.issued) {
| that.isShow = true;
| } else {
| that.hide()
| }
| })
|
| },
| hide() {
| uni.setStorageSync('hidePopNewuser', 'true')
| this.isShow = false;
| this.$emit('hide')
| },
| handleSelect(){
| uni.showToast({
| 'icon':'none',
| 'title':'领取成功'
| });
| this.hide()
| }
| }
| }
| </script>
|
| <style lang="scss" scoped>
| .popActivity {
| position: fixed;
| left: 0;
| top: 0;
| width: 100%;
| height: 100%;
| z-index: 11111;
| background-color: rgba(0, 0, 0, .7);
| display: none;
|
| &.show {
| display: block;
| }
| }
|
| .popActivity_box {
| width: 550rpx;
| height: 830rpx;
| position: absolute;
| left: 50%;
| top: 50%;
| transform: translate(-50%, -50%);
|
| .selectCoupon {
| position: absolute;
| width: 76%;
| height: 50%;
| left: 12%;
| top: 16%;
| }
|
| .popActivity_img {
| width: 550rpx;
| height: 700rpx;
| }
|
| .popActivity_btn {
| width: 340rpx;
| height: 80rpx;
| position: absolute;
| left: 50%;
| margin-left: -170rpx;
| bottom: 34%;
| }
|
| .popActivity_close {
| position: absolute;
| left: 50%;
| margin-left: -45rpx;
| bottom: 16%;
| width: 90rpx;
| height: 90rpx;
|
| }
| }
| </style>
|
|