diff --git a/pages/apply/approval/approval.js b/pages/apply/approval/approval.js index 7553c2f..5db9ee3 100644 --- a/pages/apply/approval/approval.js +++ b/pages/apply/approval/approval.js @@ -44,6 +44,7 @@ Page({ ], //事务总表对象 item:{}, + detpId:187, itemId:13, active:0, result:[], @@ -62,8 +63,8 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - this.setData({itemId:options.id}); - console.log(options) + this.setData({itemId:options.id,deptId:options.deptId}); + console.log(options); //this.getApprovalItemList(); this.groupList(); this.townList(); @@ -87,7 +88,8 @@ Page({ let d = { templateId : _this.data.item.templateId, orderByColumn:"id", - isAsc:"asc" + isAsc:"asc", + method:"GET" } UTIL.httpRequest(API.URL_GET_TEMPLATEDETAIL, d, { success: (r) => { @@ -168,7 +170,8 @@ Page({ let data={ dataType:0, pageNum:1, - pageSize:50 + pageSize:50, + method:"GET" } UTIL.httpRequest(API.URL_GET_TEMPLATELIST, data, { success: (res) => { @@ -178,7 +181,8 @@ Page({ let d = { templateId : res.rows[0].id, orderByColumn:"id", - isAsc:"asc" + isAsc:"asc", + method:"GET" } UTIL.httpRequest(API.URL_GET_TEMPLATEDETAIL, d, { success: (r) => { @@ -201,7 +205,8 @@ Page({ let data = { templateId : e.currentTarget.dataset.id, orderByColumn:"id", - isAsc:"asc" + isAsc:"asc", + method:"GET" } UTIL.httpRequest(API.URL_GET_TEMPLATEDETAIL, data, { success: (res) => { @@ -241,7 +246,8 @@ Page({ success: function (response) { let d = { deptId:response.data.data.deptId, - deptLevel:3 + deptLevel:3, + method:"GET" } UTIL.httpRequest(API.URL_GET_USERLIST,d,{ success: (res) => { @@ -256,8 +262,9 @@ Page({ }, groupList:function(){ let data = { - deptId : 187, - deptLevel:1 + deptId : this.data.deptId, + deptLevel:1, + method:"GET" } UTIL.httpRequest(API.URL_GET_USERLIST,data ,{ success: (res) => { @@ -270,8 +277,9 @@ Page({ }, villageList:function(){ let data = { - deptId : 187, - deptLevel:2 + deptId : this.data.deptId, + deptLevel:2, + method:"GET" } UTIL.httpRequest(API.URL_GET_USERLIST,data ,{ success: (res) => { diff --git a/pages/index/index.js b/pages/index/index.js index 658e255..bc778a6 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -275,6 +275,7 @@ Page({ success: (res) => { if (res.code == API.SUCCESS_CODE) { this.setData({userInfoObj:res.user}) + console.log(res.user); this.setData({region:res.user.deptName}) this.setData({item:JSON.stringify(res.user)}) this.getBookList() @@ -306,7 +307,8 @@ Page({ /* 获取账套*/ getBookList:function(){ let d = { - loginDeptID : this.data.userInfoObj.loginDeptId + loginDeptID : this.data.userInfoObj.loginDeptId, + method:'GET' } UTIL.httpRequest(API.URL_GET_BOOKLISTBYDEPTID,d, { success: (res) => { @@ -332,7 +334,8 @@ Page({ bookName:this.data.bookList[e.detail.value].bookName }) let data={ - loginBookId:this.data.bookList[e.detail.value].id + loginBookId:this.data.bookList[e.detail.value].id, + method:'GET' } let _this = this UTIL.httpRequest(API.URL_GET_CHANGEBOOK,data, { @@ -454,7 +457,8 @@ Page({ bookId:"" }, () => { let data={ - loginDeptID : this.getRegionId('areas') + loginDeptID : this.getRegionId('areas'), + method:'GET' } let _this = this UTIL.httpRequest(API.URL_GET_CHANGEDEPT,data, { diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 95bc8ab..e9a05d9 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -11,7 +11,7 @@ {{userInfoObj.nickName}} - {{userInfoObj.remark}} + {{userInfoObj.roles.length>0?userInfoObj.roles[0].roleName:""}} diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 658e029..4e8c525 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -39,7 +39,7 @@ } .information_header .name_wrap .jobs{ margin-left: 18rpx; - width: 155rpx; + /* width: 155rpx; */ height: 40rpx; background: #5bae75; border:2rpx solid #2c8e68; @@ -49,6 +49,7 @@ font-size: 28rpx; justify-content: center; align-items: center; + padding: 0 20rpx; } .information_header .name_wrap .jobs .icon{ width: 26rpx; diff --git a/pages/user/login/login.js b/pages/user/login/login.js index d6664f8..cfac6e0 100644 --- a/pages/user/login/login.js +++ b/pages/user/login/login.js @@ -134,6 +134,7 @@ Page({ openId:STORAGE.getOpenId(), phonenumber:phone } + console.log(STORAGE.getOpenId()); UTIL.httpRequestNoneDetal(API.URL_POST_USERBAND, sendData,"POST",{ success: (res) => { if (res.code == API.SUCCESS_CODE) {