|
@ -73,6 +73,9 @@ Page({ |
|
|
defaultGridId:'',//默认网格
|
|
|
defaultGridId:'',//默认网格
|
|
|
leaderGridId:'', //领导网格6.22
|
|
|
leaderGridId:'', //领导网格6.22
|
|
|
workGridId:'', //工作网格7.08
|
|
|
workGridId:'', //工作网格7.08
|
|
|
|
|
|
lbzxGridId:'', //老兵在线网格 10.14
|
|
|
|
|
|
zyzqnGridId:'',//志愿者去哪网格 10.14
|
|
|
|
|
|
sceneFrom:'', //通过扫码进入,跳转到?
|
|
|
completeInfoDialogVisible: false, //完善信息
|
|
|
completeInfoDialogVisible: false, //完善信息
|
|
|
homePagePhone: {}, |
|
|
homePagePhone: {}, |
|
|
fromprogram: '', //来自工作端=work 或者 数据分析端=leader 的跳转,
|
|
|
fromprogram: '', //来自工作端=work 或者 数据分析端=leader 的跳转,
|
|
@ -100,6 +103,7 @@ Page({ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad: function (options) { |
|
|
onLoad: function (options) { |
|
|
|
|
|
this.getResidentConfig() |
|
|
if (options.shareType) { |
|
|
if (options.shareType) { |
|
|
const para = { |
|
|
const para = { |
|
|
shareType: options.shareType, |
|
|
shareType: options.shareType, |
|
@ -111,24 +115,33 @@ Page({ |
|
|
wx.setStorageSync("shareObj", JSON.stringify(para)) |
|
|
wx.setStorageSync("shareObj", JSON.stringify(para)) |
|
|
} |
|
|
} |
|
|
if (options.scene) { |
|
|
if (options.scene) { |
|
|
|
|
|
if (options.scene == 'module_ma_code_zyzqn' || options.scene == 'module_ma_code_lbzx') { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
|
|
|
sceneFrom: options.scene, |
|
|
statusHeight: app.globalData.deviceInfo.statusHeight, |
|
|
statusHeight: app.globalData.deviceInfo.statusHeight, |
|
|
navigationHeight: app.globalData.deviceInfo.navigationHeight, |
|
|
navigationHeight: app.globalData.deviceInfo.navigationHeight |
|
|
gridId: options.scene, |
|
|
|
|
|
fromprogram: options.from |
|
|
|
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
statusHeight: app.globalData.deviceInfo.statusHeight, |
|
|
statusHeight: app.globalData.deviceInfo.statusHeight, |
|
|
navigationHeight: app.globalData.deviceInfo.navigationHeight, |
|
|
navigationHeight: app.globalData.deviceInfo.navigationHeight, |
|
|
|
|
|
gridId: options.scene, |
|
|
|
|
|
fromprogram: options.from, |
|
|
|
|
|
gid: decodeURIComponent(options.scene) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// console.log('options:', options)
|
|
|
} else { |
|
|
if (options.scene) { |
|
|
|
|
|
this.setData({ |
|
|
this.setData({ |
|
|
gid: decodeURIComponent(options.scene) |
|
|
statusHeight: app.globalData.deviceInfo.statusHeight, |
|
|
|
|
|
navigationHeight: app.globalData.deviceInfo.navigationHeight, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
// console.log('options:', options)
|
|
|
|
|
|
// if (options.scene) {
|
|
|
|
|
|
// this.setData({
|
|
|
|
|
|
// gid: decodeURIComponent(options.scene)
|
|
|
|
|
|
// })
|
|
|
|
|
|
// }
|
|
|
let that = this |
|
|
let that = this |
|
|
setTimeout(function () { |
|
|
setTimeout(function () { |
|
|
that.getUserState() |
|
|
that.getUserState() |
|
@ -165,6 +178,14 @@ Page({ |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
workGridId:item.residentValue |
|
|
workGridId:item.residentValue |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else if (item.residentType === 'default_grid' && item.residentCode === 'module_ma_code_lbzx') { |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
lbzxGridId:item.residentValue |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (item.residentType === 'default_grid' && item.residentCode === 'module_ma_code_zyzqn') { |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
zyzqnGridId:item.residentValue |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -337,6 +358,16 @@ Page({ |
|
|
wx.redirectTo({ |
|
|
wx.redirectTo({ |
|
|
url: "/pages/formid/formid?gid=" + para.defaultGridId |
|
|
url: "/pages/formid/formid?gid=" + para.defaultGridId |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else if (that.data.sceneFrom!='') { |
|
|
|
|
|
if (that.data.sceneFrom == 'module_ma_code_zyzqn') { |
|
|
|
|
|
wx.redirectTo({ |
|
|
|
|
|
url: "/pages/formid/formid?gid=" + that.data.zyzqnGridId+'&module=module_ma_code_zyzqn' |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (that.data.sceneFrom == 'module_ma_code_lbzx') { |
|
|
|
|
|
wx.redirectTo({ |
|
|
|
|
|
url: "/pages/formid/formid?gid=" + that.data.lbzxGridId+'&module=module_ma_code_lbzx' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} else if (that.data.fromprogram) { |
|
|
} else if (that.data.fromprogram) { |
|
|
wx.redirectTo({ |
|
|
wx.redirectTo({ |
|
|
url: "/pages/formid/formid?gid=" + that.data.gid |
|
|
url: "/pages/formid/formid?gid=" + that.data.gid |
|
@ -351,6 +382,15 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
if (that.data.sceneFrom == 'module_ma_code_zyzqn') { |
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
url: "/pages/heartNew/heartNew" |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (that.data.sceneFrom == 'module_ma_code_lbzx') { |
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
url: "/subpages/oneKeyService/pages/laobingzaixian/laobingzaixian?modulecode=notice_yjfu_lbzx" |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
if (wx.getStorageSync("shareObj")) { |
|
|
if (wx.getStorageSync("shareObj")) { |
|
|
const para = JSON.parse(wx.getStorageSync("shareObj")) |
|
|
const para = JSON.parse(wx.getStorageSync("shareObj")) |
|
|
if (para.shareType === "heartDetail") { |
|
|
if (para.shareType === "heartDetail") { |
|
@ -364,7 +404,7 @@ Page({ |
|
|
} |
|
|
} |
|
|
wx.removeStorageSync("shareObj") |
|
|
wx.removeStorageSync("shareObj") |
|
|
} |
|
|
} |
|
|
that.getResidentConfig() |
|
|
// that.getResidentConfig()
|
|
|
that.getHomePhone() |
|
|
that.getHomePhone() |
|
|
that.getUserInfo() |
|
|
that.getUserInfo() |
|
|
that.loadGridList() |
|
|
that.loadGridList() |
|
|