移动系统liao
2024-11-12 1cb49b04ae6709e6054c328f5ed12bff9ca014c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<template>
    <!-- 单图 -->
    <view class="coreshop-imgsingle coreshop-bg-white" v-if="listData && listData.length > 0">
        <view v-for="(child, index) in listData" :key="index">
            <view @click="taped(child)">
                <image class="ad-img" :src="child.image" mode="widthFix"></image>
            </view>
            <view class="imgup-btn" v-if="child.buttonText != ''" @click="showSliderInfo(child.linkType, child.linkValue)">
                <button class="coreshop-btn" :style="{background:child.buttonColor,color:child.textColor}">{{child.buttonText}}</button>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        name: "coreshopImgSingle",
        props: {
            coreshopData: {
                type: Array,
                required: true,
            }
        },
        data() {
            return {
                count: 0,
                listData: [],
            }
        },
        created() {
            this.listData = this.coreshopData;
        },
        methods: {
            taped(item) {
                this.showSliderInfo(item.linkType, item.linkValue);
            },
        },
    }
</script>
 
<style lang="scss" scoped>
    .coreshop-imgsingle { overflow: hidden; position: relative;
        .ad-img { width: 100%; float: left; }
        .ad-img:last-child { margin-bottom: 0; }
        .imgup-btn { position: absolute; z-index: 1; bottom: 10px; width: 100%; min-height: 30px; text-align: center;
            .coreshop-btn { line-height: 2; font-size: 14px; padding: 0 25px; border-radius: 25px; }
        }
    }
</style>