| 12345678910111213141516171819202122232425262728293031323334353637 |
- import Apis from '@/common/apis/index'
- export default {
- inputMobile(event) {
- this.form.name = event.detail.value
- },
- inputIdCard(event) {
- this.form.id_card = event.detail.value
- },
- async onSubmit() {
- for (let key in this.form) {
- if (!this.form[key]) {
- let keyname = {
- name: '姓名',
- id_card: '身份证号'
- } [key]
- uni.showToast({
- title: `请输入${keyname}`,
- duration: 2000,
- icon: 'error'
- });
- return
- }
- }
- try {
- let query = {
- ...this.form
- }
- await Apis.PostAssociation(this.form)
- uni.navigateBack({
- delta: 1
- })
- } catch (e) {
- //TODO handle the exception
- }
- }
- }
|