jufubao-forms 1.0.0-beta12 → 1.0.0-beta14
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
CHANGED
|
@@ -102,7 +102,14 @@
|
|
|
102
102
|
<xd-font-icon icon="iconchenggong" color="#06bc85" :size="64"></xd-font-icon>
|
|
103
103
|
<view class="status_tip">您已成功提交</view>
|
|
104
104
|
<view class="status_name">{{ formName }}</view>
|
|
105
|
-
<view class="status_btn" @click="doClose">关闭</view>
|
|
105
|
+
<!-- <view class="status_btn" @click="doClose">关闭</view> -->
|
|
106
|
+
<view class="status_btn_wrap">
|
|
107
|
+
<view class="status_btn" @click="doClose">关闭</view>
|
|
108
|
+
<view class="status_btn" v-if="marketToolText"
|
|
109
|
+
style="background:#FE7A63;"
|
|
110
|
+
@click="handleMarketToolBtn"
|
|
111
|
+
>{{ marketToolText }}</view>
|
|
112
|
+
</view>
|
|
106
113
|
</view>
|
|
107
114
|
<view v-if="form_status === 'error'" class="form_status form_error">
|
|
108
115
|
<!-- <xd-font-icon icon="iconshibai" color="#ff5235" :size="64"></xd-font-icon> -->
|
|
@@ -185,6 +192,10 @@
|
|
|
185
192
|
return {
|
|
186
193
|
formName: "",
|
|
187
194
|
form: {},
|
|
195
|
+
marketing_tool: "",
|
|
196
|
+
activity_page_url: "",
|
|
197
|
+
activity_id: "",
|
|
198
|
+
foreign_id: "",
|
|
188
199
|
dynamicFormList: [],
|
|
189
200
|
renderForm: "renderForm",
|
|
190
201
|
form_id: "",
|
|
@@ -210,6 +221,15 @@
|
|
|
210
221
|
...mapState({
|
|
211
222
|
brandInfo: state => state.brandInfo
|
|
212
223
|
}),
|
|
224
|
+
marketToolText(){
|
|
225
|
+
let toolText = {
|
|
226
|
+
prize: '去抽奖',
|
|
227
|
+
coupon: '去领券',
|
|
228
|
+
walking: '健步走',
|
|
229
|
+
};
|
|
230
|
+
let btnText = toolText[this.marketing_tool];
|
|
231
|
+
return btnText ? btnText : '';
|
|
232
|
+
},
|
|
213
233
|
bucket(){
|
|
214
234
|
return this.formBe == 1 ? 'default' : 'saas';
|
|
215
235
|
}
|
|
@@ -244,13 +264,19 @@
|
|
|
244
264
|
let getFormFn = "getDynamicForm"; //加盟商营销动态表单fn
|
|
245
265
|
// if(this.formBe == 2) getFormFn = "getSaasDynamicForm"
|
|
246
266
|
|
|
267
|
+
let activity_range = 2;
|
|
268
|
+
// #ifdef MP
|
|
269
|
+
activity_range = 4;
|
|
270
|
+
// #endif
|
|
271
|
+
|
|
247
272
|
this.$xdShowLoading({});
|
|
248
273
|
jfbRootExec(getFormFn, {
|
|
249
274
|
vm: this,
|
|
250
275
|
data: {
|
|
251
276
|
form_id: this.form_id,
|
|
252
277
|
bucket: this.bucket,
|
|
253
|
-
foreign_id: this.foreign_id
|
|
278
|
+
foreign_id: this.foreign_id,
|
|
279
|
+
activity_range: activity_range
|
|
254
280
|
}
|
|
255
281
|
}).then(res => {
|
|
256
282
|
this.$xdHideLoading();
|
|
@@ -345,6 +371,17 @@
|
|
|
345
371
|
getTimeFormat2(num) {
|
|
346
372
|
return Number(num) < 10 ? "0" + num : num;
|
|
347
373
|
},
|
|
374
|
+
handleMarketToolBtn(){
|
|
375
|
+
let url = this.checkUrlIsValid(this.activity_page_url);
|
|
376
|
+
if(url){
|
|
377
|
+
if(this.marketing_tool === 'prize') url = url + '?id=' + this.activity_id;
|
|
378
|
+
else if(this.marketing_tool === 'coupon') url = url + '?activity_id=' + this.activity_id;
|
|
379
|
+
else url = url + `?id=${this.activity_id}&activity_id=${this.activity_id}&foreign_id=${this.foreign_id}`;
|
|
380
|
+
this.$xdUniHelper.navigateTo({
|
|
381
|
+
url: url
|
|
382
|
+
})
|
|
383
|
+
}
|
|
384
|
+
},
|
|
348
385
|
doCheckValidCode(){
|
|
349
386
|
let token = this.valid_token;
|
|
350
387
|
let valid_code = this.valid_code;
|
|
@@ -436,6 +473,10 @@
|
|
|
436
473
|
}
|
|
437
474
|
}).then(res => {
|
|
438
475
|
this.$xdHideLoading();
|
|
476
|
+
this.marketing_tool = res.marketing_tool;
|
|
477
|
+
this.activity_page_url = res.activity_page_url;
|
|
478
|
+
this.activity_id = res.activity_id;
|
|
479
|
+
this.foreign_id = res.foreign_id;
|
|
439
480
|
this.form_status = 'success';
|
|
440
481
|
})
|
|
441
482
|
},
|
|
@@ -682,6 +723,11 @@
|
|
|
682
723
|
font-size: 32rpx;
|
|
683
724
|
margin: 78rpx 0;
|
|
684
725
|
}
|
|
726
|
+
.status_btn_wrap{
|
|
727
|
+
display: flex;
|
|
728
|
+
justify-content: center;
|
|
729
|
+
width: 80%;
|
|
730
|
+
}
|
|
685
731
|
.status_btn{
|
|
686
732
|
width: 80%;
|
|
687
733
|
border-radius: 4px;
|
|
@@ -691,6 +737,9 @@
|
|
|
691
737
|
height: 80rpx;
|
|
692
738
|
line-height: 80rpx;
|
|
693
739
|
text-align: center;
|
|
740
|
+
& + .status_btn{
|
|
741
|
+
margin-left: 32rpx;
|
|
742
|
+
}
|
|
694
743
|
}
|
|
695
744
|
}
|
|
696
745
|
|
|
@@ -130,11 +130,17 @@
|
|
|
130
130
|
this.qaDetailPath = getContainerPropsValue(container, 'content.qaDetailPath', {value: ""}).value;
|
|
131
131
|
},
|
|
132
132
|
getList(){
|
|
133
|
+
let activity_show_terminal = 2;
|
|
134
|
+
|
|
135
|
+
// #ifdef MP
|
|
136
|
+
activity_show_terminal = 4;
|
|
137
|
+
// #endif
|
|
133
138
|
let data = {
|
|
134
139
|
page_token: this.page_token+'',
|
|
135
140
|
page_size: this.page_size,
|
|
136
141
|
bucket: this.bucket,
|
|
137
|
-
base_type: this.base_type
|
|
142
|
+
base_type: this.base_type,
|
|
143
|
+
activity_range: activity_show_terminal
|
|
138
144
|
}
|
|
139
145
|
jfbRootExec("getSaasFormList", {
|
|
140
146
|
vm: this,
|
|
@@ -243,12 +243,17 @@
|
|
|
243
243
|
this.form_id = options.form_id;
|
|
244
244
|
this.foreign_id = options.foreign_id;
|
|
245
245
|
}
|
|
246
|
+
let activity_range = 2;
|
|
247
|
+
// #ifdef MP
|
|
248
|
+
activity_range = 4;
|
|
249
|
+
// #endif
|
|
246
250
|
this.$xdShowLoading({});
|
|
247
251
|
jfbRootExec("getDynamicForm", {
|
|
248
252
|
vm: this,
|
|
249
253
|
data: {
|
|
250
254
|
form_id: this.form_id,
|
|
251
|
-
foreign_id: this.foreign_id
|
|
255
|
+
foreign_id: this.foreign_id,
|
|
256
|
+
activity_range: activity_range
|
|
252
257
|
}
|
|
253
258
|
}).then(res => {
|
|
254
259
|
this.$xdHideLoading();
|
|
@@ -333,7 +338,7 @@
|
|
|
333
338
|
let url = this.checkUrlIsValid(this.activity_page_url);
|
|
334
339
|
if(url){
|
|
335
340
|
if(this.marketing_tool === 'prize') url = url + '?id=' + this.activity_id;
|
|
336
|
-
if(this.marketing_tool === 'coupon') url = url + '?activity_id=' + this.activity_id;
|
|
341
|
+
else if(this.marketing_tool === 'coupon') url = url + '?activity_id=' + this.activity_id;
|
|
337
342
|
else url = url + `?id=${this.activity_id}&activity_id=${this.activity_id}&foreign_id=${this.foreign_id}`;
|
|
338
343
|
this.$xdUniHelper.navigateTo({
|
|
339
344
|
url: url
|