From 39a1165908577a3f45be5457d3460d2a96b2f99a Mon Sep 17 00:00:00 2001 From: Echo <1711788888@qq.com> Date: Mon, 8 Dec 2025 19:28:04 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=96=B0=E5=A2=9Eip=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=85=8D=E7=BD=AE=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + src/api/payConfig/index.js | 63 +++ src/api/user/index.js | 27 + src/components/richtext/rich-edit.vue.backup | 556 +++++++++++++++++++ src/config.js | 10 +- src/router/index.js | 18 + src/view/goods/article/edit.vue.backup | 355 ++++++++++++ src/view/payConfig/index.vue | 476 ++++++++++++++++ src/view/system/ipConfig.vue | 358 ++++++++++++ 9 files changed, 1864 insertions(+), 1 deletion(-) create mode 100644 src/api/payConfig/index.js create mode 100644 src/components/richtext/rich-edit.vue.backup create mode 100644 src/view/goods/article/edit.vue.backup create mode 100644 src/view/payConfig/index.vue create mode 100644 src/view/system/ipConfig.vue diff --git a/.gitignore b/.gitignore index e726301..873815c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ bun.lockb config.yaml .idea dist +.claude +.vscode \ No newline at end of file diff --git a/src/api/payConfig/index.js b/src/api/payConfig/index.js new file mode 100644 index 0000000..6af0e57 --- /dev/null +++ b/src/api/payConfig/index.js @@ -0,0 +1,63 @@ +import service from '@/utils/request' + +// 获取支付配置列表 +export const list = (params) => { + return service({ + url: '/payConfig/list', + method: 'get', + params + }) +} + +// 获取单个支付配置详情 +export const detail = (id) => { + return service({ + url: `/payConfig/${id}`, + method: 'get' + }) +} + +// 获取启用的支付配置(按编码) +export const getEnabled = (params) => { + return service({ + url: '/payConfig/enabled', + method: 'get', + params + }) +} + +// 创建支付配置 +export const createPayConfig = (data) => { + return service({ + url: '/payConfig', + method: 'post', + data + }) +} + +// 更新支付配置 +export const updatePayConfig = (data) => { + return service({ + url: '/payConfig', + method: 'put', + data + }) +} + +// 删除支付配置 +export const removePayConfig = (id) => { + return service({ + url: `/payConfig/${id}`, + method: 'delete' + }) +} + +// 切换启用状态 +export const togglePayConfig = (data) => { + return service({ + url: '/payConfig/toggle', + method: 'post', + data + }) +} + diff --git a/src/api/user/index.js b/src/api/user/index.js index 87f561f..db62f7d 100644 --- a/src/api/user/index.js +++ b/src/api/user/index.js @@ -123,3 +123,30 @@ export const setTeacherRate = (data) => { }) } +// =============IP检测相关================= +export const getIpCon = () => { + return service({ + url: '/app_user/ipCon', + method: 'get', + }) +} +export const setIpCon = (data) => { + return service({ + url: '/app_user/ipCon', + method: 'put', + data + }) +} +export const setIpStatus = (data) => { + return service({ + url: '/app_user/ipStatus', + method: 'put', + data + }) +} +export const getIpStatus = () => { + return service({ + url: '/app_user/ipStatus', + method: 'get', + }) +} \ No newline at end of file diff --git a/src/components/richtext/rich-edit.vue.backup b/src/components/richtext/rich-edit.vue.backup new file mode 100644 index 0000000..f1349dd --- /dev/null +++ b/src/components/richtext/rich-edit.vue.backup @@ -0,0 +1,556 @@ + + + + + + + + + + + + diff --git a/src/config.js b/src/config.js index 1f8b90e..f62c200 100644 --- a/src/config.js +++ b/src/config.js @@ -393,7 +393,13 @@ export const LOGIN_LOG_SEARCH_CONFIG = [ prop: 'user_name', label: '用户名称', placeholder: '请输入用户名称', - } + }, + { + type: 'input', + prop: 'ip', + label: '登录IP', + placeholder: '请输入登录IP地址', + }, ] // 用户登录日志表格配置 @@ -537,7 +543,9 @@ export const USER_TABLE_CONFIG = { // 文章列表 export const ARTICLE_TABLE_CONFIG = { + select: true, index: true, + rowKey: 'ID', schemes: [ { attrs: { diff --git a/src/router/index.js b/src/router/index.js index dbb799b..bd50fca 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -33,6 +33,24 @@ const routes = [ }, component: () => import('@/view/example/upload/scanUpload.vue') }, + { + path: '/ipConfig', + name: 'IpConfig', + meta: { + title: 'IP检测配置', + keepAlive: true + }, + component: () => import('@/view/system/ipConfig.vue') + }, + { + path: '/cdkManagement', + name: 'CdkManage', + meta: { + title: '兑换码管理', + keepAlive: true + }, + component: () => import('@/view/cdk/cdkManage.vue') + }, { path: '/:catchAll(.*)', meta: { diff --git a/src/view/goods/article/edit.vue.backup b/src/view/goods/article/edit.vue.backup new file mode 100644 index 0000000..ad0820c --- /dev/null +++ b/src/view/goods/article/edit.vue.backup @@ -0,0 +1,355 @@ + + + + + + + + + + + + + + + + + + + + + + + userDialogRef.open()" /> + + + + + + 免费 + 付费 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/view/payConfig/index.vue b/src/view/payConfig/index.vue new file mode 100644 index 0000000..a69419a --- /dev/null +++ b/src/view/payConfig/index.vue @@ -0,0 +1,476 @@ + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + + 新增支付配置 + + + + + + + + + + {{ formatType(row.type) }} + + + + + + + handleToggle(row)" + /> + + + + + + {{ formatDate(row.CreatedAt) }} + + + + + 查看 + 编辑 + 删除 + + + + + + + + + + + + + {{ isEdit ? '编辑支付配置' : '新增支付配置' }} + + 确 定 + 取 消 + + + + + + + + + + + + + + 神奇支付 + 微信支付 + + + + + + + + + + + + + 神奇支付配置 + + + + + + + + + + + + + + + + + + + + + + 微信支付配置 + + + + + + + + + + + + + + + + + + + + + + + + + + {{ detailData.name }} + {{ detailData.code }} + {{ formatType(detailData.type) }} + {{ detailData.enable ? '是' : '否' }} + {{ detailData.sort ?? '-' }} + {{ detailData.remark || '-' }} + {{ formatDate(detailData.CreatedAt) }} + {{ formatDate(detailData.UpdatedAt) }} + + {{ detailData.shenqiPid }} + + {{ detailData.shenqiPrivateKey || '-' }} + + + {{ detailData.shenqiPlatformPubKey || '-' }} + + {{ detailData.shenqiNotifyUrl || '-' }} + {{ detailData.shenqiReturnUrl || '-' }} + {{ detailData.shenqiBaseUrl || '-' }} + + + {{ detailData.wechatAppId }} + {{ detailData.wechatMchId }} + {{ detailData.wechatMchApiV3Key || '-' }} + + {{ detailData.wechatPrivateKey || '-' }} + + {{ detailData.wechatSerialNo || '-' }} + {{ detailData.wechatNotifyUrl || '-' }} + + + + + + + + + + diff --git a/src/view/system/ipConfig.vue b/src/view/system/ipConfig.vue new file mode 100644 index 0000000..d7464a7 --- /dev/null +++ b/src/view/system/ipConfig.vue @@ -0,0 +1,358 @@ + + + + IP检测配置 + 配置允许访问的地区IP范围,控制用户访问权限 + + + + + + + + IP检测开关 + + + + + + + + + + + + + 重定向URL + + + + + + + + + + 当用户IP不在允许地区时,将重定向到此URL + + + + + + + + + + + 允许访问地区 + + 添加地区 + + + + + + + + + {{ region }} + + + + + + + 保存配置 + + 重置 + + + + + + + + + + + + + + 取消 + + 确定 + + + + + + + + +
配置允许访问的地区IP范围,控制用户访问权限