['对接现金红包接口及样式处理']
This commit is contained in:
@@ -9,8 +9,8 @@ import store from '@/store'
|
|||||||
|
|
||||||
// 基础配置
|
// 基础配置
|
||||||
const config = {
|
const config = {
|
||||||
// apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境
|
apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境
|
||||||
apiUrl : 'http://api.ahxh.shangkelian.cn/api/', // 测试环境
|
// apiUrl : 'http://api.ahxh.shangkelian.cn/api/', // 测试环境
|
||||||
apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式)
|
apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式)
|
||||||
timeout : 60000
|
timeout : 60000
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,9 @@ const loginHint = () => {
|
|||||||
showCancel:false,
|
showCancel:false,
|
||||||
success: res=> {
|
success: res=> {
|
||||||
loginHintState = false
|
loginHintState = false
|
||||||
if (res.confirm) this.$Router.replace({name: 'Index'})
|
if (res.confirm) uni.navigateTo({
|
||||||
|
url:'/pages/index/index'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,6 +138,13 @@ const keyrules = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 能量球转红包前置,获取能量球的基本信息
|
||||||
|
const accountCashs = (data) => {
|
||||||
|
return request({
|
||||||
|
url: 'user/account/cashs',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
export {
|
export {
|
||||||
seed,
|
seed,
|
||||||
hash,
|
hash,
|
||||||
@@ -154,6 +161,7 @@ export {
|
|||||||
securityCheck,
|
securityCheck,
|
||||||
securityReset,
|
securityReset,
|
||||||
cmsWithdraw,
|
cmsWithdraw,
|
||||||
keyrules
|
keyrules,
|
||||||
|
accountCashs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,23 @@ const withdrawsIndexLists = (data) => {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 能量球转红包前置
|
||||||
|
const cashsCreate = () => {
|
||||||
|
return request({
|
||||||
|
url: 'user/account/cashs/create',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 能量球转红包
|
||||||
|
const accountCashs = (data) => {
|
||||||
|
return request({
|
||||||
|
url: 'user/account/cashs',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
export {
|
export {
|
||||||
accountsCreate,
|
accountsCreate,
|
||||||
withdrawsAccounts,
|
withdrawsAccounts,
|
||||||
@@ -101,5 +117,7 @@ export {
|
|||||||
withdrawsIndexCreate,
|
withdrawsIndexCreate,
|
||||||
withdrawsIndex,
|
withdrawsIndex,
|
||||||
withdrawsIndexLists,
|
withdrawsIndexLists,
|
||||||
userAccoutScores
|
userAccoutScores,
|
||||||
|
accountCashs,
|
||||||
|
cashsCreate
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,52 +1,71 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<block v-if="list.length > 0">
|
<block v-if="list.length > 0">
|
||||||
<view class="record--item" v-for="(item, index) in list" :key="index" v-if="item">
|
<view class="record--item" v-for="(item, index) in list" :key="index" v-if="item && !hash">
|
||||||
<view class="title ellipsis">{{item.hash || '-'}}</view>
|
<view class="title ellipsis-1">{{item.rule.title}} <span> {{item.coin?' ('+item.coin+'个能量球) ':''}} </span></view>
|
||||||
<view class="time ellipsis">{{item.block_time || '-'}}</view>
|
<view class="time ellipsis-1">{{item.created_at || '-'}}</view>
|
||||||
<view class="webkit-box variation">
|
<view class="webkit-box variation">
|
||||||
<view class="ellipsis" :class="item.is_in ? 'add': 'remove'">{{item.is_in ? '+': '-'}}{{item.amount}}</view>
|
<view class="ellipsis" :class="item.amount<0 ? 'add': 'remove'">{{item.amount}}</view>
|
||||||
|
<view class="symbol">{{item.amount>0?'现金红包收入':'现金红包支出'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="record--item record--item1" v-for="(item, index) in list" :key="index" v-if="item && hash">
|
||||||
|
<view class="title ellipsis-1">{{item.hash}}</view>
|
||||||
|
<view class="time ellipsis-1">{{item.block_time || '-'}}</view>
|
||||||
|
<view class="webkit-box variation">
|
||||||
|
<view class="ellipsis" :class="item.is_in ? 'add': 'remove'">
|
||||||
|
{{item.is_in ? '+': '-'}}{{item.amount}}</view>
|
||||||
<view class="symbol">{{item.assets.symbol}}</view>
|
<view class="symbol">{{item.assets.symbol}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<no-list v-if='logsType === 0' name='no-record' txt="没有任何记录~" />
|
<no-list v-if='logsType === ""' name='no-record' txt="没有任何记录~" />
|
||||||
<no-list v-if='logsType === 2' name='no-in' txt="没有任何收入记录~" />
|
<no-list v-if='logsType === "in"' name='no-in' txt="没有任何收入记录~" />
|
||||||
<no-list v-if='logsType === 1' name='no-out' txt="没有任何支出记录~" />
|
<no-list v-if='logsType === "out"' name='no-out' txt="没有任何支出记录~" />
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name:"property",
|
name: "property",
|
||||||
props:{
|
props: {
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => {
|
default: () => {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
logsType:{
|
logsType: {
|
||||||
type:Number
|
type: String
|
||||||
|
},
|
||||||
|
hash: {
|
||||||
|
type: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.record--item{
|
.record--item1 {
|
||||||
padding: $padding 320rpx $padding 0;
|
padding: $padding 330rpx $padding 0 !important;
|
||||||
border-bottom: solid 1rpx $border-color;
|
}
|
||||||
|
|
||||||
|
.record--item {
|
||||||
|
padding: $padding 220rpx $padding 0;
|
||||||
|
border-bottom: solid 1rpx #f7f7f7;
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 50rpx;
|
min-height: 50rpx;
|
||||||
.variation{
|
|
||||||
|
.variation {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: $margin;
|
top: $margin;
|
||||||
@@ -54,31 +73,47 @@
|
|||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
&>label{
|
|
||||||
|
&>label {
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
}
|
}
|
||||||
.symbol{
|
|
||||||
color: $mian-color;
|
.symbol {
|
||||||
|
color: #666;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
}
|
}
|
||||||
.add{
|
|
||||||
|
.add {
|
||||||
color: $mian-color;
|
color: $mian-color;
|
||||||
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
.remove{
|
|
||||||
|
.remove {
|
||||||
|
font-size: 36rpx;
|
||||||
color: $mian-color;
|
color: $mian-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
word-break: break-word;
|
||||||
|
span{
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.time{
|
|
||||||
font-size: $title-size-m;
|
.time {
|
||||||
color: $mian-color;
|
font-size: 26rpx;
|
||||||
|
color: #999;
|
||||||
|
padding-top: 6rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数据空
|
// 数据空
|
||||||
.record--null{
|
.record--null {
|
||||||
padding-top: $padding * 3;
|
padding-top: $padding * 3;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $mian-color;
|
color: $mian-color;
|
||||||
@@ -86,7 +121,8 @@
|
|||||||
height: 50vh;
|
height: 50vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
image{
|
|
||||||
|
image {
|
||||||
width: 168rpx;
|
width: 168rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,8 @@
|
|||||||
"name": "vipAgree",
|
"name": "vipAgree",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "用户协议",
|
"navigationBarTitleText": "用户协议",
|
||||||
"navigationBarBackgroundColor": "#774ffd"
|
"navigationBarBackgroundColor": "#774ffd",
|
||||||
|
"navigationBarTextStyle":"white"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/vip/examine",
|
"path": "pages/vip/examine",
|
||||||
@@ -315,7 +316,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/wallet/withdrawList",
|
"path": "pages/wallet/withdrawList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "提现记录",
|
"navigationBarTitleText": "红包提现记录",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#774ffd",
|
"navigationBarBackgroundColor": "#774ffd",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
<image @click.stop="showHelp('wallet')" class="assets-label-icon"
|
<image @click.stop="showHelp('wallet')" class="assets-label-icon"
|
||||||
src="/static/user/userAssets_tips.png" />
|
src="/static/user/userAssets_tips.png" />
|
||||||
</view>
|
</view>
|
||||||
<view class="assets-label-number">{{userData.account.stone || 0}}</view>
|
<view class="assets-label-number">{{userData.account.cash || 0}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="assets-label" @click="$Router.push({name:'Fragment'})">
|
<view class="assets-label" @click="$Router.push({name:'Fragment'})">
|
||||||
<view class="assets-label-name">能量碎片
|
<view class="assets-label-name">能量碎片
|
||||||
|
|||||||
@@ -112,8 +112,8 @@
|
|||||||
<image class="footer-btn" v-if="identitie[tabsIndex].can.show_button && voucher === ''"
|
<image class="footer-btn" v-if="identitie[tabsIndex].can.show_button && voucher === ''"
|
||||||
:src="identitie[tabsIndex].button_cover" mode="widthFix" @click="openOrder" />
|
:src="identitie[tabsIndex].button_cover" mode="widthFix" @click="openOrder" />
|
||||||
<view class="current-btn-sh" v-if="identitie[tabsIndex].can.show_button && voucher !== ''" @click="openOrder" >{{voucher.status.value === 1?'申请审核中':''}}{{voucher.status.value === 3?'申请被驳回查看原因':''}}</view>
|
<view class="current-btn-sh" v-if="identitie[tabsIndex].can.show_button && voucher !== ''" @click="openOrder" >{{voucher.status.value === 1?'申请审核中':''}}{{voucher.status.value === 3?'申请被驳回查看原因':''}}</view>
|
||||||
<view class="current-btn-sh" v-if="!identitie[tabsIndex].can.show_button && voucher === ''"> 当前不可开通</view>
|
<view class="current-btn-sh" v-if="!identitie[tabsIndex].can.show_button && voucher === ''">我要开通</view>
|
||||||
<view class="current-btn" v-if="currentInfo.identity.identity_id === identitie[tabsIndex].identity_id">当前身份</view>
|
<!-- <view class="current-btn" v-if="currentInfo.identity.identity_id === identitie[tabsIndex].identity_id">当前身份</view> -->
|
||||||
<!-- <button class="footer-btn" type="default" >
|
<!-- <button class="footer-btn" type="default" >
|
||||||
<view class="footer-btn-num">
|
<view class="footer-btn-num">
|
||||||
合计:{{total}}
|
合计:{{total}}
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
this.canBtn = res.identities[this.tabsIndex].can
|
this.canBtn = res.identities[this.tabsIndex].can
|
||||||
this.currentInfo = res.user
|
this.currentInfo = res.user
|
||||||
this.loding = false
|
this.loding = false
|
||||||
this.voucher = this.identitie[this.tabsIndex].voucher || ''
|
this.voucher = this.identitie[this.tabsIndex].voucher?this.identitie[this.tabsIndex].voucher:''
|
||||||
if(this.voucher){
|
if(this.voucher){
|
||||||
this.canFromImg = this.identitie[this.tabsIndex].voucher.cover
|
this.canFromImg = this.identitie[this.tabsIndex].voucher.cover
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<span>(≈ {{ cost || '0.00' }} CNY)</span>
|
<span>(≈ {{ cost || '0.00' }} CNY)</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="balance">{{ balance || '0.00' }}</view>
|
<view class="balance">{{ balance || '0.00' }}</view>
|
||||||
<view class="frozen" @click="withdrawDetail">提现记录</view>
|
<!-- <view class="frozen" @click="withdrawDetail">提现记录</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -23,13 +23,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="total" v-if="total">≈ ¥{{total.toFixed(2)}} </view>
|
<view class="total" v-if="total">≈ ¥{{total.toFixed(2)}} </view>
|
||||||
<view class="btn" @click="actions">提现至红包</view>
|
<view class="btn" @click="actions">提现至现金红包</view>
|
||||||
<view class="des">提现到红包,可在红包中提现到银行卡 手续费: 无</view>
|
<view class="des">提现至红包,可在红包中提现到银行卡 手续费: 无</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
|
cashsCreate,
|
||||||
|
accountCashs,
|
||||||
withdrawsIndexCreate,
|
withdrawsIndexCreate,
|
||||||
withdrawsIndex
|
withdrawsIndex
|
||||||
} from '@/apis/interfaces/withdraws';
|
} from '@/apis/interfaces/withdraws';
|
||||||
@@ -58,12 +60,10 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 提现基本信息
|
// 提现基本信息
|
||||||
getInfo() {
|
getInfo() {
|
||||||
withdrawsIndexCreate().then(res => {
|
cashsCreate().then(res => {
|
||||||
this.balance = res.balance
|
|
||||||
this.tax = res.tax
|
|
||||||
this.cost = res.cost
|
|
||||||
this.bank_accounts = res.bank_accounts.length
|
|
||||||
this.withdraw_input = Number(res.balance)
|
this.withdraw_input = Number(res.balance)
|
||||||
|
this.balance = res.balance
|
||||||
|
this.cost = res.cost
|
||||||
this.total = Number(res.balance) * Number(res.cost)
|
this.total = Number(res.balance) * Number(res.cost)
|
||||||
uni.setStorageSync('refresh', false)
|
uni.setStorageSync('refresh', false)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -76,7 +76,6 @@
|
|||||||
// 输入提现能量球数量
|
// 输入提现能量球数量
|
||||||
inputNum(e) {
|
inputNum(e) {
|
||||||
let number = Number(e.detail.value)
|
let number = Number(e.detail.value)
|
||||||
console.log(number, this.balance)
|
|
||||||
if (number <= Number(this.balance)) {
|
if (number <= Number(this.balance)) {
|
||||||
this.total = Number(e.detail.value) * this.cost
|
this.total = Number(e.detail.value) * this.cost
|
||||||
} else {
|
} else {
|
||||||
@@ -98,10 +97,7 @@
|
|||||||
this.withdraw_input = this.balance
|
this.withdraw_input = this.balance
|
||||||
this.total = this.balance * this.cost
|
this.total = this.balance * this.cost
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 点击全部
|
// 点击全部
|
||||||
all() {
|
all() {
|
||||||
@@ -120,16 +116,8 @@
|
|||||||
// 提现
|
// 提现
|
||||||
actions() {
|
actions() {
|
||||||
let data = {
|
let data = {
|
||||||
bank_account_id: this.bankInfo.bank_account_id,
|
|
||||||
amount: Number(this.withdraw_input)
|
amount: Number(this.withdraw_input)
|
||||||
}
|
}
|
||||||
// if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡',
|
|
||||||
// icon: 'none'
|
|
||||||
// })
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
if (data.amount === 0) {
|
if (data.amount === 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入能量球数量',
|
title: '请输入能量球数量',
|
||||||
@@ -139,7 +127,7 @@
|
|||||||
}
|
}
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
content:'您是否确认提现到红包,交易将免手续费',
|
content:'您是否确认提现到现金红包账户,交易将免手续费',
|
||||||
confirmColor: '#7c52fc',
|
confirmColor: '#7c52fc',
|
||||||
cancelColor: '#cacaca',
|
cancelColor: '#cacaca',
|
||||||
cancelText: '我再想想',
|
cancelText: '我再想想',
|
||||||
@@ -149,7 +137,7 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '提交中'
|
title: '提交中'
|
||||||
})
|
})
|
||||||
withdrawsIndex(data).then(res => {
|
accountCashs(data).then(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res,
|
title: res,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|||||||
@@ -168,6 +168,7 @@
|
|||||||
setTimeout(res => {
|
setTimeout(res => {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
uni.setStorageSync('refresh',true)
|
||||||
}, 3000)
|
}, 3000)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -1,396 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="propertyIndex">
|
|
||||||
<view class="propery">
|
|
||||||
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
|
|
||||||
<view class="propery-content">
|
|
||||||
<view class="currency">能量球钱包
|
|
||||||
<span>(≈ {{ price || '0.00' }} CNY)</span>
|
|
||||||
</view>
|
|
||||||
<view class="balance">{{ balance.balance || '0.00' }}</view>
|
|
||||||
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
|
|
||||||
<view class="balance-flex">
|
|
||||||
<view class="balance-flex-item" @click="showAddress">区块链地址</view>
|
|
||||||
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
|
|
||||||
<view class="balance-flex-item" @click="$Router.push({name: 'Extract'})">能量球提现</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 账户记录 -->
|
|
||||||
<view class="record">
|
|
||||||
<view class="record-tabs">
|
|
||||||
<view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view>
|
|
||||||
<view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view>
|
|
||||||
<view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view>
|
|
||||||
</view>
|
|
||||||
<record :list="logs" :logsType="logsType" />
|
|
||||||
<!-- ios安全距离 -->
|
|
||||||
<view class="ios-bottom"></view>
|
|
||||||
</view>
|
|
||||||
<!-- 支付密码 -->
|
|
||||||
<uni-popup ref="showPassword">
|
|
||||||
<view class="validationPassword">
|
|
||||||
<view class="from">
|
|
||||||
<view class="title">验证密码</view>
|
|
||||||
<input class="input" v-model="password" password placeholder="请验证安全密码" />
|
|
||||||
</view>
|
|
||||||
<view class="buttons">
|
|
||||||
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
|
|
||||||
<view class="button confirm" @click="payPassword('confirm', passwordPages)">验证</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
<!-- 原密码弹窗 -->
|
|
||||||
<!-- <number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan> -->
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import record from '@/components/property/record'
|
|
||||||
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
|
|
||||||
import {
|
|
||||||
sum,
|
|
||||||
price,
|
|
||||||
logs,
|
|
||||||
code,
|
|
||||||
securityCheck // 输入旧密码是否正确
|
|
||||||
} from '@/apis/interfaces/wallet'
|
|
||||||
import numberJpan from "@/components/numberJpan/numberJpan.vue";
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
record
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
balance: {},
|
|
||||||
price: '0.00',
|
|
||||||
logs: [],
|
|
||||||
logsType: 0,
|
|
||||||
password: '',
|
|
||||||
passwordPages: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.getsum()
|
|
||||||
this.getlog()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getsum() {
|
|
||||||
sum().then(res => {
|
|
||||||
this.balance = res
|
|
||||||
this.price = res.price
|
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: err.message
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getlog() {
|
|
||||||
logs().then(res => {
|
|
||||||
this.logs = res
|
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: err.message
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 弹出私钥
|
|
||||||
showPrivatekey(pages) {
|
|
||||||
this.passwordPages = pages
|
|
||||||
this.$refs.showPassword.open('center')
|
|
||||||
},
|
|
||||||
// 验证私钥
|
|
||||||
payPassword(type) {
|
|
||||||
if (type === 'confirm') {
|
|
||||||
if (this.password === '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入安全密码',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
securityCheck(this.password).then(res => {
|
|
||||||
this.$refs.showPassword.close()
|
|
||||||
switch (this.passwordPages) {
|
|
||||||
case 'privatekey':
|
|
||||||
this.$Router.push({
|
|
||||||
name: 'Privatekey',
|
|
||||||
params: {
|
|
||||||
password: this.password
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'resetPassword':
|
|
||||||
this.$Router.push({
|
|
||||||
name: 'ResetPassword',
|
|
||||||
params: {
|
|
||||||
password: this.password
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
this.password = ''
|
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err.message,
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.$refs.showPassword.close()
|
|
||||||
},
|
|
||||||
// 交易记录
|
|
||||||
onLogsType(index) {
|
|
||||||
if (this.logsType === index) return
|
|
||||||
this.logsType = index
|
|
||||||
this.logs = []
|
|
||||||
logs({
|
|
||||||
flag: this.logsType
|
|
||||||
}).then(res => {
|
|
||||||
this.logs = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 区块地址
|
|
||||||
showAddress() {
|
|
||||||
uni.showModal({
|
|
||||||
title: '我的区块链地址',
|
|
||||||
content: '\n地址可以理解为银行卡卡号,与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
|
|
||||||
confirmText: '复制',
|
|
||||||
confirmColor: '#b11eff',
|
|
||||||
showCancel:false,
|
|
||||||
success: (res) => {
|
|
||||||
if (res.confirm) {
|
|
||||||
uni.setClipboardData({
|
|
||||||
data: this.balance.address,
|
|
||||||
success() {
|
|
||||||
uni.showToast({
|
|
||||||
title: '区块链地址已复制',
|
|
||||||
icon : 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onNavigationBarButtonTap(e) {
|
|
||||||
if (e.index === 0) {
|
|
||||||
uni.showActionSheet({
|
|
||||||
// itemList: ['转账', '收款', '提币', '修改密码'],
|
|
||||||
itemList: ['提现', '修改密码'],
|
|
||||||
success: (res) => {
|
|
||||||
switch (res.tapIndex) {
|
|
||||||
case 0:
|
|
||||||
console.log('提现了,')
|
|
||||||
this.$Router.push({
|
|
||||||
name: 'Extract'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
this.showPrivatekey('resetPassword')
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
uni.hideLoading()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.propertyIndex {
|
|
||||||
width: 100%;
|
|
||||||
min-height: 100vh;
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 验证密码弹出层
|
|
||||||
.validationPassword {
|
|
||||||
background-color: white;
|
|
||||||
border-radius: $radius-m;
|
|
||||||
width: 70vw;
|
|
||||||
|
|
||||||
.from {
|
|
||||||
padding: $padding*2;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-align: center;
|
|
||||||
font-size: $title-size;
|
|
||||||
padding-bottom: $padding*2;
|
|
||||||
font-weight: bold;
|
|
||||||
color: $text-price;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input {
|
|
||||||
text-align: center;
|
|
||||||
height: 90rpx;
|
|
||||||
font-size: $title-size;
|
|
||||||
border-radius: $radius-m;
|
|
||||||
background: $border-color-lg;
|
|
||||||
padding: 0 ($padding*2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.buttons {
|
|
||||||
display: flex;
|
|
||||||
border-top: solid 1rpx $border-color;
|
|
||||||
|
|
||||||
.button {
|
|
||||||
width: 50%;
|
|
||||||
font-size: $title-size;
|
|
||||||
line-height: 90rpx;
|
|
||||||
height: 90rpx;
|
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
&.cancel {
|
|
||||||
border-right: solid 1rpx $border-color;
|
|
||||||
color: $text-gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.confirm {
|
|
||||||
color: $text-price;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// .button{
|
|
||||||
// background-color: $text-price;
|
|
||||||
// color: white;
|
|
||||||
// border-radius: $radius-m;
|
|
||||||
// border: none;
|
|
||||||
// margin-top: $margin*2;
|
|
||||||
// font-size: $title-size;
|
|
||||||
// height: 90rpx;
|
|
||||||
// line-height: 90rpx;
|
|
||||||
// }
|
|
||||||
// .close{
|
|
||||||
// @extend .button;
|
|
||||||
// text-align: center;
|
|
||||||
// color: $text-gray;
|
|
||||||
// margin-top: $margin;
|
|
||||||
// background-color: transparent;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
// 账户
|
|
||||||
.propery {
|
|
||||||
position: relative;
|
|
||||||
padding-top: var(--status-bar-height);
|
|
||||||
background-image: linear-gradient(to top, #7c52fc, #976dff);
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
.record-bg {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 300rpx;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 1;
|
|
||||||
opacity: .5;
|
|
||||||
transform: rotate(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// &::before {
|
|
||||||
// position: absolute;
|
|
||||||
// left: 0;
|
|
||||||
// top: 0;
|
|
||||||
// width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
// content: " ";
|
|
||||||
// background-image: url(@/static/imgs/account-bg.png);
|
|
||||||
// background-size: 100%;
|
|
||||||
// background-repeat: no-repeat;
|
|
||||||
// opacity: .5;
|
|
||||||
// transform:rotate(0deg);
|
|
||||||
// }
|
|
||||||
|
|
||||||
.propery-content {
|
|
||||||
position: relative;
|
|
||||||
z-index: 1;
|
|
||||||
padding: $padding/2 $padding $padding*3;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.currency {
|
|
||||||
font-size: $title-size-m;
|
|
||||||
color: rgba($color: white, $alpha: .8);
|
|
||||||
}
|
|
||||||
|
|
||||||
.balance {
|
|
||||||
font-size: $title-size * 2.5;
|
|
||||||
padding: $padding 0;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.frozen {
|
|
||||||
background: rgba($color: #000000, $alpha: .1);
|
|
||||||
color: rgba($color: white, $alpha: .7);
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 24rpx;
|
|
||||||
padding: 6rpx $padding;
|
|
||||||
border-radius: $radius-m;
|
|
||||||
border: solid 1rpx rgba($color: white, $alpha: .4)
|
|
||||||
}
|
|
||||||
|
|
||||||
.balance-flex {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: $margin * 2;
|
|
||||||
|
|
||||||
.balance-flex-item {
|
|
||||||
background-color: white;
|
|
||||||
width: 200rpx;
|
|
||||||
height: 75rpx;
|
|
||||||
line-height: 75rpx;
|
|
||||||
color: $text-price;
|
|
||||||
margin: 0 $margin;
|
|
||||||
border-radius: $radius-m;
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 记录
|
|
||||||
.record {
|
|
||||||
background-color: white;
|
|
||||||
border-radius: $radius $radius 0 0;
|
|
||||||
padding: $padding ($padding * 2);
|
|
||||||
margin-top: -$margin;
|
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
|
|
||||||
.record-tabs {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: $title-size;
|
|
||||||
color: $text-gray;
|
|
||||||
line-height: 70rpx;
|
|
||||||
margin-bottom: $margin;
|
|
||||||
|
|
||||||
.tabs-item {
|
|
||||||
position: relative;
|
|
||||||
padding: 0 $padding;
|
|
||||||
|
|
||||||
&.show {
|
|
||||||
color: $text-price;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
left: $padding;
|
|
||||||
right: $padding;
|
|
||||||
height: 4rpx;
|
|
||||||
content: " ";
|
|
||||||
background-color: $text-price;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -4,25 +4,25 @@
|
|||||||
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
|
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
|
||||||
<view class="propery-content">
|
<view class="propery-content">
|
||||||
<view class="currency">能量球钱包
|
<view class="currency">能量球钱包
|
||||||
<span>(≈ {{ price || '0.00' }} CNY)</span>
|
<span>(≈ {{ price || '0.00' }} CNY)</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="balance">{{ balance.balance || '0.00' }}</view>
|
<view class="balance">{{ balance.balance || '0.00' }}</view>
|
||||||
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
|
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
|
||||||
<view class="balance-flex">
|
<view class="balance-flex">
|
||||||
<!-- <view class="balance-flex-item" @click="showAddress">区块链地址</view> -->
|
<view class="balance-flex-item" @click="showAddress">区块链地址</view>
|
||||||
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
|
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
|
||||||
<view class="balance-flex-item" @click="$Router.push({name: 'Extract'})">能量球提现</view>
|
<view class="balance-flex-item" @click="$Router.push({name: 'Extract'})">能量球转红包</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 账户记录 -->
|
<!-- 账户记录 -->
|
||||||
<view class="record">
|
<view class="record">
|
||||||
<!-- <view class="record-tabs">
|
<view class="record-tabs">
|
||||||
<view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view>
|
<view class="tabs-item" :class="logsType === '' ? 'show': ''" @click="onLogsType('')">全部</view>
|
||||||
<view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view>
|
<view class="tabs-item" :class="logsType === 'in' ? 'show': ''" @click="onLogsType('in')">收入</view>
|
||||||
<view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view>
|
<view class="tabs-item" :class="logsType === 'out' ? 'show': ''" @click="onLogsType('out')">支出</view>
|
||||||
</view> -->
|
</view>
|
||||||
<record :list="logs" :logsType="0" />
|
<record :list="logs" :logsType="logsType" :hash='true' />
|
||||||
<!-- ios安全距离 -->
|
<!-- ios安全距离 -->
|
||||||
<view class="ios-bottom"></view>
|
<view class="ios-bottom"></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -32,13 +32,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import record from '@/components/property/record'
|
import record from '@/components/property/record'
|
||||||
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
|
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
|
||||||
import {
|
import {
|
||||||
sum,
|
sum,
|
||||||
price,
|
price,
|
||||||
logs,
|
logs,
|
||||||
code,
|
code
|
||||||
securityCheck // 输入旧密码是否正确
|
|
||||||
} from '@/apis/interfaces/wallet'
|
} from '@/apis/interfaces/wallet'
|
||||||
import numberJpan from "@/components/numberJpan/numberJpan.vue";
|
import numberJpan from "@/components/numberJpan/numberJpan.vue";
|
||||||
export default {
|
export default {
|
||||||
@@ -50,7 +49,7 @@
|
|||||||
balance: {},
|
balance: {},
|
||||||
price: '0.00',
|
price: '0.00',
|
||||||
logs: [],
|
logs: [],
|
||||||
logsType: 0,
|
logsType: '', // ''全部in入out出
|
||||||
password: '',
|
password: '',
|
||||||
passwordPages: ''
|
passwordPages: ''
|
||||||
};
|
};
|
||||||
@@ -86,54 +85,25 @@
|
|||||||
this.passwordPages = pages
|
this.passwordPages = pages
|
||||||
this.$refs.showPassword.open('center')
|
this.$refs.showPassword.open('center')
|
||||||
},
|
},
|
||||||
// 验证私钥
|
|
||||||
payPassword(type) {
|
|
||||||
if (type === 'confirm') {
|
|
||||||
if (this.password === '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入安全密码',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
securityCheck(this.password).then(res => {
|
|
||||||
this.$refs.showPassword.close()
|
|
||||||
switch (this.passwordPages) {
|
|
||||||
case 'privatekey':
|
|
||||||
this.$Router.push({
|
|
||||||
name: 'Privatekey',
|
|
||||||
params: {
|
|
||||||
password: this.password
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'resetPassword':
|
|
||||||
this.$Router.push({
|
|
||||||
name: 'ResetPassword',
|
|
||||||
params: {
|
|
||||||
password: this.password
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
this.password = ''
|
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err.message,
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.$refs.showPassword.close()
|
|
||||||
},
|
|
||||||
// 交易记录
|
// 交易记录
|
||||||
onLogsType(index) {
|
onLogsType(index) {
|
||||||
if (this.logsType === index) return
|
if (this.logsType === index) return
|
||||||
this.logsType = index
|
this.logsType = index
|
||||||
|
let flag
|
||||||
|
switch(index){
|
||||||
|
case '':
|
||||||
|
flag = 0
|
||||||
|
break;
|
||||||
|
case 'in':
|
||||||
|
flag = 2
|
||||||
|
break;
|
||||||
|
case 'out':
|
||||||
|
flag = 1
|
||||||
|
break;
|
||||||
|
}
|
||||||
this.logs = []
|
this.logs = []
|
||||||
logs({
|
logs({
|
||||||
flag: this.logsType
|
flag: flag
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.logs = res
|
this.logs = res
|
||||||
})
|
})
|
||||||
@@ -145,7 +115,7 @@
|
|||||||
content: '\n地址可以理解为银行卡卡号,与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
|
content: '\n地址可以理解为银行卡卡号,与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
|
||||||
confirmText: '复制',
|
confirmText: '复制',
|
||||||
confirmColor: '#b11eff',
|
confirmColor: '#b11eff',
|
||||||
showCancel:false,
|
showCancel: false,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
@@ -153,7 +123,7 @@
|
|||||||
success() {
|
success() {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '区块链地址已复制',
|
title: '区块链地址已复制',
|
||||||
icon : 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -270,6 +240,7 @@
|
|||||||
background-image: linear-gradient(to top, #7c52fc, #976dff);
|
background-image: linear-gradient(to top, #7c52fc, #976dff);
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.record-bg {
|
.record-bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -6,41 +6,26 @@
|
|||||||
<view class="currency">可提现额度
|
<view class="currency">可提现额度
|
||||||
<!-- <span>(≈ {{ price || '0.00' }} CNY)</span> -->
|
<!-- <span>(≈ {{ price || '0.00' }} CNY)</span> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="balance">{{ balance.balance || '0.00' }}</view>
|
<view class="balance">{{ cash || '0.00' }}</view>
|
||||||
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
|
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
|
||||||
<view class="balance-flex">
|
<view class="balance-flex">
|
||||||
<view class="balance-flex-item" @click="showAddress">区块链地址</view>
|
<!-- <view class="balance-flex-item" @click="showAddress">区块链地址</view> -->
|
||||||
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
|
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
|
||||||
<view class="balance-flex-item" @click="$Router.push({name: 'ExtractRed'})">红包提现</view>
|
<view class="balance-flex-item" @click="$Router.push({name: 'ExtractRed'})">提现至银行卡</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 账户记录 -->
|
<!-- 账户记录 -->
|
||||||
<view class="record">
|
<view class="record">
|
||||||
<view class="record-tabs">
|
<view class="record-tabs">
|
||||||
<view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view>
|
<view class="tabs-item" :class="logsType === '' ? 'show': ''" @click="onLogsType('')">全部</view>
|
||||||
<view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view>
|
<view class="tabs-item" :class="logsType === 'in' ? 'show': ''" @click="onLogsType('in')">收入</view>
|
||||||
<view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view>
|
<view class="tabs-item" :class="logsType === 'out' ? 'show': ''" @click="onLogsType('out')">支出</view>
|
||||||
</view>
|
</view>
|
||||||
<record :list="logs" :logsType="logsType" />
|
<record :list="logs" :logsType="logsType" />
|
||||||
<!-- ios安全距离 -->
|
<!-- ios安全距离 -->
|
||||||
<view class="ios-bottom"></view>
|
<view class="ios-bottom"></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 支付密码 -->
|
|
||||||
<uni-popup ref="showPassword">
|
|
||||||
<view class="validationPassword">
|
|
||||||
<view class="from">
|
|
||||||
<view class="title">验证密码</view>
|
|
||||||
<input class="input" v-model="password" password placeholder="请验证安全密码" />
|
|
||||||
</view>
|
|
||||||
<view class="buttons">
|
|
||||||
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
|
|
||||||
<view class="button confirm" @click="payPassword('confirm', passwordPages)">验证</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
<!-- 原密码弹窗 -->
|
|
||||||
<!-- <number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan> -->
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -48,46 +33,57 @@
|
|||||||
import record from '@/components/property/record'
|
import record from '@/components/property/record'
|
||||||
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
|
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
|
||||||
import {
|
import {
|
||||||
sum,
|
|
||||||
price,
|
|
||||||
logs,
|
logs,
|
||||||
code,
|
accountCashs,// 现金红包新增
|
||||||
securityCheck // 输入旧密码是否正确
|
|
||||||
} from '@/apis/interfaces/wallet'
|
} from '@/apis/interfaces/wallet'
|
||||||
import numberJpan from "@/components/numberJpan/numberJpan.vue";
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
record
|
record
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
balance: {},
|
|
||||||
price: '0.00',
|
|
||||||
logs: [],
|
logs: [],
|
||||||
logsType: 0,
|
logsType: '', // ''全部in入out出
|
||||||
password: '',
|
cash:'0.00',
|
||||||
passwordPages: ''
|
has_more:true,
|
||||||
|
page:1
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onLoad() {
|
||||||
this.getsum()
|
|
||||||
this.getlog()
|
this.getlog()
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
if(uni.getStorageSync('refresh')){
|
||||||
|
this.logsType = ''
|
||||||
|
this.reset()
|
||||||
|
uni.setStorageSync('refresh',false)
|
||||||
|
}else{
|
||||||
|
console.log('没有更多更新')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
console.log('chudi.....')
|
||||||
|
if(this.has_more){
|
||||||
|
this.page = this.page+1
|
||||||
|
this.getlog()
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title:'我是有底线的~',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getsum() {
|
|
||||||
sum().then(res => {
|
|
||||||
this.balance = res
|
|
||||||
this.price = res.price
|
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: err.message
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getlog() {
|
getlog() {
|
||||||
logs().then(res => {
|
let data = {
|
||||||
this.logs = res
|
type:this.logsType,//''全部in入out出
|
||||||
|
page:this.page
|
||||||
|
}
|
||||||
|
accountCashs(data).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.logs = this.logs.concat(res.lists.data)
|
||||||
|
this.cash = res.cash
|
||||||
|
this.has_more = res.lists.page.has_more
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -95,62 +91,17 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 弹出私钥
|
|
||||||
showPrivatekey(pages) {
|
|
||||||
this.passwordPages = pages
|
|
||||||
this.$refs.showPassword.open('center')
|
|
||||||
},
|
|
||||||
// 验证私钥
|
|
||||||
payPassword(type) {
|
|
||||||
if (type === 'confirm') {
|
|
||||||
if (this.password === '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入安全密码',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
securityCheck(this.password).then(res => {
|
|
||||||
this.$refs.showPassword.close()
|
|
||||||
switch (this.passwordPages) {
|
|
||||||
case 'privatekey':
|
|
||||||
this.$Router.push({
|
|
||||||
name: 'Privatekey',
|
|
||||||
params: {
|
|
||||||
password: this.password
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 'resetPassword':
|
|
||||||
this.$Router.push({
|
|
||||||
name: 'ResetPassword',
|
|
||||||
params: {
|
|
||||||
password: this.password
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
this.password = ''
|
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err.message,
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.$refs.showPassword.close()
|
|
||||||
},
|
|
||||||
// 交易记录
|
// 交易记录
|
||||||
onLogsType(index) {
|
onLogsType(index) {
|
||||||
if (this.logsType === index) return
|
if (this.logsType === index) return
|
||||||
this.logsType = index
|
this.logsType = index
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
reset(){
|
||||||
this.logs = []
|
this.logs = []
|
||||||
logs({
|
this.has_more = true
|
||||||
flag: this.logsType
|
this.page =1
|
||||||
}).then(res => {
|
this.getlog()
|
||||||
this.logs = res
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 区块地址
|
// 区块地址
|
||||||
showAddress() {
|
showAddress() {
|
||||||
@@ -175,28 +126,6 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
onNavigationBarButtonTap(e) {
|
|
||||||
if (e.index === 0) {
|
|
||||||
uni.showActionSheet({
|
|
||||||
// itemList: ['转账', '收款', '提币', '修改密码'],
|
|
||||||
itemList: ['提现', '修改密码'],
|
|
||||||
success: (res) => {
|
|
||||||
switch (res.tapIndex) {
|
|
||||||
case 0:
|
|
||||||
console.log('提现了,')
|
|
||||||
this.$Router.push({
|
|
||||||
name: 'Extract'
|
|
||||||
})
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
this.showPrivatekey('resetPassword')
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
uni.hideLoading()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -343,7 +272,7 @@
|
|||||||
|
|
||||||
.balance-flex-item {
|
.balance-flex-item {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
width: 200rpx;
|
width: 300rpx;
|
||||||
height: 75rpx;
|
height: 75rpx;
|
||||||
line-height: 75rpx;
|
line-height: 75rpx;
|
||||||
color: $text-price;
|
color: $text-price;
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<span>
|
<span>
|
||||||
能量球:{{item.quantity}}
|
提现:¥{{item.quantity}}
|
||||||
<span class='left-des'>金额≈¥{{item.take}} 手续费:{{item.tax}}</span>
|
<span class='left-des'>实际到账:¥{{item.take}} 手续费:{{item.tax}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span>{{item.create_at}}</span>
|
<span>{{item.create_at}}</span>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -78,6 +78,14 @@ $padding: 30rpx;
|
|||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
}
|
}
|
||||||
|
.ellipsis-1{
|
||||||
|
max-width: 100%;
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.ellipsis-3 {
|
.ellipsis-3 {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
|
|||||||
165
unpackage/dist/dev/app-plus/app-service.js
vendored
165
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
200
unpackage/dist/dev/app-plus/app-view.js
vendored
200
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user