emis-app/pages/user/exclusiveQrcode.vue

90 lines
2.1 KiB
Vue
Raw Normal View History

2023-12-20 15:17:23 +00:00
<template>
2024-05-10 08:16:17 +00:00
<tpx-page>
<view style="padding: 2rpx 30rpx;">
<view class="blcok-white" style="padding: 40rpx 0;">
<u-row justify="center">
<view>
<u-row>
2024-08-27 15:56:39 +00:00
<u-avatar :src="userInfo.avatar" size="120"></u-avatar>
2024-05-10 08:16:17 +00:00
<view class="pl-30">
<u-row>
<u-text :text="userInfo.empName" size="32" bold="true"></u-text>
<view class="ml-20 font-24 pos-rlt" style="padding: 8rpx 12rpx;">{{userInfo.ownerSiteName}}
<view class="pos-abt-all" style="z-index: 0;background: #999;opacity: 0.2;border-radius: 20rpx;"></view>
</view>
</u-row>
<view class="mt-20 font-24">{{userInfo.phonenumber}}</view>
</view>
</u-row>
<view class="mt-30">
<u-image height="600" width="600" radius="10" :src="qrCodeImgUrl"></u-image>
</view>
<view class="mt-40">
<u-row justify="between">
2024-08-01 05:52:44 +00:00
<view style="flex:1;" @click="handleSave">
2024-05-10 08:16:17 +00:00
<u-button type="primary" custom-style="border-radius: 10rpx;">保存到本地</u-button>
</view>
2024-08-01 05:52:44 +00:00
<!-- <view style="width: 200rpx;" @click="handlePrint">
2024-05-10 08:16:17 +00:00
<u-button type="primary" plain="true" custom-style="border-radius: 10rpx;">打印</u-button>
2024-08-01 05:52:44 +00:00
</view> -->
2023-12-20 15:17:23 +00:00
</u-row>
</view>
</view>
2024-05-10 08:16:17 +00:00
</u-row>
</view>
2023-12-20 15:17:23 +00:00
</view>
2024-05-12 12:49:00 +00:00
<tpx-bluetooth-print ref="curPrint"></tpx-bluetooth-print>
2024-05-10 08:16:17 +00:00
</tpx-page>
2023-12-20 15:17:23 +00:00
</template>
<script>
2024-05-10 08:16:17 +00:00
import * as apiService from "@/common/api"
2023-12-20 15:17:23 +00:00
export default {
2024-05-10 08:16:17 +00:00
computed: {
userInfo() {
return this.$store.getters.userInfo
}
},
2023-12-20 15:17:23 +00:00
props: {
},
data() {
2024-05-23 08:37:07 +00:00
let { userInfo } = this.$store.getters
2023-12-20 15:17:23 +00:00
return {
2024-05-23 08:37:07 +00:00
qrCodeImgUrl: userInfo.qrCodeImgUrl
2023-12-20 15:17:23 +00:00
}
},
onShareAppMessage() {
return {
}
},
2024-05-10 08:16:17 +00:00
onLoad() {
this.initData()
},
2023-12-20 15:17:23 +00:00
methods: {
2024-05-10 08:16:17 +00:00
async initData(){
2024-05-23 08:37:07 +00:00
2024-05-10 08:16:17 +00:00
},
2024-05-10 09:20:35 +00:00
async handleSave(){
this.saveNetFile(this.qrCodeImgUrl)
2024-05-10 08:16:17 +00:00
},
2024-05-12 05:25:11 +00:00
handlePrint() {
2024-05-12 12:49:00 +00:00
this.$refs.curPrint.startPrint({
imageUrl: this.qrCodeImgUrl,
})
2024-05-12 05:25:11 +00:00
}
2023-12-20 15:17:23 +00:00
}
}
</script>
<style lang="scss">
@import '@/common/uni-nvue.scss';
page{
height: 100% !important;
}
</style>
<style scoped lang="scss">
</style>