提交 b630f663 作者: wk

项目ID优化

父级 79b9ae2a
...@@ -16,9 +16,9 @@ Vue.prototype.$mta = $mta ...@@ -16,9 +16,9 @@ Vue.prototype.$mta = $mta
Vue.prototype.$toast = $toast Vue.prototype.$toast = $toast
Vue.prototype.$config = $config Vue.prototype.$config = $config
Vue.prototype.$imageUtils = $imageUtils 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://test-console.hzdingmao.com"
Vue.prototype.webUrl = "https://console.hibuilding.cn" // Vue.prototype.webUrl = "https://console.hibuilding.cn"
Vue.prototype.getToken = function() { Vue.prototype.getToken = function() {
return uni.getStorageSync("token") return uni.getStorageSync("token")
} }
......
...@@ -71,6 +71,10 @@ ...@@ -71,6 +71,10 @@
let curId = uni.getStorageSync("project_id") let curId = uni.getStorageSync("project_id")
if (curId) { if (curId) {
this.projectName = uni.getStorageSync("org_name") this.projectName = uni.getStorageSync("org_name")
this.projectSelect = {
project_id: curId,
project_name: this.projectName
}
} else { } else {
this.projectSelect = this.projectList[0] this.projectSelect = this.projectList[0]
} }
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
this.project_name = option.project_name this.project_name = option.project_name
this.url = 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.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() { onShow: function() {
// uni.$once("refresh", (res) => { // uni.$once("refresh", (res) => {
......
...@@ -39,13 +39,13 @@ ...@@ -39,13 +39,13 @@
app_endpoint: 2, app_endpoint: 2,
is_publish: 1, is_publish: 1,
app_sort: 2, app_sort: 2,
publish_target: "ydt"
}, },
apps: [{}], apps: [{}],
currentJob: {}, currentJob: {},
project_id: "", project_id: "",
orgName: "", orgName: "",
isProject: false isProject: false,
type: "project" //企业级company 项目级project
} }
}, },
onLoad() { onLoad() {
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
this.project_id = uni.getStorageSync("project_id") this.project_id = uni.getStorageSync("project_id")
if (!this.project_id) { if (!this.project_id) {
this.isProject = false this.isProject = false
this.type = 'company'
console.log("用户信息", this.userInfo); console.log("用户信息", this.userInfo);
let jobs = this.userInfo.user.job_list let jobs = this.userInfo.user.job_list
console.log("岗位列表", jobs); console.log("岗位列表", jobs);
...@@ -70,6 +71,7 @@ ...@@ -70,6 +71,7 @@
this.orgName = this.currentJob.org_name this.orgName = this.currentJob.org_name
} else { } else {
this.isProject = true this.isProject = true
this.type = 'project'
this.orgName = uni.getStorageSync("org_name") this.orgName = uni.getStorageSync("org_name")
} }
} }
...@@ -89,7 +91,12 @@ ...@@ -89,7 +91,12 @@
console.log(res.data); console.log(res.data);
if (res.data.code === 0) { if (res.data.code === 0) {
let list = res.data.data.list let list = res.data.data.list
this.apps = list list.forEach((item) => {
if (item.app_no == "appletlabourboard") {
this.apps.push(item)
}
})
} else { } else {
this.$toast.showToast(result.msg) this.$toast.showToast(result.msg)
} }
...@@ -99,11 +106,11 @@ ...@@ -99,11 +106,11 @@
let app = this.apps[index] let app = this.apps[index]
if (app.app_no == "appletboard") { if (app.app_no == "appletboard") {
uni.navigateTo({ 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") { } else if (app.app_no == "appletlabourboard") {
uni.navigateTo({ 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