no message

cyl/master
jscyl13849007907 1 week ago
parent 9ddd212b24
commit 1433e345e6

@ -0,0 +1,126 @@
<template>
<div>
<view
class="mcell"
:style="{
'background-color': wyyxTabGroup && wyyxTabGroup.length == 0 ? '#ededed' : '#fff',
}"
>
<view v-for="(item, index) in wyyxTabGroup" :key="index" class="g_flex_row_between i-items" @click="goPage(item)">
<div class="g_flex_1 g_flex_row_start g_fs_16" style="padding: 12px 16px">
<div class="g_flex_none g_mr_12">
<image :src="item.avatar" style="width: 48px; height: 48px; border-radius: 50px"></image>
</div>
<div class="g_flex_1 g_flex_column_between">
<view class="g_flex_row_start flex_center">
<div class="g_c_3 g_fs_17 g_fw_600" style="line-height: 24px">
{{ item.title }}
</div>
<view class="g_c_f g_fs_12 g_radius_6 g_ml_4" style="background: linear-gradient(135deg, #5c6cf7, #9963f9); line-height: 18px; padding: 0 4px; height: 18px">官方AI</view>
</view>
<div
class="g_c_3 g_fs_14 g_ell_1"
style="line-height: 20px"
:style="{
color: item.tip == 'khjl' ? '#333' : '#999',
}"
>
{{ item.sub_title }}
</div>
</div>
</div>
<div class="g_flex_none g_flex_column_center">
<div v-if="item.tip == 'khjl'" class="g_flex_column_center">
<div class="g_flex_row_end">
<div class="g_flex_column_center g_mr_8" @click.stop="openTel(item.tel)">
<image src="https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/blueTel.svg" style="width: 40px; height: 40px"></image>
</div>
<div class="g_flex_column_center" @click.stop="openServer">
<image src="https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/qiyeweixin.svg" style="width: 40px; height: 40px"></image>
</div>
</div>
</div>
</div>
</view>
</view>
</div>
</template>
<script>
export default {
data() {
return {
cdnBaseImg: this.G.store().cdnBaseImg,
corpUserFlag: uni.getStorageSync("apply-userinfo").corpUserFlag,
wyyxTabGroup: [],
randomTime: this.generateRandomTime(), //
};
},
mounted() {
let that = this;
this.getConfig().then((botArray) => {
// console.log("ressasas", botArray);
if (that.corpUserFlag) {
that.wyyxTabGroup = botArray;
}
});
},
methods: {
getConfig() {
let that = this;
return new Promise((resolve, reject) => {
let botArray = [];
let config = uni.getStorageSync("chat_config");
botArray = [
{
title: "大鹏", //config.name,
sub_title: "人海AI供应链智能助理", //config.description,
avatar: that.cdnBaseImg + "v3/add1.png", //config.icon_url,
path: "/root/chat/index",
tip: "rgpp",
randomTime: that.generateRandomTime(), //
},
];
resolve(botArray);
});
},
goPage($data) {
let that = this;
if ($data.tip == "rgpp") {
uni.setStorageSync("robot_id", "7491244881596809243");
uni.setStorageSync("isExecute", 1);
uni.navigateTo({
url: $data.path + "?cid=&form=viwdata",
});
} else {
uni.navigateTo({
url: $data.path,
});
}
},
openTel($tel) {
if($tel){
$tel = $tel.replace(/-/g, "");
}
uni.makePhoneCall({
phoneNumber: $tel || "0371-6611 3723",
});
},
openServer() {
this.$emit("exportClickImage");
},
generateRandomTime() {
return Math.floor(Math.random() * (18 - 8 + 1)) + 8; // 8 18
},
},
};
</script>
<style lang="scss">
.mcell{
border-radius: 8px;
width: calc(100vw - 20px);
margin: 10px auto 0;
overflow: hidden;
}
</style>

