提交 1ea6c48a 作者: wk

工人沟通日身份参数调整

父级 d0039dc9
......@@ -14,6 +14,8 @@ const $config = {
// gtrBase:"https://cwcd-h5.huizhucloud.com",//测试
gtrBase: "https://gdt-front-mobile.hibuilding.cn", //生产
// jyxyBase: "https://edu.huizhucloud.com", //测试
jyxyBase: "https://wlxy.cnzgc.com" //生产
jyxyBase: "https://wlxy.cnzgc.com", //生产
// webUrl: "https://dev-console.hzdingmao.com", //开发
webUrl: "https://console.hibuilding.cn" //生产
}
export default $config
<template>
<view class="wrap">
<swiper class="swiper" :style="{height: height *2 + 'rpx'}" :autoplay="autoplay" :interval="interval"
:duration="duration" :circular='loop' @change='change' :previous-margin='previousMargin + "rpx"'
:next-margin='nextMargin + "rpx"'>
<swiper class="swiper" :style="{height: height *2 + 'rpx','margin-top': 72 *heightScale + 'px'}"
:autoplay="autoplay" :interval="interval" :duration="duration" :circular='loop' @change='change'
:previous-margin='previousMargin + "rpx"' :next-margin='nextMargin + "rpx"'>
<swiper-item v-for="(item,index) in list" :key='index' @click="$emit('clickItem',item)">
<view v-if="list && list.length>0" class="item"
:class="[!crown ? '' : current==index ? 'crown-active':'crown']">
......@@ -100,9 +100,20 @@
data() {
return {
current: 0,
slots: false
slots: false,
heightScale: 1
};
},
created() {
const info = uni.getSystemInfoSync()
if (info.platform == 'windows') {
this.statusBarHeight = info.safeArea.top
} else {
this.statusBarHeight = info.statusBarHeight
}
this.heightScale = info.screenWidth / 375
console.log("尺寸比例", this.heightScale);
},
watch: {
// 判断异步数据源,是否使用插槽自定义样式
list: {
......@@ -131,7 +142,7 @@
.wrap {
position: relative;
border-radius: 30rpx;
margin: 72px 30rpx 0 30rpx;
margin: 0 30rpx;
// background-color: #3B73FE;
.swiper {
......
......@@ -111,6 +111,7 @@
})
if (!uni.getStorageSync("org_name")) {
this.getOrgTree()
console.log("orgName", this.orgName);
} else {
this.orgName = uni.getStorageSync("org_name")
}
......@@ -193,10 +194,11 @@
var source = "1"
if (this.role == 'PM') {
source = 1
} else if (this.role == 'VISITOR') {
} else if (this.role == 'WORKER') {
source = 9
}
if ("63e1e639e7025e13c471a9d2" == result.data.check_tpl_id) { //建筑工人沟通日
this.project_id = uni.getStorageSync("project_id")
uni.navigateTo({
url: "/pages/gallery/outPage/gdtPage/gdtPage?url=" +
`${this.$config.gtrBase}/#/loginByToken&projectId=${this.project_id}&source=${source}&token=${uni.getStorageSync("token")}&to=jzgrgtr`
......@@ -210,7 +212,7 @@
this.toOutPage(result.data.tpl_config[0])
}
// 汇筑工地通H5:https://cwcd-h5.huizhucloud.com/#/loginByToken?projectId=${projectId}&source=${source}&JG-AUTH=${token}
// 网络学院H5: https: //edu.huizhucloud.com/dologin/workSite?workSiteToken=${token}
// 网络学院H5: https: //edu.huizhucloud.com/admin/sys/workSiteLogin?workSiteToken=${token}
// token: 一点通小程序端登录成功之后的值
// projectId: 项目ID
// source: 9( 工人)、 1( 管理员) 赋值9或者1
......
......@@ -15,10 +15,11 @@
onLoad(options) {
if ('jzgrgtr' == options.to) {
this.webUrl =
`${options.url}?projectId=${options.project_id}&source=${options.source}&JG-AUTH=${options.token}`
`${options.url}?projectId=${options.projectId}&source=${options.source}&JG-AUTH=${options.token}`
} else if ('jypx' == options.to) {
this.webUrl = `${options.url}?workSiteToken=${options.workSiteToken}`
}
console.log("外链参数", options);
console.log("外部链接", this.webUrl);
},
methods: {
......
......@@ -179,11 +179,16 @@
}).then((result) => {
if (result.code === 0) {
let list = result.data.list
list.forEach((item, index) => {
this.selList.forEach((sel) => {
if (item.app_id == sel.app_id) {
list.splice(index, 1)
}
// list.forEach((item, index) => {
// this.selList.forEach((sel) => {
// if (item.app_id == sel.app_id) {
// list.splice(index, 1)
// }
// })
// })
list = list.filter((item) => {
return this.selList.every((sel) => {
return sel.app_id != item.app_id
})
})
//先根据菜单分组
......
......@@ -218,7 +218,7 @@
success(res) {
//获取用户信息
that.getUserInfo()
that.getSetting()
// that.getSetting()
that.getHomeComp()
if (that.isCommonSel) {
that.getCommonApp()
......@@ -255,10 +255,12 @@
if (result.data.list.length > 0) {
this.project = result.data.list[0]
this.project_id = this.project.project_id
uni.setStorageSync("org_no", this.project.org_no)
uni.setStorageSync("org_name", this.project.project_name)
uni.setStorageSync("org_id", this.project.id)
uni.setStorageSync("project_id", this.project.project_id)
if (!orgNo) { //不存在组织默认第一个项目
uni.setStorageSync("org_no", this.project.org_no)
uni.setStorageSync("org_name", this.project.project_name)
uni.setStorageSync("org_id", this.project.id)
uni.setStorageSync("project_id", this.project.project_id)
}
}
this.initData()
}
......@@ -567,8 +569,8 @@
this.userInfo = result.data
// this.title = "欢迎" + this.userInfo.user.user_name + "访问一点通"
this.role = this.userInfo.identity.code
console.log("当前组织", uni.getStorageSync("org_no"));
this.project_id = uni.getStorageSync("project_id")
console.log("当前组织", this.project_id);
if (!this.project_id) {
this.loadProject()
} else {
......@@ -758,7 +760,7 @@
var source = "1"
if (this.role == 'PM') {
source = 1
} else if (this.role == 'VISITOR') {
} else if (this.role == 'WORKER') {
source = 9
}
if ("63e1e639e7025e13c471a9d2" == result.data.check_tpl_id) { //建筑工人沟通日
......
......@@ -140,12 +140,13 @@
switchOrg: function(item) {
console.log("切换组织", item);
uni.setStorageSync("org_no", item.org_no)
uni.setStorageSync("org_name", item.name)
uni.setStorageSync("org_id", item.id)
if (item.project_id) {
uni.setStorageSync("project_id", item.project_id)
uni.setStorageSync("org_name", item.name)
} else {
uni.setStorageSync("project_id", "")
uni.setStorageSync("project_id", null)
uni.setStorageSync("org_name", item.org_name)
}
uni.$emit("refreshOrg")
uni.navigateBack({
......
......@@ -296,7 +296,7 @@
.shop-list-content {
display: flex;
flex-direction: column;
margin: 132px 30rpx 30rpx 30rpx;
margin: 210px 30rpx 30rpx 30rpx;
background-color: #FFFFFF;
padding: 30rpx;
border-radius: 30rpx;
......
......@@ -24,7 +24,7 @@
this.project_id = option.project_id
this.project_name = option.project_name
this.url =
`${this.webUrl}/mobileLaborScreen?token_id=${short_token}&tab=1&type=${this.type}&project_id=${this.project_id}&project_name=${this.project_name}`
`${this.$config.webUrl}/mobileLaborScreen?token_id=${short_token}&tab=1&type=${this.type}&project_id=${this.project_id}&project_name=${this.project_name}`
console.log("web链接", this.url);
},
onShow: function() {
......
......@@ -72,7 +72,7 @@
// item.company_id == currentComId
// )
// console.log("当前岗位", job);
this.currentJob = job
// this.currentJob = job
// this.orgName = this.currentJob.org_name
} else {
this.isProject = true
......@@ -92,11 +92,11 @@
"access_token": this.getToken()
}
}).then((res) => {
console.log(res.data);
console.log("监控台", res.data);
if (res.data.code === 0) {
let list = res.data.data.list
list.forEach((item) => {
if (item.app_no == "appletlabourboard") {
if (item.app_no == "20230207002") {
this.apps.push(item)
}
})
......@@ -112,7 +112,7 @@
uni.navigateTo({
url: `/pages/monitor/zhgdMonitor/zhgdMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}`
})
} else if (app.app_no == "appletlabourboard") {
} else if (app.app_no == "20230207002") {
uni.navigateTo({
url: `/pages/monitor/labourMonitor/labourMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}`
})
......@@ -148,7 +148,7 @@
margin: 15px 30rpx;
position: absolute;
top: 53;
z-index: 1;
z-index: 99;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment