Jelajahi Sumber

Merge branch 'master' of http://git.sjzkeji.com/panghu/school_webUser

py 2 tahun lalu
induk
melakukan
b6ab84c391
4 mengubah file dengan 52 tambahan dan 15 penghapusan
  1. 13 12
      components/en-utils/en-nav/en-nav.vue
  2. 6 0
      pages.json
  3. 16 3
      pages/index/index.vue
  4. 17 0
      pages/index/search-record.vue

+ 13 - 12
components/en-utils/en-nav/en-nav.vue

@@ -8,25 +8,25 @@
 		  'align-items-center':!customNav,
 		  }"
         :style="[{'height': customBarH + 'px', 'padding-top': statusBarH + 'px','background':bgckgroundBox}]">
-        <view @tap="goBack">
-   <!--       <text  class="iconfont" v-if="leftShow">
-            &#xe60e;
-          </text> -->
-		  <uni-icons type="left" :color="leftColor" size="18"  v-if="leftShow"></uni-icons>
+        <view @tap="goBack" v-if="leftShow">
+		  <uni-icons type="left" :color="leftColor" size="18"  ></uni-icons>
         </view>
 
         <view v-if="!customNav" class="title-text">{{title}}</view>
-		
 		<view v-else class="">
 			<slot name="custom"></slot>
 		</view>
 		
-        <view  class="right-button button" @click="rightClick">
-          <slot name="right" v-if="rightShow">
+		
+		
+        <view v-if="rightShow" class="right-button button" @click="rightClick">
+          <slot name="right" >
             <text class="rightName" v-if="rightType===1">{{rightText}}</text>
             <text class="rightName r-but" v-else>{{rightText}}</text>
           </slot>
         </view>
+		<view v-else class="w-right"></view>
+		
       </view>
     </view>
 	
@@ -115,7 +115,6 @@
         if(!this.leftShow){
           return ;
         }
-        // this.$emit('leftClick')
         tools.leftClick()
       }
     },
@@ -126,14 +125,14 @@
           let custom=0;
           //#ifdef MP-WEIXIN
           custom = wx.getMenuButtonBoundingClientRect()
-		  console.log(custom,'11111111111111');
+		  
           this.customBarH = custom.height
           //#endif
           //#ifdef H5
           this.customBarH = 30
           this.left=0
           //#endif
-          console.log('self.customBarH---------'+this.customBarH)
+          
           this.$emit('navHeight', this.customBarH-10)
         }
       })
@@ -200,7 +199,9 @@
 
   }
 
-
+  .w-right{
+	  width: 20rpx;
+  }
 
   .box-title {
     width: 100vw;

+ 6 - 0
pages.json

@@ -52,6 +52,12 @@
 			"style": {
 				"navigationBarTitleText": "订单"
 			}
+		},
+		{
+			"path": "pages/index/search-record",
+			"style": {
+				"navigationBarTitleText": "搜索"
+			}
 		}
 	],
 	"subPackages": [

+ 16 - 3
pages/index/index.vue

@@ -15,7 +15,8 @@
 		</view>
 		
 		<!-- 搜索 -->
-		<view class="index-search box-border-box" :style="[{'top': BarH + 'px','background':bgckgroundSearch}]">
+		<view class="index-search box-border-box" @click="toUrl(1)"
+		:style="[{'top': BarH + 'px','background':bgckgroundSearch}]">
 			<view class="index-search-box box-border-box align-items-center">
 				<uni-icons type="search" size="20" color="#000"></uni-icons>
 				<view class="fs-28 fc-9 ml-10">搜索店铺名称或者商品名称</view>
@@ -83,7 +84,7 @@
 			
 			
 			<!-- 类型选择 -->
-			<view class="type-list-box display-flex" :style="[{'top': (BarH + 38) + 'px','background':bgckgroundType}]">
+			<view class="type-list-box display-flex" :style="[{'background':bgckgroundType}]">
 				<view class="type-item-box view-nowrap" :class="type==item.id?'s-type':'n-type'" v-for="(item,i) in typeList" :key="i">{{item.name}}</view>
 			</view>
 			<!-- 商品列表 -->
@@ -181,6 +182,9 @@
 			    let custom = 0;
 			    custom = wx.getMenuButtonBoundingClientRect()	  
 			    let customBarH = custom.height;
+				
+				console.log(statusBarH);
+				console.log(customBarH);
 				this.BarH = statusBarH + customBarH;
 			  }
 			})
@@ -189,7 +193,14 @@
       
 		},
 		methods: {
-			
+			toUrl(type){
+				if(type === 1){
+					// 去搜索
+					uni.navigateTo({
+						url:'/pages/index/search-record'
+					})
+				}
+			}
 		},
 	}
 </script>
@@ -322,6 +333,8 @@
 			.type-list-box{
 				position: sticky;
 				left: 0;
+				// top: calc(var(BarH)px + 93rpx);
+				top: calc(86px + 93rpx);
 				padding: 0 24rpx 24rpx 24rpx;
 				overflow-x: scroll;
 				

+ 17 - 0
pages/index/search-record.vue

@@ -0,0 +1,17 @@
+<template>
+	<view class="seacrh-record-index">
+		<Nav title='搜索' bgckgroundBox='transparent'></Nav>
+	</view>
+</template>
+
+<script>
+	export default {
+		
+	}
+</script>
+
+<style scoped lang="scss">
+	.seacrh-record-index{
+		
+	}
+</style>