-
+
@@ -29,64 +29,64 @@
@@ -95,14 +95,14 @@
-
+
-
-
-
+
+
+
@@ -113,7 +113,7 @@
-
diff --git a/src/views/mp/draft/components/DraftTable.vue b/src/views/mp/draft/components/DraftTable.vue
new file mode 100644
index 00000000..63cee31f
--- /dev/null
+++ b/src/views/mp/draft/components/DraftTable.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mp/draft/components/NewsForm.vue b/src/views/mp/draft/components/NewsForm.vue
new file mode 100644
index 00000000..a2b88a5b
--- /dev/null
+++ b/src/views/mp/draft/components/NewsForm.vue
@@ -0,0 +1,302 @@
+
+
+
+
+
+
+
+
+
{{ news.title }}
+
+
+ moveDownNews(index)">
+
+
+ removeNews(index)"
+ >
+
+
+
+
+
+
+
{{ news.title }}
+
+
+
+
+
+ moveDownNews(index)"
+ >
+
+
+ moveUpNews(index)"
+ >
+
+
+ removeNews(index)"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 摘要:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mp/draft/components/index.ts b/src/views/mp/draft/components/index.ts
new file mode 100644
index 00000000..51e843d3
--- /dev/null
+++ b/src/views/mp/draft/components/index.ts
@@ -0,0 +1,7 @@
+import type { Article, NewsItem, NewsItemList } from './types'
+import { createEmptyNewsItem } from './types'
+import DraftTable from './DraftTable.vue'
+import NewsForm from './NewsForm.vue'
+
+export { DraftTable, NewsForm, createEmptyNewsItem }
+export type { Article, NewsItem, NewsItemList }
diff --git a/src/views/mp/draft/components/types.ts b/src/views/mp/draft/components/types.ts
new file mode 100644
index 00000000..a8cf00c3
--- /dev/null
+++ b/src/views/mp/draft/components/types.ts
@@ -0,0 +1,40 @@
+interface NewsItem {
+ title: string
+ thumbMediaId: string
+ author: string
+ digest: string
+ showCoverPic: string
+ content: string
+ contentSourceUrl: string
+ needOpenComment: string
+ onlyFansCanComment: string
+ thumbUrl: string
+}
+
+interface NewsItemList {
+ newsItem: NewsItem[]
+}
+
+interface Article {
+ mediaId: string
+ content: NewsItemList
+ updateTime: number
+}
+
+const createEmptyNewsItem = (): NewsItem => {
+ return {
+ title: '',
+ thumbMediaId: '',
+ author: '',
+ digest: '',
+ showCoverPic: '',
+ content: '',
+ contentSourceUrl: '',
+ needOpenComment: '',
+ onlyFansCanComment: '',
+ thumbUrl: ''
+ }
+}
+
+export type { Article, NewsItem, NewsItemList }
+export { createEmptyNewsItem }
diff --git a/src/views/mp/draft/editor-config.ts b/src/views/mp/draft/editor-config.ts
new file mode 100644
index 00000000..ee3b95ec
--- /dev/null
+++ b/src/views/mp/draft/editor-config.ts
@@ -0,0 +1,75 @@
+import { IEditorConfig } from '@wangeditor/editor'
+import { getAccessToken, getTenantId } from '@/utils/auth'
+
+const message = useMessage()
+
+type InsertFnType = (url: string, alt: string, href: string) => void
+
+export const createEditorConfig = (
+ server: string,
+ accountId: number | undefined
+): Partial
=> {
+ return {
+ MENU_CONF: {
+ ['uploadImage']: {
+ server,
+ // 单个文件的最大体积限制,默认为 2M
+ maxFileSize: 5 * 1024 * 1024,
+ // 最多可上传几个文件,默认为 100
+ maxNumberOfFiles: 10,
+ // 选择文件时的类型限制,默认为 ['image/*'] 。如不想限制,则设置为 []
+ allowedFileTypes: ['image/*'],
+
+ // 自定义上传参数,例如传递验证的 token 等。参数会被添加到 formData 中,一起上传到服务端。
+ meta: {
+ accountId: accountId,
+ type: 'image'
+ },
+ // 将 meta 拼接到 url 参数中,默认 false
+ metaWithUrl: true,
+
+ // 自定义增加 http header
+ headers: {
+ Accept: '*',
+ Authorization: 'Bearer ' + getAccessToken(),
+ 'tenant-id': getTenantId()
+ },
+
+ // 跨域是否传递 cookie ,默认为 false
+ withCredentials: true,
+
+ // 超时时间,默认为 10 秒
+ timeout: 5 * 1000, // 5 秒
+
+ // form-data fieldName,后端接口参数名称,默认值wangeditor-uploaded-image
+ fieldName: 'file',
+
+ // 上传之前触发
+ onBeforeUpload(file: File) {
+ console.log(file)
+ return file
+ },
+ // 上传进度的回调函数
+ onProgress(progress: number) {
+ // progress 是 0-100 的数字
+ console.log('progress', progress)
+ },
+ onSuccess(file: File, res: any) {
+ console.log('onSuccess', file, res)
+ },
+ onFailed(file: File, res: any) {
+ message.alertError(res.message)
+ console.log('onFailed', file, res)
+ },
+ onError(file: File, err: any, res: any) {
+ message.alertError(err.message)
+ console.error('onError', file, err, res)
+ },
+ // 自定义插入图片
+ customInsert(res: any, insertFn: InsertFnType) {
+ insertFn(res.data.url, 'image', res.data.url)
+ }
+ }
+ }
+ }
+}
diff --git a/src/views/mp/draft/index.vue b/src/views/mp/draft/index.vue
index d9a44076..9e188ec4 100644
--- a/src/views/mp/draft/index.vue
+++ b/src/views/mp/draft/index.vue
@@ -11,10 +11,16 @@
label-width="68px"
>
-
+
-
+
新增
@@ -23,40 +29,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
{{ news.title }}
-
-
- 下移
- 删除
-
-
-
-
-
-
{{ news.title }}
-
-
-
-
-
- 下移
-
- 上移
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
封面和摘要:
-
-
-
-
-
-
-
- 本地上传
-
- 素材库选择
-
- 支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取 消
- 提 交
-
-
-
+
+
+
+
+ 取 消
+ 提 交
+
+
+
diff --git a/src/views/mp/freePublish/index.vue b/src/views/mp/freePublish/index.vue
index 7a15b31f..04edb705 100644
--- a/src/views/mp/freePublish/index.vue
+++ b/src/views/mp/freePublish/index.vue
@@ -11,7 +11,7 @@
label-width="68px"
>
-
+
@@ -51,8 +51,7 @@
-
diff --git a/src/views/mp/material/components/UploadFile.vue b/src/views/mp/material/components/UploadFile.vue
new file mode 100644
index 00000000..be7e323b
--- /dev/null
+++ b/src/views/mp/material/components/UploadFile.vue
@@ -0,0 +1,79 @@
+
+
+
+ {{ isUploading ? '正在上传' : '点击上传' }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mp/material/components/UploadVideo.vue b/src/views/mp/material/components/UploadVideo.vue
new file mode 100644
index 00000000..8e374767
--- /dev/null
+++ b/src/views/mp/material/components/UploadVideo.vue
@@ -0,0 +1,130 @@
+
+
+
+
+ 选择视频
+
+ 格式支持 MP4,文件大小不超过 10MB
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 提 交
+
+
+
+
+
diff --git a/src/views/mp/material/components/VideoTable.vue b/src/views/mp/material/components/VideoTable.vue
new file mode 100644
index 00000000..81472959
--- /dev/null
+++ b/src/views/mp/material/components/VideoTable.vue
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.createTime }}
+
+
+
+
+
+ 下载
+
+
+ 删除
+
+
+
+
+
+
+
diff --git a/src/views/mp/material/components/VoiceTable.vue b/src/views/mp/material/components/VoiceTable.vue
new file mode 100644
index 00000000..6f37e1a0
--- /dev/null
+++ b/src/views/mp/material/components/VoiceTable.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.createTime }}
+
+
+
+
+
+ 下载
+
+
+ 删除
+
+
+
+
+
+
+
diff --git a/src/views/mp/material/components/upload.ts b/src/views/mp/material/components/upload.ts
new file mode 100644
index 00000000..ac6f3a1f
--- /dev/null
+++ b/src/views/mp/material/components/upload.ts
@@ -0,0 +1,70 @@
+import type { UploadProps, UploadRawFile } from 'element-plus'
+import { getAccessToken } from '@/utils/auth'
+const message = useMessage() // 消息
+const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 请求头
+const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-permanent' // 上传地址
+
+enum MaterialType {
+ Image = 'image',
+ Voice = 'voice',
+ Video = 'video'
+}
+
+interface UploadData {
+ type: MaterialType
+ title: string
+ introduction: string
+}
+
+const beforeUpload = (rawFile: UploadRawFile, materialType: MaterialType): boolean => {
+ let allowTypes: string[] = []
+ let maxSizeMB = 0
+ let name = ''
+ switch (materialType) {
+ case MaterialType.Image:
+ allowTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/jpg']
+ maxSizeMB = 2
+ name = '图片'
+ break
+ case MaterialType.Voice:
+ allowTypes = ['audio/mp3', 'audio/mpeg', 'audio/wma', 'audio/wav', 'audio/amr']
+ maxSizeMB = 2
+ name = '图片'
+ break
+ case MaterialType.Video:
+ allowTypes = ['video/mp4']
+ maxSizeMB = 10
+ name = '视频'
+ break
+ }
+ // 格式不正确
+ if (!allowTypes.includes(rawFile.type)) {
+ message.error(`上传${name}格式不对!`)
+ return false
+ }
+ // 大小不正确
+ if (rawFile.size / 1024 / 1024 > maxSizeMB) {
+ message.error(`上传${name}大小不能超过${maxSizeMB}M!`)
+ return false
+ }
+ return true
+}
+
+const beforeImageUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) =>
+ beforeUpload(rawFile, MaterialType.Image)
+
+const beforeVoiceUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) =>
+ beforeUpload(rawFile, MaterialType.Voice)
+
+const beforeVideoUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) =>
+ beforeUpload(rawFile, MaterialType.Video)
+
+export {
+ HEADERS,
+ UPLOAD_URL,
+ MaterialType,
+ UploadData,
+ beforeImageUpload,
+ beforeVoiceUpload,
+ beforeVideoUpload
+}
diff --git a/src/views/mp/material/index.vue b/src/views/mp/material/index.vue
index 81d8fb08..4d8d3707 100644
--- a/src/views/mp/material/index.vue
+++ b/src/views/mp/material/index.vue
@@ -4,7 +4,7 @@
-
+
@@ -12,47 +12,19 @@
-
+
图片
-
-
- 点击上传
-
-
- 支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M
-
-
-
-
-
+
+ 支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M
+
+
+
-
+
语音
-
-
- 点击上传
-
-
- 格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s
-
-
-
-
-
+
+ 格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s
+
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.createTime }}
-
-
-
-
-
- 下载
-
-
- 删除
-
-
-
-
+
-
+
视频
-
- 新建视频
-
-
- 新建视频
-
-
- 选择视频
-
- 格式支持 MP4,文件大小不超过 10MB
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取 消
- 提 交
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.createTime }}
-
-
-
-
-
- 下载
-
-
- 删除
-
-
-
-
+
-
-
-
diff --git a/src/views/mp/menu/index.vue b/src/views/mp/menu/index.vue
index fea08614..3d428f06 100644
--- a/src/views/mp/menu/index.vue
+++ b/src/views/mp/menu/index.vue
@@ -4,7 +4,7 @@
-
+
@@ -192,7 +192,7 @@
import WxReplySelect from '@/views/mp/components/wx-reply/main.vue'
import WxNews from '@/views/mp/components/wx-news/main.vue'
import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
-import WxMpSelect from '@/views/mp/components/WxMpSelect.vue'
+import WxAccountSelect from '@/views/mp/components/wx-account-select/main.vue'
import * as MpMenuApi from '@/api/mp/menu'
import { handleTree } from '@/utils/tree'
import menuOptions from './menuOptions'
diff --git a/src/views/mp/message/MessageTable.vue b/src/views/mp/message/MessageTable.vue
new file mode 100644
index 00000000..23eb9aae
--- /dev/null
+++ b/src/views/mp/message/MessageTable.vue
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+ 粉丝
+ 公众号
+
+
+
+
+
+
+
+ 关注
+
+
+ 取消关注
+
+
+ 点击菜单
+ 【{{ scope.row.eventKey }}】
+
+
+ 点击菜单链接
+ 【{{ scope.row.eventKey }}】
+
+
+ 扫码结果
+ 【{{ scope.row.eventKey }}】
+
+
+ 扫码结果
+ 【{{ scope.row.eventKey }}】
+
+
+ 系统拍照发图
+
+
+ 拍照或者相册
+
+
+ 微信相册
+
+
+ 选择地理位置
+
+
+ 未知事件类型
+
+
+ {{ scope.row.content }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 未知消息类型
+
+
+
+
+
+
+ 消息
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mp/message/index.vue b/src/views/mp/message/index.vue
index d13acf81..c115813c 100644
--- a/src/views/mp/message/index.vue
+++ b/src/views/mp/message/index.vue
@@ -9,7 +9,7 @@
label-width="68px"
>
-
+
@@ -58,124 +58,7 @@
-
-
-
-
-
- 粉丝
- 公众号
-
-
-
-
-
-
-
- 关注
-
-
- 取消关注
-
-
- 点击菜单
- 【{{ scope.row.eventKey }}】
-
-
- 点击菜单链接
- 【{{ scope.row.eventKey }}】
-
-
- 扫码结果
- 【{{ scope.row.eventKey }}】
-
-
- 扫码结果
- 【{{ scope.row.eventKey }}】
-
-
- 系统拍照发图
-
-
- 拍照或者相册
-
-
- 微信相册
-
-
- 选择地理位置
-
-
- 未知事件类型
-
-
- {{ scope.row.content }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 未知消息类型
-
-
-
-
-
-
- 消息
-
-
-
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/src/views/mp/tag/TagForm.vue b/src/views/mp/tag/TagForm.vue
index 73b29baa..b1f96eb4 100644
--- a/src/views/mp/tag/TagForm.vue
+++ b/src/views/mp/tag/TagForm.vue
@@ -1,23 +1,23 @@
-
-
diff --git a/src/views/system/notify/template/NotifyTemplateSendForm.vue b/src/views/system/notify/template/NotifyTemplateSendForm.vue
new file mode 100644
index 00000000..9e292a8d
--- /dev/null
+++ b/src/views/system/notify/template/NotifyTemplateSendForm.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确 定
+ 取 消
+
+
+
+
diff --git a/src/views/system/notify/template/index.vue b/src/views/system/notify/template/index.vue
index 45c1be6d..6d1938ad 100644
--- a/src/views/system/notify/template/index.vue
+++ b/src/views/system/notify/template/index.vue
@@ -1,251 +1,232 @@
+
+
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
-
-
-
-
-
-
-
-
diff --git a/src/views/system/notify/template/template.data.ts b/src/views/system/notify/template/template.data.ts
deleted file mode 100644
index ae8c7b07..00000000
--- a/src/views/system/notify/template/template.data.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
-
-// 表单校验
-export const rules = reactive({
- name: [required],
- code: [required],
- content: [required],
- type: [required],
- status: [required]
-})
-
-// CrudSchema
-const crudSchemas = reactive({
- primaryKey: 'id',
- primaryTitle: '编号',
- primaryType: null,
- action: true,
- actionWidth: '260', // 3个按钮默认200,如有删减对应增减即可
- columns: [
- {
- title: '模版编码',
- field: 'code',
- isSearch: true
- },
- {
- title: '模板名称',
- field: 'name',
- isSearch: true
- },
- {
- title: '发件人名称',
- field: 'nickname'
- },
- {
- title: '类型',
- field: 'type',
- dictType: DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE,
- dictClass: 'number'
- },
- {
- title: '模版内容',
- field: 'content',
- table: {
- width: 300
- },
- form: {
- component: 'Input',
- componentProps: {
- type: 'textarea',
- rows: 4
- },
- colProps: {
- span: 24
- }
- }
- },
- {
- title: '状态',
- field: 'status',
- dictType: DICT_TYPE.COMMON_STATUS,
- dictClass: 'number',
- isSearch: true
- },
- {
- title: '备注',
- field: 'remark'
- },
- {
- title: '创建时间',
- field: 'createTime',
- isForm: false,
- formatter: 'formatDate',
- search: {
- show: true,
- itemRender: {
- name: 'XDataTimePicker'
- }
- },
- table: {
- width: 180
- }
- }
- ]
-})
-export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/oauth2/client/ClientForm.vue b/src/views/system/oauth2/client/ClientForm.vue
index b5936c37..d874a249 100644
--- a/src/views/system/oauth2/client/ClientForm.vue
+++ b/src/views/system/oauth2/client/ClientForm.vue
@@ -1,11 +1,11 @@
-
+
@@ -20,7 +20,7 @@
-
+
@@ -42,8 +42,8 @@
@@ -58,9 +58,9 @@
@@ -70,8 +70,8 @@
@@ -81,9 +81,9 @@
@@ -98,9 +98,9 @@
@@ -115,9 +115,9 @@
@@ -131,22 +131,23 @@
- 确 定
+ 确 定
取 消
-