jufubao-forms 1.0.9-beta4 → 1.0.9-beta6
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jufubao-forms",
|
|
3
|
-
"version": "1.0.9-
|
|
3
|
+
"version": "1.0.9-beta6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "聚福宝表单业务插件库",
|
|
6
6
|
"main": "index.js",
|
|
@@ -86,7 +86,6 @@
|
|
|
86
86
|
"mini-css-extract-plugin": "^1.1.1",
|
|
87
87
|
"mini-types": "*",
|
|
88
88
|
"miniprogram-api-typings": "*",
|
|
89
|
-
"node-sass": "^4.0.0",
|
|
90
89
|
"postcss-comment": "^2.0.0",
|
|
91
90
|
"require-context": "^1.1.0",
|
|
92
91
|
"sass": "^1.29.0",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
<xd-font-icon icon="iconquanbudingdan1" :size="24" color="#32C93A"></xd-font-icon>
|
|
34
34
|
</view>
|
|
35
35
|
答对 {{item.right_number}}题
|
|
36
|
+
<text v-if="item.score" class="score_text">得分 {{item.score}}分</text>
|
|
36
37
|
</view>
|
|
37
38
|
</view>
|
|
38
39
|
</view>
|
|
@@ -111,6 +112,7 @@
|
|
|
111
112
|
//正确率
|
|
112
113
|
item.right_rate = (item.right_number / item.content_number * 100).toFixed(2);
|
|
113
114
|
item.created_time = this.$xdUniHelper.getDate(item.created_time * 1000).fullTime;
|
|
115
|
+
item.score = item.score;
|
|
114
116
|
return item;
|
|
115
117
|
});
|
|
116
118
|
})
|
|
@@ -182,6 +184,11 @@
|
|
|
182
184
|
justify-content: center;
|
|
183
185
|
margin-right: 8rpx;
|
|
184
186
|
}
|
|
187
|
+
.score_text{
|
|
188
|
+
margin-left: 16rpx;
|
|
189
|
+
color: #FF7063;
|
|
190
|
+
font-size: 28rpx;
|
|
191
|
+
}
|
|
185
192
|
}
|
|
186
193
|
.qa_foot{
|
|
187
194
|
padding: 32rpx 24rpx;
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
</view>
|
|
42
42
|
</view>
|
|
43
43
|
|
|
44
|
-
<view class="analysis_body">
|
|
44
|
+
<view class="analysis_body" v-if="!hasNoErrorQuestions">
|
|
45
45
|
<view class="analysis_title">
|
|
46
46
|
<view class="_left">选择题</view>
|
|
47
|
-
<view class="_right">共{{
|
|
47
|
+
<view class="_right">共{{ showFormList.length }}题</view>
|
|
48
48
|
</view>
|
|
49
49
|
<view class="qa_list">
|
|
50
|
-
<view class="qa_item" v-for="
|
|
50
|
+
<view class="qa_item" v-for="item in showFormList" :key="item.field_id">
|
|
51
51
|
<view class="qa_type">【{{item.field_type_name}}】</view>
|
|
52
52
|
<view class="qa_title">{{ item.key }}.{{ item.field_name }}</view>
|
|
53
53
|
<view class="answer_list">
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
<xd-font-icon v-else icon="iconshibai" size="32" color="#FF7063" style="margin-right: 6rpx;"></xd-font-icon>
|
|
73
73
|
{{ item.isRight ? '回答正确' : '回答错误' }}
|
|
74
74
|
</view>
|
|
75
|
+
<view v-if="item.score">得分{{ item.score }}分</view>
|
|
75
76
|
<view class="is_right">正确答案: {{ item.answer_right_abc }}</view>
|
|
76
77
|
</view>
|
|
77
78
|
<view v-if="!item.isRight && item.answer_analysis" class="answer_analysis">
|
|
@@ -84,6 +85,9 @@
|
|
|
84
85
|
</view>
|
|
85
86
|
</view>
|
|
86
87
|
</view>
|
|
88
|
+
<view class="no_error_tip" v-if="hasNoErrorQuestions">
|
|
89
|
+
<text>暂无错题</text>
|
|
90
|
+
</view>
|
|
87
91
|
<view class="to_top_wrap">
|
|
88
92
|
<view class="to_top" @click="scrollToTop">返回顶部</view>
|
|
89
93
|
</view>
|
|
@@ -132,12 +136,16 @@
|
|
|
132
136
|
//todo
|
|
133
137
|
|
|
134
138
|
returnHomePath: "",
|
|
139
|
+
returnDetailPath: "",
|
|
135
140
|
}
|
|
136
141
|
},
|
|
137
142
|
computed: {
|
|
138
143
|
showFormList(){
|
|
139
144
|
return this.isOnlyError ? this.formList.filter(item => !item.isRight) : this.formList;
|
|
140
145
|
},
|
|
146
|
+
hasNoErrorQuestions(){
|
|
147
|
+
return this.isOnlyError && this.showFormList.length === 0;
|
|
148
|
+
},
|
|
141
149
|
marketToolText(){
|
|
142
150
|
let toolText = {
|
|
143
151
|
'prize-answer': '去抽奖',
|
|
@@ -201,6 +209,9 @@
|
|
|
201
209
|
this.activity_page_url = res.activity_page_url;
|
|
202
210
|
this.activity_id = res.activity_id;
|
|
203
211
|
this.foreign_id = res.foreign_id;
|
|
212
|
+
if (res.previous_page) {
|
|
213
|
+
this.returnDetailPath = Base64.decode(res.previous_page);
|
|
214
|
+
}
|
|
204
215
|
})
|
|
205
216
|
|
|
206
217
|
},
|
|
@@ -222,10 +233,16 @@
|
|
|
222
233
|
})
|
|
223
234
|
}
|
|
224
235
|
},
|
|
225
|
-
toHomePage(){
|
|
226
|
-
this
|
|
227
|
-
|
|
228
|
-
|
|
236
|
+
toHomePage() {
|
|
237
|
+
if (this.returnDetailPath) {
|
|
238
|
+
this.$xdUniHelper.navigateTo({
|
|
239
|
+
url: this.returnDetailPath
|
|
240
|
+
})
|
|
241
|
+
} else {
|
|
242
|
+
this.$xdUniHelper.navigateTo({
|
|
243
|
+
url: this.returnHomePath
|
|
244
|
+
})
|
|
245
|
+
}
|
|
229
246
|
},
|
|
230
247
|
//判断两个包含数组是否相同
|
|
231
248
|
isSameArray(arr1, arr2){
|
|
@@ -481,6 +498,16 @@
|
|
|
481
498
|
color: #A6A6A6;
|
|
482
499
|
}
|
|
483
500
|
}
|
|
501
|
+
|
|
502
|
+
.no_error_tip{
|
|
503
|
+
background-color: #FFFFFF;
|
|
504
|
+
padding: 40rpx;
|
|
505
|
+
text-align: center;
|
|
506
|
+
text{
|
|
507
|
+
color: #CCCCCC;
|
|
508
|
+
font-size: 28rpx;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
484
511
|
}
|
|
485
512
|
}
|
|
486
513
|
</style>
|
|
@@ -147,6 +147,7 @@
|
|
|
147
147
|
banner_image: "",
|
|
148
148
|
qaResultPath: "",
|
|
149
149
|
qaListPath: "",
|
|
150
|
+
source_path: '',
|
|
150
151
|
}
|
|
151
152
|
},
|
|
152
153
|
computed: {
|
|
@@ -259,6 +260,7 @@
|
|
|
259
260
|
methods: {
|
|
260
261
|
onJfbLoad(options) {
|
|
261
262
|
options.form_id = options.form_id || options.id;
|
|
263
|
+
this.source_path = options.source_path || '';
|
|
262
264
|
if(!this.isPreview && !options.form_id) {
|
|
263
265
|
return uni.showToast({
|
|
264
266
|
title: '请配置表单id',
|
|
@@ -381,6 +383,7 @@
|
|
|
381
383
|
data: {
|
|
382
384
|
form_id: this.form_id,
|
|
383
385
|
foreign_id: this.foreign_id,
|
|
386
|
+
previous_page: this.source_path,
|
|
384
387
|
contents: this.formList.map(item => {
|
|
385
388
|
let content = Array.isArray(item.value) ? item.value : (item.value ? [item.value] : []);
|
|
386
389
|
return {
|