소스 검색

屏蔽目前不支持的菜单类型等

imndx 3 년 전
부모
커밋
453dce61e7

+ 1 - 1
manage/src/views/modules/wx/account/wx-account-add-or-update.vue

@@ -41,7 +41,7 @@ import { mapState } from 'vuex'
         },
         dataRule: {
           name: [
-            { required: true, message: '公众号名称不能为空', trigger: 'blur' }
+            { required: true, message: '频道名称不能为空', trigger: 'blur' }
           ],
           appid: [
             { required: true, message: 'appid不能为空', trigger: 'blur' }

+ 7 - 7
manage/src/views/modules/wx/wx-menu-button-editor.vue

@@ -20,14 +20,14 @@
                         <option value="view">跳转网页(view)</option>
                         <option value="media_id">发送消息(media_id)</option>
                         <!--<option value="view_limited">跳转公众号图文消息链接(view_limited)</option>-->
-                        <option value="miniprogram">打开指定小程序(miniprogram)</option>
+<!--                        <option value="miniprogram">打开指定小程序(miniprogram)</option>-->
                         <option value="click">自定义点击事件(click)</option>
-                        <option value="scancode_push">扫码上传消息(scancode_push)</option>
-                        <option value="scancode_waitmsg">扫码提示下发(scancode_waitmsg)</option>
-                        <option value="pic_sysphoto">系统相机拍照(pic_sysphoto)</option>
-                        <option value="pic_photo_or_album">弹出拍照或者相册(pic_photo_or_album)</option>
-                        <option value="pic_weixin">弹出频道相册(pic_weixin)</option>
-                        <option value="location_select">弹出地理位置选择器(location_select)</option>
+<!--                        <option value="scancode_push">扫码上传消息(scancode_push)</option>-->
+<!--                        <option value="scancode_waitmsg">扫码提示下发(scancode_waitmsg)</option>-->
+<!--                        <option value="pic_sysphoto">系统相机拍照(pic_sysphoto)</option>-->
+<!--                        <option value="pic_photo_or_album">弹出拍照或者相册(pic_photo_or_album)</option>-->
+<!--                        <option value="pic_weixin">弹出频道相册(pic_weixin)</option>-->
+<!--                        <option value="location_select">弹出地理位置选择器(location_select)</option>-->
                     </select>
                 </div>
             </div>

+ 31 - 33
manage/src/views/modules/wx/wx-msg.vue

@@ -18,17 +18,15 @@
                 <el-button @click="showSendMsgDialog = true">发送消息</el-button>
             </el-form-item>
         </el-form>
-        <div class="text-gray">
-            24小时内消息可回复。此后台展示消息有一分钟左右延迟,如需畅聊请使用
-            <a href="https://mpkf.weixin.qq.com/" target="_blank">公众平台客服</a>
-        </div>
         <div v-loading="dataListLoading">
             <div class="msg-item" v-for="(msg,index) in  dataList" :key="index">
-                <div class="avatar"><el-avatar shape="square" :size="60" :src="getUserInfo(msg.openid).headimgurl"></el-avatar></div>
+                <div class="avatar">
+                    <el-avatar shape="square" :size="60" :src="getUserInfo(msg.openid).headimgurl"></el-avatar>
+                </div>
                 <div class="item-content">
                     <div class="flex justify-between margin-bottom">
-                        <div class="text-cut">{{getUserInfo(msg.openid).nickname || '--'}}</div>
-                        <div>{{$moment(msg.createTime).calendar()}}</div>
+                        <div class="text-cut">{{ getUserInfo(msg.openid).nickname || '--' }}</div>
+                        <div>{{ $moment(msg.createTime).calendar() }}</div>
                         <div class="reply-btn">
                             <div v-if="canReply(msg.createTime)" @click="replyHandle(msg.openid)" class="el-icon-s-promotion">回复</div>
                         </div>
@@ -64,8 +62,8 @@ const TIME_FORMAT = 'YYYY/MM/DD hh:mm:ss'
 export default {
     data() {
         return {
-            timeSelections:{
-                '近24小时':this.$moment().subtract(1, 'days').format(TIME_FORMAT),
+            timeSelections: {
+                '近24小时': this.$moment().subtract(1, 'days').format(TIME_FORMAT),
                 '近3天': this.$moment().subtract(3, 'days').format(TIME_FORMAT),
                 '近7天': this.$moment().subtract(7, 'days').format(TIME_FORMAT),
                 '近30天': this.$moment().subtract(30, 'days').format(TIME_FORMAT),
@@ -81,7 +79,7 @@ export default {
                 ]
             },
             dataList: [],
-            userDataList:[],
+            userDataList: [],
             pageIndex: 1,
             pageSize: 20,
             totalCount: 0,
@@ -91,8 +89,8 @@ export default {
         }
     },
     components: {
-        WxMsgReply:()=>import('./wx-msg-reply'),
-        WxMsgPreview:()=>import('@/components/wx-msg-preview')
+        WxMsgReply: () => import('./wx-msg-reply'),
+        WxMsgPreview: () => import('@/components/wx-msg-preview')
     },
     activated() {
         this.getDataList()
@@ -111,11 +109,11 @@ export default {
                     'page': this.pageIndex,
                     'limit': this.pageSize,
                     'msgTypes': this.dataForm.msgTypes,
-                    'startTime':this.dataForm.startTime,
+                    'startTime': this.dataForm.startTime,
                     'sidx': 'create_time',
                     'order': 'desc'
                 })
-            }).then(({ data }) => {
+            }).then(({data}) => {
                 if (data && data.code === 200) {
                     this.dataList = data.page.list
                     this.totalCount = data.page.totalCount
@@ -127,25 +125,25 @@ export default {
                 this.dataListLoading = false
             })
         },
-        refreshUserList(msgList){
-            let openidList=msgList.map(msg=>msg.openid).filter(openid=>!this.userDataList.some(u=>u.openid==openid))
-            if(!openidList.length)return
+        refreshUserList(msgList) {
+            let openidList = msgList.map(msg => msg.openid).filter(openid => !this.userDataList.some(u => u.openid == openid))
+            if (!openidList.length) return
             openidList = Array.from(new Set(openidList))//去重
             this.$http({
                 url: this.$http.adornUrl('/manage/wxUser/listByIds'),
                 method: 'post',
-                data: this.$http.adornParams(openidList,false)
-            }).then(({ data }) => {
+                data: this.$http.adornParams(openidList, false)
+            }).then(({data}) => {
                 if (data && data.code === 200) {
                     this.userDataList = this.userDataList.concat(data.data)
                 }
             })
         },
-        getUserInfo(openid){
-            return this.userDataList.find(u=>u.openid==openid) || {nickname:'--',headimgurl:''}
+        getUserInfo(openid) {
+            return this.userDataList.find(u => u.openid == openid) || {nickname: '--', headimgurl: ''}
         },
         // 是否可回复,24小时内可回复
-        canReply(time){
+        canReply(time) {
             return true
         },
         // 每页数
@@ -169,15 +167,15 @@ export default {
                 this.$refs.wxMsgReply.init(openid)
             })
         },
-        onReplyed(replyMsg){
+        onReplyed(replyMsg) {
             this.dataList.unshift({
-                openid : replyMsg.openid,
-                msgType : replyMsg.replyType,
-                detail : {
-                    content : replyMsg.replyContent
+                openid: replyMsg.openid,
+                msgType: replyMsg.replyType,
+                detail: {
+                    content: replyMsg.replyContent
                 },
-                inOut : 1,
-                createTime : new Date()
+                inOut: 1,
+                createTime: new Date()
             })
         },
         sendTextMessageContent() {
@@ -207,7 +205,7 @@ export default {
 }
 </script>
 <style scoped>
-.msg-item{
+.msg-item {
     border: 1px solid #DCDFE6;
     display: flex;
     justify-content: flex-start;
@@ -215,19 +213,19 @@ export default {
     margin-top: 20px;
     padding: 10px 20px;
 }
-.avatar{
+.avatar {
     flex: 0;
     display: inline-block;
     min-width: 60px;
     margin-right: 20px;
 }
-.item-content{
+.item-content {
     flex: 1;
     line-height: 20px;
     max-width: 100%;
     overflow: hidden;
 }
-.reply-btn{
+.reply-btn {
     width: 50px;
 }
 </style>