公立人生计时器调整,会员数据调整

This commit is contained in:
唐明明
2022-06-12 12:43:05 +08:00
parent dbd2a03d34
commit 564d5921bc
13 changed files with 10423 additions and 10065 deletions

View File

@@ -15,9 +15,10 @@ const info = () =>{
}
// 导出助记词
const chainSeed = () => {
const chainSeed = (data) => {
return request({
url: 'chain/safe/seed'
url: 'chain/safe/seed',
data
})
}

View File

@@ -259,7 +259,7 @@
"app-plus": {
"titleNView": {
"buttons": [{
"text": "充值",
"text": "收款",
"width": "60",
"fontSize": "14"
}]

View File

@@ -5,7 +5,7 @@
<view class="title">DT积分余额</view>
<view class="num">{{score}}</view>
</view>
<button class="transfer" size="mini" @click="onTransfer('AccountCode')">收款</button>
<button class="transfer" size="mini" @click="onTransfer('AccountRecharge')">充值</button>
<button class="transfer" size="mini" @click="onTransfer('AccountTransfer')">转账</button>
</view>
<block v-if="logs.length > 0">
@@ -79,7 +79,7 @@
},
onNavigationBarButtonTap() {
this.$Router.push({
name: 'AccountRecharge'
name: 'AccountCode'
})
}
}

View File

@@ -8,11 +8,11 @@
</view>
<view class="group">
<view class="inputs">
<label>设密码</label>
<label>置支付密码</label>
<input type="number" v-model="password" maxlength="6" password placeholder="请设置支付密码" />
</view>
<view class="inputs">
<label>确认密码</label>
<label>确认支付密码</label>
<input type="number" v-model="verify" maxlength="6" password placeholder="请确认支付密码" />
</view>
<view class="inputs">
@@ -104,7 +104,6 @@
}
})
}).catch(err => {
console.log(err)
uni.showToast({
icon: 'none',
title: err.message

View File

@@ -65,7 +65,7 @@
if(!res.has_transfer_password){
uni.showModal({
title : '提示',
content : '暂未设置账户密码,无法发起转账,请设置后重试',
content : '暂未设置账户支付密码,无法发起转账,请设置后重试',
cancelText : '稍后设置',
confirmText : '立即设置',
success : modalRes => {

View File

@@ -13,9 +13,9 @@
<input v-model="code" type="number" maxlength="4" placeholder="输入验证码">
<button :disabled="getSms" size="mini" @click="getPhoneCode()">{{sendCode}}</button>
</view>
<!-- <view class="auth-input">
<view class="auth-input">
<input v-model="parentId" type="number" placeholder="输入邀请码">
</view> -->
</view>
<view class="auth-button">
<button @click="login('code')">登录</button>
</view>

View File

@@ -69,9 +69,9 @@
provider: 'weixin',
scene : 'WXSceneSession',
type : 0,
href : 'http://invite.uzchain.tech?invitation_code=' + this.invite,
href : 'https://invite.gongli.vip?invitation_code=' + this.invite,
title : '共力生态',
summary : '共力生态进入web3.0',
summary : '共进入Web 3.0推动全体成员共同富裕',
imageUrl: 'https://gl-ecological.oss-cn-zhangjiakou.aliyuncs.com/images/2022/06/11/3b7e6e330f465ecbf136d15def1039fd.jpg',
fail(err) {
uni.showToast({
@@ -86,8 +86,8 @@
provider: 'weixin',
scene : 'WXSceneTimeline',
type : 0,
href : 'http://invite.uzchain.tech?invitation_code=' + this.invite,
title : '共力生态 共赢 共享',
href : 'https://invite.gongli.vip?invitation_code=' + this.invite,
summary : '共商 共建 共赢 带您进入Web 3.0!推动全体成员共同富裕',
imageUrl: 'https://gl-ecological.oss-cn-zhangjiakou.aliyuncs.com/images/2022/06/11/3b7e6e330f465ecbf136d15def1039fd.jpg',
fail(err) {
uni.showToast({

View File

@@ -13,11 +13,11 @@
<view class="life-sign-icon-text">{{isSign ? 'GLF': '签到'}}</view>
<image class="life-sign-icon-image" :src="require('@/static/icon/sign_btn.png')" alt="签到"></image>
</view>
<block v-if="isSign">
<view v-show="isSign">
<view class="life-sign-num">{{base_hour}}</view>
<view class="life-sign-unit">GLF/h</view>
<view class="life-sign-time">
<u-count-down :time="nextSignAt" format="HH:mm:ss" @change="TimeDown">
<u-count-down ref="countDown" :time="nextSignAt" format="HH:mm:ss" :autoStart="false" @change="TimeDown" @finish="TimeFinish">
<view class="time">
<text class="time__item">{{ timeData.hours > 9 ? timeData.hours: '0'+timeData.hours}}:</text>
<text class="time__item">{{ timeData.minutes > 9 ? timeData.minutes: '0'+timeData.minutes }}:</text>
@@ -25,7 +25,7 @@
</view>
</u-count-down>
</view>
</block>
</view>
</view>
<image class="life-cover-back" :src="require('@/static/life/back.png')"></image>
<view class="life-role">
@@ -66,20 +66,20 @@
<image src="../../static/img/team_back.jpg" mode="aspectFill"></image>
</view>
</view>
<view class="life-flex-item other" @click="onToast('消息中心暂未开放尽情期待')">
<!-- <view class="life-flex-item other" @click="onToast('消息中心暂未开放尽情期待')">
<view class="other-title">
<image src="../../static/life/icon_05.png" mode="widthFix"></image>
消息中心
</view>
<view class="other-subtitle">{{message > 0 ? message + '条未读消息': '暂无消息'}}</view>
<image class="other-back" src="../../static/life/icon_07.png"></image>
</view>
</view> -->
<view class="life-flex-item other" @click="onNav({name: 'Invitation'}, '')">
<view class="other-title">
<image src="../../static/life/icon_03.png" mode="widthFix"></image>
邀请朋友
</view>
<view class="other-subtitle">加速共力增长</view>
<view class="other-subtitle">加速共力增长</view>
<image class="other-back" src="../../static/life/icon_08.png"></image>
</view>
<view class="life-flex-item other" @click="onNav({name: 'Order',params:{index:0}})">
@@ -90,14 +90,14 @@
<view class="other-subtitle">{{order.all || '暂无订单'}}</view>
<image class="other-back" src="../../static/life/icon_09.png"></image>
</view>
<view class="life-flex-item other" @click="onToast('共力好友暂未开放尽情期待')">
<!-- <view class="life-flex-item other" @click="onToast('共力好友暂未开放尽情期待')">
<view class="other-title">
<image src="../../static/life/icon_06.png" mode="widthFix"></image>
共力好友
</view>
<view class="other-subtitle">在线即时互动</view>
<image class="other-back" src="../../static/life/icon_10.png"></image>
</view>
</view> -->
</view>
</view>
</template>
@@ -121,10 +121,10 @@
},
message: 0,
order: {
all: 0,
init: 0,
pay: 0,
delivered: 0
all : 0,
init : 0,
pay : 0,
delivered : 0
},
nextSignAt : 0,
glz : 0,
@@ -142,6 +142,11 @@
TimeDown(e){
this.timeData = e
},
// 倒计时结束
TimeFinish(){
this.isSign = false
clearInterval(account)
},
// 共力人生
getLife(){
life().then(res => {
@@ -168,10 +173,22 @@
},
// 计时器
outTime(){
account = setInterval(() =>{
let newGlz = (Number(this.glz) + this.base_seconds)
this.glz = newGlz.toFixed(4)
}, 1000)
this.$nextTick(() => {
try{
// 计算数值
account = setInterval(() =>{
let newGlz = (Number(this.glz) + this.base_seconds)
this.glz = newGlz.toFixed(4)
}, 1000)
// 签到开始倒计时
this.$refs.countDown.start();
}catch(e){
uni.showToast({
title: e,
icon : 'none'
})
}
})
},
// 签到
onSign(){
@@ -213,6 +230,7 @@
},
onHide() {
clearInterval(account)
this.$refs.countDown.pause();
}
}
</script>

View File

@@ -26,7 +26,7 @@
<view class="vip-card">
<view class="title">
<image src="@/static/user/icon_06.png" mode="widthFix" />
共力会员
{{serial === '' ? '共力会员': 'NO:' + serial}}
</view>
<view class="subtitle">
<u-notice-bar :text="cardText" icon="" bgColor="" duration="3000" color="#fcc692" direction="column">
@@ -52,19 +52,23 @@
<image class="icon" src="@/static/user/order_icon_04.png" mode="widthFix" />
<view class="title">我的订单</view>
</view>
<view class="order-box-item" @click="onBtn('Order', { index: 1 })">
<view class="order-box-item" @click="onBtn('Order', { index: 1 })">
<view class="number" v-show="order.init > 0">{{order.init}}</view>
<image class="icon" src="@/static/user/order_icon_01.png" mode="widthFix" />
<view class="title">待付款</view>
</view>
<view class="order-box-item" @click="onBtn('Order', { index: 2 })">
<view class="order-box-item" @click="onBtn('Order', { index: 2 })">
<view class="number" v-show="order.paid > 0">{{order.paid}}</view>
<image class="icon" src="@/static/user/order_icon_02.png" mode="widthFix" />
<view class="title">待发货</view>
</view>
<view class="order-box-item" @click="onBtn('Order', { index: 3 })">
<view class="order-box-item" @click="onBtn('Order', { index: 3 })">
<view class="number" v-show="order.delivered > 0">{{order.delivered}}</view>
<image class="icon" src="@/static/user/order_icon_03.png" mode="widthFix" />
<view class="title">待收货</view>
</view>
<view class="order-box-item" @click="onBtn('OrderRefund')">
<view class="order-box-item" @click="onBtn('OrderRefund')">
<view class="number" v-show="order.refund > 0">{{order.refund}}</view>
<image class="icon" src="@/static/user/order_icon_05.png" mode="widthFix" />
<view class="title">退换货</view>
</view>
@@ -119,7 +123,17 @@
mode="widthFix"></image>
</view>
</slot>
</u-modal>
</u-modal>
<!-- 输入支付密码 -->
<u-modal :show="showIv" title="请输入钱包支付密码" :showCancelButton="true" confirmColor="#34CE98" negativeTop="160"
@confirm="validationIv" @cancel="()=>{ this.showIv = false, this.iv = '' }">
<slot name="default">
<view class="mnemonic-pwass">
<input class="iv-input" :focus="true" type="password" v-model="iv" maxlength="10"
placeholder="输入密聊密码" />
</view>
</slot>
</u-modal>
</view>
</template>
@@ -128,6 +142,9 @@
info,
chainSeed
} from '@/apis/interfaces/user';
import {
payPassword
} from '@/apis/interfaces/account.js'
import {
getVersions
} from '@/apis/interfaces/versions.js'
@@ -151,7 +168,17 @@
dt : 0.00
},
mnemonic : '',
wordsShow: false
wordsShow: false,
order : {
init : 0,
paid : 0,
delivered: 0,
refund : 0
},
serial : '',
hasPassword : false,
showIv : false,
iv : ''
};
},
onShow() {
@@ -162,18 +189,22 @@
getInfo() {
if (this.$store.state.token === '') return;
info().then(res => {
console.log(res)
uni.setNavigationBarTitle({
title: res.nickname
});
this.cardText = res.identity_array
this.userInfo = {
this.cardText = res.identity_array
this.userInfo = {
nickname : res.nickname,
addr : res.addr,
avatar : res.avatar,
isOpenVip : res.is_open_vip,
username : res.username
}
this.identity = res.identity
this.account = res.account
this.identity = res.identity
this.account = res.account
this.serial = res.serial
this.hasPassword = res.has_transfer_password
})
.catch(err => {
uni.showToast({
@@ -184,8 +215,32 @@
},
// 导出助记词
onMnemonic(){
chainSeed().then(res => {
if(!this.hasPassword){
uni.showModal({
title : '提示',
content : '暂未设置账户支付密码,无法导出助记词,请设置密码后重试',
cancelText : '稍后设置',
confirmText : '立即设置',
success : modalRes => {
if(modalRes.confirm){
this.$Router.push({name: 'AccountResetPassword', params: {phone: this.userInfo.username}})
return
}
this.showIv = false
}
})
return
}
this.showIv = true
},
// 验证支付密码
validationIv(){
chainSeed({
password: this.iv
}).then(res => {
this.mnemonic = res.seed
this.showIv = false
this.wordsShow = true
}).catch(err => {
uni.showToast({
@@ -461,7 +516,8 @@
display: flex;
justify-content: space-between;
&-item {
&-item {
position: relative;
width: 25%;
padding: $padding $padding/2;
text-align: center;
@@ -475,7 +531,20 @@
.title {
font-size: $title-size-sm;
margin-top: $margin/3;
}
}
.number{
position: absolute;
top: 22rpx;
z-index: 2;
right: 20%;
background: $text-price;
color: white;
font-size: 22rpx;
min-width: 30rpx;
line-height: 30rpx;
border-radius: 50%;
}
}
}

View File

@@ -2,10 +2,10 @@
<view :class="{'vip': isOpen}">
<view class="vip-card">
<view class="vip-user">
<image class="user-cover" :src="user.avatar" mode="aspectFill"></image>
<image class="user-cover" :src="user.avatar || user.figure_path" mode="aspectFill"></image>
<view class="user-nickname">{{user.nickname}}</view>
<view class="user-date">到期日期{{endedAt}}</view>
<view class="vip-renewal" v-if="!isOpen">续费</view>
<view class="vip-renewal" @click="onOpenVip" v-if="!isOpen">续费</view>
</view>
<view class="user-cards">
<image class="vip-icon" :src="identity.cover_url" mode="widthFix"></image>
@@ -42,8 +42,28 @@
</view>
<view class="vip-content-title">会员折扣说明</view>
<view class="vip-content-rich">
<view v-for="(item,index) in prices" :key="index">{{item.open_number}} - {{item.open_number + item.stock}}名享开通会员折扣价{{item.price}}</view>
<view>10000后会员恢复原价199.00</view>
<view class="vip-content-rich-flex vip-content-rich-header">
<view class="item">名额</view>
<view class="item">折扣价</view>
<view class="item">剩余名额</view>
</view>
<view class="vip-content-rich-flex">
<view class="item">10</view>
<view class="item">59.0</view>
<view class="item">10</view>
</view>
<view class="vip-content-rich-flex">
<view class="item">10</view>
<view class="item">59.0</view>
<view class="item">10</view>
</view>
<view class="vip-content-rich-flex">
<view class="item">10</view>
<view class="item">59.0</view>
<view class="item">10</view>
</view>
<!-- <view v-for="(item,index) in prices" :key="index">{{item.open_number}} - {{item.open_number + item.stock}}名享开通会员折扣价{{item.price}}</view>
<view>10000后会员恢复原价199.00</view> -->
</view>
</view>
<view class="footer-vip" v-if="isOpen">
@@ -99,6 +119,7 @@
// 获取会员信息
getVipInfo(){
vip().then(res =>{
console.log(res)
this.firstRule = res.first_rule
this.isOpen = res.is_open
this.prices = res.prices
@@ -311,6 +332,28 @@
font-size: 28rpx;
line-height: 50rpx;
color: gray;
border:solid 1rpx #fce3c5;
.vip-content-rich-flex{
display: flex;
justify-content: space-between;
line-height: 60rpx;
font-size: 28rpx;
& > .item{
width: 33.33%;
border-top: solid 1rpx #fce3c5;
text-align: center;
color: #9f5529;
border-right: solid 1rpx #fce3c5;
box-sizing: border-box;
&:last-child{
border-right: none;
}
}
}
.vip-content-rich-header{
background: #fce3c5;
color: #9f5529;
}
}
.vip-privilege{
display: flex;
@@ -353,7 +396,7 @@
width: 100%;
padding: $padding;
box-sizing: border-box;
background: white;
background: linear-gradient(to bottom, rgba(255,255,255,.0), #FFFFFF);
button{
height: 90rpx;
line-height: 90rpx;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long