浏览代码

feat: 添加图片热区组件、轮播图组件添加控制轮播组件

kele 1 年之前
父节点
当前提交
e12e2565f0

+ 2 - 7
manifest.json

@@ -1,5 +1,5 @@
 {
-  "name": "星品",
+  "name": "星品",
   "appid": "__UNI__082C0BA",
   "description": "Shopro是由SheepJS团队开发,使用Uniapp+Vue3技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
   "versionName": "1.8.3",
@@ -194,12 +194,7 @@
     "optimization": {
       "subPackages": true
     },
-    "plugins": {
-      "live-player-plugin": {
-        "version": "1.3.5",
-        "provider": "wx2b03c6e691cd7370"
-      }
-    },
+    "plugins": {},
     "lazyCodeLoading": "requiredComponents",
     "usingComponents": {},
     "permission": {},

+ 2 - 0
sheep/components/s-block-item/s-block-item.vue

@@ -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>
 

+ 45 - 0
sheep/components/s-hotzone-block/s-hotzone-block.vue

@@ -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 - 0
sheep/components/s-image-banner/s-image-banner.vue

@@ -5,6 +5,8 @@
     imageMode="widthFix"
     dotCur="bg-mask-40"
     :seizeHeight="300"
+    :autoplay="data.autoplay"
+    :interval="Number(data.interval)"
   />
 </template>
 

+ 1 - 1
sheep/ui/su-swiper/su-swiper.vue

@@ -116,7 +116,7 @@
     },
     interval: {
       type: Number,
-      default: 5000,
+      default: 3000,
     },
     duration: {
       type: Number,