zengh
2022-05-09 52c39f5e2711e5535b689b66dfa5e100c7882b7f
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
50
51
52
53
54
55
56
57
58
59
60
61
<template>
    <view class="squareBut">
        <view class="once" v-for="(item,index) in data" :key="index" @click="goHref(index)">
            <view class="imgs">
                <image :src="item.imgSrc" mode=""></image>
            </view>
            <view class="title">
                {{item.title}}
            </view>
        </view>
        <view style="clear:left"></view>
    </view>
</template>
 
<script>
    export default {
        props: ['data'],
        methods:{
            goHref(index){
                // console.log(this.data[index].goHref)
                wx.navigateTo({
                    url:this.data[index].goHref
                })
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .squareBut {
        width: 95%;
        margin: 0 auto;
        border: 1px solid rgba($color: #000000, $alpha: 0.03);
        border-radius: 1rem;
        .once {
            width: 6rem;
            height: 6rem;
            border-right: 1px solid rgba($color: #000000, $alpha: 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            border-radius: 1rem;
            box-shadow: 0.1rem 0.1rem 0.5rem 0.01rem #dadada;
            float: left;
            margin: 0.65rem;
 
            .imgs {
                width: 4rem;
                height: 4rem;
 
                image {
                    width: 100%;
                    height: 100%;
                }
            }
 
            .title {}
        }
    }
</style>