+
-
-
-
订单号:{{ item.text.sn }}
+
+
{{ item.text.groupName }}
{{ item.text.paymentTime }}
+
+ 订单金额:¥{{ item.text.flowPrice }}
+
+
{{
+ item.text.orderStatus == 'CANCELLED' ? '已取消' : item.text.orderStatus == 'UNPAID' ? '未付款' :
+ item.text.orderStatus ==
+ 'PAID' ? '已付款' : item.text.orderStatus == 'UNDELIVERED' ? '待发货' : item.text.orderStatus ==
+ 'DELIVERED'
+ ? '已发货' : item.text.orderStatus == ' COMPLETED' ? '已完成' : item.text.orderStatus == ' TAKE' ?
+ '待校验' : ''
+ }}
-
-
@@ -149,10 +164,10 @@
+ talk_type: params.talk_type,
+ receiver_id: params.receiver_id,
+ title: params.nickname,
+ }" @close="findChatRecord = false" />
@@ -820,6 +835,67 @@ export default {
};
\ No newline at end of file
diff --git a/im/src/config/config.js b/im/src/config/config.js
index a5dd35ba..02f792f3 100644
--- a/im/src/config/config.js
+++ b/im/src/config/config.js
@@ -3,6 +3,9 @@ export default {
BASE_API_URL: process.env.VUE_APP_API_BASE_URL || "",
BASE_WS_URL: process.env.VUE_APP_WEB_SOCKET_URL || "",
BASE_COMMON: process.env.VUE_APP_COMMON || "",
- PC_URL: process.env.VUE_APP_PC_URL || "",
- STORE_URL:process.env.VUE_APP_PC_ORDER_URL || "http://192.168.0.139:10002",
+ PC_URL: process.env.VUE_APP_PC_URL || "https://pc-b2b2c.pickmall.cn",
+ STORE_URL: process.env.VUE_APP_PC_ORDER_URL || "http://192.168.0.139:8000/",
+ PC_STORE_GOODS: process.env.VUE_APP_PC_STORE_ORDER_URL || '',
+ PC_STORE_ORDER: process.env.VUE_APP_PC_STORE_ORDER || '',
+ PC_USER_ORDER: process.env.VUE_APP_PC_USER_ORDER || '',
};
diff --git a/im/src/main.js b/im/src/main.js
index 7ceab5ac..8fd9cef2 100644
--- a/im/src/main.js
+++ b/im/src/main.js
@@ -25,17 +25,27 @@ Vue.component('face', face)
Vue.component('face-null', faceNull)
Vue.prototype.linkToGoods = function (goodsId, skuId) { // 跳转买家端商品
- console.log(`${config.PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`)
- window.open(`${config.PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
+ if (localStorage.getItem('storeFlag') == 'false') {
+ window.open(`${config.PC_STORE_GOODS}goods-operation-edit?id=${goodsId}`, '_blank')
+ } else {
+ window.open(`${config.PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
+ }
};
-Vue.prototype.linkToStore = function (storeId) { // 跳转买家端商品
+Vue.prototype.linkToStore = function (storeId) { // 跳转商家端商品
console.log(`${config.PC_URL}/Merchant?id=${storeId}`)
window.open(`${config.PC_URL}/Merchant?id=${storeId}`, '_blank')
};
// 订单跳转商家订单页面
-Vue.prototype.linkToOrders = function (sn) { // 跳转买家端订单
- window.open(`${config.STORE_URL}/order-detail?sn=${sn}`, '_blank')
+Vue.prototype.linkToOrders = function (sn) {
+ if (localStorage.getItem('storeFlag') == 'false') {
+ // 商家
+ window.open(`${config.PC_STORE_GOODS}order-detail?sn=${sn}`, '_blank')
+ } else {
+ // 用户
+ window.open(`${config.STORE_URL}/OrderDetail?sn=${sn}`, '_blank')
+ }
};
+
const Instance = new Vue({
router,
store,
diff --git a/manager/public/config.js b/manager/public/config.js
index 7ef1cf91..e674bf70 100644
--- a/manager/public/config.js
+++ b/manager/public/config.js
@@ -1,29 +1,29 @@
var BASE = {
- /**
- * @description api请求基础路径
- */
- API_DEV: {
- common: "http://192.168.0.113:8890",
- buyer: "http://192.168.0.113:8888",
- seller: "http://192.168.0.113:8889",
- manager: "http://192.168.0.113:8887"
- },
- API_PROD: {
- common: "https://common-api.pickmall.cn",
- buyer: "https://buyer-api.pickmall.cn",
- seller: "https://store-api.pickmall.cn",
- manager: "https://admin-api.pickmall.cn"
- },
- /**
- * @description // 跳转买家端地址 pc端
- */
- PC_URL: "https://pc-b2b2c.pickmall.cn",
- /**
- * @description // 跳转买家端地址 wap端
- */
- WAP_URL: "https://m-b2b2c.pickmall.cn",
- /**
- * @description api请求基础路径前缀
- */
- PREFIX: "/manager"
- };
+ /**
+ * @description api请求基础路径
+ */
+ API_DEV: {
+ common: "http://192.168.0.113:8890",
+ buyer: "http://192.168.0.113:8888",
+ seller: "http://192.168.0.113:8889",
+ manager: "http://192.168.0.113:8887"
+ },
+ API_PROD: {
+ common: "https://common-api.pickmall.cn",
+ buyer: "https://buyer-api.pickmall.cn",
+ seller: "https://store-api.pickmall.cn",
+ manager: "https://admin-api.pickmall.cn"
+ },
+ /**
+ * @description // 跳转买家端地址 pc端
+ */
+ PC_URL: "https://pc-b2b2c.pickmall.cn",
+ /**
+ * @description // 跳转买家端地址 wap端
+ */
+ WAP_URL: "https://m-b2b2c.pickmall.cn",
+ /**
+ * @description api请求基础路径前缀
+ */
+ PREFIX: "/manager"
+};
diff --git a/seller/public/config.js b/seller/public/config.js
index 8e0e70ba..69441029 100644
--- a/seller/public/config.js
+++ b/seller/public/config.js
@@ -3,10 +3,10 @@ var BASE = {
* @description api请求基础路径
*/
API_DEV: {
- common: "http://192.168.0.113:8890",
- buyer: "http://192.168.0.113:8888",
- seller: "http://192.168.0.113:8889",
- manager: "http://192.168.0.113:8887"
+ common: "https://common-api.pickmall.cn",
+ buyer: "https://buyer-api.pickmall.cn",
+ seller: "https://store-api.pickmall.cn",
+ manager: "https://admin-api.pickmall.cn"
},
API_PROD: {
common: "https://common-api.pickmall.cn",
diff --git a/seller/src/views/home/home.vue b/seller/src/views/home/home.vue
index 36f03b44..7d40de4b 100644
--- a/seller/src/views/home/home.vue
+++ b/seller/src/views/home/home.vue
@@ -258,7 +258,10 @@ export default {
this.$Message.error("请登录后再联系客服");
return;
}
- window.open(`${res.result}?token=` + accessToken);
+ // console.log(res.result, 'res.result');
+ // http://192.168.0.139:8000/
+ window.open(`http://192.168.0.139:8000/?token=` + accessToken);
+ // window.open(`${res.result}?token=` + accessToken);
},
// 获取im信息
From 8ea3843d61424942cb126d0e2077fa179bf2ae55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A8=8B?= <994041296@163.com>
Date: Wed, 11 Jan 2023 18:24:18 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E8=B6=B3=E8=BF=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
im/src/components/chat/panel/OtherLink.vue | 4 +-
im/src/components/chat/panel/TalkPanel.vue | 1 -
.../chat/panel/template/footPrint.vue | 31 ++--
.../chat/panel/template/goodsLink.vue | 4 +-
im/src/components/editor/MeEditor.vue | 144 +++++++-----------
im/src/components/layout/WelcomeModule.vue | 5 +-
im/src/im-server/event/talk.js | 25 +--
im/src/plugins/ws-socket.js | 1 -
im/src/store/modules/talk.js | 2 -
im/src/utils/talk.js | 11 +-
im/src/views/message/index.vue | 9 +-
11 files changed, 103 insertions(+), 134 deletions(-)
diff --git a/im/src/components/chat/panel/OtherLink.vue b/im/src/components/chat/panel/OtherLink.vue
index d5160d29..99dc4163 100644
--- a/im/src/components/chat/panel/OtherLink.vue
+++ b/im/src/components/chat/panel/OtherLink.vue
@@ -1,7 +1,7 @@
-
+
-
+
@@ -17,13 +18,14 @@
¥{{ item.price }}
+
+ 发送
+
-
- 发送
-
+
@@ -43,8 +45,8 @@
{{ item.groupName }}
- 发送
+ 发送
- 发送
@@ -169,7 +169,7 @@ export default {
.image {
height: 100px;
margin-top: 3px;
- width: 100px
+ width: 100px;
}
}
diff --git a/im/src/components/editor/MeEditor.vue b/im/src/components/editor/MeEditor.vue
index cc0605c0..742163c3 100644
--- a/im/src/components/editor/MeEditor.vue
+++ b/im/src/components/editor/MeEditor.vue
@@ -33,99 +33,66 @@
发起投票
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
-
+
-
+
- {
- this.vote.isShow = false;
- }
- "
- />
+ {
+ this.vote.isShow = false;
+ }
+ " />
@@ -156,20 +123,20 @@ export default {
MeEditorVote,
},
computed: {
- talkUser() {
+ talkUser () {
return this.$store.state.dialogue.index_name;
},
- isGroupTalk() {
+ isGroupTalk () {
return this.$store.state.dialogue.talk_type == 2;
},
},
watch: {
- talkUser(n_index_name) {
+ talkUser (n_index_name) {
this.$refs.filesManager.clear();
this.editorText = this.getDraftText(n_index_name);
},
},
- data() {
+ data () {
return {
// 当前编辑的内容
editorText: "",
@@ -205,13 +172,13 @@ export default {
},
methods: {
// 读取对话编辑草稿信息 并赋值给当前富文本
- getDraftText(index_name) {
+ getDraftText (index_name) {
console.log("findTalk(index_name)", findTalk(index_name));
return findTalk(index_name)?.draft_text || "";
},
//复制粘贴图片回调方法
- pasteImage(e) {
+ pasteImage (e) {
let files = getPasteImgs(e);
if (files.length == 0) return;
@@ -219,19 +186,19 @@ export default {
},
//拖拽上传图片回调方法
- dragPasteImage(e) {
+ dragPasteImage (e) {
let files = getDragPasteImg(e);
if (files.length == 0) return;
this.openImageViewer(files[0]);
},
- inputEvent(e) {
+ inputEvent (e) {
this.$emit("keyboard-event", e.target.value);
},
// 键盘按下监听事件
- keydownEvent(e) {
+ keydownEvent (e) {
if (e.keyCode == 13 && this.editorText == "") {
e.preventDefault();
}
@@ -256,13 +223,13 @@ export default {
},
// 选择图片文件后回调方法
- uploadImageChange(e) {
+ uploadImageChange (e) {
this.openImageViewer(e.target.files[0]);
this.$refs.restFile.value = null;
},
// 选择文件回调事件
- uploadFileChange(e) {
+ uploadFileChange (e) {
let maxsize = 100 * 1024 * 1024;
if (e.target.files.length == 0) {
return false;
@@ -288,13 +255,13 @@ export default {
},
// 打开图片查看器
- openImageViewer(file) {
+ openImageViewer (file) {
this.imageViewer.isShow = true;
this.imageViewer.file = file;
},
// 代码块编辑器确认完成回调事件
- confirmCodeBlock(data) {
+ confirmCodeBlock (data) {
const { talk_type, receiver_id } = this.$store.state.dialogue;
ServeSendTalkCodeBlock({
talk_type,
@@ -315,7 +282,7 @@ export default {
},
// 确认上传图片消息回调事件
- confirmUploadImage() {
+ confirmUploadImage () {
let fileData = new FormData();
fileData.append("file", this.imageViewer.file);
@@ -340,7 +307,8 @@ export default {
},
// 选中表情包回调事件
- selecteEmoticon(data) {
+ selecteEmoticon (data) {
+ console.log(data);
if (data.type == 1) {
let value = this.editorText;
let el = this.$refs.textarea;
@@ -362,6 +330,8 @@ export default {
}
} else {
const { talk_type, receiver_id } = this.$store.state.dialogue;
+ console.log(talk_type);
+ console.log(receiver_id);
ServeSendEmoticon({
talk_type,
receiver_id,
diff --git a/im/src/components/layout/WelcomeModule.vue b/im/src/components/layout/WelcomeModule.vue
index 7d2fa6c0..cc9d3e79 100644
--- a/im/src/components/layout/WelcomeModule.vue
+++ b/im/src/components/layout/WelcomeModule.vue
@@ -2,7 +2,6 @@
-
@@ -10,10 +9,10 @@
diff --git a/im/src/im-server/event/talk.js b/im/src/im-server/event/talk.js
index ddc61385..52d487d9 100644
--- a/im/src/im-server/event/talk.js
+++ b/im/src/im-server/event/talk.js
@@ -46,9 +46,9 @@ class Talk extends Base {
this.resource = resource;
// 判断发送者消息是否在当前用户列表中
- if(this.sender_id && !vm.$store.state.talks.items.find(item=>{
+ if (this.sender_id && !vm.$store.state.talks.items.find(item => {
return item.userId == this.sender_id
- })){
+ })) {
// 没有当前用户,未在当前列表 进行重新加载
vm.loadUserSetting('update')
}
@@ -58,7 +58,7 @@ class Talk extends Base {
* 判断消息发送者是否来自于我
* @returns
*/
- isCurrSender() {
+ isCurrSender () {
// console.log("sender_id", this.sender_id);
return this.sender_id == this.getAccountId();
}
@@ -68,7 +68,7 @@ class Talk extends Base {
*
* @return String
*/
- getIndexName() {
+ getIndexName () {
if (this.talk_type == 2) {
return `${this.talk_type}_${this.receiver_id}`;
}
@@ -83,7 +83,7 @@ class Talk extends Base {
*
* @returns
*/
- getFloatType() {
+ getFloatType () {
let userId = this.resource.userId;
if (userId == 0) return "center";
@@ -94,18 +94,21 @@ class Talk extends Base {
/**
* 获取聊天列表左侧的对话信息
*/
- getTalkText() {
+ getTalkText () {
let text = this.resource.content || this.resource.text;
switch (this.resource.msg_type) {
case 'GOODS':
text = "[商品链接]";
break;
+ case 'ORDERS':
+ text = "[订单链接]";
+ break;
}
return text;
}
- handle() {
+ handle () {
let store = this.getStoreInstance();
// console.log("触发handle");
// 判断当前是否在聊天页面
@@ -131,7 +134,7 @@ class Talk extends Base {
* 显示消息提示
* @returns
*/
- showMessageNocice() {
+ showMessageNocice () {
let avatar = this.resource.avatar;
let nickname = this.resource.nickname;
let talk_type = this.resource.talk_type;
@@ -167,7 +170,7 @@ class Talk extends Base {
/**
* 加载对接节点
*/
- addTalkItem() {
+ addTalkItem () {
let receiver_id = this.sender_id;
let talk_type = this.talk_type;
@@ -188,7 +191,7 @@ class Talk extends Base {
/**
* 插入对话记录
*/
- insertTalkRecord() {
+ insertTalkRecord () {
let store = this.getStoreInstance();
let record = this.resource;
// console.log("插入谈话记录", record);
@@ -238,7 +241,7 @@ class Talk extends Base {
/**
* 更新对话列表记录
*/
- updateTalkItem() {
+ updateTalkItem () {
let store = this.getStoreInstance();
store.commit("INCR_UNREAD_NUM");
diff --git a/im/src/plugins/ws-socket.js b/im/src/plugins/ws-socket.js
index 802d0b17..e7516700 100644
--- a/im/src/plugins/ws-socket.js
+++ b/im/src/plugins/ws-socket.js
@@ -65,7 +65,6 @@ class WsSocket {
*/
on (event, callBack) {
// 对应 socket-instance.js
- console.log("事件绑定", event, callBack);
this.onCallBacks[event] = callBack;
return this;
}
diff --git a/im/src/store/modules/talk.js b/im/src/store/modules/talk.js
index 10882241..d52847d4 100644
--- a/im/src/store/modules/talk.js
+++ b/im/src/store/modules/talk.js
@@ -21,7 +21,6 @@ const Talk = {
getters: {
// 过滤所有置顶对话列表
topItems: (state) => {
- console.log(state.items, 'state.items');
return state.items.filter((item) => item.is_top == 1);
},
talkItems: (state) => {
@@ -40,7 +39,6 @@ const Talk = {
mutations: {
// 设置对话列表
SET_TALK_ITEMS (state, resource) {
- console.log("设置对话列表", resource.items);
Vue.set(state, 'items', resource.items)
},
diff --git a/im/src/utils/talk.js b/im/src/utils/talk.js
index 2322882d..b8c12920 100644
--- a/im/src/utils/talk.js
+++ b/im/src/utils/talk.js
@@ -10,7 +10,7 @@ const KEY_INDEX_NAME = "send_message_index_name";
*
* @param {String} index_name
*/
-export function findTalkIndex(index_name) {
+export function findTalkIndex (index_name) {
return store.state.talks.items.findIndex(
(item) => item.index_name == index_name
);
@@ -21,7 +21,7 @@ export function findTalkIndex(index_name) {
*
* @param {String} index_name
*/
-export function findTalk(index_name) {
+export function findTalk (index_name) {
return store.state.talks.items.find((item) => item.index_name == index_name);
}
@@ -30,8 +30,7 @@ export function findTalk(index_name) {
*
* @param {Object} params
*/
-export function formatTalkItem(params) {
- console.log(params);
+export function formatTalkItem (params) {
let options = {
id: "",
disable: false,
@@ -58,7 +57,7 @@ export function formatTalkItem(params) {
* @param {Integer} talk_type 对话类型[1:私聊;2:群聊;]
* @param {Integer} receiver_id 接收者ID
*/
-export function toTalk(talk_type, receiver_id) {
+export function toTalk (talk_type, receiver_id) {
ServeCreateTalkList(receiver_id).then(({ code, data }) => {
console.log("ServeCreateTalkList", data);
if (code == 200) {
@@ -78,7 +77,7 @@ export function toTalk(talk_type, receiver_id) {
*
* @returns
*/
-export function getCacheIndexName() {
+export function getCacheIndexName () {
let index_name = sessionStorage.getItem(KEY_INDEX_NAME);
if (index_name) {
sessionStorage.removeItem(KEY_INDEX_NAME);
diff --git a/im/src/views/message/index.vue b/im/src/views/message/index.vue
index f56f8eba..f5a869ca 100644
--- a/im/src/views/message/index.vue
+++ b/im/src/views/message/index.vue
@@ -80,8 +80,8 @@
{{
- item.remark_name ? item.remark_name : item.name
-}}
+ item.remark_name ? item.remark_name : item.name
+ }}
{{ item.unread }}条未读
@@ -112,8 +112,8 @@
+ index_name != item.index_name && item.draft_text
+ ">
[草稿]
{{ item.draft_text }}
@@ -424,7 +424,6 @@ export default {
this.$nextTick(() => {
if (id == this.index_name.split("_")[1]) {
- console.log("已读");
this.$store.commit("UPDATE_TALK_ITEM", {
userId: id,
index_name: "MESSAGE_" + this.index_name.split("_")[1],
From 7e33598b8e4d76b4d95da1b44c0df8543fc0197b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A8=8B?= <994041296@163.com>
Date: Thu, 12 Jan 2023 14:34:38 +0800
Subject: [PATCH 3/7] =?UTF-8?q?=E5=AE=BD=E5=BA=A6=EF=BC=8C=E8=A1=A8?=
=?UTF-8?q?=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
buyer/src/pages/GoodsDetail.vue | 24 +-
im/src/components/chat/panel/TalkPanel.vue | 3 +
.../chat/panel/template/footPrint.vue | 8 +-
im/src/utils/emojis.js | 238 +++++++++---------
im/src/views/layout/MainLayout.vue | 14 +-
seller/src/views/home/home.vue | 4 +-
6 files changed, 147 insertions(+), 144 deletions(-)
diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue
index 736102a2..929db852 100644
--- a/buyer/src/pages/GoodsDetail.vue
+++ b/buyer/src/pages/GoodsDetail.vue
@@ -81,19 +81,8 @@ export default {
this.$Message.error("请登录后再联系客服");
return;
}
- // window.open(
- // this.IMLink +
- // "?token=" +
- // accessToken +
- // "&id=" +
- // this.goodsMsg.data.storeId +
- // "&goodsId=" +
- // this.goodsMsg.data.goodsId +
- // "&skuId=" +
- // this.goodsMsg.data.id
- // );
window.open(
- 'http://192.168.0.139:8000/' +
+ this.IMLink +
"?token=" +
accessToken +
"&id=" +
@@ -103,6 +92,17 @@ export default {
"&skuId=" +
this.goodsMsg.data.id
);
+ // window.open(
+ // 'http://192.168.0.139:8000/' +
+ // "?token=" +
+ // accessToken +
+ // "&id=" +
+ // this.goodsMsg.data.storeId +
+ // "&goodsId=" +
+ // this.goodsMsg.data.goodsId +
+ // "&skuId=" +
+ // this.goodsMsg.data.id
+ // );
},
// 获取im信息
async getIMDetailMethods () {
diff --git a/im/src/components/chat/panel/TalkPanel.vue b/im/src/components/chat/panel/TalkPanel.vue
index e5f5a787..a85d6c0c 100644
--- a/im/src/components/chat/panel/TalkPanel.vue
+++ b/im/src/components/chat/panel/TalkPanel.vue
@@ -500,6 +500,9 @@ export default {
if (item.messageType == 'GOODS') {
item.text = JSON.parse(item.text)
}
+ if (item.messageType == 'MESSAGE') {
+ item.text = textReplaceEmoji(item.text)
+ }
if (item.messageType == 'ORDER') {
item.text = JSON.parse(item.text)
}
diff --git a/im/src/components/chat/panel/template/footPrint.vue b/im/src/components/chat/panel/template/footPrint.vue
index fcfdf36e..a725727e 100644
--- a/im/src/components/chat/panel/template/footPrint.vue
+++ b/im/src/components/chat/panel/template/footPrint.vue
@@ -51,11 +51,11 @@
@@ -168,7 +168,7 @@ export default {
},
mounted () {
// state.user.toUser
- console.log(this.$store.state.user.toUser, ' this.$store.state.user.toUser this.$store.state.user.toUser this.$store.state.user.toUser');
+ console.log(this.orderList, ' this.$store.state.user.toUser this.$store.state.user.toUser this.$store.state.user.toUser');
this.btnHide = localStorage.getItem('btnHide')
}
}
diff --git a/im/src/utils/emojis.js b/im/src/utils/emojis.js
index 030fda59..5a71fe7e 100644
--- a/im/src/utils/emojis.js
+++ b/im/src/utils/emojis.js
@@ -2,129 +2,129 @@
* 动态表情
*/
const emojis = {
- "[微笑]": "
",
- "[撇嘴]": "
",
- "[色]": "
",
- "[发呆]": "
",
- "[得意]": "
",
- "[流泪]": "
",
- "[害羞]": "
",
- "[闭嘴]": "
",
- "[睡]": "
",
- "[大哭]": "
",
- "[尴尬]": "
",
- "[发怒]": "
",
- "[调皮]": "
",
- "[呲牙]": "
",
- "[惊讶]": "
",
- "[难过]": "
",
- "[酷]": "
",
- "[冷汗]": "
",
- "[抓狂]": "
",
- "[吐]": "
",
- "[偷笑]": "
",
- "[可爱]": "
",
- "[白眼]": "
",
- "[傲慢]": "
",
- "[饥饿]": "
",
- "[困]": "
",
- "[惊恐]": "
",
- "[流汗]": "
",
- "[憨笑]": "
",
- "[大兵]": "
",
- "[奋斗]": "
",
- "[咒骂]": "
",
- "[疑问]": "
",
- "[嘘]": "
",
- "[晕]": "
",
- "[折磨]": "
",
- "[衰]": "
",
- "[骷髅]": "
",
- "[敲打]": "
",
- "[再见]": "
",
- "[擦汗]": "
",
- "[抠鼻]": "
",
- "[鼓掌]": "
",
- "[糗大了]": "
",
- "[坏笑]": "
",
- "[左哼哼]": "
",
- "[右哼哼]": "
",
- "[哈欠]": "
",
- "[鄙视]": "
",
- "[委屈]": "
",
- "[快哭了]": "
",
- "[阴险]": "
",
- "[亲亲]": "
",
- "[吓]": "
",
- "[可怜]": "
",
- "[菜刀]": "
",
- "[西瓜]": "
",
- "[啤酒]": "
",
- "[篮球]": "
",
- "[乒乓]": "
",
- "[咖啡]": "
",
- "[饭]": "
",
- "[猪头]": "
",
- "[玫瑰]": "
",
- "[凋谢]": "
",
- "[示爱]": "
",
- "[爱心]": "
",
- "[心碎]": "
",
- "[蛋糕]": "
",
- "[闪电]": "
",
- "[炸弹]": "
",
- "[刀]": "
",
- "[足球]": "
",
- "[瓢虫]": "
",
- "[便便]": "
",
- "[月亮]": "
",
- "[太阳]": "
",
- "[礼物]": "
",
- "[拥抱]": "
",
- "[强]": "
",
- "[弱]": "
",
- "[握手]": "
",
- "[胜利]": "
",
- "[抱拳]": "
",
- "[勾引]": "
",
- "[拳头]": "
",
- "[差劲]": "
",
- "[爱你]": "
",
- "[NO]": "
",
- "[OK]": "
",
- "[爱情]": "
",
- "[飞吻]": "
",
- "[跳跳]": "
",
- "[发抖]": "
",
- "[怄火]": "
",
- "[转圈]": "
",
- "[磕头]": "
",
- "[回头]": "
",
- "[跳绳]": "
",
- "[挥手]": "
",
- "[激动]": "
",
- "[街舞]": "
",
- "[献吻]": "
",
- "[左太极]": "
",
- "[右太极]": "
",
+ "[微笑]": "
",
+ "[撇嘴]": "
",
+ "[色]": "
",
+ "[发呆]": "
",
+ "[得意]": "
",
+ "[流泪]": "
",
+ "[害羞]": "
",
+ "[闭嘴]": "
",
+ "[睡]": "
",
+ "[大哭]": "
",
+ "[尴尬]": "
",
+ "[发怒]": "
",
+ "[调皮]": "
",
+ "[呲牙]": "
",
+ "[惊讶]": "
",
+ "[难过]": "
",
+ "[酷]": "
",
+ "[冷汗]": "
",
+ "[抓狂]": "
",
+ "[吐]": "
",
+ "[偷笑]": "
",
+ "[可爱]": "
",
+ "[白眼]": "
",
+ "[傲慢]": "
",
+ "[饥饿]": "
",
+ "[困]": "
",
+ "[惊恐]": "
",
+ "[流汗]": "
",
+ "[憨笑]": "
",
+ "[大兵]": "
",
+ "[奋斗]": "
",
+ "[咒骂]": "
",
+ "[疑问]": "
",
+ "[嘘]": "
",
+ "[晕]": "
",
+ "[折磨]": "
",
+ "[衰]": "
",
+ "[骷髅]": "
",
+ "[敲打]": "
",
+ "[再见]": "
",
+ "[擦汗]": "
",
+ "[抠鼻]": "
",
+ "[鼓掌]": "
",
+ "[糗大了]": "
",
+ "[坏笑]": "
",
+ "[左哼哼]": "
",
+ "[右哼哼]": "
",
+ "[哈欠]": "
",
+ "[鄙视]": "
",
+ "[委屈]": "
",
+ "[快哭了]": "
",
+ "[阴险]": "
",
+ "[亲亲]": "
",
+ "[吓]": "
",
+ "[可怜]": "
",
+ "[菜刀]": "
",
+ "[西瓜]": "
",
+ "[啤酒]": "
",
+ "[篮球]": "
",
+ "[乒乓]": "
",
+ "[咖啡]": "
",
+ "[饭]": "
",
+ "[猪头]": "
",
+ "[玫瑰]": "
",
+ "[凋谢]": "
",
+ "[示爱]": "
",
+ "[爱心]": "
",
+ "[心碎]": "
",
+ "[蛋糕]": "
",
+ "[闪电]": "
",
+ "[炸弹]": "
",
+ "[刀]": "
",
+ "[足球]": "
",
+ "[瓢虫]": "
",
+ "[便便]": "
",
+ "[月亮]": "
",
+ "[太阳]": "
",
+ "[礼物]": "
",
+ "[拥抱]": "
",
+ "[强]": "
",
+ "[弱]": "
",
+ "[握手]": "
",
+ "[胜利]": "
",
+ "[抱拳]": "
",
+ "[勾引]": "
",
+ "[拳头]": "
",
+ "[差劲]": "
",
+ "[爱你]": "
",
+ "[NO]": "
",
+ "[OK]": "
",
+ "[爱情]": "
",
+ "[飞吻]": "
",
+ "[跳跳]": "
",
+ "[发抖]": "
",
+ "[怄火]": "
",
+ "[转圈]": "
",
+ "[磕头]": "
",
+ "[回头]": "
",
+ "[跳绳]": "
",
+ "[挥手]": "
",
+ "[激动]": "
",
+ "[街舞]": "
",
+ "[献吻]": "
",
+ "[左太极]": "
",
+ "[右太极]": "
",
};
/**
* 符号表情
*/
const symbol = [
- "😠", "😩", "😲", "😞", "😵", "😰", "😒", "😍", "😤", "😜", "😝", "😋", "😘", "😚", "😷",
- "😳", "😃", "😅", "😆", "😁", "😂", "😊", "☺", "😄", "😢",
- "😭", "😨", "😣", "😡", "😌", "😖", "😔", "😱", "😪", "😏", "😓", "😥", "😫", "😉",
- "✊", "✋", "✌", "👊", "👍", "☝", "👆", "👇", "👈", "👉",
- "👋", "👏", "👌", "👎"
+ "😠", "😩", "😲", "😞", "😵", "😰", "😒", "😍", "😤", "😜", "😝", "😋", "😘", "😚", "😷",
+ "😳", "😃", "😅", "😆", "😁", "😂", "😊", "☺", "😄", "😢",
+ "😭", "😨", "😣", "😡", "😌", "😖", "😔", "😱", "😪", "😏", "😓", "😥", "😫", "😉",
+ "✊", "✋", "✌", "👊", "👍", "☝", "👆", "👇", "👈", "👉",
+ "👋", "👏", "👌", "👎"
];
const emojisKeys = Object.keys(emojis);
export const emojiList = {
- symbol,
- emojis
+ symbol,
+ emojis
}
const regEmoji = emojisKeys.map((value) => '|\\' + value).join('').replace('|', '')
@@ -134,11 +134,11 @@ const regEmoji = emojisKeys.map((value) => '|\\' + value).join('').replace('|',
*
* @param {String} content 需要替换的字符串
*/
-export function textReplaceEmoji(content) {
- if(!content){
- return ""
- }
- return content.replace(new RegExp(`(${regEmoji})`, 'gi'), ($0, $1) => {
- return emojis[$1];
- });
+export function textReplaceEmoji (content) {
+ if (!content) {
+ return ""
+ }
+ return content.replace(new RegExp(`(${regEmoji})`, 'gi'), ($0, $1) => {
+ return emojis[$1];
+ });
}
\ No newline at end of file
diff --git a/im/src/views/layout/MainLayout.vue b/im/src/views/layout/MainLayout.vue
index 0406c1a8..1cb9b102 100644
--- a/im/src/views/layout/MainLayout.vue
+++ b/im/src/views/layout/MainLayout.vue
@@ -72,17 +72,17 @@ export default {
}),
},
watch: {
- unreadNum(n, o) {
+ unreadNum (n, o) {
if (n > 0 && n > o && this.notifyCueTone) {
this.play();
}
},
},
- created() {
+ created () {
this.setApplyNum();
},
methods: {
- play() {
+ play () {
document
.querySelector("#audio")
.play()
@@ -90,10 +90,10 @@ export default {
console.error("消息提示音播放异常");
});
},
- logout() {
+ logout () {
this.$store.dispatch("ACT_USER_LOGOUT");
},
- setApplyNum() {
+ setApplyNum () {
// TODO 暂且return
return;
ServeFindFriendApplyNum().then((res) => {
@@ -108,7 +108,7 @@ export default {