Browse Source

云筑在线

yunzhu
风继续吹 1 year ago
parent
commit
2a3b81de4d
7 changed files with 294 additions and 92 deletions
  1. +92
    -31
      App.vue
  2. +6
    -0
      env/yzdev.js
  3. +1
    -1
      manifest.json
  4. +10
    -0
      package.json
  5. +42
    -27
      pages/index/guide.vue
  6. +139
    -33
      pages/index/index.vue
  7. +4
    -0
      utils/domain.js

+ 92
- 31
App.vue View File

@@ -1,13 +1,15 @@
<script>
import Vue from 'vue';
const domainObj = require('./utils/domain.js');
//app.js
var config = require("./config");
export default {
onLaunch(options) {
this.setTabbarItems() // 设置tabbar
// 获取用户信息
uni.getSystemInfo({
success: function(e) {
console.log(e, 'adjsakljdklasjdklsakjdslakjd')
console.log(e, 'phoneInfo')
// #ifdef MP-WEIXIN
Vue.prototype.StatusBar = e.statusBarHeight;
let custom = wx.getMenuButtonBoundingClientRect();
@@ -25,8 +27,52 @@
bulidIngObj: uni.getStorageSync('buildingID'),
};
},

onLoad() {
this.setTabbarItems()
},
methods: {

// 设置底部导航栏
setTabbarItems() {
const tabbarList = [{
iconPath: "/static/images/tabBar/jiedais.png",
selectedIconPath: "/static/images/tabBar/jiedaiActives.png",
text: "接待"
},
{
iconPath: "/static/images/tabBar/kehus.png",
selectedIconPath: "/static/images/tabBar/kehuActives.png",
text: "客户"
},
{
iconPath: "/static/images/tabBar/works.png",
selectedIconPath: "/static/images/tabBar/workActives.png",
text: "工作台"
},
{
iconPath: "/static/images/tabBar/xuexis.png",
selectedIconPath: "/static/images/tabBar/xuexiActives.png",
text: "学习"
},
{
iconPath: "/static/images/tabBar/mes.png",
selectedIconPath: "/static/images/tabBar/meActives.png",
text: "我的"
}
]
if (domainObj.domain == 'zh.aihxz.com') {
tabbarList.forEach((item, index) => {
uni.setTabBarItem({
index: index,
iconPath: item.iconPath,
selectedIconPath: item.selectedIconPath
})
})
}
},

//实时统计
getTabBarBadge() {
uni.request({
@@ -41,8 +87,6 @@
houseId: uni.getStorageSync('buildingID').id
},
success: (data) => {
console.log(data.data.data.receivingCustomer,
'receivingCustomer')

if (data.data.data == null) {
uni.removeTabBarBadge({
@@ -109,7 +153,6 @@
recordId: data.id
},
success: (data) => {
console.log(data)
}
})
},
@@ -188,7 +231,7 @@
});
}
});
// 新版本更新
if (wx.canIUse('getUpdateManager')) {
const updateManager = wx.getUpdateManager()
@@ -222,7 +265,7 @@
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
// 判断token
const token = uni.getStorageSync("weapp_session_login_data")
if (typeof token.token != "string") {
@@ -237,7 +280,6 @@
},
success: (res) => {
let rescor = res.data.data;
console.log(res, '数据', rescor)
// return
if (res.statusCode == 401) {
uni.showToast({
@@ -264,7 +306,6 @@
}
let users = rescor.user
users.zkProperties = rescor.houseList
console.log(users, '角色数据')
uni.setStorageSync("weapp_session_userInfo_data", users); //写入缓存
}
}
@@ -275,7 +316,6 @@
id: uni.getStorageSync('weapp_session_userInfo_data').accountId,
projectId: uni.getStorageSync('buildingID').id
}).then(res => {
console.log(res)
if (res > 0) {
uni.setTabBarBadge({ //显示数字
index: 4, //tabbar下标
@@ -291,26 +331,6 @@
index: 4
})
})

// this.$u.get("/user/getUser")
// .then(data => {
// if (data.user.total==0) {
// uni.showToast({
// title: '暂无绑定项目',
// duration: 2000,
// icon:"none"
// });
// return
// } else {
// let lopan = {
// id: data.houseList[0].id,
// name: data.houseList[0].propertyName
// }
// let users=data.user
// users.zkProperties=data.houseList
// uni.setStorageSync("weapp_session_userInfo_data",users); //写入缓存
// }
// })
wx.setInnerAudioOption({
obeyMuteSwitch: false
});
@@ -320,9 +340,50 @@
onShow(options) {
const token = uni.getStorageSync("weapp_session_login_data")
if (typeof token.token != "string") {
console.log("没有")
return
} else {}
},


methods: {
// 设置底部导航栏
setTabbarItems() {
const tabbarList = [{
iconPath: "/static/images/tabBar/jiedais.png",
selectedIconPath: "/static/images/tabBar/jiedaiActives.png",
text: "接待"
},
{
iconPath: "/static/images/tabBar/kehus.png",
selectedIconPath: "/static/images/tabBar/kehuActives.png",
text: "客户"
},
{
iconPath: "/static/images/tabBar/works.png",
selectedIconPath: "/static/images/tabBar/workActives.png",
text: "工作台"
},
{
iconPath: "/static/images/tabBar/xuexis.png",
selectedIconPath: "/static/images/tabBar/xuexiActives.png",
text: "学习"
},
{
iconPath: "/static/images/tabBar/mes.png",
selectedIconPath: "/static/images/tabBar/meActives.png",
text: "我的"
}
]
if (domainObj.domain == 'zh.aihxz.com') {
tabbarList.forEach((item, index) => {
uni.setTabBarItem({
index: index,
iconPath: item.iconPath,
selectedIconPath: item.selectedIconPath
})
})
}
}
}
};
</script>


+ 6
- 0
env/yzdev.js View File

@@ -0,0 +1,6 @@
const ENV_PATH = {
baseUrl: 'https://zh.aihxz.com', // 销讲助手
domain: 'zh.aihxz.com', // 主域名
}

module.exports = ENV_PATH

+ 1
- 1
manifest.json View File

@@ -72,7 +72,7 @@
},
"quickapp" : {},
"mp-weixin" : {
"appid" : "wx8f883dca5ecc5510",
"appid" : "wx3c3f25187e6b6176",
"setting" : {
"urlCheck" : false,
"es6" : true,


+ 10
- 0
package.json View File

@@ -50,6 +50,16 @@
"define": {
"WXSC-PLATFORM": true
}
},
"weixin:yzdev": {
"title": "云筑数智助手 生产",
"env": {
"UNI_PLATFORM": "mp-weixin",
"ENV_PATH": "@/env/yzdev.js"
},
"define": {
"WXSC-PLATFORM": true
}
}
}
}


