jufubao-forms 1.0.9-beta3 → 1.0.9-beta5

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-beta3",
3
+ "version": "1.0.9-beta5",
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",
@@ -132,6 +132,7 @@
132
132
  //todo
133
133
 
134
134
  returnHomePath: "",
135
+ returnDetailPath: "",
135
136
  }
136
137
  },
137
138
  computed: {
@@ -201,6 +202,9 @@
201
202
  this.activity_page_url = res.activity_page_url;
202
203
  this.activity_id = res.activity_id;
203
204
  this.foreign_id = res.foreign_id;
205
+ if (res.previous_page) {
206
+ this.returnDetailPath = Base64.decode(res.previous_page);
207
+ }
204
208
  })
205
209
 
206
210
  },
@@ -222,10 +226,16 @@
222
226
  })
223
227
  }
224
228
  },
225
- toHomePage(){
226
- this.$xdUniHelper.navigateTo({
227
- url: this.returnHomePath
228
- })
229
+ toHomePage() {
230
+ if (this.returnDetailPath) {
231
+ this.$xdUniHelper.navigateTo({
232
+ url: this.returnDetailPath
233
+ })
234
+ } else {
235
+ this.$xdUniHelper.navigateTo({
236
+ url: this.returnHomePath
237
+ })
238
+ }
229
239
  },
230
240
  //判断两个包含数组是否相同
231
241
  isSameArray(arr1, arr2){
@@ -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 {
@@ -516,13 +519,14 @@
516
519
  position: relative;
517
520
  .checkbox_btn{
518
521
  position: absolute;
519
- bottom: -40rpx;
522
+ bottom: -80rpx;
520
523
  border: 1px solid var(--g-theme-main-color);
521
524
  color: var(--g-theme-main-color);
522
525
  border-radius: 80rpx;
523
526
  padding: 8rpx 32rpx;
524
527
  font-size: 28rpx;
525
528
  right: 40rpx;
529
+ z-index: 999;
526
530
  }
527
531
  .qa_type{
528
532
  color: var(--main-color);