|
@@ -40,7 +40,7 @@
|
|
|
>{{ outWeather.temperature ? outWeather.temperature : "--" }}℃</span
|
|
|
>
|
|
|
</div>
|
|
|
- <div class="weixiin" @click="showContact">
|
|
|
+ <div class="weixiin" v-if="contantDetail" @click="showContact">
|
|
|
<img :src="parseImgUrl('ipdImages', 'weixin.svg')" />
|
|
|
<span> 联系客服</span>
|
|
|
</div>
|
|
@@ -302,6 +302,8 @@
|
|
|
<!--联系方式-->
|
|
|
<contact
|
|
|
:isShowContact="isShowContact"
|
|
|
+ :contantDetail="contantDetail"
|
|
|
+ v-if="isShowContact"
|
|
|
@closeDailog="closeContactDailog"
|
|
|
></contact>
|
|
|
</div>
|
|
@@ -357,6 +359,7 @@ import {
|
|
|
queryWorkSpace,
|
|
|
getPadImg,
|
|
|
getSpaceEquipList,
|
|
|
+ queryCustomerservice,
|
|
|
} from "@/apis/envmonitor";
|
|
|
import Keys from "@/constant/key";
|
|
|
import {
|
|
@@ -422,6 +425,8 @@ export default defineComponent({
|
|
|
const sceneDetail: any = {};
|
|
|
const timeOutEvent: any = {};
|
|
|
const touchInterval: any = {};
|
|
|
+ const contantDetail: any = {};
|
|
|
+ const cusServiceTimer: any = null;
|
|
|
const headerInfo: {
|
|
|
headImg: any;
|
|
|
headScene: string;
|
|
@@ -1830,9 +1835,34 @@ export default defineComponent({
|
|
|
proxyData.clearSecenTimer();
|
|
|
proxyData.clearEquipTimer();
|
|
|
},
|
|
|
+ contantDetail: contantDetail,
|
|
|
+ cusServiceTimer: cusServiceTimer,
|
|
|
+ queryCustomerserviceTimer(timer: any = 3600000) {
|
|
|
+ proxyData.cusServiceTimer = setTimeout(() => {
|
|
|
+ proxyData.queryCustomerservice();
|
|
|
+ clearTimeout(proxyData.cusServiceTimer);
|
|
|
+ }, timer);
|
|
|
+ },
|
|
|
+ // 查询联系方式
|
|
|
+ queryCustomerservice() {
|
|
|
+ let params: any = {
|
|
|
+ criteria: { projectId: proxyData.userInfo.projectId },
|
|
|
+ };
|
|
|
+ queryCustomerservice(params)
|
|
|
+ .then((res) => {
|
|
|
+ let resData: any = res;
|
|
|
+ let content: any = resData?.content ?? [];
|
|
|
+ proxyData.contantDetail = content[0];
|
|
|
+ proxyData.queryCustomerserviceTimer();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ proxyData.queryCustomerserviceTimer();
|
|
|
+ });
|
|
|
+ },
|
|
|
});
|
|
|
onBeforeUnmount(() => {
|
|
|
proxyData.clearAll();
|
|
|
+ clearTimeout(proxyData.cusServiceTimer);
|
|
|
});
|
|
|
onMounted(() => {
|
|
|
let spaceId: any = route.query.spaceId;
|
|
@@ -1846,6 +1876,7 @@ export default defineComponent({
|
|
|
// 获取当前平板绑定的空间
|
|
|
proxyData.queryWorkSpace();
|
|
|
proxyData.getWeather();
|
|
|
+ proxyData.queryCustomerservice();
|
|
|
});
|
|
|
return {
|
|
|
...toRefs(proxyData),
|