+ 42
- 27
pages/index/guide.vue View File

@@ -1,36 +1,40 @@
<template>
<view class="boox">
<view class="title">
</view>
<view class="booximg">
<!-- <image class="img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/guidepage.png" mode=""></image> -->
<image class="img" src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/wabIndex.png" mode=""></image>
<image v-if="domainObj.domain == 'zh.aihxz.com'" class="img"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/wabIndexs.png" mode=""></image>
<image v-else class="img" src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/wabIndex.png" mode="">
</image>
</view>
<view class="center-dingwei">
<view class="dingwei-title" style="margin-top: 0">
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png" mode=""></image>
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png"
mode=""></image>
<view class="desc">智能语音转写</view>
</view>
<view class="dingwei-title">
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png" mode=""></image>
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png"
mode=""></image>
<view class="desc">高效的判客机制</view>
</view>
<view class="dingwei-title">
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png" mode=""></image>
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png"
mode=""></image>
<view class="desc">全方位的客户跟进</view>
</view>
<view class="dingwei-title">
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png" mode=""></image>
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png"
mode=""></image>
<view class="desc">专业的经纪管家</view>
</view>
<view class="dingwei-title">
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png" mode=""></image>
<image class="dingwei-img" src="https://qufang.oss-cn-beijing.aliyuncs.com/zkgj/xcx/images2.png"
mode=""></image>
<view class="desc">在线实时沟通</view>
</view>
</view>
<view @click="bindWxBLogin" class="button">
<view class="view">
立即去登录
@@ -42,19 +46,21 @@
<script>
var app = getApp();
var config = require("../../config");
const domainObj = require('@/utils/domain.js');
export default {
data() {
return {
domainObj: domainObj, // 域名
};
},
onShow: function() {

onShow() {
uni.request({
url: config.service.verify,
method: "GET",
header: {
'content-type': 'application/json',
'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
if (data.data.code == 10000) {
@@ -65,7 +71,7 @@
}
})
},
onHide: function() {},
onHide() {},
methods: {
bindWxBLogin() {
wx.navigateTo({
@@ -77,10 +83,11 @@
};
</script>
<style lang="scss">
.boox{
.boox {
width: 100vw;
height: 100vh;
position: relative;

.title {
width: 100%;
position: absolute;
@@ -92,42 +99,50 @@
font-weight: 500;
z-index: 1000;
}
.booximg{

.booximg {
width: 100vw;
height: 96vh;
.img{
height: 100vh;

.img {
width: 100%;
height: 100%;
}
}
.center-dingwei{

.center-dingwei {
width: 100%;
position: absolute;
left: 0rpx;
bottom:230rpx;
.dingwei-title{
bottom: 200rpx;

.dingwei-title {
height: 44rpx;
display: flex;
margin-left: 213rpx;
margin-top: 20rpx;
}
.dingwei-img{

.dingwei-img {
width: 44rpx;
height: 44rpx;
}
.desc{

.desc {
line-height: 44rpx;
margin-left: 10rpx;
font-size: 32rpx;
color: #333333;
}
}

.button {
width: 100%;
position: absolute;
left: 0rpx;
bottom:80rpx;
.view{
bottom: 60rpx;

.view {
width: 630rpx;
height: 86rpx;
margin: 0 auto;


+ 139
- 33
pages/index/index.vue View File

@@ -254,22 +254,43 @@
<view class="commonly-box">
<view class="commonly" @click="Piabodata('接待记录')" v-if="permissions.jdjl">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/4649b5bd19124afca0f1a809f93bfd73.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu1.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/4649b5bd19124afca0f1a809f93bfd73.png" mode=""></image>
</template>
</view>
<view class="commonly-text">接待记录</view>
</view>
<view class="commonly" @click="Piabodata('违禁记录')" v-if="permissions.wjjl">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/b1dd1da2a969465bbbf41818320b8487.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu7.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/b1dd1da2a969465bbbf41818320b8487.png" mode=""></image>
</template>
</view>
<view class="commonly-text">违禁记录</view>
</view>
<view class="commonly" @click="toUserinsightinto()" v-if="permissions.tddb">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/c2c2e1af3d5f41d180ec55a04a5d4f26.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu6.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/c2c2e1af3d5f41d180ec55a04a5d4f26.png" mode=""></image>
</template>
</view>
<view class="commonly-text">客户画像</view>
</view>
@@ -283,52 +304,101 @@
<view class="commonly-box">
<view class="commonly" @click="Piabodata('销讲分析')" v-if="permissions.xjfx">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/1f01dfa38203493b88d9668a506fdff3.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu9.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/1f01dfa38203493b88d9668a506fdff3.png" mode=""></image>
</template>
</view>
<view class="commonly-text">销讲分析</view>
</view>
<view class="commonly" @click="toTrendAnalysis()" v-if="permissions.lpdb">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/df070b1a2d5e48359c7de5654e4f7a17.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu8.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/df070b1a2d5e48359c7de5654e4f7a17.png" mode=""></image>
</template>
</view>
<view class="commonly-text">销讲趋势</view>
</view>
<view class="commonly" @click="Piabodata('顾问排名')" v-if="permissions.gwpm">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/f5a6b2d6032348a1b256cfd7083be436.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu10.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/f5a6b2d6032348a1b256cfd7083be436.png" mode=""></image>
</template>
</view>
<view class="commonly-text">顾问排名</view>
</view>
<view class="commonly" @click="toStaffAnalysis()" v-if="permissions.xjqs">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/c2d3801540cf4880a68cce0e04eb59b0.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu3.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/c2d3801540cf4880a68cce0e04eb59b0.png" mode=""></image>
</template>
</view>
<view class="commonly-text">员工分析</view>
</view>
<view class="commonly" @click="toRequireAnalysis()" v-if="permissions.xqwjfx">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/c2d3801540cf4880a68cce0e04eb59b0.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu3.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/c2d3801540cf4880a68cce0e04eb59b0.png" mode=""></image>
</template>
</view>
<view class="commonly-text">需求挖掘分析</view>
</view>

<view class="commonly" @click="toDataBoard" v-if="permissions.sjkb_sy">
<view class="commonly-img">
<image class="commonly-img1" src="https://static.quhouse.com/20230523104819.jpg" mode="">
</image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu12.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1" src="https://static.quhouse.com/20230523104819.jpg" mode="">
</image>
</template>
</view>
<view class="commonly-text">数据看板</view>
</view>

<view class="commonly" @click="toWoring" v-if="permissions.xmyj_sy">
<view class="commonly-img">
<image class="commonly-img1" src="https://static.quhouse.com/20230523104803.jpg" mode="">
</image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu1.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1" src="https://static.quhouse.com/20230523104803.jpg" mode="">
</image>
</template>
</view>
<view class="commonly-text">项目预警</view>
</view>
@@ -343,29 +413,62 @@
<view class="commonly-box">
<view class="commonly" @click="Theteamcompared()" v-if="permissions.gwnl">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/4f5a3a61c06a4508a806eb290ef678e6.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu2.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/4f5a3a61c06a4508a806eb290ef678e6.png" mode="">
</image>
</template>
</view>
<view class="commonly-text">团队对比</view>
</view>
<view class="commonly" @click="Groupcontrast()" v-if="permissions.yhhx">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/759c2e3240e54213827196559ce38fa4.png" mode=""></image>

<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu13.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/759c2e3240e54213827196559ce38fa4.png" mode="">
</image>
</template>
</view>
<view class="commonly-text">集团对比</view>
</view>
<view class="commonly" @click="Piabodata('设备管理')" v-if="permissions.sbgl">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/e617133ecbbd46498e30719444fc02e8.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu4.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/e617133ecbbd46498e30719444fc02e8.png" mode="">
</image>
</template>
</view>
<view class="commonly-text">设备管理</view>
</view>
<view class="commonly" @click="Piabodata('值班顾问')" v-if="permissions.zbgw">
<view class="commonly-img">
<image class="commonly-img1"
src="https://static.quhouse.com/196fcbc7f6aa456cb9dff22cd3753445.png" mode=""></image>
<template v-if="$domain == 'zh.aihxz.com'">
<image class="commonly-img1"
src="https://autoiot.oss-cn-beijing.aliyuncs.com/static/bianzu/bianzu5.png" mode="">
</image>
</template>
<template v-else>
<image class="commonly-img1"
src="https://static.quhouse.com/196fcbc7f6aa456cb9dff22cd3753445.png" mode="">
</image>
</template>
</view>
<view class="commonly-text">值班顾问</view>
</view>
@@ -385,8 +488,6 @@
<view class="timeview" :style="{ color: zhixingcenterindex == 7 ? '#2B6EFF' : '#333333' }"
@click="tabtimetap(7,'自定义')">自定义</view>
</u-popup>
<!-- 底部导航栏 -->
<!-- <u-tabbar :mid-button="false" activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar> -->

<!-- 加载组件 -->
<u-loadings v-model="LOADING"></u-loadings>
@@ -395,13 +496,11 @@

<script>
var config = require("../../config");
import tabbarList from '@/utils/tabbar.js'
export default {
data() {
return {
// tabbar配置项
current: 2,
tabbarList: tabbarList,
$domain: this.$domain,
//--- end --- tabbar配置项
userInfo: {},
Showhiddenunits: false,
@@ -486,6 +585,13 @@
},

onLoad() {
console.log(this.$domain, 'this.$domain')
if (this.$domain == 'zh.aihxz.com') {
uni.setNavigationBarTitle({
title: '云筑数智助手',
})
}
this.LOADING = true
this.sendLog({
houseId: uni.getStorageSync(


+ 4
- 0
utils/domain.js View File

@@ -1,6 +1,7 @@
/**
* env文件里配置自定义运行菜单每一个js代表一个域名
*/
import Vue from 'vue';
const obj = process.env.ENV_PATH == undefined ? require('../env/dev.js') : require(process.env.ENV_PATH)
const base = obj.baseUrl
// http.js使用
@@ -9,10 +10,13 @@ const baseUrl = `${base}/autoSR/api`;
const host = `${base}/autoSR/api`;
const hosts = `${base}/`;
const hostAdmin = `${base}/admin`;
const domain = obj.domain || '';

const iMServiceHost = 'https://im.quhouse.com/'; //IM的后端地址正式

Vue.prototype.$domain = obj.domain || '';
export {
domain,
baseUrl,
host,
hosts,


Loading…
Cancel
Save