@ -23,13 +23,13 @@
< / swiper >
< / view >
< view class = "menu-box" >
< view class = "menu-list" v-for ="(item,index) in menuBtn" :key="index" @tap="searchShop('typeUp',item.value )" >
< view class = "menu-list" v-for ="(item,index) in menuBtn" :key="index" @tap="goDetail('search',item )" >
< img :src ="item.url" alt = "" / >
< view class = "menu-name" > { { item . name } } < / view >
< / view >
< / view >
< view class = "menu-box" >
< view class = "menu-list" v-for ="(item,index) in menuBtn1" :key="index" @tap="searchShop('all','' )" >
< view class = "menu-list" v-for ="(item,index) in menuBtn1" :key="index" @tap="goDetail('search',item )" >
< img :src ="item.url" alt = "" / >
< view class = "menu-name" > { { item . name } } < / view >
< / view >
@ -78,7 +78,7 @@
< / view >
< view class = "shop-tag" >
< text style = "padding: 4rpx 10rpx;background: rgba(223, 255, 176, 1);color: #777;border-radius: 6rpx;" >
{ { item . shopTakeaway . typ e } }
{ { item . shopTypeTitle == undefined ? '美食' : item . shopTypeTitl e } }
< / text >
< / view >
< / view >
@ -95,7 +95,7 @@
< / view >
< / view >
< view class = "shop-bottom" v-if ="item.products != null && item.products.length > 0" >
< view class = "menu-member" v -if = ' item1.isPush = = 1 ' v-for ="(item1,index1) in item.products" :key="index1" @tap="goDetail('product',item1)" >
< view class = "menu-member" v -if = ' item1.isPush = = 1 & & item1.delFlag = = 1 ' v-for ="(item1,index1) in item.products" :key="index1" @tap="goDetail('product',item1)" >
< view class = "menu-img" >
< img :src ="item1.productPicture" alt = "" >
< / view >
@ -141,6 +141,7 @@
shopType : '' ,
shopArea : '' ,
pageNumber : 1 ,
keyWord : '' ,
pageSize : '10' ,
sort : "shoprank" ,
order : "desc" ,
@ -154,43 +155,53 @@
shopList : [ ] ,
menuBtn : [ {
name : '美食' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/d6b53eb217644e74bbf957ff7462c27b.png' ,
index : 1
} , {
name : '甜点饮品' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/b43aea98962b402f900eca84b2c171ae.png' ,
index : 2
} , {
name : '超市便利' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/e082a4c10b9a47f0bdb588fb91bc9afb.png' ,
index : 3
} , {
name : '蔬菜水果' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/e6adc80518c24c488522ab19f036af27.png' ,
index : 4
} , {
name : '看病买药' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/766761af471a4f9f90e9a137f9c4f701.png' ,
index : 5
} ] ,
menuBtn1 : [ {
name : '米粉面馆' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/8d2f7ffb67a4477ebe663f562b3bd018.png' ,
index : 6
} , {
name : '烤肉拌饭' ,
name : '早点' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/5e4fa14df92942eeb62254c8eb82f122.png' ,
index : 7
} , {
name : '快餐' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/05d2286ac1be4ae784858409889690d5.png' ,
index : 8
} , {
name : '麻辣烫冒菜' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/0ac5e0095a5d4097b338ec450df8d3dd.png' ,
index : 9
} , {
name : '汉堡披萨' ,
value : '' ,
url : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/14b93d4bce134b3db4b42b13b6993e6c.png' ,
index : 10
} ] ,
@ -245,6 +256,7 @@
} ,
methods : {
searchShop ( type , value ) {
this . searchForm . pageNumber = 1
if ( type == 'area' ) {
this . searchForm . shopArea = value
} else if ( type == 'score' ) {
@ -279,12 +291,12 @@
for ( let i = 0 ; i < res .result.content.length ; i + + ) {
for ( let m = 0 ; m < this .menuBtn.length ; m + + ) {
if ( this . menuBtn [ m ] . name == res . result . content [ i ] . title ) {
this . menuBtn [ m ] . index = res . result . content [ i ] . value
this . menuBtn [ m ] . value = res . result . content [ i ] . value
}
}
for ( let m = 0 ; m < this .menuBtn1.length ; m + + ) {
if ( this . menuBtn1 [ m ] . name == res . result . content [ i ] . title ) {
this . menuBtn1 [ m ] . index = res . result . content [ i ] . value
this . menuBtn1 [ m ] . value = res . result . content [ i ] . value
}
}
}
@ -353,9 +365,16 @@
url : '/package1/group/groupBuySingle?type=shop&item=' + JSON . stringify ( item )
} )
} else if ( type == 'search' ) {
if ( item ) {
console . log ( "11111" , item )
uni . navigateTo ( {
url : '/package1/group/searchGroup?shopType=' + ( item . value || '' )
} )
} else {
uni . navigateTo ( {
url : '/package1/group/searchGroup'
} )
}
} else {
uni . navigateTo ( {
url : '/package1/group/groupBuySingle?type=product&item=' + JSON . stringify ( item )
@ -376,7 +395,7 @@
< style lang = "scss" >
page {
width : 100 % ;
height : 100 % ;
min - height : 100 % ;
font - size : 24 rpx ;
background : # F5F8F5 ;
color : # 00231 C ;
@ -384,14 +403,16 @@
. page1 {
width : 100 % ;
height : 100 % ;
min - height : 100 vh ;
font - size : 24 rpx ;
position : relative ;
}
. title {
background : url ( 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png' ) no - repeat ;
background - size : 100 % 100 % ;
width : 100 % ;
height : 54 % ;
height : auto ;
padding - bottom : 20 rpx ;
}
. swiper {
width : 100 % ;
@ -499,7 +520,7 @@
}
. shop - member {
width : 100 % ;
height : 480 rpx ;
height : auto ;
border - radius : 20 rpx ;
background : # fff ;
margin - bottom : 20 rpx ;