zhanghongrui 2 anni fa
parent
commit
2f5aa73716

+ 2 - 1
app.json

@@ -21,7 +21,8 @@
     "pages/xunjian/xunjian",
     "pages/xunjiancz/xunjiancz",
     "pages/qianming/qianming",
-    "pages/xunjianmore/xunjianmore"
+    "pages/xunjianmore/xunjianmore",
+    "pages/notice/notice"
   ],
 
   "requiredPrivateInfos": [

+ 1 - 0
app.wxss

@@ -67,6 +67,7 @@ page{
   /* 列表 */
   .list_vi{
     margin: 40rpx 30rpx 20rpx 30rpx;
+    height:101vh;
   }
   .list_vi .list_li{
     display: flex;

+ 3 - 1
pages/index/index.js

@@ -78,7 +78,7 @@ Page({
   // 通知公告更多跳转
   bindViewGengDuo() {
     wx.navigateTo({
-      url: '../more/more'
+      url: '../notice/notice'
     })
   },
   // 新手指南跳转
@@ -175,6 +175,8 @@ Page({
       this.bindViewXunCha()
     } else if (name == "bindViewXunjianimg") {
       this.bindViewXunjianimg()
+    }else if(name=="bindViewGengDuo"){
+      this.bindViewGengDuo()
     }
   },
 

+ 1 - 1
pages/index/index.wxml

@@ -55,7 +55,7 @@
     <image class="img" src="{{host}}/images/xcx_lb.png" />
     <b>[待办]</b>
     <text>隐患排查已整改,请核查!</text>
-    <view class="more" bindtap="bindViewGengDuo">更多></view>
+    <view class="more" data-fun="bindViewGengDuo" bindtap="init_userInfo">更多></view>
   </view>
   <!-- 中间图片banner -->
   <!-- <view class="con_banner">

+ 13 - 8
pages/me/me.wxml

@@ -1,27 +1,32 @@
 <view class="container_c">
 <view class="top_con">
   <image src="{{userInfo.avatarUrl}}" class="wd_img" wx:if="{{!isBindSuccess}}" bindtap="init_userInfo"   ></image>
-   <image src="{{userInfo.avatarUrl}}" class="wd_img" wx:if="{{isBindSuccess}}"></image>
+   <image src="{{userInfo.avatarUrl}}" class="wd_img" wx:if="{{isBindSuccess}}" ></image>
   <view class="top_txt">
     <!-- <div type="userNickName" lang="zh_CN" class="wd_txt">
     {{userInfo.nickName}}
   </div> -->
   <text class="userNickName"  wx:if="{{!isBindSuccess}}">{{userName}}</text>
   <text class="userNickName" wx:if="{{isBindSuccess}}" >{{userInfo.nickName}}</text>
-  <text>技术部</text>
+  <text>部门:</text>
   </view>
   <image src="../images/me.png" class="me_bg"/>
 </view>
 <view class="me_tit">
-  <view class="tit_two">
-    <image src="../images/metit.png" class="metit" />
-      <view class="meline">
-        <i class="iconfont icon-tongxunlu"></i>
+  
+
+  <view class="tit_one" wx:if="{{isBindSuccess}}" >
+    <image src="../images/metit1.png" class="metit" />
+    <view class="meline">
+      <i class="iconfont icon-tongxunlu"></i>
         <text>通讯录</text>
         <i class="iconfont icon-xiangyou"></i>
       </view>
-      <view class="meline" bindtap="clear">
-        <i class="iconfont icon-yunongtongqingchuhuancun" ></i>
+  </view>
+  <view class="tit_one" bindtap="clear" wx:if="{{isBindSuccess}}" >
+    <image src="../images/metit1.png" class="metit" />
+    <view class="meline">
+      <i class="iconfont icon-yunongtongqingchuhuancun" ></i>
         <text>清除缓存</text>
         <i class="iconfont icon-xiangyou"></i>
       </view>

+ 107 - 0
pages/notice/notice.js

@@ -0,0 +1,107 @@
+import http from '../../base/httputil'
+const app = getApp()
+
+Page({
+  data: {
+   
+    /**
+     * 控制上拉到底部时是否出现 "数据加载中..."
+     */
+    hidden: true,
+    /**
+     * 数据是否正在加载中,避免数据多次加载
+     */
+    loadingData: false,
+    enterpriseList: [],
+    pageNum: 1 // 页码
+  },
+  onLoad: function () {
+    // wx.showLoading({
+    //   title: '加载中'
+    // })
+    this.loadData(this.data.pageNum)
+  },
+  //加载数据
+  loadData: function(num) {
+    http.send_post("/system/AppEnterpriseController/getInitEnterpriseList", null, this.getQiyeEnterpriseListSuccess)
+    
+  
+  },
+
+  getQiyeEnterpriseListSuccess(res) {
+
+    console.log("####"+this.data.pageNum)
+      this.setData({
+        enterpriseList: res.data.rows,
+      })
+      var that = this
+      if(this.data.pageNum==1){
+        // 隐藏导航栏加载框
+        setTimeout(function() {
+          that.setData({
+            loadingData: false
+          });
+          wx.hideNavigationBarLoading();
+          // 停止下拉动作
+          wx.stopPullDownRefresh();
+
+        },1000)
+       
+      }else{
+        // 隐藏加载框
+        
+        setTimeout(function() { 
+          that.setData({
+            hidden: true,
+            loadingData: false
+          });
+          
+          wx.hideLoading(); },1000)
+
+         
+         
+      }
+    },
+    onPullDownRefresh: function () {
+      // 显示顶部刷新图标
+      wx.showNavigationBarLoading();
+      var that = this;
+      var loadingData = this.data.loadingData
+      if (loadingData) {
+        return;
+      }
+      that.setData({
+         pageNum:1
+      })
+      this.loadData(this.data.pageNum)
+    },
+    /**
+* 页面上拉触底事件的处理函数
+*/
+onReachBottom: function () {
+  var loadingData = this.data.loadingData
+  // 显示加载图标
+  wx.showLoading({
+  title: '玩命加载中',
+  })
+  var hidden = this.data.hidden
+  // 页数+1
+  this.setData({
+    pageNum: this.data.pageNum + 1
+  })
+  if (hidden) {
+    this.setData({
+      hidden: false
+    });
+    console.info(this.data.hidden);
+  }
+
+  if (loadingData) {
+    return;
+  }
+  this.setData({
+    loadingData: true
+  });
+ this.loadData(this.data.pageNum);
+  },
+})

+ 18 - 0
pages/notice/notice.json

@@ -0,0 +1,18 @@
+{
+  "component": true, 
+  "usingComponents": {
+    
+  },
+
+
+  "navigationBarBackgroundColor": "#f94b0e",
+  "navigationBarTextStyle": "white",
+  "enablePullDownRefresh": true,
+  "onPullDownRefresh": true,
+  "onReachBottom": true,
+
+  "navigationBarTitleText": "公告",
+  "onReachBottomDistance":10
+
+}
+

+ 22 - 0
pages/notice/notice.wxml

@@ -0,0 +1,22 @@
+
+
+
+
+<!-- 列表 -->
+<view class="list_vi">
+    <view class="list_li" bindtap="bindViewDetails" wx:for="{{enterpriseList}}" wx:key="index" data-enterpriseid="{{item.busEnterpriseId}}">
+      <i class="list_icon iconfont icon-queding" wx:if="{{item.riskCount == 0}}"></i>
+      <i class="list_icon iconfont icon-yingjipingtai" wx:if="{{item.riskCount > 0}}"></i>
+      <text>{{item.businessName}}</text>
+      <i class="iconfont icon-xiangyou list_right"></i>
+    </view>
+    <view class='data-loading' hidden='{{hidden}}'>
+    数据加载中...
+  </view>
+    </view>
+
+
+
+
+
+

+ 47 - 0
pages/notice/notice.wxss

@@ -0,0 +1,47 @@
+.qy_con {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  text-align: center;
+  margin: 30rpx 30rpx;
+}
+
+.qy_con view {
+  height: 140rpx;
+  color: #fff;
+  display: flex;
+  flex-direction: column;
+  padding: 15rpx 40rpx;
+  position: relative;
+}
+
+.qy_con view image {
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 100%;
+  z-index: -1;
+}
+
+.qy_con view h2 {
+  font-size: 58rpx;
+  font-weight: bolder;
+  padding-top: 10rpx;
+}
+
+.qy_con view p {
+  font-size: 35rpx;
+}
+
+.icon-jiahao {
+  font-size: 60rpx;
+}
+
+.data-loading {
+  height: 100rpx;
+  line-height: 100rpx;
+  background-color: #fff;
+  text-align: center;
+  font-size: 14px;
+}

+ 1 - 1
project.private.config.json

@@ -2,7 +2,7 @@
   "projectname": "sooka_edyj_minapp",
   "setting": {
     "compileHotReLoad": false,
-    "urlCheck": true
+    "urlCheck": false
   },
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "libVersion": "2.16.0"