diff --git a/pages/form-input/components/form-input/form-input.vue b/pages/form-input/components/form-input/form-input.vue
index 840f0ea3..8adb1409 100644
--- a/pages/form-input/components/form-input/form-input.vue
+++ b/pages/form-input/components/form-input/form-input.vue
@@ -44,7 +44,7 @@
{{ overall_config.save_draft_title }}
-
+
@@ -82,6 +82,14 @@ export default {
type: Boolean,
default: false,
},
+ propSuccessJumpUrl: {
+ type: String,
+ default: '',
+ },
+ propIsDebug: {
+ type: Boolean,
+ default: false,
+ },
},
data() {
return {
@@ -161,22 +169,43 @@ export default {
forminput_id: this.propDataFormId,
...submit_data
}
- this.is_submit_disable = true;
+ this.setData({
+ is_submit_disable: true
+ });
uni.request({
url: app.globalData.get_request_url('save', 'forminputdata'),
method: 'POST',
data: params,
dataType: 'json',
success: (res) => {
- this.is_submit_disable = false;
+ this.setData({
+ is_submit_disable: false
+ });
if (res.data.code == 0) {
app.globalData.showToast('提交成功', 'success');
+ if(!this.propIsDebug) {
+ var pages = app.globalData.prev_page();
+ if (pages) {
+ setTimeout(function () {
+ uni.navigateBack();
+ }, 1000);
+ } else {
+ if((this.propSuccessJumpUrl || null) != null) {
+ var url = this.propSuccessJumpUrl;
+ setTimeout(function () {
+ app.globalData.url_open(url);
+ }, 1000);
+ }
+ }
+ }
} else {
app.globalData.showToast('提交失败');
}
},
fail: (res) => {
- this.is_submit_disable = false;
+ this.setData({
+ is_submit_disable: false
+ });
app.globalData.showToast('提交失败');
}
});
diff --git a/pages/form-input/form-input.vue b/pages/form-input/form-input.vue
index af353a97..b9eb017e 100644
--- a/pages/form-input/form-input.vue
+++ b/pages/form-input/form-input.vue
@@ -2,7 +2,7 @@
-
+