This commit is contained in:
唐明明
2021-09-26 17:19:57 +08:00
24 changed files with 1542 additions and 928 deletions

View File

@@ -32,7 +32,7 @@ const request = (parameter) => {
'Authorization': store.getters.getToken || '' 'Authorization': store.getters.getToken || ''
} }
console.log('parameterDbug', parameter) // console.log('parameterDbug', parameter)
// 加载提示 // 加载提示
uni.showLoading({ uni.showLoading({

View File

@@ -19,7 +19,7 @@ const category = () => {
// 水晶任务 // 水晶任务
const task = () => { const task = () => {
return request({ return request({
url: 'crystal/task' url: 'tasks'
}) })
} }

View File

@@ -254,6 +254,34 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
}, },
"name": "Fragment" "name": "Fragment"
},
{
"path": "pages/wallet/addCard",
"style": {
"navigationBarTitleText": "添加银行卡",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "addCard"
},{
"path": "pages/wallet/selectCard",
"style": {
"navigationBarTitleText": "银行卡列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "selectCard"
},{
"path": "pages/wallet/withdrawList",
"style": {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "withdrawList"
}], }],
"globalStyle": { "globalStyle": {
"navigationStyle": "custom", "navigationStyle": "custom",

View File

@@ -1,141 +1,106 @@
<template> <template>
<view class="crystal"> <view class="crystal">
<!-- 公共提示弹出 start --> <!-- 签到成功弹出 -->
<order-tips title="温馨提示" content="恭喜您,签到成功" :tipsState="sign.signShow" @tipseject="signject" /> <view class="signBack" v-if="sign.signShow"></view>
<!-- 公共提示弹出 end --> <view class="signPop" v-if="sign.signShow">
<image class="signPop-tips" src="../../static/user/sign_tips.png" mode="widthFix"></image>
<!-- 公共提示弹出 start --> <view class="signPop-cont">
<order-tips :title="tips.tipsTitle" :content="tips.tipsContent" :tipsState="tips.tipsState" @tipseject="tipseject" /> <view class="signPop-cont-name">
<!-- 公共提示弹出 end --> 签到成功
<!-- 账户余额 -->
<view class="total">
<view class="item ellipsis"><image src="@/static/icons/gemstone-icon.png"/>原石 {{ account.coin }}</view>
<view class="item ellipsis"><image src="@/static/icons/crystal-icon.png"/>水晶 {{ account.crystal }}</view>
</view>
<!-- 矿石 -->
<view class="ore">
<image src="/static/img/crystal-ore.png" mode="widthFix" />
<view class="ore-lists">
<view class="oct-float ore-item" v-for="(item, index) in crystalArr" :key="index" @click="ledCrystal(index)">
<block v-if="item.amount !== null">
<image src="/static/imgs/crystal-ore-icon.png" mode="widthFix" class="icon" />
<view class="text">水晶{{ item.amount || '-'}}</view>
</block>
</view>
<navigator url="../index/index" open-type="switchTab" hover-class="none" class="oct-float ore-item-nav">
<image src="/static/imgs/gemstone-ore-icon.png" mode="widthFix" class="icon" />
<view class="text">购物<uni-icons type="arrowright" color="#FFFFFF" size="14"></uni-icons></view>
</navigator>
</view>
</view>
<!-- 任务分类 -->
<scroll-view class="task-block" scroll-x="true">
<!-- url="../index/index" open-type="switchTab" -->
<view class="item" v-for="(item, index) in categoryArr" :key="index" @click="JumpUrl(item.url, item.title)">
<view class="text">{{ item.remark }}</view>
<view class="icon">
<image :src="item.cover" />
</view>
<view class="title">{{ item.title }}</view>
</view>
</scroll-view>
<!-- 内容 -->
<view class="content">
<!-- 签到 -->
<view class="signCont">
<view class="content-title">
<view class="content-title-text">
每日签到
<view class="tips">
累计天数越多水晶奖励越多
</view>
</view>
<view class="content-titl-btn" v-if="sign.signCan" @click="signClick">
立即签到
</view>
</view> </view>
<view class="sign"> <view class="signPop-cont-text">
<view class="sign-list"> 能量碎片<view class="signPop-cont-number">+{{sign.signSuccess}}</view>
<view class="item" v-for="(item, index) in sign.signArr" :key="index">
<view class="item-icon item-done" v-if="item.sign">
<image src="@/static/imgs/crystal-sign.png" mode="aspectFill"></image>
</view>
<view class="item-icon show" :class="{ active: index == 3 || index == 7 }" v-else><text>+{{ item.crystal }}</text></view>
<view class="item-title">{{ item.text }}</view>
</view>
</view>
<view class="sign-text">再签到{{ sign.nextTask.day }}天额外赠送{{ sign.nextTask.diff }}个水晶奖励</view>
</view>
</view>
<!-- 水晶任务 -->
<view class="content-title">
<view class="content-title-text">
水晶任务
</view> </view>
</view> </view>
<view class="task"> </view>
<view class="task-item" v-for="(item, index) in task" :key="index" @click="JumpUrl(item.url, item.title)">
<image class="task-icon" :src="item.ico" mode="aspectFill"></image> <!-- 签到 -->
<view class="task-title">{{item.title || '-'}}</view> <view class="signCont">
<view class="task-subtitle">{{item.remark || '-'}}</view> <view class="content-title">
<view class="task-label">{{item.tips || '-'}}<image class="task-label-icon" src="@/static/imgs/user-crystalMark-grey.png" @click.stop="crystalShow"></image></view> 每日签到能量碎片多多<image @click="showHelp" class="content-title-img" src="../../static/user/sign_privilege.png" mode="aspectFill"></image>
</view> </view>
</view> <view class="sign">
</view> <view class="sign-list" :class="{ active: item.sign }" v-for="(item, index) in sign.signArr" :key="index">
<block v-if="index == 7">
<image class="sign-list-img" :src="item.sign ? '../../static/user/sign_icon_last_active.png' : '../../static/user/sign_icon_last.png'" mode="aspectFill"></image>
</block>
<block v-else>
<image class="sign-list-img" :src="item.sign ? '../../static/user/sign_icon_active.png' : '../../static/user/sign_icon.png'" mode="aspectFill"></image>
</block>
<view class="sign-list-day">
{{ item.text }}
</view>
</view>
</view>
<view class="sign-record">再签到{{ sign.nextTask.day }}天额外赠送{{ sign.nextTask.diff }}个能量碎片</view>
</view>
<view class="signBtn">
<view class="signBtn-go" v-if="sign.signCan" @click="signClick">
签到领取能量碎片
</view>
<view class="signBtn-go" v-else @click="$Router.push({name:'Fragment'})">
能量碎片记录<image class="signBtn-go-icon" src="/static/user/sign_arrow.png" mode="aspectFill"></image>
</view>
</view>
<!-- 水晶任务 -->
<view class="task">
<view class="task-liest">
能量碎片任务
</view>
<view class="task-item" v-for="(item, index) in task" :key="index" @click="JumpUrl(item.url, item.title)">
<image class="task-icon" :src="item.ico" mode="aspectFill"></image>
<view class="task-title">{{item.title}}</view>
<view class="task-subtitle">{{item.remark}}</view>
<view class="task-label">{{item.tips}}<image @click.stop="showHelp" class="task-label-icon" src="@/static/imgs/user-crystalMark-grey.png"></image></view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import { crystals, thawlog, task, category, sign, operateSign } from '@/apis/interfaces/crystal' import { task, sign, operateSign } from '@/apis/interfaces/crystal'
import { userIndex } from '@/apis/interfaces/user'
export default { export default {
data() { data() {
return { return {
account: {
coin: 0,
crystal: '0.00'
},
yesterday: '0.00',
crystalArr: [],
categoryArr: [], // 分类列表
ids: [],
task: [], task: [],
sign: { sign: {
signArr : [], signArr : [],
nextTask: '', nextTask: '',
signCan : false, signCan : false,
signShow: false signShow: false,
signSuccess: ''
}, },
tips : { tips : {
tipsTitle : '', // 弹出的动态名称 tipsTitle : '', // 弹出的动态名称
tipsContent : '', // 弹出的动态内容 tipsContent : '', // 弹出的动态内容
tipsState : false // 弹出的动态状态 tipsState : false // 弹出的动态状态
} },
energyShard : '' // 碎片说明
} }
}, },
onShow() { onShow() {
// 获取水晶领取信息 this.sign.signShow = false
crystals().then(res => { // 获取能量领取信息
this.account = { task().then(res => {
coin: res.coin, uni.hideLoading()
crystal: res.crystal this.task = res
} }).catch(err => {
this.crystalArr = res.crystal_array uni.showToast({
this.ids = res.all_ids icon: 'none',
this.yesterday = res.yesterday_crystal title: err.message
}).catch(err => { })
uni.showToast({ })
icon: 'none',
title: err.message
})
})
// 获取水晶任务
task().then(res => {
this.task = res
})
// 获取水晶分类 // 读取配置信息
category().then(res => { userIndex().then(res=>{
this.categoryArr = res this.energyShard = res.help_doc.energy_shard
}).catch(err =>{
uni.showToast({
title: err.message,
icon : 'none'
})
}) })
// 获取水晶签到信息 // 获取水晶签到信息
@@ -143,46 +108,6 @@
}, },
methods: { methods: {
ledCrystal(index) {
// 领取水晶
thawlog({
thaw_id: this.crystalArr[index].log_id,
all_ids: this.ids
}).then(res => {
uni.showToast({
icon: 'none',
title: '+' + this.crystalArr[index].amount + '水晶',
duration: 2000
})
this.$set(this.account, 'crystal', res.crystal)
this.ids = res.all_ids
if (JSON.stringify(res.last) === '[]') {
this.$set(this.crystalArr, index, {
amount: null
})
return
}
this.$set(this.crystalArr, index, res.last)
}).catch(err => {
uni.showToast({
icon: 'none',
title: err
})
})
},
// 商品详情
onTack(e) {
uni.navigateTo({
url: '../goods/goods?id=' + e.goods_id
})
},
// 提示信息
onShowToast() {
uni.showToast({
title: '暂未开放,敬请期待',
icon : 'none'
})
},
// 水晶签到信息 // 水晶签到信息
signInfo() { signInfo() {
sign().then(res => { sign().then(res => {
@@ -196,15 +121,25 @@
}) })
}) })
}, },
// 能量碎片提示信息
showHelp() {
uni.showModal({
title: '能量碎片',
content: this.energyShard.description,
showCancel: false
})
},
// 签到 // 签到
signClick() { signClick() {
uni.vibrateShort({ uni.vibrateShort({
success: () => { success: () => {
operateSign().then(res => { operateSign().then(res => {
this.sign.signSuccess = res.task_crystals
// 获取水晶签到信息 // 获取水晶签到信息
this.sign.signShow = true
this.signInfo(); this.signInfo();
this.sign.signShow = !this.sign.signShow
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@@ -214,335 +149,222 @@
} }
}) })
}, },
// 提示语-组件返回参数
signject(val) {
console.log(val)
this.sign.signShow = val.tipsState
},
// 水晶分类跳转 // 能量跳转
JumpUrl(open, title) { JumpUrl(open, title) {
var type = open.openType; console.log(open)
switch(type){ var type = open.openType;
case 'switchTab': switch(type){
uni.switchTab({ case 'switchTab':
url: open.path uni.switchTab({
}) url: open.url
break; })
case 'web': break;
uni.navigateTo({ case 'web':
url: `/pages/web-view/index?title=${title}&url=${open.url}` uni.navigateTo({
}) url: open.url
break; })
case 'navigateTo': break;
uni.navigateTo({ case 'navigateTo':
url: open.path uni.navigateTo({
}) url: open.url
break; })
} break;
}, }
},
// 水晶原则提示语
crystalShow () {
this.tips.tipsTitle = '水晶规则'
this.tips.tipsContent = '水晶是用户获取原石的影响因子,同一时段内,水晶越高,获取的原石越多.'
this.tips.tipsState = !this.tips.tipsState
},
// 水晶原则提示语-组件返回参数
tipseject(val) {
this.tips.tipsState = val.tipsState
},
} }
} }
</script> </script>
<style scoped> <style scoped>
/* 水晶漂浮动画 */ page {
.oct-float { background: #FFFFFF;
animation: 4s octfloat infinite; }
}
@keyframes octfloat {
0% {
margin-top: 0;
}
50% {
margin-top: 15rpx;
}
100% {
margin-top: 0;
}
}
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
// 背景 // 弹出层
.crystal{ .signBack {
background: $mian-color-deep; width: 100%;
min-height: 100vh; height: 100%;
padding-top: var(--status-bar-height); position: fixed;
box-sizing: border-box; background-color: rgba(0,0,0,.7);
background-size: 100%; z-index: 98;
background-position: top center; left: 0;
background-repeat: no-repeat; top: 0;
} animation: cssAnimation 0s ease-in 4s forwards;
// 底部内容 }
.content{ .signPop {
margin-top: $margin * 2; width: 60%;
padding: $padding; position: fixed;
background: white; z-index: 99;
border-radius: $radius $radius 0 0; left: 20%;
// 标题 top: 30%;
.content-title{ height: 160px;
padding: 0 $padding / 2; animation: cssAnimation 0s ease-in 4s forwards;
.signPop-tips,
.signPop-cont{
position: absolute;
left: 0;
top: 0;
width: 100%; width: 100%;
}
.signPop-cont {
color: #FFFFFF;
text-align: center;
padding-top: 90px;
.signPop-cont-name {
font-size: 34rpx;
margin-bottom: 10rpx;
}
.signPop-cont-text {
text-align: center;
.signPop-cont-number {
display: inline-block;
color: #ffee4d;
font-size: 38rpx;
color: #f9dc4a;
font-weight: 600;
margin-left: 10rpx;
}
}
}
}
@keyframes cssAnimation {
to {
width: 0;
height: 0;
visibility: hidden;
}
}
// 签到
.signCont {
background: #7c52fc;
color: #FFFFFF;
padding-bottom: 80rpx;
.content-title {
font-size: 40rpx;
padding: 50rpx 45rpx;
box-sizing: border-box; box-sizing: border-box;
color: $text-color; display: flex;
position: relative; .content-title-img {
.content-title-text { width: 32rpx;
font-weight: bold; height: 32rpx;
font-size: $title-size + 4; margin: 12rpx 20rpx;
width: calc(100% - 160rpx); }
margin-bottom: $margin; }
.tips { .sign {
font-weight: normal; margin: 0 0 30rpx;
font-size: $title-size-sm; padding: 0 30rpx;
margin-top: $margin - 10; box-sizing: border-box;
color: $uni-text-color; overflow: hidden;
.sign-list {
width: calc(14.28% - 20rpx);
margin: 0 10rpx;
display: inline-block;
text-align: center;
background-color: rgba(0,0,0,.3);
border-radius: 10rpx;
padding: 20rpx 0;
box-sizing: border-box;
.sign-list-img {
width: 38rpx;
height: 38rpx;
margin-bottom: 5rpx;
}
.sign-list-day {
font-size: 24rpx;
}
&.active {
background-color: #ffdb00;
color: #413e30;
box-shadow: 0 0 20rpx rgba(76,43,177,.3);
} }
} }
.content-titl-btn { }
.sign-record {
opacity: .8;
padding: 0 40rpx;
display: flex;
line-height: 44rpx;
}
}
// 签到按钮
.signBtn {
padding: 0 40rpx;
box-sizing: border-box;
width: 100%;
text-align: center;
margin-top: -50rpx;
.signBtn-go {
width: 100%;
line-height: 100rpx;
border-radius: 80rpx;
background-color: #f9dc4a;
color: #333333;
font-size: 32rpx;
font-weight: 600;
.signBtn-go-icon {
width: 36rpx;
height: 36rpx;
vertical-align: -6rpx;
}
}
}
// 水晶任务
.task{
padding: 60rpx 30rpx;
box-sizing: border-box;
.task-liest {
font-weight: bold;
font-size: 34rpx;
margin-bottom: 20rpx;
}
.task-item {
position: relative;
border-bottom: solid 2rpx #F5F5F5;
padding: 30rpx 200rpx 40rpx 90rpx;
&:last-child {
border: none;
}
.task-icon {
position: absolute;
top: 50rpx;
left: 0;
width: 58rpx;
height: 58rpx
}
.task-title {
font-size: 32rpx;
color: #333;
line-height: 50rpx;
margin-bottom: 10rpx;
}
.task-subtitle {
color: #999;
font-size: 26rpx;
line-height: 30rpx;
}
.task-label {
position: absolute; position: absolute;
right: 0; right: 0;
top: $margin; top: 38rpx;
background-image: linear-gradient(to left, $mian-color-deep, $mian-color); line-height: 80rpx;
color: $uni-text-color-inverse; font-size: 26rpx;
font-size: $title-size-sm; color: #333;
line-height: 60rpx; display: -webkit-box;
line-height: 60rpx; display: -webkit-flex;
border-radius: $radius * 2; display: flex;
width: 160rpx; .task-label-icon {
text-align: center; width: 34rpx;
height: 34rpx;
margin: 24rpx 0 0 20rpx;
}
} }
} }
// 签到 }
.sign{
padding-top: $padding;
padding-bottom: $padding * 2;
.sign-list{
display: flex;
justify-content: space-around;
.item{
text-align: center;
.item-icon{
display: inline-block;
background-image: linear-gradient(to left, $mian-color-deep, $mian-color);
color: white;
width: 54rpx;
height: 54rpx;
line-height: 50rpx;
border-radius: 50%;
border:solid 2rpx $mian-color;
box-sizing: border-box;
&.item-done {
background-image: linear-gradient(to left, #999, #999);
border-color: #999;
}
image {
width: 34rpx;
height: 34rpx;
margin-top: 8rpx;
}
&.active {
background-image: linear-gradient(to left, #ee1d23, #ef8c85);
border-color: #fd6165;
}
text {
font-size: $title-size-sm;
transform: scale(.8);
display: block;
}
}
.item-title{
color: $text-gray;
padding-top: $padding / 2;
font-size: $title-size-sm - 2;
}
}
}
.sign-text{
padding: $padding ($padding / 2) 0;
color: $mian-color-deep;
font-size: $title-size-m;
}
}
// 水晶任务
.task{
padding: 0 ($padding / 2) $padding * 2;
.task-item{
position: relative;
margin: 0 ($margin / 2);
border-bottom: solid 1rpx $border-color;
padding: $padding 200rpx $padding 90rpx;
&:last-child{
border-bottom: none;
}
.task-icon{
position: absolute;
top: $padding + 8;
left: 0;
width: 70rpx;
height: 70rpx;
// background: $border-color-lg;
}
.task-title{
font-size: $title-size;
color: $text-color;
line-height: 50rpx;
}
.task-subtitle{
color: $text-gray;
font-size: $uni-font-size-sm;
line-height: 30rpx;
}
.task-label{
position: absolute;
right: 0;
top: $padding;
line-height: 80rpx;
font-size: $uni-font-size-sm;
color: $text-color;
display: flex;
.task-label-icon {
width: $uni-img-size-sm - 6;
height: $uni-img-size-sm - 6;
margin: $margin + 4 0 0 $margin - 10;
}
}
}
}
}
// 数据统计
.total {
position: relative;
margin: $margin ($margin + $margin/2);
background: rgba($color: $mian-color-deep, $alpha: .6);
padding: 0;
display: flex;
border-radius: $radius;
.item {
width: 50%;
padding: 0 $padding;
text-align: center;
color: white;
font-size: $title-size-m;
line-height: 90rpx;
image{
width: 38rpx;
height: 38rpx;
vertical-align: top;
margin-top: calc((90rpx - 38rpx) / 2);
margin-right: $margin / 2;
}
}
&::before {
position: absolute;
top: 0;
bottom: 0;
content: "";
width: 2rpx;
left: 50%;
background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .7), transparent);
}
}
// 矿石
.ore {
position: relative;
&>image {
width: 100%;
}
.ore-lists {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
.oct-float-item{
position: absolute;
text-align: center;
.text {
margin-top: $margin / 2;
color: white;
font-size: $title-size-sm;
line-height: 40rpx;
text-shadow: 0 3rpx 3rpx rgba($color: #000000, $alpha: .2);
}
.icon {
width: 58rpx;
vertical-align: top;
}
}
.ore-item-nav{
@extend .oct-float-item;
right: $margin * 3;
top: 12%;
}
.ore-item {
@extend .oct-float-item;
&:nth-child(1) { top: 16%; left: 13%; }
&:nth-child(2) { top: 50%; right: 10%; }
&:nth-child(3) { top: 23%; right: 20%; }
&:nth-child(4) { top: 70%; left: 33%;}
&:nth-child(5) { top: 40%; left: 20%; }
&:nth-child(6) { top: 58%; left: 10%;}
&:nth-child(7) { top: 10%; right: 43%;}
&:nth-child(8) { top: 46%; right: 29%;}
}
}
}
// 任务
.task-block {
white-space: nowrap;
.item {
background: rgba($color: $mian-color, $alpha: .2);
display: inline-block;
margin-left: $margin;
width: 210rpx;
padding: $padding * 2 $padding;
border-radius: $radius;
box-sizing: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .06);
text-align: center;
&:first-child {
margin-left: $margin + $margin/2;
}
&:last-child {
margin-right: $margin + $margin/2;
}
.icon {
display: inline-block;
margin: $margin 0;
width: 98rpx;
height: 98rpx;
line-height: 98rpx;
background: $mian-color-deep;
border-radius: 50%;
text-align: center;
image {
width: 56rpx;
height: 56rpx;
vertical-align: middle;
}
}
.text {
font-size: $title-size-m;
color: $mian-color;
}
.title {
font-size: $title-size;
color: white;
font-weight: bold;
}
}
}
</style> </style>

View File

@@ -1,7 +1,7 @@
<template> <template>
<view class="content"> <view class="content">
<view class="codeContent"> <view class="codeContent">
<image class="codeContent-back" src="../../static/icons/store_codeBack.png" mode="widthFix"></image> <!-- <image class="codeContent-back" src="../../static/icons/store_codeBack.png" mode="widthFix"></image> -->
<image class="codeContent-cont" src="../../static/icons/store_contBack.png" mode="widthFix"></image> <image class="codeContent-cont" src="../../static/icons/store_contBack.png" mode="widthFix"></image>
<view class="textContent"> <view class="textContent">
<view class="company"> <view class="company">
@@ -146,7 +146,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
background-color: #e93340; background: #7c52fc;
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
} }
@@ -227,14 +227,14 @@
} }
.codeBnt { .codeBnt {
background-color: #e1293f; background-color: #7c52fc;
text-align: center; text-align: center;
border-radius: 10rpx; border-radius: 10rpx;
line-height: 90rpx; line-height: 90rpx;
font-weight: 600; font-weight: 600;
font-size: $title-size; font-size: $title-size;
color: #FFFFFF; color: #FFFFFF;
box-shadow: 4rpx 0 10rpx rgba(155,0,19,.5); box-shadow: 2px 0 5px rgb(124, 82, 252);
position: relative; position: relative;
} }

View File

@@ -22,7 +22,7 @@
</view> </view>
</view> </view>
<view class="codeBack-yard"> <view class="codeBack-yard">
<image class="codeBack-yard-img" src="/static/user/wallet-code.png" mode="widthFix"></image> <image class="codeBack-yard-img" :src="inviteData.code" mode="widthFix"></image>
<view class="codeBack-yard-name"> <view class="codeBack-yard-name">
扫码识别链商星球 扫码识别链商星球
</view> </view>
@@ -51,7 +51,6 @@
// 二维码 // 二维码
inviteInfo(){ inviteInfo(){
userInvite().then(res => { userInvite().then(res => {
console.log(res)
this.inviteData = res this.inviteData = res
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
@@ -134,7 +133,7 @@
position: absolute; position: absolute;
background-color: #8c62fe; background-color: #8c62fe;
content: ''; content: '';
top: 266px; top: 278px;
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
border-radius: $uni-border-radius-circle; border-radius: $uni-border-radius-circle;
@@ -220,7 +219,9 @@
border-top: #cccbd0 2rpx dashed; border-top: #cccbd0 2rpx dashed;
} }
.codeBack-yard-img { .codeBack-yard-img {
max-width: 80%; max-width: 75%;
border: 4rpx solid #f3f3f3;
margin: 20rpx 0 40rpx;
} }
.codeBack-yard-name { .codeBack-yard-name {
color: #a0a1a3; color: #a0a1a3;

View File

@@ -431,7 +431,7 @@
height: 300rpx; height: 300rpx;
} }
.customerCont-text { .customerCont-text {
width: 260rpx; width: 80%;
margin: 0 auto; margin: 0 auto;
} }
.customerClose { .customerClose {

180
pages/wallet/addCard.vue Normal file
View File

@@ -0,0 +1,180 @@
<template>
<view class="WithdrawingCoin">
<view class="withdrawing-content">
<view class="item-name">添加提现银行</view>
<view class="item">
<view class="title">收款人姓名</view>
<input class="input_num" v-model="name" maxlength="16"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
placeholder="请输入收款人姓名" />
</view>
<view class="item">
<view class="title">收款人账号</view>
<input class="input_num" v-model="card" type="number"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
placeholder="请输入收款人账号" />
</view>
<view class="item">
<view class="title">开户行</view>
<input class="input_num" v-model="name" maxlength="30"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
placeholder="请输入开户行" />
</view>
<view class="item">
<view class="title">支行名称</view>
<input class="input_num" v-model="name" maxlength="30"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
placeholder="省-市-区-支行名称" />
</view>
<view class="item">
<view class="title">收款人手机号</view>
<input class="input_num" v-model="name" maxlength="11"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
placeholder="请输入手机号" />
</view>
</view>
<view class="btn" @click="sureAdd">确认添加银行</view>
<view class="history" @click="$Router.push({name:'withdrawList'})">提现记录<u-icon name="question-circle-fill" /></view>
</view>
</template>
<script>
export default {
data() {
return {
card: '', // 银行卡号
name: '', // 姓名
withdraw_input: '' // 提现能量球数量
};
},
onLoad() {},
methods: {
sureAdd() {
uni.navigateBack({})
}
}
}
</script>
<style lang="scss">
page {
width: 100%;
min-height: 100vh;
background-color: #fff;
}
.history {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
color: #cacaca;
.u-icon{
margin-left: 10rpx;
}
}
.withdrawing-content {
min-height: 300rpx;
background-color: #fff;
box-shadow: 0 0 30rpx 1rpx rgba($color: #000000, $alpha: 0.2);
margin: $margin;
border-radius: 20rpx;
padding: $padding;
font-size: $title-size-m;
.item-name {
text-align: center;
padding: $padding * .6;
color: #303030;
font-weight: bold;
margin-bottom: $margin;
font-size: $title-size *1.2;
position: relative;
&::after{
content: '';
position: absolute;
background-color: rgba($color: $text-price, $alpha: .4);
width: 200rpx;
height: 10rpx;
left: 50%;
margin-left: -100rpx;
bottom: 16rpx;
z-index: 1;
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.6);
}
}
.item {
border-bottom: solid 1rpx #f8f8f8;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding: $padding 0;
span:nth-child(1) {
color: #666;
margin-right: 20rpx;
}
.title {
width: 200rpx;
font-size: 28rpx;
&::before{
content: '*';
color: red;
padding-right: 4rpx;
}
}
.input_num {
font-size: $title-size*1;
color: #3a3a3a;
font-weight: bolder;
flex: 1;
margin-left: 20rpx;
}
}
.item-total {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding*1 0 0 0;
color: #3a3a3a;
.total {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
.money {
padding-top: $padding *0.5;
}
}
.lists {
color: $text-price;
}
}
}
.btn {
background-image: linear-gradient(to right, #7c52fc, #976dff);
color: #fff;
border-radius: 10rpx;
text-align: center;
padding: $padding * .9;
margin:$margin*3 $margin * 2 $margin $margin*2;
font-size: $title-size;
font-weight: bold;
letter-spacing: 2rpx;
}
</style>

View File

@@ -1,393 +1,408 @@
<template> <template>
<view class="WithdrawingCoin "> <view class="WithdrawingCoin ">
<view class="withdrawing-content"> <view class="propery">
<view class="item-name">能量球提现至银行卡</view> <image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
<view class="item"> <view class="propery-content">
<view style="flex: 1;"> <view class="currency">能量球钱包
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number" <!-- <span>( {{ price || '0.00' }} CNY)</span> -->
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" placeholder="请输入能量球数量" /> </view>
<view v-if="total"> {{total}}</view> <view class="balance">{{ balance.balance || '0.00' }}</view>
</view> <view class="frozen" @click="withdrawDetail">提现记录</view>
<view class="all" @click="all">全部提现</view> </view>
</view> </view>
<view class="item">
<input class="input_num" v-model="card" type="number" <view class="item-name">
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" placeholder="请输入您要收款得银行卡卡号" /> 提现至银行卡
</view> <view class="right">
<view class="item"> <view class="cardName" @click="addCard">添加银行卡</view>
<input class="input_num" v-model="name" maxlength="10" <uni-icons type="arrowright" size="12" color="#fff" />
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" placeholder="请输入收款人姓名" /> </view>
</view> </view>
<number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan> <view class="item-name">
<view class="item-total"> 选择银行卡
<view class="total"><span>能量球总数 : {{balance}}</span><span class="money">总估值(CNY){{(balance*price).toFixed(2)}}</span></view> <view class="right">
</view> <view class="cardName" @click="selectCard">选择银行卡</view>
</view> <uni-icons type="arrowright" size="12" color="#fff" />
<view class="btn" @click="open">提现至银行卡</view> </view>
<view class="ew_lists" v-if="withdrawLists.length>0"> </view>
<view class="" v-for="(item,index) in withdrawLists " :key="index"> <view class="withdrawing-content">
<view class="receiptCode"> <view class="item">
回执单号{{item.receipt_code}} <view style="flex: 1;">
</view> <input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
<view class="item"> placeholder-style="color:#999;font-weight:normal; font-size:40rpx;"
<view class="left"> placeholder="能量球数量" />
<span>能量球:{{item.total}}</span> <view v-if="total"> {{total}}</view>
<span>金额{{item.arrival}}</span> </view>
</view> <view class="all" @click="all">全部提现</view>
<view class="right"> </view>
<span> {{item.created_at}} 提现</span> </view>
<span> {{item.paid_at?item.paid_at+'到账':'努力打款中'}}</span> <view class="btn" @click="open">提现至银行卡</view>
</view> <view class="des">预计5- 10个工作日到账</view>
</view> </view>
</view>
<view class="hasmore">
{{has_more?'努力加载中~':'我是有底线的~'}}
</view>
</view>
<no-list v-else name='no-records' txt="暂无任何提现记录哦~" />
</view>
</template> </template>
<script> <script>
import { import {
withdraw, withdraw,
withdrawLogs, withdrawLogs,
withdrawDo withdrawDo
} from '@/apis/interfaces/wallet.js'; } from '@/apis/interfaces/wallet.js';
import numberJpan from "@/components/numberJpan/numberJpan.vue"; import numberJpan from "@/components/numberJpan/numberJpan.vue";
export default { export default {
data() { data() {
return { return {
balance: 0, // 钱包能量球数量 balance: 0, // 钱包能量球数量
price: 0, // 当前能量球价格 price: 0, // 当前能量球价格
card: '', // 银行卡号 card: '', // 银行卡号
name: '', // 姓名 name: '', // 姓名
password: '', // password: '', //
withdraw_input: '', // 提现能量球数量 withdraw_input: '', // 提现能量球数量
total: '', // 提现能量球转化成的钱数 total: '', // 提现能量球转化成的钱数
page: 1, page: 1,
has_more: true, has_more: true,
withdrawLists: [], withdrawLists: [],
}; };
}, },
components: { components: {
'number-jpan': numberJpan 'number-jpan': numberJpan
}, },
onLoad() { onLoad() {
this.reset() this.reset()
}, },
onReachBottom() { onReachBottom() {
if (this.withdrawLists.length > 0) { if (this.withdrawLists.length > 0) {
if (this.has_more) { if (this.has_more) {
this.withdrawLogs() this.withdrawLogs()
} else { } else {
uni.showToast({ uni.showToast({
title: '没有更多~', title: '没有更多~',
icon: 'none' icon: 'none'
}) })
} }
} }
}, },
methods: { methods: {
// 提现基本信息 // 提现基本信息
withdraw() { withdraw() {
withdraw().then(res => { withdraw().then(res => {
this.balance = Number(res.balance) this.balance = Number(res.balance)
this.price = Number(res.price) this.price = Number(res.price)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: 'none' icon: 'none'
}) })
}) })
}, },
// 提现记录 // 提现记录
withdrawLogs() { withdrawLogs() {
withdrawLogs({ withdrawLogs({
page: this.page page: this.page
}).then(res => { }).then(res => {
this.withdrawLists = this.withdrawLists.concat(res.data) this.withdrawLists = this.withdrawLists.concat(res.data)
if (res.page.has_more) { if (res.page.has_more) {
this.page = this.page + 1 this.page = this.page + 1
this.has_more = true this.has_more = true
} else { } else {
this.has_more = false this.has_more = false
} }
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: 'none' icon: 'none'
}) })
}) })
}, },
// 输入提现能量球数量 // 输入提现能量球数量
inputNum(e) { inputNum(e) {
let number = Number(e.detail.value) let number = Number(e.detail.value)
if (number <= this.balance) { if (number <= this.balance) {
this.total = Number(e.detail.value) * this.price this.total = Number(e.detail.value) * this.price
} else { } else {
uni.showToast({ uni.showToast({
title: '最大值能超过' + this.balance+'', title: '最大值能超过' + this.balance + '',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
this.withdraw_input = '' this.withdraw_input = ''
this.total = 0 this.total = 0
} }
}, },
// 点击全部 // 点击全部
all() { all() {
if (this.balance > 0) { if (this.balance > 0) {
this.withdraw_input = this.balance this.withdraw_input = this.balance
this.total = this.balance * this.price this.total = this.balance * this.price
} else { } else {
uni.showToast({ uni.showToast({
title: '啥也没有,我也做不到~', title: '啥也没有,我也做不到~',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
} }
}, },
// 打开密码 出发提现功能 // 打开密码 出发提现功能
open() { open() {
if (this.total > 0) { if (this.total > 0) {
let params = { let params = {
name: this.name, name: this.name,
card: this.card, card: this.card,
total: this.withdraw_input total: this.withdraw_input
} }
if (params.name === '' || params.card === '' || params.total === 0) { if (params.name === '' || params.card === '' || params.total === 0) {
uni.showToast({ uni.showToast({
title: '重新确认提现信息', title: '重新确认提现信息',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
} else { } else {
this.$refs.numberPad.open() this.$refs.numberPad.open()
} }
} else { } else {
uni.showToast({ uni.showToast({
title: '啥也没有,我也做不到~', title: '啥也没有,我也做不到~',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
} }
}, },
// 输入密码成功后,,, // 输入密码成功后,,,
closeChange(e) { closeChange(e) {
uni.showLoading({ uni.showLoading({
title: '提现中~' title: '提现中~'
}) })
let params = { let params = {
name: this.name, name: this.name,
card: this.card, card: this.card,
total: this.withdraw_input, total: this.withdraw_input,
code: e code: e
} }
withdrawDo(params).then(res => { withdrawDo(params).then(res => {
uni.showToast({ uni.showToast({
title: '申请提现成功,耐心等待打款', title: '申请提现成功,耐心等待打款',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
this.reset() this.reset()
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
}) })
}, },
reset() { reset() {
this.name = '' this.name = ''
this.card = '' this.card = ''
this.page = 1 this.page = 1
this.has_more = true this.has_more = true
this.withdraw_input = '' this.withdraw_input = ''
this.total = 0 this.total = 0
this.withdrawLists = [] this.withdrawLists = []
this.withdrawLogs(); this.withdrawLogs();
this.withdraw(); this.withdraw();
} },
} // 添加银行卡
} addCard() {
uni.navigateTo({
url:'/pages/wallet/addCard'
})
},
// 选择银行卡
selectCard(){
uni.navigateTo({
url:'/pages/wallet/selectCard'
})
},
// 提现记录
withdrawDetail(){
uni.navigateTo({
url:'/pages/wallet/withdrawList'
})
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
page{ page {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background-color: #fff; background-color: #f7f7f7;
} }
.hasmore { .receiptCode {
color: #808080; color: #808080;
font-size: $title-size-m; text-align: left;
text-align: center; // margin: $margin 0;
padding: $padding*2; font-size: $title-size-m;
} }
.WithdrawingCoin {
background-color: #f7f7f7;
width: 100%;
min-height: 100vh;
padding-bottom: 100rpx;
.nomore { // 账户
display: flex; .propery {
flex-direction: column; position: relative;
align-items: center; padding-top: var(--status-bar-height);
justify-content: center; background-image: linear-gradient(to right, #7c52fc, #976dff);
box-sizing: border-box; position: relative;
font-size: $title-size-m; overflow: hidden;
color: #808080;
margin-top: $margin*4;
image { .record-bg {
width: 320rpx; position: absolute;
margin-bottom: $margin*2; width: 120%;
} height: 300rpx;
} bottom: -50rpx;
right: -20rpx;
z-index: 1;
opacity: .5;
transform: rotate(-7deg);
}
.propery-content {
position: relative;
z-index: 1;
padding: $padding *3 $padding *1.4;
text-align: center;
.receiptCode { .currency {
color: #808080; font-size: $title-size-m;
text-align: left; color: rgba($color: white, $alpha: .8);
// margin: $margin 0; }
font-size: $title-size-m;
}
.WithdrawingCoin { .balance {
background-color: #fff; font-size: $title-size * 2.5;
width: 100%; padding: $padding 0;
min-height: 100vh; color: white;
padding-bottom: 100rpx; }
}
.all { .frozen {
color: $text-price; background: rgba($color: #000000, $alpha: .1);
width: 160rpx; color: rgba($color: white, $alpha: .7);
text-align: center; display: inline-block;
} font-size: 24rpx;
padding: 6rpx $padding;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
}
}
.withdrawing-content { }
min-height: 300rpx; .all {
background-color: #fff; color: $text-price;
box-shadow: 0 0 30rpx 1rpx rgba($color: #000000, $alpha: 0.2); width: 160rpx;
margin: $margin*1.4; text-align: center;
border-radius: 20rpx; }
padding: $padding*1.4 ; .item-name {
font-size: $title-size-m; text-align: center;
color: #303030;
font-weight: bold;
margin-bottom: $margin;
font-size: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
background-image: linear-gradient(to right, #aaaaff, #aaaaff);
color: #fff;
margin: 30rpx;
padding: 30rpx;
.item-name { .right {
text-align: center; flex: 1;
padding: $padding * .6; display: flex;
color: #303030; flex-direction: row;
font-weight: bold; align-items: center;
margin-bottom: $margin; justify-content: space-between;
font-size: $title-size *1.2; font-size: 34rpx;
}
.item { .cardName {
border-bottom: solid 1rpx #f8f8f8; flex: 1;
display: flex; }
flex-direction: row; }
align-items: center; }
justify-content: flex-start; .withdrawing-content {
box-sizing: border-box; background-color: #fff;
padding: $padding 0; padding: $padding $padding $padding $padding * 2;
font-size: $title-size-m;
span:nth-child(1) { /* 绑定银行卡 */
color: #666; .bank-card {
margin-right: 20rpx; display: flex;
} flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 45rpx 0 35rpx;
}
.input_num {
font-size: $title-size*1.5;
color: #3a3a3a;
font-weight: bolder;
flex: 1;
} .item {
} display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding: $padding 0;
.item-total { span:nth-child(1) {
display: flex; color: #666;
flex-direction: row; margin-right: 20rpx;
align-items: center; }
justify-content: space-between;
padding: $padding*1 0 0 0;
color: #3a3a3a;
.total { .input_num {
display: flex; font-size: $title-size*1.5;
flex-direction: column; color: #3a3a3a;
align-items: flex-start; font-weight: bolder;
justify-content: center; flex: 1;
box-sizing: border-box;
.money { }
padding-top: $padding *0.5; }
}
}
.lists { .item-total {
color: $text-price; display: flex;
} flex-direction: row;
} align-items: center;
justify-content: space-between;
padding: $padding*1 0 0 0;
color: #3a3a3a;
} .total {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
.btn { .money {
background-image: linear-gradient(to right, #7c52fc, #976dff); padding-top: $padding *0.5;
color: #fff; }
border-radius: 10rpx; }
text-align: center;
padding: $padding * .9 ;
margin: $margin * 2;
font-size: $title-size;
font-weight: bold;
}
.ew_lists { .lists {
padding: $padding *2; color: $text-price;
border-top: solid 4rpx #f8f8f8; }
}
.item { }
display: flex; .btn {
flex-direction: row; background-image: linear-gradient(to right, #7c52fc, #976dff);
align-items: center; color: #fff;
justify-content: space-between; border-radius: 10rpx;
box-sizing: border-box; text-align: center;
border-bottom: solid 1rpx #f8f8f8; padding: $padding * .9;
background-color: #fff; margin: $margin * 3 $margin *2 $margin $margin*2;
padding: 0 0 $padding*0.8 0; font-size: $title-size;
font-weight: bold;
.left, }
.right { .des{
display: flex; text-align: center;
flex-direction: column; color: #cacaca;
align-items: flex-start; font-size: 26rpx;
justify-content: center; }
box-sizing: border-box;
}
.left {
font-size: $title-size-m;
font-weight: bold;
color: #808080;
span:nth-child(2) {
color: $text-price;
font-size: $title-size-m;
font-weight: normal;
padding-top: $padding *0.5;
}
}
.right {
font-size: $title-size-m;
align-items: flex-end;
color: #666;
span:nth-child(1) {
padding-bottom: $padding*0.5;
}
}
}
}
</style> </style>

View File

@@ -188,6 +188,52 @@
background-color: #fff; background-color: #fff;
} }
.record-list {
padding: 20rpx 30rpx;
.record-list-item {
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.record-icon{
width: 60rpx;
margin-right: 20rpx;
}
.record-list-item-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 600rpx;
.title {
font-size: 28rpx;
width: 600rpx;
color: #444;
}
.money {
color: #ee4c47;
font-size: 40rpx;
font-weight: bold;
// padding-top: 20rpx;
position: relative;
top: 20rpx;
}
}
.record-list-item-date {
font-size: 26rpx;
color: #a6a6a6;
margin-top: 10rpx;
}
}
}
.record-top { .record-top {
width: calc(100% - 60rpx); width: calc(100% - 60rpx);
height: 360rpx; height: 360rpx;
@@ -292,47 +338,6 @@
} }
} }
.record-list {
padding: 20rpx 30rpx;
.record-list-item {
padding: 20rpx 0;
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
.record-icon{
width: 60rpx;
margin-right: 20rpx;
}
.record-list-item-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 600rpx;
.title {
font-size: 28rpx;
width: 600rpx;
color: #444;
}
.money {
color: #ee4c47;
font-size: 32rpx;
font-weight: bold;
}
}
.record-list-item-date {
font-size: 26rpx;
color: #a6a6a6;
margin-top: 10rpx;
}
}
}
</style> </style>

View File

@@ -3,9 +3,11 @@
<view class="propery"> <view class="propery">
<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">能量球 ( {{ price || '0' }} CNY)</view> <view class="currency">能量球钱包
<view class="balance">{{ balance.balance || '0' }}</view> <!-- <span>( {{ price || '0.00' }} CNY)</span> -->
<view class="frozen">{{ balance.frozen || '0' }} 冻结中</view> </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">
<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> -->
@@ -29,7 +31,7 @@
<view class="validationPassword"> <view class="validationPassword">
<view class="from"> <view class="from">
<view class="title">验证密码</view> <view class="title">验证密码</view>
<input class="input" v-model="password" password placeholder="请验证安全密码"/> <input class="input" v-model="password" password placeholder="请验证安全密码" />
</view> </view>
<view class="buttons"> <view class="buttons">
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view> <view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
@@ -67,45 +69,76 @@
}; };
}, },
onShow() { onShow() {
Promise.all([ this.getsum()
sum(), this.getlog()
price(), this.getprice()
logs()
]).then(res => {
this.balance = res[0]
this.price = res[1]
this.logs = res[2]
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
}, },
methods: { methods: {
getsum() {
sum().then(res => {
this.balance = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
getprice() {
price().then(res => {
console.log(res,'87..........')
this.price = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
getlog() {
logs().then(res => {
console.log(res,'98 ...........')
this.logs = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
// 弹出私钥 // 弹出私钥
showPrivatekey(pages){ showPrivatekey(pages) {
this.passwordPages = pages this.passwordPages = pages
this.$refs.showPassword.open('center') this.$refs.showPassword.open('center')
}, },
// 验证私钥 // 验证私钥
payPassword(type){ payPassword(type) {
if(type === 'confirm'){ if (type === 'confirm') {
if(this.password === '') { if (this.password === '') {
uni.showToast({ uni.showToast({
title: '请输入安全密码', title: '请输入安全密码',
icon : 'none' icon: 'none'
}) })
return return
} }
securityCheck(this.password).then(res => { securityCheck(this.password).then(res => {
this.$refs.showPassword.close() this.$refs.showPassword.close()
switch (this.passwordPages){ switch (this.passwordPages) {
case 'privatekey': case 'privatekey':
this.$Router.push({name:'Privatekey', params: {password: this.password}}) this.$Router.push({
name: 'Privatekey',
params: {
password: this.password
}
})
break; break;
case 'resetPassword': case 'resetPassword':
this.$Router.push({name:'ResetPassword', params: {password: this.password}}) this.$Router.push({
name: 'ResetPassword',
params: {
password: this.password
}
})
break; break;
} }
this.password = '' this.password = ''
@@ -135,10 +168,11 @@
uni.showModal({ uni.showModal({
title: '我的区块链地址', title: '我的区块链地址',
content: '\n地址可以理解为银行卡卡号与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address, content: '\n地址可以理解为银行卡卡号与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
cancelText: '复制', confirmText: '复制',
cancelColor: '#b11eff', confirmColor: '#b11eff',
showCancel:false,
success: (res) => { success: (res) => {
if (res.cancel) { if (res.confirm) {
uni.setClipboardData({ uni.setClipboardData({
data: this.balance.address data: this.balance.address
}) })
@@ -173,26 +207,30 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.propertyIndex{ .propertyIndex {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background-color: #FFFFFF; background-color: #FFFFFF;
} }
// 验证密码弹出层 // 验证密码弹出层
.validationPassword{ .validationPassword {
background-color: white; background-color: white;
border-radius: $radius-m; border-radius: $radius-m;
width: 70vw; width: 70vw;
.from{
.from {
padding: $padding*2; padding: $padding*2;
.title{
.title {
text-align: center; text-align: center;
font-size: $title-size; font-size: $title-size;
padding-bottom: $padding*2; padding-bottom: $padding*2;
font-weight: bold; font-weight: bold;
color: $text-price; color: $text-price;
} }
.input{
.input {
text-align: center; text-align: center;
height: 90rpx; height: 90rpx;
font-size: $title-size; font-size: $title-size;
@@ -201,25 +239,30 @@
padding: 0 ($padding*2); padding: 0 ($padding*2);
} }
} }
.buttons{
.buttons {
display: flex; display: flex;
border-top: solid 1rpx $border-color; border-top: solid 1rpx $border-color;
.button{
.button {
width: 50%; width: 50%;
font-size: $title-size; font-size: $title-size;
line-height: 90rpx; line-height: 90rpx;
height: 90rpx; height: 90rpx;
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;
&.cancel{
&.cancel {
border-right: solid 1rpx $border-color; border-right: solid 1rpx $border-color;
color: $text-gray; color: $text-gray;
} }
&.confirm{
&.confirm {
color: $text-price; color: $text-price;
} }
} }
} }
// .button{ // .button{
// background-color: $text-price; // background-color: $text-price;
// color: white; // color: white;
@@ -238,6 +281,7 @@
// background-color: transparent; // background-color: transparent;
// } // }
} }
// 账户 // 账户
.propery { .propery {
position: relative; position: relative;
@@ -245,16 +289,18 @@
background-image: linear-gradient(to right, #7c52fc, #976dff); background-image: linear-gradient(to right, #7c52fc, #976dff);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
.record-bg { .record-bg {
position: absolute; position: absolute;
width: 120%; width: 100%;
height: 300rpx; height: 300rpx;
bottom: -10rpx; bottom: 0;
right: -20rpx; right: 0;
z-index: 1; z-index: 1;
opacity: .5; opacity: .5;
transform:rotate(-7deg); transform: rotate(0);
} }
// &::before { // &::before {
// position: absolute; // position: absolute;
// left: 0; // left: 0;
@@ -294,7 +340,6 @@
padding: 6rpx $padding; padding: 6rpx $padding;
border-radius: $radius-m; border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4) border: solid 1rpx rgba($color: white, $alpha: .4)
} }
.balance-flex { .balance-flex {

120
pages/wallet/selectCard.vue Normal file
View File

@@ -0,0 +1,120 @@
<template>
<view class="selectCard">
<view class="bankInfo">
<image class="bankLogin" src="/static/imgs/bankLogo.png" mode="widthFix" />
<view class="right">
<view class="left">
<view class="title">浦发银行 <view class="tags">快捷支付</view>
</view>
<view class="des">储值卡</view>
<view class="no">622 8480530 382837819</view>
</view>
<u-icon name="calendar" color="rgba(255,255,255,0.6)" size='60' />
</view>
</view>
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
chaineb
} from '@/apis/interfaces/mine';
export default {
data() {
return {
}
},
methods: {}
}
</script>
<style lang="scss" scoped>
.selectCard {
width: 100%;
min-height: 100vh;
padding-top: 30rpx;
background-color: #fff;
.bankInfo {
width: calc(100% - 60rpx);
background-image: linear-gradient(to right, #7c52fc, #976dff);
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.6);
margin: 0 30rpx;
border-radius: 20rpx;
box-sizing: border-box;
position: relative;
padding:40rpx 30rpx;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
z-index: 1;
.bankLogin {
width: 80rpx;
opacity: .9;
}
.right {
flex: 1;
margin-left: 20rpx;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
color: rgba($color: #fff, $alpha: .9);
.left {
flex: 1;
.title {
font-size: 38rpx;
font-weight: bold;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.tags {
color: $text-price;
font-size: 24rpx;
margin-left: 20rpx;
padding: 4rpx 14rpx;
position: relative;
display: inline-block;
color: #7C52FC;
&::before {
background: rgba($color: #fff, $alpha: .8);
z-index: -1;
position: absolute;
content: '';
top: 0;
left: 0;
right: 0;
bottom: 0;
transform: skewX(-10deg);
}
}
}
.des {
font-size: 28rpx;
margin-top: 14rpx;
}
.no {
font-size: 36rpx;
font-weight: bold;
margin-top: 20rpx;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,398 @@
<template>
<view class="Record">
<view class="record-top">
<image src="/static/imgs/account-bg.png" mode="widthFix" class="record-bg" />
<view class="record-top-nav">
<view :class="['record-top-item',type==='year'?'selectTopItem':'']" @click="selectType('year')">年账单
</view>
<view :class="['record-top-item',type==='month'?'selectTopItem':'']" @click="selectType('month')">月账单
</view>
<view :class="['record-top-item',type==='day'?'selectTopItem':'']" @click="selectType('day')">日账单</view>
</view>
<view class="record-mouth-year">
<view class="record-type-right">
<view class="record-title">当前能量球</view>
<view class="record-money">{{account || '0.00'}} </view>
</view>
<view class="record-type-left">
<u-picker mode="time" v-model="show" :params="params" @confirm='confirm' title='筛选日期'
start-year='2021' :end-year='currentYear' />
<view @click="show = true">
{{date?date:'选择日期'}}
<uni-icons type="arrowdown" color="#fff" size="12" />
</view>
</view>
</view>
<!-- <view class="record-title">碎片个数</view>
<view class="record-money"><span></span>{{account || '0.00'}}</view> -->
</view>
<!-- 列表 -->
<view class="ew_lists" v-if="lists.length>0">
<view style="padding-top: 30rpx;" v-for="(item,index) in lists " :key="index">
<!-- <view class="receiptCode">回执单号hash392J3K,390-9DKDKDIOKLK</view> -->
<view class="item">
<view class="left">
<span>能量球:150</span>
<span>金额300</span>
</view>
<view class="right">
<span> {{item.created_at}} 提现</span>
<span> {{item.paid_at || index === 0 ? '2021-11-11 11:11:11到账':'努力打款中'}}</span>
</view>
</view>
</view>
</view>
<!-- 无列表 -->
<no-list v-if="lists.length === 0" name='no-record' txt="没有任何提现记录 ~ " />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
chaineb
} from '@/apis/interfaces/mine';
export default {
data() {
return {
lists: [1, 1.1, 1, 1],
has_next_page: true,
page: 1,
type: 'year', // 统计类型day日month月year年
cointype: 'in', // in 收入 out 支出
date: new Date().toISOString().slice(0, 4), // 日Y-m-d月Y-m年Y
params: {
year: true,
month: false,
day: false
},
show: false, // 显示
currentDay: new Date().toISOString().slice(0, 10),
currentMonth: new Date().toISOString().slice(0, 7),
currentYear: new Date().toISOString().slice(0, 4),
account: ''
}
},
onLoad() {
this.getList()
},
onReachBottom() {
if (this.has_next_page) {
this.page = this.page + 1
this.getList()
} else {
this.$refs.uToast.show({
title: '吼吼吼~我是有底的~',
type: 'primary',
duration: 3000
})
}
},
methods: {
// 获取列表
getList() {
let data = {
page: this.page,
type: this.type,
date: this.date,
cointype: this.cointype
}
chaineb(data).then(res => {
this.account = res.account
this.lists = this.lists.concat(res.lists)
this.has_next_page = res.has_next_page
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
selectCoinType(type) {
if (this.cointype !== type) {
this.cointype = type
this.reset()
}
},
// 重置
reset() {
this.page = 1
this.lists = []
this.has_next_page = true
this.getList()
},
// 选择 年 月 日 切换要重置数据
selectType(type) {
if (this.type !== type) {
switch (type) {
case 'year':
this.type = type
this.params = {
year: true,
month: false,
day: false
}
this.date = this.currentYear
this.reset()
break;
case 'month':
this.type = type
this.params = {
year: true,
month: true,
day: false
}
this.date = this.currentMonth
this.reset()
break;
case 'day':
this.type = type
this.params = {
year: true,
month: false,
day: false
}
this.date = this.currentDay
this.reset()
break;
}
}
},
// 点击确认按钮
confirm(e) {
let type = this.type
switch (type) {
case 'year':
this.date = e.year
this.reset()
break;
case 'month':
this.date = e.year + '-' + e.month
this.reset()
break;
case 'day':
this.date = e.year + '-' + e.month + '-' + e.day
this.reset()
break;
}
}
}
}
</script>
<style lang="scss" scoped>
.Record {
width: 100%;
min-height: 100vh;
padding-top: 30rpx;
background-color: #fff;
}
.record-list {
padding: 20rpx 30rpx;
.record-list-item {
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.record-icon {
width: 60rpx;
margin-right: 20rpx;
}
.record-list-item-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 600rpx;
.title {
font-size: 28rpx;
width: 600rpx;
color: #444;
}
.money {
color: #ee4c47;
font-size: 40rpx;
font-weight: bold;
// padding-top: 20rpx;
position: relative;
top: 20rpx;
}
}
.record-list-item-date {
font-size: 26rpx;
color: #a6a6a6;
margin-top: 10rpx;
}
}
}
.record-top {
width: calc(100% - 60rpx);
height: 360rpx;
background-image: linear-gradient(to right, #7c52fc, #976dff);
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.4);
margin: 0 30rpx;
border-radius: 20rpx;
box-sizing: border-box;
position: relative;
padding: 10rpx 50rpx 20rpx 50rpx;
z-index: 1;
.record-bg {
position: absolute;
width: 100%;
bottom: 0;
right: 0;
z-index: 1;
opacity: .5;
}
.record-top-nav {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
.record-top-item {
margin: 40rpx 20rpx;
font-size: 30rpx;
font-weight: 500;
color: #fff;
}
.selectTopItem {
border-bottom: solid 4rpx #fff;
}
}
.record-mouth-year {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
position: relative;
z-index: 2;
color: #fff;
font-size: 30rpx;
margin-top: 20rpx;
.record-type-left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
uni-icons {
margin-left: 4rpx;
}
}
.record-type-right {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
font-size: 24rpx;
flex: 1;
.pay_type_item {
margin: 0 10rpx;
padding: 2rpx 20rpx;
border-radius: 30rpx;
border: solid 1rpx rgba($color: #000000, $alpha: 0);
}
.pay_type_item_select {
border: solid 1rpx #f7f7f7;
}
}
}
.record-title {
font-size: 28rpx;
color: #fff;
padding: 0 0 20rpx 0;
}
.record-money {
color: #fff;
font-size: 60rpx;
font-weight: bold;
span {
font-size: 24rpx;
font-weight: 400;
padding-left: 20rpx;
margin-right: 4rpx;
}
}
}
.ew_lists {
padding: $padding;
border-top: solid 4rpx #f8f8f8;
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: solid 1rpx #f8f8f8;
background-color: #fff;
padding: 0 0 $padding*0.8 0;
.left,
.right {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
}
.left {
font-size: $title-size-m;
// font-weight: 600;
padding-top: 10rpx;
color: #808080;
span:nth-child(2) {
color: #824F9A;
font-size: $title-size-m;
font-weight: normal;
padding-top: $padding *0.5;
}
}
.right {
font-size: $title-size-m;
align-items: flex-end;
color: #666;
span:nth-child(1) {
padding-bottom: $padding*0.5;
}
}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 64 KiB

BIN
static/imgs/bankLogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
static/user/sign_arrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
static/user/sign_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
static/user/sign_img_54.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/user/sign_tips.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB