roose 4 years ago
parent
commit
9ca00eaf11
6 changed files with 115 additions and 25 deletions
  1. 10 12
      app.json
  2. 20 0
      pages/index/index.js
  3. 32 3
      pages/index/index.wxml
  4. 44 4
      pages/index/index.wxss
  5. 6 4
      pages/login/login.js
  6. 3 2
      pages/paiming/paiming.wxss

+ 10 - 12
app.json

@@ -1,15 +1,13 @@
 {
   "pages": [
+    "pages/login/login",
     "pages/index/index",
     "pages/paiming/paiming",
     "pages/personInfo/personInfo",
     "pages/finishInfo/finishInfo",
     "pages/updatepassword/updatepassword",
-    "pages/login/login",
-
-    "pages/visitandinfo/visitandinfo",
    
-  
+    "pages/visitandinfo/visitandinfo",
     "pages/collectInfo/collectInfo"
   ],
   "window": {
@@ -63,26 +61,26 @@
     "list": [{
         "pagePath": "pages/index/index",
         "text": "首页",
-        "selectedIconPath": "./images/tabBar5.png",
-        "iconPath": "/images/tabBar1.png"
+        "selectedIconPath": "/images/tabbar5.png",
+        "iconPath": "/images/tabbar1.png"
       },
       {
         "pagePath": "pages/collectInfo/collectInfo",
         "text": "采集",
-        "selectedIconPath": "./images/tabBar6.png",
-        "iconPath": "/images/tabBar2.png"
+        "selectedIconPath": "./images/tabbar6.png",
+        "iconPath": "./images/tabbar2.png"
       },
       {
         "pagePath": "pages/visitandinfo/visitandinfo",
         "text": "巡访",
-        "selectedIconPath": "./images/tabBar7.png",
-        "iconPath": "./images/tabBar3.png"
+        "selectedIconPath": "./images/tabbar7.png",
+        "iconPath": "./images/tabbar3.png"
       },
       {
         "pagePath": "pages/personInfo/personInfo",
         "text": "我的",
-        "selectedIconPath": "./images/tabBar8.png",
-        "iconPath": "./images/tabBar4.png"
+        "selectedIconPath": "./images/tabbar8.png",
+        "iconPath": "./images/tabbar4.png"
       }
 
     ]

+ 20 - 0
pages/index/index.js

@@ -22,6 +22,26 @@ Page({
     interval: 5000,
     duration: 500
   },
+  goCollect() {
+    wx.switchTab({
+      url: '/pages/collectInfo/collectInfo',
+    })
+  },
+  goXunfang() {
+    wx.switchTab({
+      url: '/pages/visitandinfo/visitandinfo',
+    })
+  },
+
+  goPaiming() {
+    wx.navigateTo({
+      url: '/pages/paiming/paiming',
+    })
+  },
+  goSaoMa() {
+     console.log("扫阿");
+      
+  },
 
   onLoad() {
 

+ 32 - 3
pages/index/index.wxml

@@ -33,11 +33,40 @@
 			<view class="top3-title">累计巡访量</view>
 		</view>
 	</view>
-
-
-
 	<view class="shu-top2">
 		<view class="shu"></view>
 		<view class="top2">快速通道</view>
 	</view>
+	<view class="top4">
+		<view class="top4-box" bindtap="goCollect">
+			<image src="/images/indexicon4.png" style="width: 140rpx; height: 100rpx;  margin-top: 10rpx;"></image>
+			<view class="top4-box1">
+				<view class="top4-title">信息采集</view>
+				<view class="top4-smalltitle">信息采集</view>
+			</view>
+		</view>
+		<view class="top4-box" bindtap="goXunfang">
+			<image src="/images/indexicon5.png" style="width: 140rpx; height: 100rpx;  margin-top: 10rpx;"></image>
+			<view class="top4-box1">
+				<view class="top4-title">巡访信息</view>
+				<view class="top4-smalltitle">巡访信息</view>
+			</view>
+		</view>
+	</view>
+	<view class="top4">
+		<view class="top4-box" bindtap="goPaiming">
+			<image src="/images/indexicon6.png" style="width: 140rpx; height: 100rpx;  margin-top: 10rpx;"></image>
+			<view class="top4-box1">
+				<view class="top4-title">我的排名</view>
+				<view class="top4-smalltitle">我的排名</view>
+			</view>
+		</view>
+		<view class="top4-box" bindtap="goSaoMa">
+			<image src="/images/indexicon7.png" style="width: 140rpx; height: 100rpx;  margin-top: 10rpx;"></image>
+			<view class="top4-box1">
+				<view class="top4-title">扫一扫</view>
+				<view class="top4-smalltitle">扫一扫</view>
+			</view>
+		</view>
+	</view>
 </view>

+ 44 - 4
pages/index/index.wxss

@@ -4,24 +4,24 @@
 }
 
 .home .top {
-  height: 350rpx;
+  height: 300rpx;
 
 }
 
 .home .top swiper-item {
   width: 100%;
-  height: 350rpx;
+  height: 300rpx;
   border-radius: 20rpx;
 }
 
 .home .top image {
   width: 100%;
-  height: 350rpx;
+  height: 300rpx;
   border-radius: 20rpx;
 }
 
 .home .top swiper {
-  height: 350rpx;
+  height: 300rpx;
 }
 
 .flex-box {
@@ -97,4 +97,44 @@ top3-num {
   font-weight: 500;
   color: #9DB7C9;
   margin-top: 20rpx;
+}
+
+.top4 {
+  display: flex;
+  margin-top: 20rpx;
+}
+
+.top4-box {
+  display: flex;
+  width: 330rpx;
+  height: 150rpx;
+  background: rgba(255, 255, 255, 1);
+  box-shadow: 0px 0px 10px 0px rgba(153, 153, 153, 0.15);
+  border-radius: 10rpx;
+  align-items: center;
+  justify-content: space-around;
+}
+.top4-box:nth-child(2){
+  margin-left: 25rpx;
+}
+.top4-box:nth-child(4){
+  margin-left: 25rpx;
+}
+
+.top4-title {
+  color: #333333;
+  font-family: SourceHanSansCN;
+  font-weight: 400;
+  font-size: 30rpx;
+}
+
+.top4-smalltitle {
+  font-family: SourceHanSansCN;
+  font-weight: 400;
+  font-size: 26rpx;
+  color: #999999;
+}
+
+.top4-box1 {
+  margin-right: 20rpx;
 }

+ 6 - 4
pages/login/login.js

@@ -30,12 +30,14 @@ Page({
         appletsId: wx.getStorageSync('openId')
       },
       success: (res) => {
-
+        if (res.data.code == 0) {
+          wx.switchTab({
+            url: '/pages/index/index',
+          })
+        }
       }
     })
-    // wx.switchTab({
-    //   url: '/pages/index/index',
-    // })
+
   },
   onLoad: function () {
     var that = this;

+ 3 - 2
pages/paiming/paiming.wxss

@@ -48,8 +48,9 @@ page {
   padding-bottom: 40rpx;
   background: rgba(255, 255, 255, 1);
   box-shadow: 0px 0px 21px 0px rgba(13, 109, 195, 0.2);
-  border-top-left-radius: 20px;
-  border-top-right-radius: 20px;
+  border-top-left-radius: 20rpx;
+  border-top-right-radius: 20rpx;
+  border: 5rpx solid white;
   margin: 0 auto;
   position: absolute;
   top: 420rpx;