@ -1,30 +1,19 @@
<template> <template>
<div style="min-height: 100vh" class="g_bg_f_5"> <div style="min-height: 100vh" class="g_bg_f_5">
<view class="" v-if="isLogin && is_use_im == 1"> <view class="" v-if="isLogin && is_use_im == 1">
<view class="m-tabs" v-if="false">
<g-tabs :list="typeGroup" :is-scroll="false" v-model="current" @change="updateType" item-width="126" :active-color="globalData.themeColor" bar-width="60" bar-height="6" font-size="32" :gutter="22" duration="0.1" height="84"></g-tabs>
</view>
<scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" :style="{ height: `calc(100vh - ${isLogin && is_use_im == 1 ? tabbarHeight + 43 : 0}px)` }" :scroll-y="true"> <scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" :style="{ height: `calc(100vh - ${isLogin && is_use_im == 1 ? tabbarHeight + 43 : 0}px)` }" :scroll-y="true">
<view class="" v-if="is_use_im == 1"> <view class="" v-if="is_use_im == 1">
<!-- <view style="height: 43px" v-if="corpUserFlag"></view> -->
<div style="height: 10px" class="2" v-if="current == 1 || current == 2"></div> <div style="height: 10px" class="2" v-if="current == 1 || current == 2"></div>
<view class="" v-show="isLogin ? current == 0 : current == 1"> <view class="" v-show="isLogin ? current == 0 : current == 1">
<!-- <g-message-cell ref="AIList" @exportClickImage="openServer" /> --> <g-message-cell ref="AIList" @exportClickImage="openServer" v-if="isJm" />
<view class=""> <view class="">
<conversationList /> <conversationList />
<!-- <friendList /> -->
<!-- <ConversationList ref="contactList" /> -->
</view> </view>
<!-- <view v-if="contactList && contactList.conversationList.length <= 0 && AIList && AIList.wyyxTabGroup.length <= 0" class="g_p_10 g_flex_c g_mt_130" style="border-radius: 12px; padding: 24px 10px; margin-top: 130px">
<u-empty text="暂无更多会话" :src="cdnBaseImg + 'noData.svg'"> </u-empty>
</view> -->
</view> </view>
<view class="g_bg_f" v-show="isLogin ? current == 1 : current == 0"> <view class="g_bg_f" v-show="isLogin ? current == 1 : current == 0">
<message :cmsIds="messageId" :update="update" /> <message :cmsIds="messageId" :update="update" />
</view> </view>
<view class="g_bg_f" v-if="current == 2"> <view class="g_bg_f" v-if="current == 2">
<!-- <chatPanel /> -->
<telPanel /> <telPanel />
</view> </view>
</view> </view>
@ -66,18 +55,12 @@
<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 { 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 message from "./components/message.vue"; import message from "./components/message.vue";
import conversationList from "../../components/conversationList.vue"; import conversationList from "../../components/conversationList.vue";
// import friendList from "../../components/friendList.vue";
// import chatPanel from "../NEUIKit/pages/Contact/BcFriend.vue";
const G = getCurrentInstance().appContext.app.config.globalProperties.G;
import gMessageCell from "@/components/panel/messageCell.vue"; import gMessageCell from "@/components/panel/messageCell.vue";
const G = getCurrentInstance().appContext.app.config.globalProperties.G;
let firstLoad = ref(false); let firstLoad = ref(false);
let showLoading = ref(true); let showLoading = ref(true);
const globalData = ref(getApp().globalData); const globalData = ref(getApp().globalData);
@ -128,6 +111,7 @@ const current = ref(0);
const count = ref(0); // const count = ref(0); //
const messageId = ref(""); const messageId = ref("");
const userInfo = ref({}); const userInfo = ref({});
const isJm = ref(uni.getStorageSync("apply-userinfo") && uni.getStorageSync("apply-userinfo").agencyId && uni.getStorageSync("apply-userinfo").agencyId == '114827')
onShow(() => { onShow(() => {
isLogin.value = uni.getStorageSync("apply-token") ? true : false; isLogin.value = uni.getStorageSync("apply-token") ? true : false;
// console.log("count.value", count.value); // console.log("count.value", count.value);

Loading…
Cancel
Save