Browse Source

小程序:个人中心

panyong 2 years ago
parent
commit
795881dd7e

+ 4 - 4
htmldev/wxMini/app.js

@@ -35,8 +35,8 @@ App({
       {
         'pagePath': 'pages/partner/partner',
         'text': '优秀合作社',
-        'iconPath': 'image/tabBar/home_0@2x.png',
-        'selectedIconPath': 'image/tabBar/home_1@2x.png'
+        'iconPath': 'image/tabBar/partner_0@2x.png',
+        'selectedIconPath': 'image/tabBar/partner_1@2x.png'
       },
       {
         'pagePath': 'pages/mine/mine',
@@ -49,8 +49,8 @@ App({
       {
         'pagePath': 'pages/news/news',
         'text': '农事天地',
-        'iconPath': 'image/tabBar/home_0@2x.png',
-        'selectedIconPath': 'image/tabBar/home_1@2x.png'
+        'iconPath': 'image/tabBar/news_0@2x.png',
+        'selectedIconPath': 'image/tabBar/news_1@2x.png'
       }
     ]
   },

+ 4 - 4
htmldev/wxMini/app.json

@@ -58,14 +58,14 @@
       {
         "pagePath": "pages/partner/partner",
         "text": "优秀合作社",
-        "iconPath": "image/tabBar/home_0@2x.png",
-        "selectedIconPath": "image/tabBar/home_1@2x.png"
+        "iconPath": "image/tabBar/partner_0@2x.png",
+        "selectedIconPath": "image/tabBar/partner_1@2x.png"
       },
       {
         "pagePath": "pages/news/news",
         "text": "农事天地",
-        "iconPath": "image/tabBar/home_0@2x.png",
-        "selectedIconPath": "image/tabBar/home_1@2x.png"
+        "iconPath": "image/tabBar/news_0@2x.png",
+        "selectedIconPath": "image/tabBar/news_1@2x.png"
       },
       {
         "pagePath": "pages/mine/mine",

+ 3 - 4
htmldev/wxMini/app.wxss

@@ -95,14 +95,13 @@ view.footer-fixed-bottom button[type='default'] {
 }
 
 .app_page-header-search-warp label {
-  width: 66rpx;
+  width: 68rpx;
 }
 
 .app_page-header-search-warp image {
   display: block;
-  width: 29rpx;
-  height: 29rpx;
-  background: pink;
+  width: 68rpx;
+  height: 68rpx;
 }
 
 .app_page-header-search-warp input {

+ 5 - 0
htmldev/wxMini/custom-tab-bar/index.scss

@@ -0,0 +1,5 @@
+.tab-icon {
+  display: block;
+  width: 40rpx;
+  height: 34rpx;
+}

+ 12 - 2
htmldev/wxMini/custom-tab-bar/index.wxml

@@ -9,8 +9,18 @@
     wx:for="{{list}}"
     wx:key="pagePath">
     <van-tabbar-item
-      name="{{item.pagePath}}"
-      icon="home-o">{{item.text}}
+      name="{{item.pagePath}}">
+      <image
+        class="tab-icon"
+        slot="icon"
+        src="../{{ item.iconPath }}"
+        mode="aspectFit"/>
+      <image
+        class="tab-icon"
+        slot="icon-active"
+        src="../{{ item.selectedIconPath }}"
+        mode="aspectFit"/>
+      {{item.text}}
     </van-tabbar-item>
   </block>
 </van-tabbar>

BIN
htmldev/wxMini/image/home/collection@2x.png


BIN
htmldev/wxMini/image/home/guide@2x.png


BIN
htmldev/wxMini/image/home/message@2x.png


BIN
htmldev/wxMini/image/home/partner@2x.png


BIN
htmldev/wxMini/image/home/search@2x.png


BIN
htmldev/wxMini/image/mine/bg.png


BIN
htmldev/wxMini/image/mine/edit.png


BIN
htmldev/wxMini/image/mine/phone.png


BIN
htmldev/wxMini/image/mine/star.png


BIN
htmldev/wxMini/image/mine/tuichu.png


BIN
htmldev/wxMini/image/mine/user.png


BIN
htmldev/wxMini/image/tabBar/home_0@2x.png


BIN
htmldev/wxMini/image/tabBar/home_1@2x.png


BIN
htmldev/wxMini/image/tabBar/mine_0@2x.png


BIN
htmldev/wxMini/image/tabBar/mine_1@2x.png


BIN
htmldev/wxMini/image/tabBar/news_0@2x.png


BIN
htmldev/wxMini/image/tabBar/news_1@2x.png


BIN
htmldev/wxMini/image/tabBar/partner_0@2x.png


BIN
htmldev/wxMini/image/tabBar/partner_1@2x.png


+ 3 - 3
htmldev/wxMini/pages/home/home.js

@@ -14,17 +14,17 @@ Page({
       '这是一行上下滚动的文字,文字最好短点,超过一行省略'
     ],
     headerNav: [{
-      icon: '',
+      icon: 'partner@2x.png',
       name: '供应商',
       path: 'partner'
     },
       {
-        icon: '',
+        icon: 'guide@2x.png',
         name: '采购指南',
         path: 'guide'
       },
       {
-        icon: '',
+        icon: 'collection@2x.png',
         name: '收藏',
         path: 'collection'
       },

+ 9 - 4
htmldev/wxMini/pages/home/home.wxml

@@ -2,12 +2,12 @@
   <view class="app_page-header-search">
     <view class="app_page-header-search-warp">
       <label for="header-search">
-        <image src=""></image>
+        <image src="../../image/home/search@2x.png"></image>
       </label>
       <input placeholder-class="app_header-search-placeholder" value="" placeholder="搜索"></input>
     </view>
     <view class="leaving-a-message" bind:tap="jumpLeavingAMessage">
-      <image src=""></image>
+      <image src="../../image/home/message@2x.png"></image>
       <view>8</view>
     </view>
   </view>
@@ -41,8 +41,13 @@
   </view>
   <!--顶部导航-->
   <view class="header-nav">
-    <view class="nav" wx:for="{{headerNav}}" wx:key="index" data-item="{{item}}" bind:tap="handleNav">
-      <image src=""></image>
+    <view
+      class="nav"
+      wx:for="{{headerNav}}"
+      wx:key="index"
+      data-item="{{item}}"
+      bind:tap="handleNav">
+      <image src="../../image/home/{{item.icon}}"></image>
       <text>{{item.name}}</text>
     </view>
   </view>

+ 4 - 6
htmldev/wxMini/pages/home/home.wxss

@@ -11,15 +11,14 @@
 
 .leaving-a-message image {
   display: block;
-  width: 40rpx;
-  height: 50rpx;
-  background: pink;
+  width: 36rpx;
+  height: 48rpx;
 }
 
 .leaving-a-message view {
   position: absolute;
-  top: -9rpx;
-  right: -9rpx;
+  top: -12rpx;
+  right: -12rpx;
   z-index: 1;
   min-width: 36rpx;
   min-height: 36rpx;
@@ -113,7 +112,6 @@
 .header-nav .nav image {
   width: 70rpx;
   height: 70rpx;
-  background: pink;
 }
 
 .header-nav .nav text {

+ 3 - 5
htmldev/wxMini/pages/mine/mine.scss

@@ -38,7 +38,6 @@
     margin-left: 10rpx;
     width: 26rpx;
     height: 28rpx;
-    background: pink;
   }
 }
 
@@ -126,13 +125,12 @@
   box-shadow: 0 12rpx 98rpx 0 rgba(55, 55, 55, 0.05);
 
   .label {
-    width: 31rpx;
-    height: 38rpx;
-    background: pink;
+    width: 48rpx;
+    height: 48rpx;
   }
 
   .value {
-    margin-left: 23px;
+    margin-left: 10px;
     line-height: 44rpx;
     font-size: 32rpx;
     color: rgba(51, 62, 99, 1);

+ 7 - 7
htmldev/wxMini/pages/mine/mine.wxml

@@ -21,7 +21,7 @@
       <text
         bind:tap="editNickname">{{form.user_nickname}}</text>
       <image
-        src=""
+        src="../../image/mine/edit.png"
         bind:tap="editNickname"></image>
     </block>
     <block wx:else>
@@ -43,7 +43,7 @@
   <view class="main">
     <view
       class="business-account"
-      wx:if="{{true}}">
+      wx:if="{{false}}">
       <view class="describe">已有商家账号</view>
       <view class="box">
         <view class="business-account-name-wrap">
@@ -64,8 +64,8 @@
     <!-- todo -->
     <view
       class="list"
-      wx:if="{{false}}">
-      <image class="label" src=""></image>
+      wx:if="{{true}}">
+      <image class="label" src="../../image/mine/user.png"></image>
       <text class="value">申请入住(成为农户)</text>
     </view>
     <view
@@ -77,20 +77,20 @@
     </view>
     <!-- todo -->
     <view class="list">
-      <image class="label" src=""></image>
+      <image class="label" src="../../image/mine/star.png"></image>
       <text class="value">农户收藏</text>
     </view>
     <!-- todo -->
     <view
       class="list">
-      <image class="label" src=""></image>
+      <image class="label" src="../../image/mine/phone.png"></image>
       <text class="value">客服电话</text>
     </view>
     <view
       class="list"
       bind:tap="showLogout"
       wx:if="{{sessionId}}">
-      <image class="label" src=""></image>
+      <image class="label" src="../../image/mine/tuichu.png"></image>
       <text class="value">退出</text>
     </view>
   </view>