diff --git a/pages_tool/form/formdata.vue b/pages_tool/form/formdata.vue index 2cc2d6d..abd2f62 100644 --- a/pages_tool/form/formdata.vue +++ b/pages_tool/form/formdata.vue @@ -2,22 +2,18 @@ - - - - + + - + @@ -81,7 +77,7 @@ export default { } }, onLoad(options) { - console.log("=====表单页面====",options) + console.log("=====表单页面====", options) if (!options.uniacid) { uni.showModal({ title: this.$lang('form.formdata.tip'), @@ -139,7 +135,7 @@ export default { this.getData() }, - + watch: { storeToken(newVal, oldVal) { newVal && this.getData() @@ -184,22 +180,18 @@ export default { // 因此内部所有 this.xxx 都指向 formdata 实例,不会漂移到子组件。 create(formData) { // 防重复提交:console 在拦截之前,避免日志噪声;拦截后立即置位 - if (this.isRepeat) return + if (this.isRepeat) return; - const data = { - form_id: this.id, - form_data: typeof formData === 'string' ? formData : JSON.stringify(formData), - uniacid: this.uniacid, - url_params: JSON.stringify(this.urlParams), - member_id: this.memberInfo ? this.memberInfo.id : 0 - } - console.log(`=====表单提交====`, data); - - - this.isRepeat = true + this.isRepeat = true; this.$api.sendRequest({ url: '/form/api/form/create', - data, + data: { + form_id: this.id, + form_data: typeof formData === 'string' ? formData : JSON.stringify(formData), + uniacid: this.uniacid, + url_params: JSON.stringify(this.urlParams), + member_id: this.memberInfo ? this.memberInfo.id : 0 + }, success: res => { if (res.code == 0) { this.complete = true