y595705120 3 سال پیش
والد
کامیت
92c3fd2582

+ 1 - 1
app.js

@@ -52,7 +52,7 @@ App({
   },
   checkLogin: function (cb) {
     let userInfo = this.globalData.userInfo
-    if( userInfo && userInfo.uid ){
+    if( userInfo && userInfo.userId ){
       cb && cb( userInfo)
       return;
     }

+ 6 - 3
app.json

@@ -1,12 +1,15 @@
 {
   "pages": [
     "pages/rili/index",
+    "pages/user/visit/index",
+    "pages/user/index/index",
     "pages/search/index",
     "pages/detail/visit/index",
     "pages/detail/out/index",
     "pages/index/index",
-    "pages/user/index/index"
-    
+    "pages/user/out/index",
+    "pages/detail/outList/index",
+    "pages/detail/visitList/index"
   ],
   "tabBar": {
     "color": "#6e6d6b",
@@ -35,4 +38,4 @@
     "backgroundTextStyle": "dark"
   },
   "sitemapLocation": "sitemap.json"
-}
+}

+ 15 - 0
app.wxss

@@ -216,3 +216,18 @@ button::after {
   height:160rpx;
   margin-top:40rpx
 }
+
+.bsmall{
+  margin: 10rpx;
+  padding:0px;
+  text-align: center;
+  vertical-align: middle;
+  touch-action: manipulation;
+  cursor: pointer;
+  background-image: none;
+  white-space: nowrap;
+  user-select: none;
+  font-size: 28rpx;
+  height: 60rpx;
+  min-width: 60rpx;
+}

+ 2 - 2
component/iView/card/index.wxss

@@ -43,14 +43,14 @@
 .i-card-header-title {
   display: inline-block;
   vertical-align: middle;
-  font-size: 14px;
+  font-size: 36rpx;
   color: #1c2438
 }
 
 .i-card-header-extra {
   flex: 1;
   text-align: right;
-  font-size: 14px;
+  font-size: 36rpx;
   color: #80848f
 }
 

+ 83 - 1
component/iView/cell/index.wxss

@@ -1 +1,83 @@
-.i-cell{position:relative;padding:12px 15px;display:flex;background:#fff;align-items:center;line-height:1.4;font-size:14px;overflow:hidden}.i-cell::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px;left:15px;right:0}.i-cell-last::after{display:none}.i-cell-icon{margin-right:5px}.i-cell-icon:empty{display:none}.i-cell-bd{flex:1}.i-cell-text{line-height:24px;font-size:14px}.i-cell-desc{line-height:1.2;font-size:12px;color:#80848f}.i-cell-ft{position:relative;text-align:right;color:#495060}.i-cell-access .i-cell-ft{padding-right:13px}.i-cell-access .i-cell-ft::after{content:" ";display:inline-block;width:6px;height:6px;position:absolute;top:50%;right:2px;border-width:2px 2px 0 0;border-color:#dddee1;border-style:solid;transform:translateY(-50%) matrix(.71,.71,-.71,.71,0,0)}
+.i-cell {
+  position: relative;
+  padding: 24rpx 30rpx;
+  display: flex;
+  background: #fff;
+  align-items: center;
+  line-height: 1.4;
+  font-size: 36rpx;
+  font-family:'FangSong';
+  font-weight: 400;
+  overflow: hidden
+}
+
+.i-cell::after {
+  content: '';
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 200%;
+  height: 200%;
+  transform: scale(.5);
+  transform-origin: 0 0;
+  pointer-events: none;
+  box-sizing: border-box;
+  border: 0 solid #e9eaec;
+  border-bottom-width: 1px;
+  left: 30rpx;
+  right: 0
+}
+
+.i-cell-last::after {
+  display: none
+}
+
+.i-cell-icon {
+  margin-right: 10rpx
+}
+
+.i-cell-icon:empty {
+  display: none
+}
+
+.i-cell-bd {
+  flex: 1
+}
+
+.i-cell-text {
+  line-height: 48rpx;
+  font-size: 36rpx;
+  font-family:'FangSong';
+  font-weight: 600;
+}
+
+.i-cell-desc {
+  line-height: 1.5;
+  font-size: 33rpx;
+  font-family:'FangSong';
+  color: #80848f
+}
+
+.i-cell-ft {
+  position: relative;
+  text-align: right;
+  color: #495060
+}
+
+.i-cell-access .i-cell-ft {
+  padding-right: 26rpx
+}
+
+.i-cell-access .i-cell-ft::after {
+  content: " ";
+  display: inline-block;
+  width: 6px;
+  height: 6px;
+  position: absolute;
+  top: 50%;
+  right: 2px;
+  border-width: 2px 2px 0 0;
+  border-color: #dddee1;
+  border-style: solid;
+  transform: translateY(-50%) matrix(.71, .71, -.71, .71, 0, 0)
+}

+ 129 - 1
component/iView/input/index.wxss

@@ -1 +1,129 @@
-.i-cell{position:relative;padding:12px 15px;display:flex;background:#fff;align-items:center;line-height:1.4;font-size:14px;overflow:hidden}.i-cell::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px;left:15px;right:0}.i-cell-last::after{display:none}.i-cell-icon{margin-right:5px}.i-cell-icon:empty{display:none}.i-cell-bd{flex:1}.i-cell-text{line-height:24px;font-size:14px}.i-cell-desc{line-height:1.2;font-size:12px;color:#80848f}.i-cell-ft{position:relative;text-align:right;color:#495060}.i-cell-access .i-cell-ft{padding-right:13px}.i-cell-access .i-cell-ft::after{content:" ";display:inline-block;width:6px;height:6px;position:absolute;top:50%;right:2px;border-width:2px 2px 0 0;border-color:#dddee1;border-style:solid;transform:translateY(-50%) matrix(.71,.71,-.71,.71,0,0)}.i-input{padding:7px 15px;color:#495060}.i-input-wrapped{margin:10px 15px;background-color:#fff}.i-input-wrapped::after{left:0;border-width:1px;border-radius:4px}.i-input-error{color:#ed3f14}.i-input-title{color:#495060;min-width:65px;padding-right:10px}.i-input-input{flex:1;line-height:1.6;padding:4px 0;min-height:22px;height:auto;font-size:14px}.i-input-placeholder{font-size:14px}.i-input-input-right{text-align:right}.i-input.i-input-wrapped::after{display:block}.i-input-wrapped.i-input-error::after{border-color:#ed3f14}
+.i-cell {
+  position: relative;
+  padding: 24rpx 30rpx;
+  display: flex;
+  background: #fff;
+  align-items: center;
+  line-height: 1.4;
+  font-size: 28rpx;
+  overflow: hidden
+}
+
+.i-cell::after {
+  content: '';
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 200%;
+  height: 200%;
+  transform: scale(.5);
+  transform-origin: 0 0;
+  pointer-events: none;
+  box-sizing: border-box;
+  border: 0 solid #e9eaec;
+  border-bottom-width: 1px;
+  left: 15px;
+  right: 0
+}
+
+.i-cell-last::after {
+  display: none
+}
+
+.i-cell-icon {
+  margin-right: 5px
+}
+
+.i-cell-icon:empty {
+  display: none
+}
+
+.i-cell-bd {
+  flex: 1
+}
+
+.i-cell-text {
+  line-height: 24px;
+  font-size: 14px
+}
+
+.i-cell-desc {
+  line-height: 1.2;
+  font-size: 12px;
+  color: #80848f
+}
+
+.i-cell-ft {
+  position: relative;
+  text-align: right;
+  color: #495060
+}
+
+.i-cell-access .i-cell-ft {
+  padding-right: 13px
+}
+
+.i-cell-access .i-cell-ft::after {
+  content: " ";
+  display: inline-block;
+  width: 6px;
+  height: 6px;
+  position: absolute;
+  top: 50%;
+  right: 2px;
+  border-width: 2px 2px 0 0;
+  border-color: #dddee1;
+  border-style: solid;
+  transform: translateY(-50%) matrix(.71, .71, -.71, .71, 0, 0)
+}
+
+.i-input {
+  padding: 7px 15px;
+  color: #495060
+}
+
+.i-input-wrapped {
+  margin: 20rpx 30rpx;
+  background-color: #fff
+}
+
+.i-input-wrapped::after {
+  left: 0;
+  border-width: 1px;
+  border-radius: 4px
+}
+
+.i-input-error {
+  color: #ed3f14
+}
+
+.i-input-title {
+  color: #495060;
+  min-width: 65px;
+  padding-right: 10px
+}
+
+.i-input-input {
+  flex: 1;
+  line-height: 1.6;
+  padding: 4px 0;
+  min-height: 22px;
+  height: auto;
+  font-size: 14px
+}
+
+.i-input-placeholder {
+  font-size: 14px
+}
+
+.i-input-input-right {
+  text-align: right
+}
+
+.i-input.i-input-wrapped::after {
+  display: block
+}
+
+.i-input-wrapped.i-input-error::after {
+  border-color: #ed3f14
+}

+ 1 - 1
pages/detail/out/index.wxml

@@ -4,7 +4,7 @@
 <i-cell-group i-class="my-group-margin" style="width:400rpx">  
   <i-cell title="姓名"  value="{{info.username}}"></i-cell>
   <i-cell title="职务"  value="{{info.post}}"></i-cell>
-  <i-cell title="外出事由"  value="{{info.reasons}}"></i-cell>
+  <i-cell title="外出事由"  label="{{info.reasons}}"></i-cell>
   <i-cell title="时间"  value="{{info.fromDate}} 到 {{info.toDate}}"></i-cell>
   <i-cell title="签批人1"  value="{{info.signName}}"></i-cell>
   <i-cell title="签批人2"  value="{{info.signConfirm}}"></i-cell>

+ 29 - 0
pages/detail/outList/index.js

@@ -0,0 +1,29 @@
+const app = getApp()
+Page({
+  data: {
+    tableData: [],
+    logId:0
+  },
+  onLoad: function(options) {
+    let logId = +options.logId||0;
+    this.setData({logId})
+    app.checkLogin( userInfo =>{
+      this.loadData()
+    })
+  },
+  onPullDownRefresh() {
+    this.loadData()
+  },
+  gotoDetail( e ){
+  },
+  loadData: function() {
+    let logId = this.data.logId;
+    app.formPost('User.getImportOutList', {logId} ).then(res => {
+      if (res.code === 200) {
+        this.setData({
+          tableData: res.data||[]
+        });
+      }
+    })
+  }
+})

+ 6 - 0
pages/detail/outList/index.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "i-cell-group": "/component/iView/cell-group/index",
+    "i-cell": "/component/iView/cell/index"
+  }
+}

+ 13 - 0
pages/detail/outList/index.wxml

@@ -0,0 +1,13 @@
+<view style="overflow:hidden;margin: 10rpx 32rpx;">
+  <view class="card-wrapper" wx:for="{{tableData}}" wx:key="index" style="margin-top:20rpx">
+    <i-cell-group i-class="my-group-margin" style="width:400rpx">
+      <i-cell title="姓名" value="{{item.username}}"></i-cell>
+      <i-cell title="职务" value="{{item.post}}"></i-cell>
+      <i-cell title="外出事由" label="{{item.reasons}}"></i-cell>
+      <i-cell title="时间" value="{{item.fromDate}} 到 {{info.toDate}}"></i-cell>
+      <i-cell title="签批人1" value="{{item.signName}}"></i-cell>
+      <i-cell title="签批人2" value="{{item.signConfirm}}"></i-cell>
+      <i-cell title="导入时间" value="{{item.createAt}}"></i-cell>
+    </i-cell-group>
+  </view>
+</view>

+ 1 - 0
pages/detail/outList/index.wxss

@@ -0,0 +1 @@
+/* pages/detail/outList/index.wxss */

+ 10 - 11
pages/detail/visit/index.wxml

@@ -1,14 +1,13 @@
 
 <view>
-
-<i-cell-group i-class="my-group-margin" style="width:400rpx">  
-  <i-cell title="姓名"  value="{{info.username}}"></i-cell>
-  <i-cell title="职务"  value="{{info.post}}"></i-cell>
-  <i-cell title="行程概要"  label="{{info.tripSummary}}"></i-cell>
-  <i-cell title="行程周期"  value="{{info.fromDate}} 到 {{info.toDate}}"></i-cell>
-  <i-cell title="陪同情况"  value="{{info.accompany}}"></i-cell>
-  <i-cell title="来文日期"  value="{{info.recvDate}}"></i-cell>
-  <i-cell title="拟办意见"  value="{{info.marks||'-'}}"></i-cell>
-  <i-cell title="导入时间"  value="{{info.createAt}}"></i-cell>
-</i-cell-group>
+  <i-cell-group i-class="my-group-margin" style="width:400rpx;font-size:20rpx">  
+    <i-cell title="姓名"  value="{{info.username}}"></i-cell>
+    <i-cell title="职务"  value="{{info.post}}"></i-cell>
+    <i-cell title="行程概要"  label="{{info.tripSummary}}"></i-cell>
+    <i-cell title="行程周期"  value="{{info.fromDate}} 到 {{info.toDate}}"></i-cell>
+    <i-cell title="陪同情况"  value="{{info.accompany}}"></i-cell>
+    <i-cell title="来文日期"  value="{{info.recvDate}}"></i-cell>
+    <i-cell title="拟办意见"  value="{{info.marks||'-'}}"></i-cell>
+    <i-cell title="导入时间"  value="{{info.createAt}}"></i-cell>
+  </i-cell-group>
 </view>

+ 29 - 0
pages/detail/visitList/index.js

@@ -0,0 +1,29 @@
+const app = getApp()
+Page({
+  data: {
+    tableData: [],
+    logId:0
+  },
+  onLoad: function(options) {
+    let logId = +options.logId||0;
+    this.setData({logId})
+    app.checkLogin( userInfo =>{
+      this.loadData()
+    })
+  },
+  onPullDownRefresh() {
+    this.loadData()
+  },
+  gotoDetail( e ){
+  },
+  loadData: function() {
+    let logId = this.data.logId;
+    app.formPost('User.getImportVisitList', {logId} ).then(res => {
+      if (res.code === 200) {
+        this.setData({
+          tableData: res.data||[]
+        });
+      }
+    })
+  }
+})

+ 6 - 0
pages/detail/visitList/index.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "i-cell-group": "/component/iView/cell-group/index",
+    "i-cell": "/component/iView/cell/index"
+  }
+}

