jufubao-base 1.0.67-beta200 → 1.0.67-beta202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/JfbBaseConDialog/Attr.js +13 -0
- package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +60 -57
- package/src/components/JfbBaseConList/Api.js +11 -0
- package/src/components/JfbBaseConList/JfbBaseConList.vue +146 -50
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +5 -6
package/package.json
CHANGED
|
@@ -41,6 +41,19 @@ export default {
|
|
|
41
41
|
className: 'input80',
|
|
42
42
|
unit: '小时'
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
label: '是否隐藏弹框(仅预览模式生效):',
|
|
46
|
+
ele: 'xd-radio',
|
|
47
|
+
valueKey: 'isHide',
|
|
48
|
+
value: data['isHide']||false,
|
|
49
|
+
placeholder: '请选择是否隐藏弹框',
|
|
50
|
+
multiple: false,
|
|
51
|
+
className: 'input80',
|
|
52
|
+
list: [
|
|
53
|
+
{ label: '是', value: true },
|
|
54
|
+
{ label: '否', value: false },
|
|
55
|
+
]
|
|
56
|
+
},
|
|
44
57
|
].filter(i=>i)
|
|
45
58
|
},
|
|
46
59
|
advanced: [],
|
|
@@ -23,6 +23,26 @@
|
|
|
23
23
|
<view class="jfb-base-con-dialog__body-dialog-content-num">
|
|
24
24
|
<text>{{ currentIndex + 1 }}/{{ list.length }}</text>
|
|
25
25
|
</view>
|
|
26
|
+
<view style="display: flex; align-items: center">
|
|
27
|
+
<view
|
|
28
|
+
@click="handleChange('left')"
|
|
29
|
+
v-if="this.type === 2 && this.currentIndex !== 0"
|
|
30
|
+
class="jfb-base-con-dialog__body-dialog-content-left"
|
|
31
|
+
>
|
|
32
|
+
<xd-font-icon icon="iconxiangzuo_xian"></xd-font-icon>
|
|
33
|
+
</view>
|
|
34
|
+
<view class="jfb-base-con-dialog__body-dialog-content-image">
|
|
35
|
+
<image :src="currentImage"></image>
|
|
36
|
+
<image @click="handleToList" :src="currentBtnImage"></image>
|
|
37
|
+
</view>
|
|
38
|
+
<view
|
|
39
|
+
v-if="this.type === 2 && this.currentIndex !== list.length - 1"
|
|
40
|
+
@click="handleChange('right')"
|
|
41
|
+
class="jfb-base-con-dialog__body-dialog-content-right"
|
|
42
|
+
>
|
|
43
|
+
<xd-font-icon icon="iconxiangyou_xian"></xd-font-icon>
|
|
44
|
+
</view>
|
|
45
|
+
</view>
|
|
26
46
|
<xd-font-icon
|
|
27
47
|
@click="handleClose"
|
|
28
48
|
class="jfb-base-con-dialog__body-dialog-content-close"
|
|
@@ -30,41 +50,26 @@
|
|
|
30
50
|
color="#fff"
|
|
31
51
|
size="64"
|
|
32
52
|
></xd-font-icon>
|
|
33
|
-
<view
|
|
34
|
-
@click="handleChange('left')"
|
|
35
|
-
v-if="this.type === 2 && this.currentIndex !== 0"
|
|
36
|
-
class="jfb-base-con-dialog__body-dialog-content-left"
|
|
37
|
-
>
|
|
38
|
-
<xd-font-icon icon="iconxiangzuo_xian"></xd-font-icon>
|
|
39
|
-
</view>
|
|
40
|
-
<view
|
|
41
|
-
v-if="this.type === 2 && this.currentIndex !== list.length - 1"
|
|
42
|
-
@click="handleChange('right')"
|
|
43
|
-
class="jfb-base-con-dialog__body-dialog-content-right"
|
|
44
|
-
>
|
|
45
|
-
<xd-font-icon icon="iconxiangyou_xian"></xd-font-icon>
|
|
46
|
-
</view>
|
|
47
|
-
<view class="jfb-base-con-dialog__body-dialog-content-image">
|
|
48
|
-
<image :src="currentImage"></image>
|
|
49
|
-
<image @click="handleToList" :src="currentBtnImage"></image>
|
|
50
|
-
</view>
|
|
51
53
|
</view>
|
|
52
54
|
</view>
|
|
55
|
+
<view
|
|
56
|
+
:style="{ background: backgroundColor, color: warningColor }"
|
|
57
|
+
class="jfb-base-con-dialog__body-pop"
|
|
58
|
+
v-if="isPreview"
|
|
59
|
+
>弹框方便编辑(占位),在线上此模块不显</view
|
|
60
|
+
>
|
|
53
61
|
</view>
|
|
54
62
|
</view>
|
|
55
63
|
</template>
|
|
56
64
|
|
|
57
65
|
<script>
|
|
58
66
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
59
|
-
import XdButton from "@/components/XdButton/XdButton";
|
|
60
67
|
import { jfbRootExec, JfbEvent } from "@/utils/xd.event";
|
|
61
68
|
import JfbBaseConDialogMixin from "./JfbBaseConDialogMixin";
|
|
62
69
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
63
70
|
import extsMixins from "@/mixins/extsMixins";
|
|
64
71
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
65
72
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
66
|
-
import XdDailog from "@/components/XdDailog/XdDailog";
|
|
67
|
-
import XdContentXss from "@/components/XdContentXss/XdContentXss";
|
|
68
73
|
import colorCardMixins from "@/mixins/colorCardMixins";
|
|
69
74
|
const Color = require("color");
|
|
70
75
|
import { mapState } from "vuex";
|
|
@@ -74,9 +79,6 @@ export default {
|
|
|
74
79
|
name: "JfbBaseConDialog",
|
|
75
80
|
components: {
|
|
76
81
|
XdFontIcon,
|
|
77
|
-
XdButton,
|
|
78
|
-
XdDailog,
|
|
79
|
-
XdContentXss,
|
|
80
82
|
},
|
|
81
83
|
mixins: [componentsMixins, extsMixins, JfbBaseConDialogMixin],
|
|
82
84
|
data() {
|
|
@@ -90,10 +92,11 @@ export default {
|
|
|
90
92
|
type: "",
|
|
91
93
|
isPreview: false, //是否预览
|
|
92
94
|
activity_id: "",
|
|
95
|
+
backgroundColor: "",
|
|
93
96
|
};
|
|
94
97
|
},
|
|
95
98
|
computed: {
|
|
96
|
-
...mapState(["
|
|
99
|
+
...mapState(["pageBusinessCode"]),
|
|
97
100
|
},
|
|
98
101
|
watch: {
|
|
99
102
|
container(value) {
|
|
@@ -103,10 +106,7 @@ export default {
|
|
|
103
106
|
},
|
|
104
107
|
created() {
|
|
105
108
|
this.isPreview = this.$configProject.isPreview;
|
|
106
|
-
|
|
107
|
-
this.isShow = true;
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
109
|
+
this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
110
110
|
this.init(this.container);
|
|
111
111
|
},
|
|
112
112
|
methods: {
|
|
@@ -115,13 +115,17 @@ export default {
|
|
|
115
115
|
value: "",
|
|
116
116
|
}).value;
|
|
117
117
|
this.type = getContainerPropsValue(value, "content.type", 1);
|
|
118
|
+
this.isHide = getContainerPropsValue(value, "content.isHide", false);
|
|
118
119
|
this.time = Number(getContainerPropsValue(value, "content.time", 3));
|
|
120
|
+
if (this.isPreview) {
|
|
121
|
+
this.isShow = !this.isHide;
|
|
122
|
+
}
|
|
119
123
|
},
|
|
120
124
|
getDialogList() {
|
|
121
125
|
jfbRootExec("getCouponDialogList", {
|
|
122
126
|
vm: this,
|
|
123
127
|
data: {
|
|
124
|
-
namespace: this.
|
|
128
|
+
namespace: this.pageBusinessCode,
|
|
125
129
|
},
|
|
126
130
|
})
|
|
127
131
|
.then((res) => {
|
|
@@ -148,7 +152,6 @@ export default {
|
|
|
148
152
|
onJfbLoad(options) {
|
|
149
153
|
console.log(11111);
|
|
150
154
|
try {
|
|
151
|
-
this.setNameSpace(options);
|
|
152
155
|
if (!storage.get(this.containerId)) this.getDialogList();
|
|
153
156
|
} catch (error) {
|
|
154
157
|
console.log(error, "errorerror");
|
|
@@ -160,7 +163,7 @@ export default {
|
|
|
160
163
|
},
|
|
161
164
|
handleToList() {
|
|
162
165
|
this.$xdUniHelper.navigateTo({
|
|
163
|
-
url: `${this.list_url}?activity_id=${this.activity_id}`,
|
|
166
|
+
url: `${this.list_url}?activity_id=${this.activity_id}&distribution_method=homed`,
|
|
164
167
|
});
|
|
165
168
|
},
|
|
166
169
|
handleClose() {
|
|
@@ -203,13 +206,21 @@ export default {
|
|
|
203
206
|
|
|
204
207
|
.jfb-base-con-dialog {
|
|
205
208
|
&__body {
|
|
209
|
+
&-pop {
|
|
210
|
+
min-height: 100rpx;
|
|
211
|
+
text-align: center;
|
|
212
|
+
vertical-align: middle;
|
|
213
|
+
color: #666;
|
|
214
|
+
font-size: unit(24, rpx);
|
|
215
|
+
line-height: 100rpx;
|
|
216
|
+
}
|
|
206
217
|
&-dialog {
|
|
207
218
|
position: fixed;
|
|
208
219
|
top: 0;
|
|
209
220
|
bottom: 0;
|
|
210
221
|
left: 0;
|
|
211
222
|
right: 0;
|
|
212
|
-
z-index:
|
|
223
|
+
z-index: 3000;
|
|
213
224
|
|
|
214
225
|
&-mask {
|
|
215
226
|
position: absolute;
|
|
@@ -221,12 +232,17 @@ export default {
|
|
|
221
232
|
}
|
|
222
233
|
|
|
223
234
|
&-content {
|
|
235
|
+
max-height: unit(1000, rpx);
|
|
236
|
+
overflow-y: auto;
|
|
237
|
+
overflow-x: hidden;
|
|
238
|
+
position: absolute;
|
|
239
|
+
top: 50%;
|
|
240
|
+
left: 50%;
|
|
241
|
+
transform: translate(-50%, -50%);
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-direction: column;
|
|
224
244
|
&-num {
|
|
225
|
-
|
|
226
|
-
top: 16%;
|
|
227
|
-
right: 50%;
|
|
228
|
-
z-index: 3000;
|
|
229
|
-
transform: translateX(50%);
|
|
245
|
+
margin: 0 auto;
|
|
230
246
|
background: rgba(255, 255, 255, 0.5);
|
|
231
247
|
border-radius: unit(40, rpx);
|
|
232
248
|
padding: unit(8, rpx) unit(24, rpx);
|
|
@@ -234,42 +250,29 @@ export default {
|
|
|
234
250
|
font-size: unit(40, rpx);
|
|
235
251
|
}
|
|
236
252
|
&-close {
|
|
237
|
-
|
|
238
|
-
bottom: 12%;
|
|
239
|
-
right: 50%;
|
|
240
|
-
z-index: 3000;
|
|
241
|
-
transform: translateX(50%);
|
|
253
|
+
margin: 0 auto;
|
|
242
254
|
}
|
|
243
255
|
&-left {
|
|
244
|
-
position: absolute;
|
|
245
|
-
top: 50%;
|
|
246
|
-
left: 1%;
|
|
247
|
-
z-index: 3000;
|
|
248
256
|
background: rgba(255, 255, 255, 0.1);
|
|
249
257
|
padding: unit(40, rpx) unit(10, rpx);
|
|
250
258
|
color: #fff;
|
|
251
259
|
border-radius: unit(40, rpx);
|
|
252
260
|
}
|
|
253
261
|
&-right {
|
|
254
|
-
position: absolute;
|
|
255
|
-
top: 50%;
|
|
256
|
-
right: 1%;
|
|
257
|
-
z-index: 3000;
|
|
258
262
|
background: rgba(255, 255, 255, 0.1);
|
|
259
263
|
padding: unit(40, rpx) unit(10, rpx);
|
|
260
264
|
color: #fff;
|
|
261
265
|
border-radius: unit(40, rpx);
|
|
262
266
|
}
|
|
263
267
|
&-image {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
left: 50%;
|
|
267
|
-
transform: translate(-50%, -50%);
|
|
268
|
-
width: unit(600, rpx);
|
|
268
|
+
min-width: unit(600, rpx);
|
|
269
|
+
min-height: unit(800, rpx);
|
|
269
270
|
height: unit(800, rpx);
|
|
270
271
|
display: flex;
|
|
271
272
|
align-items: center;
|
|
272
273
|
flex-direction: column;
|
|
274
|
+
margin: 20rpx;
|
|
275
|
+
position: relative;
|
|
273
276
|
|
|
274
277
|
& > image:first-child {
|
|
275
278
|
width: 100%;
|
|
@@ -280,7 +283,7 @@ export default {
|
|
|
280
283
|
width: unit(448, rpx);
|
|
281
284
|
height: unit(70, rpx);
|
|
282
285
|
position: absolute;
|
|
283
|
-
bottom: unit(
|
|
286
|
+
bottom: unit(100, rpx);
|
|
284
287
|
}
|
|
285
288
|
}
|
|
286
289
|
}
|
|
@@ -44,4 +44,15 @@ module.exports = [
|
|
|
44
44
|
isConsole: true,
|
|
45
45
|
disabled: true,
|
|
46
46
|
},
|
|
47
|
+
{
|
|
48
|
+
mapFnName: 'getCouponResult', //自定义方法名字(必选)
|
|
49
|
+
title: '轮询查询活动结果',
|
|
50
|
+
path: '/sms-coupon/v1/activity-prizes-user/get',
|
|
51
|
+
isRule: false,
|
|
52
|
+
params: {
|
|
53
|
+
tmp_order_number: ['tmp_order_number', 'String', '选填'],
|
|
54
|
+
},
|
|
55
|
+
isConsole: true,
|
|
56
|
+
disabled: true,
|
|
57
|
+
},
|
|
47
58
|
];
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
<!-- #endif -->
|
|
19
19
|
<view class="jfb-base-con-list__body">
|
|
20
20
|
<view class="jfb-base-con-list__body-header">
|
|
21
|
-
<image
|
|
22
|
-
:src="background"
|
|
23
|
-
></image>
|
|
21
|
+
<image :src="background"></image>
|
|
24
22
|
</view>
|
|
25
23
|
<view class="jfb-base-con-list__body-content">
|
|
26
24
|
<view class="jfb-base-con-list__body-content-header">
|
|
@@ -46,25 +44,25 @@
|
|
|
46
44
|
>
|
|
47
45
|
<view class="jfb-base-con-list__body-content-list-item-left">
|
|
48
46
|
<view
|
|
49
|
-
style="
|
|
50
|
-
background: url('https://i.niupic.com/images/2023/11/22/d1bV.webp');
|
|
51
|
-
background-size: 100% 100%;
|
|
52
|
-
background-repeat: no-repeat;
|
|
53
|
-
"
|
|
47
|
+
:style="couponBackground"
|
|
54
48
|
class="jfb-base-con-list__body-content-list-item-left-info"
|
|
55
49
|
>
|
|
56
50
|
<view :style="{ color: mainColor }">满减券</view>
|
|
57
|
-
<view>{{item.prize_name}}</view>
|
|
51
|
+
<view>{{ item.prize_name }}</view>
|
|
58
52
|
</view>
|
|
59
53
|
<view class="jfb-base-con-list__body-content-list-item-left-num">
|
|
60
|
-
<view>{{item.prize_name}}</view>
|
|
61
|
-
<view :style="{ color: mainColor }">
|
|
54
|
+
<view>{{ item.prize_name }}</view>
|
|
55
|
+
<view :style="{ color: mainColor,display:'flex',alignItems:'center' }">
|
|
56
|
+
<xd-font-icon style="margin-right:10rpx" size="24" icon="icondanchuangguanbi_xian"></xd-font-icon>
|
|
57
|
+
{{ item.prize_num }}
|
|
58
|
+
</view>
|
|
62
59
|
</view>
|
|
63
60
|
</view>
|
|
64
61
|
<view class="jfb-base-con-list__body-content-list-item-right">
|
|
65
62
|
<xd-font-icon
|
|
63
|
+
size="100"
|
|
66
64
|
:style="{ color: disabled ? '#D6D6D6' : mainColor }"
|
|
67
|
-
icon="
|
|
65
|
+
:icon="disabled ? 'iconyilingqu' : 'icondailingqu'"
|
|
68
66
|
></xd-font-icon>
|
|
69
67
|
</view>
|
|
70
68
|
</view>
|
|
@@ -73,11 +71,12 @@
|
|
|
73
71
|
<view style="height: 120rpx"></view>
|
|
74
72
|
<view class="bottom_btn" :style="prod_bottom">
|
|
75
73
|
<xd-button
|
|
74
|
+
:disabled="disabled"
|
|
76
75
|
@click="getCoupont"
|
|
77
|
-
|
|
76
|
+
type="primary"
|
|
77
|
+
:style="btn"
|
|
78
78
|
width="60%"
|
|
79
|
-
|
|
80
|
-
>一键领取</xd-button
|
|
79
|
+
>{{ disabled ? "已领取" : "一键领取" }}</xd-button
|
|
81
80
|
>
|
|
82
81
|
</view>
|
|
83
82
|
<xd-dailog
|
|
@@ -102,7 +101,7 @@ import extsMixins from "@/mixins/extsMixins";
|
|
|
102
101
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
103
102
|
import XdDailog from "@/components/XdDailog/XdDailog";
|
|
104
103
|
import XdContentXss from "@/components/XdContentXss/XdContentXss";
|
|
105
|
-
import getServiceUrl from
|
|
104
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
106
105
|
import colorCardMixins from "@/mixins/colorCardMixins";
|
|
107
106
|
import { mapState } from "vuex";
|
|
108
107
|
const Color = require("color");
|
|
@@ -124,19 +123,29 @@ export default {
|
|
|
124
123
|
notice: "",
|
|
125
124
|
showRule: false,
|
|
126
125
|
btn: "",
|
|
127
|
-
activity_id:
|
|
128
|
-
background:
|
|
126
|
+
activity_id: "",
|
|
127
|
+
background: "",
|
|
128
|
+
app_coupon_url: "",
|
|
129
|
+
method: "entry",
|
|
130
|
+
maxTime: 5, //最长轮询2的N次方(秒)
|
|
131
|
+
date: 2, //时间底数
|
|
132
|
+
time: 1, //时间幂指数
|
|
133
|
+
timeer: null,
|
|
134
|
+
order_num: null,
|
|
129
135
|
};
|
|
130
136
|
},
|
|
131
137
|
computed: {
|
|
132
138
|
prod_bottom() {
|
|
133
139
|
return this.fixedStyle({ height: 0, zIndex: 111 });
|
|
134
140
|
},
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
141
|
+
couponBackground() {
|
|
142
|
+
return {
|
|
143
|
+
background: `url(${this.app_coupon_url})`,
|
|
144
|
+
backgroundSize: "100% 100%",
|
|
145
|
+
backgroundRepeat: "no-repeat",
|
|
146
|
+
};
|
|
138
147
|
},
|
|
139
|
-
...mapState(["
|
|
148
|
+
...mapState(["pageBusinessCode"]),
|
|
140
149
|
},
|
|
141
150
|
watch: {
|
|
142
151
|
container(value) {
|
|
@@ -146,6 +155,11 @@ export default {
|
|
|
146
155
|
created() {
|
|
147
156
|
this.init(this.container);
|
|
148
157
|
},
|
|
158
|
+
destroyed() {
|
|
159
|
+
if (this.timeer) {
|
|
160
|
+
clearTimeout(this.timeer);
|
|
161
|
+
}
|
|
162
|
+
},
|
|
149
163
|
methods: {
|
|
150
164
|
init(value) {
|
|
151
165
|
this.contentBackground = Color(this.mainColor).alpha(0.2).toString();
|
|
@@ -154,36 +168,95 @@ export default {
|
|
|
154
168
|
jfbRootExec("getCouponList", {
|
|
155
169
|
vm: this,
|
|
156
170
|
data: {
|
|
157
|
-
distribution_method:
|
|
158
|
-
namespace: this.
|
|
159
|
-
activity_id: this.activity_id
|
|
171
|
+
distribution_method: this.method,
|
|
172
|
+
namespace: this.pageBusinessCode,
|
|
173
|
+
activity_id: this.activity_id,
|
|
160
174
|
},
|
|
161
|
-
}).then(res=>{
|
|
162
|
-
this.background = getServiceUrl(res.background)
|
|
163
|
-
this.couponList = res.list
|
|
164
|
-
}).catch(err=>{
|
|
165
|
-
console.log(err,'err');
|
|
166
175
|
})
|
|
176
|
+
.then((res) => {
|
|
177
|
+
this.background = getServiceUrl(res.background);
|
|
178
|
+
this.app_coupon_url = getServiceUrl(res.app_coupon_url);
|
|
179
|
+
this.btn = res.app_activity_button
|
|
180
|
+
? {
|
|
181
|
+
background: `url(${getServiceUrl(res.app_activity_button)})`,
|
|
182
|
+
backgroundSize: "100% 100%",
|
|
183
|
+
backgroundRepeat: "no-repeat",
|
|
184
|
+
}
|
|
185
|
+
: { background: this.mainColor };
|
|
186
|
+
this.couponList = res.list;
|
|
187
|
+
})
|
|
188
|
+
.catch((err) => {
|
|
189
|
+
console.log(err, "err");
|
|
190
|
+
});
|
|
167
191
|
},
|
|
168
192
|
getCoupont() {
|
|
193
|
+
this.$xdShowLoading({});
|
|
169
194
|
jfbRootExec("getAllCoupon", {
|
|
170
195
|
vm: this,
|
|
171
196
|
data: {
|
|
172
|
-
distribution_method:
|
|
173
|
-
namespace: this.
|
|
174
|
-
activity_id: this.activity_id
|
|
197
|
+
distribution_method: this.method,
|
|
198
|
+
namespace: this.pageBusinessCode,
|
|
199
|
+
activity_id: this.activity_id,
|
|
175
200
|
},
|
|
176
|
-
})
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
201
|
+
})
|
|
202
|
+
.then((res) => {
|
|
203
|
+
this.order_num = res.tmp_order_number;
|
|
204
|
+
this.getResult();
|
|
205
|
+
})
|
|
206
|
+
.catch((err) => {
|
|
207
|
+
console.log(err, "err");
|
|
182
208
|
});
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
209
|
+
},
|
|
210
|
+
getResult() {
|
|
211
|
+
jfbRootExec("getCouponResult", {
|
|
212
|
+
vm: this,
|
|
213
|
+
data: {
|
|
214
|
+
tmp_order_number: this.order_num,
|
|
215
|
+
},
|
|
186
216
|
})
|
|
217
|
+
.then((res) => {
|
|
218
|
+
if (res.status_type === "success") {
|
|
219
|
+
this.$xdHideLoading();
|
|
220
|
+
this.$xdAlert({
|
|
221
|
+
content: "领取成功",
|
|
222
|
+
zIndex: 3200,
|
|
223
|
+
time: 2000,
|
|
224
|
+
isClose: false,
|
|
225
|
+
});
|
|
226
|
+
this.disabled = true;
|
|
227
|
+
if (this.timeer) {
|
|
228
|
+
clearTimeout(this.timeer);
|
|
229
|
+
}
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (res.status_type === "error") {
|
|
233
|
+
this.$xdHideLoading();
|
|
234
|
+
this.$xdAlert({
|
|
235
|
+
content: "领取失败",
|
|
236
|
+
zIndex: 3200,
|
|
237
|
+
time: 2000,
|
|
238
|
+
isClose: false,
|
|
239
|
+
});
|
|
240
|
+
this.disabled = false;
|
|
241
|
+
if (this.timeer) {
|
|
242
|
+
clearTimeout(this.timeer);
|
|
243
|
+
}
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
this.time++;
|
|
247
|
+
this.timeer = setTimeout(() => {
|
|
248
|
+
this.getResult();
|
|
249
|
+
if (this.time > 5)
|
|
250
|
+
this.$xdLog.setARMSInfo(
|
|
251
|
+
{ message: "领取中" },
|
|
252
|
+
`pay_${res.status_type}`
|
|
253
|
+
);
|
|
254
|
+
}, Math.pow(this.date, this.time > this.maxTime ? this.maxTime : this.time) * 1000);
|
|
255
|
+
})
|
|
256
|
+
.catch((err) => {
|
|
257
|
+
this.$xdHideLoading();
|
|
258
|
+
console.log(err, "err");
|
|
259
|
+
});
|
|
187
260
|
},
|
|
188
261
|
getContent() {
|
|
189
262
|
jfbRootExec("getListBaseNewsContentCoupon", {
|
|
@@ -205,14 +278,35 @@ export default {
|
|
|
205
278
|
});
|
|
206
279
|
},
|
|
207
280
|
onJfbLoad(options) {
|
|
208
|
-
this.
|
|
209
|
-
this.
|
|
281
|
+
console.log(this.pageBusinessCode, "pageNamespace");
|
|
282
|
+
this.activity_id = options.activity_id;
|
|
283
|
+
this.method = options.distribution_method
|
|
284
|
+
? options.distribution_method
|
|
285
|
+
: "entry";
|
|
210
286
|
this.getContent();
|
|
211
287
|
this.getList();
|
|
212
288
|
},
|
|
213
289
|
|
|
214
|
-
|
|
215
|
-
|
|
290
|
+
onJfbShow() {
|
|
291
|
+
if (this.timeer) {
|
|
292
|
+
clearTimeout(this.timeer);
|
|
293
|
+
}
|
|
294
|
+
this.time = 0;
|
|
295
|
+
if (this.order_num) this.getResult();
|
|
296
|
+
},
|
|
297
|
+
|
|
298
|
+
onJfbUnload() {
|
|
299
|
+
if (this.timeer) {
|
|
300
|
+
clearTimeout(this.timeer);
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
|
|
304
|
+
onJfbBack(options) {
|
|
305
|
+
if (this.timeer) {
|
|
306
|
+
clearTimeout(this.timeer);
|
|
307
|
+
}
|
|
308
|
+
if (this.$configProject.isPreview) return;
|
|
309
|
+
this.$xdUniHelper.navigateBack();
|
|
216
310
|
},
|
|
217
311
|
},
|
|
218
312
|
};
|
|
@@ -225,7 +319,6 @@ export default {
|
|
|
225
319
|
&__body {
|
|
226
320
|
position: relative;
|
|
227
321
|
&-header {
|
|
228
|
-
width: 100%;
|
|
229
322
|
height: unit(600, rpx);
|
|
230
323
|
& > image {
|
|
231
324
|
width: 100%;
|
|
@@ -236,9 +329,11 @@ export default {
|
|
|
236
329
|
border-radius: unit(20, rpx);
|
|
237
330
|
background: #fff;
|
|
238
331
|
padding: unit(40, rpx);
|
|
239
|
-
position:
|
|
240
|
-
top: unit(
|
|
241
|
-
|
|
332
|
+
position: absolute;
|
|
333
|
+
top: unit(164, rpx);
|
|
334
|
+
left: 50%;
|
|
335
|
+
transform: translateX(-50%);
|
|
336
|
+
width: unit(600, rpx);
|
|
242
337
|
|
|
243
338
|
&-header {
|
|
244
339
|
display: flex;
|
|
@@ -267,6 +362,7 @@ export default {
|
|
|
267
362
|
|
|
268
363
|
&-list {
|
|
269
364
|
margin-top: unit(20, rpx);
|
|
365
|
+
|
|
270
366
|
&-item {
|
|
271
367
|
margin-top: unit(20, rpx);
|
|
272
368
|
display: flex;
|
|
@@ -400,6 +400,11 @@ export default {
|
|
|
400
400
|
this.isPreview = this.$configProject.isPreview;
|
|
401
401
|
this.init(this.container);
|
|
402
402
|
},
|
|
403
|
+
destroyed() {
|
|
404
|
+
if (this.timeer) {
|
|
405
|
+
clearTimeout(this.timeer);
|
|
406
|
+
}
|
|
407
|
+
},
|
|
403
408
|
methods: {
|
|
404
409
|
|
|
405
410
|
onJfbLoad(options) {
|
|
@@ -639,12 +644,6 @@ export default {
|
|
|
639
644
|
}
|
|
640
645
|
},
|
|
641
646
|
|
|
642
|
-
destroyed() {
|
|
643
|
-
if (this.timeer) {
|
|
644
|
-
clearTimeout(this.timeer);
|
|
645
|
-
}
|
|
646
|
-
},
|
|
647
|
-
|
|
648
647
|
/**
|
|
649
648
|
* @description 页面返回按钮
|
|
650
649
|
* @param options
|