Browse Source

小程序:新增商户端

panyong 2 years ago
parent
commit
4b7a77c1eb

+ 13 - 1
htmldev/wxMini/app.json

@@ -54,6 +54,18 @@
         "iconPath": "image/tabBar/home_0@2x.png",
         "selectedIconPath": "image/tabBar/home_1@2x.png"
       },
+      {
+        "pagePath": "pages/partner/partner",
+        "text": "优秀合作社",
+        "iconPath": "image/tabBar/home_0@2x.png",
+        "selectedIconPath": "image/tabBar/home_1@2x.png"
+      },
+      {
+        "pagePath": "pages/news/news",
+        "text": "农事天地",
+        "iconPath": "image/tabBar/home_0@2x.png",
+        "selectedIconPath": "image/tabBar/home_1@2x.png"
+      },
       {
         "pagePath": "pages/mine/mine",
         "text": "我的",
@@ -62,4 +74,4 @@
       }
     ]
   }
-}
+}

+ 3 - 3
htmldev/wxMini/pages/goodsDetail/goodsDetail.wxml

@@ -33,7 +33,7 @@
   <!--描述-->
 <view
   class="business-info"
-  hidden="{{currentNav === '2'}}">
+  hidden="{{active === '2'}}">
   <text class="introduce" user-select>一段描述</text>
   <block wx:if="{{false}}">
     <view class="subtitle">预计上架时间</view>
@@ -68,13 +68,13 @@
   <!-- todo 供应商-->
 <view
   class="business-info"
-  hidden="{{currentNav === '1'}}">
+  hidden="{{active === '1'}}">
   供应商
 </view>
 
 <view
   class="fixed-bottom"
-  hidden="{{currentNav === '2'}}">
+  hidden="{{active === '2'}}">
   <view>
     <button
       class="btn-collection"

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

@@ -16,7 +16,7 @@ Page({
     headerNav: [{
       icon: '',
       name: '供应商',
-      path: 'business'
+      path: 'partner'
     },
       {
         icon: '',
@@ -159,12 +159,12 @@ Page({
     if (Object.prototype.toString.call(item) === '[object Object]' && item.path) {
       const path = item.path
 
-      // if (path === 'news') {
-      //   wx.switchTab({
-      //     url: `/pages/${path}/${path}`
-      //   })
-      //   return
-      // }
+      if (path === 'news' || path === 'partner') {
+        wx.switchTab({
+          url: `/pages/${path}/${path}`
+        })
+        return
+      }
       wx.navigateTo({
         url: `/pages/${path}/${path}`
       })

+ 5 - 0
htmldev/wxMini/pages/partner/partner.js

@@ -64,5 +64,10 @@ Page({
     wx.navigateTo({
       url: '/pages/leavingAMessage/leavingAMessage'
     })
+  },
+  jumpBusinessDetail() {
+    wx.navigateTo({
+      url: '/pages/businessDetail/businessDetail'
+    })
   }
 })

+ 3 - 1
htmldev/wxMini/pages/partner/partner.wxml

@@ -17,7 +17,9 @@
     </view>
   </view>
   <view class="main">
-    <view class="list">
+    <view
+      class="list"
+      bind:tap="jumpBusinessDetail">
       <view class="top">
         <view class="photo-wrap">
           <image src=""></image>