You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

219 lines
5.7 KiB
Vue

2 months ago
<template>
1 day ago
<div style="" class="g_bg_f_5">
1 week ago
<view class="" v-if="isLogin && is_use_im == 1">
1 day ago
<scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" style="height: 100vh" :scroll-y="true">
1 week ago
<view class="" v-if="is_use_im == 1">
1 day ago
<div style="height: 10px"></div>
1 week ago
<view class="" v-show="isLogin ? current == 0 : current == 1">
1 week ago
<g-message-cell ref="AIList" @exportClickImage="openServer" v-if="isJm" />
1 week ago
<view class="">
<conversationList />
</view>
</view>
<view class="g_bg_f" v-show="isLogin ? current == 1 : current == 0">
<message :cmsIds="messageId" :update="update" />
</view>
<view class="g_bg_f" v-if="current == 2">
<telPanel />
</view>
4 days ago
</view>
1 week ago
<view class="" v-if="is_use_im == 0">
<!-- #ifdef MP-WEIXIN -->
<div class="1" style="height: 10px" v-if="current == 1 || current == 2"></div>
<!-- #endif -->
<view class="g_bg_f">
<message :cmsIds="messageId" :update="update" />
</view>
2 months ago
</view>
</scroll-view>
</view>
1 week ago
<view class="g_h_all" v-if="!isLogin">
<rh-login-false-list />
</view>
<rh-serverpopup
:show="showService"
@updateShow="
(e) => {
showService = e;
}
"
></rh-serverpopup>
2 months ago
</div>
1 week ago
<view v-show="firstLoad" style="position: fixed; width: 100%; height: 100vh; left: 0px; top: 0px; z-index: 9" class="u-skeleton">
<view v-for="i in 10" :key="i" style="width: 100%; height: 72px; padding: 16px 12px" class="g_flex_row_between">
<view class="u-skeleton-fillet g_w_48 g_h_48 g_mr_8"> </view>
<view class="g_flex_1">
<view class="u-skeleton-fillet g_w_all g_h_20"></view>
<view class="u-skeleton-fillet g_w_all g_h_20 g_mt_4"></view>
</view>
</view>
<!-- </template> -->
</view>
<u-skeleton :loading="firstLoad" :animation="true" el-color="#ededed" bg-color="#fff"></u-skeleton>
2 months ago
</template>
<script lang="ts" setup>
import { ref, onMounted, computed, getCurrentInstance } from "vue";
4 days ago
import { onShow, onLoad, onShareAppMessage, onShareTimeline } from "@dcloudio/uni-app";
2 months ago
import message from "./components/message.vue";
1 week ago
import conversationList from "../../components/conversationList.vue";
import gMessageCell from "@/components/panel/messageCell.vue";
1 week ago
const G = getCurrentInstance().appContext.app.config.globalProperties.G;
4 days ago
onShareAppMessage(() => {
let appInfo = uni.getStorageSync("miniApp-info");
return {
title: appInfo.slogan || "你想找的厂都有,立即查看",
imageUrl: appInfo.sharePoster,
path: "/pages/message/index",
};
});
4 days ago
// 分享到朋友圈
onShareTimeline(() => {
let appInfo = uni.getStorageSync("miniApp-info");
return {
title: appInfo.slogan || "你想找的厂都有,立即查看",
3 days ago
imageUrl: appInfo.logo,
4 days ago
query: "",
};
});
1 week ago
let firstLoad = ref(false);
let showLoading = ref(true);
2 months ago
const globalData = ref(getApp().globalData);
const wyyxTabGroup = ref([]);
const corpUserFlag = ref(false);
const showService = ref(false);
const update = ref(1);
const contactList = ref(null);
const AIList = ref(null);
const cdnBaseImg = ref(G.store().cdnBaseImg);
1 week ago
const is_use_im = ref(uni.getStorageSync("is_use_im"));
const isLogin = ref(true);
2 months ago
// 回到顶部
const resetScroll = ref(0);
const tabbarHeight = ref(uni.getStorageSync("TABBAR_HEIGHT"));
const openTel2 = ref(null);
1 week ago
onMounted(() => {
// const query = uni.createSelectorQuery();
// query.select("#openTel2").exec(function (res) {
// console.log("resresres", res);
// });
// setTimeout(() => {
// console.log("openTel2.value", openTel2.value);
// openTel2.value.handleClick();
// }, 1000);
setTimeout(() => {
showLoading.value = false;
firstLoad.value = false;
}, 2000);
});
2 months ago
const sname = ref("");
const stel = ref("");
const typeGroup = ref([
{
name: "当前会话",
},
{
name: "系统通知",
count: "",
},
// {
// name: "通讯录",
// },
]);
const current = ref(0);
const count = ref(0); // 系统消息未读
const messageId = ref("");
const userInfo = ref({});
1 week ago
const isJm = ref(uni.getStorageSync("apply-userinfo") && uni.getStorageSync("apply-userinfo").agencyId && uni.getStorageSync("apply-userinfo").agencyId == '114827')
2 months ago
onShow(() => {
isLogin.value = uni.getStorageSync("apply-token") ? true : false;
1 week ago
// console.log("count.value", count.value);
2 months ago
corpUserFlag.value = uni.getStorageSync("apply-userinfo").corpUserFlag;
userInfo.value = uni.getStorageSync("apply-userinfo");
// 单独刷新系统通知
update.value++;
setTimeout(() => {
count.value = uni.getStorageSync("notice_info").count;
1 week ago
if (!isLogin.value) {
2 months ago
typeGroup.value = [
{
name: "系统通知",
},
];
1 week ago
} else {
typeGroup.value = [
{
name: "当前会话",
},
{
name: "系统通知",
count: count.value,
},
// {
// name: "通讯录",
// },
];
}
2 months ago
}, 200);
current.value = 0;
});
const simage = ref("");
const serverPop = ref({
isShow: false,
});
const openServer = () => {
let image = uni.getStorageSync("bc-server-image");
if (image && !image.includes("https")) {
image = image.replace("http", "https");
}
simage.value = image;
serverPop.value.isShow = true;
};
let timeout = ref(null);
const getScrollInfo = (e) => {
resetScroll.value = 0;
if (!timeout.value) {
timeout.value = setTimeout(() => {
uni.$emit("pageScroll", e);
timeout.value = null;
}, 100);
}
};
const updateType = (e) => {
1 week ago
// console.log(e);
2 months ago
resetScroll.value = 1;
globalData.value.messageTab = e;
};
</script>
<style lang="scss">
1 week ago
// @import "../NEUIKit/pages/styles/common.scss";
2 months ago
.i-items {
1 week ago
// border-bottom: 1px solid #eee;
2 months ago
position: relative;
&:not(:first-child):after {
content: "";
display: block;
height: 1rpx;
width: calc(100% - 80px);
background: #eee;
position: absolute;
top: 0;
right: 0;
}
1 week ago
// &:last-child:after {
// border-bottom: none;
// }
2 months ago
}
</style>