+ 14 - 0
pages/detail/visitList/index.wxml

@@ -0,0 +1,14 @@
+<view style="overflow:hidden;margin: 10rpx 32rpx;">
+  <view class="card-wrapper" wx:for="{{tableData}}" wx:key="index" style="margin-top:20rpx" >
+    <i-cell-group i-class="my-group-margin">  
+      <i-cell title="姓名"  value="{{item.username}}"></i-cell>
+      <i-cell title="职务"  value="{{item.post}}"></i-cell>
+      <i-cell title="行程概要"  label="{{item.tripSummary}}"></i-cell>
+      <i-cell title="行程周期"  value="{{item.fromDate}} 到 {{item.toDate}}"></i-cell>
+      <i-cell title="陪同情况"  value="{{item.accompany}}"></i-cell>
+      <i-cell title="来文日期"  value="{{item.recvDate}}"></i-cell>
+      <i-cell title="拟办意见"  value="{{item.marks||'-'}}"></i-cell>
+      <i-cell title="导入时间"  value="{{item.createAt}}"></i-cell>
+    </i-cell-group>
+  </view>
+</view>

+ 1 - 0
pages/detail/visitList/index.wxss

@@ -0,0 +1 @@
+/* pages/detail/visitList/index.wxss */

+ 5 - 5
pages/index/index.wxss

