cyl/master-0822
wangxia 7 months ago
parent 67dd3b0e62
commit 051453f94c

@ -20,7 +20,7 @@
</view> </view>
<view v-if="speed > 0" class="link"> <view v-if="speed > 0" class="link">
<block class="" v-for="(item, index) in jobArray" :key="index"> <block class="" v-for="(item, index) in jobArray" :key="index">
<view class="item g_position_rela g_mb_10 g_ml_12 g_mr_12 g_bg_f g_radius_8 g_border_e_b" :class="from == 'share' ? 'g_pl_32' : ''"> <view class="item g_position_rela g_mb_10 g_ml_12 g_mr_12 g_bg_f g_radius_8 g_border_e_b" :class="from == 'share' || from == 'chat' ? 'g_pl_32' : ''">
<view class="g_p_10 g_position_rela" style="" @click="handleCard(item, index)"> <view class="g_p_10 g_position_rela" style="" @click="handleCard(item, index)">
<i class="iconfont icon-yitingzhao" v-if="item.recruitment == 2 && from != 'mine'" style="position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); color: #ff4d4f; font-size: 80px; z-index: 1"></i> <i class="iconfont icon-yitingzhao" v-if="item.recruitment == 2 && from != 'mine'" style="position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); color: #ff4d4f; font-size: 80px; z-index: 1"></i>
<view class="m-top g_flex_row_between"> <view class="m-top g_flex_row_between">
@ -130,6 +130,9 @@
<view class="checkBox" hover-class="none" v-if="from == 'share'" @click.stop="checkJob(item)"> <view class="checkBox" hover-class="none" v-if="from == 'share'" @click.stop="checkJob(item)">
<checkbox class="biggerSize" style="transform: scale(0.8, 0.8)" color="g_c_main" :checked="item.checked" :value="item.checked"></checkbox> <checkbox class="biggerSize" style="transform: scale(0.8, 0.8)" color="g_c_main" :checked="item.checked" :value="item.checked"></checkbox>
</view> </view>
<view class="checkBox" hover-class="none" v-if="from == 'chat'" @click.stop="sendJob(item)">
选择
</view>
</view> </view>
</block> </block>
<view class="g_mt_32 g_pb_32 g_c_9 g_pl_12 g_text_c" v-if="isShowLoginBtn && jobArray.length > 0" hover-class="none"> <view class="g_mt_32 g_pb_32 g_c_9 g_pl_12 g_text_c" v-if="isShowLoginBtn && jobArray.length > 0" hover-class="none">
@ -192,6 +195,7 @@ export default {
// //
computed: { computed: {
status() { status() {
console.log("this.query", this.query);
if (this.query.isFinish >= 0 && this.query.isFinish < this.query.size) { if (this.query.isFinish >= 0 && this.query.isFinish < this.query.size) {
return "nomore"; return "nomore";
} else { } else {
@ -416,6 +420,10 @@ export default {
}, },
checkJob(_item) { checkJob(_item) {
this.$emit("checkJob", _item); this.$emit("checkJob", _item);
},
sendJob(_item){
this.$emit("sendJob", _item);
}, },
submitApply(e) { submitApply(e) {
let that = this; let that = this;

@ -2,6 +2,7 @@ $filter_bg_color: #e3ecfd;
$main_bg_color: #1890ff; $main_bg_color: #1890ff;
$page_bg_color: #ededed; $page_bg_color: #ededed;
$main_color: #1890ff; $main_color: #1890ff;
@import '../../static/css/base.scss';
image { image {
vertical-align: top; vertical-align: top;
} }

@ -1,8 +1,6 @@
<template> <template>
<!-- 处理滚动穿透 此为官方推荐做法 https://uniapp.dcloud.net.cn/component/uniui/uni-popup.html#%E4%BB%8B%E7%BB%8D --> <!-- 处理滚动穿透 此为官方推荐做法 https://uniapp.dcloud.net.cn/component/uniui/uni-popup.html#%E4%BB%8B%E7%BB%8D -->
<page-meta <page-meta :page-style="'overflow:' + (moveThrough ? 'hidden' : 'visible')"></page-meta>
:page-style="'overflow:' + (moveThrough ? 'hidden' : 'visible')"
></page-meta>
<div :class="isH5 ? 'msg-page-wrapper-h5' : 'msg-page-wrapper'"> <div :class="isH5 ? 'msg-page-wrapper-h5' : 'msg-page-wrapper'">
<NavBar :title="title" :showLeft="true" v-if="false"> <NavBar :title="title" :showLeft="true" v-if="false">
<template v-slot:left> <template v-slot:left>
@ -15,188 +13,180 @@
<NetworkAlert /> <NetworkAlert />
</div> </div>
<div :class="isH5 ? 'msg-wrapper-h5' : 'msg-wrapper'"> <div :class="isH5 ? 'msg-wrapper-h5' : 'msg-wrapper'">
<MessageList <MessageList :conversationType="conversationType" :to="to" :msgs="msgs" :loading-more="loadingMore" :no-more="noMore" :reply-msgs-map="replyMsgsMap" />
:conversationType="conversationType"
:to="to"
:msgs="msgs"
:loading-more="loadingMore"
:no-more="noMore"
:reply-msgs-map="replyMsgsMap"
/>
</div> </div>
<!-- <div style="height: 'auto';position: fixed;left: 0;bottom: 0;width: 100vw;"> --> <!-- <div style="height: 'auto';position: fixed;left: 0;bottom: 0;width: 100vw;"> -->
<MessageInput <MessageInput
:reply-msgs-map="replyMsgsMap" :reply-msgs-map="replyMsgsMap"
:jobListShow.sync="jobListShow"
@jobListShow="
(e) => {
jobListShow = e;
}
"
:conversation-type="conversationType" :conversation-type="conversationType"
:to="to" :to="to"
/> />
<!-- </div> --> <!-- </div> -->
<u-popup v-model="jobListShow" mode="bottom" z-index="999999" border-radius="12" :closeable="false" :mask-close-able="true" :mask="true" @close="jobListShow = false">
<view class="g_bg_ed" style="min-height: 70vh">
<div class="m-search g_p_10 g_pt_8 g_position_rela g_flex_1 bg_shawdoc" style id="searchInputBox">
<u-search height="80" v-model="keyword" @input="checkLength" @clear="searchJob" @search="searchJob" class="" placeholder="搜索职位名称" bg-color="#fff" :show-action="false" placeholder-class="g_c_c" search-icon-color="#999999" :maxlength="20"></u-search>
</div>
<g-list-job from="chat" @uploadList="getList" @sendJob="sendJob" bg="#ededed" class="" :query="query" :list="query.list" :loading="loading" :speed="speed" :isShowLoginBtn="false" emptyText="嘿,这里还没有数据呢" />
</view>
</u-popup>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onShow } from '@dcloudio/uni-app' import gListJob from "../../../../components/list/job";
import { events } from '../../utils/constants' import { onShow } from "@dcloudio/uni-app";
import { trackInit } from '../../utils/reporter' import { events } from "../../utils/constants";
import { autorun } from 'mobx' import { trackInit } from "../../utils/reporter";
import { ref, onMounted, onUnmounted } from '../../utils/transformVue' import { autorun } from "mobx";
import { deepClone, getUniPlatform } from '../../utils' import { ref, onMounted, computed, onUnmounted, getCurrentInstance } from "vue";
import { onLoad, onUnload } from '@dcloudio/uni-app' // import { ref, onMounted, onUnmounted, getCurrentInstance } from "../../utils/transformVue";
import { customSwitchTab,customNavigateTo } from '../../utils/customNavigate' import { deepClone, getUniPlatform } from "../../utils";
import NetworkAlert from '../../components/NetworkAlert.vue' import { onLoad, onUnload } from "@dcloudio/uni-app";
import NavBar from './message/nav-bar.vue' import { customSwitchTab, customNavigateTo } from "../../utils/customNavigate";
import Icon from '../../components/Icon.vue' import NetworkAlert from "../../components/NetworkAlert.vue";
import MessageList from './message/message-list.vue' import NavBar from "./message/nav-bar.vue";
import MessageInput from './message/message-input.vue' import Icon from "../../components/Icon.vue";
import { HISTORY_LIMIT,MSG_ID_FLAG } from '../../utils/constants' import MessageList from "./message/message-list.vue";
import { t } from '../../utils/i18n' import MessageInput from "./message/message-input.vue";
import { V2NIMMessage } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService' import { HISTORY_LIMIT, MSG_ID_FLAG } from "../../utils/constants";
import { V2NIMConst } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK' import { t } from "../../utils/i18n";
import { V2NIMMessage } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService";
import { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK";
const G = getCurrentInstance().appContext.app.config.globalProperties.G;
const F = getCurrentInstance().appContext.app.config.globalProperties.F;
const api = getCurrentInstance().appContext.app.config.globalProperties.api;
export interface YxReplyMsg { export interface YxReplyMsg {
messageClientId: string messageClientId: string;
scene: V2NIMConst.V2NIMConversationType scene: V2NIMConst.V2NIMConversationType;
from: string from: string;
receiverId: string receiverId: string;
to: string to: string;
idServer: string idServer: string;
time: number time: number;
} }
trackInit('ChatUIKit') trackInit("ChatUIKit");
const title = ref('') const title = ref("");
const jobListShow = ref(false);
const conversationId = uni.$UIKitStore.uiStore.selectedConversation const toDetail = () => {
const conversationType = uni.navigateTo({
uni.$UIKitNIM.V2NIMConversationIdUtil.parseConversationType(conversationId) url: "/root/detail/job?id=" + 146579,
const to = });
uni.$UIKitNIM.V2NIMConversationIdUtil.parseConversationTargetId( };
conversationId const conversationId = uni.$UIKitStore.uiStore.selectedConversation;
) const conversationType = uni.$UIKitNIM.V2NIMConversationIdUtil.parseConversationType(conversationId);
const to = uni.$UIKitNIM.V2NIMConversationIdUtil.parseConversationTargetId(conversationId);
const isH5 = getUniPlatform() === 'web' const isH5 = getUniPlatform() === "web";
// uni-popup 穿 // uni-popup 穿
const moveThrough = ref(false) const moveThrough = ref(false);
const backToConversation = () => { const backToConversation = () => {
customSwitchTab({ customSwitchTab({
url: '/pages/Conversation/index', url: "/pages/Conversation/index",
}) });
} };
// false // false
const teamManagerVisible = uni.$UIKitStore.localOptions.teamMsgReceiptVisible const teamManagerVisible = uni.$UIKitStore.localOptions.teamMsgReceiptVisible;
// p2p p2p false // p2p p2p false
const p2pMsgReceiptVisible = uni.$UIKitStore.localOptions.p2pMsgReceiptVisible const p2pMsgReceiptVisible = uni.$UIKitStore.localOptions.p2pMsgReceiptVisible;
let isMounted = false let isMounted = false;
const loadingMore = ref(false) const loadingMore = ref(false);
const noMore = ref(false) const noMore = ref(false);
const msgs = ref<V2NIMMessage[]>([]) const msgs = ref<V2NIMMessage[]>([]);
// //
const replyMsgsMap = ref<Record<string, V2NIMMessage>>() const replyMsgsMap = ref<Record<string, V2NIMMessage>>();
const handleDismissTeam = (data: any) => { const handleDismissTeam = (data: any) => {
if (data.teamId === to) { if (data.teamId === to) {
uni.showModal({ uni.showModal({
content: t('onDismissTeamText'), content: t("onDismissTeamText"),
showCancel: false, showCancel: false,
success(data) { success(data) {
if (data.confirm) { if (data.confirm) {
backToConversation() backToConversation();
} }
}, },
}) });
} }
} };
const handleRemoveTeamMembers = (data: any) => { const handleRemoveTeamMembers = (data: any) => {
uni uni
.showToast({ .showToast({
title: t('onRemoveTeamText'), title: t("onRemoveTeamText"),
icon: 'success', icon: "success",
duration: 1000, duration: 1000,
}) })
.then(() => { .then(() => {
backToConversation() backToConversation();
}) });
} };
// //
const handleReceiveMessages = (msgs: V2NIMMessage[]) => { const handleReceiveMessages = (msgs: V2NIMMessage[]) => {
const routes = getCurrentPages() const routes = getCurrentPages();
const curRoute = routes[routes.length - 1].route const curRoute = routes[routes.length - 1].route;
// //
if ( if (msgs.length && !msgs[0]?.isSelf && msgs[0].conversationId == conversationId && curRoute?.includes("Chat/index")) {
msgs.length && handleMsgReceipt(msgs);
!msgs[0]?.isSelf && }
msgs[0].conversationId == conversationId && uni.$emit(events.ON_SCROLL_BOTTOM, msgs);
curRoute?.includes('Chat/index') };
) {
handleMsgReceipt(msgs)
}
uni.$emit(events.ON_SCROLL_BOTTOM, msgs)
}
// //
const handleMsgReceipt = (msg: V2NIMMessage[]) => { const handleMsgReceipt = (msg: V2NIMMessage[]) => {
if ( if (msg[0].conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P && p2pMsgReceiptVisible) {
msg[0].conversationType === uni.$UIKitStore.msgStore.sendMsgReceiptActive(msg[0]);
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P && } else if (msg[0].conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM && teamManagerVisible) {
p2pMsgReceiptVisible uni.$UIKitStore.msgStore.sendTeamMsgReceiptActive(msg);
) {
uni.$UIKitStore.msgStore.sendMsgReceiptActive(msg[0])
} else if (
msg[0].conversationType ===
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM &&
teamManagerVisible
) {
uni.$UIKitStore.msgStore.sendTeamMsgReceiptActive(msg)
} }
} };
// //
const handleHistoryMsgReceipt = (msgs: V2NIMMessage[]) => { const handleHistoryMsgReceipt = (msgs: V2NIMMessage[]) => {
// //
if ( if (conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P && p2pMsgReceiptVisible) {
conversationType === const myUserAccountId = uni.$UIKitNIM.V2NIMLoginService.getLoginUser();
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P &&
p2pMsgReceiptVisible
) {
const myUserAccountId = uni.$UIKitNIM.V2NIMLoginService.getLoginUser()
const othersMsgs = msgs const othersMsgs = msgs
.filter( .filter(
(item: V2NIMMessage) => (item: V2NIMMessage) =>
// @ts-ignore // @ts-ignore
!['beReCallMsg', 'reCallMsg'].includes(item.recallType || '') !["beReCallMsg", "reCallMsg"].includes(item.recallType || "")
) )
.filter((item: V2NIMMessage) => item.senderId !== myUserAccountId) .filter((item: V2NIMMessage) => item.senderId !== myUserAccountId);
// //
if (othersMsgs.length > 0) { if (othersMsgs.length > 0) {
uni.$UIKitStore.msgStore.sendMsgReceiptActive(othersMsgs?.[0]) uni.$UIKitStore.msgStore.sendMsgReceiptActive(othersMsgs?.[0]);
} }
// //
} else if ( } else if (conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM && teamManagerVisible) {
conversationType === const myUserAccountId = uni.$UIKitNIM.V2NIMLoginService.getLoginUser();
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM &&
teamManagerVisible
) {
const myUserAccountId = uni.$UIKitNIM.V2NIMLoginService.getLoginUser()
const myMsgs = msgs const myMsgs = msgs
.filter( .filter(
(item: V2NIMMessage) => (item: V2NIMMessage) =>
// @ts-ignore // @ts-ignore
!['beReCallMsg', 'reCallMsg'].includes(item.recallType || '') !["beReCallMsg", "reCallMsg"].includes(item.recallType || "")
) )
.filter((item: V2NIMMessage) => item.senderId === myUserAccountId) .filter((item: V2NIMMessage) => item.senderId === myUserAccountId);
uni.$UIKitStore.msgStore.getTeamMsgReadsActive(myMsgs, conversationId) uni.$UIKitStore.msgStore.getTeamMsgReadsActive(myMsgs, conversationId);
// //
// sdk 50 // sdk 50
@ -204,159 +194,121 @@ const handleHistoryMsgReceipt = (msgs: V2NIMMessage[]) => {
.filter( .filter(
(item: V2NIMMessage) => (item: V2NIMMessage) =>
// @ts-ignore // @ts-ignore
!['beReCallMsg', 'reCallMsg'].includes(item.recallType || '') !["beReCallMsg", "reCallMsg"].includes(item.recallType || "")
) )
.filter((item: V2NIMMessage) => item.senderId !== myUserAccountId) .filter((item: V2NIMMessage) => item.senderId !== myUserAccountId);
if (othersMsgs.length > 0 && othersMsgs.length < 50) { if (othersMsgs.length > 0 && othersMsgs.length < 50) {
uni.$UIKitStore.msgStore.sendTeamMsgReceiptActive(othersMsgs) uni.$UIKitStore.msgStore.sendTeamMsgReceiptActive(othersMsgs);
} }
} }
} };
// //
const getHistory = async (endTime: number, lastMsgId?: string) => { const getHistory = async (endTime: number, lastMsgId?: string) => {
try { try {
if (noMore.value) { if (noMore.value) {
return [] return [];
} }
if (loadingMore.value) { if (loadingMore.value) {
return [] return [];
} }
loadingMore.value = true loadingMore.value = true;
if (conversationId) { if (conversationId) {
const historyMsgs = await uni.$UIKitStore.msgStore.getHistoryMsgActive({ const historyMsgs = await uni.$UIKitStore.msgStore.getHistoryMsgActive({
conversationId, conversationId,
endTime, endTime,
lastMsgId, lastMsgId,
limit: HISTORY_LIMIT, limit: HISTORY_LIMIT,
}) });
// console.log(historyMsgs) // console.log(historyMsgs)
// pin msg // pin msg
await uni.$UIKitStore.msgStore.getPinnedMessageListActive(conversationId) await uni.$UIKitStore.msgStore.getPinnedMessageListActive(conversationId);
loadingMore.value = false
loadingMore.value = false;
if (historyMsgs.length < HISTORY_LIMIT) { if (historyMsgs.length < HISTORY_LIMIT) {
noMore.value = true noMore.value = true;
} }
// //
handleHistoryMsgReceipt(historyMsgs) handleHistoryMsgReceipt(historyMsgs);
return historyMsgs return historyMsgs;
} }
} catch (error) { } catch (error) {
loadingMore.value = false loadingMore.value = false;
throw error throw error;
} }
} };
// //
const loadMoreMsgs = (lastMsg: V2NIMMessage) => { const loadMoreMsgs = (lastMsg: V2NIMMessage) => {
// console.log("") // console.log("")
getHistory(lastMsg.createTime, lastMsg.messageServerId).then( getHistory(lastMsg.createTime, lastMsg.messageServerId).then((res: V2NIMMessage[]) => {
(res: V2NIMMessage[]) => {
// console.log(res) // console.log(res)
// console.log("") // console.log("")
uni.$emit('newScroll') uni.$emit("newScroll");
});
}
);
}; };
const conversationTypeWatch = autorun(() => { const conversationTypeWatch = autorun(() => {
// //
if ( if (conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P) {
conversationType === title.value = deepClone(uni.$UIKitStore.uiStore.getAppellation({ account: to }));
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P
) {
title.value = deepClone(
uni.$UIKitStore.uiStore.getAppellation({ account: to })
)
// //
} else if ( } else if (conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM) {
conversationType === const team = uni.$UIKitStore.teamStore.teams.get(to);
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM const subTitle = `(${team?.memberCount || 0})`;
) { title.value = (team?.name || "") + subTitle;
const team = uni.$UIKitStore.teamStore.teams.get(to)
const subTitle = `(${team?.memberCount || 0})`
title.value = (team?.name || '') + subTitle
} }
}) });
// //
const connectedWatch = autorun(() => { const connectedWatch = autorun(() => {
if ( if (uni.$UIKitStore.connectStore.connectStatus === V2NIMConst.V2NIMConnectStatus.V2NIM_CONNECT_STATUS_CONNECTED) {
uni.$UIKitStore.connectStore.connectStatus === if (uni.$UIKitStore.connectStore.loginStatus == V2NIMConst.V2NIMLoginStatus.V2NIM_LOGIN_STATUS_LOGINED) {
V2NIMConst.V2NIMConnectStatus.V2NIM_CONNECT_STATUS_CONNECTED
) {
if (
uni.$UIKitStore.connectStore.loginStatus ==
V2NIMConst.V2NIMLoginStatus.V2NIM_LOGIN_STATUS_LOGINED
) {
getHistory(Date.now()).then(() => { getHistory(Date.now()).then(() => {
if (!isMounted) { if (!isMounted) {
console.log("已登录已登录已登录已登录已登录已登录已登录已登录已登录") console.log("已登录已登录已登录已登录已登录已登录已登录已登录已登录");
// uni.$emit(events.ON_SCROLL_BOTTOM) // uni.$emit(events.ON_SCROLL_BOTTOM)
isMounted = true isMounted = true;
} }
}) });
} }
} }
}) });
// //
const msgsWatch = autorun(() => { const msgsWatch = autorun(() => {
// Clone pinState // Clone pinState
const messages = [...uni.$UIKitStore.msgStore.getMsg(conversationId)] const messages = [...uni.$UIKitStore.msgStore.getMsg(conversationId)];
if (messages.length !== 0) { if (messages.length !== 0) {
msgs.value = messages msgs.value = messages;
} }
// map // map
if (messages.length !== 0) { if (messages.length !== 0) {
const _replyMsgsMap: any = {} const _replyMsgsMap: any = {};
const reqMsgs: YxReplyMsg[] = [] const reqMsgs: YxReplyMsg[] = [];
const messageClientIds: Record<string, string> = {} const messageClientIds: Record<string, string> = {};
msgs.value.forEach((msg) => { msgs.value.forEach((msg) => {
if (msg.serverExtension) { if (msg.serverExtension) {
try { try {
// yxReplyMsg // yxReplyMsg
const { yxReplyMsg } = JSON.parse(msg.serverExtension) const { yxReplyMsg } = JSON.parse(msg.serverExtension);
if (yxReplyMsg) { if (yxReplyMsg) {
// replyMsg // replyMsg
const replyMsg = msgs.value.find( const replyMsg = msgs.value.find((item) => item.messageClientId === yxReplyMsg.idClient);
(item) => item.messageClientId === yxReplyMsg.idClient
)
// map // map
if (replyMsg) { if (replyMsg) {
_replyMsgsMap[msg.messageClientId] = replyMsg _replyMsgsMap[msg.messageClientId] = replyMsg;
// 1. 2. 3. // 1. 2. 3.
} else { } else {
_replyMsgsMap[msg.messageClientId] = { messageClientId: 'noFind' } _replyMsgsMap[msg.messageClientId] = { messageClientId: "noFind" };
const { const { scene, from, to, idServer, messageClientId, time, receiverId } = yxReplyMsg;
scene,
from, if (scene && from && to && idServer && messageClientId && time && receiverId) {
to,
idServer,
messageClientId,
time,
receiverId,
} = yxReplyMsg
if (
scene &&
from &&
to &&
idServer &&
messageClientId &&
time &&
receiverId
) {
reqMsgs.push({ reqMsgs.push({
scene, scene,
from, from,
@ -365,14 +317,14 @@ const msgsWatch = autorun(() => {
messageClientId, messageClientId,
time, time,
receiverId, receiverId,
}) });
messageClientIds[idServer] = msg.messageClientId messageClientIds[idServer] = msg.messageClientId;
} }
} }
} }
} catch {} } catch {}
} }
}) });
if (reqMsgs.length > 0) { if (reqMsgs.length > 0) {
// , // ,
@ -391,17 +343,17 @@ const msgsWatch = autorun(() => {
if (res?.length > 0) { if (res?.length > 0) {
res.forEach((item: V2NIMMessage) => { res.forEach((item: V2NIMMessage) => {
if (item.messageServerId) { if (item.messageServerId) {
_replyMsgsMap[messageClientIds[item.messageServerId]] = item _replyMsgsMap[messageClientIds[item.messageServerId]] = item;
} }
}) });
} }
replyMsgsMap.value = { ..._replyMsgsMap } replyMsgsMap.value = { ..._replyMsgsMap };
}) })
.catch(() => { .catch(() => {
replyMsgsMap.value = { ..._replyMsgsMap } replyMsgsMap.value = { ..._replyMsgsMap };
}) });
} else { } else {
replyMsgsMap.value = { ..._replyMsgsMap } replyMsgsMap.value = { ..._replyMsgsMap };
} }
} }
@ -409,103 +361,209 @@ const msgsWatch = autorun(() => {
// if (messages.length < 6) { // if (messages.length < 6) {
// uni.hideKeyboard() // uni.hideKeyboard()
// } // }
}) });
// //
const setNavTitle = () => { const setNavTitle = () => {
if ( if (conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P) {
conversationType === title.value = uni.$UIKitStore.uiStore.getAppellation({ account: to });
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P } else if (conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM) {
) { const team = uni.$UIKitStore.teamStore.teams.get(to);
title.value = uni.$UIKitStore.uiStore.getAppellation({ account: to }) const subTitle = `(${team?.memberCount || 0})`;
} else if ( title.value = (team?.name || "") + subTitle;
conversationType ===
V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM
) {
const team = uni.$UIKitStore.teamStore.teams.get(to)
const subTitle = `(${team?.memberCount || 0})`
title.value = (team?.name || '') + subTitle
} }
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: title.value, title: title.value,
}); });
} };
onShow(function () { onShow(function () {
setNavTitle() setNavTitle();
scrollToBottom() scrollToBottom();
// 使 uni.navigateBackonload // 使 uni.navigateBackonload
if (msgs.value.length) { if (msgs.value.length) {
const _msgs = [...msgs.value].reverse() const _msgs = [...msgs.value].reverse();
handleHistoryMsgReceipt(_msgs) handleHistoryMsgReceipt(_msgs);
} }
});
})
const scrollToBottom = () => { const scrollToBottom = () => {
const timer = setTimeout(() => { const timer = setTimeout(() => {
uni.$emit(events.ON_SCROLL_BOTTOM) uni.$emit(events.ON_SCROLL_BOTTOM);
clearTimeout(timer) clearTimeout(timer);
}, 300) }, 300);
} };
onLoad(() => { onLoad(() => {
uni.$on(events.HANDLE_MOVE_THROUGH, (flag) => { uni.$on(events.HANDLE_MOVE_THROUGH, (flag) => {
moveThrough.value = flag moveThrough.value = flag;
}) });
}) });
const msgHeight = ref(0); const msgHeight = ref(0);
onMounted(() => { onMounted(() => {
setNavTitle() setNavTitle();
getList();
uni.$on("msgHeight", (res) => {
uni.$on('msgHeight', (res) => { console.log(res);
console.log(res) msgHeight.value = res;
msgHeight.value = res });
})
// scrollToBottom() // scrollToBottom()
uni.$UIKitNIM.V2NIMMessageService.on( uni.$UIKitNIM.V2NIMMessageService.on("onReceiveMessages", handleReceiveMessages);
'onReceiveMessages',
handleReceiveMessages
)
uni.$UIKitNIM.V2NIMTeamService.on('onTeamDismissed', handleDismissTeam) uni.$UIKitNIM.V2NIMTeamService.on("onTeamDismissed", handleDismissTeam);
uni.$UIKitNIM.V2NIMTeamService.on('onTeamLeft', handleRemoveTeamMembers) uni.$UIKitNIM.V2NIMTeamService.on("onTeamLeft", handleRemoveTeamMembers);
uni.$on(events.GET_HISTORY_MSG, loadMoreMsgs) uni.$on(events.GET_HISTORY_MSG, loadMoreMsgs);
}) });
onUnmounted(() => { onUnmounted(() => {
uni.$UIKitNIM.V2NIMTeamService.off('onTeamDismissed', handleDismissTeam) uni.$UIKitNIM.V2NIMTeamService.off("onTeamDismissed", handleDismissTeam);
uni.$UIKitNIM.V2NIMTeamService.off( uni.$UIKitNIM.V2NIMTeamService.off("onTeamMemberLeft", handleRemoveTeamMembers);
'onTeamMemberLeft',
handleRemoveTeamMembers
)
uni.$UIKitNIM.V2NIMMessageService.off( uni.$UIKitNIM.V2NIMMessageService.off("onReceiveMessages", handleReceiveMessages);
'onReceiveMessages',
handleReceiveMessages
)
uni.$off(events.GET_HISTORY_MSG, loadMoreMsgs) uni.$off(events.GET_HISTORY_MSG, loadMoreMsgs);
// store // store
connectedWatch() connectedWatch();
msgsWatch() msgsWatch();
conversationTypeWatch() conversationTypeWatch();
}) });
const query = ref({
page: 1,
size: 50,
list: [],
isFinish: -1,
});
const loading = ref(false);
const speed = ref(-1);
const keyword = ref("");
const checkLength = (e) => {
console.log("e", e);
console.log("keyword", keyword.value);
if (e.length == 0) {
keyword.value = "";
searchJob();
}
};
const searchJob = () => {
query.value.list = [];
query.value.page = 1;
getList();
};
const getList = ($type = "init") => {
loading.value = true;
G.Post(
api.job_list,
{
pageNum: query.value.page,
pageSize: query.value.size,
agencyId: uni.getStorageSync("apply-agencyId"),
classify: 99,
sortTag: 2,
keys: keyword.value,
cityName: "全国",
},
(res) => {
console.log("res", res);
loading.value = false;
speed.value = res.recordCount;
query.value.isFinish = res.recordList.length;
console.log("query.value", query.value);
res.recordList = G.toGetAddressv3(res.recordList);
res.recordList = G.toGetAge(res.recordList);
res.recordList = G.yijobCopy(res.recordList);
if ($type == "init") {
query.value.list = [];
if (res.recordList.length > 0) {
query.value.list = res.recordList.map((item, index) => {
// console.log(item)
return {
...item,
title: item.jobName,
address: item.district + item.age,
priceStr: item.salaryClassify != 7 ? G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
logo: item.agencyLogo,
time: G.setDeadLine(item.updateTime, "jiaofu"),
fuWuFei: G.setReturnFee(item.returnFee, item.returnFeeType),
gender: G.getGenderByMinAge(item),
leafCateId: item.id,
// serverPrice: tabInfo.value.list[tabInfo.value.active].tip == 2 ? G.setReturnFee(item.returnFee, item.returnFeeType) : G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
serverPrice: G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
isToday: item.today == 0 ? false : true,
};
});
}
} else {
query.value.list = query.value.list.concat(
res.recordList.map((item, index) => {
return {
...item,
title: item.jobName,
priceStr: item.salaryClassify != 7 ? G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
fuWuFei: G.setReturnFee(item.returnFee, item.returnFeeType),
gender: G.getGenderByMinAge(item),
logo: item.agencyLogo,
time: G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id,
serverPrice: G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
isToday: item.today == 0 ? false : true,
};
})
);
}
console.log('query.value.list',query.value.list)
}
);
};
const sendJob = (_item) => {
console.log("_item", _item);
let listInner = ["district", "gender", "age"];
let newList = [];
listInner.forEach((item) => {
if (_item[item]) {
newList.push(_item[item]);
}
});
_item.info = newList.join("丨");
const customMsg = uni.$UIKitNIM.V2NIMMessageCreator.createCustomMessage(
"",
JSON.stringify({
type: 100000,
title: _item.jobName,
info: _item.info,
label: _item.jobSpecialLabelNameArray.length > 0 ? _item.jobSpecialLabelNameArray : [],
salaryClassifyValue: _item.priceStr,
serviceFee: _item.fuWuFei ? _item.fuWuFei : "",
monthPay: _item.monthlyPay,
jobId: _item.id,
})
);
console.log("customMsg", customMsg);
uni.$UIKitStore.msgStore.sendMessageActive({
msg: customMsg,
conversationId,
sendBefore: () => {
// scrollBottom();
},
});
};
onUnload(() => { onUnload(() => {
uni.$off(events.CONFIRM_FORWARD_MSG) uni.$off(events.CONFIRM_FORWARD_MSG);
uni.$off(events.CANCEL_FORWARD_MSG) uni.$off(events.CANCEL_FORWARD_MSG);
}) });
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../../base.scss";
page { page {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;

@ -14,18 +14,14 @@
<div class="reply-line"></div> <div class="reply-line"></div>
<div class="reply-title">{{ t("replyText") }}</div> <div class="reply-title">{{ t("replyText") }}</div>
<div class="reply-to"> <div class="reply-to">
<Appellation :account="replyMsg && replyMsg.senderId" <Appellation :account="replyMsg && replyMsg.senderId" :team-id="props.conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM ? to : ''" color="#929299" :fontSize="13"> </Appellation>
:team-id="props.conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM ? to : ''"
color="#929299" :fontSize="13"> </Appellation>
</div> </div>
<div class="reply-to-colon">:</div> <div class="reply-to-colon">:</div>
<div v-if="replyMsg && replyMsg.messageClientId === 'noFind'" class="reply-noFind"> <div v-if="replyMsg && replyMsg.messageClientId === 'noFind'" class="reply-noFind">
{{ t("replyNotFindText") }} {{ t("replyNotFindText") }}
</div> </div>
<div class="reply-message" v-else> <div class="reply-message" v-else>
<message-one-line <message-one-line v-if="replyMsg && replyMsg.messageType === V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_TEXT" :text="replyMsg && replyMsg.text"></message-one-line>
v-if="replyMsg && replyMsg.messageType === V2NIMConst.V2NIMMessageType.V2NIM_MESSAGE_TYPE_TEXT"
:text="replyMsg && replyMsg.text"></message-one-line>
<div v-else> <div v-else>
{{ "[" + REPLY_MSG_TYPE_MAP[replyMsg && replyMsg.messageType] + "]" }} {{ "[" + REPLY_MSG_TYPE_MAP[replyMsg && replyMsg.messageType] + "]" }}
</div> </div>
@ -53,8 +49,7 @@
</div> </div>
</div> --> </div> -->
<div class="g_flex_c"> <div class="g_flex_c">
<div @tap="handleAudioVisible" v-if="!isWeb && false" class="msg-input-button g_p_5" <div @tap="handleAudioVisible" v-if="!isWeb && false" class="msg-input-button g_p_5" style="padding-right: 7px; padding-left: 10px">
style="padding-right: 7px; padding-left: 10px">
<Icon v-if="audioPanelVisible" :size="28" type="audio-btn-selected" key="audio-btn-selected" /> <Icon v-if="audioPanelVisible" :size="28" type="audio-btn-selected" key="audio-btn-selected" />
<Icon v-else :size="28" type="icon-audio" key="icon-audio" /> <Icon v-else :size="28" type="icon-audio" key="icon-audio" />
</div> </div>
@ -69,22 +64,14 @@
</div> </div>
<!--键盘高度{{keyHeight}} 输入框距离底部距离{{writeStyle}}屏幕高度{{screenHeight}}顶部聊天区域高度{{msgKeyHeight}}--> <!--键盘高度{{keyHeight}} 输入框距离底部距离{{writeStyle}}屏幕高度{{screenHeight}}顶部聊天区域高度{{msgKeyHeight}}-->
<input v-show="!showEmojiInput" :focus="isFocus" class="msg-input-input g_flex_1" <input v-show="!showEmojiInput" :focus="isFocus" class="msg-input-input g_flex_1" :maxlength="-1" :placeholder="isTeamMute ? t('teamMutePlaceholder') : t('chatInputPlaceHolder')" v-model="inputText" type="text" :disabled="isTeamMute" :confirm-hold="true" cursor-spacing="20" :adjust-position="pushUp" confirm-type="send" @keyboardheightchange="keyboardheightchange" @confirm="handleSendTextMsg" @blur="handleInputBlur" @input="handleInput" id="msg-input" />
:maxlength="-1"
:placeholder="isTeamMute ? t('teamMutePlaceholder') : t('chatInputPlaceHolder')"
v-model="inputText" type="text" :disabled="isTeamMute" :confirm-hold="true"
cursor-spacing="20" :adjust-position="pushUp" confirm-type="send"
@keyboardheightchange="keyboardheightchange" @confirm="handleSendTextMsg"
@blur="handleInputBlur" @input="handleInput" id="msg-input" />
</div> </div>
<div class="msg-input-button" v-if="false"> <div class="msg-input-button" v-if="false">
<Icon @tap="handleEmojiVisible" class="g_p_6" style="padding-right: 5px" :size="28" <Icon @tap="handleEmojiVisible" class="g_p_6" style="padding-right: 5px" :size="28" type="icon-biaoqing" />
type="icon-biaoqing" />
</div> </div>
<div class="msg-input-button"> <div class="msg-input-button">
<Icon @tap="handleSendMoreVisible" class="g_p_6" style="padding-left: 5px; padding-right: 8px" <Icon @tap="handleSendMoreVisible" class="g_p_6" style="padding-left: 5px; padding-right: 8px" type="send-more" :size="28" />
type="send-more" :size="28" />
</div> </div>
</div> </div>
<!-- 表情面板 --> <!-- 表情面板 -->
@ -117,15 +104,13 @@
</div> </div>
<div class="icon-text">{{ t("albumText") }}</div> <div class="icon-text">{{ t("albumText") }}</div>
</div> </div>
<div class="send-more-panel-item-wrapper" <div class="send-more-panel-item-wrapper" v-if="isApp && props.conversationType !== V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM">
v-if="isApp && props.conversationType !== V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM">
<div class="send-more-panel-item" @tap="handleCall(1)"> <div class="send-more-panel-item" @tap="handleCall(1)">
<Icon type="icon-audio-call" :size="30"></Icon> <Icon type="icon-audio-call" :size="30"></Icon>
</div> </div>
<div class="icon-text">{{ t("voiceCallText") }}</div> <div class="icon-text">{{ t("voiceCallText") }}</div>
</div> </div>
<div class="send-more-panel-item-wrapper" <div class="send-more-panel-item-wrapper" v-if="isApp && props.conversationType !== V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM">
v-if="isApp && props.conversationType !== V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM">
<div class="send-more-panel-item" @tap="() => handleCall(2)"> <div class="send-more-panel-item" @tap="() => handleCall(2)">
<Icon type="icon-video-call" :size="30"></Icon> <Icon type="icon-video-call" :size="30"></Icon>
</div> </div>
@ -143,7 +128,12 @@
</div> </div>
<div class="icon-text">{{ t("customText") }}</div> <div class="icon-text">{{ t("customText") }}</div>
</div> </div>
<div class="send-more-panel-item-wrapper" v-if="corpUserFlag">
<div class="send-more-panel-item" @tap="(event) => handleSendJob()">
<Icon type="icon-touxiang5" :size="30"></Icon>
</div>
<div class="icon-text">{{ "发送职位" }}</div>
</div>
<div class="send-more-panel-item-wrapper"> <div class="send-more-panel-item-wrapper">
<div class="send-more-panel-item" @tap="(event) => handleSetting()"> <div class="send-more-panel-item" @tap="(event) => handleSetting()">
<Icon type="icon-shezhi" :size="30"></Icon> <Icon type="icon-shezhi" :size="30"></Icon>
@ -157,8 +147,7 @@
</div> </div>
</div> </div>
<!-- @消息相关 popup --> <!-- @消息相关 popup -->
<UniPopup ref="popupRef" background-color="#ffffff" type="bottom" mask-background-color="rgba(0,0,0,0.4)" <UniPopup ref="popupRef" background-color="#ffffff" type="bottom" mask-background-color="rgba(0,0,0,0.4)" @change="onPopupChange">
@change="onPopupChange">
<MentionMemberList :team-id="to"></MentionMemberList> <MentionMemberList :team-id="to"></MentionMemberList>
</UniPopup> </UniPopup>
</div> </div>
@ -166,64 +155,65 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import Face from "./face.vue"; import Face from "./face.vue";
import VoicePanel from "./voice-panel.vue"; import VoicePanel from "./voice-panel.vue";
import Icon from "../../../components/Icon.vue"; import Icon from "../../../components/Icon.vue";
import { ref, getCurrentInstance, computed, onUnmounted, onMounted, defineProps, withDefaults } from "../../../utils/transformVue"; import { ref, getCurrentInstance, computed, onUnmounted, onMounted, defineProps, withDefaults, defineEmits } from "../../../utils/transformVue";
import { ALLOW_AT, events, REPLY_MSG_TYPE_MAP } from "../../../utils/constants"; import { ALLOW_AT, events, REPLY_MSG_TYPE_MAP } from "../../../utils/constants";
import { emojiMap } from "../../../utils/emoji"; import { emojiMap } from "../../../utils/emoji";
import { t } from "../../../utils/i18n"; import { t } from "../../../utils/i18n";
import { handleNoPermission } from "../../../utils/permission"; import { handleNoPermission } from "../../../utils/permission";
import { customNavigateTo } from "../../../utils/customNavigate"; import { customNavigateTo } from "../../../utils/customNavigate";
import MessageOneLine from "../../../components/MessageOneLine.vue"; import MessageOneLine from "../../../components/MessageOneLine.vue";
import { isAndroidApp, stopAllAudio, isIosWeb, isWeb, isWxApp, startCall, isApp, isIosApp } from "../../../utils"; import { isAndroidApp, stopAllAudio, isIosWeb, isWeb, isWxApp, startCall, isApp, isIosApp } from "../../../utils";
// @ts-ignore // @ts-ignore
import UniPopup from "../../../components/uni-components/uni-popup/components/uni-popup/uni-popup.vue"; import UniPopup from "../../../components/uni-components/uni-popup/components/uni-popup/uni-popup.vue";
// @ts-ignore // @ts-ignore
import MentionMemberList from "./mention-member-list.vue"; import MentionMemberList from "./mention-member-list.vue";
import { autorun } from "mobx"; import { autorun } from "mobx";
import Appellation from "../../../components/Appellation.vue"; import Appellation from "../../../components/Appellation.vue";
import { AT_ALL_ACCOUNT } from "../../../utils/constants"; import { AT_ALL_ACCOUNT } from "../../../utils/constants";
import { deepClone } from "../../../utils"; import { deepClone } from "../../../utils";
import { V2NIMTeam, V2NIMTeamChatBannedMode, V2NIMTeamMember } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMTeamService"; import { V2NIMTeam, V2NIMTeamChatBannedMode, V2NIMTeamMember } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMTeamService";
import { V2NIMMessageForUI, YxServerExt, YxAitMsg } from "@xkit-yx/im-store-v2/dist/types/types"; import { V2NIMMessageForUI, YxServerExt, YxAitMsg } from "@xkit-yx/im-store-v2/dist/types/types";
import { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK"; import { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK";
export type MentionedMember = { accountId : string; appellation : string }; export type MentionedMember = { accountId: string; appellation: string };
const corpUserFlag = ref(uni.getStorageSync("apply-userinfo").corpUserFlag); const corpUserFlag = ref(uni.getStorageSync("apply-userinfo").corpUserFlag);
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
conversationType : V2NIMConst.V2NIMConversationType; conversationType: V2NIMConst.V2NIMConversationType;
to : string; to: string;
replyMsgsMap ?: { replyMsgsMap?: {
[key : string] : V2NIMMessageForUI; [key: string]: V2NIMMessageForUI;
}; };
jobListShow: Boolean;
}>(), }>(),
{} {}
); );
const emits = defineEmits(["jobListShow"]);
const conversationId = props.conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P ? uni.$UIKitNIM.V2NIMConversationIdUtil.p2pConversationId(props.to) : uni.$UIKitNIM.V2NIMConversationIdUtil.teamConversationId(props.to); const conversationId = props.conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P ? uni.$UIKitNIM.V2NIMConversationIdUtil.p2pConversationId(props.to) : uni.$UIKitNIM.V2NIMConversationIdUtil.teamConversationId(props.to);
const inputText = ref(""); const inputText = ref("");
const extVisible = ref(false); const extVisible = ref(false);
// flag // flag
const audioPanelVisible = ref(false); const audioPanelVisible = ref(false);
// flag // flag
const sendMoreVisible = ref(false); const sendMoreVisible = ref(false);
// flag // flag
const emojiVisible = ref(false); const emojiVisible = ref(false);
// inputflag // inputflag
const inputVisible = computed(() => { const inputVisible = computed(() => {
if (audioPanelVisible.value || sendMoreVisible.value) { if (audioPanelVisible.value || sendMoreVisible.value) {
return false; return false;
} else { } else {
return true; return true;
} }
}); });
// type: 1 2 // type: 1 2
const handleCall = (type : number) => { const handleCall = (type: number) => {
const myAccount = uni.$UIKitStore.userStore.myUserInfo.accountId; const myAccount = uni.$UIKitStore.userStore.myUserInfo.accountId;
const remoteShowName = uni.$UIKitStore.uiStore.getAppellation({ const remoteShowName = uni.$UIKitStore.uiStore.getAppellation({
@ -242,30 +232,30 @@
icon: "none", icon: "none",
}); });
} }
}; };
// //
const showEmojiInput = ref(false); const showEmojiInput = ref(false);
// //
const isReplyMsg = ref(false); const isReplyMsg = ref(false);
const isFocus = ref(false); const isFocus = ref(false);
const replyMsg = ref<V2NIMMessageForUI>(); const replyMsg = ref<V2NIMMessageForUI>();
// @ // @
const ctx = getCurrentInstance(); const ctx = getCurrentInstance();
const popupRef = ref(null); const popupRef = ref(null);
const selectedAtMembers = ref<MentionedMember[]>([]); const selectedAtMembers = ref<MentionedMember[]>([]);
// //
const team = ref<V2NIMTeam>(); const team = ref<V2NIMTeam>();
const teamMembers = ref<V2NIMTeamMember[]>([]); const teamMembers = ref<V2NIMTeamMember[]>([]);
const teamMute = ref<V2NIMTeamChatBannedMode>(V2NIMConst.V2NIMTeamChatBannedMode.V2NIM_TEAM_CHAT_BANNED_MODE_UNBAN); const teamMute = ref<V2NIMTeamChatBannedMode>(V2NIMConst.V2NIMTeamChatBannedMode.V2NIM_TEAM_CHAT_BANNED_MODE_UNBAN);
const isGroupOwner = ref(false); const isGroupOwner = ref(false);
const isGroupManager = ref(false); const isGroupManager = ref(false);
// @ // @
const allowAtAll = computed(() => { const allowAtAll = computed(() => {
let ext : YxServerExt = {}; let ext: YxServerExt = {};
try { try {
ext = JSON.parse((team.value || {}).serverExtension || "{}"); ext = JSON.parse((team.value || {}).serverExtension || "{}");
} catch (error) { } catch (error) {
@ -275,29 +265,29 @@
return isGroupOwner.value || isGroupManager.value; return isGroupOwner.value || isGroupManager.value;
} }
return true; return true;
}); });
// //
// const isTeamMute = computed(() => { // const isTeamMute = computed(() => {
// // console.log( // // console.log(
// 'isGroupOwner, isGroupManager', // 'isGroupOwner, isGroupManager',
// isGroupOwner.value, // isGroupOwner.value,
// isGroupManager.value // isGroupManager.value
// ) // )
// if (!teamMute.value) { // if (!teamMute.value) {
// return false // return false
// } // }
// // // //
// if (isGroupOwner.value || isGroupManager.value) { // if (isGroupOwner.value || isGroupManager.value) {
// return false // return false
// } // }
// return true // return true
// }) // })
const isTeamMute = ref(true); const isTeamMute = ref(true);
const updateTeamMute = () => { const updateTeamMute = () => {
if (teamMute.value === V2NIMConst.V2NIMTeamChatBannedMode.V2NIM_TEAM_CHAT_BANNED_MODE_UNBAN) { if (teamMute.value === V2NIMConst.V2NIMTeamChatBannedMode.V2NIM_TEAM_CHAT_BANNED_MODE_UNBAN) {
isTeamMute.value = false; isTeamMute.value = false;
return; return;
@ -309,14 +299,14 @@
} }
isTeamMute.value = true; isTeamMute.value = true;
return; return;
}; };
const onPopupChange = (e : any) => { const onPopupChange = (e: any) => {
uni.$emit(events.HANDLE_MOVE_THROUGH, e.value); uni.$emit(events.HANDLE_MOVE_THROUGH, e.value);
}; };
// @ // @
const handleMentionItemClick = (member : MentionedMember) => { const handleMentionItemClick = (member: MentionedMember) => {
//@ts-ignore //@ts-ignore
ctx.refs.popupRef.close(); ctx.refs.popupRef.close();
uni.$emit(events.HANDLE_MOVE_THROUGH, false); uni.$emit(events.HANDLE_MOVE_THROUGH, false);
@ -325,15 +315,15 @@
const newInputText = inputText.value + nickInTeam + " "; const newInputText = inputText.value + nickInTeam + " ";
// input // input
inputText.value = newInputText; inputText.value = newInputText;
}; };
const closePopup = () => { const closePopup = () => {
//@ts-ignore //@ts-ignore
ctx.refs.popupRef.close(); ctx.refs.popupRef.close();
}; };
// //
const onClickEmojiInput = () => { const onClickEmojiInput = () => {
showEmojiInput.value = false; showEmojiInput.value = false;
extVisible.value = false; extVisible.value = false;
@ -354,34 +344,28 @@
isFocus.value = true; isFocus.value = true;
}, 500); }, 500);
} }
}; };
const writeStyle = ref("");
const isIOS = ref(false);
writeStyle.value = "bottom:0";
// #ifdef MP-WEIXIN
const pushUp = ref(false)
// #endif
// #ifdef APP-PLUS
const pushUp = ref(true)
// #endif
const writeStyle = ref("");
const isIOS = ref(false);
writeStyle.value = "bottom:0";
// #ifdef MP-WEIXIN
const pushUp = ref(false);
// #endif
// #ifdef APP-PLUS
const pushUp = ref(true);
// #endif
const keyHeight = ref(350);
const msgKeyHeight = ref("100%");
const keyHeight = ref(350); const keyboardheightchange = (e) => {
const msgKeyHeight = ref('100%')
const keyboardheightchange = (e) => {
// console.log("", e.detail.height); // console.log("", e.detail.height);
keyHeight.value = e.detail.height; keyHeight.value = e.detail.height;
uni.$emit(events.KeyboardEvent, e.detail.height); uni.$emit(events.KeyboardEvent, e.detail.height);
uni.$emit('KeyboardHeight', e.detail.height); uni.$emit("KeyboardHeight", e.detail.height);
if (e.detail.height === 0) { if (e.detail.height === 0) {
writeStyle.value = "bottom: 0"; writeStyle.value = "bottom: 0";
@ -390,17 +374,15 @@
} else { } else {
uni.$emit(events.KeyboardEvent, 0); uni.$emit(events.KeyboardEvent, 0);
} }
uni.$emit('msgKeyHeight', '100%'); uni.$emit("msgKeyHeight", "100%");
} else { } else {
emojiVisible.value = false; emojiVisible.value = false;
extVisible.value = false; extVisible.value = false;
audioPanelVisible.value = false; audioPanelVisible.value = false;
sendMoreVisible.value = false; sendMoreVisible.value = false;
msgKeyHeight.value = screenHeight.value - keyHeight.value msgKeyHeight.value = screenHeight.value - keyHeight.value;
uni.$emit('msgKeyHeight', msgKeyHeight.value); uni.$emit("msgKeyHeight", msgKeyHeight.value);
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`; writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
@ -415,19 +397,15 @@
// #endif // #endif
} }
// } // }
};
const handleInputBlur = () => {
};
const handleInputBlur = () => {
isFocus.value = false; isFocus.value = false;
uni.$emit('msgKeyHeight', '100%'); uni.$emit("msgKeyHeight", "100%");
}; };
// //
const scrollBottom = () => { const scrollBottom = () => {
if (isAndroidApp || isWxApp || isIosApp) { if (isAndroidApp || isWxApp || isIosApp) {
setTimeout(() => { setTimeout(() => {
uni.$emit(events.ON_SCROLL_BOTTOM); uni.$emit(events.ON_SCROLL_BOTTOM);
@ -435,10 +413,10 @@
} else { } else {
uni.$emit(events.ON_SCROLL_BOTTOM); uni.$emit(events.ON_SCROLL_BOTTOM);
} }
}; };
// //
const handleInput = (event : any) => { const handleInput = (event: any) => {
const text = event?.detail?.value; const text = event?.detail?.value;
const isAit = text.endsWith("@") || text.endsWith("@\n"); const isAit = text.endsWith("@") || text.endsWith("@\n");
if (props.conversationType == V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM) { if (props.conversationType == V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM) {
@ -451,10 +429,10 @@
uni.$emit(events.HANDLE_MOVE_THROUGH, true); uni.$emit(events.HANDLE_MOVE_THROUGH, true);
} }
} }
}; };
// //
const handleSendTextMsg = () => { const handleSendTextMsg = () => {
if (inputText.value.trim() === "") return; if (inputText.value.trim() === "") return;
const ext = onAtMembersExtHandler(); const ext = onAtMembersExtHandler();
@ -482,10 +460,10 @@
isReplyMsg.value = false; isReplyMsg.value = false;
selectedAtMembers.value = []; selectedAtMembers.value = [];
uni.$emit(events.KeyboardEvent, 0); //listpaddingBottom 0 uni.$emit(events.KeyboardEvent, 0); //listpaddingBottom 0
}; };
// //
const handleSendFileMsg = () => { const handleSendFileMsg = () => {
uni.chooseFile({ uni.chooseFile({
count: 1, count: 1,
type: "all", type: "all",
@ -512,9 +490,12 @@
}); });
}, },
}); });
}; };
const handleSendJob = () => {
const handleSendCustomMsg = () => { console.log("props.jobListShow", props.jobListShow);
emits("jobListShow", true);
};
const handleSendCustomMsg = () => {
const customMsg = uni.$UIKitNIM.V2NIMMessageCreator.createCustomMessage( const customMsg = uni.$UIKitNIM.V2NIMMessageCreator.createCustomMessage(
"这是PGQ的自定义消息", "这是PGQ的自定义消息",
JSON.stringify({ JSON.stringify({
@ -530,17 +511,16 @@
scrollBottom(); scrollBottom();
}, },
}); });
}; };
// //
const removeReplyMsg = () => { const removeReplyMsg = () => {
uni.$UIKitStore.msgStore.removeReplyMsgActive(replyMsg?.value?.conversationId as string); uni.$UIKitStore.msgStore.removeReplyMsgActive(replyMsg?.value?.conversationId as string);
isReplyMsg.value = false; isReplyMsg.value = false;
}; };
//
const handleEmojiVisible = () => {
//
const handleEmojiVisible = () => {
showEmojiInput.value = true; showEmojiInput.value = true;
extVisible.value = true; extVisible.value = true;
@ -557,10 +537,10 @@
} }
uni.$emit(events.ON_SCROLL_BOTTOM); uni.$emit(events.ON_SCROLL_BOTTOM);
}, 100); }, 100);
}; };
// "+" // "+"
const handleSendMoreVisible = () => { const handleSendMoreVisible = () => {
if (isTeamMute.value) return; if (isTeamMute.value) return;
audioPanelVisible.value = false; audioPanelVisible.value = false;
emojiVisible.value = false; emojiVisible.value = false;
@ -573,12 +553,10 @@
} }
uni.$emit(events.ON_SCROLL_BOTTOM); uni.$emit(events.ON_SCROLL_BOTTOM);
// }, 300) // }, 300)
}; };
//
const handleEmojiDelete = () => {
//
const handleEmojiDelete = () => {
let target = ""; let target = "";
const isEmojiEnd = Object.keys(emojiMap).reduce((prev, cur) => { const isEmojiEnd = Object.keys(emojiMap).reduce((prev, cur) => {
const isEnd = inputText.value.endsWith(cur); const isEnd = inputText.value.endsWith(cur);
@ -592,10 +570,10 @@
} else { } else {
inputText.value = inputText.value.slice(0, -1); inputText.value = inputText.value.slice(0, -1);
} }
}; };
// //
const handleAudioVisible = () => { const handleAudioVisible = () => {
if (isTeamMute.value) return; if (isTeamMute.value) return;
audioPanelVisible.value = !audioPanelVisible.value; audioPanelVisible.value = !audioPanelVisible.value;
emojiVisible.value = false; emojiVisible.value = false;
@ -606,10 +584,10 @@
} }
uni.$emit(events.ON_SCROLL_BOTTOM); uni.$emit(events.ON_SCROLL_BOTTOM);
}; };
// //
const handleSendImageMsg = () => { const handleSendImageMsg = () => {
if (isTeamMute.value) return; if (isTeamMute.value) return;
stopAllAudio(); stopAllAudio();
uni.chooseImage({ uni.chooseImage({
@ -641,10 +619,10 @@
// //
complete: handleNoPermission, complete: handleNoPermission,
}); });
}; };
// 使 // 使
const handleSendVideoMsg = (type : string, event : any) => { const handleSendVideoMsg = (type: string, event: any) => {
if (isTeamMute.value) return; if (isTeamMute.value) return;
stopAllAudio(); stopAllAudio();
// input+uniapp // input+uniapp
@ -682,10 +660,10 @@
// //
complete: handleNoPermission, complete: handleNoPermission,
}); });
}; };
// //
const handleSendAudioMsg = (filePath : string, duration : number) => { const handleSendAudioMsg = (filePath: string, duration: number) => {
const audioMsg = uni.$UIKitNIM.V2NIMMessageCreator.createAudioMessage(filePath); const audioMsg = uni.$UIKitNIM.V2NIMMessageCreator.createAudioMessage(filePath);
uni.$UIKitStore.msgStore uni.$UIKitStore.msgStore
@ -715,10 +693,10 @@
}); });
scrollBottom(); scrollBottom();
}); });
}; };
// //
const handleSetting = () => { const handleSetting = () => {
if (props.conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P) { if (props.conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P) {
customNavigateTo({ customNavigateTo({
url: `/pages/Chat/message/p2p-set?id=${props.to}`, url: `/pages/Chat/message/p2p-set?id=${props.to}`,
@ -728,17 +706,17 @@
url: `/pages/Group/group-set/index?id=${props.to}`, url: `/pages/Group/group-set/index?id=${props.to}`,
}); });
} }
}; };
let uninstallTeamWatch = () => { }; let uninstallTeamWatch = () => {};
const msgHeight = ref(0); const msgHeight = ref(0);
const screenHeight = ref(0); const screenHeight = ref(0);
screenHeight.value = uni.getSystemInfoSync().windowHeight; screenHeight.value = uni.getSystemInfoSync().windowHeight;
onMounted(() => { onMounted(() => {
uninstallTeamWatch = autorun(() => { uninstallTeamWatch = autorun(() => {
if (props.conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM) { if (props.conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_TEAM) {
const _team : V2NIMTeam = deepClone(uni.$UIKitStore.teamStore.teams.get(props.to)); const _team: V2NIMTeam = deepClone(uni.$UIKitStore.teamStore.teams.get(props.to));
teamMembers.value = deepClone(uni.$UIKitStore.teamMemberStore.getTeamMember(props.to)); teamMembers.value = deepClone(uni.$UIKitStore.teamMemberStore.getTeamMember(props.to));
const myUser = uni.$UIKitStore.userStore.myUserInfo; const myUser = uni.$UIKitStore.userStore.myUserInfo;
@ -753,7 +731,7 @@
}); });
// //
uni.$on(events.ON_REEDIT_MSG, (msg : V2NIMMessageForUI) => { uni.$on(events.ON_REEDIT_MSG, (msg: V2NIMMessageForUI) => {
const _replyMsg = props.replyMsgsMap?.[msg.messageClientId]; const _replyMsg = props.replyMsgsMap?.[msg.messageClientId];
// //
if (_replyMsg?.messageClientId) { if (_replyMsg?.messageClientId) {
@ -766,7 +744,7 @@
const extObj = JSON.parse(msg.serverExtension); const extObj = JSON.parse(msg.serverExtension);
const yxAitMsg = extObj.yxAitMsg; const yxAitMsg = extObj.yxAitMsg;
if (yxAitMsg) { if (yxAitMsg) {
const _mentionedMembers : MentionedMember[] = []; const _mentionedMembers: MentionedMember[] = [];
Object.keys(yxAitMsg).forEach((key) => { Object.keys(yxAitMsg).forEach((key) => {
if (key == AT_ALL_ACCOUNT) { if (key == AT_ALL_ACCOUNT) {
_mentionedMembers.push({ _mentionedMembers.push({
@ -791,13 +769,13 @@
isFocus.value = true; isFocus.value = true;
}); });
uni.$on(events.REPLY_MSG, (msg : V2NIMMessageForUI) => { uni.$on(events.REPLY_MSG, (msg: V2NIMMessageForUI) => {
isReplyMsg.value = true; isReplyMsg.value = true;
isFocus.value = true; isFocus.value = true;
replyMsg.value = msg; replyMsg.value = msg;
}); });
uni.$on(events.AIT_TEAM_MEMBER, (member : MentionedMember) => { uni.$on(events.AIT_TEAM_MEMBER, (member: MentionedMember) => {
selectedAtMembers.value = [...selectedAtMembers.value.filter((item) => item.accountId !== member.accountId), member]; selectedAtMembers.value = [...selectedAtMembers.value.filter((item) => item.accountId !== member.accountId), member];
const newInputText = inputText.value + "@" + member.appellation + " "; const newInputText = inputText.value + "@" + member.appellation + " ";
// input // input
@ -818,7 +796,7 @@
}); });
// @ @ // @ @
uni.$on(events.HANDLE_AIT_MEMBER, (member : MentionedMember) => { uni.$on(events.HANDLE_AIT_MEMBER, (member: MentionedMember) => {
handleMentionItemClick(member); handleMentionItemClick(member);
}); });
@ -863,42 +841,38 @@
}); });
} }
uni.$on("msgHeight", (res) => {
uni.$on('msgHeight', (res) => {
// console.log('inputinputinputinputinputinputinputinput') // console.log('inputinputinputinputinputinputinputinput')
// console.log(res) // console.log(res)
msgHeight.value = res msgHeight.value = res;
}) });
uni.$on('screenHeight', (res) => { uni.$on("screenHeight", (res) => {
// console.log(res) // console.log(res)
if (res) { if (res) {
screenHeight.value = res screenHeight.value = res;
} else { } else {
screenHeight.value = uni.getSystemInfoSync().windowHeight screenHeight.value = uni.getSystemInfoSync().windowHeight;
} }
})
isTeamMute.value = false
}); });
// //
// const handleEmoji = (emoji: { key: string; type: string }) => {
// inputText.value += emoji.key;
// };
// const handleEmoji = (emoji: Emoji) => { isTeamMute.value = false;
const handleEmoji = (emoji : { key : string; type : string; emoji : string; text : string }) => { });
// //
// const handleEmoji = (emoji: { key: string; type: string }) => {
// inputText.value += emoji.key;
// };
// const handleEmoji = (emoji: Emoji) => {
const handleEmoji = (emoji: { key: string; type: string; emoji: string; text: string }) => {
if (emoji.type === "emoji") { if (emoji.type === "emoji") {
inputText.value += emoji.emoji; inputText.value += emoji.emoji;
} else if (emoji.type === "text") { } else if (emoji.type === "text") {
inputText.value += emoji.text; inputText.value += emoji.text;
} }
}; };
const onAtMembersExtHandler = () => {
let ext: YxServerExt;
const onAtMembersExtHandler = () => {
let ext : YxServerExt;
if (selectedAtMembers.value.length) { if (selectedAtMembers.value.length) {
selectedAtMembers.value selectedAtMembers.value
.filter((member) => { .filter((member) => {
@ -909,7 +883,7 @@
}) })
.forEach((member) => { .forEach((member) => {
const substr = `@${member.appellation}`; const substr = `@${member.appellation}`;
const positions : number[] = []; const positions: number[] = [];
let pos = inputText.value?.indexOf(substr); let pos = inputText.value?.indexOf(substr);
while (pos !== -1) { while (pos !== -1) {
positions.push(pos); positions.push(pos);
@ -944,9 +918,9 @@
} }
// @ts-ignore // @ts-ignore
return ext; return ext;
}; };
onUnmounted(() => { onUnmounted(() => {
uni.$off(events.REPLY_MSG); uni.$off(events.REPLY_MSG);
uni.$off(events.ON_REEDIT_MSG); uni.$off(events.ON_REEDIT_MSG);
uni.$off(events.REPLY_MSG); uni.$off(events.REPLY_MSG);
@ -965,36 +939,34 @@
uni.$off(events.EMOJI_SEND); uni.$off(events.EMOJI_SEND);
removeReplyMsg(); removeReplyMsg();
uninstallTeamWatch(); uninstallTeamWatch();
}); });
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.input-root {
.input-root {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: auto; height: auto;
max-height: 300px; max-height: 300px;
} }
.input-root-h5 { .input-root-h5 {
height: auto; height: auto;
position: relative; position: relative;
order: 1; order: 1;
} }
.msg-input-wrapper { .msg-input-wrapper {
padding-bottom: calc(env(safe-area-inset-bottom) + 10px); padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #eff1f3; background-color: #eff1f3;
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
z-index: 999; z-index: 999;
} }
.msg-input { .msg-input {
overflow-x: hidden; overflow-x: hidden;
padding: 7px; padding: 7px;
background-color: #eff1f3; background-color: #eff1f3;
@ -1011,16 +983,16 @@
padding: 0 12px; padding: 0 12px;
} }
} }
} }
.msg-button-group { .msg-button-group {
padding: 12px 20px 2px 20px; padding: 12px 20px 2px 20px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.msg-input-button { .msg-input-button {
// flex: 1; // flex: 1;
// &:not(:last-child) { // &:not(:last-child) {
// margin-right: 60px; // margin-right: 60px;
@ -1038,33 +1010,33 @@
height: 100%; height: 100%;
} }
} }
} }
.msg-ext { .msg-ext {
overflow-y: auto; overflow-y: auto;
width: 100%; width: 100%;
height: 300px; height: 300px;
background-color: #eff1f3; background-color: #eff1f3;
z-index: 1; z-index: 1;
} }
.msg-emoji-panel { .msg-emoji-panel {
overflow-y: auto; overflow-y: auto;
width: 100%; width: 100%;
height: 246px; height: 246px;
background-color: #eff1f3; background-color: #eff1f3;
z-index: 1; z-index: 1;
} }
.msg-audio-panel { .msg-audio-panel {
overflow-y: hidden; overflow-y: hidden;
width: 100%; width: 100%;
height: 300px; height: 300px;
background-color: #eff1f3; background-color: #eff1f3;
z-index: 1; z-index: 1;
} }
.send-more-panel { .send-more-panel {
padding: 15px; padding: 15px;
overflow-y: hidden; overflow-y: hidden;
width: 100%; width: 100%;
@ -1073,9 +1045,9 @@
z-index: 1; z-index: 1;
flex-wrap: wrap; flex-wrap: wrap;
box-sizing: border-box; box-sizing: border-box;
} }
.send-more-panel-item-wrapper { .send-more-panel-item-wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -1100,9 +1072,9 @@
margin-top: 8px; margin-top: 8px;
text-align: center; text-align: center;
} }
} }
.reply-message-wrapper { .reply-message-wrapper {
display: flex; display: flex;
font-size: 13px; font-size: 13px;
background-color: #eff1f2; background-color: #eff1f2;
@ -1159,22 +1131,22 @@
white-space: nowrap; white-space: nowrap;
font-size: 13px; font-size: 13px;
} }
} }
.input-emoji { .input-emoji {
background-color: #fff; background-color: #fff;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
font-size: 16px; font-size: 16px;
padding: 0 12px; padding: 0 12px;
border-radius: 6px; border-radius: 6px;
} }
.input-text { .input-text {
white-space: nowrap; white-space: nowrap;
} }
.input-placeholder { .input-placeholder {
background-color: #fff; background-color: #fff;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
@ -1182,9 +1154,9 @@
padding: 0 12px; padding: 0 12px;
border-radius: 6px; border-radius: 6px;
color: gray; color: gray;
} }
.file-picker-wrapper { .file-picker-wrapper {
position: absolute; position: absolute;
width: 60px; width: 60px;
height: 60px; height: 60px;
@ -1194,32 +1166,32 @@
width: 60px; width: 60px;
height: 60px; height: 60px;
} }
} }
.pbInput { .pbInput {
height: "auto"; height: "auto";
position: fixed; position: fixed;
left: 0; left: 0;
width: 100vw; width: 100vw;
} }
// , // ,
.g_flex_c { .g_flex_c {
display: flex; display: flex;
display: -webkit-flex; display: -webkit-flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.g_p_5 { .g_p_5 {
padding: 5px; padding: 5px;
} }
.g_p_6 { .g_p_6 {
padding: 6px; padding: 6px;
} }
.g_flex_1 { .g_flex_1 {
flex: 1; flex: 1;
} }
</style> </style>
Loading…
Cancel
Save