fix: 修复前端sex字段类型转换问题,确保前后端数据类型一致
This commit is contained in:
1 parent
043780d5ab
commit
35ad04eca3
1 file changed
+5
-1
@@ -248,10 +248,14 @@ export default {
|
||||
},
|
||||
async saveRecord() {
|
||||
try {
|
||||
let sexNum = 1
|
||||
if (this.result.sex === '女' || this.result.sex === 0 || this.result.sex === '0') {
|
||||
sexNum = 0
|
||||
}
|
||||
await api.recordApi.save({
|
||||
type: 'bazi',
|
||||
name: this.result.name || '某人',
|
||||
sex: this.result.sex,
|
||||
sex: sexNum,
|
||||
inputDate: this.result.solar,
|
||||
inputData: JSON.stringify({
|
||||
date: this.result.solar,
|
||||
|
||||
Reference in new issue
Block a user