Commit fe215cc7 by 胡悦

优化代码,处理打包问题

1 parent 1e5ce854
......@@ -2,9 +2,10 @@
"name": "vite-ts-project",
"private": true,
"version": "0.0.0",
"license": "ISC",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
......
......@@ -17,7 +17,7 @@ const isTel = (telNumber: string) => {
return result
}
// 中文校验
const isChinese = (text) => {
const isChinese = (text: string) => {
let result = false
const reg = /^[\u4e00-\u9fa5]{1,20}$/
result = reg.test(text)
......
const fetchConfig = function (isEnv = true) {
return window.fetch('http://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/integral-config', {}).then(res => res.json())
}
const $mockConfig = await fetchConfig()
const $mockConfig = fetchConfig()
export default $mockConfig
\ No newline at end of file
......@@ -29,13 +29,18 @@ const userData = reactive({
formSize: 'large',
userInfo: {
id: '',
name: '李敏',
mobile: '15018517717',
plateNo: '湘MM4500',
bankName: '招商银行',
bankNo: '2342211324325',
name: '',
mobile: '',
plateNo: '',
bankName: '',
bankNo: '',
// name: '李敏',
// mobile: '15018517717',
// plateNo: '湘MM4500',
// bankName: '招商银行',
// bankNo: '2342211324325',
cardName: '',
authStatus: 1
authStatus: 0
},
})
const router = useRouter()
......@@ -48,7 +53,7 @@ const getUserInfo = async() => {
// 修改个人信息
const update = async(values: object) => {
console.log(values, userData.userInfo)
const params = {...values}
const params: {cardName?: string, id?: string,authStatus?: number} = {...values}
const {id, name, authStatus} = userData.userInfo
params.cardName = name
params.id = id
......
......@@ -67,9 +67,12 @@ import { isVehicleNumber, isTel } from "../../utils/common";
const router = useRouter();
const userStore = useUserStore();
const userForm = reactive({
plateNo: "湘MM4500",
mobile: "18925261040",
captcha: "7177",
plateNo: '',
mobile: '',
captcha: ''
// plateNo: "湘MM4500",
// mobile: "18925261040",
// captcha: "7177",
});
let timeout: number | undefined = undefined;
const time = ref();
......
......@@ -53,12 +53,18 @@ const router = useRouter()
const registerData = reactive({
formSize: 'large',
register: {
name: '李敏',
mobile: '15018517717',
captcha: '1308',
plateNo: '湘MM4500',
bankName: '招商银行',
bankNo: '2342211324325',
name: '',
mobile: '',
captcha: '',
plateNo: '',
bankName: '',
bankNo: '',
// name: '李敏',
// mobile: '15018517717',
// captcha: '1308',
// plateNo: '湘MM4500',
// bankName: '招商银行',
// bankNo: '2342211324325',
cardName: ''
},
tips: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!