Skip to content

Commit ebcbe63

Browse files
author
puhui999
committed
订单列表:列表重构 ④ 移除测试数据
1 parent 71f9337 commit ebcbe63

File tree

4 files changed

+3
-194
lines changed

4 files changed

+3
-194
lines changed

src/views/Login/components/LoginForm.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ import { ElLoading } from 'element-plus'
148148
import LoginFormTitle from './LoginFormTitle.vue'
149149
import type { RouteLocationNormalizedLoaded } from 'vue-router'
150150
151-
// import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
152-
// const { wsCache } = useCache()
153151
import { useIcon } from '@/hooks/web/useIcon'
154152
155153
import * as authUtil from '@/utils/auth'
@@ -246,7 +244,6 @@ const handleLogin = async (params) => {
246244
if (!res) {
247245
return
248246
}
249-
// wsCache.delete(CACHE_KEY.USER) // 清除上次登录用户信息
250247
ElLoading.service({
251248
lock: true,
252249
text: '正在加载系统中...',

src/views/mall/trade/order/detail/index.vue

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@
4646
</el-descriptions-item>
4747
<el-descriptions-item label-class-name="no-colon">
4848
<el-button size="small" type="primary">调整价格</el-button>
49-
<!-- TODO 芋艿:待实现 -->
5049
<el-button size="small" type="primary" @click="openForm('remark')">备注</el-button>
51-
<!-- TODO 芋艿:待实现 -->
5250
<el-button size="small" type="primary" @click="openForm('delivery')">发货</el-button>
5351
<!-- TODO 芋艿:待实现 -->
5452
<el-button size="small" type="primary">修改地址</el-button>
@@ -354,11 +352,6 @@ const getDetail = async () => {
354352
const id = params.orderId as unknown as number
355353
if (id) {
356354
const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO
357-
// TODO 测试使用
358-
res.user = {
359-
id: 247,
360-
nickname: '小妮子'
361-
}
362355
orderInfo.value = res
363356
}
364357
}

src/views/mall/trade/order/index.vue

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,6 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
268268
import { formatToFraction } from '@/utils'
269269
import { createImageViewer } from '@/components/ImageViewer'
270270
271-
// const message = useMessage() // 消息弹窗
272-
// const { t } = useI18n() // 国际化
273271
const { currentRoute, push } = useRouter() // 路由跳转
274272
275273
const loading = ref(true) // 列表的加载中
@@ -362,16 +360,7 @@ const getList = async () => {
362360
loading.value = true
363361
try {
364362
const data = await TradeOrderApi.getOrderPage(queryParams)
365-
const list_ = data.list as OrderVO[]
366-
// TODO 测试使用
367-
list_.forEach((item) => {
368-
item.user = {
369-
id: 247,
370-
nickname: '小妮子'
371-
}
372-
})
373-
374-
list.value = list_
363+
list.value = data.list
375364
total.value = data.total
376365
} finally {
377366
loading.value = false
@@ -399,8 +388,7 @@ watch(
399388
)
400389
401390
/** 初始化 **/
402-
onMounted(() => {
403-
// list.value = testData
404-
getList()
391+
onMounted(async () => {
392+
await getList()
405393
})
406394
</script>

src/views/mall/trade/order/testData.ts

Lines changed: 0 additions & 169 deletions
This file was deleted.

0 commit comments

Comments
 (0)