调整启动命令,恢复 npm run dev;如果要连接远程服务

pull/366/MERGE
YunaiV 2024-01-18 12:47:23 +08:00
parent 9fa769b16a
commit 2dcd131097
5 changed files with 8 additions and 20 deletions

View File

@ -6,11 +6,11 @@
"private": false,
"scripts": {
"i": "pnpm install",
"local-dev": "vite --mode local-dev",
"dev": "vite --mode dev",
"dev": "vite --mode local-dev",
"dev-server": "vite --mode dev",
"ts:check": "vue-tsc --noEmit",
"build:local-dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode local-dev",
"build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode dev",
"build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode local-dev",
"build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test",
"build:stage": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode stage",
"build:prod": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode prod",

View File

@ -18,15 +18,10 @@ export interface CombinationRecordVO {
}
// 查询拼团记录列表
export const getCombinationRecordPage = async (params) => {
export const getCombinationRecordPage = async (params: any) => {
return await request.get({ url: '/promotion/combination-record/page', params })
}
// 查询一个拼团的完整拼团记录
export const getCombinationRecordPageByHeadId = async (params) => {
return await request.get({ url: '/promotion/combination-record/page-by-headId', params })
}
// 获得拼团记录的概要信息
export const getCombinationRecordSummary = async () => {
return await request.get({ url: '/promotion/combination-record/get-summary' })

View File

@ -53,13 +53,10 @@
import { dateFormatter } from '@/utils/formatTime'
import * as CombinationRecordApi from '@/api/mall/promotion/combination/combinationRecord'
import { DICT_TYPE } from '@/utils/dict'
import { createImageViewer } from '@/components/ImageViewer'
/** 助力列表 */
defineOptions({ name: 'CombinationRecordListDialog' })
const message = useMessage() //
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
@ -82,17 +79,11 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
const getList = async () => {
loading.value = true
try {
const data = await CombinationRecordApi.getCombinationRecordPageByHeadId(queryParams)
const data = await CombinationRecordApi.getCombinationRecordPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 商品图预览 */
const imagePreview = (imgUrl: string) => {
createImageViewer({
urlList: [imgUrl]
})
}
</script>

View File

@ -242,9 +242,11 @@ const getSummary = async () => {
recordSummary.value = await CombinationRecordApi.getCombinationRecordSummary()
}
/** 查看拼团详情 */
const openRecordListDialog = (row: CombinationRecordApi.CombinationRecordVO) => {
combinationRecordListRef.value?.open(row.headId)
combinationRecordListRef.value?.open(row.headId || row.id) // headId
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNo = 1