diff --git a/src/views/mp/account/index.vue b/src/views/mp/account/index.vue
index a5275d36..7903dbe2 100644
--- a/src/views/mp/account/index.vue
+++ b/src/views/mp/account/index.vue
@@ -12,13 +12,13 @@
:actions="[
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'mp:account:update', onClick: handleEdit.bind(null, record) },
{
- icon: IconEnum.EDIT,
+ icon: IconEnum.RESET,
label: '生成二维码',
auth: 'mp:account:qr-code',
onClick: handleGenerateQrCode.bind(null, record)
},
{
- icon: IconEnum.EDIT,
+ icon: IconEnum.TEST,
label: '清空 API 配额',
auth: 'mp:account:clear-quota',
onClick: handleCleanQuota.bind(null, record)
diff --git a/src/views/mp/mpuser/MpUserModal.vue b/src/views/mp/mpuser/MpUserModal.vue
new file mode 100644
index 00000000..c3bc52ba
--- /dev/null
+++ b/src/views/mp/mpuser/MpUserModal.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
diff --git a/src/views/mp/mpuser/index.vue b/src/views/mp/mpuser/index.vue
index 3b64cfc4..b6634114 100644
--- a/src/views/mp/mpuser/index.vue
+++ b/src/views/mp/mpuser/index.vue
@@ -1,3 +1,66 @@
- 开发中
+
+
+
+
+ {{ t('action.create') }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mp/mpuser/mpuser.data.ts b/src/views/mp/mpuser/mpuser.data.ts
new file mode 100644
index 00000000..48a8959a
--- /dev/null
+++ b/src/views/mp/mpuser/mpuser.data.ts
@@ -0,0 +1,110 @@
+import { getSimpleAccounts } from '@/api/mp/account'
+import { getSimpleTags } from '@/api/mp/tag'
+import { BasicColumn, FormSchema, useRender } from '@/components/Table'
+
+export const columns: BasicColumn[] = [
+ {
+ title: '岗位编号',
+ dataIndex: 'id',
+ width: 100
+ },
+ {
+ title: '用户标识',
+ dataIndex: 'openid',
+ width: 180
+ },
+ {
+ title: '昵称',
+ dataIndex: 'nickname',
+ width: 100
+ },
+ {
+ title: '备注',
+ dataIndex: 'remark',
+ width: 120
+ },
+ {
+ title: '标签',
+ dataIndex: 'tagIds',
+ width: 180,
+ customRender: ({ text }) => {
+ return useRender.renderTags(text)
+ }
+ },
+ {
+ title: '订阅状态',
+ dataIndex: 'subscribeStatus',
+ width: 180,
+ customRender: ({ text }) => {
+ return useRender.renderTag(text === 0 ? '已订阅' : '未订阅', text === 0 ? 'purple' : 'orange')
+ }
+ },
+ {
+ title: '订阅时间',
+ dataIndex: 'subscribeTime',
+ width: 180,
+ customRender: ({ text }) => {
+ return useRender.renderDate(text)
+ }
+ }
+]
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '公众号',
+ field: 'accountId',
+ component: 'ApiSelect',
+ componentProps: {
+ api: () => getSimpleAccounts(),
+ labelField: 'name',
+ valueField: 'id'
+ },
+ colProps: { span: 8 }
+ },
+ {
+ label: '用户标识',
+ field: 'openid',
+ component: 'Input',
+ colProps: { span: 8 }
+ },
+ {
+ label: '昵称',
+ field: 'nickname',
+ component: 'Input',
+ colProps: { span: 8 }
+ }
+]
+
+export const formSchema: FormSchema[] = [
+ {
+ label: '编号',
+ field: 'id',
+ show: false,
+ component: 'Input'
+ },
+ {
+ label: '昵称',
+ field: 'nickname',
+ required: true,
+ component: 'Input'
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ required: true,
+ component: 'Input'
+ },
+ {
+ label: '标签',
+ field: 'tagIds',
+ helpMessage: '在微信公众平台(mp.weixin.qq.com)的菜单 [设置与开发 - 公众号设置 - 基本设置] 中能找到「开发者ID(AppID)」',
+ required: true,
+ component: 'ApiSelect',
+ componentProps: {
+ api: () => getSimpleTags(),
+ labelField: 'name',
+ valueField: 'tagId',
+ mode: 'tags'
+ }
+ }
+]