no message

cyl/master
jscyl13849007907 1 week ago
parent 32a71ba4da
commit bcb865f27a

@ -1,13 +1,10 @@
<script lang="ts">
import RootStore from "@xkit-yx/im-store-v2";
// import V2NIM, { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK";
// import { getMsgContentTipByType } from "./pages/NEUIKit/utils/msg";
// import { STORAGE_KEY } from "./pages/NEUIKit/utils/constants";
// import { isWxApp } from "./pages/NEUIKit/utils";
// import { V2NIMMessage, V2NIMMessagePushConfig } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService";
// import { unix } from "dayjs";
import { V2NIMMessage, V2NIMMessagePushConfig, V2NIMConversation } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService";
import { unix } from "dayjs";
import { V2NIMConst, NIM } from "./utils/nim";
import.meta.env.VITE_APP_THEMECOLOR = "#000";
// console.log("", uni.getSystemInfoSync());
let isWxApp = uni.getSystemInfoSync().uniPlatform == "mp-weixin";
export default {
globalData: {
@ -45,6 +42,7 @@ export default {
},
onShow: function (options) {
let that = this;
uni.setStorageSync('is_use_im',1);
let requestComeFrom = this.G.globalConstantData.requestComeFrom;
uni.setStorageSync("requestComeFrom", requestComeFrom && (requestComeFrom == "assistant_miniapp" || requestComeFrom == "supply_chain_miniapp") ? "isToB" : "isToC");
@ -200,17 +198,17 @@ export default {
}
}
// if (uni.getStorageSync("apply-token") && uni.getStorageSync("apply-uid")) {
// // console.log("app.vue ");
// that.initWyyx();
// }else{
// if(uni.getStorageSync("apply-token")){
// that.G.checkToken().then(()=>{
// console.log("")
// that.initWyyx();
// })
// }
// }
if (uni.getStorageSync("apply-token") && uni.getStorageSync("apply-uid")) {
// console.log("app.vue ");
that.initWyyx();
}else{
if(uni.getStorageSync("apply-token")){
that.G.checkToken().then(()=>{
console.log("已执行")
that.initWyyx();
})
}
}
uni.removeStorageSync("selectedCity");
uni.showShareMenu({
shareTypes: "normal",
@ -273,153 +271,217 @@ export default {
},
initWyyx() {
let that = this;
that.F.wyyxPost(
that.api.wyyx_getConfig,
{
userId: uni.getStorageSync("apply-uid"),
},
(res) => {
// console.log("wyyx_getConfig", res);
//
if (!res || !res.appKey || !res.accid || !res.token) {
console.error("获取IM配置失败参数不完整");
return;
}
let resData = {
appkey: res.appKey,
accid: res.accid,
token: res.token,
};
// IM
uni.setStorageSync("im-appkey", resData.appkey);
uni.setStorageSync("im-accid", resData.accid);
uni.setStorageSync("im-token", resData.token);
const imOptions = {
appkey: resData.appkey,
account: resData.accid,
token: resData.token,
};
this.initNim(imOptions);
},
);
},
async initNim(opts) {
// let that = this;
// // nim sdk
// const nim = (uni.$UIKitNIM = V2NIM.getInstance(
// {
// appkey: opts.appkey,
// needReconnect: true,
// // "reconnectionAttempts": 5,
// debugLevel: "warning",
// apiVersion: "v2",
// enableV2CloudConversation: true,
// },
// {
// V2NIMLoginServiceConfig: {
// lbsUrls: isWxApp ? ["https://lbs.netease.im/lbs/wxwebconf.jsp"] : ["https://lbs.netease.im/lbs/webconf.jsp"],
// linkUrl: isWxApp ? "wlnimsc0.netease.im" : "weblink.netease.im",
// /**
// * 使 ID
// */
// isFixedDeviceId: true,
// },
// },
// ));
// that.globalData.nim = nim;
// // store
// const store = (uni.$UIKitStore = new RootStore(
// nim,
// {
// addFriendNeedVerify: false,
// // p2p p2p false
// p2pMsgReceiptVisible: true,
// // false
// teamMsgReceiptVisible: true,
// teamAgreeMode: V2NIMConst.V2NIMTeamAgreeMode.V2NIM_TEAM_AGREE_MODE_NO_AUTH,
// sendMsgBefore: async (options: { msg: V2NIMMessage; conversationId: string; serverExtension?: Record<string, unknown> }) => {
// const pushContent = getMsgContentTipByType({
// text: options.msg.text,
// messageType: options.msg.messageType,
// });
// // options.serverExtension = JSON.stringify({
// // messageComeFrom: 'zgb',
// // messageComeFromAppId: uni.getAccountInfoSync().miniProgram.appId
// // })
// const yxAitMsg = options.serverExtension
// ? options.serverExtension.yxAitMsg
// : {
// forcePushIDsList: "[]",
// needForcePush: false,
// test: "qqq",
// };
// // at 线
// const { forcePushIDsList, needForcePush } = yxAitMsg
// ? // @ts-ignore
// store.msgStore._formatExtAitToPushInfo(yxAitMsg, options.msg.text)
// : { forcePushIDsList: "[]", needForcePush: false };
// // console.log("forcePushIDsList: ", forcePushIDsList);
// const { conversationId } = options;
// const conversationType = nim.V2NIMConversationIdUtil.parseConversationType(conversationId);
// const targetId = nim.V2NIMConversationIdUtil.parseConversationTargetId(conversationId);
// // console.log("targetIdtargetId app", targetId, " ", uni.getStorageSync("ima-cod"));
// const pushPayload = JSON.stringify({
// // oppo
// oppoField: {
// click_action_type: 4, // oppo
// click_action_activity: "", // TODO
// action_parameters: {
// sessionId: targetId,
// sessionType: conversationType,
// }, //
// },
// // vivo
// vivoField: {
// pushMode: 0, //0 1 0
// },
// // huawei
// hwField: {
// click_action: {
// type: 1,
// action: "", // TODO
// },
// androidConfig: {
// category: "IM",
// data: JSON.stringify({
// sessionId: targetId,
// sessionType: conversationType,
// }),
// },
// },
// //
// sessionId: targetId,
// sessionType: conversationType,
// });
// const pushConfig: V2NIMMessagePushConfig = {
// pushEnabled: uni.getStorageSync("im-robotOpen") == 1 ? true : false,
// pushNickEnabled: true,
// forcePush: needForcePush,
// forcePushContent: pushContent,
// forcePushAccountIds: forcePushIDsList,
// pushPayload: "{}",
// pushContent,
// };
// options.messageComeFrom = "zgb";
// options.messageComeFromAppId = uni.getAccountInfoSync().miniProgram.appId;
// return { ...options, pushConfig };
// },
// },
// "UniApp",
// ));
// // #ifdef APP-PLUS
// const nimPushPlugin = uni.requireNativePlugin("NIMUniPlugin-PluginModule");
// nim.V2NIMSettingService.setOfflinePushConfig(nimPushPlugin, {
// miPush: {
// appId: "2882303761520397320",
// appKey: "5102039734320",
// certificateName: "xiaomiCertificateName",
// },
// vivoPush: {
// certificateName: "vivoCertificateName",
// },
// oppoPush: {
// appId: "32967155",
// appKey: "b98618cb272944dea324af6421d42a79",
// secret: "0b7ce705a2304a17b78f20011c18890c",
// certificateName: "opopCertificateName",
// },
// honorPush: {
// certificateName: "rongyaoCertificateName",
// },
// apns: {
// // certificateName: 'AuthKey_98P8URRXUD_test', //:
// certificateName: "AuthKey_98P8URRXUD", //
// },
// });
// // console.log(" ");
// // #endif
// nim.V2NIMLoginService.login(opts.account, opts.token).then(() => {});
// nim.V2NIMConversationService.on("onConversationChanged", function (conversationList: V2NIMConversation[]) {
// // console.log(":", conversationList);
// let _bool = conversationList.filter((item) => {
// return Number(item.unreadCount) > 0;
// });
// // console.log("bool:", _bool);
// if (_bool && _bool.length > 0) {
// that.playAudio(); //
// }
// });
let that = this;
const account = opts.account;
const token = opts.token;
const appkey = opts.appkey;
const params1 = {
appkey: appkey,
debugLevel: "warning",
apiVersion: "v2",
readReceiptEnabled: true,
enableV2CloudConversation: true,
};
console.log("ems NIM", NIM);
const nim = NIM.getInstance(params1, {
V2NIMLoginServiceConfig: {
lbsUrls: isWxApp ? ["https://lbs.netease.im/lbs/wxwebconf.jsp"] : ["https://lbs.netease.im/lbs/webconf.jsp"],
linkUrl: isWxApp ? "wlnimsc0.netease.im" : "weblink.netease.im",
isFixedDeviceId: true,
autoLogin: true,
},
});
this.offWatchIM(nim);
this.watchIMLoginStatus(nim);
this.watchIMFriendChange(nim);
this.watchIMMessageChange(nim);
try {
await nim.V2NIMLoginService.login(account, token, {
forceMode: false,
timeout: 60000,
retryCount: 3,
authType: 0,
});
that.globalData.nim = nim;
that.G.nim = nim;
} catch (err) {
console.error("error", err);
}
},
/**
* IM信息更新监听回调
*/
watchIMMessageChange(nim) {
let that = this;
//
nim.V2NIMMessageService.on("onReceiveMessages", function (messages) {
console.log("收到 V2NIMMessageService 模块的 onReceiveMessages 事件", messages);
let message = messages[0];
uni.$emit("updateMessageList", { ...message, messageFrom: "yunxin" });
});
//
nim.V2NIMMessageService.on("onSendMessage", function (messages) {
console.log("收到 V2NIMMessageService 模块的 onSendMessage 事件", messages);
});
//
nim.V2NIMMessageService.on("onReceiveP2PMessageReadReceipts", function (readReceipts) {
console.log("收到 V2NIMMessageService 模块的 onReceiveP2PMessageReadReceipts 事件", readReceipts);
uni.$emit("updateMessageReadInfo", readReceipts[0]);
});
//
nim.V2NIMMessageService.on("onMessageRevokeNotifications", function (messages) {
console.log("收到 V2NIMMessageService 模块的 onMessageRevokeNotifications 事件", messages);
});
//
nim.V2NIMMessageService.on("onReceiveMessagesModified", function (messages) {
console.log("收到 V2NIMMessageService 模块的 onReceiveMessagesModified 事件", messages);
uni.$emit("updateMessage", messages);
});
//
nim.V2NIMConversationService.on("onConversationChanged", function (conversationList: V2NIMConversation[]) {
console.log("初始化监听会话:", conversationList);
uni.$emit("updateConversationList");
let unreadConversations = conversationList.filter((item) => {
return Number(item.unreadCount) > 0;
});
console.log("未读会话数量:", unreadConversations);
if (unreadConversations.length > 0) {
that.playAudio();
}
});
//
nim.V2NIMConversationService.on("onTotalUnreadCountChanged", function (messages) {
console.log("收到 V2NIMMessageService 模块的 onTotalUnreadCountChanged 事件", messages);
uni.$emit("newMessage", { count: messages, type: "message" });
uni.setStorageSync("chat_info", { count: messages, type: "message" });
});
//
nim.V2NIMConversationService.on("onConversationDeleted", function (conversationIds) {
uni.$emit("deleteConversationList", conversationIds);
console.log("conversationIds", conversationIds);
});
},
offWatchIM(nim) {
//
nim.V2NIMMessageService.off("onReceiveMessages");
nim.V2NIMMessageService.off("onMessageRevokeNotifications");
nim.V2NIMMessageService.off("onReceiveMessagesModified");
nim.V2NIMConversationService.off("onConversationChanged");
nim.V2NIMConversationService.off("onConversationDeleted");
nim.V2NIMConversationService.off("onReceiveP2PMessageReadReceipts");
//
nim.V2NIMFriendService.off("onFriendAdded");
nim.V2NIMFriendService.off("onFriendDeleted");
nim.V2NIMFriendService.off("onFriendAddApplication");
nim.V2NIMFriendService.off("onFriendAddRejected");
nim.V2NIMFriendService.off("onFriendInfoChanged");
},
/**
* IM好友信息更新监听回调
*/
watchIMFriendChange(nim) {
//
nim.V2NIMFriendService.on("onFriendAdded", function (friend) {
console.log("watchIMFriend", friend);
});
//
nim.V2NIMFriendService.on("onFriendDeleted", function (accountId, deletionType) {
console.log("watchIMFriend", accountId);
console.log("watchIMFriend", deletionType);
});
//
nim.V2NIMFriendService.on("onFriendAddApplication", function (application) {
console.log("watchIMFriend", application);
});
//
nim.V2NIMFriendService.on("onFriendAddRejected", function (rejection) {
console.log("watchIMFriend", rejection);
});
//
nim.V2NIMFriendService.on("onFriendInfoChanged", function (friend) {
console.log("watchIMFriend", friend);
});
},
/**
* IM登录状态监听回调
*/
watchIMLoginStatus(nim) {
/**
* 登录瞬时状态监听
*/
//
nim.V2NIMLoginService.on("onLoginStatus", function (arg1) {
console.log("收到 V2NIMLoginService 模块的 onLoginStatus 事件", arg1);
});
//
nim.V2NIMLoginService.on("onLoginFailed", function (arg1) {
console.log("收到 V2NIMLoginService 模块的 onLoginFailed 事件", arg1);
});
// 线
nim.V2NIMLoginService.on("onKickedOffline", function (arg1) {
console.log("收到 V2NIMLoginService 模块的 onKickedOffline 事件", arg1);
});
//
nim.V2NIMLoginService.on("onLoginClientChanged", function (arg1) {
console.log("收到 V2NIMLoginService 模块的 onLoginClientChanged 事件", arg1);
});
/**
* 登录持续性状态监听
*/
//
nim.V2NIMLoginService.on("onConnectStatus", function (arg1) {
console.log("收到 V2NIMLoginService 模块的 onConnectStatus 事件", arg1);
});
//
nim.V2NIMLoginService.on("onDisconnected", function (arg1) {
console.log("收到 V2NIMLoginService 模块的 onDisconnected 事件", arg1);
});
//
nim.V2NIMLoginService.on("onConnectFailed", function (arg1) {
console.log("收到 V2NIMLoginService 模块的 onConnectFailed 事件", arg1);
});
//
nim.V2NIMLoginService.on("onDataSync", function (arg1) {
console.log("收到 V2NIMLoginService 模块的 onDataSync 事件", arg1);
});
},
playAudio() {
let that = this;

@ -0,0 +1,299 @@
<template>
<view
class="zb-tooltip"
:style="{
'--theme-bg-color': color,
}"
>
<view class="zb_tooltip_content" @longpress.stop="handleClick">
<slot></slot>
<view class="zb_tooltip__mask" @longpress.stop v-show="isShow" @click="close"></view>
<view
class="zb_tooltip__popper"
@tap.stop="() => {}"
:style="[
style,
{
visibility: isShow ? 'visible' : 'hidden',
color: color === 'white' ? '#333' : '#fff',
boxShadow: color === 'white' ? '0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d' : '',
},
]"
>
<slot name="content">{{ content }}</slot>
<!-- <view
class="zb_popper__icon"
:style="[arrowStyle]"
:class="[
{
zb_popper__up: placement.indexOf('bottom') === 0,
zb_popper__arrow: placement.indexOf('top') === 0,
zb_popper__right: placement.indexOf('right') === 0,
zb_popper__left: placement.indexOf('left') === 0,
},
]"
>
</view> -->
</view>
</view>
</view>
</template>
<script>
export default {
name: "Tooltip",
props: {
visible: Boolean,
rowPosition: {
type: String,
default: "",
},
message: {
type: Object,
default: {},
},
color: {
type: String,
default: "#303133",
},
// placement: {
// type: String,
// default: 'top',
// },
content: {
type: String,
default: "",
},
show: {
type: Boolean,
default: false,
},
//
top: {
type: Number,
default: 150,
},
},
data() {
return {
isShow: this.visible,
title: "Hello",
arrowLeft: 0,
query: null,
style: {},
arrowStyle: {},
placement: "top",
};
},
onLoad() {},
watch: {
isShow: {
handler(val) {
this.$emit("update:visible", val);
},
immediate: true,
},
visible: {
handler(val) {
if (val) {
this.$nextTick(() => {
this.getPosition();
});
}
this.isShow = val;
},
immediate: true,
},
},
mounted() {
// #ifdef H5
window.addEventListener("click", () => {
this.isShow = false;
});
// #endif
this.getPosition();
},
methods: {
close() {
// console.log('this.isShow',this.isShow);
this.isShow = false;
},
fixedWrap() {
this.isShow = false;
},
async handleClick() {
if (this.message && this.message.type == "tip") {
return false;
}
if (this.isShow) {
return (this.isShow = false);
}
await this.getPosition();
this.isShow = true;
},
getPosition() {
let that = this;
return new Promise((resolve) => {
uni
.createSelectorQuery()
.in(this)
.selectAll(".zb_tooltip_content,.zb_tooltip__popper")
.boundingClientRect(async (data) => {
let { left, bottom, right, top, width, height } = data[0] || {};
// let windowInfo = uni.getWindowInfo();
// console.log("windowInfo", windowInfo);
// console.log("data[0]", data[0]);
let obj1 = data[1] || {};
let objStyle = {};
let objStyle1 = {};
if (top <= that.top) {
this.placement = "bottom";
} else {
this.placement = "top";
}
if (this.rowPosition == "left") {
objStyle.left = "0%";
// objStyle.transform = "translateX(-50%)";
} else if (this.rowPosition == "right") {
objStyle.right = "0%";
// objStyle.transform = "translateX(50%)";
} else {
objStyle.left = "50%";
}
switch (this.placement) {
case "top":
// if (obj1.width > width) {
// objStyle.left = `-${(obj1.width - width + 120) / 2}px`
// } else {
// objStyle.left = `${Math.abs(obj1.width - width) / 2}px`
// }
objStyle.bottom = `${height + 4}px`;
// objStyle.left = '30%'
// objStyle1.left = obj1.width - 6 + 'px'
break;
case "bottom":
// if (obj1.width > width) {
// objStyle.left = `-${(obj1.width - width) / 2}px`
// } else {
// objStyle.left = `${Math.abs(obj1.width - width) / 2}px`
// }
// if (!this.isSelf) {
// objStyle.transform = "translateX(-50%)";
// } else {
// objStyle.transform = "translateX(-50%)";
// }
// objStyle.left = "50%";
// objStyle.left = `-${obj1.width - width - 100}px`
objStyle.top = `${height + 4}px`;
// objStyle1.left = obj1.width / 2 - 6 + 'px'
break;
}
this.style = objStyle;
//
this.arrowStyle = objStyle1;
resolve();
})
.exec();
});
},
},
};
</script>
<style lang="scss" scoped>
$theme-bg-color: var(--theme-bg-color);
.zb-tooltip {
position: relative;
}
.zb_tooltip_content {
height: 100%;
/* float: left; */
position: relative;
// display: inline-block;
// display: flex;
// flex-direction: row;
// align-items: center;
/* overflow: hidden; */
}
.zb_tooltip__popper {
/* transform-origin: center top; */
background: $theme-bg-color;
visibility: hidden;
// color:'#fff';
position: absolute;
border-radius: 10px;
font-size: 12px;
padding: 10px 16px;
min-width: 10px;
word-wrap: break-word;
display: inline-block;
white-space: nowrap;
z-index: 99;
}
.zb_tooltip__mask {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
background-color: rgba(256, 256, 256, 0);
z-index: 98;
}
.zb_popper__icon {
width: 0;
height: 0;
z-index: 9;
position: absolute;
}
.zb_popper__arrow {
bottom: -5px;
/* transform-origin: center top; */
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid $theme-bg-color;
}
.zb_popper__right {
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right: 6px solid $theme-bg-color;
left: -5px;
}
.zb_popper__left {
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-left: 6px solid $theme-bg-color;
right: -5px;
}
.zb_popper__up {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid $theme-bg-color;
top: -5px;
}
.fixed {
position: absolute;
width: 100vw;
height: 100vh;
position: fixed;
left: 0;
top: 0;
pointer-events: auto;
background: red;
z-index: -1;
}
</style>

@ -0,0 +1,358 @@
<template>
<view class="g_pb_24">
<div v-for="(item, index) in machineList" :key="index" class="customitem g_bg_f">
<Tooltip ref="tooltipRef" color="white" :isSelf="true" :top="150">
<div class="g_flex_row_start" hover-class="thover" style="padding: 12px 16px" @click="goChatPage(item)" :style="{ backgroundColor: item.stickTop ? '#f5f5f5' : '#fff' }">
<div
class="g_flex_none"
style="border-radius: 50%; width: 48px; height: 48px; background-size: cover; background-repeat: no-repeat; position: relative"
:style="{
'background-image': item.userinfo && item.userinfo[0].avatar ? 'url(' + item.userinfo[0].avatar + ')' : 'none',
}"
>
<div v-if="item.waitcount" style="position: absolute; right: -6px; top: -6px; background-color: #f5222d; width: 20px; height: 20px; border-radius: 50%; text-align: center; line-height: 20px; font-size: 12px; color: #fff">
{{ item.waitcount > 99 ? "99+" : item.waitcount }}
</div>
</div>
<div class="bottom-line g_flex_column_center g_flex_1" style="padding-left: 10px">
<div class="g_fs_17 g_flex_row_between" v-if="item.userinfo && item.userinfo[0].name">
<div class="g_ell_1 g_flex_1" style="color: #333">
{{ item.userinfo[0].name }} <span v-if="item.subtitle" style="color: orange">@{{ item.subtitle }}</span>
</div>
<div class="g_flex_none g_fs_12 g_ml_10" style="color: #999">
{{ item.time }}
</div>
</div>
<!-- 普通文本 -->
<div class="g_fs_14 g_ell_1" style="color: #999; font-size: 12px" v-if="item.lastMessage && item.lastMessage.messageType == 0">
{{ item.lastMessage.text }}
</div>
<!-- tip通知 -->
<div class="g_fs_14 g_ell_1" style="color: #999; font-size: 12px" v-if="item.lastMessage && item.lastMessage.messageType == 10">
{{ item.lastMessage.text }}
</div>
<!-- 图片消息 -->
<div class="g_fs_14 g_ell_1" style="color: #999; font-size: 12px" v-if="item.lastMessage && item.lastMessage.messageType == 1 && item.lastMessage.attachment && item.lastMessage.attachment.raw">[]</div>
<!-- 图片消息 -->
<div class="g_fs_14 g_ell_1" style="color: #999; font-size: 12px" v-if="item.lastMessage && item.lastMessage.messageType == 3 && item.lastMessage.attachment && item.lastMessage.attachment.raw">[]</div>
<!-- 自定义消息 -->
<div class="g_fs_14 g_ell_1" style="color: #999; font-size: 12px" v-if="item.lastMessage && item.lastMessage.messageType == 100 && item.lastMessage.attachment && item.lastMessage.attachment.raw">
<!-- 100001 商家后台 职位卡片 -->
<div v-if="JSON.parse(item.lastMessage.attachment.raw).type == 100001">
{{ JSON.parse(item.lastMessage.attachment.raw).obj.jobName }}
</div>
<!-- 1000011 职位列表 -->
<div v-if="JSON.parse(item.lastMessage.attachment.raw).type == 100011">[]</div>
<!-- 200001 系统提醒 -->
<div v-if="JSON.parse(item.lastMessage.attachment.raw).type == 200001">
用户[
<span class="viewdetails">
{{ item.lastMessage && item.lastMessage.attachment && item.lastMessage.attachment.raw && JSON.parse(item.lastMessage.attachment.raw).userName }}
</span>
]询单需要人工介入请尽快回复
</div>
<!-- 200002 系统通知 -->
<div v-if="JSON.parse(item.lastMessage.attachment.raw).type == 200002">
<span class="">
{{ item.lastMessage && item.lastMessage.text }}
</span>
</div>
<!-- 未知 -->
<div v-if="JSON.parse(item.lastMessage.attachment.raw).name">
{{ JSON.parse(item.lastMessage.attachment.raw).name }}
</div>
<!-- 未知 -->
<div v-if="JSON.parse(item.lastMessage.attachment.raw).type == 100002">
{{ "工单" }}
</div>
<!-- 常用回复 -->
<div v-if="JSON.parse(item.lastMessage.attachment.raw).typs == 'msg'">
{{ item.lastMessage.text }}
</div>
<!-- 100000 移动端职位卡片 -->
<div v-else>
{{ JSON.parse(item.lastMessage.attachment.raw).title }}
</div>
</div>
<!-- 暂无新消息 -->
<div class="g_fs_14 g_ell_1" style="color: #999; font-size: 12px" v-if="!item.lastMessage"></div>
</div>
</div>
<template #content>
<view class="g_fs_16" style="">
<view class="g_flex_column_center g_h_32" @click="topMessage(item, index)">
<view>{{ item.stickTop ? "取消置顶" : "置顶消息" }} </view>
</view>
<view class="g_flex_column_center g_h_32" @click="deleteMessage(item, index)">
<view>不显示</view>
</view>
</view>
</template>
</Tooltip>
</div>
</view>
<view class="" v-if="machineList && machineList.length == 0">
<view
style="width: calc(100% - 20px); margin: 0 auto"
class=""
:style="{
'padding-top': '260rpx',
}"
>
<rh-empty text="暂无消息"></rh-empty>
</view>
</view>
<view v-show="firstLoad" style="position: fixed; width: 100%; height: 100vh; left: 0px; top: 0px; z-index: 9" class="u-skeleton">
<view v-for="i in 10" :key="i" style="width: 100%; height: 72px; padding: 16px 12px" class="g_flex_row_between">
<view class="u-skeleton-fillet g_w_48 g_h_48 g_mr_8"> </view>
<view class="g_flex_1">
<view class="u-skeleton-fillet g_w_all g_h_20"></view>
<view class="u-skeleton-fillet g_w_all g_h_20 g_mt_4"></view>
</view>
</view>
<!-- </template> -->
</view>
<u-skeleton :loading="firstLoad" :animation="true" el-color="#ededed" bg-color="#fff"></u-skeleton>
</template>
<script setup>
import { ref, onMounted, onUnmounted, getCurrentInstance, watch, defineEmits, defineProps } from "vue";
const props = defineProps({});
const G = getCurrentInstance().appContext.app.config.globalProperties.G;
import Tooltip from "./Tooltip.vue";
const tooltipRef = ref(null);
let firstLoad = ref(false);
const machineList = ref([]);
onMounted(async () => {
uni.$on("updateConversationList", () => {
console.log("监听到事件");
getConversationListAndHideLoading();
});
uni.$on("deleteConversationList", (conversationIds) => {
console.log("监听到事件");
machineList.value.splice(
machineList.value.findIndex((item) => item.conversationId === conversationIds[0]),
1,
);
});
if (uni.getStorageSync("apply-token")) {
await checkLoginStatusAndGetConversations();
}
});
//
const getConversationListAndHideLoading = async () => {
try {
const result = await G.nim.V2NIMConversationService.getConversationList(0, 100);
console.log("会话列表获取成功", JSON.parse(JSON.stringify(result)));
if (result.conversationList && result.conversationList.length > 0) {
await Promise.all(
result.conversationList.map(async (item, index) => {
item.userinfo = await G.nim.V2NIMUserService.getUserListFromCloud([item.conversationId.split("|")[2]]);
console.log("debg item.conversationId", item.conversationId);
item.waitcount = await G.nim.V2NIMConversationService.getUnreadCountByIds([item.conversationId]);
if (item.userinfo[0].serverExtension) {
item.subtitle = JSON.parse(item.userinfo[0].serverExtension).fullName;
} else {
item.subtitle = "";
}
item.time = formatTime(item.lastMessage?.messageRefer.createTime || item.updateTime);
}),
);
}
//
let stickTopList = result?.conversationList
.filter((item) => {
return item.stickTop == true;
})
.sort((a, b) => {
if (a.lastMessage?.messageRefer.createTime && b.lastMessage?.messageRefer.createTime) {
return b.lastMessage?.messageRefer.createTime - a.lastMessage?.messageRefer.createTime;
} else if (a.lastMessage?.messageRefer.createTime || b.lastMessage?.messageRefer.createTime) {
if (a.lastMessage?.messageRefer.createTime) {
return a.lastMessage?.messageRefer.createTime - b.createTime;
} else {
return a.createTime - b.lastMessage?.messageRefer.createTime;
}
} else {
return a.updateTime - b.updateTime;
}
});
let defaultList = result?.conversationList
.filter((item) => {
return item.stickTop != true;
})
.sort((a, b) => {
if (a.lastMessage?.messageRefer.createTime && b.lastMessage?.messageRefer.createTime) {
return b.lastMessage?.messageRefer.createTime - a.lastMessage?.messageRefer.createTime;
} else if (a.lastMessage?.messageRefer.createTime || b.lastMessage?.messageRefer.createTime) {
if (a.lastMessage?.messageRefer.createTime) {
return a.lastMessage?.messageRefer.createTime - b.createTime;
} else {
return a.createTime - b.lastMessage?.messageRefer.createTime;
}
} else {
return a.updateTime - b.updateTime;
}
});
machineList.value = stickTopList.concat(defaultList) || []; //
} catch (error) {
console.error("获取会话列表失败", error);
machineList.value = []; //
} finally {
// / 2
firstLoad.value = false;
}
};
//
const checkLoginStatusAndGetConversations = async () => {
try {
// 2.
const loginStatus = G?.nim && (await G.nim.V2NIMLoginService.getLoginStatus());
console.log("当前登录状态", loginStatus);
if (loginStatus === 1) {
// 3. 1
await getConversationListAndHideLoading();
} else {
// 4. 2 /
setTimeout(async () => {
const retryLoginStatus = G?.nim && (await G.nim.V2NIMLoginService.getLoginStatus());
console.log("重试登录状态", retryLoginStatus);
if (retryLoginStatus === 1) {
await getConversationListAndHideLoading();
} else {
//
console.log("重试后仍未登录,停止获取会话列表");
firstLoad.value = false;
}
}, 2000);
}
} catch (error) {
//
console.error("检查登录状态/获取会话列表失败", error);
firstLoad.value = false;
}
};
//
const formatTime = (time, separator = "-") => {
// 1. Date/Date
let targetDate;
if (typeof time === "number") {
// /SDK
targetDate = new Date(time.toString().length === 10 ? time * 1000 : time);
} else if (time instanceof Date) {
targetDate = new Date(time); //
} else {
console.error("formatSmartTime入参格式错误需传入时间戳或Date对象");
return "";
}
// 2.
const now = new Date();
const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate()); // 0
const todayEnd = new Date(todayStart.getTime() + 24 * 60 * 60 * 1000 - 1); // 23:59:59
const currentYear = now.getFullYear(); //
// 3. ////
const year = targetDate.getFullYear();
const month = String(targetDate.getMonth() + 1).padStart(2, "0"); // 0
const day = String(targetDate.getDate()).padStart(2, "0");
const hour = String(targetDate.getHours()).padStart(2, "0");
const minute = String(targetDate.getMinutes()).padStart(2, "0");
// 4.
if (targetDate >= todayStart && targetDate <= todayEnd) {
//
return `${hour}:${minute}`;
} else if (year === currentYear) {
//
return `${month}${separator}${day} ${hour}:${minute}`;
} else {
//
return `${year}${separator}${month}${separator}${day} ${hour}:${minute}`;
}
};
const goChatPage = async (_item) => {
console.log(_item);
try {
console.log("debg _item.conversationId", _item.conversationId);
const res = await G.nim.V2NIMConversationService.clearUnreadCountByIds([_item.conversationId]);
console.log("V2NIMConversationService.clearUnreadCountByIds", res);
} catch (error) {
console.log("error", error);
}
uni.navigateTo({
url: "/root/NEUIKit/index?item=" + _item.conversationId,
});
};
/**
* 置顶或取消置顶会话
*/
const topMessage = async (_item, _index) => {
console.log(_item);
try {
if (_item && _item.stickTop) {
G.nim.V2NIMConversationService.stickTopConversation(_item.conversationId, false);
} else {
G.nim.V2NIMConversationService.stickTopConversation(_item.conversationId, true);
}
console.log("tooltipRef.value", tooltipRef.value);
} catch (error) {
uni.showToast({
title: error,
icon: "none",
});
console.log("errorerror", error);
}
tooltipRef.value[_index].close();
// let res1 = await G.nim.V2NIMConversationService.getStickTopConversationList();
// console.log("res1res1", res1);
};
/**
* 删除会话
*/
const deleteMessage = async (_item, _index) => {
console.log(_item);
G.handleConfirm({
content: "不显示该聊天?",
confirmText: "不显示",
cancelText: "取消",
success(res) {
if (res.confirm) {
try {
G.nim.V2NIMConversationService.deleteConversation(_item.conversationId, false);
} catch (error) {
console.log("errorerror", error);
uni.showToast({
title: error,
icon: "none",
});
}
}
},
});
tooltipRef.value[_index].close();
};
onUnmounted(() => {
uni.$off("updateConversationList");
});
</script>
<style lang="less" scoped>
.bottom-line {
position: relative;
&::after {
content: "";
width: 100%;
height: 1px;
background-color: #ededed;
position: absolute;
left: 10px;
top: -12px;
}
}
</style>

