Browse Source

增加来自数据端和工作端的跳转,state=4设置默认leader_grid和work_grid

master
ZhaoTongYao 5 years ago
parent
commit
2d549ff101
  1. 12
      pages/indexNew/indexNew.js
  2. 21
      project.config.json

12
pages/indexNew/indexNew.js

@ -74,7 +74,8 @@ Page({
leaderGridId:'', //领导网格6.22 leaderGridId:'', //领导网格6.22
workGridId:'', //工作网格7.08 workGridId:'', //工作网格7.08
completeInfoDialogVisible: false, //完善信息 completeInfoDialogVisible: false, //完善信息
homePagePhone: {} homePagePhone: {},
fromprogram: '' //来自工作端=work 或者 数据分析端=leader 的跳转
}, },
onShow: function () { onShow: function () {
if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) { if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) {
@ -107,7 +108,8 @@ Page({
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 gridId: options.scene,
fromprogram: options.from
}) })
} else { } else {
this.setData({ this.setData({
@ -312,7 +314,7 @@ Page({
}) })
// 优化注册流程 // 优化注册流程
if (that.data.gid) { if (that.data.gid && !that.data.fromprogram) {
if (that.data.gid == "gridLeader") { if (that.data.gid == "gridLeader") {
wx.redirectTo({ wx.redirectTo({
url: "/pages/gridLeaderRegister/gridLeaderRegister" url: "/pages/gridLeaderRegister/gridLeaderRegister"
@ -329,6 +331,10 @@ Page({
wx.redirectTo({ wx.redirectTo({
url: "/pages/formid/formid?gid=" + para.defaultGridId url: "/pages/formid/formid?gid=" + para.defaultGridId
}) })
} else if (that.data.fromprogram) {
wx.redirectTo({
url: "/pages/formid/formid?gid=" + that.data.gid
})
} else if (app.globalData.tempGridId == "") { } else if (app.globalData.tempGridId == "") {
wx.redirectTo({ wx.redirectTo({
url: "/pages/toRegister/toRegister" url: "/pages/toRegister/toRegister"

21
project.config.json

@ -17,15 +17,15 @@
"checkInvalidKey": true, "checkInvalidKey": true,
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"useIsolateContext": true,
"useCompilerModule": false, "useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false "userConfirmedUseCompilerModuleSwitch": false,
"compileHotReLoad": false,
"useIsolateContext": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.8.2", "libVersion": "2.8.2",
@ -93,6 +93,21 @@
"id": -1, "id": -1,
"name": "社群列表", "name": "社群列表",
"pathName": "subpages/associationNew/pages/associationlist/associationlist", "pathName": "subpages/associationNew/pages/associationlist/associationlist",
"query": "",
"scene": null
},
{
"id": 5,
"name": "数据端跳转",
"pathName": "pages/indexNew/indexNew",
"query": "scene=1277169327606366209&from=analysis",
"scene": null
},
{
"id": 6,
"name": "工作端跳转",
"pathName": "pages/indexNew/indexNew",
"query": "scene=1280737901335838721&from=work",
"scene": null "scene": null
} }
] ]

Loading…
Cancel
Save