diff --git a/apps/web-antd/src/views/mp/components/constants.ts b/apps/web-antd/src/views/mp/components/constants.ts new file mode 100644 index 000000000..c129d61f0 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/constants.ts @@ -0,0 +1,32 @@ +export enum ReplyType { + Image = 'image', + Music = 'music', + News = 'news', + Text = 'text', + Video = 'video', + Voice = 'voice', +} + +export enum NewsType { + Draft = '2', + Published = '1', +} + +export enum MaterialType { + Image = 'image', + News = 'news', + Video = 'video', + Voice = 'voice', +} + +export enum MsgType { + Event = 'event', + Image = 'image', + Link = 'link', + Location = 'location', + Music = 'music', + News = 'news', + Text = 'text', + Video = 'video', + Voice = 'voice', +} diff --git a/apps/web-antd/src/views/mp/components/index.ts b/apps/web-antd/src/views/mp/components/index.ts new file mode 100644 index 000000000..a2af7a046 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/index.ts @@ -0,0 +1,11 @@ +export * from './constants'; + +export * from './wx-account-select'; +export * from './wx-location'; +export * from './wx-material-select'; +export * from './wx-msg'; +export * from './wx-music'; +export * from './wx-news'; +export * from './wx-reply'; +export * from './wx-video-play'; +export * from './wx-voice-play'; diff --git a/apps/web-antd/src/views/mp/components/wx-account-select/account-select.vue b/apps/web-antd/src/views/mp/components/wx-account-select/account-select.vue new file mode 100644 index 000000000..96514a1db --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-account-select/account-select.vue @@ -0,0 +1,69 @@ + + + + + + {{ item.name }} + + + diff --git a/apps/web-antd/src/views/mp/components/wx-location/types.ts b/apps/web-antd/src/views/mp/components/wx-location/types.ts new file mode 100644 index 000000000..9566c2a6c --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-location/types.ts @@ -0,0 +1,6 @@ +export interface WxLocationProps { + label: string; + locationX: number; + locationY: number; + qqMapKey?: string; +} diff --git a/apps/web-antd/src/views/mp/components/wx-location/wx-location.vue b/apps/web-antd/src/views/mp/components/wx-location/wx-location.vue new file mode 100644 index 000000000..5f67164cc --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-location/wx-location.vue @@ -0,0 +1,48 @@ + + + + + + + + + + + + + {{ label }} + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-material-select/wx-material-select.vue b/apps/web-antd/src/views/mp/components/wx-material-select/wx-material-select.vue new file mode 100644 index 000000000..97f743e07 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-material-select/wx-material-select.vue @@ -0,0 +1,445 @@ + + + + + + + + + + + {{ item.name }} + + + 选择 + + + + + + + + + + + + + + + + + + + + 选择 + + + + + + + + + + + + + + + + + 选择 + + + + + + + + + + + + + + + + + + 选择 + + + + + + + + + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-msg/msg-event.vue b/apps/web-antd/src/views/mp/components/wx-msg/msg-event.vue new file mode 100644 index 000000000..24b039ebf --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-msg/msg-event.vue @@ -0,0 +1,51 @@ + + + + + + 关注 + + + 取消关注 + + + 点击菜单 + 【{{ item.eventKey }}】 + + + 点击菜单链接 + 【{{ item.eventKey }}】 + + + 扫码结果 + 【{{ item.eventKey }}】 + + + 扫码结果 + 【{{ item.eventKey }}】 + + + 系统拍照发图 + + + 拍照或者相册 + + + 微信相册 + + + 选择地理位置 + + + 未知事件类型 + + + diff --git a/apps/web-antd/src/views/mp/components/wx-msg/msg-list.vue b/apps/web-antd/src/views/mp/components/wx-msg/msg-list.vue new file mode 100644 index 000000000..898ba0593 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-msg/msg-list.vue @@ -0,0 +1,75 @@ + + + + + + + + {{ getNickname(item.sendFrom) }} + + + + + + {{ formatDateTime(item.createTime) }} + + + + + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-msg/msg.vue b/apps/web-antd/src/views/mp/components/wx-msg/msg.vue new file mode 100644 index 000000000..c2cc51b8f --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-msg/msg.vue @@ -0,0 +1,77 @@ + + + + + + + {{ item.content }} + + + + + + + + + + + + + + + + + + + + {{ item.title }} + + + {{ item.description }} + + + + + + + + + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-msg/wx-msg.vue b/apps/web-antd/src/views/mp/components/wx-msg/wx-msg.vue new file mode 100644 index 000000000..874d372fc --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-msg/wx-msg.vue @@ -0,0 +1,178 @@ + + + + + + + + + + 点击加载更多 + + + 没有更多了 + + + + + + + + + + + + 发送(S) + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-music/types.ts b/apps/web-antd/src/views/mp/components/wx-music/types.ts new file mode 100644 index 000000000..5164f5319 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-music/types.ts @@ -0,0 +1,7 @@ +export interface WxMusicProps { + title?: string; + description?: string; + musicUrl?: string; + hqMusicUrl?: string; + thumbMediaUrl: string; +} diff --git a/apps/web-antd/src/views/mp/components/wx-music/wx-music.vue b/apps/web-antd/src/views/mp/components/wx-music/wx-music.vue new file mode 100644 index 000000000..3c304afc3 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-music/wx-music.vue @@ -0,0 +1,87 @@ + + + + + + + + + + + + {{ title }} + {{ description }} + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-news/wx-news.vue b/apps/web-antd/src/views/mp/components/wx-news/wx-news.vue new file mode 100644 index 000000000..092425965 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-news/wx-news.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + {{ article.title }} + + + + + + + + + {{ article.title }} + + + + + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-reply/tab-image.vue b/apps/web-antd/src/views/mp/components/wx-reply/tab-image.vue new file mode 100644 index 000000000..22571c014 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-reply/tab-image.vue @@ -0,0 +1,220 @@ + + + + + + + + {{ reply.name }} + + + + + + + + + + + + + + + 素材库选择 + + + + + + + + + + + + + + 上传图片 + + + + + + + 支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-reply/tab-music.vue b/apps/web-antd/src/views/mp/components/wx-reply/tab-music.vue new file mode 100644 index 000000000..0dff606d3 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-reply/tab-music.vue @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + 本地上传 + + + 素材库选择 + + + + + + + + + + (reply.title = val || null)" + /> + (reply.description = val || null)" + /> + + + + + (reply.musicUrl = val || null)" + /> + (reply.hqMusicUrl = val || null)" + /> + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-reply/tab-news.vue b/apps/web-antd/src/views/mp/components/wx-reply/tab-news.vue new file mode 100644 index 000000000..83bdd51f5 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-reply/tab-news.vue @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + {{ + newsType === NewsType.Published + ? '选择已发布图文' + : '选择草稿箱图文' + }} + + + + + + + + + + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-reply/tab-text.vue b/apps/web-antd/src/views/mp/components/wx-reply/tab-text.vue new file mode 100644 index 000000000..914d943a6 --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-reply/tab-text.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-reply/tab-video.vue b/apps/web-antd/src/views/mp/components/wx-reply/tab-video.vue new file mode 100644 index 000000000..03e675ffc --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-reply/tab-video.vue @@ -0,0 +1,192 @@ + + + + + + + (reply.title = val || null)" + /> + + + (reply.description = val || null)" + /> + + + + + + + + + + + + 素材库选择 + + + + + + + + + + + + + + 新建视频 + + + + + + + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-reply/tab-voice.vue b/apps/web-antd/src/views/mp/components/wx-reply/tab-voice.vue new file mode 100644 index 000000000..0b1eaeade --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-reply/tab-voice.vue @@ -0,0 +1,216 @@ + + + + + + {{ reply.name }} + + + + + + + + + + + + + + + + + 素材库选择 + + + + + + + + + + + + + + 点击上传 + + + + + + + 格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-reply/types.ts b/apps/web-antd/src/views/mp/components/wx-reply/types.ts new file mode 100644 index 000000000..46a99418d --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-reply/types.ts @@ -0,0 +1,42 @@ +import type { Ref } from 'vue'; + +import type { ReplyType } from '../constants'; + +import { unref } from 'vue'; + +export interface Reply { + accountId: number; + articles?: any[]; + content?: null | string; + description?: null | string; + hqMusicUrl?: null | string; + introduction?: null | string; + mediaId?: null | string; + musicUrl?: null | string; + name?: null | string; + thumbMediaId?: null | string; + thumbMediaUrl?: null | string; + title?: null | string; + type: ReplyType; + url?: null | string; +} + +/** 利用旧的reply[accountId, type]初始化新的Reply */ +export function createEmptyReply(old: Ref | Reply): Reply { + return { + accountId: unref(old).accountId, + articles: [], + content: null, + description: null, + hqMusicUrl: null, + introduction: null, + mediaId: null, + musicUrl: null, + name: null, + thumbMediaId: null, + thumbMediaUrl: null, + title: null, + type: unref(old).type, + url: null, + }; +} diff --git a/apps/web-antd/src/views/mp/components/wx-reply/wx-reply.vue b/apps/web-antd/src/views/mp/components/wx-reply/wx-reply.vue new file mode 100644 index 000000000..7076d14fb --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-reply/wx-reply.vue @@ -0,0 +1,236 @@ + + + + + + + + + + + 文本 + + + + + + + + + + + 图片 + + + + + + + + + + + 语音 + + + + + + + + + + + 视频 + + + + + + + + + + + 图文 + + + + + + + + + + + 音乐 + + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-video-play/wx-video-play.vue b/apps/web-antd/src/views/mp/components/wx-video-play/wx-video-play.vue new file mode 100644 index 000000000..4313d238f --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-video-play/wx-video-play.vue @@ -0,0 +1,55 @@ + + + + + + + + + 点击播放视频 + + + + + + + + diff --git a/apps/web-antd/src/views/mp/components/wx-voice-play/wx-voice-play.vue b/apps/web-antd/src/views/mp/components/wx-voice-play/wx-voice-play.vue new file mode 100644 index 000000000..9a64cdbdb --- /dev/null +++ b/apps/web-antd/src/views/mp/components/wx-voice-play/wx-voice-play.vue @@ -0,0 +1,100 @@ + + + + + + + + + {{ duration }} 秒 + + + 语音识别 + {{ content }} + + + + +
{{ item.name }}
{{ reply.name }}
点击播放视频