Commit 98ead2f0 authored by xieyishang's avatar xieyishang

addxx

parent f2104302
...@@ -185,6 +185,20 @@ ...@@ -185,6 +185,20 @@
"pid" : "2930", "pid" : "2930",
"parameters" : {} "parameters" : {}
} }
},
"TX-TencentIM" : {
"__plugin_info__" : {
"name" : "腾讯即时通信IM(完整版) qq群933785472 - [试用版,仅用于自定义调试基座]",
"description" : "腾讯im插件致力于让用户轻松接入im功能",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=2615",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 0,
"pid" : "2615",
"parameters" : {}
}
} }
} }
}, },
......
...@@ -419,6 +419,28 @@ ...@@ -419,6 +419,28 @@
"scrollIndicator": "none" "scrollIndicator": "none"
} }
} }
},
{
"path": "pages/chat/chat/chat",
"style": {
"navigationBarTitleText": "会话",
"app-plus": {
"scrollIndicator": "none",
"titleNView": false,
"softinputNavBar": "none",
"softinputMode": "adjustResize"
}
}
},
{
"path": "pages/chat/message/message",
"style": {
"navigationBarTitleText": "消息",
"app-plus": {
"scrollIndicator": "none"
}
}
} }
], ],
"globalStyle": { "globalStyle": {
...@@ -432,12 +454,19 @@ ...@@ -432,12 +454,19 @@
"selectedColor": "#FF6900", "selectedColor": "#FF6900",
"borderStyle": "black", "borderStyle": "black",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [{ "list": [
{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/tabbar/home_onac.png", "iconPath": "static/tabbar/home_onac.png",
"selectedIconPath": "static/tabbar/home_isac.png", "selectedIconPath": "static/tabbar/home_isac.png",
"text": "后台" "text": "后台"
}, },
{
"pagePath": "pages/chat/message/message",
"iconPath": "static/tabbar/xiaoxi_0.png",
"selectedIconPath": "static/tabbar/xiaoxi_1.png",
"text": "客户消息"
},
{ {
"pagePath": "pages/user/reseller/reseller", "pagePath": "pages/user/reseller/reseller",
"iconPath": "static/tabbar/ziji_onac1.png", "iconPath": "static/tabbar/ziji_onac1.png",
......
<template>
<view :style="{paddingTop: statusBarHeight+88+'upx',paddingBottom:scrollInputh+'upx'}">
<!-- 顶部状态栏 -->
<view class="mynavbar " :style="{paddingTop: statusBarHeight+'upx'}">
<view class="mynavbarbox ali-c flex jua-a">
<view @tap="goback" class="breaksbtn ali-c ">
<image class="breakiconss" src="/static/chat/breakiconss2.png" mode=""></image>
</view>
<view class="navbartitle oneline">
<text v-if="type==1">聊天</text>
<view v-else-if="type==2" class="userlistss flex ali-c jus-c">
<view class="itemusers">
<image class="utxs" src="http://m.96weixin.com/Upload/20191231/1577781632254583.jpeg"
mode=""></image>
<view class="utxstag">商家</view>
</view>
<view class="itemusers">
<image class="utxs" src="http://m.96weixin.com/Upload/20191231/1577781632235026.jpeg"
mode=""></image>
<view class="utxstag"></view>
<view class="utxstag">骑手</view>
</view>
</view>
</view>
<view class="mynavbarbtn flex ali-c jus-a">
<view @tap="catphone" class="iconsbtn">
<image class="iconsimg" src="/static/chat/telephony.png" mode=""></image>
</view>
<view @tap="tostorehome" class="iconsbtn">
<image class="iconsimg" src="/static/chat/storeicon.png" mode=""></image>
</view>
</view>
</view>
</view>
<!-- 顶部状态栏end -->
<!-- 单聊 type=1 群聊 type=2 -->
<!-- push 发出 pull 收到 -->
<view class="chatboxtwo" id="list-box" @tap.stop="listboxtap">
<view class="talk-list" >
<view v-for="(item,index) in msgslist" :key="index" :id="`msg-${item.msgId}`">
<view v-if="item.elemType==1" class="item flex_col" :class="item.isSelf == true ? 'push':'pull' ">
<image :src="item.userAvatar" mode="aspectFill" class="pic"></image>
<view>
<view class="contentss">{{item.textElem.msg}}</view>
<view v-if="item.isSelf == true && item.isPeerRead && type==1" class="isread">已读</view>
</view>
</view>
<!-- 2 自定义消息 -->
<view v-if="item.elemType==2 && item.customdata" >
<!-- 1发送的产品消息 -->
<view v-if="item.customdata.type==1" class="item flex_col" :class="item.isSelf == true ? 'push':'pull' ">
<image :src="item.userAvatar" mode="aspectFill" class="pic "></image>
<view class="">
<view class="kjsendproduct goodscard flex" :class="item.isSelf == true ? 'push':'pull' ">
<image class="thumbnails" src="https://kazuma.jxdsy.cn/attachs/2021/09/30/a482f2383fa07efdfc.jpg" mode=""></image>
<view class="showgoodsinfo flex1">
<view class="flex jus-b">
<view class="goods_names twoline flex1">美之魂20年窖酒原价美之魂20年窖酒原价1688一瓶500ml限购价688美之魂20年窖酒原价1688一瓶500ml限购价688</view>
</view>
<view class="isprice flex ali-c jus-b">
<view class="price"><text class="fuhao"></text>688</view>
</view>
</view>
</view>
<view v-if="item.isSelf == true && item.isPeerRead && type==1" class="isread">已读</view>
</view>
</view>
<!-- 2 订单状态通知 -->
<view class="ordernoticebox" v-else-if="item.customdata.type==2">
<view class="msgstime">10-07 09:30</view>
<view class="ordernotice" >
<view class="orderstatit">温馨提示</view>
<view class="ordertextets">您已成功下单,可与商家及骑手在此群联系,快速了解出餐进度及修改备注信息。</view>
</view>
</view>
<view v-else class="item flex_col" :class="item.isSelf == true ? 'push':'pull' ">
<image :src="item.userAvatar" mode="aspectFill" class="pic"></image>
<view>
<view class="contentss">[自定义消息 暂时无法识别]</view>
<view v-if="item.isSelf == true && item.isPeerRead && type==1" class="isread">已读</view>
</view>
</view>
</view>
<!-- 自定义消息end -->
<!-- 图片消息 elemType==3 -->
<view v-if="item.elemType==3" class="item flex_col" :class="item.isSelf == true ? 'push':'pull' ">
<image :src="item.userAvatar" mode="aspectFill" class="pic"></image>
<view class="contentss">
<view class="xiaoxineir" v-if="item.imageElem && item.myimgfile">
<image @tap="showimgdetaile(item)" style="width: 100upx;" class="xiaoxiimgs"
:src="item.myimgfile.path | parsepath" mode="widthFix">
</image>
</view>
<view class="xiaoxineir" v-else-if="item.imageElem.path">
<image @tap="showimgdetaile(item)" class="xiaoxiimgs" style="width: 100upx;"
:src="item.imageElem.path | parsepath" mode="widthFix">
</image>
</view>
<view class="xiaoxineir" v-else-if="item.imageElem.imageList">
<image v-if="item.imageElem.imageList.length!=0" @tap="showimgdetaile(item)"
class="xiaoxiimgs" style="width: 100upx;"
:src="item.imageElem.imageList[0].url | parsepath" mode="widthFix">
</image>
<image v-else class="xiaoxiimgs" style="width: 100upx;"
src="/static/chat/imgloaderr.png" mode="widthFix"></image>
</view>
<view class="xiaoxineir" v-else>
<image class="xiaoxiimgs" style="width: 100upx;" src="/static/chat/imgloaderr.png"
mode="widthFix"></image>
</view>
</view>
</view>
<!-- 语音消息 4 -->
<view v-if="item.elemType==4" class="item flex_col" :class="item.isSelf == true ? 'push':'pull' ">
<image :src="item.userAvatar" mode="aspectFill" class="pic"></image>
<view class="contentss flex">
<text v-if="item.isSelf == true"
class="timess">{{item.soundElem.duration==0?1:item.soundElem.duration}}''</text>
<image @tap="bofangmp3(item)" class="yuyingicons"
:src="mp3msgId==item.msgId?'/static/chat/mp3fileicon1.gif':'/static/chat/mp3fileicon1.png'"
mode=""></image>
<text v-if="item.isSelf == false"
class="timess">{{item.soundElem.duration==0?1:item.soundElem.duration}}''</text>
</view>
</view>
</view>
</view>
</view>
<view class="chatboxinps" id="chatboxinps">
<view class="flex_col lineinputboxs textbox">
<view @tap="taggleisVoice" class="leftnavicons">
<image v-if="!isVoice" class="icons2" src="/static/chat/voice.png" mode=""></image>
<image v-if="isVoice" class="icons2" src="/static/chat/keyboard.png" mode=""></image>
</view>
<view v-if="!isVoice" class="flex_grow inputcontentss">
<textarea placeholder-class="" class="uni-input contentss pt-10" style="width: auto;"
cursor-spacing="10" placeholder="请输入聊天内容" v-model="content" @focus="textareaFocus" />
</view>
<view class="info-words voice-mode" v-show="isVoice"
style="font-size: 28upx;padding: 10upx 30upx;border-bottom: 1px solid #EEEEEE;"
@touchstart="voiceBegin" @touchmove.stop.prevent="voiceIng" @touchend="voiceEnd">{{voiceTis}}</view>
<view class="rightnavicons flex ali-c">
<image @tap="tagglecamera(1)" class="icons2" src="/static/chat/expression.png" mode=""></image>
<image @tap="tagglecamera(2)" class="icons2" src="/static/chat/quick.png" mode=""></image>
<image @tap="tagglecamera(3)" v-show="content==''" class="icons2" src="/static/chat/allicons.png"
mode=""></image>
<button v-show="content!=''" class="send" @tap="send">发送</button>
</view>
<!-- 发送产品消息 -->
<view v-if="isshowtisgoods" class="kjsendproduct abso flex">
<image class="thumbnails" src="https://kazuma.jxdsy.cn/attachs/2021/09/30/a482f2383fa07efdfc.jpg" mode=""></image>
<view class="showgoodsinfo flex1">
<view class="flex jus-b">
<view class="goods_names twoline flex1">美之魂20年窖酒原价美之魂20年窖酒原价1688一瓶500ml限购价688美之魂20年窖酒原价1688一瓶500ml限购价688</view>
<image @tap="imcleargoods" class="imclearicon" src="/static/chat/imclearicon.png" mode=""></image>
</view>
<view class="isprice flex ali-c jus-b">
<view class="price"><text class="fuhao"></text>688</view>
<view @tap="sendC2CCustomMessagefun(1)" class="sendgoodsbtn">发送给客服</view>
</view>
</view>
</view>
</view>
<view v-if="showcamera" class="popup-layer dibuboxss " @touchmove.stop.prevent="discard" >
<!-- 表情 -->
<swiper v-if="showtype==1" class="emoji-swiper" indicator-dots="true" duration="150">
<swiper-item v-for="(page,pid) in emojiList" :key="pid">
<view v-for="(em,eid) in page" :key="eid" @tap="addEmoji(em)">
<!-- #ifndef APP-PLUS -->
<image mode="widthFix" :src="em.url"></image>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<text class="s50">{{em.alt}}</text>
<!-- #endif -->
</view>
</swiper-item>
</swiper>
<!-- 常用语 -->
<view v-if="showtype==2" class="commonwords">
<view class="scrollviewh" >
<scroll-view class="" :scroll-x="true" :scroll-y="true" >
<view style="height: 42vw;">
<view @tap="shendkjy(item)" v-for="(item,index) in commonwords" :key="index" class="cyyitems">{{item.name}}</view>
</view>
</scroll-view>
</view>
</view>
<view v-if="showtype==3" class="more-layer">
<view class="list operation_foots flex ali-c jus-a">
<view @tap="chooseImagefun(1)" class="xitonnavitem">
<image class="navimgs" src="/static/chat/xiangjiicon.png"
mode=""></image>
<view class="navnames">打开相机</view>
</view>
<view @tap="chooseImagefun(2)" class="xitonnavitem">
<image class="navimgs" src="/static/chat/xiangce.png"
mode=""></image>
<view class="navnames">打开相册</view>
</view>
</view>
</view>
</view>
<!-- 录音UI效果 -->
<view class="record" :class="recording?'':'hidden'">
<view class="ing" :class="willStop?'hidden':''">
<view class="icon luyin2"></view>
</view>
<view class="cancel" :class="willStop?'':'hidden'">
<view class="icon chehui"></view>
</view>
<view class="tis" :class="willStop?'change':''">{{recordTis}}</view>
</view>
<!-- 录音UI效果end -->
</view>
</view>
</template>
<script>
/**
* elemType
消息值 含义
1 文本消息
2 自定义消息
3 图片消息
4 语音消息
5 视频消息
6 文件消息
7 地址位置消息
8 表情消息
9 群 Tips 消息
*
* */
let txIm = {};
// #ifdef APP-PLUS
txIm = uni.requireNativePlugin('TX-TencentIM');
// #endif
import commen from "@/utils/commen.js";
let innerAudioContext = {
stop: () => {}
};
export default {
components: {
},
filters: {
parsepath(val) {
if (val == null || val == undefined) {
return "/static/chat/imgloaderr.png";
}
if (val.indexOf('http') != -1) {
return val;
}
var urls = 'file://' + String(val);
return urls;
},
},
data() {
return {
statusBarHeight: 0,
talkList: [],
content: '',
type: '', //1单聊 2群聊
userId: '', //对方的用户id
groupId: '', //群聊id
groupInfodata: {}, //群信息
qunmembers: [], //群成员
showcamera: false,
showtype: 1, //1表情 2快捷常用语 3相机
emojiList: commen.emojiList, //表情列表
currentMsgId: "", //最后一条消息的ID 用于获取更多最新的消息
//语音消息
//录音相关参数
// #ifndef H5
//H5不能录音
RECORDER: uni.getRecorderManager(),
// #endif
isVoice: false,
voiceTis: '按住 说话',
recordTis: "手指上滑 取消发送",
recording: false,
willStop: false,
initPoint: {
identifier: 0,
Y: 0
},
recordTimer: null,
recordLength: 0,
mp3msgId: "", //正在播放的语音消息id
scrollInputh: 0, //底部的高度
commonwords:[
{name:"请问门店位置在哪?"},
{name:"请问营业时间是几点到几点?"},
{name:"请问有什么优惠活动吗?"},
{name:"请问你们店铺支持配送吗?"},
{name:"你好,微辣谢谢"},
{name:"你好,我不吃香菜"},
],
isshowtisgoods:true,//是否显示提示产品
}
},
computed: {
//单聊消息列表
msgslist() {
if(this.type==1){
return this.$store.state.msgslist;
}else if(this.type==2){
return this.$store.state.qunmsgslist;
}
},
},
watch: {
msgslist() {
if(this.type==1){
this.ToTheBottom();
this.markC2CMessageAsReadfun();
}else if(this.type==2){
this.ToTheBottom();
this.markGroupMessageAsRead();
}
}
},
onLoad(options) {
setTimeout(() => {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight * 2;
}, 10)
this.type = options.type;
this.userId = options.userId;
this.groupId = options.groupId;
//单聊
if (this.type == 1) {
this.$store.commit("setdfuserId", this.userId); //修改正在聊天的用户id
this.baseloadmsg();
} else if (this.type == 2) {
this.$store.commit("SetgroupId", this.groupId); //修改正在聊天的用户id
this.baseloadmsg(); //获取群历史消息
this.getGroupsInfofun(); //获取群信息
this.getGroupMemberListfun(); //获取群成员
}
//处理语音消息
setTimeout(() => {
//发送语音消息
this.RECORDER.onStart((e) => {
//开始发送语音消息
this.recordBegin(e);
})
//录音结束事件
this.RECORDER.onStop((e) => {
//结束发送语音消息
this.recordEnd(e);
})
}, 2000)
},
mounted() {
},
onHide() {
innerAudioContext.stop(); //结束语音播放
this.mp3msgId = "";
},
onUnload() {
innerAudioContext.stop(); //结束语音播放
this.mp3msgId = "";
//删除缓存消息
//......
},
onPageScroll(e) {
if (e.scrollTop < 5) {
this.getHistoryMsg();
}
},
methods: {
//发送快捷语
shendkjy(item){
this.content = item.name;
this.send();
this.showcamera = false;//关闭常用语选择
},
//通用加载更多消息
baseloadmsg() {
//单聊
if (this.type == 1) {
this.$store.dispatch("getC2CHistoryMessageList", {
msgId: this.currentMsgId
}).then((res) => {
this.ToTheBottom();
});
} else if (this.type == 2) {
this.$store.dispatch("getGroupHistoryMessageList", {
msgId: this.currentMsgId
}).then((res) => {
this.ToTheBottom();
}); //获取群历史消息
}
},
//语音和文字输入切换
taggleisVoice() {
this.isVoice = !this.isVoice;
if (!this.isVoice) {
// this.tagglecamera();
}
},
tagglecamera(type) {
this.showtype = type;
this.showcamera = !this.showcamera;
if (this.showcamera) {
if(type==1 || type==2){
this.isVoice = false;
}
this.getscrollviewmain();
} else {
this.scrollInputh = 0;
this.ToTheBottom();
}
},
//空白位置被点击
listboxtap(e){
console.info(e,"空白位置被点击");
this.showcamera = false;
this.scrollInputh = 0;
// this.ToTheBottom();
},
//输入框获取到焦点
textareaFocus() {
this.showcamera = false;
this.imcleargoods();
},
imcleargoods(){
this.isshowtisgoods = false;//关闭提示产品
},
//测试删除消息
delmsg() {
txIm.deleteMessages({
"msgIdList": ["144115232869100554-1633600403-30701550",
"144115232869100554-1633599731-4275448668", "144115232869100554-1633599558-3175235063"
]
}, result => {
//消息删除成功
})
},
discard(e) {
console.info("666",e);
return;
},
//页面置底
ToTheBottom() {
setTimeout(() => {
uni.pageScrollTo({
scrollTop: 9999999999, // 设置一个超大值,以保证滚动条滚动到底部
duration: 0
});
}, 1000)
},
// 获取历史消息
getHistoryMsg() {
},
// 拼接历史记录消息,正式项目可替换为请求历史记录接口
joinHistoryMsg() {
},
// 设置页面滚动位置
setPageScrollTo(selector) {
let view = uni.createSelectorQuery().in(this).select(selector);
view.boundingClientRect((res) => {
uni.pageScrollTo({
scrollTop: res.top - 30, // -30 为多显示出大半个消息的高度,示意上面还有信息。
duration: 0
});
}).exec();
},
// 发送信息
send() {
if (!this.content) {
uni.showToast({
title: '请输入有效的内容',
icon: 'none'
})
return;
}
uni.showLoading({
title: '正在发送'
})
if (this.type == 1) {
//单聊
let user = this.userId;
txIm.sendC2CTextMessage({
"textMsg": this.content,
"userId": user,
"title": "新消息",
"desc": this.content,
"ext": this.content
}, result => {
//发送成功
this.currentMsgId = result.msgId;
uni.hideLoading();
// 清空内容框中的内容
this.content = '';
//后面要改
this.baseloadmsg(); //获取单聊历史消息
});
} else if (this.type == 2) {
//群聊
//发送群文本消息
txIm.sendGroupTextMessage({
"textMsg": this.content,
"groupId": this.groupId,
"priority": 0
}, result => {
//群消息获取成功
uni.hideLoading();
// 清空内容框中的内容
this.content = '';
this.currentMsgId = result.msgId;
this.baseloadmsg(); //获取群历史消息
})
}
},
//获取群信息
getGroupsInfofun() {
this.$store.dispatch("getGroupsInfo", {}).then((res) => {
if (res.groupInfoList.length != 0) {
this.groupInfodata = res.groupInfoList[0];
console.info("群信息", this.groupInfodata);
}
});
},
//获取群成员列表
getGroupMemberListfun() {
this.$store.dispatch("getGroupMemberList", {}).then((res) => {
console.info("群成员", res);
this.qunmembers = res.members;
});
},
//打电话
catphone() {
console.info('打电话');
},
//进入店铺主页
tostorehome() {
console.info('进入店铺主页');
},
//返回上一页
goback() {
uni.navigateBack({})
},
//选中表情后 加入输入框内
addEmoji(emgi) {
this.content += emgi.alt;
},
//发送图片消息 选择图片
chooseImagefun(type) {
// #ifdef H5
this.$api.msg("H5暂不支持图片消息");
return false;
// #endif
//type 1 相机 2 相册
//album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
let sourceType = type == 1 ? "camera" : "album";
uni.chooseImage({
count: 6,
sourceType: [sourceType],
success: (res) => {
//----------循环发送图片 开始------------------
for (let i = 0; i < res.tempFilePaths.length; i++) {
// var imgPath = res.tempFilePaths[0];
var imgPath = res.tempFilePaths[i];
let tempFilePaths = res;
//#ifdef APP-PLUS
let imagePath = plus.io.convertLocalFileSystemURL(imgPath); //原始路径
if (this.type == 1) {
//发送图片消息方法 (单聊)
txIm.sendImageMessage({
"path": imagePath, //这个要传 ?
"userId": this.userId,
}, result => {
if (result.progress == 100) {
//图片发送成功
this.currentMsgId = result.msgId;
//重新获取消息
this.baseloadmsg(); //获取单聊历史消息
} else {
//result发送图片怎么样了
}
//刷新消息...
});
} else if (this.type == 2) {
//发送群聊图片消息
txIm.sendImageMessage({
"path": imagePath,
"groupId": this.groupId
}, result => {
if (result.progress == 100) {
//群聊图片消息发送完成
this.currentMsgId = result.msgId;
this.baseloadmsg(); //获取群历史消息
} else {
//result发送图片怎么样了
}
});
}
// #endif
}
//----------循环发送图片 结束------------------
}
});
},
// 发送图片消息end
//查看图片消息
showimgdetaile(item) {
try {
console.info("item111 查看图片消息", item);
let url = "";
// #ifndef APP-PLUS
if (item.payload.imageInfoArray) {
url = item.payload.imageInfoArray[0].url
};
// #endif
// #ifdef APP-PLUS
//两种形式的图片
//item.imageElem.path
//item.imageElem.path
if (item.imageElem) {
// this.$api.msg("1");
// return false;
if (item.imageElem.path) {
if (item.imageElem.path.indexOf("http") != -1) {
url = item.imageElem.path;
} else {
url = "file://" + item.imageElem.path;
}
}
}
if (item.myimgfile) {
if (item.myimgfile.path) {
if (item.myimgfile.path.indexOf("http") != -1) {
url = item.myimgfile.path;
} else {
url = "file://" + item.myimgfile.path;
}
}
}
// #endif
uni.previewImage({
urls: [url],
});
} catch (err) {
this.$api.msg(String(err))
}
},
// 查看图片end
//APP 设置消息未已读
markC2CMessageAsReadfun() {
txIm.markC2CMessageAsRead({
"userId": this.userId,
}, result => {
//APP单聊消息设置已读成功
})
},
//设置群里为已读
markGroupMessageAsRead() {
txIm.markGroupMessageAsRead({
"groupId": this.groupId
}, result => {
//群聊消息设置已读成功
})
},
//----------------------语音消息-----------------------------
//录音开始UI效果
recordBegin(e) {
this.recording = true;
this.voiceTis = '松开 结束';
this.recordLength = 0;
this.recordTimer = setInterval(() => {
this.recordLength++;
}, 1000)
},
// 录音被打断
voiceCancel() {
this.recording = false;
this.voiceTis = '按住 说话';
this.recordTis = '手指上滑 取消发送'
this.willStop = true; //不发送录音
this.RECORDER.stop(); //录音结束
},
// 录音开始
voiceBegin(e) {
if (e.touches.length > 1) {
return;
}
this.initPoint.Y = e.touches[0].clientY;
this.initPoint.identifier = e.touches[0].identifier;
this.RECORDER.start({
format: "mp3"
}); //录音开始,
},
// 录音中(判断是否触发上滑取消发送)
voiceIng(e) {
if (!this.recording) {
return;
}
let touche = e.touches[0];
//上滑一个导航栏的高度触发上滑取消发送
if (this.initPoint.Y - touche.clientY >= uni.upx2px(100)) {
this.willStop = true;
this.recordTis = '松开手指 取消发送'
} else {
this.willStop = false;
this.recordTis = '手指上滑 取消发送'
}
},
//录音结束(回调文件) 结束语音
recordEnd(e) {
//录音结束(回调文件) 结束语音
clearInterval(this.recordTimer);
if (!this.willStop) {
console.log("e: " + JSON.stringify(e));
let eee = e;
//#ifdef APP-PLUS
let msg = {
length: 0,
url: e.tempFilePath,
upurl: plus.io.convertLocalFileSystemURL(e.tempFilePath)
}
// #endif
//#ifndef APP-PLUS
let msg = {
length: 0,
url: e.tempFilePath,
upurl: e.tempFilePath, //不是app不用
}
// #endif
let min = parseInt(this.recordLength / 60);
let sec = this.recordLength % 60;
min = min < 10 ? '0' + min : min;
sec = sec < 10 ? '0' + sec : sec;
// msg.length = min+':'+sec;
msg.length = this.recordLength;
//把发送的消息同步到数据库
// #ifdef APP-PLUS
let obj = {};
if (this.type == 1) {
//单聊
obj.userId = this.userId;
} else if (this.type == 2) {
//群聊
obj.groupId = this.groupId;
}
//发送语音消息
txIm.sendSoundMessage({
"path": msg.upurl,
...obj,
"duration": msg.length
}, result => {
//同步消息
if (result.code == 0) {
//发送语音消息完成
this.currentMsgId = result.msgId;
this.baseloadmsg();
}
});
// #endif
} else {
this.$api.msg("取消发送录音");
}
this.willStop = false;
},
// 结束录音
voiceEnd(e) {
if (!this.recording) {
return;
}
this.recording = false;
this.voiceTis = '按住 说话';
this.recordTis = '手指上滑 取消发送'
this.RECORDER.stop(); //录音结束
},
//播放mp3 APP的
bofangmp3(item) {
console.info("播放语音!~");
console.info("url", item);
let url = '';
if(item.mp3file){
url = item.mp3file.path;
}
if(item.SoundUrl){//网络资源
url = item.SoundUrl.url;
}
let mp3url = "";
if (url.indexOf("http") != -1) {
//连接
mp3url = url;
} else {
mp3url = "file://" + String(url);
}
console.log("=====testClick=====");
let src = mp3url;
console.log("=====testClick=====", src);
if (item.payload) {
if (item.payload.remoteAudioUrl) {
src = item.payload.remoteAudioUrl
}
}
console.log("=====testClick=====", src);
innerAudioContext.stop();//结束之前的播放
if(this.mp3msgId){
console.info("正在播放中 结束播放");
this.mp3msgId = "";
return false;
}
innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
innerAudioContext.src = src;
innerAudioContext.onPlay(() => {
//开始播放
// #ifdef APP-PLUS
this.mp3msgId = item.msgId;
// #endif
// #ifndef APP-PLUS
this.mp3msgId = item.ID;
// #endif
});
innerAudioContext.onError((res) => {
//播放错误
this.mp3msgId = "";
// this.$api.msg("消息文件已经丢失");
});
innerAudioContext.onEnded((res) => {
//播放完成
this.mp3msgId = "";
});
},
//----------------------语音消息 end-----------------------------
//获取消息的高度
getscrollviewmain() {
setTimeout(() => {
let view = uni.createSelectorQuery().select(".chatboxinps");
view.boundingClientRect((data) => {
//获取固定尾部的高度=data.height
// that.style.footViewHeight = data.height
console.info(" data.height11", data.height);
this.scrollInputh = data.height * 2 + 20;
this.ToTheBottom();
}).exec();
}, 500)
},
//发送自定义消息
sendC2CCustomMessagefun(sendtype){
/**
* type
* 1.发送产品信息
* 2.订单结束消息 不可在聊天
* 3.邀请用户去评价消息
*
* */
console.info("eee",sendtype);
let objcan = {};
let sendstr = "";
if(sendtype==1){
objcan.goods_id = 0;
objcan.shop_id = 0;
objcan.type = sendtype;
sendstr = JSON.stringify(objcan);
}else if(sendtype==2){
objcan.type = sendtype;
objcan.order_id=0;//订单id
objcan.order_status = 0;//状态
objcan.ordertype = 1;//区分商城还是外卖
sendstr = JSON.stringify(objcan);
}
//转成字符串格式 两种格式 一种是字符串格式 一种是字符串json
var parsestar = "";
for(var i in objcan ){
parsestar+=(i+'|'+objcan[i]+';');
}
if(this.type==1){
//发送单聊自定义消息
txIm.sendC2CCustomMessage({"customMsg":String(sendtype),"userId":this.userId,desc:sendstr,extension:parsestar},result=>{
if(result.code==0){
console.log(result,"发送单聊自定义消息成功");
this.currentMsgId = result.msgId;
this.baseloadmsg();
}
});
}else if(this.type==2){
//发送群自定义消息
txIm.sendGroupCustomMessage({"customMsg":String(sendtype),"groupId":this.groupId,"priority":0,desc:sendstr,extension:parsestar},result=>{
if(result.code==0){
console.log(result,"发送群聊自定义消息成功");
this.currentMsgId = result.msgId;
this.baseloadmsg();
}
})
}
}
}
}
</script>
<style lang="scss">
@import "./global.scss";
</style>
/* 根元素样式 设置页面背景、字体大小、字体颜色,字符间距、长单词换行 */
@font-face {font-family:"HMfont-home";src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAn8AAsAAAAAE1wAAAmvAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFDAqWYJI9ATYCJANACyIABCAFhFUHgV8bThBRlFFWNdkXBXbDsSFQq221McNWrxUbYqGhiTju98MTeXqNh/9fo90388cEMe0bwSOJRIjavZIgESqnE5J5JqQVDZH/XdNfoHSAjqKqRsA+Tf/Ruya33E/bkdHsJtycY2XWAGbM5oenzf173A3lHrEilsmMbu74Y5VmYtxpgza9DMxkWL0gfjGbGRE54AL2f2ut3h2u8Q7RaZRCjDPLIv8cfAUR30MtEUWbSReVJkk0RB4lWWkNg7WVA1sBKmIUdr0uzibQOmxA4vrWwQXkJUweKHPfdwXkA+FSik2o1aVizyTegEKdvWINwGv59bEGY9GeTJFjW95pswIrzz3LYi//0O4JEaDrY3DZjxwXgUR8V3IfIeXARaloVRXT3mK/tsi3LubcJfese8l96Xbd1l1ve2z7eJp5lv3zB7URSdJNYd3Dfm7UUxxkGu0sLFcbVEa5pP3D6/QmokQw3OGzfJp/2kBkLJYQDYuziJbFJUSweIkoWXQRNYuEGFi0BLzFOhAjS4+InKUPRGI5I2a+kg7VSWUGoXoos2BNmGIWexwFroD8IUD6C1A9lYp8F3ClwsFgcgPdNpN08v1czkEOJ4aeieaC3QyVfb9PX2kbn9/0CwTeNAm79H1Kc2x3i9C7LcEZtMSLfE6T4aM+YWOm06dZ5cm9I+xoYw+rqGlScKKlHytu9h6Dw0E5nXK7nbTZknT1jFldR9cuzNMz9Srf7FydqpYW5mRr6Dq1OC9HqzYzoiw1cjohV2tX1Ji1K9bSdVkEbaxS1xQwpmpVpUFheyyzPyGdbXKHexkByib+vtgeK1X75xKqWl+grUNIbRZDXT31tBMiPZAyF0KmniCQhSgACkh5+gIxtvTS/si+VjbAuY6SMdCzbqInzwkjk5ENzMCkNv+ghQQ0qSSAUGmAMQoBozoAIrUe6qpzM+tma1T1jDgvVzdBWcIcLT170njGQU3cCpnUTSdkHH3ltwPHpKotTIP6HH12Lvd4czCWgbJYhY1U5ddlTCICSs1is0in8tXExk7VVRuMQhIQGgOtFcolPmMkIqDVduTGEOn1jI4gFERmSUsv3rGmoKUEQLITLUyzqpFukq8T6U+omVQsT8XHxsnipPEyBAlKNmkNMlMJgOT5Tpsoo2RGP3lOTQyk5GRBgJKw2WQsarWzSa1aLF/+UBk2PkA3wEkBM/RwOLJ0ORWiVCR3YYAAFyIlAdaNqEnmh0sTqOsAq97R85Jt+HGHrNKWgDHmxOPxumKmRGzudayPtogu9D2Zx688C3D6XJSgpgF6MJbomdtyOYBgcXOGSgMAPXqy+F11pMYHlFLCkkKM0S1T+U5SN0Ynh39SxcxmTPNHrTFIuieyxYgZXSDUAPpLLT2ZciVvihOh05k+JIAjoL7HtNsVFc5Rl+1hgAAIlNqGX3GEK0llMm0nZUdmhQzymg3Q9j6yO4FQsmqtQbXmZ+z+sOynUrt3nmbeXu3MYW9f8y38128LpWAVeyLMz4cTORbEDPYKHU19Oyx0OF12GIhfEx+/RRIm2RzPeIPE2yYRM7HBWBx+GvANWXAlMYcmWriz1/Tt2bk+jq7CdOzMu5zsn3zZXwg2Gu14YCBuh3NggN0DI8BbJpCXZb2I4xh+kdAmbU0IA6HYquya81nqYSk87Xgi35ur4HnxZWEvnoLrzbOEjHmJiY2JjV6I8c4ynSEsJTKcHxuWYPRFFleV2Sbi0Dsk4XmDSToXTMnUnW/PW9J9W4UCgP+h0rTi9tiJd6qQgk2lPI/KKeybAPx+c7vZHdimbruzyCP9iZvd0VuBuIniuXirHQ8oG2IThFIUI8QOhjfNMg86GH4Bv4ixLlr4BDi2wDDwXTYYTgfnBJur1nAw2yGngw96JhQo+48cMWVE8kWwcA55ZuzwkSP/mpp9D6wFm2e1Bc8cPVraL2Ng7y6KfSNHqQfTYByYMmbT73WNmwZs6m8sBR54XCndTHwvu6v+8N+Jze9/jeGd8bpoHePtMv0/9U6e78bTtf+aly55P40cNtJ3PH3U6xQ9DkRNos+Chp2TpNwX4lZOwkTa4nOLPxpMLc8Sm0srSwD6Y1KW7ftPZ68x3DWS8d4cJbAKE6QJEfRrhAafMLV0RoCRLhKdBaJzNtzPD7dxLIgZ7Al4006exyHEYXMewjqApFokPRIu9FvLiPf96uWlpuZmRZKiH1i0OCNj1ar7zSDqYiRbCQsMrKUXZswxBkQEbCmv2RJgKK82+UcGbpk+0woVSxekQrYCzp4Hk30E3oHhAh+4fLcOPCfzOVu3cvKkHAWzNAVyjAyOQsrJix47n0OZpbTUDKdJp8CZs+BkAKfMnDkF+kJmmrcN4OSZs8CRuwZ+N76gampCxtj83XWO5X1GYc7hIypq+N32eTe6Wr/GfXW5GukBLnvJ1gEPhlmsuUHzg3Osp/vJCZ4flGsFf27fjV18spjdTfQUuVANcgldRA3hKhSUutCGgGhDaMo0tXMHwiUq3gG5entO2xmnECa3H53AjRpKFFYIK7qrHjMJ75sEC91BPlGc0TlZY9qlsdcuZaXy0D3hfz4cmLd2WzbK3Xhhdw7c2VLCxtxsFCMEo8bArEww9ruOrc5joK9g1xp85MghQ4wyuPV71+/tMVxAMmzA1lSt+WmbjFkwL/lV6az7APzZ5qvVmmy7b1bJGrTDhmRfMBYbWMZmNOu3bJdPlLL/5WOR2XZCTJpmU4mx8lv9Fg76T8NagO4vUacJ+n/Sr0b/LYb8+1z5QCb935a0m6WWYXzwh4DO2Sa9g2jEnJ6tYwTU5jp7N2RmaHkn/gjEb/fXpmpXbkpAGaAv7pnKAfdc6bg4GZx1L3QuQ8lVC3BvXbC8f2eHQEqkBuc9aO6h9849M3oPucrgAyQY/HEv7PYJJQy23Ft3/R+xczqmsHWDgrDCyzfcl1o5ehKxnUOr5Bm6NhTGR4u1rtDEvlZ8dGgklLeNCk3ZbeKaO0bkcMfoKt+6ng/DUPPI6AAlDXlE0dzwsKPadkjqKjDXGEgg4b2CK7vx65M0xSlPmNsOA58/g1xWSDDKeq/KV5AR89+zc6OGjKSKtxUqR4NtF47VuMZemcTBDQxGqzqqrXIMCnm2xkXq1QJIIkO8EpmROcOkIyevYmhUqurWBmgCe4U5WJFHiiLKqKKOJtrooo8hxphihl6g5bGv3MAXkfBvPaFbVq6ga4Uq+wWdEfo6NVTmr1oVkYoye2NvfCWLmYQx0sjozFSxszhZ4Ctjb7QtavLQDNa0L5HRZQYJYxrNLbJR4QhZvOV46Fm/lqB428nsrJSx/OwbEgYA') format('woff2');}
.icon {
font-family:"HMfont-home" !important;
font-size:56upx;
font-style:normal;
color: #333;
&.biaoqing:before {
content: "\e797";
}
&.jianpan:before {
content: "\e7b2";
}
&.yuyin:before {
content: "\e805";
}
&.tupian:before {
content: "\e639";
}
&.chehui:before {
content: "\e904";
}
&.luyin:before {
content: "\e905";
}
&.luyin2:before {
content: "\e677";
}
&.other-voice:before {
content: "\e667";
}
&.my-voice:before {
content: "\e906";
}
&.hongbao:before {
content: "\e626";
}
&.tupian2:before {
content: "\e674";
}
&.paizhao:before {
content: "\e63e";
}
&.add:before {
content: "\e655";
}
&.close:before {
content: "\e607";
}
&.to:before {
content: "\e675";
}
}
page {
background-color: #f3f3f3;
font-size: 28rpx;
box-sizing: border-box;
color: #333;
letter-spacing: 0;
word-wrap: break-word;
}
/* 设置常用元素尺寸规则 */
view,textarea,input,label,form,button,image{box-sizing: border-box;}
/* 按钮样式处理 */
button{font-size: 28rpx;}
/* 取消按钮默认的边框线效果 */
button:after{border:none;}
/* 设置图片默认样式,取消默认尺寸 */
image{display: block;height: auto;width: auto;}
/* 输入框默认字体大小 */
textarea,input{font-size: 28rpx;};
/* 列式弹性盒子 */
.flex_col {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
align-content: center;
}
/* 行式弹性盒子 */
.flex_row {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: flex-start;
align-content: flex-start;
}
/* 弹性盒子弹性容器 */
.flex_col .flex_grow{width:0;flex-grow: 1;}
.flex_row .flex_grow{flex-grow: 1;}
/* 弹性盒子允许换行 */
.flex_col.flex_wrap{flex-wrap: wrap;}
/* 弹性盒子居中对齐 */
.flex_col.flex_center,.flex_row.flex_center{justify-content: center;}
/* 列式弹性盒子两端对齐 */
.flex_col.flex_space{justify-content: space-between;}
/* 弹性盒子快速分栏 ,这里非常郁闷 uniapp 居然不支持 * 选择器 */
.flex_col.flex_col_2>view{width: 50%;}
.flex_col.flex_col_3>view{width: 33.33333%;}
.flex_col.flex_col_4>view{width: 25%;}
.flex_col.flex_col_5>view{width: 20%;}
.flex_col.flex_col_6>view{width: 16.66666%;}
/* 字体颜色 */
.color_333 {color: #333;}
.color_666 {color: #666;}
.color_999 {color: #999;}
.color_ccc {color: #ccc;}
.color_fff {color: #fff;}
.color_6dc{color: #6dca6d;}
.color_d51{color: #d51917;}
.color_09f{color: #0099ff;}
/* 背景色*/
.bg_fff{background-color: #ffffff;}
/* 字体大小 */
.size_10 {font-size: 20rpx;}
.size_12 {font-size: 24rpx;}
.size_14 {font-size: 28rpx;}
.size_16 {font-size: 32rpx;}
.size_18 {font-size: 36rpx;}
.size_20 {font-size: 40rpx;}
/* 字体加粗 */
.font_b{font-weight: bold;}
/* 对齐方式 */
.align_c{text-align: center;}
.align_l{text-align: left;}
.align_r{text-align: right;}
/* 遮罩 */
.shade{
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0,0,0,0.8);
z-index: 100;
}
/* 弹窗 */
.shade_box{
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
z-index: 101;
min-width: 200rpx;
min-height: 200rpx;
}
page{
background-color: #F3F3F3;
font-size: 28rpx;
}
/* 加载数据提示 */
.tips{
position: fixed;
left: 0;
top:var(--window-top);
width: 100%;
z-index: 9;
background-color: rgba(0,0,0,0.15);
height: 72rpx;
line-height: 72rpx;
transform:translateY(-80rpx);
transition: transform 0.3s ease-in-out 0s;
&.show{
transform:translateY(0);
}
}
.chatboxtwo{
width: 100%;
height: auto;
padding-bottom: 100rpx;
box-sizing: content-box;
/* 兼容iPhoneX */
margin-bottom: 0;
margin-bottom: constant(safe-area-inset-bottom);
margin-bottom: env(safe-area-inset-bottom);
}
.lineinputboxs{
padding: 8upx !important;
height: 84upx;
position: relative;
.inputcontentss{
width: 420upx;
}
.leftnavicons{
.icons2{
margin-right: 10upx;
width: 50upx;
height: 50upx;
}
}
.rightnavicons{
margin-left: 10upx;
height: 84upx;
.icons2{
width: 50upx;
height: 50upx;
margin-right: 15upx;
}
.icons2:last-child{
margin-right: 0;
}
}
}
.kjsendproduct.abso{
position: absolute;
width: 710upx;
}
.kjsendproduct{
width: 550upx;
height: 200upx;
margin: 20upx;
margin-top: 0;
border-radius: 30upx;
padding: 20upx;
background-color: #fff;
box-shadow: 0px 1upx 30upx 0px rgba(0,0,0 ,0.1);
top: -240upx;
left: 0;
.thumbnails{
width: 160upx;
height: 160upx;
border-radius: 14upx;
}
.showgoodsinfo{
margin-left: 20upx;
.goods_names{
margin-right: 80upx;
color: #000000;
font-size: 28upx;
}
.imclearicon{
width: 40upx;
height: 40upx;
}
.isprice{
margin-top: 20upx;
.price{
color: #F64f15;
font-size: 28upx;
.fuhao{
font-size: 30upx;
}
}
.sendgoodsbtn{
height: 60upx;
line-height: 60upx;
padding: 0 20upx;
text-align: center;
background-color: #F64f15;
color: #fff;
font-size: 24upx;
border-radius: 30upx;
}
}
}
}
.goodscard{
position: relative;
top: 0;
background-color: #FFFFFF;
.showgoodsinfo .goods_names{
margin-right: 0;
}
}
//自定义消息的两个方向
.push.goodscard::after {
content: '';
display: block;
width: 0;
height: 0;
border-top: 16rpx solid transparent;
border-bottom: 16rpx solid transparent;
border-left: 20rpx solid #FFFFFF;
position: absolute;
top: 30rpx;
right: -18rpx;
}
.pull.goodscard::after {
content: '';
display: block;
width: 0;
height: 0;
border-top: 16rpx solid transparent;
border-bottom: 16rpx solid transparent;
border-right: 20rpx solid #FFFFFF;
position: absolute;
top: 30rpx;
left: -18rpx;
}
.chatboxinps{
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
width: 100%;
height: auto;
border-top: #e5e5e5 solid 1px;
box-sizing: content-box;
background-color: #F3F3F3;
/* 兼容iPhoneX */
padding-bottom: 0;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
>view{
padding: 0 14rpx;
// height: 100rpx;
}
.contentss{
background-color: #fff;
height: 64rpx;
padding: 10upx 20rpx;
border-radius: 32rpx;
font-size: 28rpx;
}
.send{
background-color: #F64F15;
color: #fff;
height: 64rpx;
// margin-left: 20rpx;
border-radius: 32rpx;
padding: 0;
width: 120rpx;
line-height: 64rpx;
&:active{
background-color: #f64f15;
}
}
}
.talk-list{
padding-bottom: 20rpx;
/* 消息项,基础类 */
.item{
padding: 20rpx 20rpx 0 20rpx;
align-items:flex-start;
align-content:flex-start;
color: #333;
.pic{
width: 92rpx;
height: 92rpx;
border-radius: 50%;
border: #fff solid 1px;
}
.contentss{
padding: 20rpx;
border-radius: 4px;
max-width: 500rpx;
word-break: break-all;
line-height: 52rpx;
position: relative;
}
/* 收到的消息 */
&.pull{
.contentss{
margin-left: 32rpx;
background-color: #fff;
&::after{
content: '';
display: block;
width: 0;
height: 0;
border-top: 16rpx solid transparent;
border-bottom: 16rpx solid transparent;
border-right: 20rpx solid #fff;
position: absolute;
top: 30rpx;
left: -18rpx;
}
}
}
/* 发出的消息 */
&.push{
/* 主轴为水平方向,起点在右端。使不修改DOM结构,也能改变元素排列顺序 */
flex-direction: row-reverse;
.contentss{
margin-right: 32rpx;
background-color: #a0e959;
&::after{
content: '';
display: block;
width: 0;
height: 0;
border-top: 16rpx solid transparent;
border-bottom: 16rpx solid transparent;
border-left: 20rpx solid #a0e959;
position: absolute;
top: 30rpx;
right: -18rpx;
}
}
}
}
}
.isread{
color: #999999;@at-root
margin-top: 10upx;
font-size: 26upx;
text-align: right;
margin-right: 20upx;
}
/**news add*/
.hidden{
display: none !important;
}
.popup-layer{
&.showLayer{transform: translate3d(0,-42vw,0);}
transition: all .15s linear;
width: 100%;
height: 320upx;
padding: 20upx 2%;
background-color: #f3f3f3;
border-top: solid 1upx #ddd;
.emoji-swiper{
height: 40vw;
swiper-item{
display: flex;
align-content: flex-start;
flex-wrap: wrap;
view{
width: 12vw;
height: 12vw;
display: flex;
justify-content: center;
align-items: center;
image{
width: 8.4vw;
height: 8.4vw;
}
}
}
}
.more-layer{
width: 100%;
height: 320upx;
.list{
width: 100%;
display: flex;
flex-wrap: wrap;
.box{
width: 18vw;
height: 18vw;
border-radius: 20upx;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
margin: 0 3vw 2vw 3vw;
.icon{
font-size: 70upx;
}
}
}
}
}
.voice-mode{
box-sizing: border-box;
width: calc(100% - 2upx);
height: 68upx;
border-radius: 70upx;
border:solid 1upx #cdcdcd;
display: flex;
justify-content: center;
align-items: center;
font-size: 28upx;
background-color: #fff;
color: #555;
&.recording{
background-color: #e5e5e5;
}
}
.record{
width: 40vw;
height: 40vw;
position: fixed;
top: 55%;
left: 30%;
background-color: rgba(0,0,0,.6);
border-radius: 20upx;
.ing{
width: 100%;
height: 30vw;
display: flex;
justify-content: center;
align-items: center;
// 模拟录音音效动画
@keyframes volatility {
0% {background-position: 0% 130%;}
20% {background-position: 0% 150%;}
30% {background-position: 0% 155%;}
40% {background-position: 0% 150%;}
50% {background-position: 0% 145%;}
70% {background-position: 0% 150%;}
80% {background-position: 0% 155%;}
90% {background-position: 0% 140%;}
100% {background-position: 0% 135%;}
}
.icon{
background-image:linear-gradient(to bottom,#f09b37,#fff 50%);
background-size:100% 200%;
animation: volatility 1.5s ease-in-out -1.5s infinite alternate;
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
font-size: 150upx;
color: #f09b37;
}
}
.cancel{
width: 100%;
height: 30vw;
display: flex;
justify-content: center;
align-items: center;
.icon{
color: #fff;
font-size: 150upx;
}
}
.tis{
width: 100%;
height: 10vw;
display: flex;
justify-content: center;
font-size: 28upx;
color: #fff;
&.change{
color: #f09b37;
}
}
}
.operation_foots{
margin-top: 70upx;
.xitonnavitem{
text-align: center;
.navimgs{
margin: 0 auto;
width: 60upx;
height: 50upx;
}
.navnames{
margin-top: 10upx;
color: #242735;
font-size: 24upx;
}
}
}
//new add
.mynavbar{
position: fixed;
top: 0;
left: 0;
z-index: 998;
width: 100vw;
height: 88upx;
background-color: #fff;
.mynavbarbox{
background-color: #fff;
width: 100vw;
height: 88upx;
box-sizing: border-box;
padding: 14upx 12upx;
position: relative;
}
.breaksbtn{
width: 60upx;
height: 60upx;
.breakiconss{
width: 52upx;
height: 52upx;
}
}
.navbartitle{
position: relative;
left: 50%;
//470/2 + 60
margin-left: -275upx;
width: 430upx;
text-align: center;
color: #000;
font-weight: bold;
font-size: 32upx;
height: 88upx;
line-height: 88upx;
.userlistss{
height: 88upx;
.itemusers{
position: relative;
margin-right: 20upx;
width: 66upx;
height: 66upx;
.utxs{
width: 66upx;
height: 66upx;
border-radius: 50%;
}
.utxstag{
position: absolute;
left: 0;
bottom: 0;
width: 66upx;
height: 33upx;
line-height: 33upx;
background-color: rgba(0,0,0, 0.3);
color: #fff;
font-size: 20upx;
font-weight: 500;
border-bottom-left-radius: 100%;
border-bottom-right-radius: 100%;
}
}
.itemusers:last-child{
margin-right: 0;
}
}
}
.mynavbarbtn{
position: absolute;
right: 0;
top: 0;
// width: 220upx;
width: 180upx;
height: 88upx;
.iconsbtn{
.iconsimg{
width: 50upx;
height: 50upx;
}
}
}
}
.xiaoxiimgs{
max-width: 400upx;
max-height: 400upx;
height:auto;
display: block;
background-color: #fff;
}
.yuyingicons{
margin: 0 16upx;
width: 90upx;
height: 55upx;
}
.timess{
display: inline-block;
color: #5a4b1a !important;
margin: 0 8upx;
}
//常用语
.commonwords{
width: 100%;
.scrollviewh{
// height: 42vh;
// overflow-y: auto;
}
.cyyitems{
height: 88upx;
line-height: 88upx;
text-align: center;
}
}
.ordernoticebox{
margin-left: 20upx;
margin-top: 20upx;
text-align: center;
.msgstime{
margin: 0 auto;
margin-bottom: 20upx;
display: inline-block;
background-color: #d3d3d5;
color: #fff;
padding: 10upx 15upx;
font-size: 26upx;
border-radius: 10upx;
}
}
.ordernotice{
border-radius: 14upx;
padding: 40upx;
box-sizing: border-box;
width: 710upx;
background-color: #fff;
.orderstatit{
text-align: left;
font-size: 30upx;
color: #000;
}
.ordertextets{
text-align: left;
margin-top: 20upx;
font-size: 28upx;
color: #000;
}
}
\ No newline at end of file
page{
background-color: #FAFAFA;
padding-bottom: 100upx;
}
.liaotiancards{
}
.chatlist{
background-color: #fff;
}
.chatitem{
padding: 28upx 32upx;
border-bottom: 1px solid #f3f3f3;
.usertxbox{
position: relative;
}
.tagmsgs{
position: absolute;
z-index: 9;
top: -5upx;
right: 0;
width: 40upx;
height: 40upx;
line-height: 40upx;
background-color: #ff0000;
color: #FFFFFF;
border-radius: 50%;
text-align: center;
font-size: 24upx;
}
.usertx{
border: 1px solid #f1f1f1;
width: 106upx;
height: 106upx;
border-radius: 50%;
}
.chatitem_r{
margin-left: 32upx;
.linenamebox{
.nikenames{
color: #333333;
font-size: 32upx;
}
.qiyenames{
color: #999999;
font-size: 24upx;
margin-left: 24upx;
}
.istimes{
color: #999999;
font-size: 26upx;
}
}
.isliaotcon{
margin-top: 33upx;
color: #666666;
font-size: 28upx;
}
}
}
.chatlist .chatitem:last-child {
border: 0;
}
// 消息end
.tuijiancards{
padding: 42upx 32upx;
background: #fff;
.titheadbox{
.tititis{
color: #333333;
font-weight: bold;
font-size: 32upx;
}
.clearionc{
width: 28upx;
height: 28upx;
}
}
.usertxss{
margin-top: 26upx;
.touxiongbox{
.pbtouxiongs{
position: relative;
width: 60upx;
height: 60upx;
border-radius: 50%;
}
.pbtouxiongs:nth-child(2){
left: -10upx;
}
.pbtouxiongs:nth-child(3){
left: -20upx;
}
.pbtouxiongs:nth-child(4){
left: -30upx;
}
.pbtouxiongs:nth-child(5){
left: -40upx;
}
.pbtouxiongs:nth-child(6){
left: -50upx;
}
.pbtouxiongs:nth-child(7){
left: -60upx;
}
.pbtouxiongs:nth-child(8){
left: -70upx;
}
.pbtouxiongs:nth-child(9){
left: -80upx;
}
.pbtouxiongs:nth-child(10){
left: -90upx;
}
}
.tagboxs{
width: 128upx;
height: 52upx;
line-height: 52upx;
text-align: center;
color: #FDB933;
font-size: 28upx;
border: 1px solid #FDB933;
border-radius: 10upx;
}
}
}
.renlistsbox{
}
\ No newline at end of file
<template>
<!-- 消息页面 -->
<view class="message">
<!-- 聊天 -->
<view class="liaotiancards">
<view class="chatlist">
<view @tap="tochats(item)" class="chatitem flex" v-for="(item,index) in conversationList" :key="index">
<view class="usertxbox">
<view class="tagmsgs" v-if="item.unreadCount!=0 && item.unreadCount<99">{{item.unreadCount}}</view>
<view class="tagmsgs" v-else-if="item.unreadCount!=0 && item.unreadCount>=99">99</view>
<image class="usertx" :src="item.avatar|parseurl" mode=""></image>
</view>
<view class="chatitem_r flex1">
<view class="linenamebox flex ali-c jus-b">
<view class="flex ali-c">
<view class="nikenames">{{item.showName}}</view>
<view v-if="item.type==1" class="qiyenames">用户</view>
<view v-if="item.type==2" class="qiyenames">群组</view>
</view>
<view v-if="item.lastMessage" class="istimes">{{item.lastMessage.time|dateFormat}}</view>
</view>
<view v-if="item.lastMessage" class="isliaotcon oneline">
<text v-show="item.unreadCount==0">[已读]</text>
<text v-show="item.unreadCount!=0">[未读]</text>
<text v-if="item.lastMessage.textElem && item.type==1">{{item.lastMessage.textElem.msg}}</text>
<text v-if="item.lastMessage.elemType==2">[自定义消息]</text>
<text v-if="item.lastMessage.elemType==3">[图片消息]</text>
<text v-if="item.lastMessage.elemType==4">[语音消息]</text>
<text v-if="item.lastMessage.elemType==5">[视频消息]</text>
<text v-if="item.lastMessage.elemType==6">[文件消息]</text>
<text v-if="item.lastMessage.elemType==7">[地址位置消息]</text>
<text v-if="item.lastMessage.elemType==8">[表情消息]</text>
<text v-if="item.lastMessage.elemType==9">[群提示消息]</text>
</view>
</view>
</view>
<view class="chatitem flex" @tap="loginfun">
<image class="usertx" src="/static/store/yueicon.png" mode=""></image>
<view class="chatitem_r flex1">
<view class="linenamebox flex ali-c jus-b">
<view class="flex ali-c">
<view class="nikenames">通知</view>
<view class="qiyenames">系统通知</view>
</view>
<view class="istimes">11月2日</view>
</view>
<view class="isliaotcon oneline">恭喜您获得点餐优惠券</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {formatMsgTime} from "@/utils/yicode.js";
export default {
components: {},
//过滤器
filters: {
dateFormat(value) {
console.info("value", value);
return formatMsgTime(value);
}
},
data() {
return {
};
},
onLoad() {
// #ifdef APP-PLUS
this.loginfun();
// #endif
},
onShow() {
// #ifdef APP-PLUS
this.getConversationList();
// #endif
},
computed: {
conversationList() { //消息会话列表
return this.$store.state.myconversationList;
},
},
methods: {
loginfun() {
let userInfo = uni.getStorageSync("userInfo");
console.info("userInfo",userInfo);
// || userInfo.user_id=="817163" 9715
if(userInfo.user_id ){
let userids = 'u_'+String(userInfo.user_id)
// this.$store.dispatch("baselogin", "user1"); //登录
this.$store.dispatch("baselogin", userids); //登录
}
},
//获取会话列表 APP
getConversationList() {
this.$store.dispatch("getConversationList", {}); //获取会话列表
},
tochats(item) {
let type = item.type;//1单聊 2群聊
let userId = item.userId?item.userId:'';//对方的用户id
let groupId = item.groupId?item.groupId:'';//群聊id
uni.navigateTo({
url: `/pages/chat/chat/chat?type=${type}&userId=${userId}&groupId=${groupId}`
})
}
}
}
</script>
<style lang="scss">
@import "./message.scss";
</style>
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
} }
.inputboxs .input { .inputboxs .input {
padding: 20upx; padding: 0 20upx;
height: 80upx; height: 80upx;
line-height: 80upx; line-height: 80upx;
} }
......
<template> <template>
<!-- 订单列表页面 --> <!-- 订单列表页面 -->
<view class="content"> <view class="content" style="overflow: hidden;">
<view class="navbar"> <view class="navbar">
<scroll-view :scroll-x="true" style="width: 100vw;" :scroll-left="scrleft" :scroll-with-animation="true" > <scroll-view :scroll-x="true" style="width: 100vw;" :scroll-left="scrleft" :scroll-with-animation="true" >
<view class="ali-c"> <view class="ali-c">
......
...@@ -4,26 +4,26 @@ ...@@ -4,26 +4,26 @@
<view class="shop_tit" >添加银行卡</view> <view class="shop_tit" >添加银行卡</view>
<view class="s_login"> <view class="s_login">
<picker @change="bindPickerChange" :value="index" :range="isselectcard" range-key="bank_name" > <picker @change="bindPickerChange" :value="index" :range="isselectcard" range-key="bank_name" >
<view class="biao_01"> <view class="biao_01 ali-c">
<view class="biao_01_l">开户行:</view> <view class="biao_01_l">开户行:</view>
<view class="biao_01_r"> <view class="biao_01_r">
<input class="uni-input" disabled="disabled" v-model="isselectcard[index].bank_name" placeholder="请输入" /> <input class="uni-input" disabled="disabled" v-model="isselectcard[index].bank_name" placeholder="请输入" />
</view> </view>
</view> </view>
</picker> </picker>
<view class="biao_01"> <view class="biao_01 ali-c">
<view class="biao_01_l">姓名:</view> <view class="biao_01_l">姓名:</view>
<view class="biao_01_r"> <view class="biao_01_r">
<input class="uni-input" v-model="realname" placeholder="请输入" /> <input class="uni-input" v-model="realname" placeholder="请输入" />
</view> </view>
</view> </view>
<view class="biao_01"> <view class="biao_01 ali-c">
<view class="biao_01_l" style="white-space:nowrap;">银行卡号:</view> <view class="biao_01_l" style="white-space:nowrap;">银行卡号:</view>
<view class="biao_01_r"> <view class="biao_01_r">
<input class="uni-input" v-model="cardno" placeholder="请输入" /> <input class="uni-input" v-model="cardno" placeholder="请输入" />
</view> </view>
</view> </view>
<view class="biao_01"> <view class="biao_01 ali-c">
<view class="biao_01_l">开户支行:</view> <view class="biao_01_l">开户支行:</view>
<view class="biao_01_r"> <view class="biao_01_r">
<input class="uni-input" v-model="branch" placeholder="请输入" /> <input class="uni-input" v-model="branch" placeholder="请输入" />
...@@ -116,7 +116,10 @@ ...@@ -116,7 +116,10 @@
color: #fff; color: #fff;
padding: 20px 20px; padding: 20px 20px;
} }
.uni-input{background-color: #fff;padding-top: 5px;} .uni-input{background-color: #fff;padding-top: 5px;
height: 88upx;
line-height: 88upx;
}
.s_login { .s_login {
margin: 0 10px; margin: 0 10px;
border-radius: 5px; border-radius: 5px;
......
//2021年9月28日17:46:44 小谢 IM封装
import {sdkAppID,sdkAppKey} from "@/utils/config.js";
let txIm = {};
// #ifdef APP-PLUS
txIm = uni.requireNativePlugin('TX-TencentIM');
// #endif
const Im_store = {
state: {
isLogin: false, //是否登录
isSDKReady: false, // TIM SDK 是否 ready
//APP IM data
msgslist: [], //单聊的消息列表
qunmsgslist:[],//群聊的历史消息
myconversationList: [], //会话列表 我的会话列表
dfuserId: "", //单聊的时候 对方的userID
groupId:"",//正在聊天的群聊id
//APP IM data end
},
mutations: {
SetgroupId(state, groupId) {
state.groupId = groupId;
},
SetToken(state, token) {
state.token = token;
},
//修改群消息
setqunmsgslist(state, qunmsgslist) {
state.qunmsgslist = qunmsgslist;
},
//更新登录状态
toggleIsLogin(state, isLogin) {
state.isLogin = typeof isLogin === 'undefined' ? !state.isLogin : isLogin
},
//退出登录重置状态
reset(state) {
state.isLogin = false
state.isSDKReady = false
},
// APP fun
//修改单聊消息
Setmsgslist(state, data) {
state.msgslist = data;
},
//修改单聊对方ID
setdfuserId(state, data) {
state.dfuserId = data;
},
setmyconversationList(state, data) {
state.myconversationList = data;
}
//APP fun edn
},
actions: {
reloads(store, vla) {
// #ifdef APP-PLUS
plus.runtime.restart(); //重新启动
// #endif
// #ifdef MP-WEIXIN
const updateManager = wx.getUpdateManager();
updateManager.applyUpdate()
// #endif
// #ifdef H5
location.reload();
// #endif
},
//APP或者小程序 都调用 初始化IM登录
InItImlogin(store, type) {
let userinfo = uni.getStorageSync("userinfo");
// #ifdef APP-PLUS
store.dispatch("loginStatus", String(userinfo.id)).then((res) => { //获取登录状态
if (res.loginStatus != 0) {
//没登录
store.dispatch("baselogin", String(userinfo.id))
} else {
//已经登录了
}
})
// #endif
},
//APP SDK funticon
///登录 APP的
baselogin(store, userId = "user1") {
var _self = this;
//初始化SDK
let isSuccess = txIm.initSDK({
sdkAppID: sdkAppID,
logLevel: 0
}, result => {
})
//如果初始化成功
if (isSuccess) {
txIm.removeAdvancedMsgListener(); //移除高级消息监听
txIm.removeGroupListener(); //移除群消息监听
txIm.removeFriendListener(); //移除好友消息监听
txIm.removeSignalingListener(); ///删除签名列表
//设置高级消息接口监听
txIm.addAdvancedMsgListener(result => {
let txIm = {};
// #ifdef APP-PLUS
txIm = uni.requireNativePlugin('TX-TencentIM');
// #endif
//新消息来了
//震动
// uni.vibrateLong({
// success: function () {
// console.log('success');
// }
// });
let content = "1";
if (result.msg.elemType == 1) {
content = `${result.msg.textElem.msg}`;
} else if (result.msg.elemType == 2) {
content = `[自定义消息]`
} else if (result.msg.elemType == 3) {
content = `[图片消息]`
} else if (result.msg.elemType == 4) {
content = `[语音消息]`
}
//....
// 去刷新消息
// 1.刷新聊天界面里面的消息
// 2.刷新消息 页面里面的消息
//如果当前对话的人 和 给我发消息的人是一个人 就自动同步一波
if (store.state.dfuserId == result.msg.userId) {
store.dispatch("getC2CHistoryMessageList", {msgId:""}).then((res) => {}); //去刷新聊天界面的消息
store.dispatch("getConversationList", {}); //刷新获取会话列表
} else {
store.dispatch("getConversationList", {}); //刷新获取会话列表
}
if(store.state.groupId==result.msg.groupId){
store.dispatch("getGroupHistoryMessageList", {}); //获取最新的群消息
}
let msg = result.msg;
if (msg.elemType == 3) {
txIm.downloadImage({
"msgId": msg.msgId
}, progressResult => {
}, succResult => {
// console.info("succResult",succResult)
}, result => {
})
} else if (msg.elemType == 4) {
//下载语音消息
txIm.downloadSound({
"msgId": msg.msgId
}, progressResult => {
}, succResult => {
}, failResult => {
})
} else if (msg.elemType == 5) {
//下载视频消息
txIm.downloadVideo({
"msgId": msg.msgId
}, progressResult => {
}, succResult => {
}, failResult => {
})
} else if (msg.elemType == 6) {
//下载文件消息
txIm.downloadFile({
"msgId": msg.msgId
}, progressResult => {
}, succResult => {
}, failResult => {
})
}
});
//设置群消息监听
txIm.setGroupListener(result => {
//群消息监听
console.log(result,"群消息监听");
});
//设置好友消息监听
txIm.setFriendListener(result => {
console.log(result,"设置好友消息监听");
});
//添加信号侦听器?
txIm.addSignalingListener(result => {
console.log(result,"添加好友信息监听");
if (result.type === "onReceiveNewInvitation") { //收到新的邀请
_self.inviteData = result;
}
});
//登录
txIm.login({
sdkAppID: sdkAppID,
sdkAppKey: sdkAppKey,
userId: userId, //要登录的用户id 可以加密 格式不限
expireTime: 31536000,//604800, //登录过期时间,可以不填写 365天
filePath: plus.io.convertLocalFileSystemURL('_doc'), //文件路径?
}, result => {
console.log(result, "登录完成");
//_self.currentUser = _self.user1; //修改当前登录的用户id IMid
//上传安卓平台证书
let txIm1 = {};
// #ifdef APP-PLUS
txIm1 = uni.requireNativePlugin('TX-TencentIM');
// #endif
//设置推送证书
// txIm1.setOfflinePushConfig({
// //下面这个是测试的
// "businessId": 11632, //腾讯后台填写平台推送信息后获取的id
// }, result => {
// })
})
}
},
//获取登录状态
loginStatus() {
return new Promise((reslove, reject) => {
let status = txIm.getLoginStatus();
reslove(status);
})
},
//获取当前登录用户
getLoginUser() {
return new Promise((reslove, reject) => {
let user = txIm.getLoginUser();
reslove(user);
})
},
//设置用户信息
setSelfProfile(store, infodate) {
// #ifdef APP-PLUS
let obj1 = {};
if (infodate.needid) {
obj1.Tag_Profile_Custom_needid = infodate.needid; //人脉表id 有时候不传
}
txIm.setSelfProfile({ //APP
"allowType": 0,
"customInfo": { //自定义字段
// Tag_Profile_Custom_serid
// Tag_Profile_Custom_uid
...obj1,
},
"userName": infodate.userName, //用户昵称
"userAvatar": infodate.userAvatar,
}, result => {
//设置用户信息ok
})
// #endif
},
//设置用户信息 单独设置人脉id
setSelfProfiletwo(store, infodate) {
// #ifdef APP-PLUS
let obj1 = {};
if (infodate.needid) {
obj1.Tag_Profile_Custom_needid = infodate.needid; //人脉表id 有时候不传
}
txIm.setSelfProfile({ //APP
"allowType": 0,
"customInfo": { //自定义字段
...obj1,
},
}, result => {
//设置用户信息ok
})
// #endif
},
//获取单聊历史消息
getC2CHistoryMessageList(store, obj) {
return new Promise((reslove, reject) => {
txIm.getC2CHistoryMessageList({
"userId": store.state.dfuserId, //obj.userId,
"count": 99999, //拉取消息的个数
msgId:"",
// "msgId": "144115232869100554-1634110694-3123053130",//obj.msgId, //this.historyC2CMsgId
}, result => {
let txIm = {};
// #ifdef APP-PLUS
txIm = uni.requireNativePlugin('TX-TencentIM');
// #endif
let msgs = result.msgs;
// console.log(result, "d0历史消息");
msgs.reverse(); //数组逆序一下
msgs = msgs.map((msg, index) => {
if (msg.elemType == 3) {
txIm.downloadImage({
"msgId": msg.msgId
}, progressResult => {
}, succResult => {
//下载成功
if (succResult.path) {
msg.myimgfile = succResult;
}
}, failResult => {
})
//获取图片资源
txIm.getImageUrl({"msgId":msg.msgId},result=>{
if(result.code==0){
msg.url_imageList = result.imageList;
}
})
} else if (msg.elemType == 4) {
//音频?
txIm.downloadSound({"msgId":msg.msgId},progressResult=>{
},succResult=>{
//下载成功
if (succResult.path) {
// console.info("语音消息下载成功",succResult);
msg.mp3file = succResult;
}
},failResult=>{
})
//获取sound资源url
txIm.getSoundUrl({"msgId":msg.msgId},result=>{
// console.log("----------------------------------------");
// console.log(result,"获取语音资源成功");
// console.log("----------------------------------------");
if(result.code==0){
msg.SoundUrl = result;
}
})
} else if (msg.elemType == 5) {
//视频
txIm.downloadVideo({
"msgId": msg.msgId
}, progressResult => {
}, succResult => {
//下载成功
}, failResult => {
})
} else if (msg.elemType == 6) {
//文件
txIm.downloadFile({
"msgId": msg.msgId
}, progressResult => {
}, succResult => {
//下载成功
}, failResult => {
})
}else if(msg.elemType == 2){
//自定义消息
console.info(msg,"msgitem1");
if(msg.customElem.extension){
if(msg.customElem.extension.indexOf("type")!=-1){
msg.customdata = JSON.parse(msg.customElem.desc);
}
}
}
return msg;
});
if (result.msgs.length > 0) {
//this.historyC2CMsgId = result.msgs[result.msgs.length - 1].msgId
}
// console.log(msgs, "历史消息");
store.commit("Setmsgslist", msgs)
reslove(result);
})
})
},
//获取单聊历史消息 end
//获取群聊历史消息
getGroupHistoryMessageList(store, objects) {
return new Promise((reslove, reject) => {
// "msgId":objects.msgId
txIm.getGroupHistoryMessageList({"groupId":store.state.groupId,"count":999999,"msgId":""},result=>{
let msgs = result.msgs;
// console.log(result, "q历史消息");
msgs.reverse(); //数组逆序一下
msgs = msgs.map((msg,index)=>{
if (msg.elemType == 3) {
//下载图片
txIm.downloadImage({
"msgId": msg.msgId
}, progressResult => {
// console.info("progressResult",progressResult);
}, succResult => {
//下载成功
if (succResult.path) {
// console.info("succResult",succResult)
msg.myimgfile = succResult;
}
}, failResult => {
//下载失败
})
//获取图片资源
txIm.getImageUrl({"msgId":msg.msgId},result=>{
if(result.code==0){
msg.url_imageList = result.imageList;
}
})
} else if (msg.elemType == 4) {
//音频?
txIm.downloadSound({"msgId":msg.msgId},progressResult=>{
},succResult=>{
if (succResult.path) {
// console.info("语音消息下载成功",succResult);
msg.mp3file = succResult;
}
},failResult=>{
})
//获取sound资源url
txIm.getSoundUrl({"msgId":msg.msgId},result=>{
// console.log("----------------------------------------");
// console.log(result,"获取语音资源成功");
// console.log("----------------------------------------");
if(result.code==0){
msg.SoundUrl = result;
}
})
} else if (msg.elemType == 5) {
//视频
txIm.downloadVideo({
"msgId": msg.msgId
}, progressResult => {
}, succResult => {
//下载视频成功
}, failResult => {
})
} else if (msg.elemType == 6) {
//文件
txIm.downloadFile({
"msgId": msg.msgId
}, progressResult => {
}, succResult => {
//下载文件成功
}, failResult => {
//下载文件失败
})
}else if(msg.elemType == 2){
//自定义消息
console.info(msg,"msgitem");
if(msg.customElem.extension){
if(msg.customElem.extension.indexOf("type")!=-1){
msg.customdata = JSON.parse(msg.customElem.desc);
}
}
}
return msg;
});
// console.info("群历史消息",msgs);
store.commit("setqunmsgslist", msgs)
reslove(msgs);
})
})
},
//获取群聊历史消息end
//获取群信息start
getGroupsInfo(store, obj){
return new Promise((reslove, reject) => {
txIm.getGroupsInfo({"groupIdList":[store.state.groupId]},result=>{
reslove(result);
})
})
},
//获取群信息end
//获取群成员列表 start
getGroupMemberList(store, obj){
return new Promise((reslove, reject) => {
txIm.getGroupMemberList({"groupId":store.state.groupId,"filter":0,"nextSeq":0},result=>{
reslove(result);
})
})
},
//获取群成员列表end
//获取会话列表
getConversationList(store, obj) {
txIm.getConversationList({
nextSeq: 0,
count: 99999,
}, result => {
let conversationList = result.conversationList; //会话消息列表
let Unread = 0; //未读
conversationList.forEach((item, index) => {
Unread += item.unreadCount;
})
// console.info("未读总", Unread);
// console.info("conversationList",conversationList);
store.commit("setmyconversationList", conversationList); //更新会话列表
// let CornerIndex = 2;
// if (Unread > 0 && Unread <= 99) {
// uni.setTabBarBadge({
// index: CornerIndex,
// text: String(Unread),
// })
// // #ifdef APP-PLUS
// plus.runtime.setBadgeNumber(Unread);
// // #endif
// } else if (Unread > 0 && Unread > 99) {
// uni.setTabBarBadge({
// index: CornerIndex,
// text: "99",
// })
// // #ifdef APP-PLUS
// plus.runtime.setBadgeNumber(99);
// // #endif
// } else {
// uni.removeTabBarBadge({
// index: CornerIndex
// });
// // #ifdef APP-PLUS
// plus.runtime.setBadgeNumber(0);
// // #endif
// }
})
},
//APP SDK funticon
//极光推送设置别名 用于推送
setupJYJPush(store, name) {
// #ifdef APP-PLUS
const jyJPush = uni.requireNativePlugin('JY-JPushThird');
jyJPush.setJYJPushTags({
userTag: name,
}, result => {
//设置tag push is成功
});
// #endif
}
}
}
export default Im_store;
\ No newline at end of file
...@@ -19,6 +19,18 @@ import Voice from '@/utils/QS-baiduyy/QS-baiduyy.js';//接入百度语音播报a ...@@ -19,6 +19,18 @@ import Voice from '@/utils/QS-baiduyy/QS-baiduyy.js';//接入百度语音播报a
// }; // };
//IMadd
import {sdkAppID,sdkAppKey} from "@/utils/config.js";
let txIm = {};
// #ifdef APP-PLUS
txIm = uni.requireNativePlugin('TX-TencentIM');
// #endif
import Im_store from "./Im_store.js";//IM封装模块
//IMadd
let obj = {}; let obj = {};
if(debug.isdebug==true){ if(debug.isdebug==true){
//测试环境 //测试环境
...@@ -80,6 +92,7 @@ const store = new Vuex.Store({ ...@@ -80,6 +92,7 @@ const store = new Vuex.Store({
horse_lng:0, horse_lng:0,
horse_lat:0, horse_lat:0,
is_closed:1, //0开启订单列表里的导航按钮 1关闭 is_closed:1, //0开启订单列表里的导航按钮 1关闭
...Im_store.state,//IMadd
}, },
mutations: { mutations: {
is_closed(state,data){ is_closed(state,data){
...@@ -138,7 +151,8 @@ const store = new Vuex.Store({ ...@@ -138,7 +151,8 @@ const store = new Vuex.Store({
//修改状态 //修改状态
changeisvoice(state,data){ changeisvoice(state,data){
state.isvoice = data; state.isvoice = data;
} },
...Im_store.mutations,//IMadd
}, },
//方法 //方法
actions: { actions: {
...@@ -200,7 +214,8 @@ const store = new Vuex.Store({ ...@@ -200,7 +214,8 @@ const store = new Vuex.Store({
resolve();//结束 resolve();//结束
}) })
}) })
} },
...Im_store.actions,//IMadd
} }
}) })
......
// 2021年10月8日10:28:353 小谢 采集emoji表情 图片才用外链
//来源 https://www.emojidaquan.com/
const commen = {}
commen.emojiList = [
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/grinning-face_1f600.png",
"alt":"😀",
"name":"快乐|微笑|情感|嘿嘿|笑脸|脸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-open-mouth_1f603.png",
"alt":"😃",
"name":"快乐|微笑|情绪|好|做得好|哈哈|开口笑|笑脸|脸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-open-mouth-and-smiling-eyes_1f604.png",
"alt":"😄",
"name":"快乐|微笑|情绪|好|做得好|哈哈|开口笑|笑脸|脸|大笑|喜笑颜开"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/grinning-face-with-smiling-eyes_1f601.png",
"alt":"😁",
"name":"快乐|傻笑|有趣|微笑|情绪|好|做得好|自拍|嘻嘻|笑脸|脸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-open-mouth-and-tightly-closed-eyes_1f606.png",
"alt":"😆",
"name":"快乐|微笑|笑|怪笑|欢笑|哈哈|情绪|开心|斜眼笑|眯眼|脸|高兴"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-open-mouth-and-cold-sweat_1f605.png",
"alt":"😅",
"name":"微笑|锻炼|运动|出汗|情绪|冷汗|汗|脸|苦笑|略微尴尬|尴尬"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/rolling-on-the-floor-laughing_1f923.png",
"alt":"🤣",
"name":"脸|笑|滚动|打滚|笑得满地打滚|眼泪|可爱|调皮"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-tears-of-joy_1f602.png",
"alt":"😂",
"name":"快乐|愚蠢|有趣|微笑|哭泣|泪水|大笑|欢笑|哈哈|情绪|眼泪|笑|笑哭了|脸|笑傻了"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/slightly-smiling-face_1f642.png",
"alt":"🙂",
"name":"快乐|微笑|呵呵|开心|笑|脸|浅笑"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/upside-down-face_1f643.png",
"alt":"🙃",
"name":"愚蠢|有趣|笑脸|挖苦|倒脸|脸|颠倒|颠倒的脸|讽刺"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/winking-face_1f609.png",
"alt":"😉",
"name":"有趣|微笑|情绪|媚眼|眨眼|笑|调情|调皮"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-smiling-eyes_1f60a.png",
"alt":"😊",
"name":"快乐|微笑|情绪|做得好|害羞|羞涩|羞涩微笑|脸|脸红"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-halo_1f607.png",
"alt":"😇",
"name":"快乐|傻笑|有趣|微笑|情绪|好|做得好|自拍|嘻嘻|笑脸|脸|天使|善良"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-heart-shaped-eyes_1f60d.png",
"alt":"😍",
"name":"微笑|锻炼|脸|尴尬|爱上你|色|崇拜|浪漫"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/grinning-face-with-star-eyes_1f929.png",
"alt":"🤩",
"name":"脸|笑|大笑|可爱|调皮|眼睛|露齿|崇拜"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-throwing-a-kiss_1f618.png",
"alt":"😘",
"name":"快乐|有趣|亲嘴|亲吻|飞吻|爱|晚安|调情"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/kissing-face_1f617.png",
"alt":"😗",
"name":"快乐|微笑|呵呵|开心|笑|脸|浅笑|嘟嘴|亲吻|吹口哨"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/white-smiling-face_263a.png",
"alt":"☺️",
"name":"开心|幸福|浅笑|感激|爱|脸颊|谦逊"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/kissing-face-with-closed-eyes_1f61a.png",
"alt":"😚",
"name":"有趣|微笑|情绪|媚眼|眨眼|笑|调情|调皮|可爱|闺蜜"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/kissing-face-with-smiling-eyes_1f619.png",
"alt":"😙",
"name":"快乐|微笑|害羞|羞涩|羞涩微笑|脸|亲|嘟嘴|亲吻|吹口哨"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-savouring-delicious-food_1f60b.png",
"alt":"😋",
"name":"快乐|愚蠢|有趣|微笑|做得好|好吃|津津有味|美味|脸|满足|心满意足"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-stuck-out-tongue_1f61b.png",
"alt":"😛",
"name":"微笑|吐舌|脸|舌头|调皮|恶搞|取笑|鬼脸|兴奋"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-stuck-out-tongue-and-winking-eye_1f61c.png",
"alt":"😜",
"name":"快乐|微笑|庆祝|情绪|单眼|单眼吐舌|吐舌|开玩笑|脸|舌头|滑稽|搞怪"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/grinning-face-with-one-large-and-one-small-eye_1f92a.png",
"alt":"🤪",
"name":"有趣|微笑|情绪|滑稽|大眼|小眼|滑稽的脸|疯狂的脸|脸|鬼脸|滑稽"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-stuck-out-tongue-and-tightly-closed-eyes_1f61d.png",
"alt":"😝",
"name":"快乐|微笑|吐舌|舌头|眯眼|太棒了|惊艳|大笑|调皮"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/money-mouth-face_1f911.png",
"alt":"🤑",
"name":"笑脸|胜利|粉碎|成功|金钱|现金|美元|货币|资金|支付|发财|拜金|脸|见钱眼开|钱"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/hugging-face_1f917.png",
"alt":"🤗",
"name":"抱抱|拥抱|感谢|你|抱|微笑|笑|脸|拍手|鼓掌"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-smiling-eyes-and-hand-covering-mouth_1f92d.png",
"alt":"🤭",
"name":"快乐|微笑|情绪|笑声|不说|哎呀|脸|偷笑|捂嘴"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-finger-covering-closed-lips_1f92b.png",
"alt":"🤫",
"name":"疯狂|微笑|情绪|颤抖|嘘|安静|安静的脸|严肃"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/thinking-face_1f914.png",
"alt":"🤔",
"name":"微笑|思考|伙计们|晚上|想|想一想|脸|摸下巴"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/zipper-mouth-face_1f910.png",
"alt":"🤐",
"name":"疯了|笑脸|嘴|脸|闭嘴|无言|无语"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-one-eyebrow-raised_1f928.png",
"alt":"🤨",
"name":"微笑|性感|坏|不信任|怀疑|挑眉|眉毛上挑的脸|脸|挑逗"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/neutral-face_1f610.png",
"alt":"😐",
"name":"疯狂|微笑|耸肩|中立|情绪|冷漠|脸|面无表情|平淡"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/expressionless-face_1f611.png",
"alt":"😑",
"name":"微笑|中立|情绪|无语|脸|茫然|面无表情|无聊|挫折|没有耐心|无奈"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-without-mouth_1f636.png",
"alt":"😶",
"name":"微笑|中立|情绪|嘴|安静|沉默|脸|负面|失望|沮丧|莫名悲伤"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smirking-face_1f60f.png",
"alt":"😏",
"name":"有趣|笑脸|性感|讽刺|假笑|得意|调情|歪嘴|暗示|你懂得"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/unamused-face_1f612.png",
"alt":"😒",
"name":"悲伤|疲倦|困倦|睡眠|情绪|不屑|不服|不高兴|脸|郁闷|鄙视|无语了|收购了"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-rolling-eyes_1f644.png",
"alt":"🙄",
"name":"疯狂|微笑|滚动|眼睛|情绪|讽刺|无语|白眼|翻白眼|脸|瞪眼"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/grimacing-face_1f62c.png",
"alt":"😬",
"name":"愚蠢|有趣|微笑|情绪|自拍|咬牙切齿|脸|露齿|鬼脸|龇牙咧嘴|尴尬地笑"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/lying-face_1f925.png",
"alt":"🤥",
"name":"脸|谎言|皮诺奇|匹诺曹|说谎|长鼻子|小丑"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/relieved-face_1f60c.png",
"alt":"😌",
"name":"笑脸|胜利|叹气|后怕|终于|宽慰|感恩|喜悦|如释重负|松了一口气"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/pensive-face_1f614.png",
"alt":"😔",
"name":"悲伤|情绪|休息|平静|心事重重|沉思|脸|挣扎|孤单|委屈|懊悔|愁眉苦脸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/sleepy-face_1f62a.png",
"alt":"😪",
"name":"哎呀|脸|疲惫|困乏|感冒|喷嚏"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/drooling-face_1f924.png",
"alt":"🤤",
"name":"微笑|馋|流口水|羡慕|花痴|尴尬"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/sleeping-face_1f634.png",
"alt":"😴",
"name":"微笑|思考|晚上|想|脸|摸下巴|睡觉|困|打盹|无聊|困倦"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-medical-mask_1f637.png",
"alt":"😷",
"name":"生病|医院|口罩|冒汗|冷汗|疾病"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-thermometer_1f912.png",
"alt":"🤒",
"name":"体温计|皱眉|发烧|生病"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-head-bandage_1f915.png",
"alt":"🤕",
"name":"微笑|健康|医学|医生|病人|受伤|打绷带|脸|躺枪|无辜"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/nauseated-face_1f922.png",
"alt":"🤢",
"name":"脸|恶心|呕吐|吐"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-open-mouth-vomiting_1f92e.png",
"alt":"🤮",
"name":"脸|恶心|呕吐|不舒服|生病|反感|讨厌"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/sneezing-face_1f927.png",
"alt":"🤧",
"name":"脸|打喷嚏|喷嚏|鼻涕|感冒|病人|生病"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/dizzy-face_1f635.png",
"alt":"😵",
"name":"惊讶|恐惧|震惊|死亡|哇|情绪|头晕|头晕眼花|晕头|生病|中毒"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/shocked-face-with-exploding-head_1f92f.png",
"alt":"🤯",
"name":"微笑|疲倦|压力|情绪|爆炸头|震惊|难以接受"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-cowboy-hat_1f920.png",
"alt":"🤠",
"name":"牛仔|女牛仔|脸|帽子|帽|牛仔帽脸|酷|cosplay|骑马|冒险|自信"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-sunglasses_1f60e.png",
"alt":"😎",
"name":"眼镜|太阳镜|眼睛|男孩|酷|墨镜|墨镜笑脸|优秀|小哥哥"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/nerd-face_1f913.png",
"alt":"🤓",
"name":"笑脸|眼镜|太阳镜|书呆子脸|奇葩|脸|程序员|老实|接盘侠|奇葩|博士"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-monocle_1f9d0.png",
"alt":"🧐",
"name":"微笑|单眼|古板|放大镜|福尔摩斯|研究|观察|探究"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/confused-face_1f615.png",
"alt":"😕",
"name":"微笑|害怕困惑|困扰|疑惑|脸|沮丧|失望"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/worried-face_1f61f.png",
"alt":"😟",
"name":"悲伤|不高兴|伤心|担心|担忧|焦虑|脸|皱眉|惊慌"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/slightly-frowning-face_1f641.png",
"alt":"🙁",
"name":"悲伤|不开心|委屈|失望|心情不好|脸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/white-frowning-face_2639.png",
"alt":"☹️",
"name":"悲伤|微笑|情绪|不满|不爽|不高兴|皱眉|脸|悲伤|失望"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-open-mouth_1f62e.png",
"alt":"😮",
"name":"惊讶|害怕|震惊|哇|情绪|吃惊|同情|脸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/hushed-face_1f62f.png",
"alt":"😯",
"name":"惊讶|害怕|震惊|吃惊|缄默|脸|尴尬|郁闷"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/astonished-face_1f632.png",
"alt":"😲",
"name":"微笑|惊讶|害怕|震惊|脸|佩服|兴奋"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/flushed-face_1f633.png",
"alt":"😳",
"name":"微笑|情绪|困惑|害羞|羞涩|脸|脸红|茫然|迷茫"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/frowning-face-with-open-mouth_1f626.png",
"alt":"😦",
"name":"悲伤|惊讶|害怕|震惊|目瞪口呆|脸|担忧"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/anguished-face_1f627.png",
"alt":"😧",
"name":"悲伤|惊讶|害怕|震惊|情绪|极度痛苦|痛|脸|难受"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/fearful-face_1f628.png",
"alt":"😨",
"name":"惊讶|害怕|震惊|情绪|怕|恐怖|恐惧|脸|寒冷"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-open-mouth-and-cold-sweat_1f630.png",
"alt":"😰",
"name":"出汗|情绪|冷汗|无语|汗|焦虑|紧张|脸|失望"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/disappointed-but-relieved-face_1f625.png",
"alt":"😥",
"name":"悲伤|压力|出汗|哭泣|哭喊|失望|如释重负|脸|受挫折"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/crying-face_1f622.png",
"alt":"😢",
"name":"悲伤|哭泣|情绪|撕裂|心碎|破碎|心|伤心|哭|泪|脸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/loudly-crying-face_1f62d.png",
"alt":"😭",
"name":"悲伤|笑脸|哭泣|心碎|大哭|放声大哭|泪|痛哭|脸|喜极而泣"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-screaming-in-fear_1f631.png",
"alt":"😱",
"name":"微笑|惊讶|害怕|震惊|哇|情绪|吓死|尖叫|恐怖|脸|惊吓"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/confounded-face_1f616.png",
"alt":"😖",
"name":"悲伤|愤怒|沮丧|不快乐|困惑|焦头烂额|纠结|脸|失败|郁闷"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/persevering-face_1f623.png",
"alt":"😣",
"name":"悲伤|愤怒|沮丧|不快乐|情绪|忍耐|痛苦|脸|难受"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/disappointed-face_1f61e.png",
"alt":"😞",
"name":"悲伤|疲倦|困倦|睡眠|情绪|不高兴|失望|脸|难过"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-cold-sweat_1f613.png",
"alt":"😓",
"name":"悲伤|压力|出汗|情绪|冷|尴尬|汗|脸|挫折|失望"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/weary-face_1f629.png",
"alt":"😩",
"name":"悲伤疲倦|困倦|睡眠|压力|情绪|疲劳|疲惫|累|脸|受不了"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/tired-face_1f62b.png",
"alt":"😫",
"name":"疲倦|困倦|睡眠|疲劳|疲惫|累|脸|挣扎|焦虑|厌烦"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-look-of-triumph_1f624.png",
"alt":"😤",
"name":"疯狂|愤怒|沮丧|不快乐|傲慢|胜利|自负|趾高气昂|生气|斗|发泄|打架"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/pouting-face_1f621.png",
"alt":"😡",
"name":"疯狂|愤怒|沮丧|不快乐|发火|发飙|怒|怒火中烧|生气|脸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/angry-face_1f620.png",
"alt":"😠",
"name":"疯狂|愤怒|怒|生气|脸|瞪眼"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/serious-face-with-symbols-covering-mouth_1f92c.png",
"alt":"🤬",
"name":"疯狂|愤怒|发誓|咒骂|嘴上有符号的脸|脸|骂人|脏话|xxx"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/smiling-face-with-horns_1f608.png",
"alt":"😈",
"name":"愚蠢|有趣|愤怒|沮丧|不快乐|怪物|恶魔|邪恶|男孩|夜晚|幻想|恶魔微笑|犄角|神话故事|脸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/imp_1f47f.png",
"alt":"👿",
"name":"怪物|恶魔|邪恶|地狱|幻想|生气的恶魔|顽童|犄角"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/skull_1f480.png",
"alt":"💀",
"name":"死了|万圣节|头骨|交叉骨|妖怪|死亡|神话故事|脸|濒死"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/skull-and-crossbones_2620.png",
"alt":"☠️",
"name":"死|万圣节|萨满|头骨|交叉骨|妖怪|死亡|脸|骨头|骷髅|化学|有害"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/clown-face_1f921.png",
"alt":"🤡",
"name":"小丑|脸|小丑脸|愚蠢|吓人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/japanese-ogre_1f479.png",
"alt":"👹",
"name":"怪物|妖怪|幻想|神话故事|脸|食人魔|鬼|鬼怪"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/japanese-goblin_1f47a.png",
"alt":"👺",
"name":"愤怒|沮丧|不快乐|怪物|妖怪|小妖精|幻想|神话故事|脸|警告|京剧"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/ghost_1f47b.png",
"alt":"👻",
"name":"节日|万圣节|怪物|妖怪|幻想|幽灵|神话故事|脸|鬼"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/extraterrestrial-alien_1f47d.png",
"alt":"👽",
"name":"太空|外层|银河系|怪物|外星人|山达基|ufo|外星|幻想|星际|脸|奇特"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/see-no-evil-monkey_1f648.png",
"alt":"🙈",
"name":"动物|猴|脸|蒙住眼睛|蒙眼|非礼勿视|尴尬|看不见"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/hear-no-evil-monkey_1f649.png",
"alt":"🙉",
"name":"动物|猴|堵上耳朵|堵耳|脸|非礼勿听|听不见"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/speak-no-evil-monkey_1f64a.png",
"alt":"🙊",
"name":"动物|王国|捂上嘴巴|捂嘴|脸|非礼勿言|闭嘴"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/kiss-mark_1f48b.png",
"alt":"💋",
"name":"女人|爱|心|性感|嘴唇|口红|嘴巴|吻|唇|浪漫|唇印"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/love-letter_1f48c.png",
"alt":"💌",
"name":"信|情书|邮件|浪漫|爱心"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/heart-with-arrow_1f498.png",
"alt":"💘",
"name":"丘比特|爱情|爱河|一见钟情|浪漫"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/heart-with-ribbon_1f49d.png",
"alt":"💝",
"name":"浪漫|爱|礼物|爱心|蝴蝶结"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/sparkling-heart_1f496.png",
"alt":"💖",
"name":"星星|爱心|发光|激动|爱情|浪漫|爱国|情怀"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/growing-heart_1f497.png",
"alt":"💗",
"name":"心跳|加速|紧张|激动|红心"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/beating-heart_1f493.png",
"alt":"💓",
"name":"微笑|锻炼|脸|尴尬|爱上你|色|崇拜|浪漫|动心|心跳"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/revolving-hearts_1f49e.png",
"alt":"💞",
"name":"永远在一起|天长地久|旋转|驿动的心"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/two-hearts_1f495.png",
"alt":"💕",
"name":"心|飞走了|心心相印|爱情|浪漫"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/broken-heart_1f494.png",
"alt":"💔",
"name":"心裂了|心酸|伤心|爱情|浪漫|心伤|痛苦|分手"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/heavy-black-heart_2764.png",
"alt":"❤️",
"name":"喜欢|爱|浪漫|红心"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/orange-heart_1f9e1.png",
"alt":"🧡",
"name":"憧憬|怀念|喜欢|保护|橙色|心"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/yellow-heart_1f49b.png",
"alt":"💛",
"name":"忠诚|善良|仁慈|城市|黄色|爱心"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/green-heart_1f49a.png",
"alt":"💚",
"name":"爱心|绿色|克制|疏离|嫉妒"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/blue-heart_1f499.png",
"alt":"💙",
"name":"爱心|蓝色|温柔"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/purple-heart_1f49c.png",
"alt":"💜",
"name":"爱心|紫色|敏感"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/black-heart_1f5a4.png",
"alt":"🖤",
"name":"爱心|黑心|生病|中毒|伤心|难过|邪恶"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/speech-balloon_1f4ac.png",
"alt":"💬",
"name":"符号|自由|言论|气球|发言|对话框|气泡|话语气泡|评论"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/selfie_1f933.png",
"alt":"🤳",
"name":"照相机|手机|自拍|旅行|照片|手|旅游"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/nose_1f443.png",
"alt":"👃",
"name":"身体|部位|鼻子|气味|嗅|闻"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/tongue_1f445.png",
"alt":"👅",
"name":"性感|嘴唇|口红|嘴巴|舌头|舔|调皮|恶作剧|俏皮"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/mouth_1f444.png",
"alt":"👄",
"name":"女人|身体|部分|性感|嘴唇|口红|嘴巴"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/baby_1f476.png",
"alt":"👶",
"name":"人|婴儿|儿童|女孩|男孩|宝宝|喝奶"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/child_1f9d2.png",
"alt":"🧒",
"name":"孩子|脸|笑脸|年轻|儿童"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/boy_1f466.png",
"alt":"👦",
"name":"孩子|脸|笑脸|年轻|儿童|男孩"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/girl_1f467.png",
"alt":"👧",
"name":"孩子|脸|笑脸|年轻|儿童|女孩|妇女|纯洁|可爱"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man_1f468.png",
"alt":"👨",
"name":"人|男人|成熟|男性"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman_1f469.png",
"alt":"👩",
"name":"人|女人|性|女权主义者|坚强"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/older-man_1f474.png",
"alt":"👴",
"name":"人|男人|老人|祖父母|奶奶|爷爷"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/older-woman_1f475.png",
"alt":"👵",
"name":"人|男人|老人|祖父母|奶奶|爷爷|老太"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/person-frowning_1f64d.png",
"alt":"🙍",
"name":"不开心|生气|皱眉|眉毛|人|女人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-frowning_1f64d-200d-2642-fe0f.png",
"alt":"🙍‍♂️",
"name":"不开心|生气|人|男人|皱眉"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-frowning_1f64d-200d-2640-fe0f.png",
"alt":"🙍‍♀️",
"name":"不快乐|恼怒|人|女人|皱眉"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/person-with-pouting-face_1f64e.png",
"alt":"🙎",
"name":"不开心|愤怒|人|女人|失落|噘嘴|不满"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-pouting_1f64e-200d-2642-fe0f.png",
"alt":"🙎‍♂️",
"name":"不开心|愤怒|人|男人|失落|噘嘴|不满"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-pouting_1f64e-200d-2640-fe0f.png",
"alt":"🙎‍♀️",
"name":"不开心|愤怒|人|女人|失落|噘嘴|不满"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-no-good-gesture_1f645.png",
"alt":"🙅",
"name":"手势|动作|女人|女孩|禁止|不允许|不行"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-gesturing-not-ok_1f645-200d-2642-fe0f.png",
"alt":"🙅‍♂️",
"name":"手势|动作|男人|男孩|禁止|不允许|不行|打叉"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-gesturing-not-ok_1f645-200d-2640-fe0f.png",
"alt":"🙅‍♀️",
"name":"手势|动作|女人|女孩|禁止|不允许|不行|打叉"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-with-ok-gesture_1f646.png",
"alt":"🙆",
"name":"手势|好的|动作|女人|OK|同意|比心"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-gesturing-ok_1f646-200d-2642-fe0f.png",
"alt":"🙆‍♂️",
"name":"手势|好的|动作|男人|OK|同意|比心"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-gesturing-ok_1f646-200d-2640-fe0f.png",
"alt":"🙆‍♀️",
"name":"手势|好的|动作|女人|OK|同意|比心"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/information-desk-person_1f481.png",
"alt":"💁",
"name":"小费|手|手势|动作|语言|人|女人|指引|介绍|引导|走开|讽刺|帮助"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-tipping-hand_1f481-200d-2642-fe0f.png",
"alt":"💁‍♂️",
"name":"小费|手|手势|动作|语言|人|男人|指引|介绍|引导|走开|讽刺|帮助"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-tipping-hand_1f481-200d-2640-fe0f.png",
"alt":"💁‍♀️",
"name":"小费|手|手势|动作|语言|人|女人|指引|介绍|引导|走开|讽刺|帮助"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/happy-person-raising-one-hand_1f64b.png",
"alt":"🙋",
"name":"举|手|手势|动作|语言|人|女人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-raising-hand_1f64b-200d-2642-fe0f.png",
"alt":"🙋‍♂️",
"name":"举|手|手势|动作|语言|人|男人|学生"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-raising-hand_1f64b-200d-2640-fe0f.png",
"alt":"🙋‍♀️",
"name":"举|手|手势|动作|语言|人|女人|学生"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/person-bowing-deeply_1f647.png",
"alt":"🙇",
"name":"鞠躬|手势|动作|语言|人|女人|不好意思|对不起|道歉|鞠躬"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-bowing-deeply_1f647-200d-2642-fe0f.png",
"alt":"🙇‍♂️",
"name":"鞠躬|手势|动作|语言|人|女人|不好意思|对不起|道歉|鞠躬"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-bowing-deeply_1f647-200d-2640-fe0f.png",
"alt":"🙇‍♀️",
"name":"鞠躬|手势|动作|语言|人|女人|不好意思|对不起|道歉|鞠躬"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-palm_1f926.png",
"alt":"🤦",
"name":"掌心|手势|动作|语言|人|女人|捂脸|无语|难以置信|手掌"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-facepalming_1f926-200d-2642-fe0f.png",
"alt":"🤦‍♂️",
"name":"掌心|手势|动作|语言|人|男人|捂脸|无语|难以置信|手掌"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-facepalming_1f926-200d-2640-fe0f.png",
"alt":"🤦‍♀️",
"name":"掌心|手势|动作|语言|人|女人|捂脸|无语|难以置信|手掌"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/shrug_1f937.png",
"alt":"🤷",
"name":"耸肩|手势|动作|语言|人|女人|不关心|怀疑|无视|耸肩|WTF|疑问"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-shrugging_1f937-200d-2642-fe0f.png",
"alt":"🤷‍♂️",
"name":"耸肩|手势|动作|语言|人|男人|不关心|怀疑|无视|耸肩|WTF|疑问"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-shrugging_1f937-200d-2640-fe0f.png",
"alt":"🤷‍♀️",
"name":"耸肩|手势|动作|语言|人|女人|不关心|怀疑|无视|耸肩|WTF|疑问"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-health-worker_1f468-200d-2695-fe0f.png",
"alt":"👨‍⚕️",
"name":"男人|健康|工人|医生|笑脸|医院|医学|医务工作者"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-health-worker_1f469-200d-2695-fe0f.png",
"alt":"👩‍⚕️",
"name":"女人|健康|工人|医生|笑脸|医院|医学|医务工作者|听诊器"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-student_1f468-200d-1f393.png",
"alt":"👨‍🎓",
"name":"男|学生|男孩|脸|大学|学士|博士|硕士|学位"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-student_1f469-200d-1f393.png",
"alt":"👩‍🎓",
"name":"女人|学生|女孩|脸|大学|学士|博士|硕士|学位"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-teacher_1f468-200d-1f3eb.png",
"alt":"👨‍🏫",
"name":"男|老师|脸|大学|学校|小学|中学|黑板|教授|教师"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-teacher_1f469-200d-1f3eb.png",
"alt":"👩‍🏫",
"name":"女|老师|脸|大学|学校|小学|中学|黑板|教授|教师"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-judge_1f468-200d-2696-fe0f.png",
"alt":"👨‍⚖️",
"name":"法庭|判决|公正|法官|眼镜|男人|法律"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-judge_1f469-200d-2696-fe0f.png",
"alt":"👩‍⚖️",
"name":"法庭|判决|公正|法官|眼镜|女人|法律"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-farmer_1f468-200d-1f33e.png",
"alt":"👨‍🌾",
"name":"男人|农民|农场|庄稼|帽子|阳光|收获|农夫|园丁"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-farmer_1f469-200d-1f33e.png",
"alt":"👩‍🌾",
"name":"女人|农民|农场|庄稼|帽子|阳光|收获|农夫|园丁"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-cook_1f468-200d-1f373.png",
"alt":"👨‍🍳",
"name":"男人|厨师|厨房|食物|烹饪|白人|帽子|脸|大厨"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-cook_1f469-200d-1f373.png",
"alt":"👩‍🍳",
"name":"女人|厨师|厨房|食物|烹饪|白人|帽子|脸|大厨|做饭"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-mechanic_1f468-200d-1f527.png",
"alt":"👨‍🔧",
"name":"人|机械师|修理工|设备|工具|扳手|公的|工人|设备|工程师|蓝领|五金|水管工|电工"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-mechanic_1f469-200d-1f527.png",
"alt":"👩‍🔧",
"name":"女人|机械师|修理工|设备|工具|扳手|工人|设备|工程师|蓝领|五金|水管工|电工"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-factory-worker_1f468-200d-1f3ed.png",
"alt":"👨‍🏭",
"name":"男人|工厂|工人|蓝色|衣领|设备|扳手|帽子|装备|工业"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-factory-worker_1f469-200d-1f3ed.png",
"alt":"👩‍🏭",
"name":"女人|工厂|工人|蓝色|衣领|设备|扳手|帽子|装备|工业"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-office-worker_1f468-200d-1f4bc.png",
"alt":"👨‍💼",
"name":"男人|办公室|工人|白领|律师|领带|西装|成功|事业|商人|经理"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-office-worker_1f469-200d-1f4bc.png",
"alt":"👩‍💼",
"name":"女人|办公室|工人|白领|律师|领带|西装|成功|事业|商人|经理"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-scientist_1f468-200d-1f52c.png",
"alt":"👨‍🔬",
"name":"人|科学家|航空|航天|教育|芯片|高端|高级|男性|物理学家|生物学家|高科技|化学家"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-scientist_1f469-200d-1f52c.png",
"alt":"👩‍🔬",
"name":"人|科学家|航空|航天|教育|芯片|高端|高级|男性|物理学家|生物学家|高科技|化学家|女性"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-technologist_1f468-200d-1f4bb.png",
"alt":"👨‍💻",
"name":"男|技术专家|技术|代码|程序员|谷歌|程序|计算机|开发人员|码农|软件|电脑"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-technologist_1f469-200d-1f4bb.png",
"alt":"👩‍💻",
"name":"女|技术专家|技术|代码|程序员|谷歌|程序|计算机|开发人员|码农|软件|电脑"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-singer_1f468-200d-1f3a4.png",
"alt":"👨‍🎤",
"name":"|艺人男人|歌手|明星|唱歌|艺术家|演员"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-singer_1f469-200d-1f3a4.png",
"alt":"👩‍🎤",
"name":"女人|歌手|明星|唱歌|艺术家|演员|艺人|"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-artist_1f468-200d-1f3a8.png",
"alt":"👨‍🎨",
"name":"男人|艺术家|绘画|雕塑|陶器|油画|书法|花卉"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-artist_1f469-200d-1f3a8.png",
"alt":"👩‍🎨",
"name":"女人|艺术家|绘画|雕塑|陶器|油画|书法|花卉"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-pilot_1f468-200d-2708-fe0f.png",
"alt":"👨‍✈️",
"name":"男人|飞行员|警察|警察局|逮捕|抢劫|盗窃|帽子|机长|船长"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-pilot_1f469-200d-2708-fe0f.png",
"alt":"👩‍✈️",
"name":"女人|飞行员|警察|警察局|逮捕|抢劫|盗窃|帽子|机长|船长"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-astronaut_1f468-200d-1f680.png",
"alt":"👨‍🚀",
"name":"人|宇航员|航空|航天|空间|宇宙|地球|行星|外层空间|男性"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-astronaut_1f469-200d-1f680.png",
"alt":"👩‍🚀",
"name":"女性|宇航员|航空|航天|空间|宇宙|地球|行星|太空"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-firefighter_1f468-200d-1f692.png",
"alt":"👨‍🚒",
"name":"男|消防员|消防|警察|SOS|911|消防车"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-firefighter_1f469-200d-1f692.png",
"alt":"👩‍🚒",
"name":"女|消防员|消防|警察|SOS|911|消防车"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/police-officer_1f46e.png",
"alt":"👮",
"name":"人|帽子|男人|警官|警察"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-police-officer_1f46e-200d-2642-fe0f.png",
"alt":"👮‍♂️",
"name":"人|帽子|男人|警官|警察"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-police-officer_1f46e-200d-2640-fe0f.png",
"alt":"👮‍♀️",
"name":"人|帽子|女人|警官|警察"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/sleuth-or-spy_1f575.png",
"alt":"🕵️",
"name":"侦探|检查员|警察|调查|犯罪|抢劫|盗窃|谋杀|间谍"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-sleuth_1f575-fe0f-200d-2642-fe0f.png",
"alt":"🕵️‍♂️",
"name":"侦探|检查员|警察|调查|犯罪|抢劫|盗窃|谋杀|间谍|警探|探长|男"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-sleuth_1f575-fe0f-200d-2640-fe0f.png",
"alt":"🕵️‍♀️",
"name":"侦探|检查员|警察|调查|犯罪|抢劫|盗窃|谋杀|间谍|警探|探长|女"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/guardsman_1f482.png",
"alt":"💂",
"name":"人|帽子|男人|伙计|警卫|卫兵|卫士|守卫"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-guard_1f482-200d-2642-fe0f.png",
"alt":"💂‍♂️",
"name":"人|帽子|男人|伙计|警卫|卫兵|卫士|守卫"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-guard_1f482-200d-2640-fe0f.png",
"alt":"💂‍♀️",
"name":"人|帽子|女|伙计|警卫|卫兵|卫士|守卫"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/construction-worker_1f477.png",
"alt":"👷",
"name":"建筑|装饰|黄色|脸|男人|房子|帽子|工人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/male-construction-worker_1f477-200d-2642-fe0f.png",
"alt":"👷‍♂️",
"name":"建筑|装饰|黄色|脸|男人|房子|帽子|工人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/female-construction-worker_1f477-200d-2640-fe0f.png",
"alt":"👷‍♀️",
"name":"建筑|装饰|黄色|脸|女人|房子|帽子|工人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/prince_1f934.png",
"alt":"🤴",
"name":"王子|皇室|皇宫|贵族|帽子|皇冠|男人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/princess_1f478.png",
"alt":"👸",
"name":"公主|皇室|皇宫|贵族|帽子|皇冠|人|女人|童话"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-with-turban_1f473.png",
"alt":"👳",
"name":"民族|围巾|头巾|胡须|种族|男人|人|帽子"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-wearing-turban_1f473-200d-2642-fe0f.png",
"alt":"👳‍♂️",
"name":"民族|围巾|头巾|胡须|种族|男人|人|帽子"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-wearing-turban_1f473-200d-2640-fe0f.png",
"alt":"👳‍♀️",
"name":"民族|围巾|头巾|胡须|种族|女人|人|帽子"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/person-with-headscarf_1f9d5.png",
"alt":"🧕",
"name":"女人|头巾|民族|围巾|种族|伊斯兰|头饰|穆斯林"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/pregnant-woman_1f930.png",
"alt":"🤰",
"name":"怀孕|女人|大|肚子|婴儿|孕妇"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/breast-feeding_1f931.png",
"alt":"🤱",
"name":"母乳|喂养|胸部|女性|乳房|喂奶|婴儿"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/baby-angel_1f47c.png",
"alt":"👼",
"name":"宝贝|天使|儿童|孩子"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/father-christmas_1f385.png",
"alt":"🎅",
"name":"人|帽子|冬天|假日|圣诞节|圣诞老人|节日"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/mother-christmas_1f936.png",
"alt":"🤶",
"name":"人|帽子|冬天|假日|圣诞节|圣诞老人|奶奶"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/mage_1f9d9.png",
"alt":"🧙",
"name":"魔术师|表演|男|法师|男巫|男魔术师"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-mage_1f9d9-200d-2642-fe0f.png",
"alt":"🧙‍♂️",
"name":"魔术师|表演|男|法师|男巫|男魔术师"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-mage_1f9d9-200d-2640-fe0f.png",
"alt":"🧙‍♀️",
"name":"魔术师|表演|女|法师|女巫|女魔术师"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/fairy_1f9da.png",
"alt":"🧚",
"name":"天使|翅膀|飞翔|女人|精灵|仙子|花仙|魔法|魔力"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-fairy_1f9da-200d-2642-fe0f.png",
"alt":"🧚‍♂️",
"name":"天使|翅膀|飞翔|男人|精灵|魔法|魔力"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-fairy_1f9da-200d-2640-fe0f.png",
"alt":"🧚‍♀️",
"name":"天使|翅膀|飞翔|女人|精灵|魔法|魔力|仙子|花仙"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/vampire_1f9db.png",
"alt":"🧛",
"name":"恶魔|僵尸|吸血鬼|怪物|变种|恐怖|血液"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-vampire_1f9db-200d-2642-fe0f.png",
"alt":"🧛‍♂️",
"name":"恶魔|僵尸|吸血鬼|怪物|变种|恐怖|血液"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-vampire_1f9db-200d-2640-fe0f.png",
"alt":"🧛‍♀️",
"name":"恶魔|僵尸|吸血鬼|怪物|变种|恐怖|血液|男"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/merperson_1f9dc.png",
"alt":"🧜",
"name":"美人鱼|鱼|水|海洋|怪物|人鱼"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/merman_1f9dc-200d-2642-fe0f.png",
"alt":"🧜‍♂️",
"name":"美人鱼|鱼|水|海洋|怪物|人鱼|雄性|男"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/merwoman_1f9dc-200d-2640-fe0f.png",
"alt":"🧜‍♀️",
"name":"美人鱼|鱼|水|海洋|怪物|人鱼|女性"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/elf_1f9dd.png",
"alt":"🧝",
"name":"精灵|夜晚|怪物|变种|传说|夜叉|魔术|魔法"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-elf_1f9dd-200d-2642-fe0f.png",
"alt":"🧝‍♂️",
"name":"精灵|夜晚|怪物|变种|传说|夜叉|魔术|魔法|男"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-elf_1f9dd-200d-2640-fe0f.png",
"alt":"🧝‍♀️",
"name":"精灵|夜晚|怪物|变种|传说|夜叉|魔术|魔法|女"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/genie_1f9de.png",
"alt":"🧞",
"name":"精灵|夜晚|怪物|变种|传说|幽灵|魔术|魔法|妖怪"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-genie_1f9de-200d-2640-fe0f.png",
"alt":"🧞‍♀️",
"name":"精灵|夜晚|怪物|变种|传说|幽灵|魔术|魔法|女"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/zombie_1f9df.png",
"alt":"🧟",
"name":"怪物|变种|传说|幽灵|僵尸|丧尸"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-zombie_1f9df-200d-2640-fe0f.png",
"alt":"🧟‍♀️",
"name":"怪物|变种|传说|幽灵|僵尸|丧尸|女"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/face-massage_1f486.png",
"alt":"💆",
"name":"按摩|手势|动作|语言|人|女人|美容|spa|头痛"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-getting-face-massage_1f486-200d-2642-fe0f.png",
"alt":"💆‍♂️",
"name":"按摩|手势|动作|语言|人|男人|美容|spa|头痛"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-getting-face-massage_1f486-200d-2640-fe0f.png",
"alt":"💆‍♀️",
"name":"按摩|手势|动作|语言|人|女人|美容|spa|头痛"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/haircut_1f487.png",
"alt":"💇",
"name":"理发|手势|动作|剪刀|人|女人|剪头发"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-getting-haircut_1f487-200d-2642-fe0f.png",
"alt":"💇‍♂️",
"name":"理发|手势|动作|剪刀|人|男人|剪头发"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-getting-haircut_1f487-200d-2640-fe0f.png",
"alt":"💇‍♀️",
"name":"理发|手势|动作|剪刀|人|女人|剪头发"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/pedestrian_1f6b6.png",
"alt":"🚶",
"name":"步行|跑步|放松|快乐|休息|减肥|运动|徒步|走路|行人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-walking_1f6b6-200d-2642-fe0f.png",
"alt":"🚶‍♂️",
"name":"步行|跑步|放松|快乐|休息|减肥|运动|徒步|走路|行人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-walking_1f6b6-200d-2640-fe0f.png",
"alt":"🚶‍♀️",
"name":"步行|跑步|放松|快乐|休息|减肥|运动|徒步|走路|行人|女"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/runner_1f3c3.png",
"alt":"🏃",
"name":"步行|跑步|放松|快乐|休息|减肥|运动|马拉松"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-running_1f3c3-200d-2642-fe0f.png",
"alt":"🏃‍♂️",
"name":"步行|跑步|放松|快乐|休息|减肥|运动|马拉松"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-running_1f3c3-200d-2640-fe0f.png",
"alt":"🏃‍♀️",
"name":"步行|跑步|放松|快乐|休息|减肥|运动|马拉松|女人|冲|前进"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/dancer_1f483.png",
"alt":"💃",
"name":"舞蹈|表演|舞台|裙子|人物|女人|性感|女孩|跳舞"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-dancing_1f57a.png",
"alt":"🕺",
"name":"舞蹈|表演|舞台|人物|男人|性感|运动|跳舞"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-with-bunny-ears_1f46f.png",
"alt":"👯",
"name":"人|女人|聚会|庆祝|活动|性感|女孩|夜晚|兔女郎|排队|兔耳朵"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/men-with-bunny-ears-partying_1f46f-200d-2642-fe0f.png",
"alt":"👯‍♂️",
"name":"人|女人|聚会|庆祝|活动|性感|女孩|夜晚|兔女郎|排队|兔耳朵"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/women-with-bunny-ears-partying_1f46f-200d-2640-fe0f.png",
"alt":"👯‍♀️",
"name":"人|女人|聚会|庆祝|活动|性感|女孩|夜晚|兔女郎|排队|兔耳朵"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/person-in-steamy-room_1f9d6.png",
"alt":"🧖",
"name":"蒸汽|轻松|快乐|休息|减肥|运动|桑拿|洗澡|蒸房"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-in-steamy-room_1f9d6-200d-2642-fe0f.png",
"alt":"🧖‍♂️",
"name":"蒸汽|轻松|快乐|休息|减肥|运动|桑拿|洗澡|蒸房|男"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-in-steamy-room_1f9d6-200d-2640-fe0f.png",
"alt":"🧖‍♀️",
"name":"蒸汽|轻松|快乐|休息|减肥|运动|桑拿|洗澡|蒸房|女"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/person-climbing_1f9d7.png",
"alt":"🧗",
"name":"节假日|周末|高山|攀岩|体重|减肥|运动|登山|攀爬"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-climbing_1f9d7-200d-2642-fe0f.png",
"alt":"🧗‍♂️",
"name":"节假日|周末|高山|攀岩|体重|减肥|运动|登山|攀爬|男"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-climbing_1f9d7-200d-2640-fe0f.png",
"alt":"🧗‍♀️",
"name":"节假日|周末|高山|攀岩|体重|减肥|运动|登山|攀爬|女"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/person-in-lotus-position_1f9d8.png",
"alt":"🧘",
"name":"打坐|姿势|动作|瑜伽|体重|减肥|运动|盘腿|冥想|坐"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-in-lotus-position_1f9d8-200d-2642-fe0f.png",
"alt":"🧘‍♂️",
"name":"打坐|姿势|动作|瑜伽|体重|减肥|运动|盘腿|冥想|坐"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/woman-in-lotus-position_1f9d8-200d-2640-fe0f.png",
"alt":"🧘‍♀️",
"name":"打坐|姿势|动作|瑜伽|体重|减肥|运动|盘腿|冥想|坐|女"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/kiss_1f48f.png",
"alt":"💏",
"name":"人|爱|心|夫妻|约会|幸福|亲吻|爱心|接吻|浪漫|甜蜜"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/kiss-man-man_1f468-200d-2764-fe0f-200d-1f48b-200d-1f468.png",
"alt":"👨‍❤️‍💋‍👨",
"name":"人|爱|心|夫妻|约会|幸福|亲吻|爱心|接吻|浪漫|甜蜜"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/kiss-woman-woman_1f469-200d-2764-fe0f-200d-1f48b-200d-1f469.png",
"alt":"👩‍❤️‍💋‍👩",
"name":"人|爱|心|夫妻|约会|幸福|亲吻|爱心|接吻|浪漫|甜蜜"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/couple-with-heart_1f491.png",
"alt":"💑",
"name":"人|爱|心|夫妻|约会|幸福|亲吻|爱心|接吻|浪漫|甜蜜"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/couple-with-heart-man-man_1f468-200d-2764-fe0f-200d-1f468.png",
"alt":"👨‍❤️‍👨",
"name":"人|爱|心|夫妻|约会|幸福|亲吻|爱心|接吻|浪漫|甜蜜|同性恋"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/couple-with-heart-woman-woman_1f469-200d-2764-fe0f-200d-1f469.png",
"alt":"👩‍❤️‍👩",
"name":"人|爱|心|夫妻|约会|幸福|亲吻|爱心|接吻|浪漫|甜蜜|同性恋"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family_1f46a.png",
"alt":"👪",
"name":"人|家庭|婴儿|儿童|女孩|男孩|幸福|爸爸|妈妈"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-woman-girl_1f468-200d-1f469-200d-1f467.png",
"alt":"👨‍👩‍👧",
"name":"人|家庭|婴儿|儿童|女孩|男孩|幸福|爸爸|妈妈"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-woman-girl-boy_1f468-200d-1f469-200d-1f467-200d-1f466.png",
"alt":"👨‍👩‍👧‍👦",
"name":"人|家庭|婴儿|儿童|女孩|男孩|幸福|爸爸|妈妈"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-woman-boy-boy_1f468-200d-1f469-200d-1f466-200d-1f466.png",
"alt":"👨‍👩‍👦‍👦",
"name":"人|家庭|婴儿|儿童|女孩|男孩|幸福|爸爸|妈妈"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-woman-girl-girl_1f468-200d-1f469-200d-1f467-200d-1f467.png",
"alt":"👨‍👩‍👧‍👧",
"name":"人|家庭|婴儿|儿童|女孩|男孩|幸福|爸爸|妈妈"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-man-boy_1f468-200d-1f468-200d-1f466.png",
"alt":"👨‍👨‍👦",
"name":"人|家庭|婴儿|儿童|女孩|男孩|幸福|爸爸|妈妈"
}
],
[
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-man-girl_1f468-200d-1f468-200d-1f467.png",
"alt":"👨‍👨‍👧",
"name":"人|同性恋|家庭|男人|婴儿|孩子|女孩|男孩|LGBT|爸爸|妈妈"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-man-girl-boy_1f468-200d-1f468-200d-1f467-200d-1f466.png",
"alt":"👨‍👨‍👧‍👦",
"name":"人|同性恋|家庭|男人|婴儿|孩子|女孩|男孩|LGBT|爸爸|妈妈"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-man-girl-girl_1f468-200d-1f468-200d-1f467-200d-1f467.png",
"alt":"👨‍👨‍👧‍👧",
"name":"人|同性恋|家庭|男人|婴儿|孩子|女孩|男孩|LGBT|爸爸|妈妈"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-woman-woman-boy_1f469-200d-1f469-200d-1f466.png",
"alt":"👩‍👩‍👦",
"name":"人|家庭|妇女|婴儿|儿童|女孩|男孩|同性恋|女同性恋|妈妈|母亲"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-woman-woman-girl_1f469-200d-1f469-200d-1f467.png",
"alt":"👩‍👩‍👧",
"name":"人|家庭|妇女|婴儿|儿童|女孩|男孩|同性恋|女同性恋|妈妈|母亲"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-woman-woman-girl-boy_1f469-200d-1f469-200d-1f467-200d-1f466.png",
"alt":"👩‍👩‍👧‍👦",
"name":"人|家庭|妇女|婴儿|儿童|女孩|男孩|同性恋|女同性恋|妈妈|母亲"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-woman-woman-boy-boy_1f469-200d-1f469-200d-1f466-200d-1f466.png",
"alt":"👩‍👩‍👦‍👦",
"name":"人|家庭|妇女|婴儿|儿童|女孩|男孩|同性恋|女同性恋|妈妈|母亲"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-woman-woman-girl-girl_1f469-200d-1f469-200d-1f467-200d-1f467.png",
"alt":"👩‍👩‍👧‍👧",
"name":"人|家庭|妇女|婴儿|儿童|女孩|男孩|同性恋|女同性恋|妈妈|母亲"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-boy_1f468-200d-1f466.png",
"alt":"👨‍👦",
"name":"人|家庭|婴儿|儿童|幸福|父亲|兄弟|父子|家人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-girl_1f468-200d-1f467.png",
"alt":"👨‍👧",
"name":"人|家庭|婴儿|儿童|幸福|父亲|兄弟|父子|家人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-girl-boy_1f468-200d-1f467-200d-1f466.png",
"alt":"👨‍👧‍👦",
"name":"人|家庭|婴儿|儿童|幸福|父亲|兄弟|父子|家人|姐妹"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-man-girl-girl_1f468-200d-1f467-200d-1f467.png",
"alt":"👨‍👧‍👧",
"name":"人|家庭|婴儿|儿童|幸福|父亲|兄弟|父子|家人|姐妹"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-woman-boy-boy_1f469-200d-1f466-200d-1f466.png",
"alt":"👩‍👦‍👦",
"name":"人|家庭|婴儿|儿童|幸福|家人|姐妹"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-woman-girl_1f469-200d-1f467.png",
"alt":"👩‍👧",
"name":"人|家庭|婴儿|儿童|幸福|家人|姐妹"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/family-woman-girl-boy_1f469-200d-1f467-200d-1f466.png",
"alt":"👩‍👧‍👦",
"name":"人|家庭|婴儿|儿童|幸福|家人|姐妹"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/bust-in-silhouette_1f464.png",
"alt":"👤",
"name":"人物|照片|个人资料|人类|灰色|半身像|人像|照相"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/busts-in-silhouette_1f465.png",
"alt":"👥",
"name":"人物|照片|个人资料|人类|灰色|双人像|半身像|剪影"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/wind-blowing-face_1f32c.png",
"alt":"🌬️",
"name":"迎风面|大风|狂风|吹"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/snowman_2603.png",
"alt":"☃️",
"name":"雪人|雪|冷|雪与雪人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/snowman-without-snow_26c4.png",
"alt":"",
"name":"雪人|雪|冷"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/japanese-dolls_1f38e.png",
"alt":"🎎",
"name":"人|日本|洋娃娃|人偶|庆祝|日本人形"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/moyai_1f5ff.png",
"alt":"🗿",
"name":"旅游|度假|莫埃|复活岛|复活节岛|复活节岛石像|摩埃|摩艾|摩艾石像|毛埃"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/bride-with-veil_1f470.png",
"alt":"👰",
"name":"新娘|面纱|人|婚礼|婚姻|新婚|女人"
},
{
"url":"https://emoji.emojipic.cn/pic/72/apple/man-in-tuxedo_1f935.png",
"alt":"🤵",
"name":"燕尾服|礼服|礼仪|接待|派对|艺术|商务|新郎|男士"
}
]
];
/**@dateTimeFliter 转换格林日期时间格式为常用日期格式
* @time[必填] Date 格林日期格式
* @part[可选,默认:0] Number 选择返回日期时间部分 列:0:返回所有 1:只返回日期 2:只返回时间
* @dateComplete[可选,默认:true] Boolean 日期位数不足是否添0补齐:true:补齐,false:不补齐
* @timeComplete[可选,默认:true] Boolean 时间位数不足是否添0补齐:true:补齐,false:不补齐
* @dateConnector[可选,默认:-] String 年月日连接符 例:- :/
* @timeConnector[可选,默认::] String 时间连接符 例:- :/
* @hour12[可选,默认:false] Boolean 是否返回12小时制时间 例:true:返回12小时制时间 false:返回24小时制时间
* @return '2019-11-25 15:05:54' String 返回示例
* **/
commen.dateTimeFliter = function(time, part = 0, dateComplete = true, timeComplete = true, dateConnector = '-',
timeConnector = ':', hour12 = false) {
let year = time.getFullYear()
let month = time.getMonth() + 1
let day = time.getDate()
let hour = time.getHours()
let minute = time.getMinutes()
let second = time.getSeconds()
let dateStr = ''
let timeStr = ''
//转换日期
if (dateComplete) { //添0补齐
if (month < 10) {
month = '0' + month
}
if (day < 10) {
day = '0' + day
}
}
dateStr = year + dateConnector + month + dateConnector + day
//转换时间
//修改小时制
if (hour12) {
if (hour > 12) {
hour = hour - 12
if (timeComplete) {
if (hour < 10) {
hour = '下午 ' + '0' + hour
} else {
hour = '下午 ' + hour
}
}
} else {
if (timeComplete) {
if (hour < 10) {
hour = '上午 ' + '0' + hour
} else {
hour = '上午 ' + hour
}
}
}
}
//判断分钟与秒
if (timeComplete) { //添0补齐
if (minute < 10) {
minute = '0' + minute
}
if (second < 10) {
second = '0' + second
}
}
timeStr = hour + timeConnector + minute + timeConnector + second
//合成输出值
if (part == 0) {
return dateStr + ' ' + timeStr
} else if (part == 1) {
return dateStr
} else if (part == 2) {
return timeStr
}
return '传参有误'
}
export default commen
...@@ -19,6 +19,15 @@ module.exports = { ...@@ -19,6 +19,15 @@ module.exports = {
TOKENNAME: 'Authori-zation', TOKENNAME: 'Authori-zation',
Private_key: 'QAZWSXEDC123RFVA', //私钥 与后台基础设置中API安全秘钥相同,谨慎修改 Private_key: 'QAZWSXEDC123RFVA', //私钥 与后台基础设置中API安全秘钥相同,谨慎修改
// //测试 IM
// sdkAppID:1400494134,
// sdkAppKey:"8abfcf51fcf43b18f8ec01b6e924f058109502da7905ef4fb043ea90b0fb64ea",
//正式 IM
sdkAppID:1400583520 ,
sdkAppKey:"2a901ba4178ea5d194aa6bfd3c6a7d2da8dccd7ccc85155d618d8921d8bddbda",
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment