diff --git a/App.vue b/App.vue
index b22e57c..271a3d3 100644
--- a/App.vue
+++ b/App.vue
@@ -1,10 +1,10 @@
-
diff --git a/pages/NEUIKit/components/Appellation.vue b/pages/NEUIKit/components/Appellation.vue
deleted file mode 100644
index 3618d62..0000000
--- a/pages/NEUIKit/components/Appellation.vue
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
- {{ appellation }}
- {{ subtitle }}
-
-
-
-
-
-
diff --git a/pages/NEUIKit/components/Avatar.vue b/pages/NEUIKit/components/Avatar.vue
deleted file mode 100644
index b83ed11..0000000
--- a/pages/NEUIKit/components/Avatar.vue
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
-
-
-
-
-
- {{ appellation }}
-
-
-
-
-
-
-
-
diff --git a/pages/NEUIKit/components/Badge.vue b/pages/NEUIKit/components/Badge.vue
deleted file mode 100644
index b6d39f7..0000000
--- a/pages/NEUIKit/components/Badge.vue
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
{{ text }}
-
{{ props.num }}
-
-
-
-
-
-
diff --git a/pages/NEUIKit/components/Empty.vue b/pages/NEUIKit/components/Empty.vue
deleted file mode 100644
index 5d6624c..0000000
--- a/pages/NEUIKit/components/Empty.vue
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
diff --git a/pages/NEUIKit/components/Icon.vue b/pages/NEUIKit/components/Icon.vue
deleted file mode 100644
index 35ef423..0000000
--- a/pages/NEUIKit/components/Icon.vue
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/NEUIKit/locale/en.json b/pages/NEUIKit/locale/en.json
deleted file mode 100644
index 1e75773..0000000
--- a/pages/NEUIKit/locale/en.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "messageText": "Message",
- "cantactsText": "Cantact",
- "mineText": "Me"
-}
diff --git a/pages/NEUIKit/locale/zh-Hans.json b/pages/NEUIKit/locale/zh-Hans.json
deleted file mode 100644
index 2d6db61..0000000
--- a/pages/NEUIKit/locale/zh-Hans.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "messageText": "消息",
- "cantactsText": "通讯录",
- "mineText": "我的"
-}
diff --git a/pages/NEUIKit/locale/zh-Hans.ts b/pages/NEUIKit/locale/zh-Hans.ts
deleted file mode 100644
index 7cfac7d..0000000
--- a/pages/NEUIKit/locale/zh-Hans.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-// zn.js
-export default {
- appText: '云信IM',
- deleteStickTopText: '取消置顶',
- contactText: '通讯录',
- addFriendText: '添加好友',
- addStickTopText: '置顶消息',
- deleteSessionText: '不显示',
- createTeamText: '创建群聊',
- validMsgText: '验证消息',
- blacklistText: '黑名单',
- teamMenuText: '我的群组',
- someoneText: '有人',
- meText: '我',
- recall: '撤回了一条消息',
- conversationSendFailText: '[发送失败]',
- conversationNotificationText: '[通知消息]',
- noFriendText: '暂无好友',
-}
diff --git a/pages/NEUIKit/pages/Contact/BcFriend.vue b/pages/NEUIKit/pages/Contact/BcFriend.vue
deleted file mode 100644
index e66d6bf..0000000
--- a/pages/NEUIKit/pages/Contact/BcFriend.vue
+++ /dev/null
@@ -1,208 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ receiverUserData.tel || "-" }}
-
-
- {{ receiverUserData.userName || "-" }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.userName }}
-
-
- {{ item.tel }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/NEUIKit/pages/Contact/contact-list/friend-list.vue b/pages/NEUIKit/pages/Contact/contact-list/friend-list.vue
deleted file mode 100644
index 3288bfc..0000000
--- a/pages/NEUIKit/pages/Contact/contact-list/friend-list.vue
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
-
- {{ friendGroup.key }}
-
-
-
-
{{ friend.appellation }}
-
-
-
-
-
-
-
-
-
diff --git a/pages/NEUIKit/pages/Contact/contact-list/index.vue b/pages/NEUIKit/pages/Contact/contact-list/index.vue
deleted file mode 100644
index cbfb904..0000000
--- a/pages/NEUIKit/pages/Contact/contact-list/index.vue
+++ /dev/null
@@ -1,276 +0,0 @@
-
-
-
-
-
-
-
diff --git a/pages/NEUIKit/pages/Contact/index.vue b/pages/NEUIKit/pages/Contact/index.vue
deleted file mode 100644
index 5ddd1ef..0000000
--- a/pages/NEUIKit/pages/Contact/index.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
diff --git a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item-isRead.vue b/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item-isRead.vue
deleted file mode 100644
index 51f310f..0000000
--- a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item-isRead.vue
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
-
-
-
-
diff --git a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue b/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue
deleted file mode 100644
index 903a7c3..0000000
--- a/pages/NEUIKit/pages/Conversation/conversation-list/conversation-item.vue
+++ /dev/null
@@ -1,458 +0,0 @@
-
-
-
-
-
-
-
-
- {{ sessionName }}
-
-
{{ date }}
-
-
-
- {{ "[" + t("someoneText") + "@" + t("meText") + "]" }}
-
-
- {{ lastMsgContent }}
-
-
-
-
-
-
handleClick(action.type)">
- {{ action.name }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/NEUIKit/pages/Conversation/conversation-list/index.vue b/pages/NEUIKit/pages/Conversation/conversation-list/index.vue
deleted file mode 100644
index 9b05053..0000000
--- a/pages/NEUIKit/pages/Conversation/conversation-list/index.vue
+++ /dev/null
@@ -1,365 +0,0 @@
-
-
-
-
-
-
-
diff --git a/pages/NEUIKit/tsconfig.json b/pages/NEUIKit/tsconfig.json
deleted file mode 100644
index f0b456d..0000000
--- a/pages/NEUIKit/tsconfig.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "compilerOptions": {
- "target": "esnext",
- "module": "esnext",
- "strict": true,
- "jsx": "preserve",
- "moduleResolution": "node",
- "experimentalDecorators": true,
- "skipLibCheck": true,
- "esModuleInterop": true,
- "allowSyntheticDefaultImports": true,
- "forceConsistentCasingInFileNames": true,
- "useDefineForClassFields": true,
- "sourceMap": true,
- "strictFunctionTypes": false,
- "preserveValueImports": false,
- "isolatedModules": false,
- "baseUrl": ".",
- "types": ["node", "webpack-env", "vue/types", "vue-router/types"],
- "paths": {
- "@/*": ["src/*"]
- },
- "lib": ["esnext", "dom", "dom.iterable", "scripthost"]
- },
- "files": ["*.d.ts", "**/*.ts", "**/*.tsx", "**/*.vue", "**/*.ts", "**/*.tsx"],
- "include": [
- "*.d.ts",
- "**/*.ts",
- "**/*.tsx",
- "**/*.vue",
- "**/*.ts",
- "**/*.tsx"
- ],
- "exclude": ["node_modules"]
-}
diff --git a/pages/NEUIKit/utils/constants.ts b/pages/NEUIKit/utils/constants.ts
deleted file mode 100644
index 52ce773..0000000
--- a/pages/NEUIKit/utils/constants.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-import { t } from './i18n'
-import { V2NIMConst } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK'
-
-// 自定义的一些事件常量
-export const events = {
- // 自己发出一条消息
- SEND_MSG: 'sendMsg',
- // 发送消息失败
- SEND_MSG_FAILED: 'sendMsgFailed',
- // 收到一条消息
- ON_MSG: 'onMsg',
- // 加载更多
- ON_LOAD_MORE: 'onLoadMore',
- // 首次进入聊天页并获取历史记录
- ON_CHAT_MOUNTED: 'onChatMounted',
- // 重新编辑撤回消息
- ON_REEDIT_MSG: 'onReEditMsg',
- // 页面触底
- ON_REACH_BOTTOM: 'onReachBottom',
- // 页面触顶
- ON_REACH_TOP: 'onReactTop',
- // 回复消息
- REPLY_MSG: 'replyMsg',
- // input框聚焦
- ON_INPUT_FOCUS_CHANGE: 'onInputFocusChange',
- // input框失焦
- ON_INPUT_BLUR: 'onInputBlur',
- // 滚动到底部
- ON_SCROLL_BOTTOM: 'onScrollBottom',
- // @群成员
- AIT_TEAM_MEMBER: 'aitTeamMember',
- // 表情框弹起与收起变化
- EMOJI_AREA_CHANGE: 'emojiAreaChange',
- // 获取历史消息
- GET_HISTORY_MSG: 'getHistoryMsg',
- // 取消转发消息
- CANCEL_FORWARD_MSG: 'cancelForwardMsg',
- // 确认转发消息
- CONFIRM_FORWARD_MSG: 'confirmForwardMsg',
- // @消息 @群成员
- HANDLE_AIT_MEMBER: 'handleAitMember',
- // 关闭@弹窗
- CLOSE_AIT_POPUP: 'closeAitPopup',
- // 表情点击
- EMOJI_CLICK: 'emojiClick',
- // 表情删除
- EMOJI_DELETE: 'emojiDelete',
- // 表情发送
- EMOJI_SEND: 'emojiSend',
- // 好友选择
- FRIEND_SELECT: 'friendSelect',
- // 处理滚动穿透
- HANDLE_MOVE_THROUGH: 'handleMoveThrough',
- // 关闭表情、语音面板
- CLOSE_PANEL: 'closePanel',
- // 语音消息url改变
- AUDIO_URL_CHANGE: 'audioUrlChange',
-}
-
-export const HISTORY_LIMIT = 15
-
-export const MSG_ID_FLAG = 'message-item-'
-
-export const AT_ALL_ACCOUNT = 'ait_all'
-
-export const ALLOW_AT = 'yxAllowAt'
-
-export const REPLY_MSG_TYPE_MAP: { [key: number]: string } = {
- [V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_IMAGE]: t('imgMsgText'),
- [V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_AUDIO]: t('audioMsgText'),
- [V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_VIDEO]: t('videoMsgText'),
- [V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_FILE]: t('fileMsgText'),
-}
-
-export const STORAGE_KEY = '__yx_im_options__'
-
-export const callTypeMap = {
- audio: '1',
- video: '2',
-}
-
-export const g2StatusMap: any = {
- 1: t('callDurationText'),
- 2: t('callCancelText'),
- 3: t('callRejectedText'),
- 4: t('callTimeoutText'),
- 5: t('callBusyText'),
-}
-
-export const msgRecallTime = 2 * 60 * 1000
diff --git a/pages/NEUIKit/utils/customNavigate.ts b/pages/NEUIKit/utils/customNavigate.ts
deleted file mode 100644
index c27f758..0000000
--- a/pages/NEUIKit/utils/customNavigate.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-const preUrl = '/root/NEUIKit'
-
-export function customNavigateTo(options: { url: string }) {
- uni.navigateTo({ ...options, url: preUrl + options.url })
-}
-
-export function customRedirectTo(options: { url: string }) {
- uni.redirectTo({ ...options, url: preUrl + options.url })
-}
-
-export function customSwitchTab(options: { url: string }) {
- uni.switchTab({ ...options, url: preUrl + options.url })
-}
-
-export function customReLaunch(options: { url: string }) {
- uni.reLaunch({ ...options, url: preUrl + options.url })
-}
diff --git a/pages/NEUIKit/utils/date.ts b/pages/NEUIKit/utils/date.ts
deleted file mode 100644
index 8cb9aa5..0000000
--- a/pages/NEUIKit/utils/date.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { t } from './i18n'
-
-export function caculateTimeago(dateTimeStamp: number): string {
- const minute = 1000 * 60 // 把分,时,天,周,半个月,一个月用毫秒表示
- const hour = minute * 60
- const day = hour * 24
- const week = day * 7
- const now = new Date().getTime() // 获取当前时间毫秒
- const diffValue = now - dateTimeStamp // 时间差
- let result = ''
-
- if (diffValue < 0) {
- return t('nowText')
- }
- const minC = Math.floor(diffValue / minute) // 计算时间差的分,时,天,周,月
- const hourC = Math.floor(diffValue / hour)
- const dayC = Math.floor(diffValue / day)
- const weekC = Math.floor(diffValue / week)
- if (weekC >= 1 && weekC <= 4) {
- result = ` ${weekC}${t('weekText')}`
- } else if (dayC >= 1 && dayC <= 6) {
- result = ` ${dayC}${t('dayText')}`
- } else if (hourC >= 1 && hourC <= 23) {
- result = ` ${hourC}${t('hourText')}`
- } else if (minC >= 1 && minC <= 59) {
- result = ` ${minC}${t('minuteText')}`
- } else if (diffValue >= 0 && diffValue <= minute) {
- result = t('nowText')
- } else {
- const datetime = new Date()
- datetime.setTime(dateTimeStamp)
- const Nyear = datetime.getFullYear()
- const Nmonth =
- datetime.getMonth() + 1 < 10
- ? `0${datetime.getMonth() + 1}`
- : datetime.getMonth() + 1
- const Ndate =
- datetime.getDate() < 10 ? `0${datetime.getDate()}` : datetime.getDate()
- result = `${Nyear}-${Nmonth}-${Ndate}`
- }
- return result
-}
-
-export const formatDateRange = (type) => {
- const date = new Date()
- let year = date.getFullYear()
- let month: string | number = date.getMonth() + 1
- let day: string | number = date.getDate()
-
- if (type === 'start') {
- year = year - 100
- } else if (type === 'end') {
- year = year
- }
- month = month > 9 ? month : '0' + month
- day = day > 9 ? day : '0' + day
- return `${year}-${month}-${day}`
-}
diff --git a/pages/NEUIKit/utils/friend.ts b/pages/NEUIKit/utils/friend.ts
deleted file mode 100644
index 3995f9e..0000000
--- a/pages/NEUIKit/utils/friend.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-// #ifdef APP-PLUS
-import pinyin from 'pinyin'
-// #endif
-
-export const friendGroupByPy = <
- T extends {
- [key: string]: any
- }
->(
- arr: T[],
- keys: {
- firstKey: string
- secondKey?: string
- thirdKey?: string
- },
- isLowerCase = true
-): { key: string; data: T[] }[] => {
- const res: { [key: string]: T[] } = {}
- const OTHER_TAG = '#'
-
- const add = (k: string, v: T) => {
- const _k = isLowerCase ? k.toLowerCase() : k.toUpperCase()
- if (!res[_k]) {
- res[_k] = [v]
- } else {
- res[_k].push(v)
- }
- }
-
- arr.forEach((item) => {
- const v =
- item[keys.firstKey] ||
- item[keys.secondKey || ''] ||
- item[keys.thirdKey || '']
- if (!!v && typeof v === 'string') {
- const str = v[0]
- if (/^[a-zA-Z]$/.test(str)) {
- add(str.toLowerCase(), item)
- } else if (/^[\u4e00-\u9fa5]$/.test(str)) {
- const en = '*abcdefghjklmnopqrstwxyz'.split('')
- // #ifdef APP-PLUS
- // @ts-ignore
- const k = en.find((k) => {
- const py = pinyin(str, {
- style: 'FIRST_LETTER',
- })
- return py[0][0] === k
- })
- // #endif
- // #ifndef APP-PLUS
- const zh = '阿八嚓哒妸发旮哈讥咔垃痳拏噢妑七呥扨它穵夕丫帀'.split('')
- // @ts-ignore
- const k = en.find(
- (k, ki) =>
- (!zh[ki - 1] || zh[ki - 1].localeCompare(str, 'zh') <= 0) &&
- str.localeCompare(zh[ki], 'zh') == -1
- )
- // #endif
- if (k && k !== '*') {
- add(k, item)
- } else {
- add(OTHER_TAG, item)
- }
- } else {
- add(OTHER_TAG, item)
- }
- } else {
- add(OTHER_TAG, item)
- }
- })
-
- const data = Object.keys(res).map((k) => ({ key: k, data: res[k] }))
- const sortData = data
- .filter((item) => item.key !== OTHER_TAG)
- .sort((a, b) => a.key.localeCompare(b.key, 'en'))
- const otherData = data.filter((item) => item.key === OTHER_TAG)
-
- return sortData.concat(otherData)
-}
diff --git a/pages/NEUIKit/utils/i18n.ts b/pages/NEUIKit/utils/i18n.ts
deleted file mode 100644
index a234970..0000000
--- a/pages/NEUIKit/utils/i18n.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import zh from '../locale/zh-Hans'
-const messages = {
- zh,
-}
-const localeMap = {
- 'zh-Hans': 'zh',
- 'zh-Hant': 'zh',
-}
-
-export const t = (key: string) => {
- return zh[key]
-}
diff --git a/pages/NEUIKit/utils/index.ts b/pages/NEUIKit/utils/index.ts
deleted file mode 100644
index 23de749..0000000
--- a/pages/NEUIKit/utils/index.ts
+++ /dev/null
@@ -1,151 +0,0 @@
-import { events } from './constants'
-
-export const getUniPlatform = () => {
- // @ts-ignore
- return uni.getSystemInfoSync().uniPlatform
-}
-
-export const getPlatform = () => {
- // @ts-ignore
- return uni.getSystemInfoSync().platform
-}
-// 是否是android app
-export const isAndroidApp =
- uni.getSystemInfoSync().platform == 'android' &&
- uni.getSystemInfoSync().uniPlatform == 'app'
-
-// 是否是Ios app
-export const isIosApp =
- uni.getSystemInfoSync().platform == 'ios' &&
- uni.getSystemInfoSync().uniPlatform == 'app'
-
-// 是否是Ios web
-export const isIosWeb =
- uni.getSystemInfoSync().uniPlatform === 'web' &&
- uni.getSystemInfoSync().platform === 'ios'
-
-// 是否是App
-export const isApp = uni.getSystemInfoSync().uniPlatform == 'app'
-
-// 是否是微信小程序
-export const isWxApp = uni.getSystemInfoSync().uniPlatform == 'mp-weixin'
-
-// 是否是web
-export const isWeb = uni.getSystemInfoSync().uniPlatform === 'web'
-
-// @ts-ignore
-export function deepClone(source: any, visited = new WeakMap()) {
- if (source === null || typeof source !== 'object') {
- return source
- }
-
- if (visited.has(source)) {
- return visited.get(source)
- }
- // @ts-ignore
- let clone
-
- if (source instanceof Date) {
- clone = new Date(source.getTime())
- } else if (source instanceof RegExp) {
- clone = new RegExp(source)
- } else if (source instanceof Map) {
- clone = new Map()
- visited.set(source, clone)
- source.forEach((value, key) => {
- // @ts-ignore
- clone.set(key, deepClone(value, visited))
- })
- } else if (source instanceof Set) {
- clone = new Set()
- visited.set(source, clone)
- source.forEach((value) => {
- // @ts-ignore
- clone.add(deepClone(value, visited))
- })
- } else if (Array.isArray(source)) {
- clone = []
- // @ts-ignore
- visited.set(source, clone)
- for (let i = 0; i < source.length; i++) {
- clone[i] = deepClone(source[i], visited)
- }
- } else {
- clone = Object.create(Object.getPrototypeOf(source))
- visited.set(source, clone)
- for (const prop in source) {
- if (source.hasOwnProperty(prop)) {
- clone[prop] = deepClone(source[prop], visited)
- }
- }
- }
-
- return clone
-}
-
-export function stopAllAudio() {
- uni.$emit(events.AUDIO_URL_CHANGE, '')
-}
-
-/**
- * 秒转换为时分秒
- */
-export const convertSecondsToTime = (seconds: number): string | null => {
- if (!seconds) {
- return null
- }
- const hours: number = Math.floor(seconds / 3600)
- const minutes: number = Math.floor((seconds - hours * 3600) / 60)
- const remainingSeconds: number = seconds - hours * 3600 - minutes * 60
-
- let timeString = ''
-
- const includeHours = seconds >= 3600
- if (includeHours) {
- if (hours < 10) {
- timeString += '0'
- }
- timeString += hours.toString() + ':'
- }
-
- if (minutes < 10) {
- timeString += '0'
- }
- timeString += minutes.toString() + ':'
-
- if (remainingSeconds < 10) {
- timeString += '0'
- }
- timeString += remainingSeconds.toString()
-
- return timeString
-}
-
-export const startCall = (options: {
- remoteUserAccid: string
- currentUserAccid: string
- type: number
- remoteShowName: string
-}) => {
- try {
- // @ts-ignore
- uni.$UIKitCallKit.toCallPage(
- {
- calledAccount: options.remoteUserAccid,
- // currentUserAccid: options.currentUserAccid,
- type: options.type,
- calledShowName: options.remoteShowName,
- },
- () => {
- console.log('toCallPage: ', {
- remoteUserAccid: options.remoteUserAccid,
- currentUserAccid: options.currentUserAccid,
- type: options.type,
- remoteShowName: options.remoteShowName,
- })
- }
- )
- } catch (error) {
- console.log('handleVideoCall error', error)
- }
-}
diff --git a/pages/NEUIKit/utils/msg.ts b/pages/NEUIKit/utils/msg.ts
deleted file mode 100644
index 3ee2307..0000000
--- a/pages/NEUIKit/utils/msg.ts
+++ /dev/null
@@ -1,117 +0,0 @@
-import { V2NIMConst } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK'
-import { t } from './i18n'
-import { V2NIMMessageType } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService'
-
-const translate = (key: string): string => {
- const text =
- {
- textMsgText: t('textMsgText'),
- customMsgText: t('customMsgText'),
- audioMsgText: t('audioMsgText'),
- videoMsgText: t('videoMsgText'),
- fileMsgText: t('fileMsgText'),
- callMsgText: t('callMsgText'),
- geoMsgText: t('geoMsgText'),
- imgMsgText: t('imgMsgText'),
- notiMsgText: t('notiMsgText'),
- robotMsgText: t('robotMsgText'),
- tipMsgText: t('tipMsgText'),
- unknowMsgText: t('unknowMsgText'),
- }[key] || ''
- return `[${text}]`
-}
-
-export const getMsgContentTipByType = (msg: {
- messageType?: V2NIMMessageType
- text?: string
-}): string => {
- const { messageType, text } = msg
- // switch (messageType) {
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_TEXT:
- // return text || translate('textMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_FILE:
- // return translate('fileMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_IMAGE:
- // return translate('imgMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_CUSTOM:
- // return text || translate('customMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_AUDIO:
- // return translate('audioMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_CALL:
- // return translate('callMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_LOCATION:
- // return translate('geoMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_NOTIFICATION:
- // return translate('notiMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_ROBOT:
- // return translate('robotMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_TIPS:
- // return translate('tipMsgText')
- // case V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_VIDEO:
- // return translate('videoMsgText')
- // default:
- // return translate('unknowMsgText')
- // }
- return text;
-}
-
-export const setTabUnread = (val): void => {
- const routes = getCurrentPages()
- const curRoute = routes[routes.length - 1].route
- const tabPaths = [
- 'pages/home/index',
- 'pages/home/order',
- 'pages/workBench/index',
- 'pages/message/index',
- 'pages/person/index',
- 'root/person/changeTeam'
- ]
- if (curRoute && !tabPaths.includes(curRoute)) {
- // 不是首页和聊天页,不需要设置tabbar的badge
- return
- }
-
- const store = uni.$UIKitStore
- const unread = store?.conversationStore.totalUnreadCount || 0
- // console.log('store?.conversationStore.totalUnreadCount', store?.conversationStore.totalUnreadCount);
- uni.$emit('newMessage', { count: store?.conversationStore.totalUnreadCount, type: 'message' })
- uni.setStorageSync("chat_info", { count: store?.conversationStore.totalUnreadCount, type: 'message' });
- if (unread === 0) {
- uni.hideTabBarRedDot({
- //隐藏数字
- index: 1, //tabbar下标
- })
- } else {
- uni.showTabBarRedDot({
- index: 1, //tabbar下标
- })
- }
-}
-
-export const setContactTabUnread = (): void => {
- const routes = getCurrentPages()
- const curRoute = routes[routes.length - 1].route
- const tabPaths = [
- 'pages/home/index',
- 'pages/home/order',
- 'pages/workBench/index',
- 'pages/message/index',
- 'pages/person/index',
- 'root/person/changeTeam'
- ]
- if (curRoute && !tabPaths.includes(curRoute)) {
- // 不是首页和聊天页,不需要设置tabbar的badge
- return
- }
- // const unread = uni.$UIKitStore?.sysMsgStore?.getTotalUnreadMsgsCount()
- // if (unread === 0) {
- // uni.hideTabBarRedDot({
- // //隐藏数字
- // index: 3, //tabbar下标
- // })
- // } else {
- // uni.showTabBarRedDot({
- // index: 3, //tabbar下标
- // })
- // }
-}
diff --git a/pages/NEUIKit/utils/permission.ts b/pages/NEUIKit/utils/permission.ts
deleted file mode 100644
index 8c74fcc..0000000
--- a/pages/NEUIKit/utils/permission.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { t } from './i18n'
-
-export const handleNoPermission = (res: any): void => {
- if (
- uni.getSystemInfoSync().platform == 'android' ||
- uni.getSystemInfoSync().platform == 'ios'
- ) {
- const appAuthorizeSetting = uni.getAppAuthorizeSetting()
- //点击取消时不出现弹窗
- const isCameraDenied = appAuthorizeSetting.cameraAuthorized === 'denied'
- const isUserCancelled =
- res.errMsg === 'chooseImage:fail User cancelled' ||
- res.errMsg === 'chooseImage:fail cancel' ||
- res.errMsg === 'chooseVideo:fail cancel' ||
- res.errMsg === 'chooseVideo:fail User cancelled'
- if (
- (res.code === 11 && isCameraDenied && !isUserCancelled) ||
- (res.code === 12 && isCameraDenied && !isUserCancelled) ||
- (res.code === 2 && !isUserCancelled)
- ) {
- uni.showToast({
- icon: 'none',
- title: t('addPermissionText'),
- })
- }
- }
-}
diff --git a/pages/NEUIKit/utils/reporter.ts b/pages/NEUIKit/utils/reporter.ts
deleted file mode 100644
index 7c8c1dd..0000000
--- a/pages/NEUIKit/utils/reporter.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { EventTracking } from '@xkit-yx/utils/dist/uniapp'
-import imPkg from 'nim-web-sdk-ng/package.json'
-
-export const trackInit = (
- component: 'ChatUIKit' | 'ContactUIKit' | 'ConversationUIKit' | 'SearchUIKit'
-): void => {
- console.log('js init');
- if (uni.$UIKitNIM && uni.$UIKitNIM.options.appkey) {
- const eventTracking = new EventTracking({
- appKey: uni.$UIKitNIM.options.appkey,
- version: '10.2.0',
- component,
- imVersion: imPkg.version,
- platform: 'UniApp',
- })
- eventTracking.track('init', '')
- }else{
- console.log('js 异常')
- }
-}
diff --git a/pages/NEUIKit/utils/transformVue.ts b/pages/NEUIKit/utils/transformVue.ts
deleted file mode 100644
index f93a0dc..0000000
--- a/pages/NEUIKit/utils/transformVue.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-let vueVersion: number
-// #ifndef VUE3
-export * from '@vue/composition-api'
-vueVersion = 2
-// #endif
-
-// #ifdef VUE3
-export * from 'vue'
-vueVersion = 3
-// #endif
-console.log(`vue version is ${vueVersion}`)
-export { vueVersion }
diff --git a/pages/message/index.vue b/pages/message/index.vue
index 7152af4..b176b6e 100644
--- a/pages/message/index.vue
+++ b/pages/message/index.vue
@@ -10,11 +10,12 @@
-
+
+
-
+
@@ -43,11 +44,11 @@