From c85c819008e5c11aa9352b69cb80c9eff15a7a27 Mon Sep 17 00:00:00 2001 From: H1d3rOne Date: Sun, 8 Mar 2026 00:53:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E4=BF=9D=E5=AD=98=E8=AE=B0=E5=BD=95=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 后端BaZiController已经保存记录,前端不需要再保存 - 删除result.vue中的saveRecord方法和调用 - 解决记录重复保存的问题 --- xuan-deduct-uniapp/src/pages/bazi/result.vue | 23 -------------------- 1 file changed, 23 deletions(-) diff --git a/xuan-deduct-uniapp/src/pages/bazi/result.vue b/xuan-deduct-uniapp/src/pages/bazi/result.vue index 35f2b64..4ea3a76 100644 --- a/xuan-deduct-uniapp/src/pages/bazi/result.vue +++ b/xuan-deduct-uniapp/src/pages/bazi/result.vue @@ -213,7 +213,6 @@ export default { const app = getApp() if (app.globalData && app.globalData.baziResult) { this.result = app.globalData.baziResult - this.saveRecord() } else { uni.showToast({ title: '未获取到排盘数据', @@ -245,28 +244,6 @@ export default { return this.result.baZiKongWang[index] } return '-' - }, - 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: sexNum, - inputDate: this.result.solar, - inputData: JSON.stringify({ - date: this.result.solar, - sex: this.result.sex - }), - resultData: JSON.stringify(this.result), - aiAnalysis: this.result.aiAnalysis - }) - } catch (e) { - console.log('保存记录失败:', e) - } } } }