|
@@ -6,14 +6,14 @@
|
|
|
<image src="../../static/pcimg/nav_logo@2x.png" mode="" class="logoImg"></image>
|
|
|
</view>
|
|
|
<view class="navTitle">门店学院</view>
|
|
|
- <view class="indexNav" @click="goIndex">首页</view>
|
|
|
+ <view class="indexNav" :class="{'indexActive':data=='index'}" @click="goIndex">首页</view>
|
|
|
<view class="allCategory">
|
|
|
- <view class="allCategoryLine" v-for="(item,index) in allCategory" v-if="index<4">{{item.name}}</view>
|
|
|
+ <view class="allCategoryLine" :class="{'indexActive':itemName==item.name}" v-for="(item,index) in allCategory" v-if="index<4" @click="goItem(item)">{{item.name}}</view>
|
|
|
<view class="allCategoryMore" v-if="allCategory.length>1">
|
|
|
<span @click="moreBtn">更多</span>
|
|
|
<image @click="moreBtn" src="../../static/pcimg/icon_arrow_xia@2x.png" mode="widthFix" class="navmoreImg"></image>
|
|
|
<view class="navMoret" v-show="navMoret">
|
|
|
- <view class="navMoreTline" v-for="(item,index) in allCategory" v-if="index>3">{{item.name}}</view>
|
|
|
+ <view class="navMoreTline" v-for="(item,index) in allCategory" v-if="index>3" @click="goItem(item)">{{item.name}}</view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -31,13 +31,12 @@
|
|
|
<script>
|
|
|
export default {
|
|
|
name: "searchBox",
|
|
|
- props: {
|
|
|
-
|
|
|
- },
|
|
|
+ props: ['data','itemName'],
|
|
|
data() {
|
|
|
return {
|
|
|
allCategory:[],
|
|
|
navMoret:false,
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -52,6 +51,12 @@
|
|
|
url:'../../pages/pc/searchlist'
|
|
|
})
|
|
|
},
|
|
|
+ goItem(item){
|
|
|
+ console.log(item)
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'list?code='+item.code+'&topName='+item.name+'&comment='+item.comment
|
|
|
+ })
|
|
|
+ },
|
|
|
goIndex(){
|
|
|
uni.navigateTo({
|
|
|
url:'../../pages/pc/index'
|
|
@@ -102,9 +107,13 @@
|
|
|
.indexNav{
|
|
|
line-height: 72px;
|
|
|
font-weight: 500;
|
|
|
- color: #FF4F00;
|
|
|
+ color: #3C3C3C;
|
|
|
font-size: 20px;
|
|
|
padding-left: 54px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .indexActive{
|
|
|
+ color: #FF4F00 !important;
|
|
|
}
|
|
|
.allCategory{
|
|
|
display: flex;
|