2024-12-18 15:46:27 +08:00
|
|
|
|
<script setup>
|
|
|
|
|
/**
|
|
|
|
|
* 我的分享
|
|
|
|
|
*/
|
|
|
|
|
import {
|
|
|
|
|
onMounted,
|
|
|
|
|
ref,
|
|
|
|
|
reactive,
|
|
|
|
|
computed,
|
|
|
|
|
getCurrentInstance,
|
|
|
|
|
watch,
|
|
|
|
|
defineExpose,
|
|
|
|
|
} from 'vue';
|
|
|
|
|
import {
|
|
|
|
|
onLoad,
|
|
|
|
|
} from '@dcloudio/uni-app'
|
|
|
|
|
import {
|
|
|
|
|
useStore,
|
|
|
|
|
} from 'vuex'
|
|
|
|
|
import api from '@/api/index.js';
|
|
|
|
|
const store = useStore()
|
|
|
|
|
const userinfo = computed(() => {
|
|
|
|
|
let result = store.state.userinfo
|
|
|
|
|
return result
|
|
|
|
|
})
|
|
|
|
|
// 二维码数据
|
|
|
|
|
const qrData = ref("")
|
|
|
|
|
|
|
|
|
|
onLoad(() => {
|
|
|
|
|
myQrcode()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 查看二维码
|
|
|
|
|
function myQrcode() {
|
|
|
|
|
api.intergral.myQrcode({}).then(rs => {
|
|
|
|
|
qrData.value = `data:image/png;base64, ${uni.arrayBufferToBase64(rs)}`
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<view class="appbw df fdc aic">
|
|
|
|
|
<view class="qrBox pr">
|
|
|
|
|
<image src="/static/myShare.png" mode="aspectFill" />
|
|
|
|
|
|
|
|
|
|
<image class="qr pmid" :src="qrData" mode="aspectFill" />
|
|
|
|
|
</view>
|
2025-02-09 21:32:55 +08:00
|
|
|
|
<view class="button btn lg colourful mt60 plr30">推荐码: {{userinfo.invitationCode}}</view>
|
2024-12-18 15:46:27 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
// 二维码
|
|
|
|
|
.qrBox {
|
|
|
|
|
margin-top: 10vh;
|
|
|
|
|
width: 606rpx;
|
|
|
|
|
height: 606rpx;
|
|
|
|
|
|
|
|
|
|
// 二维码
|
|
|
|
|
.qr {
|
|
|
|
|
width: 374rpx;
|
|
|
|
|
height: 374rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 按钮
|
|
|
|
|
.button {
|
2025-02-09 21:32:55 +08:00
|
|
|
|
min-width: 350rpx;
|
2024-12-18 15:46:27 +08:00
|
|
|
|
}
|
|
|
|
|
</style>
|