update:修复问题
This commit is contained in:
@@ -11,7 +11,6 @@ module.exports = {
|
|||||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
"no-unused-vars": "warn",
|
"no-unused-vars": "warn",
|
||||||
"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }],
|
"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]
|
||||||
"vue/script-setup-uses-vars": 1
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
19070
package-lock.json
generated
19070
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@
|
|||||||
"@ant-design-vue/use": "*",
|
"@ant-design-vue/use": "*",
|
||||||
"ant-design-vue": "^2.1.2",
|
"ant-design-vue": "^2.1.2",
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
|
"chokidar": "^3.5.2",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
"vue": "^3.0.11",
|
"vue": "^3.0.11",
|
||||||
"vue-router": "^4.0.6"
|
"vue-router": "^4.0.6"
|
||||||
|
|||||||
@@ -29,22 +29,24 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</template>
|
</template>
|
||||||
<style></style>
|
<style></style>
|
||||||
<script setup>
|
<script>
|
||||||
import Upload from "@/components/Upload";
|
import Upload from "@/components/Upload";
|
||||||
import regex from "@/services/regex";
|
import regex from "@/services/regex";
|
||||||
import { post } from "@/services/http";
|
import { post } from "@/services/http";
|
||||||
import { ref, toRaw } from "@vue/reactivity";
|
import { ref, toRaw } from "@vue/reactivity";
|
||||||
import { message, Form } from "ant-design-vue";
|
import { message, Form } from "ant-design-vue";
|
||||||
const useForm = Form.useForm;
|
export default {
|
||||||
|
setup() {
|
||||||
|
const useForm = Form.useForm;
|
||||||
|
|
||||||
let formModel = ref({
|
let formModel = ref({
|
||||||
name: "",
|
name: "",
|
||||||
idCard: "",
|
idCard: "",
|
||||||
phone: "",
|
phone: "",
|
||||||
expireTime: "",
|
expireTime: "",
|
||||||
fileId: 0
|
fileId: 0
|
||||||
});
|
});
|
||||||
let rules = ref({
|
let rules = ref({
|
||||||
name: [
|
name: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -86,16 +88,22 @@ let rules = ref({
|
|||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
const { resetFields, validate, validateInfos } = useForm(formModel, rules);
|
const { resetFields, validate, validateInfos } = useForm(formModel, rules);
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
await validate();
|
await validate();
|
||||||
console.log(toRaw(formModel));
|
console.log(toRaw(formModel));
|
||||||
var res = await post("/api2/ca/CensorSmsCodeApplyUpload", formModel.value);
|
var res = await post(
|
||||||
|
"/api2/ca/CensorSmsCodeApplyUpload",
|
||||||
|
formModel.value
|
||||||
|
);
|
||||||
if (res.errorCode != 0) {
|
if (res.errorCode != 0) {
|
||||||
message.error(res.errorMsg);
|
message.error(res.errorMsg);
|
||||||
} else {
|
} else {
|
||||||
message.success("操作成功");
|
message.success("操作成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return { onSubmit, validate, validateInfos, rules, formModel };
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user