Skip to content

Commit 2dcd131

Browse files
committed
✨ 调整启动命令,恢复 npm run dev;如果要连接远程服务
1 parent 9fa769b commit 2dcd131

File tree

5 files changed

+8
-20
lines changed

5 files changed

+8
-20
lines changed
File renamed without changes.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"private": false,
77
"scripts": {
88
"i": "pnpm install",
9-
"local-dev": "vite --mode local-dev",
10-
"dev": "vite --mode dev",
9+
"dev": "vite --mode local-dev",
10+
"dev-server": "vite --mode dev",
1111
"ts:check": "vue-tsc --noEmit",
1212
"build:local-dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode local-dev",
13-
"build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode dev",
13+
"build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode local-dev",
1414
"build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test",
1515
"build:stage": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode stage",
1616
"build:prod": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode prod",

src/api/mall/promotion/combination/combinationRecord.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,10 @@ export interface CombinationRecordVO {
1818
}
1919

2020
// 查询拼团记录列表
21-
export const getCombinationRecordPage = async (params) => {
21+
export const getCombinationRecordPage = async (params: any) => {
2222
return await request.get({ url: '/promotion/combination-record/page', params })
2323
}
2424

25-
// 查询一个拼团的完整拼团记录
26-
export const getCombinationRecordPageByHeadId = async (params) => {
27-
return await request.get({ url: '/promotion/combination-record/page-by-headId', params })
28-
}
29-
3025
// 获得拼团记录的概要信息
3126
export const getCombinationRecordSummary = async () => {
3227
return await request.get({ url: '/promotion/combination-record/get-summary' })

src/views/mall/promotion/combination/record/CombinationRecordListDialog.vue

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,10 @@
5353
import { dateFormatter } from '@/utils/formatTime'
5454
import * as CombinationRecordApi from '@/api/mall/promotion/combination/combinationRecord'
5555
import { DICT_TYPE } from '@/utils/dict'
56-
import { createImageViewer } from '@/components/ImageViewer'
5756
5857
/** 助力列表 */
5958
defineOptions({ name: 'CombinationRecordListDialog' })
6059
61-
const message = useMessage() // 消息弹窗
62-
6360
const loading = ref(true) // 列表的加载中
6461
const total = ref(0) // 列表的总页数
6562
const list = ref([]) // 列表的数据
@@ -82,17 +79,11 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
8279
const getList = async () => {
8380
loading.value = true
8481
try {
85-
const data = await CombinationRecordApi.getCombinationRecordPageByHeadId(queryParams)
82+
const data = await CombinationRecordApi.getCombinationRecordPage(queryParams)
8683
list.value = data.list
8784
total.value = data.total
8885
} finally {
8986
loading.value = false
9087
}
9188
}
92-
/** 商品图预览 */
93-
const imagePreview = (imgUrl: string) => {
94-
createImageViewer({
95-
urlList: [imgUrl]
96-
})
97-
}
9889
</script>

src/views/mall/promotion/combination/record/index.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,11 @@ const getSummary = async () => {
242242
recordSummary.value = await CombinationRecordApi.getCombinationRecordSummary()
243243
}
244244
245+
/** 查看拼团详情 */
245246
const openRecordListDialog = (row: CombinationRecordApi.CombinationRecordVO) => {
246-
combinationRecordListRef.value?.open(row.headId)
247+
combinationRecordListRef.value?.open(row.headId || row.id) // 多表达式的原因,团长的 headId 为空,就是自身的情况
247248
}
249+
248250
/** 搜索按钮操作 */
249251
const handleQuery = () => {
250252
queryParams.value.pageNo = 1

0 commit comments

Comments
 (0)