Bladeren bron

搜做页面

y595705120 3 jaren geleden
bovenliggende
commit
b1c8bf1487

+ 0 - 1
app.js

@@ -122,7 +122,6 @@ App({
             _this.gotoLogin()
             return
           }
-          console.log("res", res.data)
           resolve( res.data );
           return true;
         },

+ 2 - 0
app.json

@@ -1,10 +1,12 @@
 {
   "pages": [
+    "pages/search/index",
     "pages/rili/index",
     "pages/detail/visit/index",
     "pages/detail/out/index",
     "pages/index/index",
     "pages/user/index/index"
+    
   ],
   "tabBar": {
     "color": "#6e6d6b",

BIN
assets/carousel/1.jpg


BIN
assets/carousel/2.jpg


BIN
assets/carousel/3.jpg


+ 3 - 3
component/calendar/theme/theme-elegant.wxss

@@ -2,17 +2,17 @@
 .elegant_weekend-color,
 .elegant_handle-color,
 .elegant_week-color {
-    color: #333;
+    color: #000;
 }
 
 .elegant_today {
     color: #000;
-    background-color: #e1e7f5;
+    background-color: #1152eb;
 }
 
 .elegant_choosed {
     color: #000;
-    background-color: #e2e2e2;
+    background-color: #1152eb;
 }
 
 .elegant_date-disable {

+ 4 - 1
component/v2/index.json

@@ -1,3 +1,6 @@
 {
-  "component": true
+  "component": true,
+  "usingComponents": {
+    "i-icon": "/component/iView/icon/index"
+  }
 }

+ 4 - 1
component/v2/index.wxml

@@ -9,7 +9,10 @@
         <text class="prev-handle iconfont icon-left" bindtap="changeDate" data-type="prev_month"></text>
       </view>
       <view class="flex date-in-handle b lr cc fsnd" bindtap="doubleClickJumpToToday">
-        {{calendar.curYear || "--"}} 年 {{calendar.curMonth || "--"}} 月
+        {{calendar.curYear || "--"}} 年 {{calendar.curMonth || "--"}} 月 
+      </view>
+      <view class="flex" bindtap="doubleClickJumpToToday">
+         <i-icon type="search"  size="25" style="color: blue"></i-icon>
       </view>
       <view class="next fsnd" wx:if="{{!config.weekMode}}">
         <text class="next-handle iconfont icon-right" bindtap="changeDate" data-type="next_month"></text>

+ 4 - 4
component/v2/index.wxss

@@ -120,7 +120,7 @@
     height: 65rpx;
     text-align: center;
     line-height: 65rpx;
-    font-size: 40rpx;
+    font-size: 42rpx;
     font-weight: 600;
     border-radius: 50%;
     transition: all 0.3s;
@@ -210,9 +210,9 @@
 
 .date-desc.date-desc-bottom {
     bottom: -32rpx;
-    color: green;
-    font-size: 25rpx;
-    font-weight: 800;
+    color: #6495ED;
+    font-size: 22rpx;
+    font-weight: 400;
 }
 
 .todo-circle .date-desc.date-desc-bottom {

+ 3 - 3
component/v2/theme/theme-elegant.wxss

@@ -11,8 +11,8 @@
 }
 
 .elegant_choosed {
-    color: #000;
-    background-color: #e2e2e2;
+    color: #FFF;
+    background-color: #6495ED;
 }
 
 .elegant_date-disable {
@@ -30,7 +30,7 @@
 }
 
 .elegant_normal-date {
-    color: #777;
+    color: ##080808;
 }
 
 .elegant_todo-circle {

+ 1 - 1
pages/calendarComponent/index.wxml

@@ -1,4 +1,4 @@
-<view style="width: 90%;height:640rpx;overflow:hidden;margin: 0 auto 40rpx;">
+<view style="width: 85%;height:640rpx;overflow:hidden;margin: 0 auto 40rpx;">
   <calendar
     calendarConfig="{{calendarConfig}}"
     bind:onSwipe="onSwipe"

+ 3 - 3
pages/index/index.wxml

@@ -2,13 +2,13 @@
   <view>
     <swiper indicator-dots="false" autoplay="true" interval="5000" duration="1000">
       <swiper-item>
-        <image src="/assets/carousel/1.jpg" class="slide-image"  mode="aspectFill" />
+        <image src="https://ndzx.hqedust.com/file/1.jpg" class="slide-image"  mode="aspectFill" />
       </swiper-item>
       <swiper-item>
-        <image src="/assets/carousel/2.jpg" class="slide-image" mode="aspectFill"/>
+        <image src="https://ndzx.hqedust.com/file/2.jpg" class="slide-image" mode="aspectFill"/>
       </swiper-item>
       <swiper-item>
-        <image src="/assets/carousel/3.jpg" class="slide-image" mode="aspectFill"/>
+        <image src="https://ndzx.hqedust.com/file/3.jpg" class="slide-image" mode="aspectFill"/>
       </swiper-item>
     </swiper>
   </view>

+ 1 - 2
pages/rili/index.js

@@ -24,7 +24,7 @@ const conf = {
     fromDate:'',
     toDate:'',
     calendarConfig: {
-      theme: 'default',
+      theme: 'elegant',
       showHolidays: true,
       emphasisWeek: true,
       chooseAreaMode: false,
@@ -203,7 +203,6 @@ const conf = {
     for( let date in dateMap ){
       let d = new Date(date);
       let item = {year: d.getFullYear(), month: d.getMonth()+1, date: d.getDate()};
-      console.log("mark", date, dateMap[date])
       switch( dateMap[date] ){
         case 1:
           item.todoText = "出";

+ 2 - 2
pages/rili/index.wxml

@@ -11,8 +11,8 @@
   ></calendar>
 </view>
 
-<view wx:for="{{tableData}}" wx:key="index" class="mt5">
-  <view class="i-class i-card i-card-full" data-id="{{item.id}}" data-out="{{item.isOut}}"  bindtap="gotoDetail" >
+<view wx:for="{{tableData}}" wx:key="index">
+  <view class="i-class i-card i-card-radus" data-id="{{item.id}}" data-out="{{item.isOut}}"  bindtap="gotoDetail" >
     <view class="i-class i-card-header">
       <view class="i-card-header-title mt10" style="font-size:30rpx">
         {{item.username}} 

+ 9 - 1
pages/rili/index.wxss

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

+ 52 - 0
pages/search/index.js

@@ -0,0 +1,52 @@
+const app = getApp()
+
+Page({
+  data: {
+    tableData: [],
+    keyword:'',
+    from: 0,
+    size: 10
+  },
+
+  onLoad: function(options) {
+    this.setData({
+      spinShow: true
+    });
+    this.search(true)
+  },
+  onPullDownRefresh() {
+    this.setData({ spinShow: true });
+    if (!this.loading) {
+      this.setData({ from:0,tableData:[]});
+      this.search(true)
+    }
+  },
+  onReachBottom() {
+    if (!this.loading && this.data.from > -1) {
+      this.search(false)
+    }
+  },
+  onInputEvent(e){
+    let {value} = e.detail;
+    if( this.data.keyword == value) return;
+    this.setData({keyword: value, from:0})
+    this.search(   )
+  },
+  search: function() {
+    let {from, size, keyword, tableData} = this.data;
+    let _this = this
+    let param = {from, size, keyword}
+    app.formPost('User.search', param ).then(res => {
+      _this.setData({spinShow: false});
+      wx.stopPullDownRefresh()
+      if (res.code === 200) {
+        const re = res.data
+        if( from== 0) tableData = [];
+        _this.setData({
+          from: re.from,
+          tableData: tableData.concat(re.list)
+        });
+      }
+    })
+  }
+})

+ 6 - 0
pages/search/index.json

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

+ 29 - 0
pages/search/index.wxml

@@ -0,0 +1,29 @@
+<view class='searchbar'>
+  <view class='search-input-group'>
+    <input class='search-input' placeholder="搜一搜" bindinput="onInputEvent"></input>
+  </view>
+</view>
+
+<view style="margin-top:120rpx"></view>
+
+<view wx:for="{{tableData}}" wx:key="index">
+  <view class="i-class i-card i-card-radus" data-id="{{item.id}}" data-out="{{item.isOut}}"  bindtap="gotoDetail" >
+    <view class="i-class i-card-header">
+      <view class="i-card-header-title mt10" style="font-size:30rpx">
+        {{item.username}} 
+        <text wx:if="{{item.isOut}}" style="color:orange;">【外出】</text>
+        <text wx:else style="color:green;">【莅临】</text>
+      </view>
+      <view class="i-card-header-extra" style="font-size:30rpx" >
+        {{item.post}}
+      </view>
+    </view>
+    <view class="i-card-footer" style="font-size:35rpx">
+      {{item.fromDate}} 到 {{item.toDate}}  
+    </view>
+  </view>
+</view>
+
+<view wx:if="{{from==-1}}"  style="text-align:center;margin-top:40rpx">
+  <view class="padding">没有更多了</view>
+</view>

File diff suppressed because it is too large
+ 24 - 0
pages/search/index.wxss


Some files were not shown because too many files changed in this diff