update:修复问题
This commit is contained in:
@@ -11,7 +11,6 @@ module.exports = {
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-unused-vars": "warn",
|
||||
"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }],
|
||||
"vue/script-setup-uses-vars": 1
|
||||
"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]
|
||||
}
|
||||
};
|
||||
|
||||
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": "^2.1.2",
|
||||
"axios": "^0.21.1",
|
||||
"chokidar": "^3.5.2",
|
||||
"core-js": "^3.6.5",
|
||||
"vue": "^3.0.11",
|
||||
"vue-router": "^4.0.6"
|
||||
|
||||
@@ -29,22 +29,24 @@
|
||||
</a-form>
|
||||
</template>
|
||||
<style></style>
|
||||
<script setup>
|
||||
<script>
|
||||
import Upload from "@/components/Upload";
|
||||
import regex from "@/services/regex";
|
||||
import { post } from "@/services/http";
|
||||
import { ref, toRaw } from "@vue/reactivity";
|
||||
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: "",
|
||||
idCard: "",
|
||||
phone: "",
|
||||
expireTime: "",
|
||||
fileId: 0
|
||||
});
|
||||
let rules = ref({
|
||||
});
|
||||
let rules = ref({
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
@@ -86,16 +88,22 @@ let rules = ref({
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formModel, rules);
|
||||
async function onSubmit() {
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formModel, rules);
|
||||
async function onSubmit() {
|
||||
await validate();
|
||||
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) {
|
||||
message.error(res.errorMsg);
|
||||
} else {
|
||||
message.success("操作成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
return { onSubmit, validate, validateInfos, rules, formModel };
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user