no message

cyl/master-im
jscyl13849007907 5 months ago
parent 84458d51e4
commit 28d5af1281

@ -108,6 +108,7 @@ export default {
// "reconnectionAttempts": 5, // "reconnectionAttempts": 5,
debugLevel: "debug", debugLevel: "debug",
apiVersion: "v2", apiVersion: "v2",
enableV2CloudConversation: true,
}, },
{ {
V2NIMLoginServiceConfig: { V2NIMLoginServiceConfig: {

@ -1,147 +1,212 @@
<template> <template>
<div> <div style="" class="g_bg_f_5">
<ConversationList ref="contactList" /> <view class="">
<view class="m-tabs" v-if="isLogin" style="position: fixed; width: 100%; z-index: 999">
<u-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" itemWidth="auto" height="84"></u-tabs>
</view>
<scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" :style="{ height: `calc(100vh - ${isLogin ? tabbarHeight + 43 : 0}px)`, 'padding-top': isLogin ? '43px' : '' }" :scroll-y="true">
<view class="">
<div style="height: 10px"></div>
<view class="" v-show="current == 0">
<view class="g_bg_f">
<ConversationList ref="contactList" />
</view>
</view>
<view class="g_bg_f" v-if="current == 1">
<telPanel />
</view>
</view>
</scroll-view>
</view>
<servicePopup
:show="showService"
@updateShow="
(e) => {
showService = e;
}
"
></servicePopup>
<!-- <u-popup v-model="serverPop.isShow" mode="center" :mask-close-able="false" :closeable="true" @close="serverPop.isShow = false" border-radius="30">
<view style="">
<view style="text-align: center; font-size: 16px; color: #333; font-weight: 500; margin-bottom: 32px; padding-top: 32px">添加客户经理微信</view>
<view style="padding: 64px; padding-top: 0">
<image :src="simage" alt="" style="width: 184px; height: 184px" />
</view>
</view>
</u-popup> -->
<g-tabbar></g-tabbar>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted, computed, getCurrentInstance } from "vue"; import { ref, onMounted, computed, getCurrentInstance } from "vue";
import ConversationList from "../NEUIKit/pages/Conversation/conversation-list/index.vue"; import ConversationList from "../NEUIKit/pages/Conversation/conversation-list/index.vue";
import { trackInit } from "../NEUIKit/utils/reporter.ts"; import { trackInit } from "../NEUIKit/utils/reporter.ts";
import { onShow, onLoad } from "@dcloudio/uni-app"; import { onShow, onLoad } from "@dcloudio/uni-app";
import telPanel from "../NEUIKit/pages/Contact/contact-list/index.vue"; import telPanel from "../NEUIKit/pages/Contact/contact-list/index.vue";
import chatPanel from "../NEUIKit/pages/Contact/BcFriend.vue"; import chatPanel from "../NEUIKit/pages/Contact/BcFriend.vue";
const G = getCurrentInstance().appContext.app.config.globalProperties.G; const G = getCurrentInstance().appContext.app.config.globalProperties.G;
import gEmpty from "@/components/empty.vue";
const globalData = ref(getApp().globalData); // import gMessageCell from "@/components/panel/messageCell.vue";
const wyyxTabGroup = ref([]); // import servicePopup from "@/components/servicePopup.vue";
const corpUserFlag = ref(false);
const showService = ref(false); const globalData = ref(getApp().globalData);
const update = ref(1); const wyyxTabGroup = ref([]);
const contactList = ref(null); const corpUserFlag = ref(false);
const AIList = ref(null); const showService = ref(false);
const cdnBaseImg = ref(G.store().cdnBaseImg); const update = ref(1);
const contactList = ref(null);
const isLogin = ref(false); const AIList = ref(null);
// const cdnBaseImg = ref(G.store().cdnBaseImg);
const resetScroll = ref(0);
const tabbarHeight = ref(uni.getStorageSync("TABBAR_HEIGHT")); const isLogin = ref(false);
const openTel2 = ref(null); //
onMounted(() => { const resetScroll = ref(0);
}); const tabbarHeight = ref(uni.getStorageSync("TABBAR_HEIGHT"));
const sname = ref(""); const openTel2 = ref(null);
const stel = ref(""); onMounted(() => {
// const query = uni.createSelectorQuery();
const current = ref(0); // query.select("#openTel2").exec(function (res) {
const count = ref(0); // // console.log("resresres", res);
const messageId = ref(""); // });
const userInfo = ref({}); // setTimeout(() => {
// console.log("openTel2.value", openTel2.value);
onShow(() => { // openTel2.value.handleClick();
isLogin.value = uni.getStorageSync("apply-token") ? true : false; // }, 1000);
console.log("count.value", count.value); });
corpUserFlag.value = uni.getStorageSync("apply-userinfo").corpUserFlag; const sname = ref("");
userInfo.value = uni.getStorageSync("apply-userinfo"); const stel = ref("");
//
update.value++; const typeGroup = ref([
{
name: "当前会话",
},
{
name: "系统通知",
count: "",
},
]);
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(() => { setTimeout(() => {
count.value = uni.getStorageSync("notice_info").count; const unread = uni.$UIKitNIM.V2NIMConversationService.getTotalUnreadCount();
if (!isLogin.value) { if (unread === 0) {
typeGroup.value = [ uni.hideTabBarRedDot({
{ //
name: "系统通知", index: 3, //tabbar
}, });
];
} else { } else {
typeGroup.value = [ uni.showTabBarRedDot({
{ index: 3, //tabbar
name: "当前会话", });
},
{
name: "系统通知",
count: count.value,
},
{
name: "通讯录",
},
];
} }
}, 200); }, 1000);
current.value = globalData.value.messageTab;
if (isLogin.value && uni && uni.$UIKitStore) { messageId.value = globalData.value.messageId;
trackInit("ConversationUIKit"); }
// });
uni.$UIKitStore?.uiStore.selectConversation(""); const goLogin = () => {
setTimeout(() => { uni.reLaunch({
const unread = uni.$UIKitNIM.V2NIMConversationService.getTotalUnreadCount(); url: "/pages/login/index",
if (unread === 0) {
uni.hideTabBarRedDot({
//
index: 3, //tabbar
});
} else {
uni.showTabBarRedDot({
index: 3, //tabbar
});
}
}, 1000);
current.value = globalData.value.messageTab;
messageId.value = globalData.value.messageId;
}
}); });
const goLogin = () => { };
uni.reLaunch({ const goPage = ($path) => {
url: "/pages/login/index", if ($path) {
}); uni.navigateTo({
}; url: $path,
const goPage = ($path) => {
if ($path) {
uni.navigateTo({
url: $path,
});
}
};
const openTel = ($tel) => {
uni.makePhoneCall({
phoneNumber: $tel || "0371-6611 3723",
}); });
}; }
};
const simage = ref(""); const openTel1 = ($tel) => {
const serverPop = ref({ console.log("openTel2", openTel2.value);
isShow: false, uni.requestSubscribeMessage({
tmplIds: ["UPYUMYWBtgWD3ZZHVEJC9qX04ahF81-yBPdsDzArp_4"],
success(res) {
console.log("ssssssssssssssssssssssssss", res);
},
}); });
const openServer = () => { };
let image = uni.getStorageSync("bc-server-image");
if (image && !image.includes("https")) { const openTel = ($tel) => {
image = image.replace("http", "https"); uni.makePhoneCall({
} phoneNumber: $tel || "0371-6611 3723",
simage.value = image; });
serverPop.value.isShow = true; };
};
let timeout = ref(null); const simage = ref("");
const serverPop = ref({
const getScrollInfo = (e) => { isShow: false,
resetScroll.value = 0; });
if (!timeout.value) { const openServer = () => {
timeout.value = setTimeout(() => { let image = uni.getStorageSync("bc-server-image");
uni.$emit("pageScroll", e); if (image && !image.includes("https")) {
timeout.value = null; image = image.replace("http", "https");
}, 100); }
} simage.value = image;
}; serverPop.value.isShow = true;
};
const updateType = (e) => { let timeout = ref(null);
console.log(e);
resetScroll.value = 1; const getScrollInfo = (e) => {
globalData.value.messageTab = 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;
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../NEUIKit/pages/styles/common.scss"; @import "../NEUIKit/pages/styles/common.scss";
.i-items { .i-items {
// border-bottom: 1px solid #eee;
position: relative; position: relative;
&:not(:first-child):after { &:not(:first-child):after {
content: ""; content: "";
@ -153,5 +218,8 @@
top: 0; top: 0;
right: 0; right: 0;
} }
// &:last-child:after {
// border-bottom: none;
// }
} }
</style> </style>

@ -445,6 +445,14 @@
<div class="g_fs_12 g_c_6" style="margin-top: 8px">{{ isSc ? "已收藏" : "收藏" }}</div> <div class="g_fs_12 g_c_6" style="margin-top: 8px">{{ isSc ? "已收藏" : "收藏" }}</div>
</button> </button>
</div> </div>
<div 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-shoucang g_fsi_16" style="color: #787878; line-height: 1; margin-top: -5px"></icon>
<div class="g_fs_12 g_c_6" style="margin-top: 8px">IM</div>
</button>
</div>
<div class="g_flex_1 g_flex_column_center"> <div class="g_flex_1 g_flex_column_center">
<g-button btnText="我要报名" class="g_flex_1 g_fw_600" size="small_auto" :type="jobDetail.recruitment == 2 || !attention ? 'infro' : 'primary'" @clickBtn="handleOpenApplyPopup"></g-button> <g-button btnText="我要报名" class="g_flex_1 g_fw_600" size="small_auto" :type="jobDetail.recruitment == 2 || !attention ? 'infro' : 'primary'" @clickBtn="handleOpenApplyPopup"></g-button>
</div> </div>
@ -1222,6 +1230,44 @@ export default {
}, },
}); });
}, },
goIm() {
let that = this;
that.F.wyyxPost(
that.api.wyyx_create,
{
senderUserId: uni.getStorageSync("apply-uid"),
receiverUserId: that.jobDetail.customServiceUserId,
},
(res) => {
uni.$UIKitStore.uiStore.selectConversation(res.conversationId);
that.F.wyyxPost(
that.api.wyyx_sendCard,
{
conversationType: 1,
senderUserId: uni.getStorageSync("apply-uid"), // id id
receiverUserId: that.jobDetail.customServiceUserId, // id
type: 100000,
jobDetail: {
title: that.jobDetail.jobName,
info: (that.jobDetail.addss ? that.jobDetail.addss + "丨" : "") + that.jobDetail.genderRestrict + "丨" + that.jobDetail.age,
label: that.jobDetail.jobRequestLabelNames.length > 0 ? that.jobDetail.jobRequestLabelNames : "",
salaryClassifyValue: that.jobDetail.priceStr,
serviceFee: that.jobDetail.fuWuFei,
monthPay: that.jobDetail.monthPay,
jobId: that.uid,
},
},
() => {
uni.navigateTo({
url: "/root/NEUIKit/pages/Chat/index",
});
},
() => {}
);
},
() => {}
);
},
}, },
}; };
</script> </script>

@ -114,6 +114,7 @@ let data = {
$parmas[k] = '' $parmas[k] = ''
} }
} }
$header['content-type'] = 'application/json';
console.log("公共参数,+++++", Object.assign($parmas, that.wyyxsetPublicParams())); console.log("公共参数,+++++", Object.assign($parmas, that.wyyxsetPublicParams()));
uni.request({ uni.request({
url: ajaxUrl + $url, url: ajaxUrl + $url,

Loading…
Cancel
Save