diff --git a/app.js b/app.js
index 2b79967..90f31a4 100644
--- a/app.js
+++ b/app.js
@@ -22,9 +22,9 @@ App({
success: function (res) {
if (res.data.code == 1) {
if (res.header.hasOwnProperty('Set-Cookie')){
- wx.setStorageSync('sessionid', res.header["Set-Cookie"])
+ that.globalData.sessionId = res.header["Set-Cookie"]
}else{
- wx.setStorageSync('sessionid', res.header["set-cookie"])
+ that.globalData.sessionId = res.header["set-cookie"]
}
that.globalData.userInfo.name = res.data.name
that.globalData.userInfo.username = res.data.username
@@ -48,7 +48,7 @@ App({
url: that.globalData.serverUrl + 'api/user?a=checkaqy',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -74,7 +74,7 @@ App({
url: that.globalData.serverUrl + 'api/check_session',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if(res.data.code!=1){
@@ -99,7 +99,8 @@ App({
//serverUrl: 'http://10.21.28.148:8000/',
//serverUrl: 'http://192.168.0.103:8000/',
//serverUrl:'http://10.0.11.195:8000/',
- timer:null //定时器
+ timer:null,//定时器
+ sessionId:null
},
})
\ No newline at end of file
diff --git a/pages/area/detail.js b/pages/area/detail.js
index 2bc8654..03f7aed 100644
--- a/pages/area/detail.js
+++ b/pages/area/detail.js
@@ -36,7 +36,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/area?a=detail&id=' + areaid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -52,7 +52,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/riskact?a=listall2&area='+areaid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/area/tree.js b/pages/area/tree.js
index c820ad1..446b3d1 100644
--- a/pages/area/tree.js
+++ b/pages/area/tree.js
@@ -23,7 +23,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/area?a=tree',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/bind/binduser.js b/pages/bind/binduser.js
index 3edd3d3..4f5b4ae 100644
--- a/pages/bind/binduser.js
+++ b/pages/bind/binduser.js
@@ -31,7 +31,6 @@ Page({
if (res.statusCode === 200) {
if (res.data.code == 1) {
wx.showToast({})
- wx.removeStorageSync('sessionid')
getApp().globalData.userInfo = {
userid: 0,
username: '',
diff --git a/pages/data/detail.js b/pages/data/detail.js
index 63cf95c..061306d 100644
--- a/pages/data/detail.js
+++ b/pages/data/detail.js
@@ -60,7 +60,7 @@ Page({
url: this.data.serverUrl + 'edu/api?a=downfile&id=' + this.data.id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
@@ -139,7 +139,7 @@ Page({
url: this.data.serverUrl + 'edu/api?a=detail&id=' + id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
diff --git a/pages/data/detail.wxml b/pages/data/detail.wxml
index 0e756c4..6bac746 100644
--- a/pages/data/detail.wxml
+++ b/pages/data/detail.wxml
@@ -1,33 +1,33 @@
-
-
- {{title}}
- 分享者:
- {{user__ubelongpart__partname}}
- {{user__name}}
-
- 下载量:
- {{downnum}}
-
- 最近编辑时间:{{modifytime}}
-
-
-
-
-
- {{desciption}}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {{title}}
+ 分享者:
+ {{user__ubelongpart__partname}}
+ {{user__name}}
+
+ 下载量:
+ {{downnum}}
+
+ 最近编辑时间:{{modifytime}}
+
-
+
+
+
+ {{desciption}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/data/detail.wxss b/pages/data/detail.wxss
index 1068258..9db62f8 100644
--- a/pages/data/detail.wxss
+++ b/pages/data/detail.wxss
@@ -2,4 +2,7 @@
.weui-btn{
width:auto;
margin: 5px;
+}
+.videoCss{
+ width:100%;
}
\ No newline at end of file
diff --git a/pages/data/index.js b/pages/data/index.js
index 501899b..b08decf 100644
--- a/pages/data/index.js
+++ b/pages/data/index.js
@@ -29,8 +29,7 @@ Page({
*/
onShow: function () {
var that = this;
- that.getDatalist(1)
- this.data.page = 1;
+ that.onPullDownRefresh();
},
/**
@@ -83,7 +82,7 @@ Page({
url: this.data.serverUrl + 'edu/api?a=listall&rows=10&page=' + page+'&search='+search,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/equipment/detail.js b/pages/equipment/detail.js
index 5273f67..3c65ae6 100644
--- a/pages/equipment/detail.js
+++ b/pages/equipment/detail.js
@@ -31,7 +31,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/equipment?a=detail&id=' + equipmentid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/examtest/detail.js b/pages/examtest/detail.js
index 5fece31..ba43eb1 100644
--- a/pages/examtest/detail.js
+++ b/pages/examtest/detail.js
@@ -23,7 +23,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/examtestdetail?a=detail&id='+detailid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/examtest/index.js b/pages/examtest/index.js
index 655685c..f176089 100644
--- a/pages/examtest/index.js
+++ b/pages/examtest/index.js
@@ -40,7 +40,7 @@ Page({
url: this.data.serverUrl + 'api/examtestdetail?a=listyk&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -88,7 +88,7 @@ Page({
url: this.data.serverUrl + 'api/examtestdetail?a=listdk&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -132,10 +132,10 @@ Page({
title: '加载中',
}),
wx.request({
- url: this.data.serverUrl + 'api/examtest?a=listall&state=open&rows=10&page=' + page,
+ url: this.data.serverUrl + 'api/examtest?a=listall&owner=yes&state=open&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -182,7 +182,7 @@ Page({
url: this.data.serverUrl + 'api/examtest?a=listall&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -235,37 +235,23 @@ Page({
},
onShow: function () {
var that = this;
- console.log(that.data.activeIndex)
- if (that.data.activeIndex == 0) {
- that.getkklist(1)
- that.data.kkpage = 1
- }
- else if (that.data.activeIndex == 1) {
- that.getyklist(1)
- that.data.page = 1
- }
- else if (that.data.activeIndex == 2) {
- that.getalllist(1)
- that.data.allpage = 1
- }
+ that.onPullDownRefresh();
},
onPullDownRefresh: function () {
var that = this;
if (that.data.activeIndex == 0) {
that.getkklist(1)
- wx.stopPullDownRefresh();
that.data.kkpage = 1
}
else if (that.data.activeIndex == 1) {
that.getyklist(1)
- wx.stopPullDownRefresh();
that.data.page = 1
}
else if (that.data.activeIndex == 2) {
that.getalllist(1)
- wx.stopPullDownRefresh();
that.data.allpage = 1
}
+ wx.stopPullDownRefresh();
},
onReachBottom: function () {
//上拉分页,将页码加1,然后调用分页函数
diff --git a/pages/examtest/main.js b/pages/examtest/main.js
index aa63f9f..10b960c 100644
--- a/pages/examtest/main.js
+++ b/pages/examtest/main.js
@@ -75,7 +75,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/examtest?a=detailtm&id=' + options.id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -292,7 +292,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/examtestdetail?a=handtest&id=' + this.data.testid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: data,
diff --git a/pages/examtest/note.js b/pages/examtest/note.js
index fad3380..7765451 100644
--- a/pages/examtest/note.js
+++ b/pages/examtest/note.js
@@ -21,7 +21,7 @@ Page({
let q = decodeURIComponent(options.q)
if (q) {
examtestid = util.getQueryString(q, 'id')
- if (wx.getStorageSync('sessionid').indexOf('sessinid') != -1) {
+ if (getApp().globalData.sessionId.indexOf('sessinid') != -1) {
this.setData({
fromWx: true
})
@@ -39,7 +39,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/examtest?a=detail&id='+examtestid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/examtest/note2.js b/pages/examtest/note2.js
index ddd11f0..3b275cd 100644
--- a/pages/examtest/note2.js
+++ b/pages/examtest/note2.js
@@ -31,7 +31,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/examtest?a=detail&id=' + examtestid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
wx.hideLoading()
diff --git a/pages/examtest/rate.js b/pages/examtest/rate.js
index 157c489..04fc836 100644
--- a/pages/examtest/rate.js
+++ b/pages/examtest/rate.js
@@ -87,7 +87,7 @@ Page({
url: this.data.serverUrl + 'api/examtestdetail?a=rate&examtestid='+this.data.examtestid + '&rows=20&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/exercise/main.js b/pages/exercise/main.js
index b7cdbf6..7156c7a 100644
--- a/pages/exercise/main.js
+++ b/pages/exercise/main.js
@@ -93,7 +93,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/question?a=exercise',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: {
diff --git a/pages/images/guanjun.svg b/pages/images/guanjun.svg
new file mode 100644
index 0000000..612f98a
--- /dev/null
+++ b/pages/images/guanjun.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/pages/images/jijun.svg b/pages/images/jijun.svg
new file mode 100644
index 0000000..7fe40ef
--- /dev/null
+++ b/pages/images/jijun.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/pages/images/pdf.svg b/pages/images/pdf.svg
index d8f9cda..3afe69f 100644
--- a/pages/images/pdf.svg
+++ b/pages/images/pdf.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/images/ppt.svg b/pages/images/ppt.svg
index 9f1ad7a..ea6c816 100644
--- a/pages/images/ppt.svg
+++ b/pages/images/ppt.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/images/word.svg b/pages/images/word.svg
index 5eb6535..64fbba3 100644
--- a/pages/images/word.svg
+++ b/pages/images/word.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/images/yajun.svg b/pages/images/yajun.svg
new file mode 100644
index 0000000..1b7c8f6
--- /dev/null
+++ b/pages/images/yajun.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/pages/inspect/add.js b/pages/inspect/add.js
index 638ef5b..315891a 100644
--- a/pages/inspect/add.js
+++ b/pages/inspect/add.js
@@ -27,7 +27,7 @@ Page({
url: this.data.serverUrl + 'api/equipment?a=detail&id=' + id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -39,7 +39,7 @@ Page({
url: this.data.serverUrl + 'api/risk?a=steps&type=equipment',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method:'post',
data:{'name':res.data.name,'id':res.data.id,'areaid':res.data.area__id},
@@ -71,7 +71,7 @@ submit:function(){
url: this.data.serverUrl + 'api/inspect?a=add',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method:'POST',
data:data,
diff --git a/pages/inspect/detail.js b/pages/inspect/detail.js
index 8dc9ef2..f5b0374 100644
--- a/pages/inspect/detail.js
+++ b/pages/inspect/detail.js
@@ -16,7 +16,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/inspect?a=detail&id='+options.id,
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
success: res => {
diff --git a/pages/inspect/index.js b/pages/inspect/index.js
index ffe8b33..bf588cd 100644
--- a/pages/inspect/index.js
+++ b/pages/inspect/index.js
@@ -29,8 +29,7 @@ Page({
*/
onShow: function () {
var that = this;
- that.getXjlist(1)
- this.data.page = 1;
+ that.onPullDownRefresh();
},
/**
@@ -103,7 +102,7 @@ Page({
url: this.data.serverUrl + 'api/inspect?a=listall&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/main/main.js b/pages/main/main.js
index 42e5c3a..228bafe 100644
--- a/pages/main/main.js
+++ b/pages/main/main.js
@@ -94,7 +94,7 @@ Page({
onShow: function () {
var that = this
- if (wx.getStorageSync('sessionid').indexOf('sessionid') != -1) {
+ if ((getApp().globalData.sessionId != null) && (getApp().globalData.sessionId.indexOf('sessionid') != -1)) {
that.getNew()
}
else {
@@ -163,7 +163,7 @@ Page({
url: this.data.serverUrl + 'api/notice?a=noreadnum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -183,7 +183,7 @@ Page({
url: this.data.serverUrl + 'troublehandle?a=todonum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -203,7 +203,7 @@ Page({
url: this.data.serverUrl + 'api/operation?a=todonum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -223,7 +223,7 @@ Page({
url: this.data.serverUrl + 'pxhandle?a=dqdnum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -243,7 +243,7 @@ Page({
url: this.data.serverUrl + 'api/examtest?a=dknum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -263,7 +263,7 @@ Page({
url: this.data.serverUrl + 'gchandle?a=noreadnum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -283,7 +283,7 @@ Page({
url: this.data.serverUrl + 'api/miss?a=noreadnum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -303,7 +303,7 @@ Page({
url: this.data.serverUrl + 'api/suggest?a=todonum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -323,7 +323,7 @@ Page({
url: this.data.serverUrl + 'api/riskacttask?a=todonum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/miss/addmiss.js b/pages/miss/addmiss.js
index fbf20c4..c63be30 100644
--- a/pages/miss/addmiss.js
+++ b/pages/miss/addmiss.js
@@ -51,7 +51,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: getApp().globalData.serverUrl + 'upfile',
filePath: that.data.missimg[x],
@@ -87,7 +87,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/miss?a=add',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: wsdata,
diff --git a/pages/miss/miss.js b/pages/miss/miss.js
index 351327e..f833262 100644
--- a/pages/miss/miss.js
+++ b/pages/miss/miss.js
@@ -29,8 +29,7 @@ Page({
*/
onShow: function () {
var that = this;
- that.getWslist(1)
- this.data.page = 1;
+ that.onPullDownRefresh();
},
/**
@@ -83,7 +82,7 @@ Page({
url: this.data.serverUrl + 'api/miss?a=listall&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/miss/missdetail.js b/pages/miss/missdetail.js
index 7c5cacc..674333f 100644
--- a/pages/miss/missdetail.js
+++ b/pages/miss/missdetail.js
@@ -80,7 +80,7 @@ Page({
url: this.data.serverUrl + 'api/miss?a=detail&missid=' + missid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
diff --git a/pages/notice/detail.js b/pages/notice/detail.js
index 2a3e8c3..fcd3f8a 100644
--- a/pages/notice/detail.js
+++ b/pages/notice/detail.js
@@ -115,7 +115,7 @@ Page({
url: this.data.serverUrl + 'api/notice?a=detail&id=' + id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
diff --git a/pages/notice/notice.js b/pages/notice/notice.js
index 3a6f9d1..73155d1 100644
--- a/pages/notice/notice.js
+++ b/pages/notice/notice.js
@@ -29,8 +29,7 @@ Page({
*/
onShow: function () {
var that = this;
- that.getTzlist(1)
- this.data.page = 1;
+ that.onPullDownRefresh();
},
/**
@@ -83,7 +82,7 @@ Page({
url: this.data.serverUrl + 'api/notice?a=listtome&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/observe/addobserve.js b/pages/observe/addobserve.js
index 44643cb..3fc5057 100644
--- a/pages/observe/addobserve.js
+++ b/pages/observe/addobserve.js
@@ -178,7 +178,7 @@ Page({
url: getApp().globalData.serverUrl + 'gchandle?a=getdics',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -231,7 +231,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: getApp().globalData.serverUrl + 'upfile',
filePath: that.data.lookimg[x],
@@ -270,7 +270,7 @@ Page({
url: getApp().globalData.serverUrl + 'gchandle?a=add',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: gcdata,
diff --git a/pages/observe/observe.js b/pages/observe/observe.js
index 6607ea8..fc39142 100644
--- a/pages/observe/observe.js
+++ b/pages/observe/observe.js
@@ -29,8 +29,7 @@ Page({
*/
onShow: function () {
var that = this;
- that.getGclist(1)
- this.data.page = 1;
+ that.onPullDownRefresh();
},
/**
@@ -83,7 +82,7 @@ Page({
url: this.data.serverUrl + 'gchandle?a=listall&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/observe/observedetail.js b/pages/observe/observedetail.js
index afb7ec6..10005aa 100644
--- a/pages/observe/observedetail.js
+++ b/pages/observe/observedetail.js
@@ -80,7 +80,7 @@ Page({
url: this.data.serverUrl + 'gchandle?a=detail&lookid=' + lookid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
diff --git a/pages/operation/list.js b/pages/operation/list.js
index 9c56bd3..eb8c15d 100644
--- a/pages/operation/list.js
+++ b/pages/operation/list.js
@@ -12,7 +12,7 @@ Page({
url: getApp().globalData.serverUrl + 'getdickey?dicclass=33',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
success: res => {
diff --git a/pages/operation/operation.js b/pages/operation/operation.js
index 84cc98a..b5230da 100644
--- a/pages/operation/operation.js
+++ b/pages/operation/operation.js
@@ -39,7 +39,7 @@ Page({
url: this.data.serverUrl + 'api/operation?a=listall&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -84,7 +84,7 @@ Page({
url: this.data.serverUrl + 'api/operation?a=listself&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -129,7 +129,7 @@ Page({
url: this.data.serverUrl + 'api/operation?a=listtodo&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -182,19 +182,7 @@ Page({
},
onShow: function () {
var that = this;
- console.log(that.data.activeIndex)
- if (that.data.activeIndex == 0) {
- that.getmyZylist(1)
- that.data.mypage = 1
- }
- else if (that.data.activeIndex == 1) {
- that.gettodoZylist(1)
- that.data.todopage = 1
- }
- else if (that.data.activeIndex == 2) {
- that.getallZylist(1)
- that.data.page = 1
- }
+ that.onPullDownRefresh();
},
onPullDownRefresh: function () {
var that = this;
diff --git a/pages/operation/operationadd.js b/pages/operation/operationadd.js
index 416a5b6..efaa650 100644
--- a/pages/operation/operationadd.js
+++ b/pages/operation/operationadd.js
@@ -70,7 +70,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/fxcs?a=listall&zylx='+zylx,
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
success: res => {
@@ -268,7 +268,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/operation?a=getspr12',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: {'sdbm':this.data.sdbm},
@@ -328,7 +328,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: getApp().globalData.serverUrl + 'upfile',
filePath: that.data.zyimg[x],
@@ -383,7 +383,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/operation?a=add',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: zydata,
diff --git a/pages/operation/operationcheck.js b/pages/operation/operationcheck.js
index 8eb1384..6e51f9e 100644
--- a/pages/operation/operationcheck.js
+++ b/pages/operation/operationcheck.js
@@ -20,7 +20,7 @@ Page({
url: this.data.serverUrl + 'api/operation?a=detail&zyid=' + zyid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -125,7 +125,7 @@ Page({
url: that.data.serverUrl + 'api/operation?a=qrzy',
header: {
'content-type': 'aapplication/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: {'zyid':that.data.zyid},
@@ -148,7 +148,7 @@ Page({
url: that.data.serverUrl + 'api/operation?a=spzy',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: { 'zyid': that.data.zyid },
@@ -214,7 +214,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: getApp().globalData.serverUrl + 'upfile',
filePath: that.data.zyimg2[x],
@@ -245,7 +245,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/operation?a=gbzy',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: zydata,
@@ -266,7 +266,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/operation?a=spzy',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: { 'zyid': that.data.zyid, 'zjsp': true, 'newsprs': that.data.spry },
@@ -297,7 +297,7 @@ Page({
url: that.data.serverUrl + 'api/operation?a=spzy',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: { 'zyid': that.data.zyid ,'zzsp':true},
diff --git a/pages/operation/operationdetail.js b/pages/operation/operationdetail.js
index 77f8e9d..1986453 100644
--- a/pages/operation/operationdetail.js
+++ b/pages/operation/operationdetail.js
@@ -28,7 +28,7 @@ Page({
url: this.data.serverUrl + 'api/operation?a=detail&zyid=' + zyid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/parttree/index.js b/pages/parttree/index.js
index cd95411..b99d934 100644
--- a/pages/parttree/index.js
+++ b/pages/parttree/index.js
@@ -23,7 +23,7 @@ Page({
url: getApp().globalData.serverUrl + 'getuser?a=combobox&partid='+e.detail.id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -91,7 +91,7 @@ Page({
url: getApp().globalData.serverUrl + 'parthandle?a='+strurl,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/public/detail.js b/pages/public/detail.js
index 3b7fe95..10074e6 100644
--- a/pages/public/detail.js
+++ b/pages/public/detail.js
@@ -118,7 +118,7 @@ Page({
url: this.data.serverUrl + 'api/notice?a=detail&id=' + id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
diff --git a/pages/public/public.js b/pages/public/public.js
index 0699bd1..e366268 100644
--- a/pages/public/public.js
+++ b/pages/public/public.js
@@ -29,8 +29,7 @@ Page({
*/
onShow: function () {
var that = this;
- that.getGglist(1)
- this.data.page = 1;
+ that.onPullDownRefresh();
},
/**
@@ -83,7 +82,7 @@ Page({
url: this.data.serverUrl + 'api/notice?a=listpublic&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/questioncat/index.js b/pages/questioncat/index.js
index fe96fa0..2d49e26 100644
--- a/pages/questioncat/index.js
+++ b/pages/questioncat/index.js
@@ -28,7 +28,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/questioncat?a=tree',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -112,7 +112,7 @@ Page({
// url: getApp().globalData.serverUrl + 'api/partuser?a=getall&parentid=' + item.id,
// header: {
// 'content-type': 'application/json', // 默认值
- // 'Cookie': wx.getStorageSync("sessionid"),
+ // 'Cookie': getApp().globalData.sessionId,
// },
// data: {},
// success: res => {
diff --git a/pages/risk/detail.js b/pages/risk/detail.js
index bb92b73..0600120 100644
--- a/pages/risk/detail.js
+++ b/pages/risk/detail.js
@@ -19,7 +19,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/risk?a=detail&id=' + options.id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/risk/myindex.js b/pages/risk/myindex.js
index c8699aa..d5426f6 100644
--- a/pages/risk/myindex.js
+++ b/pages/risk/myindex.js
@@ -23,7 +23,7 @@ Page({
url: url,
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
success: res => {
diff --git a/pages/riskact/check.js b/pages/riskact/check.js
index 49b90ea..c6b693a 100644
--- a/pages/riskact/check.js
+++ b/pages/riskact/check.js
@@ -27,7 +27,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/risk?a=listall&riskact=' + this.data.riskact,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -115,7 +115,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/riskcheck2?a=add',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: data,
diff --git a/pages/riskact/detail.js b/pages/riskact/detail.js
index 6c6bc30..3b0d369 100644
--- a/pages/riskact/detail.js
+++ b/pages/riskact/detail.js
@@ -34,7 +34,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/riskact?a=detail&id=' + riskactid,
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
success: res => {
diff --git a/pages/riskact/index.js b/pages/riskact/index.js
index 0d4342d..a595df6 100644
--- a/pages/riskact/index.js
+++ b/pages/riskact/index.js
@@ -165,7 +165,7 @@ Page({
url: this.data.serverUrl + 'api/riskact?a=listall&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -210,7 +210,7 @@ Page({
url: this.data.serverUrl + 'api/riskacttask?a=listself&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/riskact/index2.js b/pages/riskact/index2.js
index ccab0a9..24cff2d 100644
--- a/pages/riskact/index2.js
+++ b/pages/riskact/index2.js
@@ -78,7 +78,7 @@ Page({
url: this.data.serverUrl + 'api/riskact?a=listself&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/risktask/detail.js b/pages/risktask/detail.js
index 57d0058..e6b7539 100644
--- a/pages/risktask/detail.js
+++ b/pages/risktask/detail.js
@@ -25,7 +25,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/riskcheck2?a=listall&riskacttask=' + this.data.id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/risktask/index.js b/pages/risktask/index.js
index dc817d5..df2c608 100644
--- a/pages/risktask/index.js
+++ b/pages/risktask/index.js
@@ -60,19 +60,7 @@ Page({
*/
onShow: function () {
var that = this;
- console.log(that.data.activeIndex)
- if (that.data.activeIndex == 0) {
- that.getmylist(1)
- that.data.mypage = 1
- }
- else if (that.data.activeIndex == 1) {
- that.gettodolist(1)
- that.data.todopage = 1
- }
- else if (that.data.activeIndex == 2) {
- that.getalllist(1)
- this.data.page = 1;
- }
+ that.onPullDownRefresh();
},
@@ -148,7 +136,7 @@ Page({
url: this.data.serverUrl + 'api/riskacttask?a=listalltodo&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -193,7 +181,7 @@ Page({
url: this.data.serverUrl + 'api/riskacttask?a=listself&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -250,7 +238,7 @@ Page({
url: this.data.serverUrl + 'api/riskacttask?a=listmytodo&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/safecert/detail.js b/pages/safecert/detail.js
index 8e75452..d28de30 100644
--- a/pages/safecert/detail.js
+++ b/pages/safecert/detail.js
@@ -70,7 +70,7 @@ Page({
url: this.data.serverUrl + 'api/safecert?a=detail&id=' + id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
diff --git a/pages/safecert/index.js b/pages/safecert/index.js
index 80d3f01..0c7a3f3 100644
--- a/pages/safecert/index.js
+++ b/pages/safecert/index.js
@@ -67,7 +67,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/user?a=detailself',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
data: {},
@@ -99,7 +99,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/safecert?a=listself',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.data.total == 0) {
@@ -107,7 +107,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/safecert?a=addspiderself',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
data: {},
@@ -118,7 +118,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/safecert?a=listself',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/socert/socert.js b/pages/socert/socert.js
index 767fb9a..ad9d737 100644
--- a/pages/socert/socert.js
+++ b/pages/socert/socert.js
@@ -67,7 +67,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/user?a=detailself',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
data: {},
@@ -98,7 +98,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/socert?a=listself',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.data.total == 0) {
@@ -106,7 +106,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/socert?a=addspiderself',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
data: {},
@@ -117,7 +117,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/socert?a=listself',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/socert/socertdetail.js b/pages/socert/socertdetail.js
index e552928..e011c95 100644
--- a/pages/socert/socertdetail.js
+++ b/pages/socert/socertdetail.js
@@ -70,7 +70,7 @@ Page({
url: this.data.serverUrl + 'api/socert?a=detail&id=' + id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
diff --git a/pages/suggest/add.js b/pages/suggest/add.js
index 1473f1f..23d92d0 100644
--- a/pages/suggest/add.js
+++ b/pages/suggest/add.js
@@ -79,7 +79,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: getApp().globalData.serverUrl + 'upfile',
filePath: that.data.jyimg[x],
@@ -115,7 +115,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/suggest?a=add',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: jydata,
@@ -146,7 +146,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=32&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/suggest/detail.js b/pages/suggest/detail.js
index fb9f491..efa193b 100644
--- a/pages/suggest/detail.js
+++ b/pages/suggest/detail.js
@@ -88,7 +88,7 @@ Page({
url: this.data.serverUrl + 'api/suggest?a=detail&jyid=' + jyid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
diff --git a/pages/suggest/suggest.js b/pages/suggest/suggest.js
index 80c98b5..289e5a2 100644
--- a/pages/suggest/suggest.js
+++ b/pages/suggest/suggest.js
@@ -60,20 +60,7 @@ Page({
*/
onShow: function () {
var that = this;
- console.log(that.data.activeIndex)
- if (that.data.activeIndex == 0) {
- that.getmylist(1)
- that.data.mypage = 1
- }
- else if (that.data.activeIndex == 1) {
- that.gettodolist(1)
- that.data.todopage = 1
- }
- else if (that.data.activeIndex == 2) {
- that.getalllist(1)
- this.data.page = 1;
- }
-
+ that.onPullDownRefresh();
},
/**
@@ -148,7 +135,7 @@ Page({
url: this.data.serverUrl + 'api/suggest?a=listall&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -193,7 +180,7 @@ Page({
url: this.data.serverUrl + 'api/suggest?a=listself&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -238,7 +225,7 @@ Page({
url: this.data.serverUrl + 'api/suggest?a=listtodo&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
diff --git a/pages/suggest/update.js b/pages/suggest/update.js
index 9ade9c6..1090551 100644
--- a/pages/suggest/update.js
+++ b/pages/suggest/update.js
@@ -46,7 +46,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: that.data.serverUrl + 'upfile',
filePath: that.data.jyimg2[x],
@@ -157,7 +157,7 @@ Page({
url: this.data.serverUrl + 'api/suggest?a=detail&jyid=' + jyid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
@@ -223,7 +223,7 @@ Page({
url: this.data.serverUrl + 'api/suggest?a=update',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: jydata,
method: 'post',
diff --git a/pages/todo/todo.js b/pages/todo/todo.js
index bc2cf50..8165d02 100644
--- a/pages/todo/todo.js
+++ b/pages/todo/todo.js
@@ -32,7 +32,7 @@ Page({
url: getApp().globalData.serverUrl + 'troublehandle?a=todonum',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/totalrate/index.js b/pages/totalrate/index.js
index d1327bd..90bd340 100644
--- a/pages/totalrate/index.js
+++ b/pages/totalrate/index.js
@@ -1,5 +1,6 @@
// pages/examtest/rate.js
var util = require('../../utils/util.js')
+var sliderWidth = 96;
Page({
/**
@@ -9,13 +10,32 @@ Page({
page: 1,
serverUrl: getApp().globalData.serverUrl,
ratelist: [],
- inputValue:''
+ inputValue:'',
+ tabs: ["个人总排名", "机构总排名"],
+ activeIndex: 0,
+ sliderOffset: 0,
+ sliderLeft: 0
+ },
+ tabClick: function (e) {
+ var that = this
+ that.setData({
+ sliderOffset: e.currentTarget.offsetLeft,
+ activeIndex: e.currentTarget.id
+ });
},
-
/**
* 生命周期函数--监听页面加载
*/
onLoad: function () {
+ var that =this
+ wx.getSystemInfo({
+ success: function (res) {
+ that.setData({
+ sliderLeft: (res.windowWidth / that.data.tabs.length - sliderWidth) / 2,
+ sliderOffset: res.windowWidth / that.data.tabs.length * that.data.activeIndex
+ });
+ }
+ });
},
/**
@@ -30,8 +50,7 @@ Page({
*/
onShow: function () {
var that = this;
- that.getRatelist(1)
- this.data.page = 1;
+ that.getRatelist(that.data.page)
},
/**
@@ -53,9 +72,11 @@ Page({
*/
onPullDownRefresh: function () {
var that = this;
- that.getRatelist(1);
- wx.stopPullDownRefresh();
- this.data.page = 1;
+ if (that.data.activeIndex == 0) {
+ that.getRatelist(1);
+ wx.stopPullDownRefresh();
+ this.data.page = 1;
+ }
},
/**
@@ -63,9 +84,13 @@ Page({
*/
onReachBottom: function () {
//上拉分页,将页码加1,然后调用分页函数
- this.data.page = this.data.page + 1;
- this.getRatelist();
- wx.stopPullDownRefresh();
+ var that = this
+ if (that.data.activeIndex == 0) {
+ this.data.page = this.data.page + 1;
+ this.getRatelist();
+ wx.stopPullDownRefresh();
+ }
+
},
/**
@@ -84,7 +109,7 @@ Page({
url: this.data.serverUrl + 'api/examtestdetail?a=totalrate&rows=20&page=' + page + '&companyid=' + getApp().globalData.userInfo.companyid + '&search=' + that.data.inputValue,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -120,6 +145,9 @@ Page({
})
}
}
+ this.setData({
+ orglist:res.data.rows2
+ })
wx.hideLoading();
}
});
diff --git a/pages/totalrate/index.wxml b/pages/totalrate/index.wxml
index a0f8f50..47a43ff 100644
--- a/pages/totalrate/index.wxml
+++ b/pages/totalrate/index.wxml
@@ -1,44 +1,92 @@
-知识竞赛总排名
-已有
-{{total}}
-人参与 更新时间:{{updatetime}}
-
-
-
-
-
+
+ 知识竞赛总排名
+ 已有
+ {{total}}
+ 人参与 更新时间:{{updatetime}}
-
-
-
-
-
-
-
- {{item.rate}}
-
-
-
-
-
- {{item.user__name}}
+
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+
+
+
+
- 部门: {{item.user__ubelongpart__partname}}
-
- 已参加
- {{item.testnum}}
- 场答题
+
+
-
+
+
+
+
+
+
+
- {{item.totalscore}}分
-
- {{item.totaltookformat}}
+
+ {{item.rate}}
+
+
+
+
+
+ {{item.user__name}}
+
+ 部门: {{item.user__ubelongpart__partname}}
+
+ 已参加
+ {{item.testnum}}
+ 场答题
+
+
+
+
+ {{item.totalscore}}分
+
+ {{item.totaltookformat}}
+ 场均{{item.avgscore}}分
+
+
+
+
+
+
+
+
+
+ {{index+1}}
+
+ {{item.user__ubelongpart__partname}}
+
+ 共
+ {{item.totaluser}}
+ 名大神
+ 参加了
+ {{item.totaltest}}
+ 场答题
+
+
+
+
+ 场均:{{item.avgscore}}分
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/pages/totalrate/index.wxss b/pages/totalrate/index.wxss
index 370e418..3b6c237 100644
--- a/pages/totalrate/index.wxss
+++ b/pages/totalrate/index.wxss
@@ -2,6 +2,8 @@
color:#fff;
background-color: cornflowerblue;
text-align: center;
+ height:60px;
+ width:100%
}
.search
{
@@ -20,4 +22,13 @@
.search input
{
padding-left:30rpx;
+}
+.index{
+ color:#fff;
+ background-color: darkslateblue;
+ border-radius: 6px;
+ width:30px;
+ justify-content: center;
+ align-items: center;
+ text-align: center
}
\ No newline at end of file
diff --git a/pages/train/add.js b/pages/train/add.js
index dc72c3e..b9681f4 100644
--- a/pages/train/add.js
+++ b/pages/train/add.js
@@ -49,7 +49,7 @@ Page({
url: getApp().globalData.serverUrl + 'getdickey?dicclass=' + this.data.pxjb + '&a=combobox',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
success: res => {
@@ -77,7 +77,7 @@ Page({
url: getApp().globalData.serverUrl + 'getdickey?dicclass=8&a=combobox',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
success: res => {
@@ -94,7 +94,7 @@ Page({
url: getApp().globalData.serverUrl + 'getdickey?dicclass=9&a=combobox',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
success: res => {
@@ -111,7 +111,7 @@ Page({
url: getApp().globalData.serverUrl + 'getdicclass?dicid=4',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
success: res => {
@@ -300,7 +300,7 @@ Page({
url: getApp().globalData.serverUrl + 'addtrain',
header: {
'content-type': 'application/x-www-form-urlencoded', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: pxdata,
diff --git a/pages/train/check.js b/pages/train/check.js
index f7f20b7..6509b51 100644
--- a/pages/train/check.js
+++ b/pages/train/check.js
@@ -49,7 +49,7 @@ Page({
url: getApp().globalData.serverUrl + 'pxhandle?a=detail&trainid=' + id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -73,7 +73,7 @@ Page({
url: getApp().globalData.serverUrl + 'pxhandle?a=check&trainid=' + this.data.pxid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/train/detail.js b/pages/train/detail.js
index 01ad89f..b5fb959 100644
--- a/pages/train/detail.js
+++ b/pages/train/detail.js
@@ -114,7 +114,7 @@ Page({
url: this.data.serverUrl + 'pxhandle?a=detail&trainid=' + id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/train/qrcode.js b/pages/train/qrcode.js
index 21b88be..f8506b4 100644
--- a/pages/train/qrcode.js
+++ b/pages/train/qrcode.js
@@ -46,7 +46,7 @@ Page({
url: getApp().globalData.serverUrl + 'pxhandle?a=detail&trainid=' + id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/train/train.js b/pages/train/train.js
index a0aacac..ea66719 100644
--- a/pages/train/train.js
+++ b/pages/train/train.js
@@ -40,7 +40,7 @@ Page({
url: this.data.serverUrl + 'pxhandle?a=listall&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -85,7 +85,7 @@ Page({
url: this.data.serverUrl + 'pxhandle?a=listtodo&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -130,7 +130,7 @@ Page({
url: this.data.serverUrl + 'pxhandle?a=listcj&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -183,37 +183,23 @@ Page({
},
onShow: function () {
var that = this;
- console.log(that.data.activeIndex)
- if (that.data.activeIndex == 0) {
- that.getfqpxlist(1)
- that.data.fqpage = 1
- }
- else if (that.data.activeIndex == 1) {
- that.getcjpxlist(1)
- that.data.cjpage = 1
- }
- else if (that.data.activeIndex == 2) {
- that.getallpxlist(1)
- that.data.page = 1
- }
+ that.onPullDownRefresh()
},
onPullDownRefresh: function () {
var that = this;
if (that.data.activeIndex == 0) {
that.getfqpxlist(1)
- wx.stopPullDownRefresh();
that.data.fqpage = 1
}
else if (that.data.activeIndex == 1) {
that.getcjpxlist(1)
- wx.stopPullDownRefresh();
that.data.cjpage = 1
}
else if (that.data.activeIndex == 2) {
that.getallpxlist(1)
- wx.stopPullDownRefresh();
that.data.page = 1
}
+ wx.stopPullDownRefresh();
},
onReachBottom: function () {
//上拉分页,将页码加1,然后调用分页函数
diff --git a/pages/trouble/accesstrouble.js b/pages/trouble/accesstrouble.js
index db02710..601eb6e 100644
--- a/pages/trouble/accesstrouble.js
+++ b/pages/trouble/accesstrouble.js
@@ -107,7 +107,7 @@ Page({
url: this.data.serverUrl + 'getyh?troubleid=' + troubleid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -131,7 +131,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=19&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -148,7 +148,7 @@ Page({
url: this.data.serverUrl + 'getdicclass?dicid=15',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -165,7 +165,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=16&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -179,7 +179,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=17&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -299,7 +299,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: that.data.serverUrl + 'upfile',
filePath: that.data.zghtp[x],
@@ -342,7 +342,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: that.data.serverUrl + 'upfile',
filePath: that.data.yhtp[x],
@@ -378,7 +378,7 @@ Page({
url: that.data.serverUrl + 'addyh',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: that.data,
@@ -398,7 +398,7 @@ Page({
url: that.data.serverUrl + 'accessyh',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: that.data,
diff --git a/pages/trouble/addtrouble.js b/pages/trouble/addtrouble.js
index b2ef146..a42a023 100644
--- a/pages/trouble/addtrouble.js
+++ b/pages/trouble/addtrouble.js
@@ -109,7 +109,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: that.data.serverUrl + 'upfile',
filePath: that.data.yhtp[x],
@@ -230,7 +230,7 @@ Page({
url: this.data.serverUrl + 'addyh',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method:'POST',
data: this.yhdata,
@@ -244,7 +244,7 @@ Page({
url: this.data.serverUrl + 'api/inspect?a=add',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: inspectdata,
@@ -267,7 +267,7 @@ Page({
url: this.data.serverUrl + 'api/risktask?a=checktrouble',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: data,
@@ -323,7 +323,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=18&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -343,7 +343,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=14&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/trouble/addtroublezg.js b/pages/trouble/addtroublezg.js
index d430077..cd5f248 100644
--- a/pages/trouble/addtroublezg.js
+++ b/pages/trouble/addtroublezg.js
@@ -105,7 +105,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: that.data.serverUrl + 'upfile',
filePath: that.data.yhtp[x], //全局变量取值
@@ -137,7 +137,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: that.data.serverUrl + 'upfile',
filePath: that.data.zghtp[x],
@@ -181,7 +181,7 @@ Page({
url: this.data.serverUrl + 'addyh',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: this.yhdata,
@@ -195,7 +195,7 @@ Page({
url: this.data.serverUrl + 'api/inspect?a=add',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: inspectdata,
@@ -218,7 +218,7 @@ Page({
url: this.data.serverUrl + 'api/risktask?a=checktrouble',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: data,
@@ -294,7 +294,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=19&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -312,7 +312,7 @@ Page({
url: this.data.serverUrl + 'getdicclass?dicid=15',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -330,7 +330,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=16&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -344,7 +344,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=17&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/trouble/addtroublezp.js b/pages/trouble/addtroublezp.js
index d8e8312..db0b7d1 100644
--- a/pages/trouble/addtroublezp.js
+++ b/pages/trouble/addtroublezp.js
@@ -96,7 +96,7 @@ Page({
wx.uploadFile({
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
url: that.data.serverUrl + 'upfile',
filePath: that.data.yhtp[x], //全局变量取值
@@ -141,7 +141,7 @@ Page({
url: this.data.serverUrl + 'addyh',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: this.yhdata,
@@ -155,7 +155,7 @@ Page({
url: this.data.serverUrl + 'api/inspect?a=add',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: inspectdata,
@@ -178,7 +178,7 @@ Page({
url: this.data.serverUrl + 'api/risktask?a=checktrouble',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: data,
@@ -249,7 +249,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=19&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -267,7 +267,7 @@ Page({
url: this.data.serverUrl + 'getdicclass?dicid=15',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -285,7 +285,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=16&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -299,7 +299,7 @@ Page({
url: this.data.serverUrl + 'getdickey?dicclass=17&a=combobox',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/trouble/trouble.js b/pages/trouble/trouble.js
index 9e90cc1..6a5410d 100644
--- a/pages/trouble/trouble.js
+++ b/pages/trouble/trouble.js
@@ -39,7 +39,7 @@ Page({
url: this.data.serverUrl +'troublehandle?a=listall&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -84,7 +84,7 @@ Page({
url: this.data.serverUrl + 'troublehandle?a=listself&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -129,7 +129,7 @@ Page({
url: this.data.serverUrl + 'troublehandle?a=listtodo&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
@@ -180,19 +180,7 @@ Page({
},
onShow:function(){
var that = this;
- console.log(that.data.activeIndex)
- if(that.data.activeIndex==0){
- that.getmyYhlist(1)
- that.data.mypage=1
- }
- else if (that.data.activeIndex == 1){
- that.gettodoYhlist(1)
- that.data.todopage=1
- }
- else if (that.data.activeIndex == 2){
- that.getallYhlist(1)
- that.data.page=1
- }
+ that.onPullDownRefresh();
},
onPullDownRefresh: function () {
var that = this;
diff --git a/pages/trouble/troubledetail.js b/pages/trouble/troubledetail.js
index cecf5b5..b9ab2b1 100644
--- a/pages/trouble/troubledetail.js
+++ b/pages/trouble/troubledetail.js
@@ -16,7 +16,7 @@ Page({
url: this.data.serverUrl+'troublehandle?a=detail&troubleid=' + troubleid,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {
},
diff --git a/pages/trouble/troubletodo.js b/pages/trouble/troubletodo.js
index 12a32cb..e1cee70 100644
--- a/pages/trouble/troubletodo.js
+++ b/pages/trouble/troubletodo.js
@@ -15,7 +15,7 @@ Page({
url: this.data.serverUrl + 'troublehandle?a=listtodo&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/pages/user/userdetail.js b/pages/user/userdetail.js
index 7378cb9..8905111 100644
--- a/pages/user/userdetail.js
+++ b/pages/user/userdetail.js
@@ -87,7 +87,7 @@ Page({
url: this.data.serverUrl + 'api/user?a=detailself',
header: {
'content-type': 'application/x-www-form-urlencoded', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method:'GET',
data: {
@@ -121,7 +121,7 @@ Page({
url: getApp().globalData.serverUrl + 'unbindmp',
header: {
'content-type': 'application/json', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
success: res => {
@@ -153,7 +153,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/user?a=editself',
header: {
'content-type': 'application/x-www-form-urlencoded', //
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'POST',
data: userdata,
@@ -166,7 +166,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/socert?a=addspiderself',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
method: 'GET',
data: {},
diff --git a/pages/userSelect/userSelect.js b/pages/userSelect/userSelect.js
index aec9252..2f07103 100644
--- a/pages/userSelect/userSelect.js
+++ b/pages/userSelect/userSelect.js
@@ -28,7 +28,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/partuser?a=getall&parentid=company',
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
@@ -120,7 +120,7 @@ Page({
url: getApp().globalData.serverUrl + 'api/partuser?a=getall&parentid='+item.id,
header: {
'content-type': 'application/json', // 默认值
- 'Cookie': wx.getStorageSync("sessionid"),
+ 'Cookie': getApp().globalData.sessionId,
},
data: {},
success: res => {
diff --git a/utils/dict.js b/utils/dict.js
index 315483c..b276e8a 100644
--- a/utils/dict.js
+++ b/utils/dict.js
@@ -1,5 +1,5 @@
var serverUrl = getApp().globalData.serverUrl
-var cookie = wx.getStorageSync("sessionid")
+var cookie = getApp().globalData.sessionId
function getyhdj(){
wx.request({
url: serverUrl + 'getdickey?dicclass=18&a=combobox',