Browse Source

我有事做-工作网格-跳转工作端并临时登录

master
ZhaoTongYao 5 years ago
parent
commit
632f805124
  1. 46
      pages/indexNew/indexNew.js
  2. 11
      pages/indexNew/indexNew.wxml
  3. 2
      project.config.json
  4. 5
      utils/config.js

46
pages/indexNew/indexNew.js

@ -73,18 +73,19 @@ Page({
loadMoreVisible: false,
defaultGridId:'',//默认网格
leaderGridId:'', //领导网格6.22
workGridId:'', //工作网格7.08
completeInfoDialogVisible: false, //完善信息
homePagePhone: {}
},
onShow: function() {
if (wx.getStorageSync('token') != '' && wx.getStorageSync('token') != undefined && wx.getStorageSync('token') != null) {
if (!this.data.first) {
this.loadGridList()
this.getBannerList()
this.getFirstInfo()
this.getNoticeList()
this.getIssueList()
this.getProjectList()
this.loadGridList()
this.setData({
pageNo: 1,
newsList: []
@ -153,6 +154,10 @@ Page({
that.setData({
leaderGridId:item.residentValue
})
} else if (item.residentType === 'default_grid' && item.residentCode === 'work_grid') {
that.setData({
workGridId:item.residentValue
})
}
})
}
@ -345,13 +350,13 @@ Page({
}
wx.removeStorageSync('shareObj')
}
that.loadGridList()
that.getBannerList()
that.getFirstInfo()
that.getNoticeList()
that.getNewsList()
that.getIssueList()
that.getProjectList()
that.loadGridList()
}
}
@ -523,7 +528,7 @@ Page({
})
}
},
// 我有事阅 6.22
// 我有事阅 6.22 ->数据端
wysy() {
if(this.data.departmentId != this.data.leaderGridId){//领导网格处理
wx.showToast({
@ -544,7 +549,40 @@ Page({
extraData: {
scrip: res.data
},
envVersion: 'trial',//trial //develop
envVersion: 'release',//trial //develop
success(res) {
console.log(res)
},
fail(err) {
console.log(err)
}
})
}
})
}
},
// 我有事做 7.08 ->工作端
wysz() {
if(this.data.departmentId != this.data.workGridId){//工作网格处理
wx.showToast({
title: '无法使用该板块',
icon: 'none',
duration: 3000
})
}else{
if (this.verifyCompleteInfo()) {
return false
}
api.getScrip().then(res => {
if (res.code === 0 && res.msg === 'success') {
console.log('getScrip',res.data)
wx.navigateToMiniProgram({
appId: 'wx826a8435db9e0947',
path: 'pages/login/login?scrip='+res.data,
extraData: {
scrip: res.data
},
envVersion: 'release',//trial //develop
success(res) {
console.log(res)
},

11
pages/indexNew/indexNew.wxml

@ -84,12 +84,15 @@
<!-- 我有话说 -->
<view class="grid-all-new">
<button bindtap="wyss" class="weui-btn-left" form-type='submit' plain='true' hover-class="hover-btn" wx:if="{{departmentId != leaderGridId}}">
<image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/06/rBAB7161BRGARAefAAGNonPzguk041.png'></image>
</button>
<button bindtap="wysy" class="weui-btn-left" form-type='submit' plain='true' hover-class="hover-btn" wx:else>
<button bindtap="wysy" class="weui-btn-left" form-type='submit' plain='true' hover-class="hover-btn" wx:if="{{departmentId == leaderGridId}}">
<image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/16/rBAB717xXhKATMiMAAAvjvVWdAA612.png'></image>
</button>
<button bindtap="wysz" class="weui-btn-left" form-type='submit' plain='true' hover-class="hover-btn" wx:elif="{{departmentId == workGridId}}">
<image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/1C/rBAB718FM7iAdYrNAABKu-5Itrc967.png'></image>
</button>
<button bindtap="wyss" class="weui-btn-left" form-type='submit' plain='true' hover-class="hover-btn" wx:else>
<image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/06/rBAB7161BRGARAefAAGNonPzguk041.png'></image>
</button>
<view class="weui-btn-right">
<button bindtap="goheart" class="weui-btn-top" form-type='submit' plain='true' hover-class="hover-btn">
<image src='https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/06/rBAB7161BqiAGT25AADji64eXU8518.png'></image>

2
project.config.json

@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": true,
"postcss": true,
"preloadBackgroundData": false,

5
utils/config.js

@ -6,13 +6,14 @@ module.exports = {
};
function BASEURL() {
return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境
// return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境
// return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址
// return "http://219.146.91.110:9094/epdc-api/api/" // 测试环境 ip接口地址
// return "https://epdc.elinkservice.cn/epdc-api/api/" // 正式环境 接口地址
// return 'https://epdc-app.qingdaoshibei.cn/epdc-api/api/' // 电政办 正式环境 接口地址
// return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 电政办 正式环境 接口地址
// return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
// return 'http://10.10.10.64:9094/epdc-api/api/'
}
function WEBROOT() {

Loading…
Cancel
Save