Browse Source

新增老兵在线和志愿者去哪儿板块扫小程序码进入

feature/optimise
ZhaoTongYao 5 years ago
parent
commit
0fe987f381
  1. 20
      pages/formid/formid.js
  2. 15
      pages/heartNew/heartNew.js
  3. 66
      pages/indexNew/indexNew.js
  4. 11
      project.config.json
  5. 2
      subpages/oneKeyService/pages/index/index.js
  6. 4
      subpages/oneKeyService/pages/noticeDetail/noticeDetail.js

20
pages/formid/formid.js

@ -7,7 +7,8 @@ Page({
formid: "", formid: "",
resToken: "", resToken: "",
resGridName: "", resGridName: "",
inviteUserId: "" inviteUserId: "",
module: ""
}, },
onLoad: function (options) { onLoad: function (options) {
// 上级页面传递过来的gid // 上级页面传递过来的gid
@ -18,6 +19,11 @@ Page({
inviteUserId: options.inviteUserId inviteUserId: options.inviteUserId
}) })
} }
if (options.module) {
this.setData({
module: options.module
})
}
this.getToken(options.gid) this.getToken(options.gid)
this.getGridName(options.gid) this.getGridName(options.gid)
}, },
@ -104,8 +110,14 @@ Page({
// // } // // }
// // }) // // })
// } // }
wx.reLaunch({ if (this.data.module != '') {
url: "/pages/indexNew/indexNew" wx.reLaunch({
}) url: `/pages/indexNew/indexNew?scene=${this.data.module}`
})
} else {
wx.reLaunch({
url: "/pages/indexNew/indexNew"
})
}
} }
}) })

15
pages/heartNew/heartNew.js

@ -96,6 +96,21 @@ Page({
} }
this.volunteerlist(parms) this.volunteerlist(parms)
} }
} else if (this.data.selectedTab == "tab3") {
this.setData({
dingdan: false,
jingcai: true,
selectedTab: 'tab0'
})
let parms = {
pageIndex: this.data.indexPage,
pageSize: this.data.pageSize,
timestamp: getTimestamp(),
actType: 0,//活动列表类型(0-招募令,1-精彩活动)
qkdat: true,
selectedTab:this.data.selectedTab
}
this.selectComponent("#state-0").getActivityList(parms)
} }
if (this.data.actId) { if (this.data.actId) {
this.setData({ this.setData({

66
pages/indexNew/indexNew.js

@ -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,12 +115,21 @@ Page({
wx.setStorageSync("shareObj", JSON.stringify(para)) wx.setStorageSync("shareObj", JSON.stringify(para))
} }
if (options.scene) { if (options.scene) {
this.setData({ if (options.scene == 'module_ma_code_zyzqn' || options.scene == 'module_ma_code_lbzx') {
statusHeight: app.globalData.deviceInfo.statusHeight, this.setData({
navigationHeight: app.globalData.deviceInfo.navigationHeight, sceneFrom: options.scene,
gridId: options.scene, statusHeight: app.globalData.deviceInfo.statusHeight,
fromprogram: options.from navigationHeight: app.globalData.deviceInfo.navigationHeight
}) })
} else {
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
gridId: options.scene,
fromprogram: options.from,
gid: decodeURIComponent(options.scene)
})
}
} else { } else {
this.setData({ this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight, statusHeight: app.globalData.deviceInfo.statusHeight,
@ -124,11 +137,11 @@ Page({
}) })
} }
// console.log('options:', options) // console.log('options:', options)
if (options.scene) { // if (options.scene) {
this.setData({ // this.setData({
gid: decodeURIComponent(options.scene) // 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,7 +358,17 @@ Page({
wx.redirectTo({ wx.redirectTo({
url: "/pages/formid/formid?gid=" + para.defaultGridId url: "/pages/formid/formid?gid=" + para.defaultGridId
}) })
} else if (that.data.fromprogram) { } 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) {
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()

11
project.config.json

@ -42,17 +42,10 @@
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},
"condition": { "condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"plugin": { "plugin": {
"list": [] "list": []
}, },
"game": { "game": {
"currentL": -1,
"list": [] "list": []
}, },
"gamePlugin": { "gamePlugin": {
@ -68,10 +61,9 @@
"scene": 1011 "scene": 1011
}, },
{ {
"id": 1,
"name": "pages/indexNew/indexNew", "name": "pages/indexNew/indexNew",
"pathName": "pages/indexNew/indexNew", "pathName": "pages/indexNew/indexNew",
"query": "scene=1233592247862198274", "query": "scene=module_ma_code_zyzqn",
"scene": 1011 "scene": 1011
}, },
{ {
@ -103,7 +95,6 @@
"scene": null "scene": null
}, },
{ {
"id": 6,
"name": "工作端跳转", "name": "工作端跳转",
"pathName": "pages/indexNew/indexNew", "pathName": "pages/indexNew/indexNew",
"query": "scene=1280737901335838721&from=work", "query": "scene=1280737901335838721&from=work",

2
subpages/oneKeyService/pages/index/index.js

@ -38,7 +38,7 @@ Page({
// }) // })
//政策、通知 /subpages/home/pages/noticeNew/noticeNew //政策、通知 /subpages/home/pages/noticeNew/noticeNew
goDetails(e) {//模块编码(政策,通知,档案,警事,一键直通) goDetails(e) {//模块编码(政策,通知,档案,警事,一键直通)
console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode) console.log(e.currentTarget.dataset.modulecode)
if (e.currentTarget.dataset.modulecode == 'notice_navigation_hot') { if (e.currentTarget.dataset.modulecode == 'notice_navigation_hot') {
wx.navigateTo({ wx.navigateTo({
url: `../policyList/policyList?modulecode=${e.currentTarget.dataset.modulecode}` url: `../policyList/policyList?modulecode=${e.currentTarget.dataset.modulecode}`

4
subpages/oneKeyService/pages/noticeDetail/noticeDetail.js

@ -126,7 +126,7 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { // onShareAppMessage: function () {
} // }
}) })
Loading…
Cancel
Save