临时代码

main
roger_mac 11 months ago
parent f83d358c36
commit b58dd22a6e
  1. 8
      src/apis/mock.js
  2. 29
      src/views/mock/index.vue

@ -13,15 +13,11 @@ export const get_overtime_show_info = (params) => {
}
export const get_response_json = (params) => {
const req_params = {
ip: params['ip'],
api: params['api']
}
console.log(req_params)
console.log(params)
return request({
url: 'api/get_response_json',
method: 'get',
params: req_params
params: params
})
}

@ -145,10 +145,12 @@ const auditStatusInfo = ref({})
// 退
const handleOvertimeShowTypeChange = () => {
console.log(selectedOvertimeShowType.value)
if (selectedOvertimeShowType.value === 'sell') {
showInfo.value = sellShowInfo.value
} else {
showInfo.value = refundShowInfo.value
console.log(refundShowInfo.value)
}
selectedShowInfo.value = ''
selectedStatus.value = ''
@ -170,6 +172,7 @@ const handleOvertimeConfigSave = () => {
}).catch(err => {
console.log(err)
})
getOvertimeResponseJson()
}
}
@ -178,7 +181,7 @@ async function getOvertimeShowInfo() {
await get_overtime_show_info({ip: select_ip.value}).then(
res => {
sellShowInfo.value = [...res['sell']]
refundShowInfo.value = [...res['sell']]
refundShowInfo.value = [...res['refund']]
auditStatusInfo.value = [...res['status']]
}
).catch(
@ -243,15 +246,6 @@ function getResponseJson() {
console.log(err)
})
}
if (api === 'get_overtime_ticket_status') {
req.sessionCode = '11'
req.overtimeType = '22'
get_response_json(req).then(res => {
allJsonData.value.get_overtime_ticket_status = res
}).catch(err => {
console.log(err)
})
}
if (api === 'valid_error') {
get_response_json(req).then(res => {
allJsonData.value.valid_error = res
@ -263,6 +257,21 @@ function getResponseJson() {
)
}
// json
const getOvertimeResponseJson = () => {
const req = {
ip: select_ip.value,
api: 'get_overtime_ticket_status',
sessionCode: selectedShowInfo.value,
overtimeType: selectedOvertimeShowType.value === 'sell' ? '1' : '2'
}
get_response_json(req).then(res => {
allJsonData.value.get_overtime_ticket_status = res
}).catch(err => {
console.log(err)
})
}
const checkedItemsOrdered = computed(() => {
let temp = []
mockConfigItems.forEach(

Loading…
Cancel
Save