【类 型】:feat 向数据库 录入 日志
【原 因】: 【过 程】: 【影 响】:
This commit is contained in:
parent
d1e4d64ede
commit
b89b1894fd
@ -132,3 +132,14 @@ export async function refund (orderSn, shopId, refundPrice, refundType) {
|
||||
}
|
||||
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
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
<script>
|
||||
import { parseTime } from '@/utils'
|
||||
import { addLog } from '@/utils/api/table'
|
||||
|
||||
export default {
|
||||
name: 'BlogBox',
|
||||
@ -55,7 +56,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
newLog (val) {
|
||||
console.error(`提交日志${val.content}`)
|
||||
addLog(val.content)// 日志写入数据库
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
Loading…
Reference in New Issue
Block a user