|
|
@ -202,8 +202,103 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<text class="seeMore">查看更多></text>
|
|
|
|
<text class="seeMore">查看更多></text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="swiperBox">
|
|
|
|
|
|
|
|
<swiper :indicator-dots="false" :autoplay="true" :circular="true" :interval="3000" :duration="1000"
|
|
|
|
|
|
|
|
:display-multiple-items="2.3" style="height: 400rpx;">
|
|
|
|
|
|
|
|
<swiper-item>
|
|
|
|
|
|
|
|
<view class="swiper-item">
|
|
|
|
|
|
|
|
<image class="swiper-img" src="/static/test/test3.png" mode="aspectFill"></image>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</swiper-item>
|
|
|
|
|
|
|
|
<swiper-item>
|
|
|
|
|
|
|
|
<view class="swiper-item">
|
|
|
|
|
|
|
|
<image class="swiper-img" src="/static/test/test4.png" mode="aspectFill"></image>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</swiper-item>
|
|
|
|
|
|
|
|
<swiper-item>
|
|
|
|
|
|
|
|
<view class="swiper-item">
|
|
|
|
|
|
|
|
<image class="swiper-img" src="/static/test/test5.png" mode="aspectFill"></image>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</swiper-item>
|
|
|
|
|
|
|
|
</swiper>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<diamondLine></diamondLine>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="content content6">
|
|
|
|
|
|
|
|
<view class="barBox">
|
|
|
|
|
|
|
|
<view class="titleBox">
|
|
|
|
|
|
|
|
<text>成功案例</text>
|
|
|
|
|
|
|
|
<view class="purpleBox"></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<text class="seeMore">查看更多></text>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="headBox">
|
|
|
|
|
|
|
|
<view class="headbar">
|
|
|
|
|
|
|
|
<view class="barItem" :class="activeOne === 0?'active':''" @click="changeBar(0)">
|
|
|
|
|
|
|
|
<text>同康美妆</text>
|
|
|
|
|
|
|
|
<view class="xiahuaxian" v-show="activeOne === 0"></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="barItem" :class="activeOne === 1?'active':''" @click="changeBar(1)">
|
|
|
|
|
|
|
|
<text>中国药材</text>
|
|
|
|
|
|
|
|
<view class="xiahuaxian" v-show="activeOne === 1"></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="barItem" :class="activeOne === 2?'active':''" @click="changeBar(2)">
|
|
|
|
|
|
|
|
<text>中国药材</text>
|
|
|
|
|
|
|
|
<view class="xiahuaxian" v-show="activeOne === 2"></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="barItem" :class="activeOne === 3?'active':''" @click="changeBar(3)">
|
|
|
|
|
|
|
|
<text>中国药材</text>
|
|
|
|
|
|
|
|
<view class="xiahuaxian" v-show="activeOne === 3"></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="barItem" :class="activeOne === 3?'active':''" @click="changeBar(3)">
|
|
|
|
|
|
|
|
<text>中国药材</text>
|
|
|
|
|
|
|
|
<view class="xiahuaxian" v-show="activeOne === 3"></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="barItem" :class="activeOne === 3?'active':''" @click="changeBar(3)">
|
|
|
|
|
|
|
|
<text>中国药材</text>
|
|
|
|
|
|
|
|
<view class="xiahuaxian" v-show="activeOne === 3"></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="barItem" :class="activeOne === 3?'active':''" @click="changeBar(3)">
|
|
|
|
|
|
|
|
<text>中国药材</text>
|
|
|
|
|
|
|
|
<view class="xiahuaxian" v-show="activeOne === 3"></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="scroll11">
|
|
|
|
|
|
|
|
<view class="swiperBox">
|
|
|
|
|
|
|
|
<scroll-view scroll-x="true" scroll-y="false" class="scrollView" :enable-flex="true" :scroll-into-view="`scroll-${activeOne}`"
|
|
|
|
|
|
|
|
:show-scrollbar="false" scroll-with-animation="true" @touchmove.prevent="handleTouchMove" style="touch-action: none;">
|
|
|
|
|
|
|
|
<view class="scroll-item" v-for="(item,index) in 4" :id="`scroll-${index}`">
|
|
|
|
|
|
|
|
<image class="swiper-img" src="/static/test/test3.png" mode="widthFix"></image>
|
|
|
|
|
|
|
|
<text>{{index}}</text>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</scroll-view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 使用封装的滚动组件 -->
|
|
|
|
|
|
|
|
<DIYScrollView
|
|
|
|
|
|
|
|
direction="x"
|
|
|
|
|
|
|
|
:itemCount="4"
|
|
|
|
|
|
|
|
:activeIndex="activeOne"
|
|
|
|
|
|
|
|
@update:activeIndex="val => activeOne = val"
|
|
|
|
|
|
|
|
itemSelector=".scroll-item"
|
|
|
|
|
|
|
|
class="list-scroll scrollView"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<view class="list" style="margin: 0 26rpx;">
|
|
|
|
|
|
|
|
<view class="scroll-item" v-for="(item,index) in 4" :id="`scroll-${index}`">
|
|
|
|
|
|
|
|
<image class="swiper-img" src="/static/test/test3.png" mode="widthFix"></image>
|
|
|
|
|
|
|
|
<text>{{index}}</text>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</DIYScrollView>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<tabbar :tabIndex="0"></tabbar>
|
|
|
|
<tabbar :tabIndex="0"></tabbar>
|
|
|
@ -211,9 +306,21 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
import { ref } from 'vue';
|
|
|
|
import { ref, nextTick } from 'vue';
|
|
|
|
import diamondLine from '../../components/diamondLine/diamondLine.vue';
|
|
|
|
import diamondLine from '../../components/diamondLine/diamondLine.vue';
|
|
|
|
|
|
|
|
import DIYScrollView from '../../components/DIYScrollView/DIYScrollView.vue';
|
|
|
|
|
|
|
|
const activeOne = ref(0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const changeBar = (index)=>{
|
|
|
|
|
|
|
|
if(activeOne.value == index) return;
|
|
|
|
|
|
|
|
activeOne.value = index
|
|
|
|
|
|
|
|
nextTick()
|
|
|
|
|
|
|
|
console.log("1212",activeOne.value)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const handleTouchMove = (e)=> {
|
|
|
|
|
|
|
|
e.preventDefault(); // 强制阻止默认滚动行为
|
|
|
|
|
|
|
|
return false; // 增强阻止效果
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
@ -222,6 +329,7 @@ import diamondLine from '../../components/diamondLine/diamondLine.vue';
|
|
|
|
min-height: 100vh;
|
|
|
|
min-height: 100vh;
|
|
|
|
box-sizing: border-box;
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
background: #FAFBFF;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.indexBG{
|
|
|
|
.indexBG{
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
@ -761,4 +869,72 @@ import diamondLine from '../../components/diamondLine/diamondLine.vue';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.content5{
|
|
|
|
|
|
|
|
.swiperBox{
|
|
|
|
|
|
|
|
margin-top: 26rpx;
|
|
|
|
|
|
|
|
.swiper-img{
|
|
|
|
|
|
|
|
width: 272rpx;
|
|
|
|
|
|
|
|
height: 380rpx;
|
|
|
|
|
|
|
|
border-radius: 18rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.content6{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.headbar{
|
|
|
|
|
|
|
|
margin: 26rpx;
|
|
|
|
|
|
|
|
min-height: 64rpx;
|
|
|
|
|
|
|
|
@include flexBox(start,center);
|
|
|
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
scrollbar-width: none;
|
|
|
|
|
|
|
|
/* 隐藏 WebKit 内核浏览器(Chrome、Safari、小程序等)的滚动条 */
|
|
|
|
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
/* 直接隐藏滚动条 */
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.barItem{
|
|
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
|
|
margin-right: 26rpx;
|
|
|
|
|
|
|
|
@include fontStyle(28rpx,#666666,left,400,38rpx);
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.xiahuaxian{
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
bottom: -14rpx;
|
|
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
|
|
transform: translate(-50%,0);
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 0rpx;
|
|
|
|
|
|
|
|
border: 2rpx solid #000000;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&.active{
|
|
|
|
|
|
|
|
color: #000000 !important;
|
|
|
|
|
|
|
|
font-weight: bold !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.scroll11{
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
.scrollView{
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
@include flexBox(start,start);
|
|
|
|
|
|
|
|
// flex-wrap: nowrap;
|
|
|
|
|
|
|
|
overflow: auto;
|
|
|
|
|
|
|
|
.scroll-item{
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
flex-shrink: 0; /* 核心:禁止子元素被压缩 */
|
|
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
padding: 26rpx;
|
|
|
|
|
|
|
|
.swiper-img{
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: auto;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|