【类 型】:feat 向数据库 录入 日志
【原 因】: 【过 程】: 【影 响】:
This commit is contained in:
parent
d1e4d64ede
commit
b89b1894fd
@ -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
|
||||||
|
}
|
||||||
|
@ -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 () {
|
||||||
|
Loading…
Reference in New Issue
Block a user