dmy 5 năm trước cách đây
mục cha
commit
51fc273614

+ 0 - 0
_src/assets/icon-verified.png → _src/assets/icon-chat-auth.png


+ 2 - 1
_src/components/chatRoom/chatRoom.vue

@@ -8,7 +8,7 @@
           <i
             class="el-icon-more"
             v-if="!isPrivate"
-            @click="groupSet = !groupSet"
+            @click.stop="groupSet = !groupSet"
           ></i>
         </div>
       </div>
@@ -60,6 +60,7 @@
       <div @click="joinGroup()" class="btn-join" v-show="isJoinGroup==0">加入群聊</div>
     </div>
     <chat-set
+      @showCharSet = "showCharSet"
       @handleShowGroudMgr="showGroudMgr"
       v-if="group.members && !isPrivate"
       :class="{'move-left': groupSet}"

+ 12 - 1
_src/components/chatSet/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="r-view pub-scroll-box">
+  <div ref="chatSet" class="r-view pub-scroll-box" @click.stop>
     <div class="setting-top">
       <div class="search-input">
         <input type="text" v-model="searchTxt" placeholder="搜索群成员">
@@ -187,6 +187,17 @@ export default {
       return this.group.creator == this.myId
     }
   },
+  mounted () {
+    document.addEventListener('click', () => {
+      if (!this.$refs.chatSet) return
+
+      let classNames = this.$refs.chatSet.getAttribute('class')
+
+      if (classNames.indexOf('move-left') > -1) {
+        this.$emit('showCharSet', 0)
+      }
+    })
+  },
   data () {
     return {
       msgPush: false, // 消失免打扰

+ 23 - 2
_src/components/panel/sessionItem.vue

@@ -6,7 +6,8 @@
     @contextmenu.prevent="onToolBtn"
   >
     <div class="avatar-wrap">
-      <i class="ext" v-if="item.unread>0">{{item.unread}}</i>
+      <i class="mute mute-point" v-if="item.unread>0 && item.is_mute==1"></i>
+      <i class="mute mute-num" v-else-if="item.unread>0 && item.is_mute==0">{{item.unread}}</i>
       <img v-if="item.cover_photo" class="user-avatar" :src="item.cover_photo" alt>
       <div
         v-else
@@ -14,6 +15,7 @@
         :class="`avatar_bg${bgColorNum(item.session_id)}`"
         :data-name="item.name && item.name.slice(0,2).toUpperCase()"
       ></div>
+      <i class="icon-auth" v-if="item.is_auth==1"></i>
     </div>
     <div class="info">
       <h3>
@@ -323,7 +325,7 @@ export default {
   }
   .avatar-wrap {
     position: relative;
-    .ext {
+    .mute {
       position: absolute;
       top: -7px;
       right: -7px;
@@ -334,6 +336,25 @@ export default {
       border-radius: 12px;
       z-index: 99;
     }
+    .mute-point{
+      width: 12px;
+      height: 12px;
+      padding: 0;
+      border-radius: 50%;
+      top: -6px;
+      right: -6px;
+    }
+    .mute-num{
+
+    }
+    .icon-auth {
+      position: absolute;
+      bottom: 0;
+      right: 0;
+      width: 14px;
+      height: 13px;
+      background: url("../../assets/icon-chat-auth.png");
+    }
   }
   img.user-avatar {
     display: block;

+ 2 - 8
_src/mixins/chat.js

@@ -16,18 +16,11 @@ export const chatMixin = {
       this.enableScroll = false
       this.initRoom()
     },
-    unreadNums (val, newval) {
-      if (val > 0 && this.isBottom) {
-        setTimeout(this.resizeToBottom.bind(this), 150)
-      }
-    },
     chatList (val) {
       let lastVal = val[val.length - 1]
-      if (lastVal && lastVal.msg_type == 4) {
+      if ((lastVal && lastVal.msg_type == 4) || this.isBottom) {
         // 自己发的红包自动滚动到底部
         this.$nextTick(this.resizeToBottom)
-      } else if (this.isBottom) {
-        this.$nextTick(this.resizeToBottom)
       }
     },
     isJoinGroup (val) {
@@ -202,6 +195,7 @@ export const chatMixin = {
      * @des 聊天窗体滚动到底部
      */
     resizeToBottom () {
+      console.log('resizeToBottom')
       this.$refs.scrollWrap.scrollTop = this.$refs.msgWrap.offsetHeight
       this.resetUnreadNums()
       this.isBottom = true

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/css/chunk-0d1dfdc4.18863327.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/css/chunk-0ee422d0.0d139ddf.css


+ 0 - 0
dist/css/chunk-2d2f7d98.03d9f0bc.css → dist/css/chunk-2d2f7d98.11f748be.css


+ 0 - 0
dist/css/chunk-common.52c032e7.css → dist/css/chunk-common.8be1955b.css


+ 0 - 0
dist/css/chunk-vendors.2fc48d69.css → dist/css/chunk-vendors.e9c8b283.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/css/index.ab4a2586.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/css/mini.5c40c6d3.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/chunk-0d1dfdc4.a39b3f9c.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/chunk-0ee422d0.23fcc03b.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/chunk-14b7d1c9.0b969439.js


+ 0 - 0
dist/js/chunk-2c06dfd2.42bf31dd.js → dist/js/chunk-2c06dfd2.2f24cda4.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/chunk-2d2f7d98.321c90a6.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/chunk-4ae53135.cb56044f.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/chunk-4ae53135.d7b7a22d.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/chunk-7e7394b2.fb8b2bd8.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/chunk-common.2e02adf3.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/chunk-vendors.3e86b43c.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/h5.35dd4f02.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/index.0f1e1ca2.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/mini.ca2ac66b.js


+ 146 - 0
dist/precache-manifest.183449aebb9584f63fb0b00ff8c8c8d4.js

@@ -0,0 +1,146 @@
+self.__precacheManifest = [
+  {
+    "revision": "26f05f2621e6d30f145f",
+    "url": "/dist/css/chunk-0d1dfdc4.18863327.css"
+  },
+  {
+    "revision": "26f05f2621e6d30f145f",
+    "url": "/dist/js/chunk-0d1dfdc4.a39b3f9c.js"
+  },
+  {
+    "revision": "ea23d8e511c5ddd8e4b8",
+    "url": "/dist/css/chunk-0ee422d0.0d139ddf.css"
+  },
+  {
+    "revision": "ea23d8e511c5ddd8e4b8",
+    "url": "/dist/js/chunk-0ee422d0.23fcc03b.js"
+  },
+  {
+    "revision": "53f77aa108ebf6fed1d2",
+    "url": "/dist/css/chunk-14b7d1c9.d3bb9736.css"
+  },
+  {
+    "revision": "53f77aa108ebf6fed1d2",
+    "url": "/dist/js/chunk-14b7d1c9.0b969439.js"
+  },
+  {
+    "revision": "8116ae1b1ef4a549effb",
+    "url": "/dist/css/chunk-2c06dfd2.d4c88e50.css"
+  },
+  {
+    "revision": "8116ae1b1ef4a549effb",
+    "url": "/dist/js/chunk-2c06dfd2.2f24cda4.js"
+  },
+  {
+    "revision": "caf6eefcb8e40acde551",
+    "url": "/dist/css/chunk-2d2f7d98.11f748be.css"
+  },
+  {
+    "revision": "caf6eefcb8e40acde551",
+    "url": "/dist/js/chunk-2d2f7d98.321c90a6.js"
+  },
+  {
+    "revision": "6dd0037a4c9e3b411cc4",
+    "url": "/dist/css/chunk-369c7fde.384c55e4.css"
+  },
+  {
+    "revision": "6dd0037a4c9e3b411cc4",
+    "url": "/dist/js/chunk-369c7fde.6979e4fa.js"
+  },
+  {
+    "revision": "a7df56d4f599c1b531f9",
+    "url": "/dist/css/chunk-4ae53135.0dc1cd14.css"
+  },
+  {
+    "revision": "a7df56d4f599c1b531f9",
+    "url": "/dist/js/chunk-4ae53135.cb56044f.js"
+  },
+  {
+    "revision": "14c2c57bebfb472d5149",
+    "url": "/dist/css/chunk-common.8be1955b.css"
+  },
+  {
+    "revision": "14c2c57bebfb472d5149",
+    "url": "/dist/js/chunk-common.2e02adf3.js"
+  },
+  {
+    "revision": "ae7dd4686211972be40d",
+    "url": "/dist/css/chunk-vendors.e9c8b283.css"
+  },
+  {
+    "revision": "ae7dd4686211972be40d",
+    "url": "/dist/js/chunk-vendors.3e86b43c.js"
+  },
+  {
+    "revision": "94fd03fe8b4c0f27d0eb",
+    "url": "/dist/css/h5.b36a6392.css"
+  },
+  {
+    "revision": "94fd03fe8b4c0f27d0eb",
+    "url": "/dist/js/h5.35dd4f02.js"
+  },
+  {
+    "revision": "a90ce782e0c1d20f3732",
+    "url": "/dist/css/index.ab4a2586.css"
+  },
+  {
+    "revision": "a90ce782e0c1d20f3732",
+    "url": "/dist/js/index.0f1e1ca2.js"
+  },
+  {
+    "revision": "ccef2fc4847651fa1ad5",
+    "url": "/dist/css/mini.5c40c6d3.css"
+  },
+  {
+    "revision": "ccef2fc4847651fa1ad5",
+    "url": "/dist/js/mini.ca2ac66b.js"
+  },
+  {
+    "revision": "eb029f3afb0aa1294ffa0cf0ade29412",
+    "url": "/dist/img/bg.eb029f3a.png"
+  },
+  {
+    "revision": "0b28333db188e069d1ff4907da0148c6",
+    "url": "/dist/img/bg2.0b28333d.png"
+  },
+  {
+    "revision": "2fad952a20fbbcfd1bf2ebb210dccf7a",
+    "url": "/dist/fonts/element-icons.2fad952a.woff"
+  },
+  {
+    "revision": "6f0a76321d30f3c8120915e57f7bd77e",
+    "url": "/dist/fonts/element-icons.6f0a7632.ttf"
+  },
+  {
+    "revision": "71de928a26b3ba1fe61c933166c7e5ec",
+    "url": "/dist/img/bg.71de928a.jpg"
+  },
+  {
+    "revision": "c32be0c8ca35b820d913d487747c050f",
+    "url": "/dist/../protected/views/index.html"
+  },
+  {
+    "revision": "6ab519db1373a90dc0d9a5270d059958",
+    "url": "/dist/../protected/views/mini.html"
+  },
+  {
+    "revision": "0e5b272662d0387a30d7e9623b154896",
+    "url": "/dist/../protected/views/h5.html"
+  },
+  {
+    "revision": "4af8e5e7525bc1a78ca5378ec568a0eb",
+    "url": "/dist/h5.html"
+  },
+  {
+    "revision": "6dc2cb834b811f7d3de4fddd33d61ec9",
+    "url": "/dist/mini.html"
+  },
+  {
+    "revision": "b6216d61c03e6ce0c9aea6ca7808f7ca",
+    "url": "/dist/robots.txt"
+  },
+  {
+    "revision": "a060f53ea02ecdd52835d8b5495a1d48",
+    "url": "/dist/sw.js"
+  }
+];

+ 4 - 0
dist/sw.js

@@ -1,4 +1,8 @@
+<<<<<<< HEAD
 importScripts("/dist/precache-manifest.877feee0d916f2c57faa670055e68a03.js");
+=======
+importScripts("/dist/precache-manifest.183449aebb9584f63fb0b00ff8c8c8d4.js");
+>>>>>>> d05bdde52c8778390071b03d3cd7d17cf89ca47b
 
 
 var workbox=function(){"use strict";try{self.workbox.v["workbox:sw:3.6.3"]=1}catch(t){}const t="https://storage.googleapis.com/workbox-cdn/releases/3.6.3",e={backgroundSync:"background-sync",broadcastUpdate:"broadcast-cache-update",cacheableResponse:"cacheable-response",core:"core",expiration:"cache-expiration",googleAnalytics:"google-analytics",navigationPreload:"navigation-preload",precaching:"precaching",rangeRequests:"range-requests",routing:"routing",strategies:"strategies",streams:"streams"};return new class{constructor(){return this.v={},this.t={debug:"localhost"===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.e=this.t.debug?"dev":"prod",this.s=!1,new Proxy(this,{get(t,s){if(t[s])return t[s];const o=e[s];return o&&t.loadModule(`workbox-${o}`),t[s]}})}setConfig(t={}){if(this.s)throw new Error("Config must be set before accessing workbox.* modules");Object.assign(this.t,t),this.e=this.t.debug?"dev":"prod"}skipWaiting(){self.addEventListener("install",()=>self.skipWaiting())}clientsClaim(){self.addEventListener("activate",()=>self.clients.claim())}loadModule(t){const e=this.o(t);try{importScripts(e),this.s=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}o(e){if(this.t.modulePathCb)return this.t.modulePathCb(e,this.t.debug);let s=[t];const o=`${e}.${this.e}.js`,r=this.t.modulePathPrefix;return r&&""===(s=r.split("/"))[s.length-1]&&s.splice(s.length-1,1),s.push(o),s.join("/")}}}();

+ 0 - 20
meet-chat.iml

@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="WEB_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/aws/aws-sdk-php" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/composer" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/guzzlehttp/guzzle" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/guzzlehttp/promises" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/guzzlehttp/psr7" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/kornrunner/keccak" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/mtdowling/jmespath.php" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/phpseclib/phpseclib" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/psr/http-message" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/ralouphie/getallheaders" />
-      <excludeFolder url="file://$MODULE_DIR$/protected/vendor/symfony/polyfill-mbstring" />
-    </content>
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 8 - 3
protected/controllers/PersonController.php

@@ -56,6 +56,10 @@ class PersonController extends BaseController {
      */
     private function _msg($session_id, $load_type, $client_hash) {
         $where = compact('session_id');
+        $userId = User::getUserId();
+        if ($userId) {
+            $where['user_id'] = $userId;
+        }
 
         $keyWord = [
             '_field' => 'is_group, read_hash, read_num',
@@ -74,10 +78,9 @@ class PersonController extends BaseController {
         }
 
         $data = $objSession->getMsgList($session_id, $client_hash, $load_type, 0);
-        $userId = User::getUserId();
         if ($userId) {
-            $c = count($data['list']);
-            $lastNum = $data['list'][$c-1]['msg_num'];
+            $last = end($data['list']);
+            $lastNum = $last['msg_num'];
             if ($lastNum > $row['read_num']) {
                 $objSession->updateState($session_id, ['read_num' => $lastNum], ['user_id' => $userId]);
             }
@@ -86,6 +89,8 @@ class PersonController extends BaseController {
         $data['list'] = array_filter($data['list'], function ($v) {
             return $v['state'] == 1;
         });
+        $data['list'] = array_values($data['list']);
+
         return $data;
     }
 

+ 2 - 1
protected/models/Session.php

@@ -43,7 +43,7 @@ class Session extends Model {
         $users = arrayFormatKey($users, 'user_id');
 
         $objGroupInfo = new TableHelper('group_info', 'dw_chat');
-        $_field = 'group_id, group_name, group_title, cover_photo';
+        $_field = 'group_id, group_name, group_title, cover_photo, is_auth';
         $groups = $objGroupInfo->getAll(['group_id' => $group_ids], compact('_field'));
         $groups = arrayFormatKey($groups, 'group_id');
 
@@ -60,6 +60,7 @@ class Session extends Model {
                 $group = $groups[$item['session_id']];
                 $item['name'] = $group['group_title'] ?: $group['group_name'];
                 $item['cover_photo'] = $group['cover_photo'];
+                $item['is_auth'] = $group['is_auth'];
             } else {
                 // 把自己的用户名换掉
                 $key = str_replace([$user_id, '-'], ['', ''], $item['session_id']);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
protected/views/h5.html


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
protected/views/index.html


+ 7 - 1
protected/views/mini.html

@@ -1,3 +1,9 @@
+<<<<<<< HEAD
 <!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><!--[if IE]><link rel="icon" href="/dist/favicon.ico"><![endif]--><title>MeeChat</title><link href=/dist/css/chunk-common.52c032e7.css rel=preload as=style><link href=/dist/css/chunk-vendors.2fc48d69.css rel=preload as=style><link href=/dist/css/mini.6beedc15.css rel=preload as=style><link href=/dist/js/chunk-common.31950b99.js rel=preload as=script><link href=/dist/js/chunk-vendors.f2f92cd6.js rel=preload as=script><link href=/dist/js/mini.61722891.js rel=preload as=script><link href=/dist/css/chunk-vendors.2fc48d69.css rel=stylesheet><link href=/dist/css/chunk-common.52c032e7.css rel=stylesheet><link href=/dist/css/mini.6beedc15.css rel=stylesheet><link rel=icon type=image/png sizes=32x32 href=/dist/dist/img/icons/meechat.png?imageview/0/w/64><link rel=icon type=image/png sizes=16x16 href=/dist/dist/img/icons/meechat.png?imageview/0/w/32><link rel=manifest href=/dist/manifest.json><meta name=theme-color content=#4DBA87><meta name=apple-mobile-web-app-capable content=no><meta name=apple-mobile-web-app-status-bar-style content=default><meta name=apple-mobile-web-app-title content=MeeChat><link rel=apple-touch-icon href=/dist/dist/img/icons/meechat.png?imageview/0/w/152><link rel=mask-icon href=/dist/img/icons/safari-pinned-tab.svg color=#4DBA87><meta name=msapplication-TileImage content=/dist/dist/img/icons/meechat.png?imageview/0/w/144><meta name=msapplication-TileColor content=#000000></head><body><div id=app></div><script>window.EOS_PROTOCOL = 'https'
       window.EOS_HOST = 'proxy.eosnode.tools'
-      window.EOS_PORT = '443'</script><script src=/dist/js/chunk-vendors.f2f92cd6.js></script><script src=/dist/js/chunk-common.31950b99.js></script><script src=/dist/js/mini.61722891.js></script></body></html>
+      window.EOS_PORT = '443'</script><script src=/dist/js/chunk-vendors.f2f92cd6.js></script><script src=/dist/js/chunk-common.31950b99.js></script><script src=/dist/js/mini.61722891.js></script></body></html>
+=======
+<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><!--[if IE]><link rel="icon" href="/dist/favicon.ico"><![endif]--><title>MeeChat</title><link href=/dist/css/chunk-common.8be1955b.css rel=preload as=style><link href=/dist/css/chunk-vendors.e9c8b283.css rel=preload as=style><link href=/dist/css/mini.5c40c6d3.css rel=preload as=style><link href=/dist/js/chunk-common.2e02adf3.js rel=preload as=script><link href=/dist/js/chunk-vendors.3e86b43c.js rel=preload as=script><link href=/dist/js/mini.ca2ac66b.js rel=preload as=script><link href=/dist/css/chunk-vendors.e9c8b283.css rel=stylesheet><link href=/dist/css/chunk-common.8be1955b.css rel=stylesheet><link href=/dist/css/mini.5c40c6d3.css rel=stylesheet><link rel=icon type=image/png sizes=32x32 href="/dist/dist/img/icons/meechat.png?imageview/0/w/64?v=1.0"><link rel=icon type=image/png sizes=16x16 href="/dist/dist/img/icons/meechat.png?imageview/0/w/32?v=1.0"><link rel=manifest href="/dist/manifest.json?v=1.0"><meta name=theme-color content=#4DBA87><meta name=apple-mobile-web-app-capable content=no><meta name=apple-mobile-web-app-status-bar-style content=default><meta name=apple-mobile-web-app-title content=MeeChat><link rel=apple-touch-icon href="/dist/dist/img/icons/meechat.png?imageview/0/w/152?v=1.0"><link rel=mask-icon href="/dist/img/icons/safari-pinned-tab.svg?v=1.0" color=#4DBA87><meta name=msapplication-TileImage content="/dist/dist/img/icons/meechat.png?imageview/0/w/144?v=1.0"><meta name=msapplication-TileColor content=#000000></head><body><div id=app></div><script>window.EOS_PROTOCOL = 'https'
+      window.EOS_HOST = 'proxy.eosnode.tools'
+      window.EOS_PORT = '443'</script><script src=/dist/js/chunk-vendors.3e86b43c.js></script><script src=/dist/js/chunk-common.2e02adf3.js></script><script src=/dist/js/mini.ca2ac66b.js></script></body></html>
+>>>>>>> d05bdde52c8778390071b03d3cd7d17cf89ca47b

+ 1 - 0
vue.config.js

@@ -50,6 +50,7 @@ module.exports = {
   },
   pwa: {
     name: 'MeeChat',
+    assetsVersion: '1.0',
     workboxPluginMode: 'InjectManifest',
     workboxOptions: {
       // directoryIndex: null,

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác