移出潘宅计算器
This commit is contained in:
@@ -98,7 +98,13 @@
|
||||
<image class="nav-icon-src" src="@/static/icons/user_nav_06.png"></image>关注公众号
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="nav-flex" @click="onReckoner">
|
||||
<view class="nav-icon">
|
||||
<image class="nav-icon-src" src="@/static/icons/user_nav_09.png"></image>盘债计算器
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
|
||||
</view> -->
|
||||
<view class="border-solid-empty"></view>
|
||||
<view class="nav-flex" @click="updateApp">
|
||||
<view class="nav-icon">
|
||||
@@ -165,12 +171,28 @@
|
||||
<view class="button" @click="sureYunYing">确认名称</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 盘债计算机二维码 -->
|
||||
<!-- <u-popup :show="reckonerShow" mode="center" bgColor="transparent">
|
||||
<view class="reckoner-lay">
|
||||
<view class="reckoner-content">
|
||||
<image class="reckoner-code" :src="reckonerQrcode" mode="widthFix"></image>
|
||||
<view class="reckoner-url" @click="onCopyUrl(reckonerURL)">邀请码:{{reckonerInvite}}<text>复制</text></view>
|
||||
<view class="reckoner-btn" @click="onIsSeve">保存海报</view>
|
||||
<image class="reckoner-back" src="@/static/imgs/reckoner-back.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<u-icon name="close-circle-fill" size="42" color="#fff" @click="reckonerShow = false"></u-icon>
|
||||
</view>
|
||||
</u-popup> -->
|
||||
<!-- 海报 -->
|
||||
<!-- <l-painter class="l-painter" :board="reckonerPoster" isCanvasToTempFilePath @success="qrcodePath"/> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { info, relationsVerify, relationsBind, submitTeamName } from '@/apis/interfaces/user.js'
|
||||
import { info, relationsVerify, relationsBind, submitTeamName, debtUrl } from '@/apis/interfaces/user.js'
|
||||
import { getVersions } from '@/apis/interfaces/versions'
|
||||
import { request } from '../../apis';
|
||||
import permision from "@/js_sdk/wa-permission/permission.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -206,14 +228,159 @@
|
||||
team_status :'', // 状态 0 不展示运营中心 1可以申请但是没有完善,2申请完,审核中,3已通过,已修改
|
||||
team_id :'',
|
||||
region_status :'', // 状态 0 不展示 大区中心 1可以申请但是没有完善,2申请完,审核中,3已通过,已修改
|
||||
region_id :'',
|
||||
region_id :'',
|
||||
// 计算器
|
||||
reckonerShow : false,
|
||||
reckonerURL : '',
|
||||
reckonerQrcode : '',
|
||||
reckonerInvite : '',
|
||||
reckonerPoster : {}
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.isAuth = this.$store.getters.getToken != ''
|
||||
if (this.$store.getters.getToken != '') this.getUserInfo()
|
||||
if (this.$store.getters.getToken != '') this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
// 检查保存海报权限
|
||||
async onIsSeve(){
|
||||
let result = await permision.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE')
|
||||
// 检查用户权限
|
||||
if(result == 1){
|
||||
this.onDowQRcode()
|
||||
return
|
||||
}
|
||||
// 引导用户设置联系电话
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '请授权应用获得[写入相册]权限',
|
||||
showCancel : false,
|
||||
confirmText : '设置',
|
||||
success : modalRes => {
|
||||
permision.gotoAppPermissionSetting()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 保存盘债计算器海报
|
||||
onDowQRcode(){
|
||||
uni.showLoading({
|
||||
title: '获取海报中...',
|
||||
mask : true
|
||||
})
|
||||
this.reckonerPoster = {
|
||||
css: {
|
||||
width: '600rpx',
|
||||
borderRadius: '20rpx'
|
||||
},
|
||||
views: [
|
||||
{
|
||||
css: {
|
||||
width: '600rpx',
|
||||
height: '840rpx',
|
||||
objectFit: 'cover',
|
||||
borderRadius: '20rpx'
|
||||
},
|
||||
src : require('@/static/imgs/reckoner-back.png'),
|
||||
type: "image"
|
||||
},
|
||||
{
|
||||
css: {
|
||||
width: '440rpx',
|
||||
height: '440rpx',
|
||||
position: 'absolute',
|
||||
left: '80rpx',
|
||||
top: '120rpx',
|
||||
borderRadius: '20rpx'
|
||||
},
|
||||
src : this.reckonerQrcode,
|
||||
type: "image"
|
||||
}, {
|
||||
type: 'text',
|
||||
text: '邀请码:' + this.reckonerInvite,
|
||||
css: {
|
||||
textAlign: 'center',
|
||||
color: '#fff',
|
||||
position: 'absolute',
|
||||
left: '30rpx',
|
||||
top: '600rpx',
|
||||
width: '540rpx',
|
||||
lineHeight: '50rpx',
|
||||
fontSize: '16px',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
}, {
|
||||
type: 'text',
|
||||
text: '使用微信扫一扫,打开盘债计算器',
|
||||
css: {
|
||||
textAlign: 'center',
|
||||
color: '#fff',
|
||||
position: 'absolute',
|
||||
left: '30rpx',
|
||||
top: '670rpx',
|
||||
width: '540rpx',
|
||||
lineHeight: '50rpx',
|
||||
fontSize: '14px'
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
// 生成海报地址
|
||||
qrcodePath(path){
|
||||
uni.hideLoading()
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: path,
|
||||
success :() => {
|
||||
uni.showToast({
|
||||
title: '海报已保存,赶快去分享吧',
|
||||
icon : 'none'
|
||||
})
|
||||
},
|
||||
fail : () => {
|
||||
uni.showToast({
|
||||
title: '保存失败,请检查系统权限',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
// 复制用户地址
|
||||
onCopyUrl(url){
|
||||
uni.setClipboardData({
|
||||
data : url,
|
||||
success : res => {
|
||||
uni.showToast({
|
||||
title: '地址已复制'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 盘债计算器
|
||||
onReckoner() {
|
||||
if(!this.isAuth){
|
||||
this.$Router.push({
|
||||
name: 'Auth'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '获取邀请码',
|
||||
mask : true
|
||||
})
|
||||
debtUrl().then(res => {
|
||||
uni.hideLoading()
|
||||
let { url, qrcode, invite } = res;
|
||||
this.reckonerURL = url
|
||||
this.reckonerQrcode = qrcode
|
||||
this.reckonerInvite = invite
|
||||
this.reckonerShow = true
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取用户信息
|
||||
getUserInfo() {
|
||||
uni.showLoading({
|
||||
@@ -296,7 +463,13 @@
|
||||
})
|
||||
},
|
||||
// 推荐关系
|
||||
onParent() {
|
||||
onParent() {
|
||||
if(!this.isAuth){
|
||||
this.$Router.push({
|
||||
name: 'Auth'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.parent == '') {
|
||||
this.showBind = true
|
||||
return
|
||||
@@ -316,7 +489,7 @@
|
||||
})
|
||||
},
|
||||
// 绑定邀请码
|
||||
onBind() {
|
||||
onBind() {
|
||||
// 检验邀请码
|
||||
if (this.isInvitation) {
|
||||
if (this.invitation === '') {
|
||||
@@ -396,7 +569,6 @@
|
||||
},
|
||||
// 运营中心确认按钮处理
|
||||
sureYunYing(){
|
||||
console.log(this.team_status,this.region_status)
|
||||
if(this.yunying_name == '' || this.yunying_name.length == 0){
|
||||
uni.showToast({
|
||||
title:this.team_status == 1?'请完善法务运营中心名称':'请完善大区运营中心名称',
|
||||
@@ -499,7 +671,61 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss">
|
||||
// 计算器弹出层
|
||||
.l-painter{ position: fixed; top: -100%; left: -100%; }
|
||||
.reckoner-lay{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.reckoner-content{
|
||||
border-radius: 20rpx;
|
||||
padding: 70rpx 50rpx;
|
||||
width: 75vw;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.reckoner-back{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -1;
|
||||
}
|
||||
.reckoner-code{
|
||||
width: 45vw;
|
||||
height: 45vw;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.reckoner-btn{
|
||||
margin-top: 50rpx;
|
||||
background: white;
|
||||
color: #051437;
|
||||
width: 55vw;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
border-radius: 50rpx;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.reckoner-url{
|
||||
color: white;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
text{ font-weight: bold; margin-left: 15rpx; }
|
||||
}
|
||||
}
|
||||
}
|
||||
// close-circle-fill
|
||||
|
||||
// 导航栏
|
||||
.nav-flex {
|
||||
height: 120rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
Reference in New Issue
Block a user