jufubao-forms 1.0.0-beta7 → 1.0.0-beta8

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.0-beta7",
3
+ "version": "1.0.0-beta8",
4
4
  "private": false,
5
5
  "description": "聚福宝表单业务插件库",
6
6
  "main": "index.js",
@@ -75,6 +75,18 @@ export default {
75
75
  },
76
76
  inline: false,
77
77
  },
78
+ {
79
+ label: "问答详情跳转路径",
80
+ ele: 'xd-select-pages-path',
81
+ valueKey: 'qaDetailPath',
82
+ groupKey:'advanced',
83
+ placeholder: '请选择问卷详情跳转路径',
84
+ value: data['qaDetailPath'] || null,
85
+ setting: {
86
+ router: XdBus.getParentApi('getPagesTree'),
87
+ },
88
+ inline: false,
89
+ },
78
90
  ].filter(i=>i)
79
91
  },
80
92
  advanced: [],
@@ -21,7 +21,7 @@
21
21
  <view class="activity_item"
22
22
  v-for="(item,i) in list" :key="item.id"
23
23
  :style="listItemBoxStyle"
24
- @click="toDetail(item.form_id)"
24
+ @click="toDetail(item)"
25
25
  >
26
26
  <view class="item_img">
27
27
  <image :src="item.cover" mode="aspectFill"></image>
@@ -68,6 +68,7 @@
68
68
  itemRadius: 0,
69
69
  detailPath: "",
70
70
  bucket: "default",
71
+ qaDetailPath: "",
71
72
  }
72
73
  },
73
74
  computed: {
@@ -118,6 +119,7 @@
118
119
  this.itemRadius = getContainerPropsValue(container, 'content.itemRadius', 0);
119
120
  this.bucket = getContainerPropsValue(container, 'content.bucket', 'default');
120
121
  this.detailPath = getContainerPropsValue(container, 'content.detailPath', {value: ""}).value;
122
+ this.qaDetailPath = getContainerPropsValue(container, 'content.qaDetailPath', {value: ""}).value;
121
123
  },
122
124
  getList(){
123
125
  let data = {
@@ -144,10 +146,17 @@
144
146
  this.hasNext = !!res.next_page_token;
145
147
  })
146
148
  },
147
- toDetail(form_id){
148
- this.$xdUniHelper.navigateTo({
149
+ toDetail(item){
150
+ let form_id = item.form_id;
151
+ if(item.base_type=='form'){
152
+ this.$xdUniHelper.navigateTo({
149
153
  url: this.detailPath + `?form_id=${form_id}`
150
154
  })
155
+ }else{
156
+ this.$xdUniHelper.navigateTo({
157
+ url: this.qaDetailPath + `?form_id=${form_id}`
158
+ })
159
+ }
151
160
  },
152
161
  onJfbScroll(options) {
153
162
  console.log('event.onJfbScroll', options)
@@ -18,6 +18,7 @@
18
18
  <view class="jfb-forms-question-and-answer__body" :style="{
19
19
  '--main-color': mainColor,
20
20
  '--main-color-alpha': mainColorAlpha,
21
+ 'min-height': layoutInfo.bodyMinHeight
21
22
  }">
22
23
  <view v-if="loaded">
23
24
  <view v-if="form_status === 'content'">
@@ -221,8 +222,6 @@
221
222
  this.init(this.container);
222
223
  this.mainColorAlpha = Color(this.mainColor).alpha(0.15).string();
223
224
  this.isPreview = this.$configProject['isPreview'];
224
-
225
- //todo
226
225
  },
227
226
  methods: {
228
227
  onJfbLoad(options) {