fix: 功能优化。

This commit is contained in:
2025-08-17 22:13:03 +08:00
parent b187b4e356
commit fd51b49c71
3 changed files with 12 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
// 应用全局配置 // 应用全局配置
const config = { const config = {
baseUrl: 'http://152.136.151.187:82/prod-api', baseUrl: 'https://qdintc.com//prod-api',
// baseUrl: 'http://localhost:8080', // baseUrl: 'http://localhost:8080',
//cloud后台网关地址 //cloud后台网关地址
// baseUrl: 'http://192.168.10.3:8080', // baseUrl: 'http://192.168.10.3:8080',
@@ -13,15 +13,15 @@ const config = {
// 应用logo // 应用logo
logo: "/static/logo.jpg", logo: "/static/logo.jpg",
// 官方网站 // 官方网站
site_url: "http://www.qdintc.com", site_url: "https://www.qdintc.com",
// 政策协议 // 政策协议
agreements: [{ agreements: [{
title: "隐私政策", title: "隐私政策",
url: "http://qdintc.com/static/protocol.html" url: "https://qdintc.com/static/protocol.html"
}, },
{ {
title: "用户服务协议", title: "用户服务协议",
url: "http://qdintc.com/static/protocol.html" url: "https://qdintc.com/static/protocol.html"
} }
] ]
} }

View File

@@ -14,13 +14,6 @@
<view class="iconfont icon-password icon"></view> <view class="iconfont icon-password icon"></view>
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" /> <input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
</view> </view>
<view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
<view class="iconfont icon-code icon"></view>
<input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
<view class="login-code">
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
</view>
</view>
<view class="flex align-center" style="margin-left: 5px;"> <view class="flex align-center" style="margin-left: 5px;">
<up-checkbox <up-checkbox
:customStyle="{marginBottom: '8px'}" :customStyle="{marginBottom: '8px'}"
@@ -114,8 +107,6 @@ async function handleLogin() {
modal.msgError("请输入您的账号") modal.msgError("请输入您的账号")
} else if (loginForm.value.password === "") { } else if (loginForm.value.password === "") {
modal.msgError("请输入您的密码") modal.msgError("请输入您的密码")
} else if (loginForm.value.code === "" && captchaEnabled.value) {
modal.msgError("请输入验证码")
} else { } else {
modal.loading("登录中,请等待...") modal.loading("登录中,请等待...")
pwdLogin() pwdLogin()

View File

@@ -131,7 +131,7 @@ const data = reactive({
amount: [{type: 'number', required: true, message: '交易金额不能为空', trigger: ['change', 'blur'] }], amount: [{type: 'number', required: true, message: '交易金额不能为空', trigger: ['change', 'blur'] }],
dealTypeName: [{ required: true, message: '交易类型不能为空', trigger:['change', 'blur'] }], dealTypeName: [{ required: true, message: '交易类型不能为空', trigger:['change', 'blur'] }],
dealCategoryName: [{ required: true, message: '交易类别不能为空', trigger: ['change', 'blur'] }], dealCategoryName: [{ required: true, message: '交易类别不能为空', trigger: ['change', 'blur'] }],
childCategoryName: [{ required: true, message: '交易子类别不能为空', trigger: ['change', 'blur'] }], childCategoryName: [{ required: false, message: '交易子类别不能为空', trigger: ['change', 'blur'] }],
createTime: [{ required: true, message: '交易时间不能为空', trigger: ['change', 'blur'] }] createTime: [{ required: true, message: '交易时间不能为空', trigger: ['change', 'blur'] }]
} }
}) })
@@ -205,7 +205,8 @@ getDicts('daily_expenses').then(result => {
form.value.childCategoryName=dictStr(form.value.childCategory, result.data) form.value.childCategoryName=dictStr(form.value.childCategory, result.data)
}) })
} else { } else {
form.value.childCategoryName = form.value.childCategory form.value.childCategoryName = form.value.dealCategory
form.value.childCategory = form.value.dealCategory
childCategoryShow.value = false childCategoryShow.value = false
} }
// 交易类别 // 交易类别
@@ -236,6 +237,7 @@ getDicts('deal_category').then(result => {
}) })
}) })
} }
console.log(form.value)
} }
function dictStr(val, arr) { function dictStr(val, arr) {
let str = '' let str = ''
@@ -359,6 +361,10 @@ getDicts('deal_category').then(result => {
datePickShow.value = false datePickShow.value = false
} }
function submit() { function submit() {
if (!form.value.dealCategory === '1') {
form.value.childCategory = form.value.dealCategory
form.value.childCategoryName = form.value.dealCategory
}
proxy.$refs['uForm'].validate().then(() => { proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) { if (form.value.id != null) {
if(flag.value==null){ if(flag.value==null){