2021-08-22 08:53:12 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<!-- 状态栏 -->
|
|
|
|
|
<status-nav :titleVal="'我的二维码'" :statusTitle="true"></status-nav>
|
2022-04-11 02:12:11 +00:00
|
|
|
|
<view :style="{paddingTop: statusHeight+'px'}" class="pad-zy32">
|
2021-08-22 08:53:12 +00:00
|
|
|
|
<image :src="imgSrc" class="mar-s32" style="width: 100%;" mode="widthFix"></image>
|
|
|
|
|
<view v-if="isBtn" @tap="sendImg" class="fon40 bold colf mar-z10 radius20 tc" style="height: 90rpx;margin: 80rpx;background-color: #38CE51;line-height: 90rpx;">发送二维码</view>
|
|
|
|
|
</view>
|
2021-08-26 09:57:04 +00:00
|
|
|
|
<!-- 底部客服 -->
|
|
|
|
|
<public-customer :nbottom="100"></public-customer>
|
2022-03-04 08:48:40 +00:00
|
|
|
|
<!-- 用户信息授权,手机号授权 -->
|
|
|
|
|
<auth-userInfo-mobileInfo></auth-userInfo-mobileInfo>
|
2021-08-22 08:53:12 +00:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {base64ToPath} from '@/jsFile/base64-src.js';
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
imgSrc:'',
|
|
|
|
|
isBtn:false
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-04-11 02:12:11 +00:00
|
|
|
|
computed:{
|
|
|
|
|
statusHeight() {
|
|
|
|
|
return this.$store.state.statusHeight
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-08-22 08:53:12 +00:00
|
|
|
|
onLoad() {
|
2022-03-21 01:44:07 +00:00
|
|
|
|
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
|
2022-03-04 08:48:40 +00:00
|
|
|
|
this.checkImg()
|
|
|
|
|
}
|
2021-08-22 08:53:12 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
checkImg(){
|
|
|
|
|
this.$requst.post('user/service-qr').then(res=>{
|
|
|
|
|
// console.log('二维码:',res);
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
base64ToPath(res.data.qr).then(path => {
|
|
|
|
|
this.imgSrc = path
|
|
|
|
|
this.isBtn = true
|
|
|
|
|
}).catch(error => {})
|
|
|
|
|
}
|
|
|
|
|
},error=>{})
|
|
|
|
|
},
|
|
|
|
|
sendImg(){
|
|
|
|
|
wx.showShareImageMenu({
|
|
|
|
|
path: this.imgSrc
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
</style>
|