wangyong 6 年 前
コミット
d7984bcda4

+ 6 - 0
app.json

@@ -144,6 +144,12 @@
         "text": "分类"
         "text": "分类"
       },
       },
       {
       {
+        "pagePath": "pages/momo/momo",
+        "iconPath": "images/news/spec.png",
+        "selectedIconPath": "images/news/spec_select.png",
+        "text": "专区"
+      },
+      {
         "pagePath": "pages/car/index",
         "pagePath": "pages/car/index",
         "iconPath": "images/news/car.png",
         "iconPath": "images/news/car.png",
         "selectedIconPath": "images/news/car_select.png",
         "selectedIconPath": "images/news/car_select.png",

BIN
images/news/spec.png


BIN
images/news/spec_select.png


+ 28 - 1
pages/index/index.js

@@ -35,6 +35,33 @@ Page({
     search:{
     search:{
       placeholder:"输入搜索关键字"
       placeholder:"输入搜索关键字"
     },
     },
+    navTab:[
+      {
+      url:'/',
+      icon:'icon-dingzhijiaju',
+      text:'杯类'
+    },
+      {
+        url: '/',
+        icon: 'icon-dingzhijiaju',
+        text: '行李箱'
+      },
+      {
+        url: '/',
+        icon: 'icon-dingzhijiaju',
+        text: '手机壳'
+      },
+      {
+        url: '/',
+        icon: 'icon-dingzhijiaju',
+        text: '板画'
+      },
+      {
+        url: '/',
+        icon: 'icon-dingzhijiaju',
+        text: '包袋'
+      }
+    ],
     navArray:[
     navArray:[
       {
       {
         src:'/images/news/nav_1.png',
         src:'/images/news/nav_1.png',
@@ -606,7 +633,7 @@ Page({
         url: '/pages/login/login?url=/pages/momo/momo',
         url: '/pages/login/login?url=/pages/momo/momo',
       })
       })
     } else {
     } else {
-      wx.navigateTo({
+      wx.switchTo({
         url: '/pages/momo/momo',
         url: '/pages/momo/momo',
       })
       })
     }
     }

+ 5 - 28
pages/index/index.wxml

@@ -33,36 +33,13 @@
 
 
 
 
         <!-- new second nav -->
         <!-- new second nav -->
-        <!-- <view class='new_nav_wrap  clearfix f-box'>
-          <navigator class='new_nav_each f-item'  url='/pages/recommendList/recommendList'>
-            <image src='/images/index_top_menu_sec_0.jpg'  class='new_nav_icon'></image>
-            <view  class="new_nav_name">新鲜上架</view> 
+        <view class='new_nav_wrap  clearfix f-box'>
+          <navigator wx:for="{{navTab}}" class='new_nav_each f-item'  url='{{item.url}}'>
+            <icon class='iconfont {{item.icon}}'></icon>
+            <view  class="new_nav_name">{{item.text}}</view> 
           </navigator>
           </navigator>
 
 
-          <navigator class='new_nav_each f-item'  url='/pages/patternMenu/patternMenu'>
-            <image src='/images/index_top_menu_sec_1.jpg'  class='new_nav_icon'></image>
-            <view  class="new_nav_name">一键选礼</view> 
-          </navigator>
-
-          <navigator class='new_nav_each f-item'  url='/pages/goodsGift/goodsGift?classify_name=礼物盒&classify_des=礼物盒&id=2986'>
-            <image src='/images/index_top_menu_sec_2.jpg'  class='new_nav_icon'></image>
-            <view  class="new_nav_name">心礼盒</view> 
-          </navigator>
-
-          <navigator class='new_nav_each f-item'  url='/pages/brandList/brandList'>
-            <image src='/images/index_top_menu_sec_3.jpg'  class='new_nav_icon'></image>
-            <view  class="new_nav_name">品牌专区</view> 
-          </navigator>
-          <navigator class='new_nav_each f-item'  url='/customized/pages/index/index'>
-            <image src='/images/index_top_menu_sec_4.jpg'  class='new_nav_icon'></image>
-            <view  class="new_nav_name">产品定制</view> 
-          </navigator> 
-
-          <navigator class='new_nav_each f-item'  url='/pages/aboutUs/aboutUs'>
-            <image src='/images/index_top_menu_sec_4.jpg'  class='new_nav_icon'></image>
-            <view  class="new_nav_name">关于我们</view> 
-          </navigator> 
-        </view> -->
+        </view>
         <!-- nav -->
         <!-- nav -->
         <view class='nav-box'>
         <view class='nav-box'>
           <view class='f-box f-flex-wrap '>
           <view class='f-box f-flex-wrap '>

+ 7 - 2
pages/index/index.wxss

@@ -449,9 +449,14 @@ page{
 /* new second nav */
 /* new second nav */
 .new_nav_wrap{
 .new_nav_wrap{
   width: 100%;
   width: 100%;
-  height:130rpx ;
   overflow: hidden;
   overflow: hidden;
-  padding-top:32rpx;
+  padding:50rpx 0;
+  background: #ffffff;
+  margin-bottom:16rpx;
+}
+.new_nav_wrap .iconfont{
+  font-size:60rpx;
+  margin-bottom:6rpx;
 }
 }
 .new_nav_each{
 .new_nav_each{
   /* float: left;
   /* float: left;

+ 14 - 5
pages/login/login.js

@@ -9,7 +9,8 @@ Page({
   data: {
   data: {
     account:null,
     account:null,
     pwd:null,
     pwd:null,
-    url:null
+    url:null,
+    type:0 //默认nav 为1表示switch
   },
   },
 
 
   /**
   /**
@@ -17,7 +18,8 @@ Page({
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
     this.setData({
     this.setData({
-      url:options.url
+      url:options.url,
+      type: options.type ? options.type : 0
     })
     })
   },
   },
 
 
@@ -110,9 +112,16 @@ Page({
               },
               },
               success(res) {
               success(res) {
                 wx.setStorageSync('channelName', res.data.channel.channelName)
                 wx.setStorageSync('channelName', res.data.channel.channelName)
-                wx.redirectTo({
-                  url: that.data.url,
-                })
+                if(that.data.type ==1){
+                  wx.switchTab({
+                    url: that.data.url,
+                  })
+                } else {
+                  wx.redirectTo({
+                    url: that.data.url,
+                  })
+                }
+                
               }
               }
             })
             })
           
           

+ 6 - 1
pages/momo/momo.js

@@ -60,7 +60,7 @@ Page({
    * 生命周期函数--监听页面初次渲染完成
    * 生命周期函数--监听页面初次渲染完成
    */
    */
   onReady: function () {
   onReady: function () {
-
+    
   },
   },
 
 
   /**
   /**
@@ -68,6 +68,11 @@ Page({
    */
    */
   onShow: function () {
   onShow: function () {
     let that = this;
     let that = this;
+    if (!wx.getStorageSync('channelIdObj')) { // 还没有登录过渠道
+      wx.navigateTo({
+        url: '/pages/login/login?url=/pages/momo/momo && type =1',
+      })
+    }
     if (wx.getStorageSync('channelIdObj').channelId) {
     if (wx.getStorageSync('channelIdObj').channelId) {
       that.setData({
       that.setData({
         loginStatic: true,
         loginStatic: true,

+ 2 - 2
pages/momo/momo.wxml

@@ -19,11 +19,11 @@
 </view>
 </view>
 <view class='ceng' bindtap='close' wx:if="{{filterStatic}}"></view>
 <view class='ceng' bindtap='close' wx:if="{{filterStatic}}"></view>
 <!-- footer -->
 <!-- footer -->
-<view class='momo-footer'>
+<!-- <view class='momo-footer'>
   <view class='mf-box f-box'>
   <view class='mf-box f-box'>
     <navigator class='f-item' open-type="switchTab" wx:for="{{tabBar.list}}" url='{{item.pagePath}}'>
     <navigator class='f-item' open-type="switchTab" wx:for="{{tabBar.list}}" url='{{item.pagePath}}'>
       <image src='{{item.iconPath}}' class='img'></image>
       <image src='{{item.iconPath}}' class='img'></image>
       <view>{{item.text}}</view>
       <view>{{item.text}}</view>
     </navigator>
     </navigator>
   </view>
   </view>
-</view>
+</view> -->