Ver código fonte

优化

master
yujk 3 anos atrás
pai
commit
05bbd59cf7
4 arquivos alterados com 8 adições e 6 exclusões
  1. +4
    -4
      pages/apply/approval/approval.js
  2. +1
    -0
      pages/index/index.js
  3. +1
    -1
      pages/index/index.wxml
  4. +2
    -1
      pages/index/index.wxss

+ 4
- 4
pages/apply/approval/approval.js Ver arquivo

@@ -44,6 +44,7 @@ Page({
], ],
//事务总表对象 //事务总表对象
item:{}, item:{},
detpId:187,
itemId:13, itemId:13,
active:0, active:0,
result:[], result:[],
@@ -62,8 +63,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.setData({itemId:options.id});
console.log(options)
this.setData({itemId:options.id,deptId:options.deptId});
//this.getApprovalItemList(); //this.getApprovalItemList();
this.groupList(); this.groupList();
this.townList(); this.townList();
@@ -256,7 +256,7 @@ Page({
}, },
groupList:function(){ groupList:function(){
let data = { let data = {
deptId : 187,
deptId : this.data.deptId,
deptLevel:1 deptLevel:1
} }
UTIL.httpRequest(API.URL_GET_USERLIST,data ,{ UTIL.httpRequest(API.URL_GET_USERLIST,data ,{
@@ -270,7 +270,7 @@ Page({
}, },
villageList:function(){ villageList:function(){
let data = { let data = {
deptId : 187,
deptId : this.data.deptId,
deptLevel:2 deptLevel:2
} }
UTIL.httpRequest(API.URL_GET_USERLIST,data ,{ UTIL.httpRequest(API.URL_GET_USERLIST,data ,{


+ 1
- 0
pages/index/index.js Ver arquivo

@@ -276,6 +276,7 @@ Page({
success: (res) => { success: (res) => {
if (res.code == API.SUCCESS_CODE) { if (res.code == API.SUCCESS_CODE) {
this.setData({userInfoObj:res.user}) this.setData({userInfoObj:res.user})
console.log(res.user);
this.setData({region:res.user.deptName}) this.setData({region:res.user.deptName})
this.setData({item:JSON.stringify(res.user)}) this.setData({item:JSON.stringify(res.user)})
this.getBookList() this.getBookList()


+ 1
- 1
pages/index/index.wxml Ver arquivo

@@ -11,7 +11,7 @@
<text class="name">{{userInfoObj.nickName}}</text> <text class="name">{{userInfoObj.nickName}}</text>
<view class="jobs"> <view class="jobs">
<view class="icon" style="background:url('../../image/index/header_job.png') no-repeat; background-size: 100% 100%;"></view> <view class="icon" style="background:url('../../image/index/header_job.png') no-repeat; background-size: 100% 100%;"></view>
{{userInfoObj.remark}}
{{userInfoObj.roles.length>0?userInfoObj.roles[0].roleName:""}}
</view> </view>
</view> </view>
<view class="task_wrap "> <view class="task_wrap ">


+ 2
- 1
pages/index/index.wxss Ver arquivo

@@ -39,7 +39,7 @@
} }
.information_header .name_wrap .jobs{ .information_header .name_wrap .jobs{
margin-left: 18rpx; margin-left: 18rpx;
width: 155rpx;
/* width: 155rpx; */
height: 40rpx; height: 40rpx;
background: #5bae75; background: #5bae75;
border:2rpx solid #2c8e68; border:2rpx solid #2c8e68;
@@ -49,6 +49,7 @@
font-size: 28rpx; font-size: 28rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 0 20rpx;
} }
.information_header .name_wrap .jobs .icon{ .information_header .name_wrap .jobs .icon{
width: 26rpx; width: 26rpx;


Carregando…
Cancelar
Salvar