From c233ad8f5ad0db8dc50ce5c8e92c715810b6d8db Mon Sep 17 00:00:00 2001 From: Huakk <1751826683@qq.com> Date: Fri, 21 Jun 2024 19:51:02 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat(custom):=20=E6=96=B0=E5=A2=9E=E8=90=A5?= =?UTF-8?q?=E9=94=80-\>=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +- src/views/marketing/api.js | 3 + src/views/marketing/code/index.vue | 469 +++++++++++++++++++++++++ src/views/order/pending_list/index.vue | 40 ++- 4 files changed, 505 insertions(+), 10 deletions(-) create mode 100644 src/views/marketing/code/index.vue diff --git a/package.json b/package.json index 4cd005f..c029c2d 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,6 @@ "vite-plugin-html": "^3.2.0", "vite-plugin-mock": "^2.9.8", "vite-plugin-svg-icons": "^2.0.1" - } + }, + "packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0" } diff --git a/src/views/marketing/api.js b/src/views/marketing/api.js index 457c038..e3917ac 100644 --- a/src/views/marketing/api.js +++ b/src/views/marketing/api.js @@ -3,4 +3,7 @@ import { request } from '@/utils' export default { getSignConfig: () => request.post('/gift/setting'), setSignConfig: (data) => request.post('/gift/setting/edit', data), + getCodelist: (data) => request.post('/qrcode/list', data), + addCode: (data) => request.post('/qrcode/add', data), + updateCode: (data) => request.post('/qrcode/edit', data), } diff --git a/src/views/marketing/code/index.vue b/src/views/marketing/code/index.vue new file mode 100644 index 0000000..92f1b0b --- /dev/null +++ b/src/views/marketing/code/index.vue @@ -0,0 +1,469 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 激活状态: + + + + + + + + 领取状态: + + + + + + + + 关键字搜索: + + + + + + + + + 时间搜索: + + + + + + + 新增二维码 + + + 修改二维码 + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + + + + 提交 + + 取消 + + + + + + + + + + + diff --git a/src/views/order/pending_list/index.vue b/src/views/order/pending_list/index.vue index caf5f5a..41d790a 100644 --- a/src/views/order/pending_list/index.vue +++ b/src/views/order/pending_list/index.vue @@ -90,7 +90,7 @@ From 587b11e1ecf82fe91ba4341cecfe8fa6b29ba2e3 Mon Sep 17 00:00:00 2001 From: Huakk <1751826683@qq.com> Date: Wed, 17 Jul 2024 20:09:38 +0800 Subject: [PATCH 3/6] fix(custom): --- src/store/modules/permission/index.js | 1 + src/views/commodity/hot_list/index.vue | 3 +++ src/views/error-page/404.vue | 2 +- src/views/login/index.vue | 2 +- src/views/marketing/code/index.vue | 3 ++- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/store/modules/permission/index.js b/src/store/modules/permission/index.js index ce40035..d69bd3f 100644 --- a/src/store/modules/permission/index.js +++ b/src/store/modules/permission/index.js @@ -122,6 +122,7 @@ export const usePermissionStore = defineStore('permission', { generateRoutes() { const menus = JSON.parse(localStorage.getItem('menu')) const accessRoutes = filterAsyncRoutes(menus) + // console.log(accessRoutes) window.localStorage.setItem('roles', JSON.stringify(findType3Routes(menus))) this.accessRoutes = accessRoutes return accessRoutes diff --git a/src/views/commodity/hot_list/index.vue b/src/views/commodity/hot_list/index.vue index 203422d..fcd1f4b 100644 --- a/src/views/commodity/hot_list/index.vue +++ b/src/views/commodity/hot_list/index.vue @@ -41,6 +41,7 @@ :pagination="pagination" :bordered="false" :row-key="(row) => row.gid" + :checked-row-keys="queryParams.checkedRowKeysRef" remote @update:checked-row-keys="handleCheck" /> @@ -525,6 +526,8 @@ const clear = () => { isDzModel.value = false notesVal.value = '' nowRow.value = {} + queryParams.value.word = '' + getList() } const veeify = async () => { diff --git a/src/views/error-page/404.vue b/src/views/error-page/404.vue index 54cb1c5..2385eea 100644 --- a/src/views/error-page/404.vue +++ b/src/views/error-page/404.vue @@ -5,7 +5,7 @@ - 返回首页 + 返回首页 diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 282f3f2..b6cb958 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -114,7 +114,7 @@ async function handleLogin() { Reflect.deleteProperty(query, 'redirect') router.push({ path, query }) } else { - router.push('/') + router.push('/workbench') } } catch (error) { $message.removeMessage() diff --git a/src/views/marketing/code/index.vue b/src/views/marketing/code/index.vue index da15b1a..6f980c9 100644 --- a/src/views/marketing/code/index.vue +++ b/src/views/marketing/code/index.vue @@ -101,6 +101,7 @@ :pagination="pagination" :bordered="false" :row-key="rowKey" + :checked-row-keys="checkedRowKeysRef" remote @update:checked-row-keys="handleCheck" /> @@ -425,6 +426,7 @@ const handleclear = () => { pulse: null, activate_status: 2, } + checkedRowKeysRef.value = [] } const modalType = ref(null) @@ -458,7 +460,6 @@ const handleValidateClick = (e) => { ...formValue.value, }) } - $message.success('成功') handleclear() getList() } catch (error) { From c157d6024e34efa1c33c0c9cf7003a395e939b17 Mon Sep 17 00:00:00 2001 From: Huakk <1751826683@qq.com> Date: Thu, 18 Jul 2024 19:04:51 +0800 Subject: [PATCH 4/6] =?UTF-8?q?feat(custom):=20=E6=96=B0=E5=A2=9E=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 15 +- src/views/system/payMag/api.js | 7 + src/views/system/payMag/index.vue | 283 ++++++++++++++++++++++++++++++ 3 files changed, 298 insertions(+), 7 deletions(-) create mode 100644 src/views/system/payMag/api.js create mode 100644 src/views/system/payMag/index.vue diff --git a/src/views/login/index.vue b/src/views/login/index.vue index b6cb958..04aa579 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -109,13 +109,14 @@ async function handleLogin() { lStorage.remove('loginInfo') } await addDynamicRoutes() - if (query.redirect) { - const path = query.redirect - Reflect.deleteProperty(query, 'redirect') - router.push({ path, query }) - } else { - router.push('/workbench') - } + // if (query.redirect) { + // const path = query.redirect + // Reflect.deleteProperty(query, 'redirect') + // router.push({ path, query }) + // } else { + // router.push('/workbench') + // } + router.push('/workbench') } catch (error) { $message.removeMessage() } diff --git a/src/views/system/payMag/api.js b/src/views/system/payMag/api.js new file mode 100644 index 0000000..c41c337 --- /dev/null +++ b/src/views/system/payMag/api.js @@ -0,0 +1,7 @@ +import { request } from '@/utils' + +export default { + getData: (data) => request.post('/paytype/list', data), + add: (data) => request.post('/paytype/add', data), + edit: (data) => request.post('/paytype/edit', data), +} diff --git a/src/views/system/payMag/index.vue b/src/views/system/payMag/index.vue new file mode 100644 index 0000000..cc407a4 --- /dev/null +++ b/src/views/system/payMag/index.vue @@ -0,0 +1,283 @@ + + + + 添加支付方式 + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 取消 + + + + + + + + + + + + From 2f7b80f4180c38d75bfc8e3e7ceeb783531858e8 Mon Sep 17 00:00:00 2001 From: Huakk <1751826683@qq.com> Date: Fri, 19 Jul 2024 11:00:48 +0800 Subject: [PATCH 5/6] feat(custom): --- src/views/order/index/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/order/index/index.vue b/src/views/order/index/index.vue index f0732f3..0eac14c 100644 --- a/src/views/order/index/index.vue +++ b/src/views/order/index/index.vue @@ -251,7 +251,7 @@ const columns = ref([ title: '支付方式', align: 'center', slot: 'pay_type', - render: (row) => h('span', row.pay_type === 1 ? '微信' : '积分'), + render: (row) => h('span', row.PayInfo.name), }, { title: '商家名称', From f78140d8dde6dfb1bb9d30a81a4e292c0d326c58 Mon Sep 17 00:00:00 2001 From: Huakk <1751826683@qq.com> Date: Fri, 19 Jul 2024 17:03:17 +0800 Subject: [PATCH 6/6] mod(custom): --- src/store/modules/permission/index.js | 12 +++++------- src/views/commodity/hot_list/index.vue | 2 +- src/views/login/index.vue | 17 +++++++++-------- src/views/system/payMag/index.vue | 4 ++-- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/store/modules/permission/index.js b/src/store/modules/permission/index.js index d69bd3f..2894340 100644 --- a/src/store/modules/permission/index.js +++ b/src/store/modules/permission/index.js @@ -64,11 +64,11 @@ function filterAsyncRoutes(routes = [], firstRoute = true) { children: [], } - if (route.route === '/' && firstRoute) { - curRoute['redirect'] = route.subMenu[0].route - } else if (route.subMenu && route.type === 1) { - curRoute['redirect'] = `${route.subMenu[0].route}` - } + // if (route.route === '/' && firstRoute) { + // curRoute['redirect'] = route.subMenu[0].route + // } else if (route.subMenu && route.type === 1) { + // curRoute['redirect'] = `${route.subMenu[0].route}` + // } if (route.subMenu && route.subMenu.length) { curRoute.children = filterAsyncRoutes(route.subMenu, false) @@ -84,7 +84,6 @@ function filterAsyncRoutes(routes = [], firstRoute = true) { curRoute.component = loadRouteView(route.components) break } - ret.push(curRoute) }) return ret @@ -122,7 +121,6 @@ export const usePermissionStore = defineStore('permission', { generateRoutes() { const menus = JSON.parse(localStorage.getItem('menu')) const accessRoutes = filterAsyncRoutes(menus) - // console.log(accessRoutes) window.localStorage.setItem('roles', JSON.stringify(findType3Routes(menus))) this.accessRoutes = accessRoutes return accessRoutes diff --git a/src/views/commodity/hot_list/index.vue b/src/views/commodity/hot_list/index.vue index fcd1f4b..f7f2812 100644 --- a/src/views/commodity/hot_list/index.vue +++ b/src/views/commodity/hot_list/index.vue @@ -513,7 +513,7 @@ const getList = async () => { pageSize: pagination.value.pageSize, name: queryParams.value.word, }) - data.value = res.data.data || [] + data.value = res.data.data.sort((a, b) => b.status - a.status) || [] pagination.value.itemCount = res.data.total } catch (error) { $message.error(error.msg) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 04aa579..2d2387b 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -109,14 +109,15 @@ async function handleLogin() { lStorage.remove('loginInfo') } await addDynamicRoutes() - // if (query.redirect) { - // const path = query.redirect - // Reflect.deleteProperty(query, 'redirect') - // router.push({ path, query }) - // } else { - // router.push('/workbench') - // } - router.push('/workbench') + // console.log(query) + if (query.redirect) { + const path = query.redirect + Reflect.deleteProperty(query, 'redirect') + router.push({ path, query }) + } else { + router.push('/workbench') + } + // router.push('/workbench') } catch (error) { $message.removeMessage() } diff --git a/src/views/system/payMag/index.vue b/src/views/system/payMag/index.vue index cc407a4..f165e0e 100644 --- a/src/views/system/payMag/index.vue +++ b/src/views/system/payMag/index.vue @@ -85,7 +85,7 @@ const columns = ref([ align: 'center', render: (row) => { return h('img', { - src: row.icon, + src: row.icon[0].url, width: 50, height: 50, }) @@ -195,7 +195,7 @@ const getList = async () => { }, ], })) || [] - console.log(res) + // console.log(res) pagination.value.itemCount = res.data.total loading.value = false }