Compare commits
2 Commits
8ab720dc2e
...
5754f44e69
Author | SHA1 | Date |
---|---|---|
|
5754f44e69 | |
|
cb732d71b9 |
|
@ -6,6 +6,8 @@ interface requestType {
|
|||
params?: any
|
||||
}
|
||||
const handleCode = async (code: number, msg: string) => {
|
||||
console.log(code);
|
||||
|
||||
switch (code) {
|
||||
case 401:
|
||||
ElMessage.error(msg || '登录失效')
|
||||
|
@ -26,14 +28,15 @@ const service = axios.create({
|
|||
baseURL: "https://sh-ocr-api.bskies.cc/",
|
||||
// baseURL: "/api",
|
||||
timeout: 30000,
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
"authorization": localStorage.getItem("token"),
|
||||
}
|
||||
|
||||
});
|
||||
// 添加请求拦截器
|
||||
service.interceptors.request.use(
|
||||
(config: any) => {
|
||||
config.headers = {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
"authorization": localStorage.getItem("token"),
|
||||
}
|
||||
console.log(config, 'config')
|
||||
return config;
|
||||
},
|
||||
|
|
|
@ -13,7 +13,11 @@
|
|||
</el-form>
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column prop="name" label="名称" width="180" />
|
||||
<el-table-column prop="price" label="价格" width="180" />
|
||||
<el-table-column prop="price" label="价格" width="180">
|
||||
<template #default="scope">
|
||||
<div>{{ scope.row.price/100 }}元</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="api_usage_limit" label="次数" />
|
||||
<el-table-column prop="created_at" label="开通时间" />
|
||||
<el-table-column prop="description" label="备注" />
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<el-table-column prop="product_name" label="产品名" width="180" />
|
||||
<el-table-column prop="total_amount" label="价格" width="100">
|
||||
<template #default="scope">
|
||||
<div>{{ scope.row.total_amount }}元</div>
|
||||
<div>{{ scope.row.total_amount / 100 }}元</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间" />
|
||||
|
@ -92,7 +92,7 @@ const getList = async () => {
|
|||
page: 1,
|
||||
size: 20,
|
||||
}
|
||||
if (status.value&&status.value!='0') {
|
||||
if (status.value && status.value != '0') {
|
||||
params.payment_status = status.value
|
||||
}
|
||||
const { code, body: { records, total } } = await orderList(params)
|
||||
|
|
Loading…
Reference in New Issue