Browse Source

fix: 修改服务增加滚动条,修改品牌楼层菜单位置,修改推荐店铺的滑动速度

pull/9/head
张耀 3 years ago
parent
commit
176c6918c5
  1. 4
      src/types/activity.d.ts
  2. 8
      src/views/Activity/Activity.vue
  3. 4
      src/views/Brand/recommendShop.vue
  4. 3
      src/views/Brand/shopList.vue
  5. 18
      src/views/Service/Service.vue

4
src/types/activity.d.ts

@ -11,14 +11,12 @@ declare interface Activity {
buildingCode?: string
startDate?: string //开始日期
endDate?: string //结束日期
limitStartDate?: string //上线开始日期
limitEndDate?: string //下线结束日期
fileUrl: string[] //封面
fileUrls?: string[] //活动详情图片列表
floor?: string //楼层
floorOrder?: number
point: string // 导航点
shopCode: string //关联店铺code
logoCode?: string //一些地方用到这个字段
logo_code?: string //一些地方用到这个字段
facilityCode?: string //服务里需要这个字段
}

8
src/views/Activity/Activity.vue

@ -127,14 +127,8 @@ function getData(type: 'mall' | 'shop') {
const fun = type === 'mall' ? getMallActivity() : getShopActivity()
fun.then(res => {
// actList.value = res.data ?? []
const nowDate = new Date()
for (let t = 0; t < res.data.length; t++) {
const ele = res.data[t]
const limitStartDate = new Date(ele.content.limitStartDate)
const limitEndDate = new Date(ele.content.limitEndDate)
if (nowDate.getTime() >= limitStartDate.getTime() && nowDate.getTime() < limitEndDate.getTime()) {
actList.value.push({ id: ele.id, ...ele.content })
}
actList.value.push({ id: res.data[t].id, ...res.data[t].content })
}
showList.value = true
})

4
src/views/Brand/recommendShop.vue

@ -28,7 +28,9 @@
: false
"
:free-mode="{
enabled: true
enabled: true,
momentumRatio: 0.2,
momentumVelocityRatio: 0.2
}"
:enabled="recList.length > 3"
:loop="recList.length > 3"

3
src/views/Brand/shopList.vue

@ -383,10 +383,11 @@ function myScrollEnd() {
padding-left: 0;
.right-control-area {
position: absolute;
top: 134px;
right: 0;
width: 230px;
height: 622px;
margin-top: 134px;
margin-top: 0;
margin-left: 28px;
.format-items {

18
src/views/Service/Service.vue

@ -18,7 +18,7 @@
<!-- 顧客心聲 -->
<PictureText v-if="switchIdx === 1" :ac-list="customerVoiceList" :qr-list="qrCodeList" />
<!-- 服务 -->
<ScrollView v-else ref="actScroll" :list="serviceList" :refresh-delay="200" class="service-scroll" scroll-x>
<ScrollView v-else ref="actScroll" :list="serviceList" :refresh-delay="200" :scrollbar="true" class="service-scroll" scroll-x>
<div style="display: inline-block">
<ul class="act-list">
<serviceItem v-for="(item, index) in serviceList" :key="index" :service-item="item" @click="clickItem"></serviceItem>
@ -126,6 +126,18 @@ getData()
// border-radius: 6px !important;
// }
// }
:deep(.bscroll-horizontal-scrollbar) {
z-index: 3 !important;
width: 500px !important;
background: rgb(0 0 0 / 10%);
border-radius: 6px;
opacity: 1 !important;
.bscroll-indicator {
background: #e00068 !important;
border: none !important;
border-radius: 6px !important;
}
}
.service-container {
overflow: hidden;
padding-top: 152px;
@ -136,7 +148,7 @@ getData()
.service-scroll {
position: relative;
overflow: hidden;
width: 1828px;
width: 1860.5px;
height: 615px;
margin-top: 40px;
margin-left: 0;
@ -149,7 +161,7 @@ getData()
display: grid;
grid-template-rows: 1fr 1fr;
grid-auto-flow: column;
gap: 16px 16px;
gap: 12px 12px;
}
}
}

Loading…
Cancel
Save