jufubao-forms 1.0.5 → 1.0.6-beta21

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.5",
3
+ "version": "1.0.6-beta21",
4
4
  "private": false,
5
5
  "description": "聚福宝表单业务插件库",
6
6
  "main": "index.js",
@@ -15,9 +15,12 @@
15
15
  </view>
16
16
  </view>
17
17
  <!-- #endif -->
18
- <view class="jfb-forms-dynamic-form__body">
18
+ <view class="jfb-forms-dynamic-form__body" :style="[formBodyStyleComp]">
19
19
  <view v-if="loaded">
20
20
  <view v-if="form_status === 'content'" class="form_content">
21
+ <view v-if="banner_image" class="form_banner">
22
+ <image mode="widthFix" :src="banner_image"></image>
23
+ </view>
21
24
  <view class="jfb-forms-dynamic-form__title">{{ formName }}</view>
22
25
  <xd-form labelPosition="top" labelAlign="left" :model="form" :paddingBetween="0" :key="renderForm">
23
26
  <xd-form-item v-for="(item, i) in dynamicFormList" :key="item.created_time"
@@ -224,6 +227,7 @@
224
227
  ],
225
228
  data() {
226
229
  return {
230
+ closeMask: true,
227
231
  formName: "",
228
232
  form: {},
229
233
  formPaly: {},
@@ -247,6 +251,8 @@
247
251
  uploadImgList: [],
248
252
  uploadVideoList: [],
249
253
  imgHost: "",
254
+ background_image: "",
255
+ banner_image: "",
250
256
 
251
257
  //面板
252
258
  submitPagePath: "",
@@ -276,6 +282,13 @@
276
282
  },
277
283
  showUploadVideos(){
278
284
  return this.uploadVideoList.map(item => getServiceUrl(item))
285
+ },
286
+ formBodyStyleComp(){
287
+ return {
288
+ backgroundImage: `url(${this.background_image})`,
289
+ backgroundSize: '100% auto',
290
+ backgroundRepeat: 'no-repeat',
291
+ }
279
292
  }
280
293
  },
281
294
  watch: {
@@ -330,6 +343,8 @@
330
343
  this.$xdHideLoading();
331
344
  this.loaded = true;
332
345
  this.formName = res.form_name;
346
+ this.background_image = res.background_image ? getServiceUrl(res.background_image) : "";
347
+ this.banner_image = res.banner_image ? getServiceUrl(res.banner_image) : "";
333
348
  this.err_msg = res.message;
334
349
  if(res.message){
335
350
  this.form_status = "error";
@@ -882,6 +897,14 @@
882
897
  .jfb-forms-dynamic-form {
883
898
  &__body{
884
899
  padding: 32rpx 24rpx;
900
+ .form_banner{
901
+ width: 100%;
902
+ box-sizing: border-box;
903
+ image{
904
+ display: block;
905
+ width: 100%;
906
+ }
907
+ }
885
908
  .form_status{
886
909
  display: flex;
887
910
  flex-direction: column;
@@ -2,6 +2,8 @@
2
2
 
3
3
  module.exports = {
4
4
  getDynamicForm: {
5
+ background_image: "https://sandbox-img.jufubao.cn/uploads/20250722/7ae3b43b654a73f0d9d118d5eb37c51b.png?x-oss-process=style/size3&ver=1766456894",
6
+ banner_image: "https://sandbox-img.jufubao.cn/uploads/20251223/3d20ded5738f4c37547b962c58b4b468.png",
5
7
  form_name: "普益调查",
6
8
  list: [
7
9
  {
@@ -15,13 +15,12 @@
15
15
  </view>
16
16
  </view>
17
17
  <!-- #endif -->
18
- <view class="jfb-forms-question-and-answer__body" :style="{
19
- '--main-color': mainColor,
20
- '--main-color-alpha': mainColorAlpha,
21
- 'min-height': layoutInfo.bodyMinHeight
22
- }">
18
+ <view class="jfb-forms-question-and-answer__body" :style="[formBodyStyleComp]">
23
19
  <view v-if="loaded">
24
20
  <view v-if="form_status === 'content'">
21
+ <view v-if="banner_image" class="form_banner">
22
+ <image mode="widthFix" :src="banner_image"></image>
23
+ </view>
25
24
  <view style="background: #FFFFFF;">
26
25
  <view class="qa_title">{{ formName }}</view>
27
26
  <view class="qa_progress">
@@ -121,6 +120,7 @@
121
120
  ],
122
121
  data() {
123
122
  return {
123
+ closeMask: true,
124
124
  form_id: '',
125
125
  foreign_id: "",
126
126
  loaded: false,
@@ -141,7 +141,8 @@
141
141
 
142
142
  curIndex: '',
143
143
  //todo
144
-
144
+ background_image: "",
145
+ banner_image: "",
145
146
  qaResultPath: "",
146
147
  qaListPath: "",
147
148
  }
@@ -218,6 +219,16 @@
218
219
  return !this.qaResult.right;
219
220
  }
220
221
  return false;
222
+ },
223
+ formBodyStyleComp(){
224
+ return {
225
+ backgroundImage: `url(${this.background_image})`,
226
+ backgroundSize: '100% auto',
227
+ backgroundRepeat: 'no-repeat',
228
+ '--main-color': this.mainColor,
229
+ '--main-color-alpha': this.mainColorAlpha,
230
+ 'min-height': this.layoutInfo.bodyMinHeight
231
+ }
221
232
  }
222
233
  },
223
234
  watch: {
@@ -275,6 +286,8 @@
275
286
  this.loaded = true;
276
287
  this.formList = res.list;
277
288
  this.formName = res.form_name;
289
+ this.background_image = res.background_image ? getServiceUrl(res.background_image) : "";
290
+ this.banner_image = res.banner_image ? getServiceUrl(res.banner_image) : "";
278
291
  this.err_msg = res.message;
279
292
  this.curIndex = 0
280
293
  if(res.message){
@@ -423,6 +436,14 @@
423
436
 
424
437
  .jfb-forms-question-and-answer {
425
438
  &__body{
439
+ .form_banner{
440
+ width: 100%;
441
+ box-sizing: border-box;
442
+ image{
443
+ display: block;
444
+ width: 100%;
445
+ }
446
+ }
426
447
  .qa_title{
427
448
  text-align: center;
428
449
  padding: 40rpx 0;
@@ -2,6 +2,8 @@
2
2
 
3
3
  module.exports = {
4
4
  getDynamicForm: {
5
+ background_image: "https://sandbox-img.jufubao.cn/uploads/20250722/7ae3b43b654a73f0d9d118d5eb37c51b.png?x-oss-process=style/size3&ver=1766456894",
6
+ banner_image: "https://sandbox-img.jufubao.cn/uploads/20251223/3d20ded5738f4c37547b962c58b4b468.png",
5
7
  message: "",
6
8
  form_name: "抽奖11",
7
9
  list: [