jufubao-forms 1.0.0-beta5 → 1.0.0-beta7
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/JfbFormsDynamicForm/JfbFormsDynamicForm.vue +19 -13
- package/src/components/JfbFormsDynamicForm/JfbFormsDynamicFormLess.less +5 -4
- package/src/components/JfbFormsList/JfbFormsList.vue +3 -1
- package/src/components/JfbFormsList/JfbFormsListLess.less +5 -4
- package/src/components/JfbFormsQaResult/JfbFormsQaResult.vue +9 -4
- package/src/components/JfbFormsQaResult/JfbFormsQaResultLess.less +5 -4
- package/src/components/JfbFormsQuestionAndAnswer/JfbFormsQuestionAndAnswer.vue +11 -4
- package/src/components/JfbFormsQuestionAndAnswer/JfbFormsQuestionAndAnswerLess.less +5 -4
package/package.json
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
:class="{ editx : isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view class="jfb-forms-dynamic-form__edit-icon" @click="delEdit"
|
|
13
|
+
<view class="jfb-forms-dynamic-form__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
14
16
|
</view>
|
|
15
17
|
<!-- #endif -->
|
|
16
18
|
<view class="jfb-forms-dynamic-form__body">
|
|
@@ -108,8 +110,8 @@
|
|
|
108
110
|
<view class="status_name">{{ formName }}</view>
|
|
109
111
|
</view>
|
|
110
112
|
</view>
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
|
|
114
|
+
|
|
113
115
|
<xd-dialog :show.sync="isShowDialog" title="请输入验证码" :showCloseIcon="false">
|
|
114
116
|
<xd-form
|
|
115
117
|
label-align="left"
|
|
@@ -129,7 +131,7 @@
|
|
|
129
131
|
</view>
|
|
130
132
|
</xd-form-item>
|
|
131
133
|
</xd-form>
|
|
132
|
-
|
|
134
|
+
|
|
133
135
|
<view slot="btn">
|
|
134
136
|
<xd-button type="primary" width="400rpx" @click="doCheckValidCode">提交</xd-button>
|
|
135
137
|
</view>
|
|
@@ -202,6 +204,9 @@
|
|
|
202
204
|
...mapState({
|
|
203
205
|
brandInfo: state => state.brandInfo
|
|
204
206
|
}),
|
|
207
|
+
bucket(){
|
|
208
|
+
return this.formBe == 1 ? 'default' : 'saas';
|
|
209
|
+
}
|
|
205
210
|
},
|
|
206
211
|
watch: {
|
|
207
212
|
container(value, oldValue) {
|
|
@@ -230,14 +235,14 @@
|
|
|
230
235
|
this.form_id = 1;
|
|
231
236
|
}
|
|
232
237
|
let getFormFn = "getDynamicForm"; //加盟商营销动态表单fn
|
|
233
|
-
if(this.formBe == 2) getFormFn = "getSaasDynamicForm"
|
|
234
|
-
|
|
238
|
+
// if(this.formBe == 2) getFormFn = "getSaasDynamicForm"
|
|
235
239
|
|
|
236
240
|
this.$xdShowLoading({});
|
|
237
241
|
jfbRootExec(getFormFn, {
|
|
238
242
|
vm: this,
|
|
239
243
|
data: {
|
|
240
244
|
form_id: this.form_id,
|
|
245
|
+
bucket: this.bucket
|
|
241
246
|
}
|
|
242
247
|
}).then(res => {
|
|
243
248
|
this.$xdHideLoading();
|
|
@@ -250,7 +255,7 @@
|
|
|
250
255
|
}
|
|
251
256
|
this.dynamicFormList = res.list.map((item, i) => {
|
|
252
257
|
item.error = "";
|
|
253
|
-
|
|
258
|
+
|
|
254
259
|
if(item.is_show_explain !== 'Y'){
|
|
255
260
|
item.explain = "";
|
|
256
261
|
}
|
|
@@ -409,14 +414,15 @@
|
|
|
409
414
|
console.log(contents, "contents")
|
|
410
415
|
|
|
411
416
|
let submitFormFn = "submitDynamicForm"; //加盟商营销动态表单fn
|
|
412
|
-
if(this.formBe == 2) submitFormFn = "submitSaasDynamicForm"
|
|
417
|
+
// if(this.formBe == 2) submitFormFn = "submitSaasDynamicForm"
|
|
413
418
|
|
|
414
419
|
this.$xdShowLoading({});
|
|
415
420
|
jfbRootExec(submitFormFn, {
|
|
416
421
|
vm: this,
|
|
417
422
|
data: {
|
|
418
423
|
contents,
|
|
419
|
-
form_id: this.form_id
|
|
424
|
+
form_id: this.form_id,
|
|
425
|
+
bucket: this.bucket,
|
|
420
426
|
}
|
|
421
427
|
}).then(res => {
|
|
422
428
|
this.$xdHideLoading();
|
|
@@ -565,7 +571,7 @@
|
|
|
565
571
|
return this.getDecimalTip(item);
|
|
566
572
|
}
|
|
567
573
|
}
|
|
568
|
-
|
|
574
|
+
|
|
569
575
|
//开始验证限制范围
|
|
570
576
|
if(fieldValue && !showRange) return errTip;
|
|
571
577
|
max = Number(max);
|
|
@@ -661,7 +667,7 @@
|
|
|
661
667
|
text-align: center;
|
|
662
668
|
}
|
|
663
669
|
}
|
|
664
|
-
|
|
670
|
+
|
|
665
671
|
.align-center{
|
|
666
672
|
display: flex;
|
|
667
673
|
align-items: center;
|
|
@@ -736,7 +742,7 @@
|
|
|
736
742
|
}
|
|
737
743
|
.uni-easyinput__content-input{
|
|
738
744
|
font-size: 24rpx;
|
|
739
|
-
|
|
745
|
+
|
|
740
746
|
.uni-easyinput__placeholder-class{
|
|
741
747
|
font-size: 24rpx;
|
|
742
748
|
}
|
|
@@ -748,7 +754,7 @@
|
|
|
748
754
|
font-size: 24rpx !important;
|
|
749
755
|
border: none !important;
|
|
750
756
|
}
|
|
751
|
-
|
|
757
|
+
|
|
752
758
|
}
|
|
753
759
|
.description{
|
|
754
760
|
color: #666666;
|
|
@@ -44,17 +44,18 @@
|
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: unit(0, rpx);
|
|
47
|
-
top: unit(
|
|
47
|
+
top: unit(0, rpx);
|
|
48
48
|
height: unit(50, rpx);
|
|
49
|
-
|
|
49
|
+
z-index: 100;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
|
-
background: rgba(0, 0, 0, .
|
|
54
|
-
border-radius:
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
55
|
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
56
|
color: #fff;
|
|
57
57
|
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
58
59
|
|
|
59
60
|
&-icon{
|
|
60
61
|
padding: 0 unit(20, rpx);
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
:class="{ editx : isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view class="jfb-forms-list__edit-icon" @click="delEdit"
|
|
13
|
+
<view class="jfb-forms-list__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
14
16
|
</view>
|
|
15
17
|
<!-- #endif -->
|
|
16
18
|
<view class="jfb-forms-list__body">
|
|
@@ -44,17 +44,18 @@
|
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: unit(0, rpx);
|
|
47
|
-
top: unit(
|
|
47
|
+
top: unit(0, rpx);
|
|
48
48
|
height: unit(50, rpx);
|
|
49
|
-
|
|
49
|
+
z-index: 100;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
|
-
background: rgba(0, 0, 0, .
|
|
54
|
-
border-radius:
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
55
|
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
56
|
color: #fff;
|
|
57
57
|
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
58
59
|
|
|
59
60
|
&-icon{
|
|
60
61
|
padding: 0 unit(20, rpx);
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
:class="{ editx : isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view class="jfb-forms-qa-result__edit-icon" @click="delEdit"
|
|
13
|
+
<view class="jfb-forms-qa-result__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
14
16
|
</view>
|
|
15
17
|
<!-- #endif -->
|
|
16
18
|
<view class="jfb-forms-qa-result__body" :style="{
|
|
@@ -23,10 +25,10 @@
|
|
|
23
25
|
<view class="result_total">共{{ formList.length }}道题</view>
|
|
24
26
|
<view class="btn_wrap">
|
|
25
27
|
<view class="btn" @click="toHomePage">返回首页</view>
|
|
26
|
-
<view class="btn primary" @click="isShowAnalysis=true">答案解析</view>
|
|
28
|
+
<view v-if="is_show_error_answer_analysis==='Y'" class="btn primary" @click="isShowAnalysis=true">答案解析</view>
|
|
27
29
|
</view>
|
|
28
30
|
</view>
|
|
29
|
-
|
|
31
|
+
|
|
30
32
|
<template v-if="isShowAnalysis">
|
|
31
33
|
<view class="analysis_head">
|
|
32
34
|
<view class="_left">答案解析</view>
|
|
@@ -117,6 +119,8 @@
|
|
|
117
119
|
|
|
118
120
|
isShowAnalysis: false, //是否显示解析
|
|
119
121
|
isOnlyError: false, //是否只看错题
|
|
122
|
+
|
|
123
|
+
is_show_error_answer_analysis: "", //创建表单是创建的是否展示错误答案解析Y/N
|
|
120
124
|
//todo
|
|
121
125
|
|
|
122
126
|
returnHomePath: "",
|
|
@@ -155,6 +159,7 @@
|
|
|
155
159
|
'radio': '单选',
|
|
156
160
|
'checkbox': '多选'
|
|
157
161
|
}
|
|
162
|
+
this.is_show_error_answer_analysis = res.is_show_error_answer_analysis;
|
|
158
163
|
this.formList = res.list.map((item, index) => {
|
|
159
164
|
let defaultValue = JSON.parse(item.default);
|
|
160
165
|
item.rightValue = item.answer;
|
|
@@ -387,7 +392,7 @@
|
|
|
387
392
|
&.a_right{
|
|
388
393
|
color: #FFFFFF;
|
|
389
394
|
background: var(--main-color);
|
|
390
|
-
}
|
|
395
|
+
}
|
|
391
396
|
// &.a_error{
|
|
392
397
|
// color: #FF7063;
|
|
393
398
|
// background: #FFE3E0;
|
|
@@ -44,17 +44,18 @@
|
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: unit(0, rpx);
|
|
47
|
-
top: unit(
|
|
47
|
+
top: unit(0, rpx);
|
|
48
48
|
height: unit(50, rpx);
|
|
49
|
-
|
|
49
|
+
z-index: 100;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
|
-
background: rgba(0, 0, 0, .
|
|
54
|
-
border-radius:
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
55
|
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
56
|
color: #fff;
|
|
57
57
|
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
58
59
|
|
|
59
60
|
&-icon{
|
|
60
61
|
padding: 0 unit(20, rpx);
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
:class="{ editx : isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view class="jfb-forms-question-and-answer__edit-icon" @click="delEdit"
|
|
13
|
+
<view class="jfb-forms-question-and-answer__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
14
16
|
</view>
|
|
15
17
|
<!-- #endif -->
|
|
16
18
|
<view class="jfb-forms-question-and-answer__body" :style="{
|
|
@@ -70,8 +72,8 @@
|
|
|
70
72
|
<view class="status_tip">您已成功提交</view>
|
|
71
73
|
<view class="status_name">{{ formName }}</view>
|
|
72
74
|
<view class="status_btn_wrap">
|
|
73
|
-
<view class="status_btn">关闭</view>
|
|
74
|
-
<view class="status_btn" v-if="marketToolText"
|
|
75
|
+
<view class="status_btn" @click="doClose">关闭</view>
|
|
76
|
+
<view class="status_btn" v-if="marketToolText"
|
|
75
77
|
style="background:#FE7A63;"
|
|
76
78
|
@click="handleMarketToolBtn"
|
|
77
79
|
>{{ marketToolText }}</view>
|
|
@@ -81,6 +83,7 @@
|
|
|
81
83
|
<xd-font-icon icon="iconshibai" color="#ff5235" :size="64"></xd-font-icon>
|
|
82
84
|
<view class="status_tip error_tip">{{ err_msg }}</view>
|
|
83
85
|
<view class="status_name">{{ formName }}</view>
|
|
86
|
+
<view class="status_btn" @click="doClose" style="border-radius: 8rpx;">关闭</view>
|
|
84
87
|
</view>
|
|
85
88
|
</view>
|
|
86
89
|
|
|
@@ -121,7 +124,7 @@
|
|
|
121
124
|
marketing_tool: "",
|
|
122
125
|
activity_page_url: "",
|
|
123
126
|
activity_id: "",
|
|
124
|
-
|
|
127
|
+
|
|
125
128
|
value: [],
|
|
126
129
|
qaValue: "",
|
|
127
130
|
|
|
@@ -276,6 +279,10 @@
|
|
|
276
279
|
this.curIndex++;
|
|
277
280
|
}
|
|
278
281
|
},
|
|
282
|
+
doClose(){
|
|
283
|
+
window.location.href = 'about:blank';
|
|
284
|
+
window.close();
|
|
285
|
+
},
|
|
279
286
|
p_submitQaForm(){
|
|
280
287
|
uni.showModal({
|
|
281
288
|
title: '提示',
|
|
@@ -44,17 +44,18 @@
|
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: unit(0, rpx);
|
|
47
|
-
top: unit(
|
|
47
|
+
top: unit(0, rpx);
|
|
48
48
|
height: unit(50, rpx);
|
|
49
|
-
|
|
49
|
+
z-index: 100;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
|
-
background: rgba(0, 0, 0, .
|
|
54
|
-
border-radius:
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
55
|
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
56
|
color: #fff;
|
|
57
57
|
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
58
59
|
|
|
59
60
|
&-icon{
|
|
60
61
|
padding: 0 unit(20, rpx);
|