Browse Source

bug调试

yanym 5 years ago
parent
commit
6061cac7cb

+ 7 - 0
dorm-manager-wx/pages/teacher/facephoto/facephoto.js

@@ -9,6 +9,7 @@ Page({
    * 页面的初始数据
    */
   data: {
+    apiTotal: '',
     userInfo: '',
     isregiste: true,
     arrayCollege: [],
@@ -48,12 +49,14 @@ Page({
     this.setData({
       indexDept: e.detail.value
     })
+    this.getDeptInfo();
   },
 
   pickerChangeClass: function(e) {
     this.setData({
       indexClass: e.detail.value
     })
+    this.getDeptInfo();
   },
 
   getCollegeInfo: function(e) {
@@ -104,6 +107,7 @@ Page({
         that.setData({
           arrayDept: arrayDept
         })
+        that.getRegisterInfo();
       }
     })
   },
@@ -127,6 +131,9 @@ Page({
    */
   onLoad: function(options) {
     const that = this;
+    that.setData({
+      apiTotal: api.total
+    })
     that.data.userInfo = wx.getStorageSync('user');
     that.getCollegeInfo();
   },

+ 1 - 1
dorm-manager-wx/pages/teacher/facephoto/facephoto.wxml

@@ -27,7 +27,7 @@
   <scroll-view scroll-y='true'>
     <block wx:for='{{list}}'>
       <view class="list-item" hover-class="myhover" hover-start-time="50" hover-stay-time="50">
-        <image src="{{item.headImage?item.headImage:'/images/default-urser.png'}}" class="head-img"></image>
+        <image src="{{item.headImage?apiTotal+item.headImage:'/images/default-urser.png'}}" class="head-img"></image>
         <view class="my-column my-flex-sb" style="height:150rpx;">
           <view class="name">{{item.userName}}</view>
           <view class="address">

+ 2 - 1
dorm-manager-wx/pages/teacher/visitorcheck/visitorcheck.js

@@ -29,8 +29,9 @@ Page({
 
   todetail: function(e) {
     let id = e.currentTarget.dataset.id;
+    let type = e.currentTarget.dataset.type;
     wx.navigateTo({
-      url: '../visitorcheckdetail/visitorcheckdetail?id=' + id,
+      url: '../visitorcheckdetail/visitorcheckdetail?id=' + id + '&type=' + this.data.isregiste,
     })
   },
 

+ 14 - 2
dorm-manager-wx/pages/teacher/visitorcheckdetail/visitorcheckdetail.js

@@ -9,7 +9,8 @@ Page({
    * 页面的初始数据
    */
   data: {
-    id:'',
+    id: '',
+    type: false,
     userInfo: '',
     list: []
   },
@@ -60,7 +61,14 @@ Page({
       id: that.data.id,
       audit: reject == 'approve' ? true : false
     }, 'post').then(res => {
+      wx.showToast({
+        title: res.data.errmsg,
+      })
+      setTimeout(function() {
+        wx.navigateBack({
 
+        })
+      }, 500)
     })
   },
 
@@ -69,7 +77,11 @@ Page({
    */
   onLoad: function(options) {
     const that = this;
-    that.data.id = options.id;
+    console.log(options.type)
+    that.setData({
+      id: options.id,
+      type: options.type
+    })
     that.getUserInfoArray();
   },
 

+ 1 - 1
dorm-manager-wx/pages/teacher/visitorcheckdetail/visitorcheckdetail.wxml

@@ -9,7 +9,7 @@
       </view>
     </block>
   </view>
-  <view class="btn-item" wx:if='{{}}'>
+  <view class="btn-item" wx:if='{{type=="true"}}'>
     <view class="btn approve" hover-class="myhover" hover-start-time="50" hover-stay-time="50" bindtap="check" data-reject="approve">通过</view>
     <view class="btn reject" hover-class="myhover" hover-start-time="50" hover-stay-time="50" bindtap="check" data-reject="reject">驳回</view>
   </view>

+ 36 - 33
dorm-manager-wx/utils/api.js

@@ -8,8 +8,8 @@ const index = 2,
     clubDetails: 'organize/detail', //  委办局详情
     guidanceDocList: 'items/guidanceDocList', // 服务大厅 办事指南 
     newsDetail: 'news/read', //新闻详情
-    newsList: 'news/list',   //新闻列表
-    allDept:'getAllVillagesDept.if',
+    newsList: 'news/list', //新闻列表
+    allDept: 'getAllVillagesDept.if',
 
     // level: 'getAllDeptByLevel.if', //服务大厅部门类别
     // levelDetail: 'getPreServiceByParam.if', //服务大厅事项列表
@@ -20,9 +20,9 @@ const index = 2,
 
     reservationDetail: 'reservation/getInfo.if', //预约详情	
     reservationCancel: 'reservation/cancel.if', //取消预约
-    reservationSave: 'reservation/save.if',//在线预约
+    reservationSave: 'reservation/save.if', //在线预约
     reservationServiceList: 'getReservationServiceList.if', //可预约部门列表
-    reservationDateStatus: 'reservation/getReservationCount.if',//查询事项某个日期的预约情况
+    reservationDateStatus: 'reservation/getReservationCount.if', //查询事项某个日期的预约情况
     myCase: 'getPreApasinfoListByUserId.if', //我的办件
     // param: 'getPreServiceByParam.if', //事项办理
     caseDetail: 'getPreApasinfoDetails.if', //办件详情
@@ -39,9 +39,9 @@ const index = 2,
     // LevelDetail: 'getPreServiceByParam.if', //服务大厅事项列表
     // Guide: 'getPreServiceByUnid.if',//查询办事详情
     // MyReservation: 'reservation/getPageList.if',//我的预约
-    ReservationDetail: 'reservation/getInfo.if',//预约详情
-    ReservationCancel: 'reservation/cancel.if',//取消预约
-    sendVerifCode: '/sms//sendVerifCode.if',//发送短信验证码
+    ReservationDetail: 'reservation/getInfo.if', //预约详情
+    ReservationCancel: 'reservation/cancel.if', //取消预约
+    sendVerifCode: '/sms//sendVerifCode.if', //发送短信验证码
 
     // Param: 'getPreServiceByParam.if',//事项办理
     // Code: 'getClassificationByCode.if',//证件类型
@@ -50,48 +50,48 @@ const index = 2,
     // UploadImg: 'uploadFile.if',//上传
     // SetImg: 'material/getList',//选择我的材料,材料列表
     // SaveDataName: 'material/save',//保存我的材料,设置材料名称
-    Apasinfo: 'savePreApasinfo.if',//提交在线办理表单
-    UploadAudio: 'getPreServiceByServiceName.if',//语音文件上传
-    HotService: 'getHotServiceList.if',//搜索咨询对象
+    Apasinfo: 'savePreApasinfo.if', //提交在线办理表单
+    UploadAudio: 'getPreServiceByServiceName.if', //语音文件上传
+    HotService: 'getHotServiceList.if', //搜索咨询对象
     // myData: 'material/getList',//我的材料
     // addData: 'material/save',//上传资料
     // deleteData: 'material/delete',//删除材料
-    advisoryList: 'consulting/getListPage',//我的咨询
-    advisoryDetail: 'consulting/getInfo',//咨询详情
+    advisoryList: 'consulting/getListPage', //我的咨询
+    advisoryDetail: 'consulting/getInfo', //咨询详情
 
 
     // new apis
 
-    departments: 'getAllDeptByLevel.if',//部门列表
+    departments: 'getAllDeptByLevel.if', //部门列表
     server: 'getClassificationByCode.if', //根据code得到相应类型
     handles: 'getPreServiceByParam.if', //服务大厅事项列表
     guide: 'getPreServiceByUnid.if',
     getUser: 'user/getUserInfo', //获取用户信息
     updateUser: 'user/updateUserInfo', //更新用户信息
     uploadImg: 'uploadFile.if', //上传图片
-    myMaterial: 'material/getList',//我的材料
-    addMaterial: 'material/save',//上传资料
-    delMaterial: 'material/delete',//删除材料
+    myMaterial: 'material/getList', //我的材料
+    addMaterial: 'material/save', //上传资料
+    delMaterial: 'material/delete', //删除材料
     myReservation: 'reservation/getPageList.if', //我的预约
 
-    addCollect: 'collect/save',//添加收藏
-    delCollect: 'collect/cancel',//删除收藏
+    addCollect: 'collect/save', //添加收藏
+    delCollect: 'collect/cancel', //删除收藏
     myCollection: 'collect/getListByUserId', //我的收藏 
-    verifSmsCode:'sms/verifSmsCode.if',//验证手机验证码是否正确
-    evaluate:'evaluate/save.if',//增加评价
-    evaluateList:'evaluate/list.if',//评价列表
-    evaluateInfo:'evaluate/info.if',//评价详情
+    verifSmsCode: 'sms/verifSmsCode.if', //验证手机验证码是否正确
+    evaluate: 'evaluate/save.if', //增加评价
+    evaluateList: 'evaluate/list.if', //评价列表
+    evaluateInfo: 'evaluate/info.if', //评价详情
 
 
 
 
     // 宿管系统--学生端
-    getAccessInfo: 'access/getAccessInfo.if',//发送短信验证码
-    sendPhoneCode:'visitor/sendPhoneCode.if',//访客申请
-    userLogin:'appletLogin/userLogin.if',//登录
-    selfInfo:'access/selfInfo.if',//访客统计
-    editorAlumniVisitor:'visitor/editorAlumniVisitor.if',//访客申请
-    getUserInfo:'userinfo/getUserInfo.if',//查询用户信息
+    getAccessInfo: 'access/getAccessInfo.if', //发送短信验证码
+    sendPhoneCode: 'visitor/sendPhoneCode.if', //访客申请
+    userLogin: 'appletLogin/userLogin.if', //登录
+    selfInfo: 'access/selfInfo.if', //访客统计
+    editorAlumniVisitor: 'visitor/editorAlumniVisitor.if', //访客申请
+    getUserInfo: 'userinfo/getUserInfo.if', //查询用户信息
 
     //宿管系统--教师端
     getDeptInfo: 'deptInfo/getDeptInfolevel.if', //获取学院信息
@@ -103,12 +103,15 @@ const index = 2,
     getOutAndInInfo: '/access/outAndIn.if', //已出已归记录
     getVisitorInfo: '/visitor/searchInviteVisitor.if', //查询访客详情
     getVisitorCheck: '/visitor/approvalAlumniVisitor.if', //访客信息审批
-    getUnInfo: '/access/unIn.if' //未归记录
+    getUnInfo: '/access/unIn.if', //未归记录
+
+    total: '', //图片拼接域名
   },
-  [oneportal, root] =
-    [["http://192.168.100.234:8080/oneportal/", "https://zhll.dgtis.com/wx/"],
-      ["http://192.168.100.254:9082/wx/", "https://zhll.dgtis.com/wx/"],
-      ["https://dorm.dgtis.com/oneportal/", "http://192.168.100.248:9082/wx/"]][index]
+  [oneportal, root] = [
+    ["http://192.168.100.234:8080/oneportal/", "https://zhll.dgtis.com/wx/"],
+    ["http://192.168.100.254:9082/wx/", "https://zhll.dgtis.com/wx/"],
+    ["https://dorm.dgtis.com/oneportal/", "http://192.168.100.248:9082/wx/"]
+  ][index]
 Object.keys(api).forEach(x => {
   let v = api[x]
   api[x] = `${/\.if$/.test(v) ? oneportal : root}${v}`

+ 4 - 0
dorm-manager-wx/utils/util.js

@@ -131,6 +131,10 @@ function httpRequest(url, data = {}, method = "GET") {
           resolve(res);
         } else {
           console.log('请求失败');
+          wx.showToast({
+            title: res.data.errmsg,
+            icon: 'none'
+          })
         }
       },
       fail: function(res) {