优化路由权限
continuous-integration/drone/push Build is passing Details

pull/1/head
franktrue 3 years ago
parent 166ff74f5a
commit 2dd9a0546e

@ -9,6 +9,15 @@ export function listUsageRecord(query) {
})
}
// 查询当前用户使用记录列表
export function currentUserListUsageRecord(query) {
return request({
url: '/cert/usageRecord/currentUser/list',
method: 'get',
params: query
})
}
// 查询使用记录详细
export function getUsageRecord(id) {
return request({

@ -9,6 +9,15 @@ export function listOrder(query) {
})
}
// 查询当前订单列表
export function currentUserListOrder(query) {
return request({
url: '/order/order/currentUser/list',
method: 'get',
params: query
})
}
// 查询订单详细
export function getOrder(id) {
return request({

@ -70,7 +70,7 @@
<script setup name="money">
import { payment, refreshStatus } from "@/api/order/payment";
import { listOrder } from "@/api/order/order";
import { currentUserListOrder } from "@/api/order/order";
import { getUserProfile } from "@/api/system/user";
const { proxy } = getCurrentInstance();
@ -98,12 +98,6 @@ const data = reactive({
},
})
const { queryParams, form } = toRefs(data);
function getUser() {
getUserProfile().then(response => {
queryParams.value.userId = response.data.userId
getList()
});
};
//
function handlePayment() {
@ -138,14 +132,14 @@ function cancel() {
function getList() {
loading.value = true;
queryParams.value.params = {};
listOrder(queryParams.value).then(response => {
currentUserListOrder(queryParams.value).then(response => {
orderList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
getUser()
getList()
</script>
<style scoped lang="scss">

@ -50,7 +50,7 @@
</template>
<script setup name="usage">
import { listUsageRecord } from "@/api/cert/usageRecord";
import { currentUserListUsageRecord } from "@/api/cert/usageRecord";
import { getUserProfile } from "@/api/system/user";
const { proxy } = getCurrentInstance();
@ -72,17 +72,10 @@ const data = reactive({
const { queryParams } = toRefs(data);
function getUser() {
getUserProfile().then(response => {
queryParams.value.userId = response.data.userId
getList()
});
};
/** 查询使用记录列表 */
function getList() {
loading.value = true;
listUsageRecord(queryParams.value).then(response => {
currentUserListUsageRecord(queryParams.value).then(response => {
usageRecordList.value = response.rows;
total.value = response.total;
loading.value = false;
@ -100,7 +93,7 @@ function resetQuery() {
handleQuery();
}
getUser()
getList()
</script>
<style scoped lang="scss">

Loading…
Cancel
Save