Skip to content

Commit

Permalink
feat: 添加图片热区组件、轮播图组件添加控制轮播组件
Browse files Browse the repository at this point in the history
  • Loading branch information
keleSalt committed Sep 4, 2023
1 parent 18cd888 commit e12e256
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 8 deletions.
9 changes: 2 additions & 7 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "星品购",
"name": "星品",
"appid": "__UNI__082C0BA",
"description": "Shopro是由SheepJS团队开发,使用Uniapp+Vue3技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
"versionName": "1.8.3",
Expand Down Expand Up @@ -194,12 +194,7 @@
"optimization": {
"subPackages": true
},
"plugins": {
"live-player-plugin": {
"version": "1.3.5",
"provider": "wx2b03c6e691cd7370"
}
},
"plugins": {},
"lazyCodeLoading": "requiredComponents",
"usingComponents": {},
"permission": {},
Expand Down
2 changes: 2 additions & 0 deletions sheep/components/s-block-item/s-block-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<s-seckill-block v-if="type === 'seckill'" :data="data" :styles="styles"></s-seckill-block>
<s-groupon-block v-if="type === 'groupon'" :data="data" :styles="styles"></s-groupon-block>
<s-richtext-block v-if="type === 'richtext'" :data="data" :styles="styles"></s-richtext-block>
<s-hotzone-block v-if="type === 'hotzone'" :data="data" :styles="styles"></s-hotzone-block>

</view>
</template>

Expand Down
45 changes: 45 additions & 0 deletions sheep/components/s-hotzone-block/s-hotzone-block.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<template>
<view class="hotzone-wrap">
<image :src="sheep.$url.cdn(data.src)" style="width: 100%" mode="widthFix"></image>
<view
class="hotzone-box"
v-for="item in data.list"
:key="item.width"
:style="[
{
top: item.top + 'rpx',
left: item.left + 'rpx',
width: item.width + 'rpx',
height: item.height + 'rpx',
},
]"
@tap.stop="sheep.$router.go(item.url)"
>
</view>
</view>
</template>

<script setup>
import sheep from '@/sheep';
// 接收参数
const props = defineProps({
data: {
type: Object,
default: () => ({}),
},
styles: {
type: Object,
default: () => ({}),
},
});
</script>

<style lang="scss" scoped>
.hotzone-wrap {
position: relative;
}
.hotzone-box {
position: absolute;
}
</style>
2 changes: 2 additions & 0 deletions sheep/components/s-image-banner/s-image-banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
imageMode="widthFix"
dotCur="bg-mask-40"
:seizeHeight="300"
:autoplay="data.autoplay"
:interval="Number(data.interval)"
/>
</template>

Expand Down
2 changes: 1 addition & 1 deletion sheep/ui/su-swiper/su-swiper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
},
interval: {
type: Number,
default: 5000,
default: 3000,
},
duration: {
type: Number,
Expand Down

0 comments on commit e12e256

Please sign in to comment.