137 lines
2.8 KiB
Vue
137 lines
2.8 KiB
Vue
<template>
|
|
<view class="code">
|
|
<image class="code-back main-back" src="@/static/code/code_back.png" mode="widthFix"></image>
|
|
<image class="code-back header-back" src="@/static/code/code_header.png" mode="widthFix"></image>
|
|
<image class="code-back img-lay" src="@/static/code/code_img_lay.png" mode="widthFix"></image>
|
|
<view class="code-content">
|
|
<view class="header">
|
|
<image class="sign" src="@/static/code/code_sign.png" mode="widthFix"></image>
|
|
<image class="logo" src="@/static/code/code_logo.png" mode="widthFix"></image>
|
|
</view>
|
|
<view class="block">
|
|
<view class="qrcode">
|
|
<l-painter class="qrcode-src">
|
|
<l-painter-qrcode
|
|
:text="'http://web.douhuofalv.com/login/register?invite_code=' + invite"
|
|
css="width: 260rpx; height: 260rpx; background-color:white; padding: 20rpx; border-radius: 10rpx;"
|
|
/>
|
|
</l-painter>
|
|
<view class="qrcode-text">邀请码{{invite}}</view>
|
|
</view>
|
|
<image class="btn" src="@/static/code/code_btn.png" mode="widthFix"></image>
|
|
</view>
|
|
<image class="footer" src="@/static/code/code_footer.png" mode="widthFix"></image>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { code } from '@/apis/interfaces/user.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
invite: ''
|
|
};
|
|
},
|
|
created() {
|
|
code().then( res => {
|
|
let { invite } = res;
|
|
this.invite = invite
|
|
}).catch(err => {
|
|
uni.showToast({
|
|
title: err.message,
|
|
icon : 'none'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.code {
|
|
background: #1F25AE;
|
|
height: 100vh;
|
|
position: relative;
|
|
|
|
.code-back {
|
|
width: 100%;
|
|
position: absolute
|
|
}
|
|
|
|
.main-back {
|
|
top: 20vh;
|
|
}
|
|
|
|
.header-back {
|
|
z-index: 1;
|
|
}
|
|
|
|
.img-lay {
|
|
width: 30vw;
|
|
bottom: 0;
|
|
left: 0;
|
|
z-index: 1;
|
|
}
|
|
|
|
.code-content {
|
|
position: absolute;
|
|
padding: 50rpx;
|
|
z-index: 2;
|
|
width: 100%;
|
|
height: 100%;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
|
|
.header {
|
|
text-align: center;
|
|
width: 100%;
|
|
|
|
.sign {
|
|
width: 90%;
|
|
vertical-align: top;
|
|
margin-bottom: 30rpx;
|
|
}
|
|
|
|
.logo {
|
|
width: 25vw;
|
|
}
|
|
}
|
|
|
|
.block {
|
|
text-align: center;
|
|
margin-bottom: 30rpx;
|
|
|
|
.qrcode {
|
|
display: inline-block;
|
|
border: solid 2rpx #ECC997;
|
|
background: #0E2660;
|
|
border-radius: 20rpx;
|
|
padding: 30rpx;
|
|
.qrcode-src {
|
|
width: 300rpx;
|
|
height: 300rpx;
|
|
}
|
|
.qrcode-text {
|
|
text-align: center;
|
|
color: #FFF5C6;
|
|
line-height: 50rpx;
|
|
padding-top: 30rpx;
|
|
}
|
|
}
|
|
.btn {
|
|
width: 400rpx;
|
|
margin-top: 30rpx;
|
|
}
|
|
}
|
|
|
|
.footer {
|
|
width: 70%;
|
|
vertical-align: top;
|
|
}
|
|
}
|
|
}
|
|
</style>
|