hengmei-two/pagesB/customer/customer.vue

58 lines
1.4 KiB
Vue
Raw Normal View History

2021-08-22 08:53:12 +00:00
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'我的二维码'" :statusTitle="true"></status-nav>
<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
}
},
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>