This commit is contained in:
2022-07-06 14:43:14 +08:00
parent ef25cef8fb
commit f34c347c1c
3 changed files with 392 additions and 320 deletions

View File

@@ -1,319 +1,390 @@
<template> <template>
<view class="capacity"> <view class="capacity">
<view class="capacity-title">共力分总产率/小时<text>{{baseHour}}GLF/h</text></view> <view class="capacity-title">共力分总产率/小时<text>{{baseHour}}GLF/h</text></view>
<view class="capacity-sbutitle">总产率=角色产率+团队产率+共建产率+共力值产率</view> <view class="capacity-sbutitle">总产率=角色产率+团队产率+共建产率+共力值产率</view>
<view class="capacity-block"> <view class="capacity-block">
<view class="capacity-block-title"> <view class="capacity-block-title">
<view class="title">我的角色</view> <view class="title">我的角色</view>
<view class="nickname">{{nickname}}</view> <view class="nickname">{{nickname}}</view>
</view> </view>
<view class="capacity-block-glf ">{{identityText}}:{{base}}GLF/h</view> <view class="capacity-block-glf ">{{identityText}}:{{base}}GLF/h</view>
</view> </view>
<view class="capacity-block"> <view class="capacity-block">
<view class="capacity-block-title"> <view class="capacity-block-title">
<view class="title">成员产率({{group.effect}}/{{group.count}})<text</text></view> <view class="title">成员产率({{group.effect}}/{{group.count}})<text< /text>
<view class="capacity-block-glf">{{group.capacity}}GLF/h</view> </view>
<!-- <view class="more" @click="onInvitation">邀请更多好友</view> --> <view class="capacity-block-glf">{{group.capacity}}GLF/h</view>
</view> <!-- <view class="more" @click="onInvitation">邀请更多好友</view> -->
<view class="capacity-block-table pt30"> </view>
<view class="header"> <view class="capacity-block-table pt30">
<view class="flex-item">家族成员产率</view> <view class="header">
</view> <view class="flex-item">家族成员产率</view>
<view class="flex"> </view>
<view class="flex-item">{{recommend.vip}}人在线(会员)</view> <view class="flex">
<view class="flex-item">{{recommend.vip_text}}</view> <view class="flex-item">{{recommend.vip}}人在线(会员)</view>
</view> <view class="flex-item">{{recommend.vip_text}}</view>
<view class="flex"> </view>
<view class="flex-item">{{recommend.novip}}人在线(普通用户)</view> <view class="flex">
<view class="flex-item">{{recommend.novip_text}}</view> <view class="flex-item">{{recommend.novip}}人在线(普通用户)</view>
</view> <view class="flex-item">{{recommend.novip_text}}</view>
</view> </view>
<view class="capacity-block-table"> </view>
<view class="header"> <view class="capacity-block-table">
<view class="flex-item">伙伴成员</view> <view class="header">
</view> <view class="flex-item">伙伴成员</view>
<view class="flex"> </view>
<view class="flex-item">{{partner.vip}}人在线(会员)</view> <view class="flex">
<view class="flex-item">{{partner.vip_text}}</view> <view class="flex-item">{{partner.vip}}人在线(会员)</view>
</view> <view class="flex-item">{{partner.vip_text}}</view>
<view class="flex"> </view>
<view class="flex-item">{{partner.novip}}人在线(普通用户)</view> <view class="flex">
<view class="flex-item">{{partner.novip_text}}</view> <view class="flex-item">{{partner.novip}}人在线(普通用户)</view>
</view> <view class="flex-item">{{partner.novip_text}}</view>
</view> </view>
</view> </view>
<view class="capacity-block"> </view>
<view class="capacity-block-title"> <view class="capacity-block">
<view class="title">共建产率<text>{{build.capacity}}GLF/h</text></view> <view class="capacity-block-title">
<view class="subtitle">{{build.current}}/{{build.max}}</view> <view class="title">共建产率<text>{{build.capacity}}GLF/h</text></view>
</view> <view class="subtitle">{{build.current}}/{{build.max}}</view>
<view class="capacity-block-text ">产品当前设置共建者每日可以通过看广告获得共建值暂未开放敬请期待</view> </view>
</view> <view class="capacity-block-text ">产品当前设置共建者每日可以通过看广告获得共建值暂未开放敬请期待</view>
<view class="capacity-block"> </view>
<view class="capacity-block-title"> <view class="capacity-block">
<view class="title">共力值产率<text>{{together.capacity}}GLF/h</text></view> <view class="capacity-block-title">
<view class="subtitle">{{together.current}}/{{together.max}}</view> <view class="title">共力值产率<text>{{together.capacity}}GLF/h</text></view>
</view> <view class="subtitle">{{together.current}}/{{together.max}}</view>
<view class="capacity-block-text ">根据正常用户的使用在平台的使用习惯购物等行为产生对应共力值暂未开放敬请期待</view> </view>
</view> <view class="capacity-block-text ">根据正常用户的使用在平台的使用习惯购物等行为产生对应共力值暂未开放敬请期待</view>
<view class="capacity-block" v-for="(item,index) in other" :keys='index'> </view>
<view class="capacity-block-title"> <view class="capacity-block" v-for="(item,index) in other" :keys='index'>
<view class="title">{{item.title}}</view> <view class="capacity-block-title">
<view class="capacity-block-glf">{{item.capacity}}GLF/h</view> <view class="title">{{item.title}}</view>
</view> <view class="capacity-block-glf">{{item.capacity}}GLF/h</view>
<view class="capacity-block-text " v-if="item.remark">{{item.remark}}</view> </view>
</view> <view class="capacity-block-text " v-if="item.remark">{{item.remark}}</view>
<view class="capacity-hint"> 用户须知用户所产生共力分在每日结算时平台会扣除30%的共力分用于平台运营使用 </view> </view>
</view> <view class="capacity-hint"> 用户须知用户所产生共力分在每日结算时平台会扣除30%的共力分用于平台运营使用 </view>
</template> </view>
</template>
<script>
import { glz } from '@/apis/interfaces/life.js' <script>
export default { import {
data() { glz,sign
return { } from '@/apis/interfaces/life.js'
identityText: '普通用户', import AD from '@/utils/ad.js'
baseHour : 0, export default {
base : 0, data() {
group : { return {
count : 0, identityText: '普通用户',
effect : 0, baseHour: 0,
capacity: 0, base: 0,
}, group: {
nickname : '', count: 0,
recommend : { effect: 0,
vip : '-', capacity: 0,
vip_count : '-', },
novip : '-', nickname: '',
novip_count : '-', recommend: {
vip_text : '-', vip: '-',
novip_text : '-', vip_count: '-',
}, novip: '-',
partner : { novip_count: '-',
vip : '-', vip_text: '-',
vip_count : '-', novip_text: '-',
novip : '-', },
novip_count : '-', partner: {
vip_text : '-', vip: '-',
novip_text : '-', vip_count: '-',
}, novip: '-',
build:{}, novip_count: '-',
together:{}, vip_text: '-',
other:{} novip_text: '-',
}; },
}, build: {},
created() { together: {},
uni.showLoading({}) other: {},
glz().then(res => { can_repeat_sign: false
this.nickname = res.nickname };
this.identityText = res.identity_text },
this.baseHour = res.base_hour created() {
this.base = res.base uni.showLoading({})
this.group = res.group glz().then(res => {
this.recommend = res.recommend console.log(res);
this.partner = res.partner this.nickname = res.nickname
this.build = res.build this.identityText = res.identity_text
this.together = res.together this.baseHour = res.base_hour
this.other = res.other this.base = res.base
uni.setNavigationBarTitle({ this.group = res.group
title: res.glz + 'GLF' this.recommend = res.recommend
}) this.partner = res.partner
uni.hideLoading() this.build = res.build
}).catch(err => { this.together = res.together
uni.showToast({ this.other = res.other
title: err.message, this.can_repeat_sign = res.can_repeat_sign
icon : 'none' uni.setNavigationBarTitle({
}) title: res.glz + 'GLF'
}) })
}, uni.hideLoading()
onNavigationBarButtonTap() { }).catch(err => {
uni.showModal({ uni.showToast({
title:'温馨提示', title: err.message,
content:'重置签到只重新计算24小时时间所迭代加成的比例不变', icon: 'none'
confirmColor:'#34CE98', })
confirmText:'立即重置', })
cancelColor:'#999', },
cancelText:'再想想', onNavigationBarButtonTap() {
success: (res) => { if (!this.can_repeat_sign) {
if(res.confirm){ uni.showModal({
console.log('再次签到。。。') title: '温馨提示',
this.checkIMEI().then(res => { content: '今日重置签到机会已使用过了,明日再来试试吧~',
switch (res) { confirmColor: '#34CE98',
case 'Permanent': confirmText: '知道了',
uni.showModal({ showCancel: false,
title: '提示', })
content: '签到功能需使用您的电话状态和网络信息,请在手机设置中权限开启您的权限', } else {
showCancel: false, uni.showModal({
}) title: '温馨提示',
break; content: '重置签到只重新计算24小时时间所迭代加成的比例不变',
case 'Temporary': confirmColor: '#34CE98',
uni.showModal({ confirmText: '立即重置',
title: '提示', cancelColor: '#999',
content: '签到功能需使用您的电话状态和网络信息,请点击设置开启应用权限', cancelText: '再想想',
cancelText: '获取权限', success: (res1) => {
confirmText: '稍后再说', if (res1.confirm) {
success: e => { console.log('再次签到。。。')
if (e.cancel) { this.checkIMEI().then(res => {
this.checkIMEI().then(IMEI => { console.log(res);
if (IMEI === 'Success') { switch (res) {
this.showAd() case 'Permanent':
} uni.showModal({
}) title: '提示',
} content: '签到功能需使用您的电话状态和网络信息,请在手机设置中权限开启您的权限',
} showCancel: false,
}) })
break; break;
case 'Success': case 'Temporary':
this.showAd() uni.showModal({
break; title: '提示',
} content: '签到功能需使用您的电话状态和网络信息,请点击设置开启应用权限',
}) cancelText: '获取权限',
} confirmText: '稍后再说',
} success: e => {
}) if (e.cancel) {
}, this.checkIMEI().then(IMEI => {
methods: { if (IMEI ===
onInvitation(){ 'Success') {
this.$Router.push({name: 'Invitation'}) this.showAd()
}, }
// imei权限 })
checkIMEI() { }
// 检查imei权限 }
return new Promise((resolve, reject) => { })
if (plus.os.name == "Android") { break;
plus.android.requestPermissions(['android.permission.READ_PHONE_STATE'], (e) => { case 'Success':
if (e.deniedAlways.length > 0) { this.showAd()
resolve('Permanent'); break;
} }
if (e.deniedPresent.length > 0) { }).catch(err => {
resolve('Temporary'); console.log(err)
} })
if (e.granted.length > 0) { }
resolve('Success'); }
} })
}, (e) => { }
uni.showToast({ },
title: JSON.stringify(e), methods: {
icon: 'none' showAd() {
}) AD.show({
}) adpid: 1428308887,
return adType: 'RewardedVideo'
} }, detail => {
reject('非安卓设备'); if (detail && detail.isEnded) {
}) uni.showLoading({
} title: '签到中..'
} })
} sign().then(res => {
</script> uni.showToast({
title: '签到成功',
<style lang="scss"> icon: 'none'
.capacity{ })
background: $window-color; this.getLife()
min-height: 100vh; }).catch(err => {
padding: $padding; uni.showToast({
box-sizing: border-box; title: err.message,
&-hint{ icon: 'none'
font-size: 26rpx; })
color: gray; })
line-height: 40rpx; }
padding: $padding 0; }, err => {
} uni.showToast({
&-title{ title: err.errMsg,
font-size: 38rpx; icon: 'none'
font-weight: bold; })
line-height: 60rpx; })
text{ },
margin-left: 10rpx; onInvitation() {
color: $main-color; this.$Router.push({
} name: 'Invitation'
} })
&-sbutitle{ },
font-size: 26rpx; // imei权限
line-height: 40rpx; checkIMEI() {
} // 检查imei权限
&-block{ return new Promise((resolve, reject) => {
background: white; if (plus.os.name == "Android") {
margin-top: $margin; plus.android.requestPermissions(['android.permission.READ_PHONE_STATE'], (e) => {
border-radius: $radius; if (e.deniedAlways.length > 0) {
padding: $padding; resolve('Permanent');
&-glf{ }
color: $main-color; if (e.deniedPresent.length > 0) {
font-size: 30rpx; resolve('Temporary');
// padding-top: 30rpx; }
} if (e.granted.length > 0) {
&-title{ resolve('Success');
font-weight: bold; }
font-size: 34rpx; }, (e) => {
line-height: 60rpx; uni.showToast({
display: flex; title: JSON.stringify(e),
justify-content: space-between; icon: 'none'
.title{ })
text{ })
color: $main-color; return
font-weight: normal; }
padding-left: 10rpx; reject('非安卓设备');
} })
} }
.more{ }
background: $main-color; }
color: white; </script>
font-weight: bold;
font-size: 28rpx; <style lang="scss">
border-radius: 25rpx; .capacity {
line-height: 60rpx; background: $window-color;
width: 230rpx; min-height: 100vh;
text-align: center; padding: $padding;
} box-sizing: border-box;
.subtitle{
font-weight: normal; &-hint {
font-size: 24rpx; font-size: 26rpx;
color: $main-color; color: gray;
} line-height: 40rpx;
.nickname{ padding: $padding 0;
color: gray; }
font-size: 30rpx;
} &-title {
} font-size: 38rpx;
&-text{ font-weight: bold;
font-size: 28rpx; line-height: 60rpx;
color: gray;
line-height: 40rpx; text {
padding-top: 30rpx; margin-left: 10rpx;
} color: $main-color;
&-table{ }
border:solid 1px $border-color; }
margin-bottom: 20rpx;
padding-top: 30rpx; &-sbutitle {
&:last-child{ font-size: 26rpx;
margin-top: 0; line-height: 40rpx;
} }
.header{
background: $border-color; &-block {
line-height: 50rpx; background: white;
padding: 0 15rpx; margin-top: $margin;
font-size: 26rpx; border-radius: $radius;
color: gray; padding: $padding;
}
.flex{ &-glf {
display: flex; color: $main-color;
border-top: solid 1rpx $border-color; font-size: 30rpx;
color: gray; // padding-top: 30rpx;
.flex-item{ }
width: 50%;
box-sizing: border-box; &-title {
line-height: 50rpx; font-weight: bold;
padding: 0 15rpx; font-size: 34rpx;
font-size: 24rpx; line-height: 60rpx;
&:first-child{ display: flex;
border-right: solid 1rpx $border-color; justify-content: space-between;
}
} .title {
} text {
color: $main-color;
} font-weight: normal;
} padding-left: 10rpx;
.pt30{ }
padding-top: 30rpx; }
}
} .more {
background: $main-color;
color: white;
font-weight: bold;
font-size: 28rpx;
border-radius: 25rpx;
line-height: 60rpx;
width: 230rpx;
text-align: center;
}
.subtitle {
font-weight: normal;
font-size: 24rpx;
color: $main-color;
}
.nickname {
color: gray;
font-size: 30rpx;
}
}
&-text {
font-size: 28rpx;
color: gray;
line-height: 40rpx;
padding-top: 30rpx;
}
&-table {
border: solid 1px $border-color;
margin-bottom: 20rpx;
padding-top: 30rpx;
&:last-child {
margin-top: 0;
}
.header {
background: $border-color;
line-height: 50rpx;
padding: 0 15rpx;
font-size: 26rpx;
color: gray;
}
.flex {
display: flex;
border-top: solid 1rpx $border-color;
color: gray;
.flex-item {
width: 50%;
box-sizing: border-box;
line-height: 50rpx;
padding: 0 15rpx;
font-size: 24rpx;
&:first-child {
border-right: solid 1rpx $border-color;
}
}
}
}
}
.pt30 {
padding-top: 30rpx;
}
}
</style> </style>

File diff suppressed because one or more lines are too long

View File

@@ -24148,7 +24148,8 @@ var render = function() {
"/" + "/" +
_vm._$g(11, "t0-1") + _vm._$g(11, "t0-1") +
")" ")"
) ),
_vm._v("< /text>")
] ]
), ),
_c( _c(