merge
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
</view>
|
||||
<view class="sign">
|
||||
<view class="sign-list" :class="{ active: item.sign }" v-for="(item, index) in sign.signArr" :key="index">
|
||||
<view class="sign-tips" v-if="item.sign">
|
||||
<view class="sign-tips-text">已签</view>
|
||||
</view>
|
||||
<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>
|
||||
@@ -152,12 +155,11 @@
|
||||
|
||||
// 能量跳转
|
||||
JumpUrl(open, title) {
|
||||
console.log(open)
|
||||
var type = open.openType;
|
||||
switch(type){
|
||||
case 'switchTab':
|
||||
uni.switchTab({
|
||||
url: open.url
|
||||
url: open.path
|
||||
})
|
||||
break;
|
||||
case 'web':
|
||||
@@ -167,7 +169,7 @@
|
||||
break;
|
||||
case 'navigateTo':
|
||||
uni.navigateTo({
|
||||
url: open.url
|
||||
url: open.path
|
||||
})
|
||||
break;
|
||||
}
|
||||
@@ -258,9 +260,9 @@
|
||||
margin: 0 0 30rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
.sign-list {
|
||||
width: calc(14.28% - 20rpx);
|
||||
position: relative;
|
||||
margin: 0 10rpx;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
@@ -268,6 +270,33 @@
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx 0;
|
||||
box-sizing: border-box;
|
||||
.sign-tips {
|
||||
position: absolute;
|
||||
top: -20rpx;
|
||||
left: calc(50% - 30rpx);
|
||||
background-color: #ef4034;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
height: 32rpx;
|
||||
line-height: 30rpx;
|
||||
width: 60rpx;
|
||||
text-align: center;
|
||||
border-radius: 6rpx;
|
||||
.sign-tips-text {
|
||||
transform: scale(0.85);
|
||||
}
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: calc(50% - 8rpx);
|
||||
bottom: -6rpx;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 8rpx solid transparent;
|
||||
border-right: 8rpx solid transparent;
|
||||
border-top: 8rpx solid #ef4034;
|
||||
}
|
||||
}
|
||||
.sign-list-img {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
|
||||
@@ -280,7 +280,29 @@
|
||||
chart.render();
|
||||
return chart;
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 能量跳转
|
||||
JumpUrl(open, title) {
|
||||
var type = open.openType;
|
||||
switch(type){
|
||||
case 'switchTab':
|
||||
uni.switchTab({
|
||||
url: open.path
|
||||
})
|
||||
break;
|
||||
case 'web':
|
||||
uni.navigateTo({
|
||||
url: open.url
|
||||
})
|
||||
break;
|
||||
case 'navigateTo':
|
||||
uni.navigateTo({
|
||||
url: open.path
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="codeContent">
|
||||
<!-- <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>
|
||||
<view class="textContent">
|
||||
<view class="company">
|
||||
<image class="company-logo" :src="companyInfo.cover" mode="aspectFill"></image>
|
||||
<view class="company-cont">
|
||||
<view class="nowrap company-name">{{companyInfo.name}}</view>
|
||||
<view class="company-tips">易货平台</view>
|
||||
<view class="codeTop">
|
||||
<image class="codeTop-cover" :src="companyInfo.cover" mode="aspectFill"></image>
|
||||
<view class="codeTop-title">
|
||||
<view class="codeTop-name">
|
||||
{{companyInfo.name}}
|
||||
</view>
|
||||
<view class="codeTop-tips">
|
||||
邀请你 加入链商星球
|
||||
</view>
|
||||
</view>
|
||||
<view class="code">
|
||||
<image class="code-img" :src="companyInfo.code" mode="aspectFit"></image>
|
||||
<!-- <view class="code-text">简单扫一扫,即可进入平台</view> -->
|
||||
</view>
|
||||
<!-- @click="shareCanvas" -->
|
||||
<view class="codeBnt">
|
||||
扫码推广
|
||||
</view>
|
||||
<view class="codeCode">
|
||||
<!-- <image class="codeImg-code" :src="companyInfo.code" mode="aspectFill"></image> -->
|
||||
<!-- 先默认死数据 -->
|
||||
<image class="codeImg-code" src="/static/user/wallet-code.png" mode="aspectFill"></image>
|
||||
<view class="codeImg-text">
|
||||
长按二维码,进行保存
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<canvas class="codeImg" canvas-id="qrcodeCard"></canvas>
|
||||
<!-- <canvas class="codeImg" canvas-id="qrcodeCard"></canvas> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -37,6 +35,7 @@
|
||||
},
|
||||
created() {
|
||||
companiesCode().then(res=>{
|
||||
console.log(res.code)
|
||||
this.companyInfo = res
|
||||
})
|
||||
},
|
||||
@@ -153,75 +152,62 @@
|
||||
|
||||
.codeContent {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
.codeContent-back {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
.codeTop {
|
||||
position: absolute;
|
||||
}
|
||||
.codeContent-cont {
|
||||
left: 5%;
|
||||
top: 240rpx;
|
||||
width: 90%;
|
||||
top: 100px;
|
||||
z-index: 2;
|
||||
position: absolute;
|
||||
}
|
||||
.codeContent-tips {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 20rpx;
|
||||
width: 200rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.textContent {
|
||||
position: absolute;
|
||||
padding: 20rpx 20rpx 0 40rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 30rpx;
|
||||
padding: 0 50rpx;
|
||||
box-sizing: border-box;
|
||||
width: 70%;
|
||||
z-index: 3;
|
||||
left: 15%;
|
||||
right: 15%;
|
||||
top: 140px;
|
||||
}
|
||||
.company {
|
||||
width: 100%;
|
||||
.company-logo {
|
||||
box-shadow: 0 0 40rpx rgba(94,59,201,.5);
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
height: 200rpx;
|
||||
.codeTop-cover {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
margin: 40rpx 30rpx 0 0;
|
||||
border: 4rpx solid #FFFFFF;
|
||||
box-shadow: 0 5rpx 10rpx rgba(94,59,201,.3);
|
||||
}
|
||||
.company-cont {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 230rpx;
|
||||
left: 0;
|
||||
top: 0;
|
||||
padding: 20rpx 20rpx 30rpx 210rpx;
|
||||
font-size: $title-size;
|
||||
.company-name {
|
||||
.codeTop-title {
|
||||
padding-top: 50rpx;
|
||||
.codeTop-name {
|
||||
font-weight: 600;
|
||||
margin: 10rpx 0;
|
||||
font-size: 36rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.company-tips {
|
||||
font-size: 26rpx;
|
||||
color: #787878;
|
||||
.codeTop-tips {
|
||||
color: $text-gray-m;
|
||||
}
|
||||
}
|
||||
}
|
||||
.code {
|
||||
.codeCode {
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 0 40rpx rgba(27, 0, 111,.4);
|
||||
position: absolute;
|
||||
padding: 400rpx 0 200rpx;
|
||||
left: 10%;
|
||||
top: 160rpx;
|
||||
width: 80%;
|
||||
border-radius: 30rpx;
|
||||
z-index: 1;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: $margin;
|
||||
.code-img {
|
||||
width: 90%;
|
||||
.codeImg-code {
|
||||
width: 360rpx;
|
||||
height: 360rpx;
|
||||
margin: 0 0 20rpx;
|
||||
border: 2px solid #f3f3f3;
|
||||
}
|
||||
.code-text {
|
||||
color: #787878;
|
||||
margin-top: $margin - 10;
|
||||
font-size: $title-size;
|
||||
.codeImg-text {
|
||||
font-size: 32rpx;
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
263
pages/login/guide.vue
Normal file
263
pages/login/guide.vue
Normal file
@@ -0,0 +1,263 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- <view class="title">易品新境</view> -->
|
||||
<view class="login-top">
|
||||
<view class="top-logo-content">
|
||||
<image class="top-logo" fit="contain" src="/static/imgs/top_logo.png" />
|
||||
链商星球(中国)
|
||||
</view>
|
||||
<image class="top-bg" fit="contain" src="/static/imgs/top_bg.png" />
|
||||
</view>
|
||||
<!-- 输入手机号相关 -->
|
||||
<view class="inputs phone">
|
||||
<label class="label">+86</label>
|
||||
<input type="number" placeholder="输入您的手机号码" v-model="phone" />
|
||||
</view>
|
||||
<view class="inputs sms">
|
||||
<input type="number" placeholder="输入短信验证码" v-model="code" />
|
||||
<button class="sms-btn" type="default" size="mini" :disabled="phone == '' || getSms"
|
||||
@click="getPhoneCode">{{getSms ? '重新发送' + smsTime + 's': '发送验证码'}}</button>
|
||||
</view>
|
||||
<button class="btn" type="default" :disabled="phone == '' || code == ''" @click="login">登录</button>
|
||||
<!-- 快捷登录 -->
|
||||
<view class="quick">
|
||||
<view class="quick-title">快捷登录</view>
|
||||
<view class="quick-box">
|
||||
<image class="quick-icon" src="@/static/icons/wechat.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 用户登录注册协议 -->
|
||||
<view class="agreement">未注册的手机号验证后将自动创建账号,登录即表示同意接收<navigator url="">用户隐私规格</navigator>和<navigator url="">用户服务协议
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getSms,
|
||||
smsAuth
|
||||
} from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone: "18245180131",
|
||||
code: "",
|
||||
smsTime: 60,
|
||||
getSms: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 用户登录
|
||||
login() {
|
||||
smsAuth({
|
||||
mobileNo: this.phone,
|
||||
code: this.code
|
||||
}).then(res => {
|
||||
this.$store.commit('setToken', res.token_type + ' ' + res.access_token)
|
||||
this.$Router.back()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取验证码
|
||||
getPhoneCode() {
|
||||
let outTime
|
||||
getSms({
|
||||
mobileNo: this.phone
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none"
|
||||
})
|
||||
this.getSms = true
|
||||
outTime = setInterval(() => {
|
||||
if (this.smsTime <= 1) {
|
||||
this.getSms = false
|
||||
this.smsTime = 60
|
||||
clearInterval('outTime')
|
||||
}
|
||||
this.smsTime -= 1
|
||||
}, 1000)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
padding: $padding * 3;
|
||||
box-sizing: border-box;
|
||||
background: white;
|
||||
|
||||
.login-top {
|
||||
height: 36vh;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
padding-bottom: 160rpx;
|
||||
|
||||
.top-bg {
|
||||
position: absolute;
|
||||
bottom: 30rpx;
|
||||
// left: 2rpx;
|
||||
z-index: 2;
|
||||
width: 740rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
.top-logo-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
color: #7f56a4;
|
||||
font-size: 18px;
|
||||
|
||||
.top-logo {
|
||||
margin-bottom: 20rpx;
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.inputs {
|
||||
background:rgba($color: $mian-color, $alpha: 0.05);
|
||||
border: solid 1rpx $border-color;
|
||||
position: relative;
|
||||
margin-top: $margin;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding: 0 $padding;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size-lg;
|
||||
}
|
||||
|
||||
&.phone {
|
||||
padding-left: 120rpx;
|
||||
|
||||
.label {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
border-right: solid 1rpx $border-color;
|
||||
font-size: $title-size-lg;
|
||||
}
|
||||
}
|
||||
|
||||
&.sms {
|
||||
padding-right: 200rpx;
|
||||
|
||||
.sms-btn[size='mini'] {
|
||||
width: 200rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
border-left: solid 1rpx $border-color;
|
||||
color: $text-price;
|
||||
font-size: $title-size-lg;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
color: rgba($color: $text-price, $alpha: .6);
|
||||
background: $border-color-lg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: $title-size + 6;
|
||||
font-weight: bold;
|
||||
color: $text-color;
|
||||
margin-bottom: 100rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: $mian-color;
|
||||
color: white;
|
||||
border-radius: 0;
|
||||
margin-top: $margin;
|
||||
font-size: $title-size;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
font-weight: bold;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
background: rgba($color: $mian-color, $alpha: .6);
|
||||
}
|
||||
}
|
||||
|
||||
.quick {
|
||||
padding-top: $padding * 3;
|
||||
text-align: center;
|
||||
|
||||
.quick-title {
|
||||
text-align: center;
|
||||
color: $text-gray;
|
||||
font-size: $title-size-sm;
|
||||
padding-bottom: $padding;
|
||||
}
|
||||
|
||||
.quick-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.quick-icon {
|
||||
width: 78rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.agreement {
|
||||
padding-top: $padding * 2;
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
|
||||
navigator {
|
||||
color: $text-price;
|
||||
display: inline-block;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -249,7 +249,7 @@
|
||||
}
|
||||
|
||||
.agreement {
|
||||
padding-top: $padding * 4;
|
||||
padding-top: $padding * 2;
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="item" v-for="(item,index) in items" :key="index" v-if="items.length>0"
|
||||
@click="item.read_at === ''?read(index,item):noread(item)">
|
||||
<view class="top">
|
||||
<image src="/static/images/news_2_1.png" mode="widthFix"></image>
|
||||
<image src="/static/imgs/news_2_1.png" mode="widthFix" />
|
||||
<!-- <image v-if="index===1" src="/static/img/news_1_1.png" mode="widthFix"></image>
|
||||
<image v-if="index===2" src="/static/img/news_3_1.png" mode="widthFix"></image> -->
|
||||
<view :style="item.read_at=== '' ?'flex:1;':'flex:1;color:#808080;'">{{item.title}}</view>
|
||||
|
||||
20
pages/user/followOfficial.vue
Normal file
20
pages/user/followOfficial.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<view>
|
||||
<image class="followBack" src="/static/user/follow_back.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.followBack {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -71,6 +71,9 @@
|
||||
<view class="userVip-top-btn" v-if="!userIdentity.is_top" @click="$Router.push({name: 'vipIndex'})">
|
||||
去开通<image class="userVip-top-arrow" src="/static/user/userVip_arrow.png"></image>
|
||||
</view>
|
||||
<view class="userVip-top-btn" v-else>
|
||||
终身有效
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 未认证后显示 -->
|
||||
@@ -89,7 +92,7 @@
|
||||
<view class="userVip-rights">
|
||||
<view class="userVip-rightst-title">
|
||||
<view class="userVip-rightst-title-name">查看会员专属权益</view>
|
||||
<view class="userVip-rightst-more">全部权益 <image class="userVip-rightst-more-img" src="/static/user/userVip_more_arrow.png"></image></view>
|
||||
<view class="userVip-rightst-more" @click="$Router.push({name: 'vipIndex'})">全部更多 <image class="userVip-rightst-more-img" src="/static/user/userVip_more_arrow.png"></image></view>
|
||||
</view>
|
||||
<view class="userVip-rightst-list" v-if="userIdentity.right">
|
||||
<view v-for="(item, index) in userIdentity.right.rights" :key="index" class="userVip-rightst-label">
|
||||
@@ -170,7 +173,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 企业工具 -->
|
||||
<view class="userPartner">
|
||||
<view class="userPartner" v-if="userData.is_company">
|
||||
<view class="partner-title">
|
||||
企业工具
|
||||
</view>
|
||||
@@ -291,6 +294,7 @@
|
||||
userInfo() {
|
||||
// 读取配置信息
|
||||
userIndex().then(res=>{
|
||||
console.log(res.identityShow)
|
||||
this.userData = res
|
||||
this.helpDoc = res.help_doc
|
||||
this.userIdentity = res.identityShow
|
||||
|
||||
@@ -135,7 +135,8 @@
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.partner-identity {
|
||||
width: 120rpx;
|
||||
width: 84rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,28 +12,23 @@
|
||||
{{item.count.stock > 0 ? '剩余名额:' + item.count.residue : '不限名数'}}
|
||||
</view>
|
||||
<view class="vip-tips">
|
||||
<!-- 轻节点 -->
|
||||
<view v-if="item.identity_id == 2" class="vip-tips-text vip-tips-color-00">
|
||||
{{item.title}}
|
||||
</view>
|
||||
|
||||
<!-- 会员 -->
|
||||
<view v-else-if="item.identity_id == 3" class="vip-tips-text vip-tips-color-01">
|
||||
<view v-if="item.identity_id == 2" class="vip-tips-text vip-tips-color-01">
|
||||
{{item.title}}
|
||||
</view>
|
||||
|
||||
<!-- VIP节点 -->
|
||||
<view v-else-if="item.identity_id == 4" class="vip-tips-text vip-tips-color-02">
|
||||
<view v-else-if="item.identity_id == 3" class="vip-tips-text vip-tips-color-02">
|
||||
{{item.title}}
|
||||
</view>
|
||||
|
||||
<!-- 主节点 -->
|
||||
<view v-else-if="item.identity_id == 5" class="vip-tips-text vip-tips-color-03">
|
||||
<view v-else-if="item.identity_id == 4" class="vip-tips-text vip-tips-color-03">
|
||||
{{item.title}}
|
||||
</view>
|
||||
|
||||
<!-- 超级节点 -->
|
||||
<view v-else-if="item.identity_id == 6" class="vip-tips-text vip-tips-color-04">
|
||||
<view v-else-if="item.identity_id == 5" class="vip-tips-text vip-tips-color-04">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -132,7 +127,6 @@
|
||||
methods: {
|
||||
// 当前用户信息
|
||||
idenInfo(){
|
||||
identities().then(res => {
|
||||
identities().then(res => {
|
||||
this.loding = false
|
||||
this.identitie = res.identities
|
||||
@@ -147,6 +141,7 @@
|
||||
},
|
||||
|
||||
// 切换开通身份
|
||||
swiperChange(e) {
|
||||
console.log(e.detail.current)
|
||||
this.tabsIndex = e.detail.current
|
||||
// 获取当前用户信息
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
<template>
|
||||
<view class="content webkit-box">
|
||||
<!-- logo -->
|
||||
<image class="logo" src="@/static/img/oc-logo.png" mode="widthFix"></image>
|
||||
<!-- 副标题 -->
|
||||
<view class="sub-title">激活您的OC Chain区块链钱包地址。</br>地址可以理解为您的个人银行卡卡号,与他人转账时是区块链上两个地址的交易行为</view>
|
||||
<!-- 按钮 -->
|
||||
<navigator class="wallet-btn" url="./mnemonic" open-type="redirect">激活钱包</navigator>
|
||||
<!-- <navigator class="wallet-btn hollow" url="./guide">导入钱包</navigator> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
padding: 0 15vw;
|
||||
text-align: center;
|
||||
.logo{
|
||||
width: 138rpx;
|
||||
vertical-align: top;
|
||||
margin-bottom: 30vh;
|
||||
}
|
||||
.sub-title{
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
}
|
||||
.wallet-btn{
|
||||
width: 100%;
|
||||
background-color: $mian-color;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
margin-top: $margin * 2;
|
||||
border-radius: $radius-lg;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
&.hollow{
|
||||
background-color: white;
|
||||
color: $mian-color;
|
||||
border:solid 2rpx $mian-color;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
334
pages/wallet/addBank.vue
Normal file
334
pages/wallet/addBank.vue
Normal file
@@ -0,0 +1,334 @@
|
||||
<template>
|
||||
<view class="WithdrawingCoin">
|
||||
<view class="withdrawing-content">
|
||||
<view class="item-name">{{bank_account_id===''?'添加':'编辑'}}提现银行</view>
|
||||
<view class="item">
|
||||
<view class="title">收款人姓名</view>
|
||||
<input class="input_num" v-model="name" maxlength="16" placeholder="请输入收款人姓名"
|
||||
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">收款人手机号</view>
|
||||
<input class="input_num" v-model="mobile" maxlength="11" placeholder="请输入手机号"
|
||||
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">开户行</view>
|
||||
<u-select v-model="bankShow" value-name='id' :default-value='[0]' label-name='name'
|
||||
@confirm='selectBank' :list="banks" />
|
||||
<view class="input_num" @click="bankShow = true">
|
||||
{{selectBankObj.label?selectBankObj.label:'请选择开户行'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">收款人账号</view>
|
||||
<input class="input_num" v-model="no" type="number" placeholder="请输入收款人账号"
|
||||
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">支行名称</view>
|
||||
<input class="input_num" v-model="branch_name" maxlength="30" placeholder="省-市-区-支行名称"
|
||||
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" @click="sureAdd">确认{{bank_account_id===''?'添加':'编辑'}}银行</view>
|
||||
<view class="history" @click="$Router.push({name:'withdrawList'})">提现记录
|
||||
<u-icon name="question-circle-fill" />
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
accountsCreate,
|
||||
withdrawsAccounts,
|
||||
accountsCreateEdit,
|
||||
withdrawsAccountsEdits
|
||||
} from '@/apis/interfaces/withdraws'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
no: '', // 银行卡号
|
||||
name: '', // 用户姓名
|
||||
branch_name: '', // 支行名称
|
||||
mobile: '', // 手机号
|
||||
bank_id: '', // 银行卡id
|
||||
banks: [], // 开户行列表
|
||||
bankShow: false, // 显示开户行列表
|
||||
selectBankObj: {}, // 选择银行
|
||||
bank_account_id:''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
// 有id 是编辑
|
||||
if (e.id) {
|
||||
this.bank_account_id = e.id
|
||||
this.getAccountsCreateEdit()
|
||||
} else {
|
||||
this.getAccountsCreate()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取添加银行前置条件
|
||||
getAccountsCreate() {
|
||||
accountsCreate().then(res => {
|
||||
console.log(res)
|
||||
this.banks = res.banks
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 编辑前置
|
||||
getAccountsCreateEdit() {
|
||||
accountsCreateEdit(this.bank_account_id).then(res => {
|
||||
console.log(res)
|
||||
this.banks = res.banks
|
||||
this.no = res.info.no
|
||||
this.name = res.info.name
|
||||
this.mobile = res.info.mobile
|
||||
this.branch_name = res.info.branch_name
|
||||
this.selectBankObj.label = res.info.bank.name
|
||||
this.bank_id = res.info.bank.id
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 选择银行
|
||||
selectBank(e) {
|
||||
console.log(e[0])
|
||||
this.selectBankObj = e[0]
|
||||
this.bank_id = e[0].value
|
||||
},
|
||||
sureAdd() {
|
||||
let data = {
|
||||
no: this.no, // 银行卡号
|
||||
name: this.name, // 用户姓名
|
||||
branch_name: this.branch_name, // 支行名称
|
||||
mobile: this.mobile, // 手机号
|
||||
bank_id: this.bank_id, // 银行卡id
|
||||
}
|
||||
if (data.name === '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '请核对收款人姓名',
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (data.mobile.length !== 11) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请核对收款人手机号',
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (data.bank_id === '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '请勾选开户行',
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (data.no === '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '请核对收款账号',
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (data.branch_name === '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '请核对省-市-区-支行名称',
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (this.bank_account_id) {
|
||||
data.bank_account_id = this.bank_account_id
|
||||
console.log(data)
|
||||
this.withdrawsAccountsEdits(data)
|
||||
} else {
|
||||
this.withdrawsAccounts(data)
|
||||
}
|
||||
},
|
||||
// 添加银行
|
||||
withdrawsAccounts(data) {
|
||||
withdrawsAccounts(data).then(res => {
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
setTimeout(res => {
|
||||
uni.navigateBack({})
|
||||
}, 3000)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 编辑银行卡银行
|
||||
withdrawsAccountsEdits(data) {
|
||||
withdrawsAccountsEdits(data).then(res => {
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
uni.setStorageSync('refresh',true)
|
||||
setTimeout(res => {
|
||||
uni.navigateBack({})
|
||||
}, 3000)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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: 30rpx;
|
||||
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>
|
||||
@@ -1,180 +0,0 @@
|
||||
<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>
|
||||
221
pages/wallet/bankList.vue
Normal file
221
pages/wallet/bankList.vue
Normal file
@@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<view class="selectCard">
|
||||
<view class="bankInfo" v-for="(item,index) in lists" :key='index'
|
||||
@longpress='delBank(item.bank_account_id,index)'>
|
||||
<image class="bankLogin" @click="selectBank(item)" :src="item.bank.cover" mode="widthFix" />
|
||||
<view class="right" @click="selectBank(item)">
|
||||
<view class="left">
|
||||
<view class="title">{{item.bank.name}}
|
||||
<view class="tags">快捷支付</view>
|
||||
</view>
|
||||
<view class="des">储值卡</view>
|
||||
<view class="no">{{item.no}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-icon name="edit-pen-fill" @click='editBank(item.bank_account_id)' color="rgba(255,255,255,0.6)"
|
||||
size='60' />
|
||||
</view>
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
withdrawsAccountsList,
|
||||
withdrawsAccountsDelete
|
||||
} from '@/apis/interfaces/withdraws'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: [],
|
||||
page: 1,
|
||||
has_more: true
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.withdrawsAccountsList()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync('refresh')) {
|
||||
this.lists = []
|
||||
this.page = 1
|
||||
this.has_more = true
|
||||
this.withdrawsAccountsList()
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.has_more) {
|
||||
this.page = this.page + 1
|
||||
this.withdrawsAccountsList()
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '哎呦,没有更多了~',
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加银行
|
||||
withdrawsAccountsList() {
|
||||
let data = {
|
||||
page: this.page
|
||||
}
|
||||
withdrawsAccountsList(data).then(res => {
|
||||
console.log(res)
|
||||
this.lists = this.lists.concat(res.data)
|
||||
this.has_more = res.page.has_more
|
||||
uni.setStorageSync('refresh', false)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 跳转到编辑银行卡的页面
|
||||
editBank(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/wallet/addBank?id=' + id
|
||||
})
|
||||
},
|
||||
// 删除银行
|
||||
delBank(id, index) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '是否确认删除该银行',
|
||||
cancelColor: '#cacaca',
|
||||
cancelText: '我再想想',
|
||||
confirmColor: '#7C52FC',
|
||||
confirmText: '确认删除',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
withdrawsAccountsDelete(id).then(res => {
|
||||
console.log(res)
|
||||
that.lists.splice(index, 1)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择银行返回上一页携带参数
|
||||
selectBank(item) {
|
||||
let bankInfo = {
|
||||
name: item.bank.name + '-' + item.no.substring(item.no.length - 4),
|
||||
bank_account_id: item.bank_account_id
|
||||
}
|
||||
let pages = getCurrentPages()
|
||||
let prevPage = pages[pages.length - 2]
|
||||
console.log(bankInfo)
|
||||
prevPage._data.bankInfo = bankInfo
|
||||
uni.navigateBack() //返回上一页面
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.selectCard {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
padding-top: 30rpx;
|
||||
background-color: #fff;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
.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: 20rpx 30rpx 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);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
.u-icon {
|
||||
position: absolute;
|
||||
background-color: pink;
|
||||
z-index: 100;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.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>
|
||||
@@ -1,136 +0,0 @@
|
||||
<template>
|
||||
<view class="webkit-box code">
|
||||
<view class="webkit-box code-content">
|
||||
<view class="sub-title">扫码转入OC COIN</view>
|
||||
<view class="code-img">
|
||||
<image :src="code" mode="widthFix" />
|
||||
</view>
|
||||
<view class="hr"></view>
|
||||
<view class="sub-title">钱包地址</view>
|
||||
<view class="hash">{{address || '-'}}</view>
|
||||
<view class="buttons">
|
||||
<button class="item red" type="default" @click="showShare()">分享</button>
|
||||
<button class="item greed" type="default" @click="copyAddress">复制</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">OC CHNIA</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { code } from '@/apis/interfaces/wallet'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
address: '',
|
||||
code: ''
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
code().then(res=>{
|
||||
this.code = res.image
|
||||
this.address = res.address
|
||||
}).catch(err=>{
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
copyAddress(){
|
||||
uni.setClipboardData({
|
||||
data: this.address
|
||||
})
|
||||
},
|
||||
showShare(){
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
title: '我正在使用ocChain钱包收款',
|
||||
scene: 'WXSceneSession',
|
||||
href: 'https://live.funnyzhibo.com/blockdownload',
|
||||
imageUrl: 'https://live.funnyzhibo.com/oc-chain.png',
|
||||
summary: '我的收款地址' + this.address
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.code{
|
||||
height: 100vh;
|
||||
background:linear-gradient(to bottom, $mian-color, $mian-color-deep);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
box-sizing: border-box;
|
||||
// 收款码
|
||||
.code-content{
|
||||
text-align: center;
|
||||
background: white;
|
||||
margin: 0 8vw;
|
||||
border-radius: $radius;
|
||||
padding: $padding * 2;
|
||||
height: 70vh;
|
||||
box-shadow: 0 0 6rpx 6rpx rgba($color: #000000, $alpha: .02);
|
||||
box-sizing: border-box;
|
||||
.sub-title{
|
||||
font-size: $title-size + 8;
|
||||
}
|
||||
.code-img{
|
||||
width: 20vh;
|
||||
height: 20vh;
|
||||
margin: $margin * 3 0 $margin * 2;
|
||||
display: inline-block;
|
||||
background-image: url(../../static/background/wallet-code-background.png);
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
image{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.hr{
|
||||
height: 1rpx;
|
||||
background: $border-color;
|
||||
margin: $margin * 2 0;
|
||||
}
|
||||
.hash{
|
||||
word-wrap: break-word;
|
||||
font-size: $title-size;
|
||||
padding: $padding 0;
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
padding-top: $padding * 2;
|
||||
.item{
|
||||
width: 40%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
&.red{
|
||||
background: $red-color;
|
||||
}
|
||||
&.greed{
|
||||
background: $mian-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 底部
|
||||
.footer{
|
||||
height: 10vh;
|
||||
line-height: 10vh;
|
||||
text-align: center;
|
||||
font-size: $title-size + 10;
|
||||
font-weight: bold;
|
||||
color: #58876e;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,138 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 设置钱包密码 -->
|
||||
<view class="password">
|
||||
<view class="prompt">请设置6位数字密码。建议不要使用连续的数字。</view>
|
||||
<view class="group">
|
||||
<view class="inputs">
|
||||
<label>密码</label>
|
||||
<input type="digit" v-model="password" maxlength="6" placeholder="请设置密码" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>确认密码</label>
|
||||
<input type="digit" v-model="verify" maxlength="6" placeholder="请确认密码" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="buttons">
|
||||
<button type="default" form-type="submit" @click="createWallet">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
security
|
||||
} from '@/apis/interfaces/wallet'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
password: '',
|
||||
verify: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 激活钱包
|
||||
createWallet() {
|
||||
if (this.password === '' || this.verify === '') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请设置密码'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.password !== this.verify) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '两次输入密码不一致'
|
||||
})
|
||||
return
|
||||
}
|
||||
security({
|
||||
code: this.password
|
||||
}).then(res => {
|
||||
uni.navigateBack()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 副标题
|
||||
.sub-title {
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
margin: $margin * 2 $margin;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
|
||||
// 设置密码
|
||||
.password {
|
||||
padding: 0 $padding * 2;
|
||||
|
||||
.prompt {
|
||||
margin-top: $margin * 2;
|
||||
font-size: $title-size-m;
|
||||
color: $mian-color;
|
||||
}
|
||||
|
||||
.group {
|
||||
margin-top: $margin;
|
||||
border-radius: $radius-m;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
||||
background-color: white;
|
||||
|
||||
.inputs {
|
||||
padding: $padding $padding + 10;
|
||||
border-bottom: solid 1rpx $border-color;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
label {
|
||||
color: $text-gray;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
|
||||
input {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 按钮
|
||||
.buttons {
|
||||
padding: $padding * 2;
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-bottom: $margin * 2;
|
||||
font-size: $title-size-lg;
|
||||
color: $mian-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
button {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: $mian-color;
|
||||
border-radius: $radius-lg;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -4,9 +4,9 @@
|
||||
<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> -->
|
||||
<span>(≈ {{ cost || '0.00' }} CNY)</span>
|
||||
</view>
|
||||
<view class="balance">{{ balance.balance || '0.00' }}</view>
|
||||
<view class="balance">{{ balance || '0.00' }}</view>
|
||||
<view class="frozen" @click="withdrawDetail">提现记录</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -14,98 +14,59 @@
|
||||
<view class="item-name">
|
||||
提现至银行卡
|
||||
<view class="right">
|
||||
<view class="cardName" @click="addCard">添加银行卡</view>
|
||||
<uni-icons type="arrowright" size="12" color="#fff" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-name">
|
||||
选择银行卡
|
||||
<view class="right">
|
||||
<view class="cardName" @click="selectCard">选择银行卡</view>
|
||||
<view class="cardName" v-if="bank_accounts === 0" @click="addBanks">添加银行卡</view>
|
||||
<view class="cardName" v-if='bank_accounts>0' @click="bankLists">{{bankInfo.name?bankInfo.name:'选择银行卡'}}</view>
|
||||
<uni-icons type="arrowright" size="12" color="#fff" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="withdrawing-content">
|
||||
<view class="item">
|
||||
<view style="flex: 1;">
|
||||
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
|
||||
placeholder-style="color:#999;font-weight:normal; font-size:40rpx;"
|
||||
placeholder="能量球数量" />
|
||||
<view v-if="total">≈ ¥{{total}}</view>
|
||||
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="提现数量" />
|
||||
</view>
|
||||
<view class="all" @click="all">全部提现</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" @click="open">提现至银行卡</view>
|
||||
<view class="des">预计5- 10个工作日到账</view>
|
||||
<view class="total" v-if="total">≈ ¥{{total}} </view>
|
||||
<view class="btn" @click="actions">提现至银行卡</view>
|
||||
<view class="des">预计5- 10个工作日到账 手续费: {{tax}}%</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
withdraw,
|
||||
withdrawLogs,
|
||||
withdrawDo
|
||||
} from '@/apis/interfaces/wallet.js';
|
||||
import numberJpan from "@/components/numberJpan/numberJpan.vue";
|
||||
withdrawsIndexCreate,
|
||||
withdrawsIndex
|
||||
} from '@/apis/interfaces/withdraws';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
balance: 0, // 钱包能量球数量
|
||||
price: 0, // 当前能量球价格
|
||||
tax: 0, // 当前手续费
|
||||
cost:1,// 每个能量球的价格
|
||||
total:0,// 约合人民币
|
||||
card: '', // 银行卡号
|
||||
name: '', // 姓名
|
||||
password: '', //
|
||||
withdraw_input: '', // 提现能量球数量
|
||||
total: '', // 提现能量球转化成的钱数
|
||||
page: 1,
|
||||
has_more: true,
|
||||
withdrawLists: [],
|
||||
bank_accounts: 0,
|
||||
bankInfo:{}
|
||||
};
|
||||
},
|
||||
components: {
|
||||
'number-jpan': numberJpan
|
||||
},
|
||||
onLoad() {
|
||||
this.reset()
|
||||
this.getInfo()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.withdrawLists.length > 0) {
|
||||
if (this.has_more) {
|
||||
this.withdrawLogs()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '没有更多~',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 提现基本信息
|
||||
withdraw() {
|
||||
withdraw().then(res => {
|
||||
this.balance = Number(res.balance)
|
||||
this.price = Number(res.price)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提现记录
|
||||
withdrawLogs() {
|
||||
withdrawLogs({
|
||||
page: this.page
|
||||
}).then(res => {
|
||||
this.withdrawLists = this.withdrawLists.concat(res.data)
|
||||
if (res.page.has_more) {
|
||||
this.page = this.page + 1
|
||||
this.has_more = true
|
||||
} else {
|
||||
this.has_more = false
|
||||
}
|
||||
getInfo() {
|
||||
withdrawsIndexCreate().then(res => {
|
||||
this.balance = res.balance
|
||||
this.tax = res.tax
|
||||
this.cost = res.cost
|
||||
this.bank_accounts = res.bank_accounts.length
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -117,7 +78,7 @@
|
||||
inputNum(e) {
|
||||
let number = Number(e.detail.value)
|
||||
if (number <= this.balance) {
|
||||
this.total = Number(e.detail.value) * this.price
|
||||
this.total = Number(e.detail.value) * this.cost
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '最大值能超过' + this.balance + '',
|
||||
@@ -133,7 +94,7 @@
|
||||
all() {
|
||||
if (this.balance > 0) {
|
||||
this.withdraw_input = this.balance
|
||||
this.total = this.balance * this.price
|
||||
this.total = this.balance * this.cost
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '啥也没有,我也做不到~',
|
||||
@@ -142,84 +103,63 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
// 打开密码 出发提现功能
|
||||
open() {
|
||||
if (this.total > 0) {
|
||||
let params = {
|
||||
name: this.name,
|
||||
card: this.card,
|
||||
total: this.withdraw_input
|
||||
}
|
||||
if (params.name === '' || params.card === '' || params.total === 0) {
|
||||
uni.showToast({
|
||||
title: '重新确认提现信息',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
this.$refs.numberPad.open()
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '啥也没有,我也做不到~',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
// 提现
|
||||
actions(){
|
||||
let data = {
|
||||
bank_account_id:this.bankInfo.bank_account_id,
|
||||
amount:Number(this.withdraw_input)
|
||||
}
|
||||
},
|
||||
// 输入密码成功后,,,
|
||||
closeChange(e) {
|
||||
uni.showLoading({
|
||||
title: '提现中~'
|
||||
})
|
||||
let params = {
|
||||
name: this.name,
|
||||
card: this.card,
|
||||
total: this.withdraw_input,
|
||||
code: e
|
||||
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;
|
||||
}
|
||||
withdrawDo(params).then(res => {
|
||||
uni.showToast({
|
||||
title: '申请提现成功,耐心等待打款',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
this.reset()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
uni.showModal({
|
||||
title:'温馨提示',
|
||||
content:'您是否确认提现,将会扣除' +this.tax+'%手续费' ,
|
||||
confirmColor:'#7c52fc',
|
||||
cancelColor:'#cacaca',
|
||||
cancelText:'我再想想',
|
||||
confirmText:'确认提现',
|
||||
success: (res) => {
|
||||
if(res.confirm){
|
||||
withdrawsIndex(data).then(res=>{
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
this.withdraw_input = ''
|
||||
this.total = ''
|
||||
this.getInfo()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.name = ''
|
||||
this.card = ''
|
||||
this.page = 1
|
||||
this.has_more = true
|
||||
this.withdraw_input = ''
|
||||
this.total = 0
|
||||
this.withdrawLists = []
|
||||
this.withdrawLogs();
|
||||
this.withdraw();
|
||||
|
||||
},
|
||||
// 添加银行卡
|
||||
addCard() {
|
||||
addBanks() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/wallet/addCard'
|
||||
url: '/pages/wallet/addBank'
|
||||
})
|
||||
},
|
||||
// 选择银行卡
|
||||
selectCard(){
|
||||
bankLists() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/wallet/selectCard'
|
||||
url: '/pages/wallet/bankList'
|
||||
})
|
||||
},
|
||||
// 提现记录
|
||||
withdrawDetail(){
|
||||
withdrawDetail() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/wallet/withdrawList'
|
||||
url: '/pages/wallet/withdrawList'
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -232,12 +172,14 @@
|
||||
min-height: 100vh;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.receiptCode {
|
||||
color: #808080;
|
||||
text-align: left;
|
||||
// margin: $margin 0;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
|
||||
.WithdrawingCoin {
|
||||
background-color: #f7f7f7;
|
||||
width: 100%;
|
||||
@@ -262,6 +204,7 @@
|
||||
opacity: .5;
|
||||
transform: rotate(-7deg);
|
||||
}
|
||||
|
||||
.propery-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
@@ -292,11 +235,13 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.all {
|
||||
color: $text-price;
|
||||
width: 160rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
text-align: center;
|
||||
color: #303030;
|
||||
@@ -326,6 +271,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.withdrawing-content {
|
||||
background-color: #fff;
|
||||
padding: $padding $padding $padding $padding * 2;
|
||||
@@ -390,6 +336,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
background-image: linear-gradient(to right, #7c52fc, #976dff);
|
||||
color: #fff;
|
||||
@@ -400,9 +347,17 @@
|
||||
font-size: $title-size;
|
||||
font-weight: bold;
|
||||
}
|
||||
.des{
|
||||
|
||||
.des {
|
||||
text-align: center;
|
||||
color: #cacaca;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.total {
|
||||
color: $mian-color;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 50rpx;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<form>
|
||||
<!-- 副标题 -->
|
||||
<view class="sub-title">输入您的钱包助记词导入</view>
|
||||
<!-- 助记词 -->
|
||||
<view class="word">
|
||||
<textarea placeholder="输入助记词"></textarea>
|
||||
</view>
|
||||
<!-- 设置钱包密码 -->
|
||||
<view class="password">
|
||||
<view class="group">
|
||||
<view class="inputs">
|
||||
<label>钱包名称</label>
|
||||
<input type="text" placeholder="输入钱包名称" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="title">不少于8个字符。建议包含大小写,符号,特殊字符。</view>
|
||||
<view class="group">
|
||||
<view class="inputs">
|
||||
<label>密码</label>
|
||||
<input type="password" placeholder="请设置密码" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>确认密码</label>
|
||||
<input type="password" placeholder="请确认密码" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="buttons">
|
||||
<view class="text">什么是助记词?</view>
|
||||
<button type="default" form-type="submit">开始导入</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 副标题
|
||||
.sub-title{
|
||||
line-height: 90rpx;
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
margin: $margin;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
// 助记词
|
||||
.word{
|
||||
background-color: white;
|
||||
margin: $margin * 2;
|
||||
padding: $padding + 10;
|
||||
border-radius: $radius-m;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
||||
& textarea{
|
||||
height: 200rpx;
|
||||
}
|
||||
}
|
||||
// 设置密码
|
||||
.password{
|
||||
padding: 0 $padding * 2;
|
||||
.title{
|
||||
margin-top: $margin * 2;
|
||||
font-size: $title-size-m;
|
||||
color: $mian-color;
|
||||
}
|
||||
.group{
|
||||
margin-top: $margin;
|
||||
border-radius: $radius-m;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
||||
background-color: white;
|
||||
.inputs{
|
||||
padding: $padding $padding + 10;
|
||||
border-bottom: solid 1rpx $border-color;
|
||||
&:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
label{
|
||||
color: $text-gray;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
input{
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 按钮
|
||||
.buttons{
|
||||
padding: $padding * 2;
|
||||
.text{
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-bottom: $margin * 2;
|
||||
font-size: $title-size-lg;
|
||||
color: $mian-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
button{
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: $mian-color;
|
||||
border-radius: $radius-lg;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,144 +0,0 @@
|
||||
<template>
|
||||
<view class="animate__animated animate__fadeInRight">
|
||||
<!-- 数字资产 -->
|
||||
<view class="property">
|
||||
<view class="title">总资产(元)</view>
|
||||
<view class="number">0.00</view>
|
||||
</view>
|
||||
<!-- 资产列表 -->
|
||||
<view class="lists">
|
||||
<view class="lists-header">
|
||||
资产列表
|
||||
<uni-icons type="plus" size="24" color="#aa55ff"></uni-icons>
|
||||
</view>
|
||||
<view class="item" v-for="(item, index) in 2" :key="index" @click="propertyInfo(item)">
|
||||
<view class="cost">
|
||||
<image class="logo" src="" mode="" />
|
||||
<view class="title ellipsis">OC COIN</view>
|
||||
<view class="text ellipsis">≈¥0.21</view>
|
||||
</view>
|
||||
<view class="balance">
|
||||
<view class="title ellipsis">120,330.00</view>
|
||||
<view class="text ellipsis">¥25269.3000</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
propertyInfo(e){
|
||||
console.log(e)
|
||||
uni.navigateTo({
|
||||
url: './property'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 数字资产
|
||||
.property{
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin-top: $margin;
|
||||
margin-left: $margin + ($margin / 2);
|
||||
background-color: $mian-color;
|
||||
border-radius: $radius 0 0 $radius;
|
||||
padding: ($padding * 3) ($padding * 3) ($padding * 3) ($padding * 2);
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
&::before,&::after{
|
||||
background-color: rgba($color: $red-color, $alpha: .03);
|
||||
border-radius: 50%;
|
||||
content: " ";
|
||||
position: absolute;
|
||||
}
|
||||
&::before{
|
||||
top: -300rpx;
|
||||
left: 40%;
|
||||
height: 400rpx;
|
||||
width: 400rpx;
|
||||
}
|
||||
&::after{
|
||||
bottom: -200rpx;
|
||||
left: -100rpx;
|
||||
height: 300rpx;
|
||||
width: 300rpx;
|
||||
}
|
||||
.title{
|
||||
font-size: $title-size;
|
||||
}
|
||||
.number{
|
||||
font-size: $title-size + 18;
|
||||
}
|
||||
}
|
||||
// 资产列表
|
||||
.lists{
|
||||
padding: $margin + ($margin / 2);
|
||||
.lists-header{
|
||||
display: flex;
|
||||
font-size: $title-size + 2;
|
||||
color: $text-color;
|
||||
font-weight: bold;
|
||||
padding: $padding 0 ($padding/2) 0;
|
||||
justify-content: space-between;
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
.item{
|
||||
background-color: white;
|
||||
border-radius: $radius;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
|
||||
margin-top: $margin;
|
||||
padding: $padding * 2;
|
||||
display: flex;
|
||||
&:first-child{
|
||||
margin-top: 0;
|
||||
}
|
||||
.cost{
|
||||
position: relative;
|
||||
margin-right: $margin;
|
||||
padding-left: 108rpx;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
.logo{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 50%;
|
||||
background-color: $border-color;
|
||||
margin-right: $margin;
|
||||
}
|
||||
}
|
||||
.balance{
|
||||
padding-left: $padding;
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
}
|
||||
.text{
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,108 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 提示信息 -->
|
||||
<view class="prompt">
|
||||
请按照顺序记录并确保正确备份助记词
|
||||
</view>
|
||||
<!-- 助记词 -->
|
||||
<ul class="mnemonic">
|
||||
<li v-for="(item, index) in mnemonic" :key="index">{{item}}</li>
|
||||
</ul>
|
||||
<!-- 按钮 -->
|
||||
<view class="buttons">
|
||||
<view class="text">注:助记词是用户账户的唯一标识,不能分享给他人,掌握该助记词即可控制该账户与钱包</view>
|
||||
<button type="default" @click="goto('/pages/wallet/validation')">验证助记词</button>
|
||||
</view>
|
||||
<!-- <view class="skip">暂时不验证?<navigator url="/pages/index/index" open-type="switchTab">点此跳过</navigator></view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { seed } from "../../apis/interfaces/wallet"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mnemonic: [], // 助记词
|
||||
sign : '' // 校验签名
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
seed().then(res => {
|
||||
this.mnemonic = res.seed.split(' ')
|
||||
this.sign = res.sign
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goto(url){
|
||||
uni.redirectTo({
|
||||
url: url + '?seed=' + this.mnemonic + '&sign=' + this.sign
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 提示信息
|
||||
.prompt{
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
// 跳过
|
||||
.skip{
|
||||
padding: $padding * 2;
|
||||
text-align: center;
|
||||
color: $text-gray;
|
||||
navigator{
|
||||
color: $mian-color;
|
||||
margin-left: $margin/2;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
// 助记词
|
||||
.mnemonic{
|
||||
margin: $margin $margin * 2;
|
||||
border-radius: $radius-m;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
||||
background-color: white;
|
||||
padding: $padding;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
li{
|
||||
text-align: center;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
width: 58rpx;
|
||||
margin: $margin / 2;
|
||||
color: $text-color;
|
||||
background: rgba($color: $border-color, $alpha: .4);
|
||||
}
|
||||
}
|
||||
// 按钮
|
||||
.buttons{
|
||||
padding: $padding $padding * 2;
|
||||
.text{
|
||||
text-align: center;
|
||||
margin-bottom: $margin * 2;
|
||||
font-size: $title-size-lg;
|
||||
color: $red-color;
|
||||
}
|
||||
button{
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: $mian-color;
|
||||
border-radius: $radius-lg;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,108 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 私钥 -->
|
||||
<view class="keys">
|
||||
<view class="title">您已接收OC Chain托管</view>
|
||||
<view class="key">{{key || '-'}}</view>
|
||||
<view class="copykey" @click="copykey">复制我的私钥</view>
|
||||
</view>
|
||||
<!-- 疑问 -->
|
||||
<view class="doubt" v-if="rules.length > 0">
|
||||
<view class="doubt-item" v-for="(item, index) in rules" :key="index">
|
||||
<view class="title">{{item.title || '-'}}</view>
|
||||
<view class="content">{{item.description || '-'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 免责说明 -->
|
||||
<view class="liability">
|
||||
<navigator url="/pages/wallet/cmsWithDraw">免责条款</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { privatekey, keyrules } from '@/apis/interfaces/wallet'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
key: "",
|
||||
rules: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
Promise.all([privatekey(this.$Route.query.password), keyrules()]).then(res => {
|
||||
let privatekey = res[0],
|
||||
keyrules = res[1]
|
||||
this.key = privatekey.private_key
|
||||
this.rules = keyrules
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
copykey(){
|
||||
uni.setClipboardData({
|
||||
data: this.key
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.keys{
|
||||
margin: $margin * 2;
|
||||
background: white;
|
||||
padding: $padding * 2;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
|
||||
border-radius: $radius;
|
||||
.title{
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: $title-size + 4;
|
||||
color: $text-color;
|
||||
}
|
||||
.key{
|
||||
padding: $padding * 2 0;
|
||||
text-align: center;
|
||||
color: $mian-color;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.copykey{
|
||||
background-color: $mian-color;
|
||||
color: white;
|
||||
height: 95rpx;
|
||||
line-height: 95rpx;
|
||||
text-align: center;
|
||||
font-size: $title-size;
|
||||
border-radius: $radius-m;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.doubt{
|
||||
margin: $margin $margin * 2;
|
||||
.doubt-item{
|
||||
padding: $padding 0;
|
||||
.title{
|
||||
font-weight: bold;
|
||||
color: $text-color;
|
||||
line-height: 50rpx;
|
||||
font-size: $title-size + 2;
|
||||
}
|
||||
.content{
|
||||
color: $text-gray-lg;
|
||||
font-size: $title-size-m;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.liability{
|
||||
text-align: center;
|
||||
color: $text-gray;
|
||||
@extend .ios-bottom;
|
||||
navigator{
|
||||
font-size: $title-size-sm;
|
||||
display: inline-block;
|
||||
line-height: 90rpx;
|
||||
padding: 0 ($padding * 2);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,150 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 设置钱包密码 -->
|
||||
<view class="password">
|
||||
<view class="prompt">请设置6位数字密码。建议不要使用连续的数字。</view>
|
||||
<view class="group">
|
||||
<view class="inputs">
|
||||
<label>密码</label>
|
||||
<input type="digit" v-model="password" maxlength="6" password placeholder="请设置新密码" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>确认密码</label>
|
||||
<input type="digit" v-model="verify" maxlength="6" password placeholder="请确认新密码" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="buttons">
|
||||
<button type="default" form-type="submit" @click="createWallet">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
securityReset
|
||||
} from '@/apis/interfaces/wallet'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
password: '',
|
||||
verify: '',
|
||||
oldPassword: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.oldPassword = this.$Route.query.password
|
||||
},
|
||||
methods: {
|
||||
// 激活钱包
|
||||
createWallet() {
|
||||
if (this.password === '' || this.verify === '') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请设置密码'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.password !== this.verify) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '两次输入密码不一致'
|
||||
})
|
||||
return
|
||||
}
|
||||
securityReset({
|
||||
new_code: this.password,
|
||||
old_code: this.oldPassword
|
||||
}).then(res => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '密码已重置',
|
||||
showCancel:false,
|
||||
success: res=> {
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 副标题
|
||||
.sub-title {
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
margin: $margin * 2 $margin;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
|
||||
// 设置密码
|
||||
.password {
|
||||
padding: 0 $padding * 2;
|
||||
|
||||
.prompt {
|
||||
margin-top: $margin * 2;
|
||||
font-size: $title-size-m;
|
||||
color: $mian-color;
|
||||
}
|
||||
|
||||
.group {
|
||||
margin-top: $margin;
|
||||
border-radius: $radius-m;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
||||
background-color: white;
|
||||
|
||||
.inputs {
|
||||
padding: $padding $padding + 10;
|
||||
border-bottom: solid 1rpx $border-color;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
label {
|
||||
color: $text-gray;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
|
||||
input {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 按钮
|
||||
.buttons {
|
||||
padding: $padding * 2;
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-bottom: $margin * 2;
|
||||
font-size: $title-size-lg;
|
||||
color: $mian-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
button {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: $mian-color;
|
||||
border-radius: $radius-lg;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,77 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="webkit-box results">
|
||||
<uni-icons type="checkbox-filled" size="88" color="#009b69"></uni-icons>
|
||||
<view class="title">交易已提交</view>
|
||||
<view class="sub-title">预计10秒内到账,可在交易记录中查询,以实际到账时间为准</view>
|
||||
<view class="hash">
|
||||
<view class="hash-title">交易哈希</view>
|
||||
<view class="hash-text">{{hash}}</view>
|
||||
</view>
|
||||
<button class="results-button" type="default" @click="navBack">返回</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hash: ''
|
||||
};
|
||||
},
|
||||
onLoad(e){
|
||||
this.hash = e.hash
|
||||
},
|
||||
methods:{
|
||||
navBack(){
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.results{
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding-left: $padding * 3;
|
||||
padding-right: $padding * 3;
|
||||
padding-bottom: 20vh;
|
||||
.title{
|
||||
font-size: $title-size + 8;
|
||||
color: $text-color;
|
||||
font-weight: bold;
|
||||
line-height: 80rpx;
|
||||
padding: $padding 0;
|
||||
}
|
||||
.sub-title{
|
||||
color: $text-gray;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.hash{
|
||||
background-color: white;
|
||||
padding: $padding * 2;
|
||||
border-radius: $radius-lg;
|
||||
margin-top: $margin * 2;
|
||||
font-size: $title-size;
|
||||
color: $text-color;
|
||||
.hash-title{
|
||||
padding-bottom: $padding;
|
||||
}
|
||||
.hash-text{
|
||||
word-break:break-all;
|
||||
}
|
||||
}
|
||||
.results-button{
|
||||
margin-top: $margin * 3;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: $mian-color;
|
||||
color: white;
|
||||
font-size: $title-size;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,120 +0,0 @@
|
||||
<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>
|
||||
@@ -1,216 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 账户余额 -->
|
||||
<view class="transfer-block">
|
||||
<view class="unit">OCC</view>
|
||||
<view class="transfer-flex">
|
||||
<view class="item ellipsis">
|
||||
<label>数量</label>{{balance.balance || '0.00'}}
|
||||
</view>
|
||||
<view class="item ellipsis">
|
||||
<label>估值(CNY)</label>≈{{cny || '0.00'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sub-title">
|
||||
<text>请认真确认地址及数量,地址错误无法找回</text>
|
||||
</view>
|
||||
<!-- 转账信息 -->
|
||||
<view class="password">
|
||||
<view class="group">
|
||||
<view class="inputs input-scan">
|
||||
<label>接收地址</label>
|
||||
<input type="text" placeholder="请输入接收地址" v-model="address" />
|
||||
<view class="input-scan-icon" @click="scanCode">
|
||||
<uni-icons type="scan" size="22" color="#009b69"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>转账数量</label>
|
||||
<input type="number" placeholder="请输入转账数量" v-model="number" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="group">
|
||||
<view class="inputs">
|
||||
<label>交易密码</label>
|
||||
<input type="password" placeholder="请输入安全密码" v-model="password" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="buttons">
|
||||
<button type="default" @click="submitTransfer">转账</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sum, price, transfer } from '@/apis/interfaces/wallet'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
balance: {},
|
||||
cny: '0.00',
|
||||
address: '',
|
||||
number: '',
|
||||
password: ''
|
||||
}
|
||||
},
|
||||
onLoad(e){
|
||||
if(e.hashAddress) this.address = e.hashAddress
|
||||
},
|
||||
mounted() {
|
||||
Promise.all([
|
||||
sum(),
|
||||
price()
|
||||
]).then(res => {
|
||||
this.balance = res[0]
|
||||
if (res[0].balance > 0) this.cny = (res[1] * res[0].balance).toFixed(2)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 转账
|
||||
submitTransfer(){
|
||||
if(this.address === '' || this.number === '' || this.password === ''){
|
||||
let messageText
|
||||
if(this.address === '') messageText = '请输入接收地址'
|
||||
else if(this.number === '') messageText = '请输入转账数量'
|
||||
else if(this.password === '') messageText = '请输入安全密码'
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: messageText
|
||||
})
|
||||
return
|
||||
}
|
||||
// 提交转账信息
|
||||
transfer({
|
||||
to: this.address,
|
||||
amount: this.number,
|
||||
security_code: this.password
|
||||
}).then(res => {
|
||||
uni.redirectTo({
|
||||
url: './results?hash=' + res.txHash + '&number=' + this.number
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
},
|
||||
// 扫码
|
||||
scanCode(){
|
||||
uni.scanCode({
|
||||
scanType: ['qrCode'],
|
||||
success: res=> {
|
||||
this.address = res.result
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 账户余额
|
||||
.transfer-block{
|
||||
background-color: white;
|
||||
margin: $margin * 2;
|
||||
border-radius: $radius-m;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
||||
background-color: white;
|
||||
padding: $padding $padding + 10;
|
||||
.unit{
|
||||
font-weight: bold;
|
||||
font-size: $title-size + 10;
|
||||
line-height: 90rpx;
|
||||
color: $text-color;
|
||||
}
|
||||
.transfer-flex{
|
||||
display: flex;
|
||||
padding: $padding 0;
|
||||
border-top: solid 1rpx $border-color;
|
||||
.item{
|
||||
width: 50%;
|
||||
font-size: $title-size-m;
|
||||
& > label{
|
||||
color: $text-gray;
|
||||
padding-right: $padding/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 提示信息
|
||||
.sub-title{
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
margin: $margin * 2 $margin;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
// 转账信息
|
||||
.password{
|
||||
padding: 0 $padding * 2;
|
||||
.group{
|
||||
margin-top: $margin;
|
||||
border-radius: $radius-m;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
||||
background-color: white;
|
||||
.inputs{
|
||||
padding: $padding $padding + 10;
|
||||
border-bottom: solid 1rpx $border-color;
|
||||
&:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
label{
|
||||
color: $text-gray;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
input{
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
.input-scan{
|
||||
position: relative;
|
||||
padding-right: ($padding*2) + 70;
|
||||
.input-scan-icon{
|
||||
position: absolute;
|
||||
bottom: $padding;
|
||||
right: $padding;
|
||||
height: 70rpx;
|
||||
width: 70rpx;
|
||||
line-height: 70rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 按钮
|
||||
.buttons{
|
||||
padding: $padding * 2;
|
||||
.text{
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-bottom: $margin * 2;
|
||||
font-size: $title-size-lg;
|
||||
color: $mian-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
button{
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: $mian-color;
|
||||
border-radius: $radius-lg;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,169 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 提示信息 -->
|
||||
<view class="prompt">
|
||||
验证您的钱包助记词
|
||||
</view>
|
||||
<!-- 助记词 -->
|
||||
<view class="mnemonic">
|
||||
<view
|
||||
class="item"
|
||||
v-for="(item, index) in validation"
|
||||
:key="index"
|
||||
:class="item === null ? 'hide': ''"
|
||||
@click="onKeys('removeKey', index)"
|
||||
>{{ item }}</view>
|
||||
</view>
|
||||
<!-- 选择助记词 -->
|
||||
<block v-if="mnemonic.length > 0">
|
||||
<view class="mnemonic-title">
|
||||
按顺序填写助记词
|
||||
</view>
|
||||
<view class="mnemonic-select">
|
||||
<view class="item" v-for="(item, index) in mnemonic" :key="index" @click="onKeys('addKey', index)">{{ item }}</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 按钮 -->
|
||||
<view class="buttons">
|
||||
<button type="default" @click="verifyMnemonic">验证</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { hash } from "../../apis/interfaces/wallet"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
validation : new Array(15).fill(null), // 验证key
|
||||
mnemonic : [], // 助记词key
|
||||
sign : '', // 助记词校验签名
|
||||
seedString : '', // 助记词原词
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
let seed = e.seed.split(',')
|
||||
seed.sort(() => {
|
||||
return Math.random() - .5
|
||||
});
|
||||
this.mnemonic = seed
|
||||
this.sign = e.sign
|
||||
this.seedString = e.seed
|
||||
},
|
||||
methods: {
|
||||
// 填写助记词
|
||||
onKeys(type, index){
|
||||
if(type === 'addKey') {
|
||||
this.$set(this.validation, this.validation.findIndex(val => val === null), this.mnemonic[index])
|
||||
this.$delete(this.mnemonic, index)
|
||||
return
|
||||
}
|
||||
if(type === 'removeKey' && this.validation[index] !== null) {
|
||||
this.mnemonic.push(this.validation[index])
|
||||
this.$delete(this.validation, index)
|
||||
this.validation.push(null)
|
||||
}
|
||||
},
|
||||
// 验证助记词
|
||||
verifyMnemonic(){
|
||||
if(this.validation.findIndex(val => val === null) > -1){
|
||||
uni.showToast({
|
||||
title: '请完整填写助记词',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let seed = this.validation.toString().replace(/,/g, ',')
|
||||
if (this.seedString !== seed) {
|
||||
uni.showToast({
|
||||
title: '验证失败,请确认您的助记词',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: './create'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 提示信息
|
||||
.prompt{
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
// 选择助记词
|
||||
.mnemonic-title{
|
||||
padding-top: $padding * 2;
|
||||
margin: 0 $margin * 2;
|
||||
font-size: $title-size-m;
|
||||
color: $mian-color;
|
||||
}
|
||||
.mnemonic-select{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: $padding $padding + $padding / 2;
|
||||
.item{
|
||||
background-color: white;
|
||||
line-height: 68rpx;
|
||||
height: 68rpx;
|
||||
width: 68rpx;
|
||||
text-align: center;
|
||||
margin: $margin / 2;
|
||||
border-radius: $radius-m;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
||||
}
|
||||
}
|
||||
// 助记词
|
||||
.mnemonic{
|
||||
margin: $margin ($margin * 2);
|
||||
border-radius: $radius-m;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
||||
background-color: white;
|
||||
padding: $padding;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
.item{
|
||||
background: rgba($color: $border-color, $alpha: .4);
|
||||
width: 58rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
text-align: center;
|
||||
color: $text-color;
|
||||
margin: $margin / 2;
|
||||
&.hide{
|
||||
border:dashed 1px $border-color;
|
||||
box-sizing: border-box;
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 按钮
|
||||
.buttons{
|
||||
padding: $padding $padding * 2;
|
||||
.text{
|
||||
text-align: center;
|
||||
margin-bottom: $margin * 2;
|
||||
font-size: $title-size-lg;
|
||||
color: $red-color;
|
||||
}
|
||||
button{
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: $mian-color;
|
||||
border-radius: $radius-lg;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
&[disabled]{
|
||||
background: rgba($color: $mian-color, $alpha: .8);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -30,16 +30,23 @@
|
||||
<!-- 列表。。。 -->
|
||||
<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="receiptCode">
|
||||
<image class="logo" src="/static/imgs/record-icon.png" mode="widthFix" />
|
||||
<view class="title">{{item.way}}</view>
|
||||
<span class='status'> {{item.status.status_text}}</span>
|
||||
</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>
|
||||
<span>
|
||||
能量球:{{item.quantity}}
|
||||
<span class='left-des'>金额≈¥{{item.take}} 手续费:{{item.tax}}</span>
|
||||
</span>
|
||||
<span>{{item.create_at}}</span>
|
||||
</view>
|
||||
<!-- <view class="right">
|
||||
<span> {{item.create_at}}</span>
|
||||
<span> -</span>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -53,16 +60,15 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
chaineb
|
||||
} from '@/apis/interfaces/mine';
|
||||
withdrawsIndexLists
|
||||
} from '@/apis/interfaces/withdraws';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: [1, 1.1, 1, 1],
|
||||
lists: [],
|
||||
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,
|
||||
@@ -98,12 +104,12 @@
|
||||
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
|
||||
withdrawsIndexLists(data).then(res => {
|
||||
console.log(res)
|
||||
this.account = res.all
|
||||
this.lists = this.lists.concat(res.lists.data)
|
||||
this.has_next_page = res.lists.page.has_more
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
@@ -153,8 +159,8 @@
|
||||
this.type = type
|
||||
this.params = {
|
||||
year: true,
|
||||
month: false,
|
||||
day: false
|
||||
month: true,
|
||||
day: true
|
||||
}
|
||||
this.date = this.currentDay
|
||||
this.reset()
|
||||
@@ -335,7 +341,7 @@
|
||||
|
||||
.record-money {
|
||||
color: #fff;
|
||||
font-size: 60rpx;
|
||||
font-size: 70rpx;
|
||||
font-weight: bold;
|
||||
|
||||
span {
|
||||
@@ -359,7 +365,7 @@
|
||||
box-sizing: border-box;
|
||||
border-bottom: solid 1rpx #f8f8f8;
|
||||
background-color: #fff;
|
||||
padding: 0 0 $padding*0.8 0;
|
||||
padding: 0 0 $padding*0.8 50rpx;
|
||||
|
||||
.left,
|
||||
.right {
|
||||
@@ -368,18 +374,22 @@
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.left {
|
||||
font-size: $title-size-m;
|
||||
// font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
padding-top: 10rpx;
|
||||
color: #808080;
|
||||
|
||||
color: $text-price;
|
||||
.left-des{
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
span:nth-child(2) {
|
||||
color: #824F9A;
|
||||
font-size: $title-size-m;
|
||||
color: #C0C0C0;
|
||||
font-weight: normal;
|
||||
font-size: 26rpx;
|
||||
padding-top: $padding *0.5;
|
||||
}
|
||||
}
|
||||
@@ -387,12 +397,34 @@
|
||||
.right {
|
||||
font-size: $title-size-m;
|
||||
align-items: flex-end;
|
||||
color: #666;
|
||||
color: #999;
|
||||
|
||||
span:nth-child(1) {
|
||||
padding-bottom: $padding*0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.receiptCode {
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
.title {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 40rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.status {
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user