【类 型】:feat 向数据库 录入 日志

【原  因】:
【过  程】:
【影  响】:
This commit is contained in:
tk 2024-10-12 16:48:40 +08:00
parent d1e4d64ede
commit b89b1894fd
2 changed files with 13 additions and 1 deletions

View File

@ -132,3 +132,14 @@ export async function refund (orderSn, shopId, refundPrice, refundType) {
} }
return res return res
} }
/**
* @abstract 录入日志
* @param {*} log 日志内容
*/
export async function addLog (log) {
// 构建请求参数
const params = new URLSearchParams()
params.append('log', log)
const res = await api.post('addLog', params)
return res
}

View File

@ -29,6 +29,7 @@
<script> <script>
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { addLog } from '@/utils/api/table'
export default { export default {
name: 'BlogBox', name: 'BlogBox',
@ -55,7 +56,7 @@ export default {
}, },
watch: { watch: {
newLog (val) { newLog (val) {
console.error(`提交日志${val.content}`) addLog(val.content)//
} }
}, },
created () { created () {