@ -508,6 +508,23 @@ export function createApp () {
});
}
});
const globalObj = typeof globalThis !== 'undefined'
? globalThis
: (typeof global !== 'undefined' ? global : window);
app.use(uView)
// 安全赋值:确保全局对象存在再赋值
if (globalObj) {
globalObj.$app = app; // 挂载 Vue 实例(避免和 uni 内置的 $app 冲突)
// 若需挂载 $app需先初始化空对象再赋值
if (!globalObj.$app) {
globalObj.$app = {};
}
globalObj.$app.config = {
globalProperties: app.config.globalProperties
};
} else {
console.warn('全局对象获取失败,无法挂载 Vue 实例');
}
app.config.globalProperties.G.getAgencyInfo()
app.config.globalProperties.F = wyyx;
app.use(uView)

@ -137,7 +137,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wxd522e45fa0d4be09",
"appid" : "wx15bc9c758f4eb129",
"setting" : {
"urlCheck" : false,
"es6" : true,

564
package-lock.json generated

@ -9,9 +9,13 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@xkit-yx/im-store-v2": "^0.4.0",
"@xkit-yx/utils": "^0.5.6",
"dayjs": "^1.11.7",
"fetch-event-source": "^1.0.0-alpha.2",
"html2canvas": "^1.4.1",
"mobx": "^6.6.1",
"nim-web-sdk-ng": "^10.4.0",
"pinyin": "^3.1.0",
"recorder-core": "^1.3.25011100"
},
@ -682,6 +686,44 @@
"integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==",
"optional": true
},
"node_modules/@xkit-yx/im-store-v2": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/@xkit-yx/im-store-v2/-/im-store-v2-0.4.0.tgz",
"integrity": "sha512-XWJfOZ3ECp6ixlck3CB+alICC4zT1oYrIl4R1saPYv0ou0g6VtlZY1NE7hMi/X/G/6aWR8VC/eBfAXjZBy8Z0g==",
"dependencies": {
"@xkit-yx/utils": "^0.7.1",
"mobx": "^6.6.1"
},
"peerDependencies": {
"nim-web-sdk-ng": "^10.x"
}
},
"node_modules/@xkit-yx/im-store-v2/node_modules/@xkit-yx/utils": {
"version": "0.7.2",
"resolved": "https://registry.npmmirror.com/@xkit-yx/utils/-/utils-0.7.2.tgz",
"integrity": "sha512-6u/wDBcYZ+pihRyYgMzDDOSrdy6otD3t0HjxShNFleh7dfHjEcy1A1wAlxu/EP/FQ+illC5SYnfD3mvmpoo5kQ==",
"dependencies": {
"axios": "^0.27.2",
"eventemitter3": "^4.0.7"
},
"peerDependencies": {
"axios": "^0.27.2",
"eventemitter3": "^4.0.7"
}
},
"node_modules/@xkit-yx/utils": {
"version": "0.5.6",
"resolved": "https://registry.npmmirror.com/@xkit-yx/utils/-/utils-0.5.6.tgz",
"integrity": "sha512-zozywNmLXx/UfqEFxTiAz8IlYdgkaxLWYwNtTbN3dMB0n24VRQJB898ovro1NA0kJchl1QMOVHxPd+/q0tmRmg==",
"dependencies": {
"axios": "^0.27.2",
"eventemitter3": "^4.0.7"
},
"peerDependencies": {
"axios": "^0.27.2",
"eventemitter3": "^4.0.7"
}
},
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz",
@ -740,6 +782,20 @@
"node": ">=10"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/axios": {
"version": "0.27.2",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.27.2.tgz",
"integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
"dependencies": {
"follow-redirects": "^1.14.9",
"form-data": "^4.0.0"
}
},
"node_modules/babel-plugin-macros": {
"version": "2.8.0",
"resolved": "https://registry.npmmirror.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz",
@ -772,6 +828,14 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"optional": true
},
"node_modules/base64-arraybuffer": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/brace-expansion": {
"version": "1.1.12",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.12.tgz",
@ -795,6 +859,18 @@
"node": ">=8"
}
},
"node_modules/call-bind-apply-helpers": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
"dependencies": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz",
@ -837,6 +913,17 @@
"color-support": "bin.js"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/commander": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/commander/-/commander-1.1.1.tgz",
@ -876,6 +963,14 @@
"node": ">=8"
}
},
"node_modules/css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
@ -898,6 +993,14 @@
}
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz",
@ -913,6 +1016,19 @@
"node": ">=8"
}
},
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz",
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
"es-errors": "^1.3.0",
"gopd": "^1.2.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
@ -928,6 +1044,47 @@
"is-arrayish": "^0.2.1"
}
},
"node_modules/es-define-property": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz",
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-object-atoms": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
"dependencies": {
"es-errors": "^1.3.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-set-tostringtag": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
"dependencies": {
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.6",
"has-tostringtag": "^1.0.2",
"hasown": "^2.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/event-target-shim/-/event-target-shim-5.0.1.tgz",
@ -936,6 +1093,11 @@
"node": ">=6"
}
},
"node_modules/eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"node_modules/fetch-event-source": {
"version": "1.0.0-alpha.2",
"resolved": "https://registry.npmmirror.com/fetch-event-source/-/fetch-event-source-1.0.0-alpha.2.tgz",
@ -961,6 +1123,40 @@
"node": ">=8"
}
},
"node_modules/follow-redirects": {
"version": "1.16.0",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.16.0.tgz",
"integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.5",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.5.tgz",
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
"hasown": "^2.0.2",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz",
@ -995,7 +1191,6 @@
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"optional": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@ -1021,6 +1216,41 @@
"node": ">=10"
}
},
"node_modules/get-intrinsic": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
"es-define-property": "^1.0.1",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2",
"get-proto": "^1.0.1",
"gopd": "^1.2.0",
"has-symbols": "^1.1.0",
"hasown": "^2.0.2",
"math-intrinsics": "^1.1.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz",
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
"dependencies": {
"dunder-proto": "^1.0.1",
"es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
@ -1042,6 +1272,42 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/gopd": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz",
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz",
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-tostringtag": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
"dependencies": {
"has-symbols": "^1.0.3"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/has-unicode/-/has-unicode-2.0.1.tgz",
@ -1052,7 +1318,6 @@
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"optional": true,
"dependencies": {
"function-bind": "^1.1.2"
},
@ -1060,6 +1325,18 @@
"node": ">= 0.4"
}
},
"node_modules/html2canvas": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"dependencies": {
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
@ -1230,6 +1507,14 @@
"semver": "bin/semver.js"
}
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/micromatch": {
"version": "4.0.8",
"resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz",
@ -1244,6 +1529,25 @@
"node": ">=8.6"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/minimatch": {
"version": "3.1.5",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.5.tgz",
@ -1323,6 +1627,11 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true
},
"node_modules/nim-web-sdk-ng": {
"version": "10.9.81",
"resolved": "https://registry.npmmirror.com/nim-web-sdk-ng/-/nim-web-sdk-ng-10.9.81.tgz",
"integrity": "sha512-tiCbYzqWoLUXv1F3dqZ9GvWNL3zbzHcUK9Iedsl10vyAXwFaL4PrPfblGg2HSn9UMM90opPAL5aIkH2yG1MzUA=="
},
"node_modules/node-addon-api": {
"version": "3.2.1",
"resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-3.2.1.tgz",
@ -1787,6 +2096,14 @@
"node": ">=10"
}
},
"node_modules/text-segmentation": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -1817,6 +2134,14 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"optional": true
},
"node_modules/utrie": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"dependencies": {
"base64-arraybuffer": "^1.0.2"
}
},
"node_modules/web-streams-polyfill": {
"version": "3.3.3",
"resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
@ -2207,6 +2532,35 @@
"integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==",
"optional": true
},
"@xkit-yx/im-store-v2": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/@xkit-yx/im-store-v2/-/im-store-v2-0.4.0.tgz",
"integrity": "sha512-XWJfOZ3ECp6ixlck3CB+alICC4zT1oYrIl4R1saPYv0ou0g6VtlZY1NE7hMi/X/G/6aWR8VC/eBfAXjZBy8Z0g==",
"requires": {
"@xkit-yx/utils": "^0.7.1",
"mobx": "^6.6.1"
},
"dependencies": {
"@xkit-yx/utils": {
"version": "0.7.2",
"resolved": "https://registry.npmmirror.com/@xkit-yx/utils/-/utils-0.7.2.tgz",
"integrity": "sha512-6u/wDBcYZ+pihRyYgMzDDOSrdy6otD3t0HjxShNFleh7dfHjEcy1A1wAlxu/EP/FQ+illC5SYnfD3mvmpoo5kQ==",
"requires": {
"axios": "^0.27.2",
"eventemitter3": "^4.0.7"
}
}
}
},
"@xkit-yx/utils": {
"version": "0.5.6",
"resolved": "https://registry.npmmirror.com/@xkit-yx/utils/-/utils-0.5.6.tgz",
"integrity": "sha512-zozywNmLXx/UfqEFxTiAz8IlYdgkaxLWYwNtTbN3dMB0n24VRQJB898ovro1NA0kJchl1QMOVHxPd+/q0tmRmg==",
"requires": {
"axios": "^0.27.2",
"eventemitter3": "^4.0.7"
}
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz",
@ -2252,6 +2606,20 @@
"readable-stream": "^3.6.0"
}
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"axios": {
"version": "0.27.2",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.27.2.tgz",
"integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
"requires": {
"follow-redirects": "^1.14.9",
"form-data": "^4.0.0"
}
},
"babel-plugin-macros": {
"version": "2.8.0",
"resolved": "https://registry.npmmirror.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz",
@ -2280,6 +2648,11 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"optional": true
},
"base64-arraybuffer": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ=="
},
"brace-expansion": {
"version": "1.1.12",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.12.tgz",
@ -2300,6 +2673,15 @@
"fill-range": "^7.1.1"
}
},
"call-bind-apply-helpers": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
"requires": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2"
}
},
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz",
@ -2327,6 +2709,14 @@
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
"optional": true
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/commander/-/commander-1.1.1.tgz",
@ -2360,6 +2750,14 @@
"yaml": "^1.7.2"
}
},
"css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"requires": {
"utrie": "^1.0.2"
}
},
"dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
@ -2374,6 +2772,11 @@
"ms": "^2.1.3"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz",
@ -2386,6 +2789,16 @@
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
"optional": true
},
"dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz",
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
"requires": {
"call-bind-apply-helpers": "^1.0.1",
"es-errors": "^1.3.0",
"gopd": "^1.2.0"
}
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
@ -2401,11 +2814,45 @@
"is-arrayish": "^0.2.1"
}
},
"es-define-property": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz",
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="
},
"es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="
},
"es-object-atoms": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
"requires": {
"es-errors": "^1.3.0"
}
},
"es-set-tostringtag": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
"requires": {
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.6",
"has-tostringtag": "^1.0.2",
"hasown": "^2.0.2"
}
},
"event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
},
"eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"fetch-event-source": {
"version": "1.0.0-alpha.2",
"resolved": "https://registry.npmmirror.com/fetch-event-source/-/fetch-event-source-1.0.0-alpha.2.tgz",
@ -2428,6 +2875,23 @@
"to-regex-range": "^5.0.1"
}
},
"follow-redirects": {
"version": "1.16.0",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.16.0.tgz",
"integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw=="
},
"form-data": {
"version": "4.0.5",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.5.tgz",
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
"hasown": "^2.0.2",
"mime-types": "^2.1.12"
}
},
"fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz",
@ -2457,8 +2921,7 @@
"function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"optional": true
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
},
"gauge": {
"version": "3.0.2",
@ -2477,6 +2940,32 @@
"wide-align": "^1.1.2"
}
},
"get-intrinsic": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"requires": {
"call-bind-apply-helpers": "^1.0.2",
"es-define-property": "^1.0.1",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2",
"get-proto": "^1.0.1",
"gopd": "^1.2.0",
"has-symbols": "^1.1.0",
"hasown": "^2.0.2",
"math-intrinsics": "^1.1.0"
}
},
"get-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz",
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
"requires": {
"dunder-proto": "^1.0.1",
"es-object-atoms": "^1.0.0"
}
},
"glob": {
"version": "7.2.3",
"resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
@ -2491,6 +2980,24 @@
"path-is-absolute": "^1.0.0"
}
},
"gopd": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz",
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="
},
"has-symbols": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz",
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="
},
"has-tostringtag": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
"requires": {
"has-symbols": "^1.0.3"
}
},
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/has-unicode/-/has-unicode-2.0.1.tgz",
@ -2501,11 +3008,19 @@
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"optional": true,
"requires": {
"function-bind": "^1.1.2"
}
},
"html2canvas": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"requires": {
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
}
},
"https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
@ -2638,6 +3153,11 @@
}
}
},
"math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="
},
"micromatch": {
"version": "4.0.8",
"resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz",
@ -2649,6 +3169,19 @@
"picomatch": "^2.3.1"
}
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
},
"mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"requires": {
"mime-db": "1.52.0"
}
},
"minimatch": {
"version": "3.1.5",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.5.tgz",
@ -2708,6 +3241,11 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true
},
"nim-web-sdk-ng": {
"version": "10.9.81",
"resolved": "https://registry.npmmirror.com/nim-web-sdk-ng/-/nim-web-sdk-ng-10.9.81.tgz",
"integrity": "sha512-tiCbYzqWoLUXv1F3dqZ9GvWNL3zbzHcUK9Iedsl10vyAXwFaL4PrPfblGg2HSn9UMM90opPAL5aIkH2yG1MzUA=="
},
"node-addon-api": {
"version": "3.2.1",
"resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-3.2.1.tgz",
@ -3009,6 +3547,14 @@
"yallist": "^4.0.0"
}
},
"text-segmentation": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"requires": {
"utrie": "^1.0.2"
}
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -3036,6 +3582,14 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"optional": true
},
"utrie": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"requires": {
"base64-arraybuffer": "^1.0.2"
}
},
"web-streams-polyfill": {
"version": "3.3.3",
"resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",

@ -10,14 +10,18 @@
"author": "",
"license": "ISC",
"dependencies": {
"@xkit-yx/im-store-v2": "^0.4.0",
"@xkit-yx/utils": "^0.5.6",
"dayjs": "^1.11.7",
"fetch-event-source": "^1.0.0-alpha.2",
"mobx": "^6.6.1",
"pinyin": "^3.1.0",
"recorder-core": "^1.3.25011100"
"html2canvas": "^1.4.1",
"mobx": "^6.6.1",
"nim-web-sdk-ng": "^10.4.0",
"pinyin": "^3.1.0",
"recorder-core": "^1.3.25011100"
},
"devDependencies": {
"pako": "^2.1.0",
"pako": "^2.1.0",
"sass": "^1.86.0",
"sass-loader": "^16.0.5"
}

@ -81,6 +81,29 @@
}
],
"subPackages": [
{ //
"root": "root/NEUIKit",
"pages": [
{
"path": "index",
"style": {
"navigationBarTitleText": " ",
"backgroundColor": "#ededed",
"backgroundColorTop": "#ededed",
"backgroundColorBottom": "#ededed"
}
},
{
"path": "pages/userPage",
"style": {
"navigationBarTitleText": "名片",
"backgroundColor": "#ededed",
"backgroundColorTop": "#ededed",
"backgroundColorBottom": "#ededed"
}
}
]
},
{
"root": "root/chat",
"pages": [
@ -112,6 +135,15 @@
{ //
"root": "root/person",
"pages": [
{
"path": "loginIndex",
"style": {
"navigationBarTitleText": "登录",
"backgroundColor": "#ffffff",
"backgroundColorTop": "#ffffff",
"backgroundColorBottom": "#ffffff"
}
},
{
"path": "set",
"style": {
@ -690,12 +722,12 @@
// "pagePath": "pages/addJob/index",
// "text": "智能客服"
// },
// {
// "iconPath": "static/image/tabbar/message_gray.png",
// "selectedIconPath": "static/image/tabbar/message.png",
// "pagePath": "pages/message/index",
// "text": "消息"
// },
{
"iconPath": "static/image/tabbar/message_gray.png",
"selectedIconPath": "static/image/tabbar/message.png",
"pagePath": "pages/message/index",
"text": "消息"
},
{
"iconPath": "static/image/tabbar/plus-square_gray.png",
"selectedIconPath": "static/image/tabbar/plus-square.png",

@ -1,15 +1,67 @@
<template>
<div style="" class="g_bg_f_5">
<view class="">
<scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" :style="{ height: `calc(100vh - 0px)` }" :scroll-y="true">
<view class="">
<message :cmsIds="messageId" :update="update" />
<view class="g_h_32"></view>
<div style="min-height: 100vh" class="g_bg_f_5">
<view class="" v-if="isLogin && is_use_im == 1">
<view class="m-tabs" v-if="false">
<g-tabs :list="typeGroup" :is-scroll="false" v-model="current" @change="updateType" item-width="126" :active-color="globalData.themeColor" bar-width="60" bar-height="6" font-size="32" :gutter="22" duration="0.1" height="84"></g-tabs>
</view>
<scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" :style="{ height: `calc(100vh - ${isLogin && is_use_im == 1 ? tabbarHeight + 43 : 0}px)` }" :scroll-y="true">
<view class="" v-if="is_use_im == 1">
<!-- <view style="height: 43px" v-if="corpUserFlag"></view> -->
<div style="height: 10px" class="2" v-if="current == 1 || current == 2"></div>
<view class="" v-show="isLogin ? current == 0 : current == 1">
<!-- <g-message-cell ref="AIList" @exportClickImage="openServer" /> -->
<view class="">
<conversationList />
<!-- <friendList /> -->
<!-- <ConversationList ref="contactList" /> -->
</view>
<!-- <view v-if="contactList && contactList.conversationList.length <= 0 && AIList && AIList.wyyxTabGroup.length <= 0" class="g_p_10 g_flex_c g_mt_130" style="border-radius: 12px; padding: 24px 10px; margin-top: 130px">
<u-empty text="暂无更多会话" :src="cdnBaseImg + 'noData.svg'"> </u-empty>
</view> -->
</view>
<view class="g_bg_f" v-show="isLogin ? current == 1 : current == 0">
<message :cmsIds="messageId" :update="update" />
</view>
<view class="g_bg_f" v-if="current == 2">
<!-- <chatPanel /> -->
<telPanel />
</view>
</view>
<view class="" v-if="is_use_im == 0">
<!-- #ifdef MP-WEIXIN -->
<div class="1" style="height: 10px" v-if="current == 1 || current == 2"></div>
<!-- #endif -->
<view class="g_bg_f">
<message :cmsIds="messageId" :update="update" />
</view>
</view>
</scroll-view>
</view>
<view class="g_h_all" v-if="!isLogin">
<rh-login-false-list />
</view>
<rh-serverpopup
:show="showService"
@updateShow="
(e) => {
showService = e;
}
"
></rh-serverpopup>
<g-tabbar></g-tabbar>
</div>
<!-- <g-tabbar class="tabbar" :isShow="tabbarShow"></g-tabbar> -->
<view v-show="firstLoad" style="position: fixed; width: 100%; height: 100vh; left: 0px; top: 0px; z-index: 9" class="u-skeleton">
<view v-for="i in 10" :key="i" style="width: 100%; height: 72px; padding: 16px 12px" class="g_flex_row_between">
<view class="u-skeleton-fillet g_w_48 g_h_48 g_mr_8"> </view>
<view class="g_flex_1">
<view class="u-skeleton-fillet g_w_all g_h_20"></view>
<view class="u-skeleton-fillet g_w_all g_h_20 g_mt_4"></view>
</view>
</view>
<!-- </template> -->
</view>
<u-skeleton :loading="firstLoad" :animation="true" el-color="#ededed" bg-color="#fff"></u-skeleton>
</template>
<script lang="ts" setup>
@ -19,21 +71,15 @@ import { ref, onMounted, computed, getCurrentInstance } from "vue";
import { onShow, onLoad } from "@dcloudio/uni-app";
// import telPanel from "../NEUIKit/pages/Contact/contact-list/index.vue";
import message from "./components/message.vue";
const instance = getCurrentInstance();
const G = instance.appContext.app.config.globalProperties.G;
onMounted(() => {
// console.log("mountedmountedmountedmountedmountedmounted");
const query = uni.createSelectorQuery().in(instance);
// console.log("query", query);
// DOM
query
.select(".tabbar")
.boundingClientRect((res) => {
tabbarHeight.value = res.height;
uni.setStorageSync("TABBAR_HEIGHT", res.height);
})
.exec();
});
import conversationList from "../../components/conversationList.vue";
// import friendList from "../../components/friendList.vue";
// import chatPanel from "../NEUIKit/pages/Contact/BcFriend.vue";
const G = getCurrentInstance().appContext.app.config.globalProperties.G;
import gMessageCell from "@/components/panel/messageCell.vue";
let firstLoad = ref(false);
let showLoading = ref(true);
const globalData = ref(getApp().globalData);
const wyyxTabGroup = ref([]);
const corpUserFlag = ref(false);
@ -42,12 +88,27 @@ const update = ref(1);
const contactList = ref(null);
const AIList = ref(null);
const cdnBaseImg = ref(G.store().cdnBaseImg);
const tabbarShow = ref(true);
const isLogin = ref(false);
const is_use_im = ref(uni.getStorageSync("is_use_im"));
const isLogin = ref(true);
//
const resetScroll = ref(0);
const tabbarHeight = ref(uni.getStorageSync("TABBAR_HEIGHT"));
const openTel2 = ref(null);
onMounted(() => {
// const query = uni.createSelectorQuery();
// query.select("#openTel2").exec(function (res) {
// console.log("resresres", res);
// });
// setTimeout(() => {
// console.log("openTel2.value", openTel2.value);
// openTel2.value.handleClick();
// }, 1000);
setTimeout(() => {
showLoading.value = false;
firstLoad.value = false;
}, 2000);
});
const sname = ref("");
const stel = ref("");
@ -67,102 +128,38 @@ const current = ref(0);
const count = ref(0); //
const messageId = ref("");
const userInfo = ref({});
onShow(() => {
isLogin.value = uni.getStorageSync("apply-token") ? true : false;
// console.log("count.value", count.value);
// console.log("count.value", count.value);
corpUserFlag.value = uni.getStorageSync("apply-userinfo").corpUserFlag;
userInfo.value = uni.getStorageSync("apply-userinfo");
//
update.value++;
setTimeout(() => {
count.value = uni.getStorageSync("notice_info").count;
// if (!isLogin.value) {
if (!isLogin.value) {
typeGroup.value = [
{
name: "系统通知",
},
];
// } else {
// typeGroup.value = [
// {
// name: "",
// },
// {
// name: "",
// count: count.value,
// },
// // {
// // name: "",
// // },
// ];
// }
} else {
typeGroup.value = [
{
name: "当前会话",
},
{
name: "系统通知",
count: count.value,
},
// {
// name: "",
// },
];
}
}, 200);
// if (isLogin.value && uni && uni.$UIKitStore) {
// // trackInit("ConversationUIKit");
// //
// uni.$UIKitStore?.uiStore.selectConversation("");
// setTimeout(() => {
// const unread = uni.$UIKitNIM.V2NIMConversationService.getTotalUnreadCount();
// if(uni.getStorageSync("miniApp-info").openAIDock == 0){
// if (unread === 0) {
// uni.hideTabBarRedDot({
// //
// index: 3, //tabbar
// });
// } else {
// uni.showTabBarRedDot({
// index: 3, //tabbar
// });
// }
// }else{
// if (unread === 0) {
// uni.hideTabBarRedDot({
// //
// index: 3, //tabbar
// });
// } else {
// uni.showTabBarRedDot({
// index: 3, //tabbar
// });
// }
// }
// }, 1000);
// current.value = 0;
// messageId.value = globalData.value.messageId;
// }
if (isLogin.value) {
current.value = 0;
messageId.value = globalData.value.messageId;
}
});
const goLogin = () => {
uni.reLaunch({
url: "/root/login/index",
});
};
const goPage = ($path) => {
if ($path) {
uni.navigateTo({
url: $path,
});
}
};
const openTel1 = ($tel) => {
// console.log("openTel2", openTel2.value);
uni.requestSubscribeMessage({
tmplIds: ["UPYUMYWBtgWD3ZZHVEJC9qX04ahF81-yBPdsDzArp_4"],
success(res) {},
});
};
const openTel = ($tel) => {
uni.makePhoneCall({
phoneNumber: $tel || "0371-6611 3723",
});
};
const simage = ref("");
const serverPop = ref({
@ -189,81 +186,17 @@ const getScrollInfo = (e) => {
};
const updateType = (e) => {
// console.log(e);
// console.log(e);
resetScroll.value = 1;
globalData.value.messageTab = e;
};
const getEmptyDom = (text = "暂无数据", subText = "") => {
G.getEmptyDom(text, subText);
};
</script>
<style lang="scss">
page {
background-color: #ededed;
}
.ok-btn {
color: #fff;
background-color: rgb(20, 146, 209);
padding: 10px;
font-size: 16px;
text-align: center;
position: fixed;
bottom: 0;
left: calc(50% - 25vw);
width: 50vw;
border-radius: 3px;
}
.ok-btn-mp {
color: #fff;
background-color: rgb(20, 146, 209);
padding: 10px;
font-size: 16px;
text-align: center;
position: fixed;
bottom: 20px;
left: calc(50% - 25vw);
width: 50vw;
border-radius: 3px;
}
.button-box,
.button-box-mp {
display: flex;
align-items: center;
position: fixed;
z-index: 100;
bottom: 120px;
right: 30px;
}
.button-box {
display: flex;
align-items: center;
position: relative;
}
.button-box,
.button-box-mp .button-icon {
width: 40px;
height: 40px;
margin-left: 20px;
}
.button-box {
width: 40px;
height: 40px;
position: fixed;
z-index: 100;
bottom: 70px;
right: 30px;
}
.g_bg_f_5 {
background-color: #ededed;
}
// @import "../NEUIKit/pages/styles/common.scss";
.i-items {
// border-bottom: 1px solid #eee;
position: relative;
&:not(:first-child):after {
content: "";
@ -275,11 +208,8 @@ page {
top: 0;
right: 0;
}
}
.sticky {
position: sticky;
top: 0px;
left: 0;
z-index: 100;
// &:last-child:after {
// border-bottom: none;
// }
}
</style>

@ -0,0 +1,285 @@
<template>
<div style="" class="g_bg_f_5">
<view class="">
<scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" :style="{ height: `calc(100vh - 0px)` }" :scroll-y="true">
<view class="">
<message :cmsIds="messageId" :update="update" />
<view class="g_h_32"></view>
</view>
</scroll-view>
</view>
</div>
<!-- <g-tabbar class="tabbar" :isShow="tabbarShow"></g-tabbar> -->
</template>
<script lang="ts" setup>
import { ref, onMounted, computed, getCurrentInstance } from "vue";
// import ConversationList from "../NEUIKit/pages/Conversation/conversation-list/index.vue";
// import { trackInit } from "../NEUIKit/utils/reporter.ts";
import { onShow, onLoad } from "@dcloudio/uni-app";
// import telPanel from "../NEUIKit/pages/Contact/contact-list/index.vue";
import message from "./components/message.vue";
const instance = getCurrentInstance();
const G = instance.appContext.app.config.globalProperties.G;
onMounted(() => {
// console.log("mountedmountedmountedmountedmountedmounted");
const query = uni.createSelectorQuery().in(instance);
// console.log("query", query);
// DOM
query
.select(".tabbar")
.boundingClientRect((res) => {
tabbarHeight.value = res.height;
uni.setStorageSync("TABBAR_HEIGHT", res.height);
})
.exec();
});
const globalData = ref(getApp().globalData);
const wyyxTabGroup = ref([]);
const corpUserFlag = ref(false);
const showService = ref(false);
const update = ref(1);
const contactList = ref(null);
const AIList = ref(null);
const cdnBaseImg = ref(G.store().cdnBaseImg);
const tabbarShow = ref(true);
const isLogin = ref(false);
//
const resetScroll = ref(0);
const tabbarHeight = ref(uni.getStorageSync("TABBAR_HEIGHT"));
const openTel2 = ref(null);
const sname = ref("");
const stel = ref("");
const typeGroup = ref([
{
name: "当前会话",
},
{
name: "系统通知",
count: "",
},
// {
// name: "",
// },
]);
const current = ref(0);
const count = ref(0); //
const messageId = ref("");
const userInfo = ref({});
onShow(() => {
isLogin.value = uni.getStorageSync("apply-token") ? true : false;
// console.log("count.value", count.value);
corpUserFlag.value = uni.getStorageSync("apply-userinfo").corpUserFlag;
userInfo.value = uni.getStorageSync("apply-userinfo");
//
update.value++;
setTimeout(() => {
count.value = uni.getStorageSync("notice_info").count;
// if (!isLogin.value) {
typeGroup.value = [
{
name: "系统通知",
},
];
// } else {
// typeGroup.value = [
// {
// name: "",
// },
// {
// name: "",
// count: count.value,
// },
// // {
// // name: "",
// // },
// ];
// }
}, 200);
// if (isLogin.value && uni && uni.$UIKitStore) {
// // trackInit("ConversationUIKit");
// //
// uni.$UIKitStore?.uiStore.selectConversation("");
// setTimeout(() => {
// const unread = uni.$UIKitNIM.V2NIMConversationService.getTotalUnreadCount();
// if(uni.getStorageSync("miniApp-info").openAIDock == 0){
// if (unread === 0) {
// uni.hideTabBarRedDot({
// //
// index: 3, //tabbar
// });
// } else {
// uni.showTabBarRedDot({
// index: 3, //tabbar
// });
// }
// }else{
// if (unread === 0) {
// uni.hideTabBarRedDot({
// //
// index: 3, //tabbar
// });
// } else {
// uni.showTabBarRedDot({
// index: 3, //tabbar
// });
// }
// }
// }, 1000);
// current.value = 0;
// messageId.value = globalData.value.messageId;
// }
if (isLogin.value) {
current.value = 0;
messageId.value = globalData.value.messageId;
}
});
const goLogin = () => {
uni.reLaunch({
url: "/root/login/index",
});
};
const goPage = ($path) => {
if ($path) {
uni.navigateTo({
url: $path,
});
}
};
const openTel1 = ($tel) => {
// console.log("openTel2", openTel2.value);
uni.requestSubscribeMessage({
tmplIds: ["UPYUMYWBtgWD3ZZHVEJC9qX04ahF81-yBPdsDzArp_4"],
success(res) {},
});
};
const openTel = ($tel) => {
uni.makePhoneCall({
phoneNumber: $tel || "0371-6611 3723",
});
};
const simage = ref("");
const serverPop = ref({
isShow: false,
});
const openServer = () => {
let image = uni.getStorageSync("bc-server-image");
if (image && !image.includes("https")) {
image = image.replace("http", "https");
}
simage.value = image;
serverPop.value.isShow = true;
};
let timeout = ref(null);
const getScrollInfo = (e) => {
resetScroll.value = 0;
if (!timeout.value) {
timeout.value = setTimeout(() => {
uni.$emit("pageScroll", e);
timeout.value = null;
}, 100);
}
};
const updateType = (e) => {
// console.log(e);
resetScroll.value = 1;
globalData.value.messageTab = e;
};
const getEmptyDom = (text = "暂无数据", subText = "") => {
G.getEmptyDom(text, subText);
};
</script>
<style lang="scss">
page {
background-color: #ededed;
}
.ok-btn {
color: #fff;
background-color: rgb(20, 146, 209);
padding: 10px;
font-size: 16px;
text-align: center;
position: fixed;
bottom: 0;
left: calc(50% - 25vw);
width: 50vw;
border-radius: 3px;
}
.ok-btn-mp {
color: #fff;
background-color: rgb(20, 146, 209);
padding: 10px;
font-size: 16px;
text-align: center;
position: fixed;
bottom: 20px;
left: calc(50% - 25vw);
width: 50vw;
border-radius: 3px;
}
.button-box,
.button-box-mp {
display: flex;
align-items: center;
position: fixed;
z-index: 100;
bottom: 120px;
right: 30px;
}
.button-box {
display: flex;
align-items: center;
position: relative;
}
.button-box,
.button-box-mp .button-icon {
width: 40px;
height: 40px;
margin-left: 20px;
}
.button-box {
width: 40px;
height: 40px;
position: fixed;
z-index: 100;
bottom: 70px;
right: 30px;
}
.g_bg_f_5 {
background-color: #ededed;
}
.i-items {
position: relative;
&:not(:first-child):after {
content: "";
display: block;
height: 1rpx;
width: calc(100% - 80px);
background: #eee;
position: absolute;
top: 0;
right: 0;
}
}
.sticky {
position: sticky;
top: 0px;
left: 0;
z-index: 100;
}
</style>

@ -154,7 +154,7 @@
<view class="g_fs_12 g_c_6" style="margin-top: 4px">{{ isSc ? "已收藏" : "收藏" }}</view>
</button>
</view> -->
<view class="g_flex_none g_flex_column_center" v-if="false">
<view class="g_flex_none g_flex_column_center">
<button class="g_pl_0 g_pr_0 g_bg_f g_mr_12 g_w_36" hover-class="thover" style="line-height: 1; border-radius: 0" @click="goIm">
<icon class="iconfont icon-message" style="color: #787878; line-height: 1; margin-top: -5px; font-size: 20px !important"> </icon>
<view class="g_fs_12 g_c_6" style="margin-top: 4px">IM</view>
@ -1739,9 +1739,9 @@ export default {
},
},
() => {
// uni.navigateTo({
// url: "/root/NEUIKit/pages/Chat/index",
// });
uni.navigateTo({
url: "/root/NEUIKit/index",
});
},
() => {},
);

@ -0,0 +1,537 @@
<template>
<view class="p-login-index g_flex_column_start">
<view class="g_h_60"></view>
<view class="g_flex_row_center g_mb_10">
<img :src="miniAppInfo.logo" alt="" class="g_w_56 g_h_56 g_radius_8" />
</view>
<view style="font-size: 16px; font-weight: 400; color: #919191; line-height: 25px; margin-bottom: 60px; text-align: center">
{{ miniAppInfo.slogan }}
</view>
<view class="m-form g_mb_50 g_pl_40 g_pr_40">
<view class="g_bg_f_5 g_radius_6 g_pl_16 g_pr_16 g_flex_column_center g_pt_6 g_pb_6 g_mb_20">
<u-input maxlength="11" v-model="form.tel" type="number" class="g_fs_16" placeholder="请输入手机号" placeholder-style="color:#999999;font-size:32rpx;line-height:1" />
</view>
<view class="g_bg_f_5 g_radius_6 g_pl_16 g_flex_column_center g_position_rela" v-if="isLoginCode">
<view class="g_flex_row_between">
<view class="g_flex_1 g_mr_20 g_pt_6 g_pb_6">
<u-input maxlength="4" v-model="msgCode.code" @input="hideKeyboard" type="number" class="g_fs_16" placeholder="请输入验证码" placeholder-style="color:#999999;font-size:32rpx;line-height:1" />
</view>
<view class="btn-text g_flex_column_center g_bg_f_5 g_radius_6 g_flex_none g_pt_8 g_pb_8" @click="handleSendMsg">
<button :class="form.tel.length == 11 ? (msgCode.countdown > 0 ? 'g_c_9' : 'g_c_main') : 'g_c_9'" class="btn-con g_w_126 g_flex_row_center" style="font-size: 32rpx">{{ msgCode.btnText }}</button>
</view>
</view>
</view>
<view v-if="!isLoginCode" class="g_bg_f_5 g_radius_6 g_pl_16 g_pr_16 g_flex_column_center g_pt_6 g_pb_6">
<u-input v-model="form.pwd" type="password" class="g_fs_16" placeholder="请输入密码" placeholder-style="color:#999999;font-size:32rpx;line-height:1" />
</view>
<view class="g_flex_row_between" style="color: #576b95">
<view class="g_fs_14 g_pl_16 g_mt_8 biggerSize" @click="isLoginCode = !isLoginCode">{{ isLoginCode ? "密码登录" : "验证码登录" }}</view>
</view>
</view>
<view>
<view class="g_flex_row_center">
<rh-button primaryColor="#3578f6" btnText="登录/注册" type="primary" @clickBtn="goHome" width="260" height="44" />
</view>
<!-- #ifdef MP-WEIXIN -->
<view class="g_flex_row_center g_mt_24 g_mb_24">
<view class="g_flex_column_center">
<view class="bor g_w_90 g_h_1 g_border_e_b"></view>
</view>
<view class="g_flex_column_center g_fs_15 g_c_9 g_ml_9 g_mr_9"></view>
<view class="g_flex_column_center">
<view class="bor g_w_90 g_h_1 g_border_e_b"></view>
</view>
</view>
<view class="g_mt_24 g_flex_row_center g_position_rela">
<rh-button primaryColor="#3578f6" width="260" height="44" icon="icon-shouji" btnText="本机号码一键登录" type="default" openType="getPhoneNumber" @clickTel="getphonenumber" />
<view class="m-mask" @click="checkCheck" v-if="!switchChecked" style="position: absolute; left: 0; top: 0; width: 100%; height: 100%"></view>
</view>
<!-- #endif -->
</view>
<view class="g_flex_column_between g_flex_1 g_pb_24" hover-class="none" hover-stop-propagation="false">
<view class="g_fs_12 g_c_9 g_flex_row_center g_mb_32" style="align-items: center; margin-top: 16px">
<radio-group class="dib">
<radio :checked="switchChecked" @click="switchChange" value="0" class="dib biggerSize" color="#3578f6" style="transform: scale(0.7)" />
</radio-group>
我已阅读并同意
<navigator url="/root/person/agreeUser" class="aLink">用户服务协议</navigator>
<navigator url="/root/person/agreePrive" class="aLink">隐私政策</navigator>
</view>
<view class="g_flex_row_center" style="text-align: center; font-size: 12px; color: #999; line-height: 32px; box-sizing: border-box">
<view>
<image :src="svgBaseImg + 'b.svg'" style="width: 16px; height: 16px; vertical-align: text-bottom; position: relative"></image>
</view>
<view> 人海供应链技术支持 </view>
</view>
</view>
</view>
</template>
<script>
import utilsLogin from "../utils/login.js";
export default {
onShareAppMessage() {
return this.G.shareFun();
},
data() {
return {
miniAppInfo: {},
svgBaseImg: this.G.store().cdnBaseImg,
isLoginCode: true,
form: {
tel: "",
pwd: "",
},
path: "",
level: "",
msgCode: {
//
code: "",
btnText: "获取验证码", // 6s
countdown: 0,
timer: null,
},
fromPageType: "",
currentId: null,
switchChecked: false,
loading: false,
};
},
onLoad(options) {
console.log("登录页:", options);
this.path = options.path;
this.level = options.level;
if (options.type) {
this.setOptions(options);
}
console.log("123");
this.getCode((res) => {
uni.setStorageSync("apply-code", res);
});
this.G.clearLocalStorage();
},
onShow() {
let that = this;
utilsLogin.clearLocalStorage();
that.initLogo();
},
onHide() {
if (this.msgCode.timer) {
clearInterval(this.msgCode.timer);
}
},
methods: {
hideKeyboard(e) {
console.log(e);
if (e.length >= 4) {
console.log("123123123");
uni.hideKeyboard();
}
},
switchChange() {
console.log(this.switchChecked);
this.switchChecked = !this.switchChecked;
},
setOptions(options) {
console.log("options", options);
this.fromPageType = options.type;
if (options.type == "detail") {
this.currentId = options.id;
}
},
goHome() {
let that = this,
url = "",
params = {};
console.log("this.loading1", this.loading);
if (that.form.tel == "") {
uni.showToast({
title: "请输入手机号",
icon: "none",
});
return false;
}
if (!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(that.form.tel)) {
uni.showToast({
title: "请输入正确的手机号",
icon: "none",
});
return false;
}
if (that.isLoginCode) {
//
if (that.msgCode.code == "") {
uni.showToast({
title: "请输入验证码",
icon: "none",
});
return false;
}
url = that.api.login_code;
params = {
tel: that.form.tel,
code: that.msgCode.code,
loginType: "login",
wxCode: "",
};
} else {
//
if (that.form.pwd == "") {
uni.showToast({
title: "请输入密码",
icon: "none",
});
return false;
}
url = that.api.login_user;
params = {
tel: that.form.tel,
password: that.form.pwd,
loginType: "password",
wxCode: "",
};
}
console.log("that.switchChecked", that.switchChecked);
if (!that.switchChecked) {
uni.showToast({
icon: "none",
title: "请先同意用户及隐私协议",
});
return false;
}
console.log("this.loading", this.loading);
if (this.loading) {
return false;
}
this.loading = true; //
// #ifdef MP-WEIXIN
uni.checkSession({
success() {
//session_key
that.loginAccount(url, params);
},
fail() {
// session_key
that.getCode((res) => {
uni.setStorageSync("apply-code", res);
setTimeout(() => {
that.loginAccount(url, params);
}, 300);
});
},
});
// #endif
// #ifdef H5 || APP-PLUS || MP-TOUTIAO || MP-KUAISHOU
that.loginAccount(url, params);
// #endif
},
checkCheck() {
let that = this;
if (!that.switchChecked) {
uni.showToast({
icon: "none",
title: "请先同意用户及隐私协议",
});
return false;
}
},
loginAccount(url, params) {
let that = this,
_params = {};
params.wxCode = uni.getStorageSync("apply-code");
_params = Object.assign(params, {
path: that.path,
});
console.log("登录参数:", _params, " 获取分享参数:", uni.getStorageSync("apply-jobdetail-id"));
that.G.Get(
url,
_params,
(res) => {
console.log("登录成功:", res);
that.loading = false;
that.setToken(res);
},
(err) => {
console.log(err);
that.loading = false;
}
);
},
initLogo() {
let that = this;
this.G.Get("/yishoudan/agency/getInfo", {}, (res) => {
let obj = { ...res.agency, ...res.weixinConfig };
for (let key in obj) {
if (typeof obj[key] == "string" && obj[key].indexOf("http://") > -1) {
obj[key] = obj[key].replace("http:", "https:");
}
}
uni.setStorageSync("miniApp-info", obj);
uni.setStorageSync("pgy-agency-id", res.agency.id);
uni.setStorageSync("ai-name", res.agency.aiRobotName);
uni.setStorageSync("ai-logo", res.agency.aiLogo);
that.miniAppInfo = obj;
// app.$forceUpdate();
});
},
getCode(callback = () => {}) {
uni.login({
success(wxRes) {
callback(wxRes.code);
},
fail(res) {
console.log(res);
},
});
},
getphonenumber(e) {
let that = this;
console.log(e);
// , , ,
if (uni.getStorageSync("TEMPORARY_CODE")) {
let wxRes = uni.getStorageSync("TEMPORARY_CODE");
that.G.Get(
that.api.login_wechat,
{
openId: wxRes.openId,
tel: wxRes.phoneNumber,
unionid: wxRes.unionid,
},
(res) => {
that.setToken(res);
}
);
return;
}
if (e.detail.code) {
// buttontoken
uni.checkSession({
success() {
//session_key
that.loginWX(e);
},
fail() {
// session_key
that.getCode((res) => {
uni.setStorageSync("apply-code", res);
setTimeout(() => {
that.loginWX(e);
}, 300);
});
},
});
} else {
//
}
},
loginWX(e) {
let that = this;
that.G.Get(
that.api.login_getWxInfo,
{
code: uni.getStorageSync("apply-code"),
btnCode: e.detail.code,
iv: e.detail.iv,
encryptedData: e.detail.encryptedData,
},
(wxRes) => {
that.G.Get(
that.api.login_wechat,
{
openId: wxRes.openId,
tel: wxRes.phoneNumber,
unionid: wxRes.unionid,
},
(res) => {
that.setToken(res);
}
);
}
);
},
// token
setToken($data) {
let that = this;
console.log("获取登录用户信息:", $data);
uni.setStorageSync("apply-userinfo", $data); // ,
uni.setStorageSync("apply-userinfo-copy", JSON.stringify($data)); //
uni.setStorageSync("apply-avatar", $data.imgSrc); // -- 便
uni.setStorageSync("apply-username", $data.userName); // -- 便
uni.setStorageSync("apply-tel", $data.tel); // -- 便
uni.setStorageSync("apply-token", $data.token); // -- token便
uni.setStorageSync("apply-uid", $data.user.id); // -- 便
uni.setStorageSync("apply-agencyId", $data.user.agencyId); // -- id便
uni.setStorageSync("apply-supplierAccount", $data.supplierAccount); // -- 便 0. 1.
uni.removeStorageSync("TEMPORARY_CODE");
uni.$emit("isGlogin", {
uid: $data.user.id,
});
if (that.fromPageType == "detail") {
uni.navigateBack({
delta: 1,
});
return;
}
//
uni.setStorageSync("SHOW_INVITE", 1);
that.G.Get(
that.api.user_checkPermission,
{},
(rea) => {
console.log("rearearearearearea", rea);
if (rea.hasPermission == true) {
uni.setStorageSync("HAS_PERMISSION", 1); // 1. 2.
} else {
uni.setStorageSync("HAS_PERMISSION", 2); // 1. 2.
}
if (rea.member == true) {
uni.setStorageSync("IS_MINIAPP_MEMBER", true); // 1. 2.
if (rea.isCreatorOrAdmin == true) {
uni.setStorageSync("IS_MINIAPP_ADMIN", true); // 1. 2.
} else {
uni.setStorageSync("IS_MINIAPP_ADMIN", false); // 1. 2.
}
} else {
uni.setStorageSync("IS_MINIAPP_MEMBER", false); // 1. 2.
}
},
(err) => {
if (err) {
uni.setStorageSync("HAS_PERMISSION", 2);
}
}
);
// return;
uni.setStorageSync("IS_CREATOR", 1); // 1 2
if (that.path == "root/merchantManagement/message") {
uni.reLaunch({
url: "/root/merchantManagement/message",
});
}
if (that.path == "") {
uni.switchTab({
url: "/pages/home/index",
});
} else if (that.path == "detail") {
uni.navigateBack({
delta: 1,
});
} else {
//
uni.switchTab({
url: "/pages/home/index",
});
}
// that.G.Get(that.api.login_agencyInfo, {}, (aRes) => {
// console.log(":", aRes);
// uni.setStorageSync("IS_CREATOR", aRes.agency.userId == $data.user.id || $data.admin == true ? 1 : 2); // 1 2
// });
},
//
handleSendMsg() {
let that = this;
if (this.msgCode.countdown > 0) {
return false;
}
if (that.form.tel == "") {
uni.showToast({
title: "请输入手机号后再获取",
icon: "none",
});
return false;
}
if (!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(that.form.tel)) {
uni.showToast({
title: "请输入正确的手机号",
icon: "none",
});
return false;
}
that.G.Get(
that.api.login_sendMsg,
{
tel: that.form.tel,
},
(res) => {
that.msgCode.countdown = 60;
that.msgCode.btnText = that.msgCode.countdown + "s";
clearInterval(that.msgCode.timer);
that.msgCode.timer = setInterval(() => {
if (that.msgCode.countdown > 0) {
that.msgCode.countdown--;
that.msgCode.btnText = that.msgCode.countdown + "s";
} else {
clearInterval(that.msgCode.timer);
that.msgCode.timer = null;
that.msgCode.btnText = "获取验证码";
}
}, 1000);
}
);
},
goRegisterPwd() {
uni.navigateTo({
url: "/root/other/register",
});
},
},
};
</script>
<style lang="scss">
.p-login-index {
min-height: 100vh;
/* #ifdef MP-TOUTIAO || MP-KUAISHOU */
background-color: #fff;
/* #endif */
.btn-text {
.btn-con {
border-left: 2rpx solid #e5e5e5;
padding: 0 32rpx;
background-color: transparent;
border-radius: 0;
height: 40rpx;
line-height: 40rpx;
}
}
.tel-btn {
width: 500rpx;
height: 84rpx;
border: 2rpx solid #3578f6;
left: 50%;
transform: translateX(-50%);
top: 0;
border-radius: 44rpx;
opacity: 0;
}
.g-components-panel-fixed {
border-top: none;
}
.biggerSize {
position: relative;
}
.biggerSize::after {
content: "";
width: 80px;
height: 40px;
position: absolute;
left: 50%;
top: 100%;
z-index: 99;
transform: translate(-50%, -50%);
}
}
</style>

@ -0,0 +1,184 @@
// import { NIM,
// setAdapters,
// uniAppAdapters,
// V2NIMMessageService,
// V2NIMMessageLogUtil,
// V2NIMConversationService,
// V2NIMConst
// } from '../../../../dist/esm/nim'
import {
NIM,
setAdapters,
uniAppAdapters,
V2NIMMessageService,
V2NIMMessageLogUtil,
// V2NIMLocalConversationService,
V2NIMStorageService,
// V2NIMTeamService,
V2NIMUserService,
V2NIMFriendService,
V2NIMSettingService,
V2NIMConst,
V2NIMConversationService
} from 'nim-web-sdk-ng/dist/esm/nim'
// 设置 uniapp 环境
setAdapters(uniAppAdapters)
/**
* 注册了消息服务和会话服务
*
* 具体有哪些模块可以注入, 请参照 SDK 使用说明: https://doc.yunxin.163.com/messaging2/guide/DcyMjA1Njk?platform=client#%E6%96%B9%E5%BC%8F%E4%BA%8Cesm-%E5%BC%95%E5%85%A5
*/
/**
* 消息模块.
*
* 影响 API 包含 V2NIMMessageService 下全部接口.
*/
NIM.registerService(V2NIMMessageService, 'V2NIMMessageService')
/**
* 消息模块-消息记录相关工具类. 包含查询消息历史等功能.
*
* 影响 API 包含 V2NIMMessageService 的部分接口, 举例:
* getMessageList, getMessageListEx,
* getMessageListByRefers, clearHistoryMessage
*/
NIM.registerService(V2NIMMessageLogUtil, 'V2NIMMessageLogUtil')
/**
* 消息模块-扩展功能. 包含 pin 消息, 收藏消息等功能
*
* 影响 API 包含 V2NIMMessageService 的部分接口, 举例:
* pinMessage, unpinMessage, updatePinMessage, voiceToText,
* getPinnedMessageList, addQuickComment, removeQuickComment, getQuickCommentList, addCollection,
* removeCollections, updateCollectionExtension, getCollectionListByOption,
* getCollectionListExByOption, searchCloudMessages, searchCloudMessagesEx
*/
// NIM.registerService(V2NIMMessageExtendUtil, 'V2NIMMessageExtendUtil')
/**
* 消息序列化与反序列化工具
*
* 影响 API 包含 V2NIMMessageConverter 的全部接口.
*/
// NIM.registerService(V2NIMMessageConverter, 'V2NIMMessageConverter')
/**
* 云端存储模块, 包含上传文件能力
*
* 影响 API 包含 V2NIMMessageService 的部分接口, 举例:
* V2NIMMessageService.sendMessage (发图片/文件类型的消息时)
* V2NIMMessageService.cancelMessageAttachmentUpload (取消文件消息的上传)
*
* 影响 API 包含 V2NIMStorageService 的全部接口.
*/
NIM.registerService(V2NIMStorageService, 'V2NIMStorageService')
/**
* 云端会话模块.
*
* 影响 API 包含 V2NIMConversationService 的全部接口.
*/
NIM.registerService(V2NIMConversationService, 'V2NIMConversationService')
/**
* 云端会话分组模块.
*
* 影响 API 包含 V2NIMConversationGroupService 的全部接口.
*/
// NIM.registerService(V2NIMConversationGroupService, 'V2NIMConversationGroupService')
/**
* 本地会话模块.
*
* 影响 API 包含 V2NIMLocalConversationService 的全部接口.
*/
// NIM.registerService(V2NIMLocalConversationService, 'V2NIMLocalConversationService')
/**
* 群组模块.
*
* 影响 API 包含 V2NIMSettingService 的部分接口, 举例:
* setTeamMessageMuteMode, getTeamMessageMuteMode, getAllTeamMessageMuteMode
*
* 影响 API 包含 V2NIMTeamService 的全部接口.
*/
// NIM.registerService(V2NIMTeamService, 'V2NIMTeamService')
/**
* 用户模块.
*
* 影响 API 包含 V2NIMSettingService 的部分接口, 举例:
* getConversationMuteStatus, setP2PMessageMuteMode
*
* 影响 API 包含 V2NIMUserService 的全部接口.
*/
NIM.registerService(V2NIMUserService, 'V2NIMUserService') // 用户模块
/**
* 好友模块.
*
* 影响 API 包含 V2NIMFriendService 的全部接口.
*/
NIM.registerService(V2NIMFriendService, 'V2NIMFriendService')
/**
* 通知模块.
*
* 影响 API 包含 V2NIMNotificationService 的全部接口.
*/
// NIM.registerService(V2NIMNotificationService, 'V2NIMNotificationService')
/**
* 设置模块.
*
* 影响 API 包含 V2NIMSettingService 的全部接口.
* - 包含推送配置, 会话免打扰设置.
* - 与会话免打扰有关的设置需要引入群, 用户模块
*/
NIM.registerService(V2NIMSettingService, 'V2NIMSettingService')
/**
* AI 数字人模块.
*
* 影响 API 包含 V2NIMMessageService 的部分接口与事件:
* sendMessage (发送参数 aiConfig, 配置 AI 相关)
* onReceiveMessages (收消息事件, 回调的 V2NIMMessage 消息体参见属性 aiConfig streamConfig 流式输出)
* onReceiveMessagesModified (消息更新事件, 回调的 V2NIMMessage 消息体参见属性 aiConfig streamConfig 流式输出)
*
* 影响 API 包含 V2NIMAIService 的全部接口.
*/
// NIM.registerService(V2NIMAIService, 'V2NIMAIService')
/**
* 订阅模块, 如上下线状态通知订阅.
*
* 影响 API 包含 V2NIMSubscriptionService 的全部接口.
*/
// NIM.registerService(V2NIMSubscriptionService, 'V2NIMSubscriptionService')
/**
* 信令模块
*
* 影响 API 包含 V2NIMSignallingService 的全部接口.
*/
// NIM.registerService(V2NIMSignallingService, 'V2NIMSignallingService')
/**
* 服务代理相关
*
* 影响 API 包含 V2NIMPassthroughService 的全部接口.
*/
// NIM.registerService(V2NIMPassthroughService, 'V2NIMPassthroughService')
/**
* 此外某些模块包含工具类, 只需要引入对应模块服务, 就能直接使用该工具类, 关系如下
*
* V2NIMConversationIdUtil(会话 id 工具类) => V2NIMMessageService, V2NIMConversationService
* V2NIMClientAntispamUtil(客户端反垃圾工具类) => V2NIMMessageService
* V2NIMMessageCreator(消息构造工具类) => V2NIMMessageService
*/
export { NIM, V2NIMConst }
Loading…
Cancel
Save