|
@@ -42,12 +42,23 @@
|
|
<van-tabs title-active-color="#D9332E" v-model="activeindex" @click.stop="onChange">
|
|
<van-tabs title-active-color="#D9332E" v-model="activeindex" @click.stop="onChange">
|
|
<van-tab :name="0" title="服务项目">
|
|
<van-tab :name="0" title="服务项目">
|
|
<view>
|
|
<view>
|
|
- <view class="giveList">
|
|
|
|
|
|
+ <swiper class="swiper2" :style="{height:sHeight}" @change="transition">
|
|
|
|
+ <swiper-item class="flex-box flex-d-wrap" v-for="(item, index) in category_list" :key="index">
|
|
|
|
+ <view class="giveItem" v-for="(item2, index2) in item" :key="index2" @click.stop="godetail(item2)">
|
|
|
|
+ <image :src="item2.pic" style="width:100%;height: 69%;"></image>
|
|
|
|
+ <p style="text-align: center;font-size: 24rpx;">{{ item2.gc_name }}</p>
|
|
|
|
+ </view>
|
|
|
|
+ </swiper-item>
|
|
|
|
+ </swiper>
|
|
|
|
+ <view class="flex-box flex-center-center" style="margin-bottom: 20upx;">
|
|
|
|
+ <view v-for="(item, index) in category_list" :key="index" class="swiperDian" :class="isActive==index ? 'activeDian':''"></view>
|
|
|
|
+ </view>
|
|
|
|
+<!-- <view class="giveList">
|
|
<view class="giveItem" v-for="(item, index) in category_list" :key="index" @click.stop="godetail(item)">
|
|
<view class="giveItem" v-for="(item, index) in category_list" :key="index" @click.stop="godetail(item)">
|
|
<image :src="item.pic" style="width:100%;height: 69%;"></image>
|
|
<image :src="item.pic" style="width:100%;height: 69%;"></image>
|
|
<p style="text-align: center;font-size: 24rpx;">{{ item.gc_name }}</p>
|
|
<p style="text-align: center;font-size: 24rpx;">{{ item.gc_name }}</p>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
<view style="padding: 0upx 18upx 20upx 18upx;">
|
|
<view style="padding: 0upx 18upx 20upx 18upx;">
|
|
<view style="width: 95%;margin: 0 auto;">
|
|
<view style="width: 95%;margin: 0 auto;">
|
|
<view @click.stop="choseType(1)" :class="tabIndex == 1 ? 'active' : ''" class="typeItem">综合</view>
|
|
<view @click.stop="choseType(1)" :class="tabIndex == 1 ? 'active' : ''" class="typeItem">综合</view>
|
|
@@ -125,7 +136,7 @@
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
<view v-if="activeindex == 2" class="bottomButton"><button type="warn" @click="gofeedback">您的入住意见反馈(反馈送圈币)</button></view>
|
|
<view v-if="activeindex == 2" class="bottomButton"><button type="warn" @click="gofeedback">您的入住意见反馈(反馈送圈币)</button></view>
|
|
- <Gobacktop @getop="getop" v-if="isTop" />
|
|
|
|
|
|
+ <Gobacktop @getop="getop" :height="80" v-if="isTop" />
|
|
</van-skeleton>
|
|
</van-skeleton>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -181,7 +192,7 @@ export default {
|
|
goods_price: '', // 价格排序 desc-降序 asc-尚需
|
|
goods_price: '', // 价格排序 desc-降序 asc-尚需
|
|
praise: '', // 好评率排序 desc-降序 asc-尚需
|
|
praise: '', // 好评率排序 desc-降序 asc-尚需
|
|
keyword: '', //g 关键字搜索
|
|
keyword: '', //g 关键字搜索
|
|
- category_list: [{ gc_id_1: '', gc_name: '全部' }], // 一级菜单栏
|
|
|
|
|
|
+ category_list: [], // 一级菜单栏
|
|
tabIndex: 1,
|
|
tabIndex: 1,
|
|
isprice: 0,
|
|
isprice: 0,
|
|
menu: [
|
|
menu: [
|
|
@@ -213,7 +224,9 @@ export default {
|
|
scrollTop: 0,
|
|
scrollTop: 0,
|
|
old: { scrollTop: 0 },
|
|
old: { scrollTop: 0 },
|
|
value1: 0,
|
|
value1: 0,
|
|
- iScrolltop: 1
|
|
|
|
|
|
+ iScrolltop: 1,
|
|
|
|
+ sHeight:'100px',//商品分类轮播高度
|
|
|
|
+ isActive:0//商品分类默认选中
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onShareAppMessage(res) {
|
|
onShareAppMessage(res) {
|
|
@@ -263,6 +276,9 @@ export default {
|
|
...mapState(['hasLogin', 'userInfo', 'successlogion'])
|
|
...mapState(['hasLogin', 'userInfo', 'successlogion'])
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ transition(e){
|
|
|
|
+ this.isActive=e.detail.current;
|
|
|
|
+ },
|
|
openPhone(){
|
|
openPhone(){
|
|
uni.makePhoneCall({
|
|
uni.makePhoneCall({
|
|
phoneNumber: this.storeinformation.store_phone //仅为示例
|
|
phoneNumber: this.storeinformation.store_phone //仅为示例
|
|
@@ -427,11 +443,21 @@ export default {
|
|
});
|
|
});
|
|
let array = [{ gc_id: '', gc_name: '全部' }];
|
|
let array = [{ gc_id: '', gc_name: '全部' }];
|
|
_this.classify = array.concat(category_list);
|
|
_this.classify = array.concat(category_list);
|
|
- _this.category_list = category_list.splice(0, 10);
|
|
|
|
|
|
+ if(category_list.length>5){
|
|
|
|
+ _this.sHeight="200px";
|
|
|
|
+ }
|
|
|
|
+ _this.category_list =_this.group(category_list,10);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ group(array, subGroupLength) {
|
|
|
|
+ let index = 0;
|
|
|
|
+ let newArray = [];
|
|
|
|
+ while(index < array.length) {
|
|
|
|
+ newArray.push(array.slice(index, index += subGroupLength));
|
|
|
|
+ }
|
|
|
|
+ return newArray;
|
|
|
|
+ },
|
|
onChange(event) {
|
|
onChange(event) {
|
|
this.activeindex = event.detail.name;
|
|
this.activeindex = event.detail.name;
|
|
this.page = 1;
|
|
this.page = 1;
|
|
@@ -549,6 +575,19 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
+.swiperDian{
|
|
|
|
+ width:46upx;
|
|
|
|
+ height: 6upx;
|
|
|
|
+ border-radius: 3px;
|
|
|
|
+ background-color: #C7C7C7;
|
|
|
|
+}
|
|
|
|
+.activeDian{
|
|
|
|
+ background-color: #D9332E;
|
|
|
|
+}
|
|
|
|
+.swiper2{
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: auto;
|
|
|
|
+}
|
|
.search{
|
|
.search{
|
|
position: fixed;
|
|
position: fixed;
|
|
top: 65upx;
|
|
top: 65upx;
|
|
@@ -622,6 +661,7 @@ export default {
|
|
padding: 10upx 12upx;
|
|
padding: 10upx 12upx;
|
|
display: flex;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
|
+ overflow-x: scroll;
|
|
}
|
|
}
|
|
.giveItem {
|
|
.giveItem {
|
|
height: 150rpx;
|
|
height: 150rpx;
|