|
@@ -66,7 +66,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { Form, Field, Button, Radio, RadioGroup } from 'vant';
|
|
|
+import { Form, Field, Button, Radio, RadioGroup, Toast } from 'vant';
|
|
|
import $axios from "@/service/httpServer";
|
|
|
|
|
|
export default {
|
|
@@ -129,14 +129,16 @@ import $axios from "@/service/httpServer";
|
|
|
methods: {
|
|
|
onSubmit (values) {
|
|
|
console.log(values)
|
|
|
- this.$toast.loading({
|
|
|
+ Toast.loading({
|
|
|
duration: 0,
|
|
|
forbidClick: true
|
|
|
});
|
|
|
const params = Object.assign({
|
|
|
- source: this.form.source_desc === '其他' ? this.form.source_desc_temp : this.form.source_desc,
|
|
|
+ source: this.sourceFormConfig.source,
|
|
|
origin: location.href
|
|
|
- }, this.form)
|
|
|
+ }, this.form, {
|
|
|
+ source_desc: this.form.source_desc === '其他' ? this.form.source_desc_temp : this.form.source_desc
|
|
|
+ })
|
|
|
|
|
|
console.log('source-params', params)
|
|
|
$axios.post(this.api, JSON.stringify(params), {
|
|
@@ -145,11 +147,11 @@ import $axios from "@/service/httpServer";
|
|
|
}
|
|
|
}).then(res => {
|
|
|
console.log('res', res)
|
|
|
- this.$toast.clear()
|
|
|
- this.$toast('提交成功,我们会尽快联系您~')
|
|
|
+ Toast.clear()
|
|
|
+ Toast('提交成功,我们会尽快联系您~')
|
|
|
}).catch(() => {
|
|
|
- this.$toast.clear()
|
|
|
- this.$toast('太火爆了,请稍后重试')
|
|
|
+ Toast.clear()
|
|
|
+ Toast('太火爆了,请稍后重试')
|
|
|
})
|
|
|
}
|
|
|
}
|