@@ -2,7 +2,7 @@
 
 .caption-wrap {
   background-color: white;
-  margin-top: 15px;
+  margin-top: 30rpx;
 }
 
 .caption-title {
@@ -12,12 +12,12 @@
 }
 
 .index-collapse {
-  font-size: 14px;
-  line-height: 24px;
+  font-size: 28rpx;
+  line-height: 28rpx;
 }
 
 .index-collapse-item {
-  padding: 8px 15px !important;
+  padding: 16rpx 30rpx !important;
   border: 0px !important;
 }
 
@@ -27,7 +27,7 @@
 }
 
 .index-cell {
-  padding: 5px 15px !important;
+  padding: 10rpx 30rpx !important;
 }
 
 .login-form{

+ 23 - 17
pages/user/index/index.js

@@ -5,26 +5,22 @@ Page({
   data: {
     spinShow: false,
     userInfo:{},
+    out:0, 
+    visit:0
   },
   onShow: function () {
-    app.checkLogin( userInfo=>{
+    app.checkLogin( userInfo =>{
       this.setData({userInfo})
-    } )
-  },
-  doLoginByCode( code ){
-    app.formPost( "Auth.WxLoginByCode", {code}).then( (res)=>{
-      if( res.code == 200){
-        this.setData( {userInfo: res.data})
-        app.setUserInfo( res.data )
+      if( userInfo.adminId >0){
+        this.loadConfirm()
       }
     })
   },
-  doGetPhoneNumber( code, iv, encryptedData ){
-    let param = {code, iv, encryptedData }
-    app.formPost( "Auth.WxLoginByPhone", param).then( (res)=>{
-      if( res.code == 200){
-        this.setData( {userInfo: res.data})
-        app.setUserInfo( res.data )
+  loadConfirm(){
+    app.formPost('User.confirmInfo', {} ).then(res => {
+      if (res.code === 200) {
+        let {out, visit} = res.data;
+        this.setData({out, visit});
       }
     })
   },
@@ -41,10 +37,20 @@ Page({
     this.setData({userInfo})
     app.setUserInfo( userInfo )
   },
-  gotoFileList( e  ){
-    let api = e.currentTarget.dataset.api;
+  gotoConfirmOut( e  ){
+    if( this.data.userInfo.adminId==0){
+      return;
+    }
+    wx.navigateTo({
+      url: `/pages/user/out/index`,
+    })
+  },
+  gotoConfirmVisit( e  ){
+    if( this.data.userInfo.adminId==0){
+      return;
+    }
     wx.navigateTo({
-      url: `/pages/user/filelist/index?api=${api}`,
+      url: `/pages/user/visit/index`,
     })
   }
 })

+ 2 - 2
pages/user/index/index.wxml

@@ -21,11 +21,11 @@
 <view>
   <i-cell-group i-class="my-group-margin">
 
-    <i-cell title="预留功能1" is-link bindtap="gotoFileList" data-api="getViewArticalList">
+    <i-cell title="审核莅临" is-link bindtap="gotoConfirmVisit" value="{{visit||''}}" >
       <i-icon type="mine_fill" slot="icon" size="20" />
     </i-cell>
 
-    <i-cell title="预留功能2" is-link bindtap="gotoFileList" data-api="getViewArticalList">
+    <i-cell title="审核外出" is-link bindtap="gotoConfirmOut" value="{{out||''}}">
       <i-icon type="shop_fill" slot="icon" size="20" />
     </i-cell>
 

+ 56 - 0
pages/user/out/index.js

@@ -0,0 +1,56 @@
+const app = getApp()
+const {showSuccess} = require("../../../utils/util.js");
+Page({
+  data: {
+    tableData: [],
+    userInfo:{},
+    from: 0,
+    size: 10
+  },
+  onLoad: function(options) {
+    app.checkLogin( userInfo =>{
+      this.setData({userInfo})
+        this.loadData()
+    })
+  },
+  onPullDownRefresh() {
+    this.setData({ from:0, tableData:[]});
+    this.loadData( true )
+  },
+  onReachBottom() {
+    if(this.data.from > -1) {
+      this.loadData()
+    }
+  },
+  gotoDetail( e ){
+    const {id} = e.currentTarget.dataset
+    wx.navigateTo({
+      url: `/pages/detail/outList/index?logId=${id}`,
+    })
+  },
+  confirmData: function(e){
+    const {id, index} = e.currentTarget.dataset
+    let tableData = this.data.tableData||[]
+    app.formPost('User.ConfirmImportOut', {logId:id} ).then(res => {
+      if (res.code === 200) {
+        tableData.splice( index, 1)
+        showSuccess("审核通过")
+        this.setData({tableData});
+      }
+    })
+  },
+  loadData: function() {
+    let {from, size, tableData} = this.data;
+    let param = {from, size}
+    app.formPost('User.WaitComfirmOutList', param ).then(res => {
+      wx.stopPullDownRefresh()
+      if (res.code === 200) {
+        if( from == 0) tableData = [];
+        this.setData({
+          from: res.data.from,
+          tableData: tableData.concat(res.data.list)
+        });
+      }
+    })
+  }
+})

+ 12 - 0
pages/user/out/index.json

@@ -0,0 +1,12 @@
+{
+  "navigationBarTitleText": "外出审核",
+  "usingComponents": {
+    "i-cell-group": "/component/iView/cell-group/index",
+    "i-cell": "/component/iView/cell/index",
+    "i-avatar": "/component/iView/avatar/index",
+    "i-button": "/component/iView/button/index",
+    "i-icon": "/component/iView/icon/index",
+    "i-message": "/component/iView/message/index",
+    "i-spin": "/component/iView/spin/index"
+  }
+}

+ 25 - 0
pages/user/out/index.wxml

@@ -0,0 +1,25 @@
+<view class="card-wrapper" wx:for="{{tableData}}" wx:key="index">
+  <view class="i-class i-card i-card-radus" data-id="{{item.id}}" data-out="{{item.isOut}}" >
+    <view class="i-class i-card-header mt10">
+      <view class="i-card-header-title" style="font-size:36rpx">
+        {{item.name}} 
+      </view>
+      <view class="i-card-header-extra" style="font-size:28rpx" >
+        {{item.adminName}}
+      </view>
+    </view>
+
+    <view style="font-size:28rpx;margin-left: 32rpx">
+      {{item.confirmAt}}
+    </view>
+    
+    <view class="tc mt10 ">
+        <i-button type="primary"  class="bsmall" data-id="{{item.id}}" bindtap="gotoDetail">查看详情</i-button>
+        <i-button type="warning" class="bsmall" data-id="{{item.id}}" data-index="{{index}}" bindtap="confirmData"> 审核通过</i-button>
+    </view>
+  </view>
+</view>
+
+<view wx:if="{{from==-1}}"  style="text-align:center;margin:40rpx 0;color:#80848f;">
+  <view class="padding">没有更多了</view>
+</view>

+ 6 - 0
pages/user/out/index.wxss

@@ -0,0 +1,6 @@
+@import '/component/iView/card/index.wxss';
+.i-card-radus{
+  border-radius: 10rpx;
+  margin-top: 10rpx;
+  background-color: #fff;
+}

+ 56 - 0
pages/user/visit/index.js

@@ -0,0 +1,56 @@
+const app = getApp()
+const {showSuccess} = require("../../../utils/util.js");
+Page({
+  data: {
+    tableData: [],
+    userInfo:{},
+    from: 0,
+    size: 10
+  },
+  onLoad: function(options) {
+    app.checkLogin( userInfo =>{
+      this.setData({userInfo})
+        this.loadData()
+    })
+  },
+  onPullDownRefresh() {
+    this.setData({ from:0, tableData:[]});
+    this.loadData( true )
+  },
+  onReachBottom() {
+    if(this.data.from > -1) {
+      this.loadData()
+    }
+  },
+  gotoDetail( e ){
+    const {id} = e.currentTarget.dataset
+    wx.navigateTo({
+      url: `/pages/detail/visitList/index?logId=${id}`,
+    })
+  },
+  confirmData: function(e){
+    const {id, index} = e.currentTarget.dataset
+    let tableData = this.data.tableData||[]
+    app.formPost('User.ConfirmImportVisit', {logId:id} ).then(res => {
+      if (res.code === 200) {
+        tableData.splice( index, 1)
+        showSuccess("审核通过")
+        this.setData({tableData});
+      }
+    })
+  },
+  loadData: function() {
+    let {from, size, tableData} = this.data;
+    let param = {from, size}
+    app.formPost('User.WaitComfirmVisitList', param ).then(res => {
+      wx.stopPullDownRefresh()
+      if (res.code === 200) {
+        if( from == 0) tableData = [];
+        this.setData({
+          from: res.data.from,
+          tableData: tableData.concat(res.data.list)
+        });
+      }
+    })
+  }
+})

+ 12 - 0
pages/user/visit/index.json

@@ -0,0 +1,12 @@
+{
+  "navigationBarTitleText": "莅临审核",
+  "usingComponents": {
+    "i-cell-group": "/component/iView/cell-group/index",
+    "i-cell": "/component/iView/cell/index",
+    "i-avatar": "/component/iView/avatar/index",
+    "i-button": "/component/iView/button/index",
+    "i-icon": "/component/iView/icon/index",
+    "i-message": "/component/iView/message/index",
+    "i-spin": "/component/iView/spin/index"
+  }
+}

+ 25 - 0
pages/user/visit/index.wxml

@@ -0,0 +1,25 @@
+<view class="card-wrapper" wx:for="{{tableData}}" wx:key="index">
+  <view class="i-class i-card i-card-radus" data-id="{{item.id}}" data-out="{{item.isOut}}" >
+    <view class="i-class i-card-header mt10">
+      <view class="i-card-header-title" style="font-size:36rpx">
+        {{item.name}} 
+      </view>
+      <view class="i-card-header-extra" style="font-size:28rpx" >
+        {{item.adminName}}
+      </view>
+    </view>
+
+    <view style="font-size:28rpx;margin-left: 32rpx">
+      {{item.confirmAt}}
+    </view>
+    
+    <view class="tc mt10">
+        <i-button type="primary"  size="small" inline data-id="{{item.id}}" bindtap="gotoDetail">查看详情</i-button>
+        <i-button type="warning" size="small" inline data-id="{{item.id}}" data-index="{{index}}" bindtap="confirmData"> 审核通过</i-button>
+    </view>
+  </view>
+</view>
+
+<view wx:if="{{from==-1}}"  style="text-align:center;margin:40rpx 0;color:#80848f;">
+  <view class="padding">没有更多了</view>
+</view>

+ 6 - 0
pages/user/visit/index.wxss

@@ -0,0 +1,6 @@
+@import '/component/iView/card/index.wxss';
+.i-card-radus{
+  border-radius: 10rpx;
+  margin-top: 10rpx;
+  background-color: #fff;
+}

+ 3 - 0
push(1).bat

@@ -0,0 +1,3 @@
+git add -A
+git commit -m 'normal'
+git push origin master

+ 1 - 1
utils/util.js

@@ -1,4 +1,5 @@
 const baseUrl = "https://ndzx.hqedust.com/"
+// const baseUrl = "http://localhost:8000/"
 const ossUrl = "https://sm-sign.oss-cn-shanghai.aliyuncs.com/cert/"
 const md5 = require('./md5.js');
 
@@ -9,7 +10,6 @@ const formatTime = date => {
   const hour = date.getHours()
   const minute = date.getMinutes()
   const second = date.getSeconds()
-
   return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
 }