<template>
    <div class="page">
        <van-cell :border="false" center title="传奇数藏官方邮箱" value="内容" :label="email" @click="copy">
            <div class="btn">点击复制</div>
        </van-cell>

        <van-cell :border="false" center title="微信二维码">
            <template #label>
                <van-image class="code" width="179" height="179" :src="codeImg" />
                <div class="text">长按添加传奇数藏官，活动好礼领不停</div>
            </template>
        </van-cell>
    </div>
</template>

<script>
export default {
    data() {
        return {
            codeImg: 'https://lasuo.oss-cn-hangzhou.aliyuncs.com/nft/2022-07-13-10-06-30abAqgmuL.png',
            email: 'lhaaso@126.com'
        };
    },
    mounted() {
        // this.$http.get('/sysConfig/get/customer_group').then(res => {
        //     this.codeImg = res.value;
        // });
    },
    methods: {
        copy() {
            this.$copyText(this.email).then(
                e => {
                    this.$toast.success('复制成功');
                    console.log(e);
                },
                e => {
                    this.$toast('复制失败');
                    console.log(e);
                }
            );
        }
    }
};
</script>

<style lang="less" scoped>
.title {
    background-color: @bg;
    padding: 10px 16px;
    font-size: 20px;
    font-weight: bold;
    color: @text0;
    line-height: 30px;
}
.page {
    background-color: @bg;
}

.van-cell-group {
    background-color: @bg;
}
.van-cell {
    padding: 23px 16px;
    background-color: fade(@bg2, 50%);
    margin: 16px 16px 0;
    box-sizing: border-box;
    width: auto;
    border-radius: 12px;
    font-size: 16px;
    /deep/.van-cell__label {
        font-size: 14px;
    }

    /deep/.van-cell__value {
        font-size: 15px;
    }
}
.logout {
    padding: 50px 30px 50px;
}
.code {
    margin: auto;
    display: block;
    margin-top: 20px;
}

.text {
    font-size: 14px;
    color: #ffffff44;
    line-height: 20px;
    text-align: center;
    margin-top: 14px;
}

.btn {
    font-size: 15px;
    color: #077dff;
    line-height: 22px;
}
</style>
