diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 4cd09cc6..e988ce3b 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -125,6 +125,21 @@ + 萌新必读 + + +
+ 📚开发指南 + 🔥视频教程 + + ⚡面试手册 + + + 🤝外包咨询 + +
+
+
diff --git a/src/views/mp/account/index.vue b/src/views/mp/account/index.vue index d890f44f..f993b8e3 100644 --- a/src/views/mp/account/index.vue +++ b/src/views/mp/account/index.vue @@ -46,7 +46,7 @@ v-if="scope.row.qrCodeUrl" :src="scope.row.qrCodeUrl" alt="二维码" - style="height: 100px; display: inline-block" + style="display: inline-block; height: 100px" /> diff --git a/src/views/mp/components/wx-material-select/types.ts b/src/views/mp/components/wx-material-select/types.ts new file mode 100644 index 00000000..d4add1d5 --- /dev/null +++ b/src/views/mp/components/wx-material-select/types.ts @@ -0,0 +1,11 @@ +export enum NewsType { + Draft = '2', + Published = '1' +} + +export enum MaterialType { + Image = 'image', + Voice = 'voice', + Video = 'video', + News = 'news' +} diff --git a/src/views/mp/components/wx-msg/card.scss b/src/views/mp/components/wx-msg/card.scss index 67ac9219..7fbbe802 100644 --- a/src/views/mp/components/wx-msg/card.scss +++ b/src/views/mp/components/wx-msg/card.scss @@ -1,25 +1,27 @@ -.avue-card{ - &__item{ +.avue-card { + &__item { margin-bottom: 16px; border: 1px solid #e8e8e8; background-color: #fff; box-sizing: border-box; - color: rgba(0,0,0,.65); + color: rgba(0, 0, 0, 0.65); font-size: 14px; font-variant: tabular-nums; line-height: 1.5; list-style: none; - font-feature-settings: "tnum"; + font-feature-settings: 'tnum'; cursor: pointer; - height:200px; - &:hover{ - border-color: rgba(0,0,0,.09); - box-shadow: 0 2px 8px rgba(0,0,0,.09); + height: 200px; + + &:hover { + border-color: rgba(0, 0, 0, 0.09); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09); } - &--add{ - border:1px dashed #000; + + &--add { + border: 1px dashed #000; width: 100%; - color: rgba(0,0,0,.45); + color: rgba(0, 0, 0, 0.45); background-color: #fff; border-color: #d9d9d9; border-radius: 2px; @@ -27,74 +29,87 @@ align-items: center; justify-content: center; font-size: 16px; - i{ + + i { margin-right: 10px; } - &:hover{ + + &:hover { color: #40a9ff; background-color: #fff; border-color: #40a9ff; } } } - &__body{ + + &__body { display: flex; padding: 24px; } - &__detail{ - flex:1 + + &__detail { + flex: 1; } - &__avatar{ + + &__avatar { width: 48px; height: 48px; border-radius: 48px; overflow: hidden; margin-right: 12px; - img{ + + img { width: 100%; height: 100%; } } - &__title{ - color: rgba(0,0,0,.85); + + &__title { + color: rgba(0, 0, 0, 0.85); margin-bottom: 12px; font-size: 16px; - &:hover{ - color:#1890ff; + + &:hover { + color: #1890ff; } } - &__info{ - color: rgba(0,0,0,.45); + + &__info { + color: rgba(0, 0, 0, 0.45); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; height: 64px; } - &__menu{ + + &__menu { display: flex; - justify-content:space-around; + justify-content: space-around; height: 50px; background: #f7f9fa; - color: rgba(0,0,0,.45); + color: rgba(0, 0, 0, 0.45); text-align: center; line-height: 50px; - &:hover{ - color:#1890ff; + + &:hover { + color: #1890ff; } } } /** joolun 额外加的 */ .avue-comment__main { - flex: unset!important; - border-radius: 5px!important; - margin: 0 8px!important; + flex: unset !important; + border-radius: 5px !important; + margin: 0 8px !important; } + .avue-comment__header { border-top-left-radius: 5px; border-top-right-radius: 5px; } + .avue-comment__body { border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; diff --git a/src/views/mp/components/wx-msg/comment.scss b/src/views/mp/components/wx-msg/comment.scss index 3f1341b2..aaeaccaf 100644 --- a/src/views/mp/components/wx-msg/comment.scss +++ b/src/views/mp/components/wx-msg/comment.scss @@ -1,27 +1,33 @@ /* 来自 https://github.com/nmxiaowei/avue/blob/master/styles/src/element-ui/comment.scss */ -.avue-comment{ +.avue-comment { margin-bottom: 30px; display: flex; align-items: flex-start; - &--reverse{ - flex-direction:row-reverse; - .avue-comment__main{ - &:before,&:after{ + + &--reverse { + flex-direction: row-reverse; + + .avue-comment__main { + &:before, + &:after { left: auto; right: -8px; border-width: 8px 0 8px 8px; } - &:before{ + + &:before { border-left-color: #dedede; } - &:after{ + + &:after { border-left-color: #f8f8f8; margin-right: 1px; margin-left: auto; } } } - &__avatar{ + + &__avatar { width: 48px; height: 48px; border-radius: 50%; @@ -29,7 +35,8 @@ box-sizing: border-box; vertical-align: middle; } - &__header{ + + &__header { padding: 5px 15px; background: #f8f8f8; border-bottom: 1px solid #eee; @@ -37,18 +44,22 @@ align-items: center; justify-content: space-between; } - &__author{ + + &__author { font-weight: 700; font-size: 14px; color: #999; } - &__main{ - flex:1; + + &__main { + flex: 1; margin: 0 20px; position: relative; border: 1px solid #dedede; border-radius: 2px; - &:before,&:after{ + + &:before, + &:after { position: absolute; top: 10px; left: -8px; @@ -56,32 +67,39 @@ width: 0; height: 0; display: block; - content: " "; + content: ' '; border-color: transparent; border-style: solid solid outset; border-width: 8px 8px 8px 0; pointer-events: none; } + &:before { border-right-color: #dedede; z-index: 1; } - &:after{ + + &:after { border-right-color: #f8f8f8; margin-left: 1px; z-index: 2; } } - &__body{ + + &__body { padding: 15px; overflow: hidden; background: #fff; - font-family: Segoe UI,Lucida Grande,Helvetica,Arial,Microsoft YaHei,FreeSans,Arimo,Droid Sans,wenquanyi micro hei,Hiragino Sans GB,Hiragino Sans GB W3,FontAwesome,sans-serif;color: #333; + font-family: Segoe UI, Lucida Grande, Helvetica, Arial, Microsoft YaHei, FreeSans, Arimo, + Droid Sans, wenquanyi micro hei, Hiragino Sans GB, Hiragino Sans GB W3, FontAwesome, + sans-serif; + color: #333; font-size: 14px; } - blockquote{ - margin:0; - font-family: Georgia,Times New Roman,Times,Kai,Kaiti SC,KaiTi,BiauKai,FontAwesome,serif; + + blockquote { + margin: 0; + font-family: Georgia, Times New Roman, Times, Kai, Kaiti SC, KaiTi, BiauKai, FontAwesome, serif; padding: 1px 0 1px 15px; border-left: 4px solid #ddd; } diff --git a/src/views/mp/components/wx-msg/index.ts b/src/views/mp/components/wx-msg/index.ts new file mode 100644 index 00000000..fd9eddd7 --- /dev/null +++ b/src/views/mp/components/wx-msg/index.ts @@ -0,0 +1,6 @@ +import WxMsg from './main.vue' +import { MsgType } from './types' + +export { MsgType } + +export default WxMsg diff --git a/src/views/mp/components/wx-msg/main.vue b/src/views/mp/components/wx-msg/main.vue index c7354628..19763245 100644 --- a/src/views/mp/components/wx-msg/main.vue +++ b/src/views/mp/components/wx-msg/main.vue @@ -125,19 +125,19 @@
- + 发送(S)
@@ -123,7 +123,7 @@ const selectMaterial = (item) => { .select-item { width: 280px; padding: 10px; - margin: 0 auto 10px auto; + margin: 0 auto 10px; border: 1px solid #eaeaea; .material-img { @@ -131,11 +131,11 @@ const selectMaterial = (item) => { } .item-name { - font-size: 12px; overflow: hidden; + font-size: 12px; + text-align: center; text-overflow: ellipsis; white-space: nowrap; - text-align: center; .item-infos { width: 30%; @@ -149,18 +149,18 @@ const selectMaterial = (item) => { } .col-select { - border: 1px solid rgb(234, 234, 234); - padding: 50px 0px; - height: 160px; width: 49.5%; + height: 160px; + padding: 50px 0; + border: 1px solid rgb(234 234 234); } .col-add { - border: 1px solid rgb(234, 234, 234); - padding: 50px 0px; - height: 160px; - width: 49.5%; float: right; + width: 49.5%; + height: 160px; + padding: 50px 0; + border: 1px solid rgb(234 234 234); .el-upload__tip { line-height: 18px; diff --git a/src/views/mp/components/wx-reply/components/TabMusic.vue b/src/views/mp/components/wx-reply/components/TabMusic.vue index 2c3b04e5..b19fb592 100644 --- a/src/views/mp/components/wx-reply/components/TabMusic.vue +++ b/src/views/mp/components/wx-reply/components/TabMusic.vue @@ -1,14 +1,11 @@ diff --git a/src/views/mp/components/wx-reply/components/TabNews.vue b/src/views/mp/components/wx-reply/components/TabNews.vue index bb9272e7..ecb5026d 100644 --- a/src/views/mp/components/wx-reply/components/TabNews.vue +++ b/src/views/mp/components/wx-reply/components/TabNews.vue @@ -1,11 +1,8 @@ @@ -67,7 +65,7 @@ const onDelete = () => { .select-item { width: 280px; padding: 10px; - margin: 0 auto 10px auto; + margin: 0 auto 10px; border: 1px solid #eaeaea; .ope-row { diff --git a/src/views/mp/components/wx-reply/components/TabText.vue b/src/views/mp/components/wx-reply/components/TabText.vue index bd7b0187..aac698e8 100644 --- a/src/views/mp/components/wx-reply/components/TabText.vue +++ b/src/views/mp/components/wx-reply/components/TabText.vue @@ -1,15 +1,10 @@ diff --git a/src/views/mp/components/wx-reply/components/TabVoice.vue b/src/views/mp/components/wx-reply/components/TabVoice.vue index 6d40a052..5c9f64a7 100644 --- a/src/views/mp/components/wx-reply/components/TabVoice.vue +++ b/src/views/mp/components/wx-reply/components/TabVoice.vue @@ -1,12 +1,9 @@ diff --git a/src/views/mp/draft/components/CoverSelect.vue b/src/views/mp/draft/components/CoverSelect.vue index ae2b6591..944b7d96 100644 --- a/src/views/mp/draft/components/CoverSelect.vue +++ b/src/views/mp/draft/components/CoverSelect.vue @@ -27,9 +27,7 @@ :on-success="onUploadSuccess" > @@ -61,13 +60,13 @@ diff --git a/src/views/mp/material/components/UploadFile.vue b/src/views/mp/material/components/UploadFile.vue index be7e323b..f58084bb 100644 --- a/src/views/mp/material/components/UploadFile.vue +++ b/src/views/mp/material/components/UploadFile.vue @@ -6,14 +6,11 @@ :limit="1" :file-list="fileList" :data="uploadData" - :on-progress="(isUploading = true)" :on-error="onUploadError" :before-upload="onBeforeUpload" :on-success="onUploadSuccess" > - - {{ isUploading ? '正在上传' : '点击上传' }} - + 点击上传 @@ -56,7 +55,7 @@ import type { UploadProps, UploadUserFile } from 'element-plus' -import { HEADERS, UploadData, UPLOAD_URL, beforeVideoUpload, MaterialType } from './upload' +import { HEADERS, UploadData, UPLOAD_URL, UploadType, beforeVideoUpload } from './upload' const message = useMessage() @@ -85,18 +84,16 @@ const showDialog = computed({ } }) -const isUploading = ref(false) - const fileList = ref([]) const uploadData: UploadData = reactive({ - type: MaterialType.Video, + type: UploadType.Video, title: '', introduction: '' }) -const uploadFormRef = ref() -const uploadVideoRef = ref() +const uploadFormRef = ref(null) +const uploadVideoRef = ref(null) const submitVideo = () => { uploadFormRef.value?.validate((valid) => { @@ -109,7 +106,6 @@ const submitVideo = () => { /** 上传成功处理 */ const onUploadSuccess: UploadProps['onSuccess'] = (res: any) => { - isUploading.value = false if (res.code !== 0) { message.error('上传出错:' + res.msg) return false diff --git a/src/views/mp/material/components/VideoTable.vue b/src/views/mp/material/components/VideoTable.vue index 81472959..b1e14dd5 100644 --- a/src/views/mp/material/components/VideoTable.vue +++ b/src/views/mp/material/components/VideoTable.vue @@ -39,7 +39,7 @@ diff --git a/src/views/mp/menu/index.vue b/src/views/mp/menu/index.vue index c053a47c..442e33b5 100644 --- a/src/views/mp/menu/index.vue +++ b/src/views/mp/menu/index.vue @@ -53,7 +53,7 @@