提交 b630f663 作者: wk

项目ID优化

父级 79b9ae2a
......@@ -16,9 +16,9 @@ Vue.prototype.$mta = $mta
Vue.prototype.$toast = $toast
Vue.prototype.$config = $config
Vue.prototype.$imageUtils = $imageUtils
// Vue.prototype.webUrl = "https://dev-console.hzdingmao.com"
Vue.prototype.webUrl = "https://dev-console.hzdingmao.com"
// Vue.prototype.webUrl = "https://test-console.hzdingmao.com"
Vue.prototype.webUrl = "https://console.hibuilding.cn"
// Vue.prototype.webUrl = "https://console.hibuilding.cn"
Vue.prototype.getToken = function() {
return uni.getStorageSync("token")
}
......
......@@ -71,6 +71,10 @@
let curId = uni.getStorageSync("project_id")
if (curId) {
this.projectName = uni.getStorageSync("org_name")
this.projectSelect = {
project_id: curId,
project_name: this.projectName
}
} else {
this.projectSelect = this.projectList[0]
}
......
......@@ -25,6 +25,7 @@
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}`
console.log("web链接", this.url);
},
onShow: function() {
// uni.$once("refresh", (res) => {
......
......@@ -39,13 +39,13 @@
app_endpoint: 2,
is_publish: 1,
app_sort: 2,
publish_target: "ydt"
},
apps: [{}],
currentJob: {},
project_id: "",
orgName: "",
isProject: false
isProject: false,
type: "project" //企业级company 项目级project
}
},
onLoad() {
......@@ -58,6 +58,7 @@
this.project_id = uni.getStorageSync("project_id")
if (!this.project_id) {
this.isProject = false
this.type = 'company'
console.log("用户信息", this.userInfo);
let jobs = this.userInfo.user.job_list
console.log("岗位列表", jobs);
......@@ -70,6 +71,7 @@
this.orgName = this.currentJob.org_name
} else {
this.isProject = true
this.type = 'project'
this.orgName = uni.getStorageSync("org_name")
}
}
......@@ -89,7 +91,12 @@
console.log(res.data);
if (res.data.code === 0) {
let list = res.data.data.list
this.apps = list
list.forEach((item) => {
if (item.app_no == "appletlabourboard") {
this.apps.push(item)
}
})
} else {
this.$toast.showToast(result.msg)
}
......@@ -99,11 +106,11 @@
let app = this.apps[index]
if (app.app_no == "appletboard") {
uni.navigateTo({
url: "/pages/monitor/zhgdMonitor/zhgdMonitor"
url: `/pages/monitor/zhgdMonitor/zhgdMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}`
})
} else if (app.app_no == "appletlabourboard") {
uni.navigateTo({
url: "/pages/monitor/labourMonitor/labourMonitor"
url: `/pages/monitor/labourMonitor/labourMonitor?type=${this.type}&project_id=${this.project_id}&project_name=${this.orgName}`
})
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment