From 59b19cd9e35edfb5ef38a995dcd6e422c1479db4 Mon Sep 17 00:00:00 2001 From: dzq Date: Wed, 26 Nov 2025 15:20:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1=E4=BC=9A=E5=91=98=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在用户管理页面新增添加会员弹窗及表单 - 添加绑定微信会员的API接口 - 设置默认企业ID用于测试 - 实现表单验证及提交逻辑 --- src/api/ab98/user.ts | 17 ++++++ src/store/modules/wx.ts | 2 +- src/views/user/ab98/index.vue | 101 +++++++++++++++++++++++++++++++++- 3 files changed, 118 insertions(+), 2 deletions(-) diff --git a/src/api/ab98/user.ts b/src/api/ab98/user.ts index 8327c2e..bbc5589 100644 --- a/src/api/ab98/user.ts +++ b/src/api/ab98/user.ts @@ -107,6 +107,18 @@ export interface BindQyUserCommand { idNum: string; } +export interface BindWxMpUserCommand { + /** 企业ID */ + corpid: string; + /** 动态码 */ + dynamicCode: string; + /** 真实姓名 */ + name: string; + /** 身份证号码 */ + idNum: string; +} + + export const getAb98UserListApi = (params: Ab98UserQuery) => { return http.request>>("get", "/ab98/users", { params }); }; @@ -129,4 +141,9 @@ export const getAb98UserDetailApi = (id: number, corpid: string) => { export const bindQyUserApi = (data: BindQyUserCommand) => { return http.request>("post", "/ab98/users/bindQyUser", { data }); +}; + + +export const bindWxMpUser = (data: BindWxMpUserCommand) => { + return http.request>("post", "/ab98/users/bindWxMpUser", { data }); }; \ No newline at end of file diff --git a/src/store/modules/wx.ts b/src/store/modules/wx.ts index e6c3600..c57b186 100644 --- a/src/store/modules/wx.ts +++ b/src/store/modules/wx.ts @@ -7,7 +7,7 @@ import { QyUserLoginDTO } from "@/api/common/login"; export const useWxStore = defineStore("wx", () => { // 授权企业id - const corpid = ref("") + const corpid = ref("wpZ1ZrEgAA2QTxIRcB4cMtY7hQbTcPAw") // 微信授权 code const code = ref("") // 防止 CSRF 攻击的 state 参数 diff --git a/src/views/user/ab98/index.vue b/src/views/user/ab98/index.vue index 90c8b98..23dc407 100644 --- a/src/views/user/ab98/index.vue +++ b/src/views/user/ab98/index.vue @@ -1,14 +1,16 @@