vee 3 years ago
parent
commit
3f2215968e
  1. 9
      App.vue
  2. 2
      components/cardHeader/cardHeader.vue
  3. 3
      main.js
  4. 860
      pages/charity/details.vue
  5. 270
      pages/charity/index.vue
  6. 1087
      pages/home/index.vue
  7. 173
      pages/me/changeWithdrawalPassword.vue
  8. 64
      pages/me/donateRecord.vue
  9. 25
      pages/me/index.vue
  10. 265
      pages/me/notification.vue
  11. 159
      pages/me/notificationDetails.vue
  12. 686
      pages/me/transfer.vue
  13. 313
      pages/me/walletHistory.vue
  14. 333
      pages/withdrawal/addOrEditBankCard.vue
  15. 2
      utils/api.js
  16. 14
      utils/axios.js
  17. 2
      utils/index.js
  18. 13
      utils/language/en_US.js

9
App.vue

@ -1,4 +1,5 @@
<script> <script>
import api from '@/utils/api'
export default { export default {
// computed: { // computed: {
// i18n() { // i18n() {
@ -7,8 +8,12 @@ export default {
// }, // },
onLaunch: function () { onLaunch: function () {
console.log('App Launch') console.log('App Launch')
api.indexInfo().then(res => {
uni.setStorageSync('coinTypeInfo',res)
})
}, },
onShow: function () { onShow: function () {
console.log('App Show') console.log('App Show')
}, },
onHide: function () { onHide: function () {
@ -20,7 +25,9 @@ export default {
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import "uview-ui/index.scss"; @import "uview-ui/index.scss";
/deep/ .u-loadmore__content__text {
line-height: 50rpx !important;
}
/deep/body { /deep/body {
// max-width: 828rpx; // // max-width: 828rpx; //
// margin: auto !important; // margin: auto !important;

2
components/cardHeader/cardHeader.vue

@ -98,7 +98,7 @@ export default {
position: absolute; position: absolute;
right: 20rpx; right: 20rpx;
display: inline-block; display: inline-block;
width: 202rpx; // width: 202rpx;
height: 64rpx; height: 64rpx;
border-radius: 16rpx; border-radius: 16rpx;
line-height: 64rpx; line-height: 64rpx;

3
main.js

@ -5,7 +5,7 @@ import VueI18n from 'vue-i18n'
import axios from './utils/axios.js' import axios from './utils/axios.js'
import store from './store' import store from './store'
import index from './utils/index.js'
// 多国语言 // 多国语言
import EN from './utils/language/en_US.js' import EN from './utils/language/en_US.js'
import ZH from './utils/language/zh_TW.js' import ZH from './utils/language/zh_TW.js'
@ -34,6 +34,7 @@ const i18n = new VueI18n({
Vue.prototype.$store = store Vue.prototype.$store = store
Vue.prototype.$axios = axios Vue.prototype.$axios = axios
Vue.prototype.$index = index
Vue.prototype.$_i18n = i18n Vue.prototype.$_i18n = i18n
// #ifndef VUE3 // #ifndef VUE3

860
pages/charity/details.vue

@ -1,419 +1,459 @@
<template> <template>
<view class="main"> <view class="main">
<!-- nav --> <!-- nav -->
<navigation :bgTransparent=true>{{ i18n.CharityDetails }}</navigation> <navigation :bgTransparent=true>{{ i18n.CharityDetails }}</navigation>
<view class="body"> <view class="body">
<view class="titleBody"> <view class="titleBody">
<!-- 海报 --> <!-- 海报 -->
<u--image class="img" :showLoading="true" src="../../static/charity/Rectangle 2.png" width="750rpx" <u--image class="img" :showLoading="true" :src="baseURL+detail.charityDetails.img" width="750rpx"
height="762rpx"></u--image> height="762rpx"></u--image>
<!-- 文章标题 --> <!-- 文章标题 -->
<view class="title">New Balance Raff Simons Bright </view> <view class="title">{{detail.charityDetails.title}}</view>
</view> </view>
<view class="contentBody"> <view class="contentBody">
<view class="about">{{ i18n.About }}</view> <view class="about">{{ i18n.About }}</view>
<!-- 文字内容 --> <!-- 文字内容 -->
<view class="content">Minimum deposit amount: 10 USDT. Deposit less than the minimum amount will not be <view class="content" v-html="detail.charityDetails.content"></view>
posted <!-- 捐赠详情 -->
and cannot be returned <view class="Participants">
This address is your latest deposit address. When the system receives deposit, it will be <view class="title">{{ i18n.Participants }}</view>
automatically <!-- 进度条 -->
credited to the accountThe transfer needs to be confirmed by the entire blockchain network. When it <u-line-progress class="progressbar" :showText="false" :percentage="detail.charityDetails.percentage" activeColor="#00E8A2"
reaches 10 network confirmations, your USDT will be automatically deposit into the account height="32rpx">
Minimum deposit amount: 10 USDT. Deposit less than the minimum amount will not be posted and cannot </u-line-progress>
be <!-- 百分比 -->
returned <view class="progress">{{detail.charityDetails.percentage}}%</view>
This address is your latest deposit address. When the system receives deposit, it will be <!-- 捐赠用户头像 -->
automatically <view class="userIconList">
credited to the accountThe transfer needs to be confirmed by the entire blockchain network. When it <u--image v-for="(item, index) in detail.headerImgList" :key="index" class="userIcon" :showLoading="true"
reaches 10 network confirmations, your USDT will be automatically deposit into the accountMinimum :src="baseURL+item.headImgPath" width="64rpx" height="64rpx"></u--image>
deposit amount: 10 USDT. Deposit less than the minimum amount will not be posted and cannot be </view>
returned
This address is your latest deposit address. When the </view> </view>
<!-- 捐赠详情 --> <!-- 按钮 -->
<view class="Participants"> <u-button class="button" color="#00E8A2" throttleTime="500" @click="DonatePopupShow = true" :disabled="detail.charityDetails.status!='open'">
<view class="title">{{ i18n.Participants }}</view> {{detail.charityDetails.status!='open'?i18n.Closeddonation:i18n.DonateNow}}
<!-- 进度条 --> </u-button>
<u-line-progress class="progressbar" :showText="false" :percentage="50" activeColor="#00E8A2"
height="32rpx"> <!-- DonateNow按钮通知弹出层 -->
</u-line-progress> <u-popup class="DonatePopup" :show="DonatePopupShow" round="40rpx" mode="bottom"
<!-- 百分比 --> @close="DonatePopupShow = false" @open="DonatePopupShow = true" bgColor="#211F32">
<view class="progress">50%</view> <view class="content">
<!-- 捐赠用户头像 --> <view class="close" @click="DonatePopupShow = false"></view>
<view class="userIconList"> <u--form class="form" :model="coinInfo" :rules="rules" ref="form1" errorType="toast">
<u--image v-for="(item, index) in 10" :key="index" class="userIcon" :showLoading="true" <!-- coin选择框 -->
src="../../static/charity/Ellipse 502.png" width="64rpx" height="64rpx"></u--image> <u-form-item class="input-item" prop="coinCode" ref="item1">
</view> <u-input class="input" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.PleaseChooseCoin" :disabled="true">
</view> </u-input>
<!-- 按钮 --> <view class="selectCoinBtn" @click="USDTPopupShow = true">{{coinInfo.coinCode}}
<u-button class="button" color="#00E8A2" throttleTime="500" @click="DonatePopupShow = true">{{ </view>
i18n.DonateNow </u-form-item>
}} <view class="Available">{{ i18n.AvailableBlance }}:{{detail.userCapital}}{{" "}}{{detail.coins[0].enname}}</view>
</u-button> <!-- 数量 -->
<u-form-item class="input-item" prop="amount" ref="item1">
<!-- DonateNow按钮通知弹出层 --> <u-input class="input" v-model="coinInfo.amount" color="#fff" fontSize="32rpx"
<u-popup class="DonatePopup" :show="DonatePopupShow" round="40rpx" mode="bottom" border="none" :placeholder="i18n.Quantity">
@close="DonatePopupShow = false" @open="DonatePopupShow = true" bgColor="#211F32"> </u-input>
<view class="content"> </u-form-item>
<view class="close" @click="DonatePopupShow = false"></view> <!-- 密码 -->
<u--form class="form" :model="coinInfo" :rules="rules" ref="form1" errorType="toast"> <u-form-item class="input-item" prop="payPassword" ref="item1">
<!-- coin选择框 --> <u-input class="input" v-model="coinInfo.payPassword" color="#fff" fontSize="32rpx"
<u-form-item class="input-item" prop="verificationCode" ref="item1"> border="none" :placeholder="i18n.WithdrawalPassword">
<u-input class="input" v-model="coinInfo.verificationCode" color="#fff" fontSize="32rpx" </u-input>
border="none" :placeholder="i18n.PleaseChooseCoin"> </u-form-item>
</u-input>
<view class="selectCoinBtn" @click="USDTPopupShow = true">USDT </u--form>
</view> <u-button class="button" color="#00E8A2" throttleTime="500" :disabled="DonatePopupDisabled"
</u-form-item> @click="donate" :throttleTime="500">{{ i18n.DonateNow }}
<view class="Available">{{ i18n.AvailableBlance }}:0USDT</view> </u-button>
<!-- 数量 --> </view>
<u-form-item class="input-item" prop="number" ref="item1"> </u-popup>
<u-input class="input" v-model="coinInfo.number" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.Quantity"> <!-- USDT按钮通知弹出层 -->
</u-input>
</u-form-item> <u-popup class="USDTPopup" :show="USDTPopupShow" round="40rpx" mode="bottom"
<!-- 密码 --> @close="USDTPopupShow = false" @open="USDTPopupShow = true" bgColor="#211F32">
<u-form-item class="input-item" prop="password" ref="item1"> <view class="content">
<u-input class="input" v-model="coinInfo.password" color="#fff" fontSize="32rpx" <view class="close" @click="USDTPopupShow = false"></view>
border="none" :placeholder="i18n.WithdrawalPassword"> <scroll-view scroll-y="true" style="height: 580rpx;" scroll-with-animation="true"
</u-input> @touchmove.stop.prevent="">
</u-form-item> <radio-group class="radioGroup" v-model="radioValue">
<label class="checkBox" v-for="(item, index) in detail.coins" :key="index" @click="radioChange(item)">
</u--form> <view class="icon">
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="DonatePopupDisabled" <u-icon :name="baseURL+'/coins/'+item.enname+'.png'" size="52rpx" width="52rpx"></u-icon>
@click="DonatePopupShow = false">{{ i18n.DonateNow }} </view>
</u-button> <view class="iconName">
</view> <view class="top">{{item.enname}}</view>
</u-popup> <view class="bottom">{{item.useCapital}}{{" "}}{{item.code}}</view>
</view>
<!-- USDT按钮通知弹出层 --> <radio color="#00E8A2" shape="square" :checked="coinInfo.coinCode==item.enname"></radio>
</label>
<u-popup class="USDTPopup" :show="USDTPopupShow" round="40rpx" mode="bottom"
@close="USDTPopupShow = false" @open="USDTPopupShow = true" bgColor="#211F32"> </radio-group>
<view class="content"> </scroll-view>
<view class="close" @click="USDTPopupShow = false"></view>
<scroll-view scroll-y="true" style="height: 580rpx;" scroll-with-animation="true" <u-button class="button" color="#00E8A2" throttleTime="500" @click="USDTPopupShow = false">OK
@touchmove.stop.prevent=""> </u-button>
<radio-group class="radioGroup" @change="radioChange" v-model="radioValue"> </view>
<label class="checkBox" v-for="(item, index) in 40" :key="index"> </u-popup>
<view class="icon">
<u-icon name="../../static/maskets/bye.png" size="52rpx" width="52rpx"></u-icon>
</view> </view>
<view class="iconName">
<view class="top">USDT</view> </view>
<view class="bottom">BTC</view>
</view>
</view>
<radio color="#00E8A2" shape="square"></radio>
</label>
</radio-group>
</scroll-view>
<u-button class="button" color="#00E8A2" throttleTime="500" @click="USDTPopupShow = false">OK
</u-button>
</view>
</u-popup>
</view>
</view>
</view>
</template> </template>
<script> <script>
import UButton from '../../uview-ui/components/u-button/u-button' import UButton from '../../uview-ui/components/u-button/u-button'
export default { import api from '@/utils/api'
name: "charityDetails", import constant from '@/utils/constant.js';
data() { import md5 from 'js-md5'
return { export default {
DonatePopupShow: false, name: "charityDetails",
USDTPopupShow: false, data() {
DonatePopupDisabled: true, return {
coinInfo: {}, id:'',
rules: {}, baseURL:'',
radioValue: '', DonatePopupShow: false,
}; USDTPopupShow: false,
}, coinInfo: {
computed: { amount:null,
i18n() { coinCode:null,
return this.$t("charity"); payPassword:null,
}, },
}, rules: {
onLoad() {
// console.log(this.$t('login.emailInputMessage')); },
}, radioValue: '',
onShow() { }, detail:{},
methods: { };
radioChange(e) { },
// console.log(e); computed: {
} i18n() {
}, return this.$t("charity");
components: { UButton } },
} DonatePopupDisabled() {
if (this.coinInfo.amount && this.coinInfo.coinCode && this.coinInfo.payPassword) {
return false
} else {
return true
}
}
},
onLoad(res) {
this.baseURL = constant.BASE_URL
this.id=res.id
this.getDetail(this.id)
// console.log(this.$t('login.emailInputMessage'));
},
onShow() {},
methods: {
//
donate() {
if(this.coinInfo.amount>this.detail.userCapital){
uni.$u.toast(this.$t("login").Insufficient)
return;
}
let coinInfo = {
charityId:this.detail.charityDetails.id,
amount:this.coinInfo.amount,
coinCode:this.coinInfo.coinCode2,
payPassword:md5(this.coinInfo.payPassword),
}
api.charitySubmit(coinInfo).then(res => {
uni.$u.toast(this.$t("login").Donationsucceeded)
setTimeout(()=>{
this.getDetail(this.id)
this.DonatePopupShow = false
},600)
})
},
radioChange(e) {
this.coinInfo.coinCode=e.enname
this.coinInfo.coinCode2=e.code
},
getDetail(id) {
api.showCharityDetails({
charityId:id
}).then(res => {
this.detail=res;
this.coinInfo.coinCode=this.detail.coins[0].enname
this.coinInfo.coinCode2=this.detail.coins[0].code
})
},
},
components: {
UButton
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { /deep/ .u-input{
background: #323045 !important;
.body { }
overflow: hidden; .main {
.titleBody { .body {
position: relative; overflow: hidden;
height: 762rpx;
.titleBody {
.title { position: relative;
position: absolute; height: 762rpx;
bottom: 48rpx;
font-size: 40rpx; .title {
font-weight: 800; position: absolute;
z-index: 20; bottom: 48rpx;
margin: 0 48rpx; font-size: 40rpx;
} font-weight: 800;
} z-index: 20;
margin: 0 48rpx;
.contentBody { }
padding: 0 48rpx; }
.about { .contentBody {
margin: 32rpx 0; padding: 0 48rpx;
font-size: 32rpx;
color: #A2A0A8; .about {
} margin: 32rpx 0;
font-size: 32rpx;
.content { color: #A2A0A8;
font-size: 24rpx; }
color: #A1A0A8;
margin-bottom: 48rpx; .content {
} font-size: 24rpx;
color: #A1A0A8;
.Participants { margin-bottom: 48rpx;
background: #211F32; }
border-radius: 32rpx;
padding: 32rpx; .Participants {
background: #211F32;
.title { border-radius: 32rpx;
font-size: 28rpx; padding: 32rpx;
height: 40rpx;
line-height: 40rpx; .title {
margin-bottom: 20rpx; font-size: 28rpx;
color: #A1A0A8; height: 40rpx;
} line-height: 40rpx;
margin-bottom: 20rpx;
// .progressBody{ color: #A1A0A8;
.progressbar { }
vertical-align: top;
display: inline-block; // .progressBody{
width: 426rpx; .progressbar {
margin: 8rpx 0; vertical-align: top;
} display: inline-block;
width: 426rpx;
.progress { margin: 8rpx 0;
margin-left: 20rpx; }
display: inline-block;
width: 144rpx; .progress {
height: 48rpx; margin-left: 20rpx;
line-height: 48rpx; display: inline-block;
font-size: 32rpx; width: 144rpx;
} height: 48rpx;
line-height: 48rpx;
font-size: 32rpx;
.userIconList { }
height: 104rpx;
.userIcon { .userIconList {
overflow: hidden; height: 104rpx;
border-radius: 64rpx;
display: inline-block; .userIcon {
margin-left: -20rpx; overflow: hidden;
margin-top: 34rpx; border-radius: 64rpx;
display: inline-block;
&:first-child { margin-left: -20rpx;
margin-left: 0; margin-top: 34rpx;
}
&:first-child {
} margin-left: 0;
} }
}
} }
.button {
margin-top: 64rpx; }
margin-bottom: 120rpx;
height: 112rpx; .button {
line-height: 112rpx; margin-top: 64rpx;
border-radius: 32rpx; margin-bottom: 120rpx;
font-size: 32rpx; height: 112rpx;
color: #15141F !important; line-height: 112rpx;
} border-radius: 32rpx;
font-size: 32rpx;
.DonatePopup { color: #15141F !important;
.content { }
height: 844rpx;
.DonatePopup {
/deep/.u-button--disabled { .content {
background-color: #A1A0A8 !important; height: 844rpx;
border-color: #A1A0A8 !important;
} /deep/.u-button--disabled {
background-color: #A1A0A8 !important;
.close { border-color: #A1A0A8 !important;
margin: 48rpx 346rpx; }
width: 58rpx;
height: 20rpx; .close {
background-image: url(../../static/charity/Turn.png); margin: 48rpx 346rpx;
background-repeat: no-repeat; width: 58rpx;
background-size: 58rpx 20rpx; height: 20rpx;
} background-image: url(../../static/charity/Turn.png);
background-repeat: no-repeat;
.form { background-size: 58rpx 20rpx;
font-size: 32rpx; }
margin: 0 32rpx;
.form {
.Available { font-size: 32rpx;
height: 44rpx; margin: 0 32rpx;
margin: 32rpx 0;
font-size: 28rpx; .Available {
} height: 44rpx;
margin: 32rpx 0;
.input-item { font-size: 28rpx;
overflow: hidden; }
height: 124rpx;
line-height: 124rpx; .input-item {
background: #323045; overflow: hidden;
margin-bottom: 48rpx; height: 124rpx;
border-radius: 32rpx; line-height: 124rpx;
padding: 0 40rpx; background: #323045;
margin-bottom: 48rpx;
/deep/.u-form-item__body { border-radius: 32rpx;
padding: 0; padding: 0 40rpx;
}
/deep/.u-form-item__body {
.input { padding: 0;
height: 124rpx; }
}
.input {
.selectCoinBtn { height: 124rpx;
position: relative; }
width: 150rpx;
height: 54rpx; .selectCoinBtn {
right: 0rpx; position: relative;
line-height: 56rpx; width: 150rpx;
font-size: 36rpx; height: 54rpx;
padding: 0; right: 0rpx;
color: #fff; line-height: 56rpx;
font-size: 36rpx;
&::after { padding: 0;
display: block; color: #fff;
position: absolute;
content: ''; &::after {
background-image: url(../../static/charity/ic_ma_arrow_down.png); display: block;
background-repeat: no-repeat; position: absolute;
background-size: 32rpx; content: '';
width: 32rpx; background-image: url(../../static/charity/ic_ma_arrow_down.png);
height: 32rpx; background-repeat: no-repeat;
top: 12rpx; background-size: 32rpx;
right: 10rpx; width: 32rpx;
} height: 32rpx;
} top: 12rpx;
} right: 10rpx;
} }
}
.button { }
width: 654rpx; }
margin: 0 48rpx;
} .button {
width: 654rpx;
} margin: 0 48rpx;
}
}
}
.USDTPopup {
.content { }
height: 844rpx;
.USDTPopup {
.close { .content {
margin: 48rpx 346rpx; height: 844rpx;
width: 58rpx;
height: 20rpx; .close {
background-image: url(../../static/charity/Turn.png); margin: 48rpx 346rpx;
background-repeat: no-repeat; width: 58rpx;
background-size: 58rpx 20rpx; height: 20rpx;
} background-image: url(../../static/charity/Turn.png);
background-repeat: no-repeat;
.radioGroup { background-size: 58rpx 20rpx;
height: 580rpx; }
.checkBox { .radioGroup {
height: 84rpx; height: 580rpx;
width: 670rpx;
display: flex; .checkBox {
align-items: center; height: 84rpx;
margin: 0 40rpx 32rpx; width: 670rpx;
display: flex;
.icon { align-items: center;
width: 84rpx; margin: 0 40rpx 32rpx;
height: 84rpx;
border-radius: 20rpx; .icon {
overflow: hidden; width: 84rpx;
display: inline-block; height: 84rpx;
box-sizing: border-box; border-radius: 20rpx;
background: #323045; overflow: hidden;
padding: 16rpx; display: inline-block;
margin-right: 20rpx; box-sizing: border-box;
} background: #323045;
padding: 16rpx;
.iconName { margin-right: 20rpx;
width: 520rpx; }
.top { .iconName {
font-size: 32rpx; width: 520rpx;
color: #fff;
} .top {
font-size: 32rpx;
color: #fff;
.bottom { }
font-size: 24rpx;
color: #A1A0A8;
} .bottom {
font-size: 24rpx;
color: #A1A0A8;
} }
/deep/.uni-radio-input {
width: 48rpx; }
height: 48rpx;
border-radius: 16rpx; /deep/.uni-radio-input {
background: #323045; width: 48rpx;
} height: 48rpx;
border-radius: 16rpx;
/deep/.uni-radio-input-checked::before { background: #323045;
font-size: 36rpx; }
}
} /deep/.uni-radio-input-checked::before {
font-size: 36rpx;
} }
}
.button {
width: 654rpx; }
margin: 40rpx 48rpx;
} .button {
width: 654rpx;
} margin: 40rpx 48rpx;
}
}
} }
}
}
}
}
} }
</style> </style>

270
pages/charity/index.vue

@ -1,118 +1,168 @@
<template> <template>
<view class="main"> <view class="main">
<!-- 列表 --> <!-- 列表 -->
<view class="charityList"> <view class="charityList">
<view class="item" v-for="(item, index) in 10" :key="index" @click="goto(index)"> <view class="item" v-for="(item, index) in userInfoObj" :key="index" @click="goto(item.id)">
<u--image class="img" :showLoading="true" src="../../static/charity/Rectangle 2.png" width="318rpx" <u--image class="img" :showLoading="true" :src="baseURL+item.img" width="318rpx"
height="230rpx"></u--image> height="230rpx"></u--image>
<view class="title">New Balance Raff Simons Bright Bright </view> <view class="title">{{item.title}} </view>
<view class="target">Target: $1309348</view> <view class="target">Target: {{item.targetAmount}}{{" "}}{{coinTypeInfo.system_cropto_code}}</view>
<u-line-progress class="progressbar" :showText="(index * 10) > 18" :percentage="index * 10" <u-line-progress class="progressbar" :percentage="item.percentage"
activeColor="#00E8A2" height="22rpx"> activeColor="#00E8A2" height="22rpx">
</u-line-progress> </u-line-progress>
</view> </view>
</view> </view>
<!-- tabBar --> <u-empty :text="i18n.Dataisempty" mode="data" v-if="userInfoObj.length==0"></u-empty>
<tab-bar :selectActive="3"></tab-bar> <u-loadmore :status="loadStatus" :loading-text="loadingText" :loadmore-text="loadmoreText"
</view> :nomore-text="nomoreText" v-if="userInfoObj.length" height="80" />
<!-- tabBar -->
<tab-bar :selectActive="3"></tab-bar>
</view>
</template> </template>
<script> <script>
export default { import api from '@/utils/api'
name: 'charity', import constant from '@/utils/constant.js';
data() { export default {
return { name: 'charity',
data() {
} return {
}, isLoadMore: false, //
onLoad() { loadStatus: 'loadmore',
loadingText: this.$t("login").toload,
}, loadmoreText: this.$t("login").pullup,
onShow() { nomoreText: this.$t("login").Nomore,
form: {
}, pageNumber: 1,
onHide() { pageSize: 20,
}, ways: 'exchange',
computed: { },
i18n() { userInfoObj: [],
return this.$t('markets') baseURL:'',
} }
}, },
methods: { onLoad() {
goto(index) { this.baseURL = constant.BASE_URL
uni.navigateTo({ this.getList()
url: `/pages/charity/details?id=${index}` },
}); onShow() {
}
} },
} onHide() {},
onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getList();
}
},
computed: {
i18n() {
return this.$t('markets')
},
//
coinTypeInfo(){
return uni.getStorageSync('coinTypeInfo')
}
},
methods: {
//
getList() {
this.isLoadMore = true
api.charityList(this.form).then(res => {
if (res.charityList.content.length) {
if (this.form.pageNumber > 1) {
this.userInfoObj = this.userInfoObj.concat(res.charityList.content)
} else {
this.userInfoObj = res.charityList.content
}
if (this.userInfoObj.length >= Number(res.charityList.totalElements)) { //
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.isLoadMore = false
}
} else {
this.isLoadMore = true
this.loadStatus = 'nomore'
this.userInfoObj = []
}
this.$forceUpdate()
})
},
goto(index) {
uni.navigateTo({
url: `/pages/charity/details?id=${index}`
});
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
padding-bottom: 198rpx; // TabBar padding-bottom: 198rpx; // TabBar
.charityList { .charityList {
// width: 318rpx; // width: 318rpx;
margin: 120rpx 38rpx 0 40rpx; margin: 120rpx 38rpx 0 40rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
.item { .item {
position: relative; position: relative;
width: 318rpx; width: 318rpx;
height: 430rpx; height: 430rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #323045; background-color: #323045;
border-radius: 20rpx; border-radius: 20rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
/deep/.img { /deep/.img {
overflow: hidden; overflow: hidden;
border-radius: 20rpx; border-radius: 20rpx;
} }
.title { .title {
height: 72rpx; height: 72rpx;
line-height: 35rpx; line-height: 35rpx;
font-size: 32rpx; font-size: 32rpx;
margin: 24rpx 20rpx 12rpx; margin: 24rpx 20rpx 12rpx;
// ... // ...
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; // display: -webkit-box; //
word-wrap: break-word; word-wrap: break-word;
white-space: normal !important; white-space: normal !important;
-webkit-line-clamp: 2; // -webkit-line-clamp: 2; //
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.target { .target {
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
color: $mainColor; color: $mainColor;
font-size: 26rpx; font-size: 26rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.progressbar { .progressbar {
margin: 12rpx 20rpx 0; margin: 12rpx 20rpx 0;
/deep/.u-line-progress__text { /deep/.u-line-progress__text {
color: #000; color: #000;
font-size: 16rpx; font-size: 16rpx;
transform: scale(0.66) // 12px 8/12 =0.666 transform: scale(0.66) // 12px 8/12 =0.666
} }
} }
} }
} }
} }
</style> </style>

1087
pages/home/index.vue

File diff suppressed because it is too large

173
pages/me/changeWithdrawalPassword.vue

@ -1,78 +1,129 @@
<template> <template>
<view class="main"> <view class="main">
<!-- nav --> <!-- nav -->
<navigation>{{ i18n.ModifyWithdrawalPassword }}</navigation> <navigation>{{ i18n.ModifyWithdrawalPassword }}</navigation>
<view class="body"> <view class="body">
<u-input class="input" type="password" v-model="oldPassword" color="#A1A0A8" fontSize="28rpx" border="none" <u-input class="input" type="password" v-model="oldPassword" color="#A1A0A8" fontSize="28rpx" border="none"
:placeholder="i18n.PleaseEnterTheOldPassword"> :placeholder="i18n.PleaseEnterTheOldPassword">
</u-input> </u-input>
<u-input class="input" type="password" v-model="newPassword" color="#A1A0A8" fontSize="28rpx" border="none" <u-input class="input" type="password" v-model="password" color="#A1A0A8" fontSize="28rpx" border="none"
:placeholder="i18n.CreateNewPassword"> :placeholder="i18n.CreateNewPassword">
</u-input> </u-input>
<u-input class="input" type="password" v-model="confirmPassword" color="#A1A0A8" fontSize="28rpx" border="none"
<!-- 修改登录密码按钮 --> :placeholder="i18n.confirmPassword">
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="disabled"> </u-input>
{{ i18n.Confirm }} <!-- 修改登录密码按钮 :disabled="disabled"-->
</u-button> <u-button class="button" color="#00E8A2" throttleTime="500">
</view> {{ i18n.Confirm }}
</view> </u-button>
</view>
</view>
</template> </template>
<script> <script>
export default { import api from '@/utils/api'
name: "changeWithdrawalPassword", import md5 from 'js-md5'
data() { export default {
return { name: "changeWithdrawalPassword",
oldPassword: '', data() {
newPassword: '', return {
disabled: true, oldPassword: '',
}; password: '',
}, confirmPassword: '',
computed: {
i18n() { disabled: true,
return this.$t("me"); //
}, isCanPassword: false,
}, };
onLoad() { },
}, computed: {
onShow() { }, i18n() {
methods: { return this.$t("me");
},
},
watch: {
'password': {
handler(newValue) {
const numberReg = /^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])[A-Za-z0-9 _]{6,20}$/
this.isCanPassword = numberReg.test(newValue)
}
},
},
onLoad() {},
onShow() {},
methods: {
//
changePassword() {
if (!this.password) {
uni.$u.toast(this.$t("login").passwordInputMessage)
return
}
if (!this.isCanPassword) {
let message = this.$t("login").passwordRule
uni.$u.toast(message)
return
}
//
if (this.password !== this.confirmPassword) {
uni.$u.toast(this.$t("login").passwordConfirm)
return
}
if (!this.oldPassword) {
uni.$u.toast(this.$t("login").PleaseEnterTheOldPassword)
return
}
let userInfo = {
oldPassword: md5(this.oldPassword),
password: md5(this.password),
confirmPassword: md5(this.confirmPassword),
}
api.updatePayPassword(userInfo).then(res => {
setTimeout(() => {
uni.showToast({
title: this.$t("me").ModifiedSuccessfully
})
}, 600)
uni.navigateBack({})
})
}, },
} },
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.body { .body {
overflow: hidden; overflow: hidden;
margin-top: 200rpx; margin-top: 200rpx;
padding: 0 64rpx; padding: 0 64rpx;
.input { .input {
height: 112rpx; height: 112rpx;
line-height: 112rpx; line-height: 112rpx;
background: #211F32; background: #211F32;
margin: 32rpx 0; margin: 32rpx 0;
border-radius: 32rpx; border-radius: 32rpx;
padding-left: 32rpx !important; padding-left: 32rpx !important;
} }
.button { .button {
position: relative; position: relative;
height: 112rpx; height: 112rpx;
margin-top: 680rpx; margin-top: 680rpx;
border-radius: 32rpx; border-radius: 32rpx;
font-weight: 600; font-weight: 600;
color: #15141F !important; color: #15141F !important;
font-size: 32rpx !important; font-size: 32rpx !important;
} }
} }
} }
</style> </style>

64
pages/me/donateRecord.vue

@ -3,26 +3,40 @@
<!-- nav --> <!-- nav -->
<navigation>{{ i18n.DonateRecord }}</navigation> <navigation>{{ i18n.DonateRecord }}</navigation>
<view class="body"> <view class="body">
<view class="card" v-for="(item, index) in 4" :key="index"> <view class="card" v-for="(item, index) in userInfoObj" :key="index">
<u-icon class="icon" :name="'../../static/me/img_donate.png'" size="64rpx" width="64rpx"></u-icon> <u-icon class="icon" :name="'../../static/me/img_donate.png'" size="64rpx" width="64rpx"></u-icon>
<view class="content"> <view class="content">
<key-value-row class="title" :keyName="'Donate Title'" :value="'200.00'" :leftColor="'#fff'" <key-value-row class="title" :keyName="item.title" :value="item.amount" :leftColor="'#fff'"
:rightColor="'#F2FE8D'"> :rightColor="'#F2FE8D'">
</key-value-row> </key-value-row>
<view class="date">2022/08/06 14:50:34</view> <view class="date">{{item.timestr}}</view>
</view> </view>
</view> </view>
</view> </view>
<u-empty :text="i18n.Dataisempty" mode="data" v-if="userInfoObj.length==0"></u-empty>
<u-loadmore :status="loadStatus" :loading-text="loadingText" :loadmore-text="loadmoreText"
:nomore-text="nomoreText" v-if="userInfoObj.length" height="80" />
</view> </view>
</template> </template>
<script> <script>
import api from '@/utils/api'
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue'; import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
export default { export default {
components: { KeyValueRow }, components: { KeyValueRow },
name: "donateRecord", name: "donateRecord",
data() { data() {
return { return {
isLoadMore: false, //
loadStatus: 'loadmore',
loadingText: this.$t("login").toload,
loadmoreText: this.$t("login").pullup,
nomoreText: this.$t("login").Nomore,
form: {
pageNumber: 1,
pageSize: 20,
},
userInfoObj: [],
}; };
}, },
computed: { computed: {
@ -30,11 +44,53 @@ export default {
return this.$t("me"); return this.$t("me");
}, },
}, },
onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getList();
}
},
onLoad() { onLoad() {
this.getList()
}, },
onShow() { }, onShow() { },
methods: { methods: {
getList() {
this.isLoadMore = true
api.charityRecord(this.form).then(res => {
if (res.content.length) {
if (this.form.pageNumber > 1) {
this.userInfoObj = this.userInfoObj.concat(res.content)
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
} else {
this.userInfoObj = res.content
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
}
if (this.userInfoObj.length >= Number(res.totalElements)) { //
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.isLoadMore = false
}
} else {
this.isLoadMore = true
this.loadStatus = 'nomore'
this.userInfoObj = []
}
this.$forceUpdate()
})
},
}, },
} }
</script> </script>

25
pages/me/index.vue

@ -3,7 +3,7 @@
<view class="contentBody"> <view class="contentBody">
<!-- 用户头像和id --> <!-- 用户头像和id -->
<view class="userInfo"> <view class="userInfo">
<u-image class="headImg" src="../../static/me/Ellipse 85.png" width="160rpx" height="160rpx" <u-image class="headImg" :src="baseURL+userInfo.headImg" width="160rpx" height="160rpx"
radius="160rpx"></u-image> radius="160rpx"></u-image>
<view class="idAndAccount"> <view class="idAndAccount">
<view class="id">ID:{{userInfo.uid}}</view> <view class="id">ID:{{userInfo.uid}}</view>
@ -32,17 +32,17 @@
<view class="balanceRow"> <view class="balanceRow">
<!-- 可用余额 --> <!-- 可用余额 -->
<view class="item"> <view class="item">
<view class="number">{{userInfoBalance.balance || 0 }}</view> <view class="number">{{userInfoBalance.balance || 0 }} <text style="font-size: 10rpx;">{{coinTypeInfo.system_cropto_code}}</text> </view>
<view class="title">{{ i18n.Balance }}</view> <view class="title">{{ i18n.Balance }}</view>
</view> </view>
<!-- 质押余额 --> <!-- 质押余额 -->
<view class="item"> <view class="item">
<view class="number">{{userInfoBalance.pledge || 0 }}</view> <view class="number">{{userInfoBalance.pledge || 0 }} <text style="font-size: 10rpx;">{{coinTypeInfo.system_cropto_code}}</text></view>
<view class="title">{{ i18n.Pledge }}</view> <view class="title">{{ i18n.Pledge }}</view>
</view> </view>
<!-- 合约余额 --> <!-- 合约余额 -->
<view class="item"> <view class="item">
<view class="number">{{userInfoBalance.contract || 0 }}</view> <view class="number">{{userInfoBalance.contract || 0 }} <text style="font-size: 10rpx;">{{coinTypeInfo.system_cropto_code}}</text></view>
<view class="title">{{ i18n.Contarct }}</view> <view class="title">{{ i18n.Contarct }}</view>
</view> </view>
</view> </view>
@ -85,10 +85,12 @@
<script> <script>
import api from '@/utils/api' import api from '@/utils/api'
import constant from '@/utils/constant.js';
export default { export default {
name: 'me', name: 'me',
data() { data() {
return { return {
baseURL:'',
// 退 // 退
showLogOut: false, showLogOut: false,
// //
@ -98,11 +100,11 @@
} }
}, },
onLoad() { onLoad() {
this.baseURL=constant.BASE_URL
//
this.getUserInfo()
}, },
onShow() { onShow() {
//
this.getUserInfo()
// //
this.getUserInfoBalance(); this.getUserInfoBalance();
}, },
@ -110,6 +112,10 @@
computed: { computed: {
i18n() { i18n() {
return this.$t('me') return this.$t('me')
},
//
coinTypeInfo(){
return uni.getStorageSync('coinTypeInfo')
} }
}, },
methods: { methods: {
@ -327,8 +333,9 @@
.number { .number {
margin: 32rpx auto; margin: 32rpx auto;
font-size: 48rpx; font-size: 48rpx;
display: flex;
align-items: center;
justify-content: center;
} }

265
pages/me/notification.vue

@ -1,114 +1,167 @@
<template> <template>
<view class="main"> <view class="main">
<!-- nav --> <!-- nav -->
<navigation>{{ i18n.Notification }}</navigation> <navigation>{{ i18n.Notification }}</navigation>
<view class="body"> <view class="body">
<view class="userItem" v-for="(item, index) in 4" :key="index" @click="gotoDetails(index)"> <view class="userItem" v-for="(item, index) in userInfoObj" :key="index" @click="gotoDetails(item.id)">
<u-icon class="icon" :name="'../../static/home/ic_proclamation.png'" size="60rpx" width="60rpx"> <u-icon class="icon" :name="'../../static/home/ic_proclamation.png'" size="60rpx" width="60rpx">
</u-icon> </u-icon>
<view class="content"> <view class="content">
<view class="title">Please contact customer service on the top-left corner for identity verification <view class="title">{{item.title}}</view>
on your firstPlease contactservice on firstPlease contact customer service on the top-left <view class="date">{{ i18n.Release }}: {{item.timestr}}</view>
corner for identity Please contact customer service on the top-left corner for identity </view>
verification on your firstPlease contactservice on firstPlease contact customer service on the </view>
top-left corner for identity Please contact customer service on the top-left corner for identity </view>
verification on your firstPlease contactservice on firstPlease contact customer ser</view> <u-empty :text="i18n.Dataisempty" mode="data" v-if="userInfoObj.length==0"></u-empty>
<view class="date">{{ i18n.Release }}: 2022/08/06 14:51:34</view> <u-loadmore :status="loadStatus" :loading-text="loadingText" :loadmore-text="loadmoreText"
</view> :nomore-text="nomoreText" v-if="userInfoObj.length" height="80" />
</view> </view>
</view>
</view>
</template> </template>
<script> <script>
export default { import api from '@/utils/api'
name: "notification", export default {
data() { name: "notification",
return { data() {
}; return {
}, isLoadMore: false, //
computed: { loadStatus: 'loadmore',
i18n() { loadingText: this.$t("login").toload,
return this.$t("me"); loadmoreText: this.$t("login").pullup,
}, nomoreText: this.$t("login").Nomore,
}, form: {
onLoad() { pageNumber: 1,
}, pageSize: 20,
onShow() { }, },
methods: { userInfoObj: [],
gotoDetails(index) { };
console.log(index); },
uni.navigateTo({ computed: {
url: `/pages/me/notificationDetails?id=${index}` i18n() {
}); return this.$t("me");
} },
}, },
} onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getRecordList();
}
},
onLoad() {
this.getRecordList()
},
onShow() {},
methods: {
//
getRecordList() {
this.isLoadMore = true
api.notices(this.form).then(res => {
if (res.length) {
if (this.form.pageNumber > 1) {
this.userInfoObj = this.userInfoObj.concat(res)
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
} else {
this.userInfoObj = res
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
}
if (this.userInfoObj.length >= Number(res.length)) { //
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.isLoadMore = false
}
} else {
this.isLoadMore = true
this.loadStatus = 'nomore'
this.userInfoObj = []
}
this.$forceUpdate()
})
},
gotoDetails(index) {
uni.navigateTo({
url: `/pages/me/notificationDetails?id=${index}`
});
}
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.body { .body {
overflow: hidden; overflow: hidden;
margin-top: 200rpx; margin-top: 200rpx;
padding: 0 24rpx; padding: 0 24rpx;
.userItem { .userItem {
position: relative; position: relative;
background: #211F32; background: #211F32;
border-radius: 32rpx; border-radius: 32rpx;
display: flex; display: flex;
margin-top: 32rpx; margin-top: 32rpx;
height: 218rpx; height: 218rpx;
overflow: hidden; overflow: hidden;
box-sizing: border-box; box-sizing: border-box;
.icon { .icon {
height: 60rpx; height: 60rpx;
margin-left: 20rpx; margin-left: 20rpx;
margin-right: 12rpx; margin-right: 12rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.content { .content {
overflow: hidden; overflow: hidden;
margin-top: 20rpx; margin-top: 20rpx;
height: 218rpx; height: 218rpx;
.title { .title {
width: 574rpx; width: 574rpx;
height: 116rpx; height: 116rpx;
font-size: 28rpx; font-size: 28rpx;
padding-right: 36rpx; padding-right: 36rpx;
// ... // ...
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
word-wrap: break-word; word-wrap: break-word;
display: -webkit-box; // display: -webkit-box; //
white-space: normal !important; white-space: normal !important;
-webkit-line-clamp: 3; // -webkit-line-clamp: 3; //
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.date { .date {
width: 610rpx; width: 610rpx;
height: 64rpx; height: 64rpx;
line-height: 64rpx; line-height: 64rpx;
font-size: 28rpx; font-size: 28rpx;
color: #A1A0A8; color: #A1A0A8;
border-top: 1px solid #323045; border-top: 1px solid #323045;
margin-top: 16rpx; margin-top: 16rpx;
} }
} }
} }
} }
} }
</style> </style>

159
pages/me/notificationDetails.vue

@ -1,100 +1,103 @@
<template> <template>
<view class="main"> <view class="main">
<!-- nav --> <!-- nav -->
<navigation>{{ i18n.NotificationDetails }}</navigation> <navigation>{{ i18n.NotificationDetails }}</navigation>
<view class="body"> <view class="body">
<view class="userItem"> <view class="userItem">
<view class="content"> <view class="content">
<view class="title">Please contact customer service on the top-left corner for identity verification <view class="title">{{detail.title}}</view>
on your firstPlease contactservice on firstPlease contact customer service on the top-left <view class="article" v-html="detail.content"></view>
corner for identity Please contact customer service on </view>
<view class="article">Please contact customer service on the top-left corner for identity <view class="date">{{ i18n.Release }}: {{detail.timestr}}</view>
verification on your firstPlease contactservice on firstPlease contact customer service on the </view>
top-left corner for identity Please contact customer service on the top-left corner for identity </view>
verification on your firstPlease contactservice on firstPlease contact customer service on the </view>
top-left corner for identity Please contact customer service on the top-left corner for identity </view>
verification on your firstPlease contactservice on firstPlease contact customer ser</view>
<view class="date">{{ i18n.Release }}: 2022/08/06 14:51:34</view>
</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
export default { import api from '@/utils/api'
name: "notificationDetails", export default {
data() { name: "notificationDetails",
return { data() {
}; return {
}, detail:{},
computed: { };
i18n() { },
return this.$t("me"); computed: {
}, i18n() {
}, return this.$t("me");
onLoad() { },
}, },
onShow() { }, onLoad(res) {
methods: { this.getNoticeDetail(res.id)
},
}, onShow() {},
} methods: {
getNoticeDetail(id){
api.noticeDetail({
noticeId: id
}).then(res => {
this.detail=res
this.detail.timestr = this.$index.formatyymmddhhmmss(this.detail.addTime)
})
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.body { .body {
overflow: hidden; overflow: hidden;
margin-top: 200rpx; margin-top: 200rpx;
padding: 0 24rpx; padding: 0 24rpx;
.userItem { .userItem {
position: relative; position: relative;
background: #211F32; background: #211F32;
border-radius: 32rpx; border-radius: 32rpx;
margin-top: 20rpx; margin-top: 20rpx;
overflow: hidden; overflow: hidden;
box-sizing: border-box; box-sizing: border-box;
.content { .content {
overflow: hidden; overflow: hidden;
.title { .title {
width: 640rpx; width: 640rpx;
font-size: 28rpx; font-size: 28rpx;
padding: 20rpx 32rpx; padding: 20rpx 32rpx;
} }
.article { .article {
border-top: 2rpx solid #323045; border-top: 2rpx solid #323045;
padding: 20rpx 32rpx; padding: 20rpx 32rpx;
font-size: 28rpx; font-size: 28rpx;
color: #A1A0A8; color: #A1A0A8;
} }
.date { .date {
width: 610rpx; width: 610rpx;
height: 64rpx; height: 64rpx;
line-height: 64rpx; line-height: 64rpx;
font-size: 28rpx; font-size: 28rpx;
color: #A1A0A8; color: #A1A0A8;
border-top: 2rpx solid #323045; border-top: 2rpx solid #323045;
margin-top: 16rpx; margin-top: 16rpx;
padding: 0 32rpx; padding: 0 32rpx;
} }
} }
} }
} }
} }
</style> </style>

686
pages/me/transfer.vue

@ -1,355 +1,367 @@
<template> <template>
<view class="main"> <view class="main">
<!-- nav --> <!-- nav -->
<navigation>{{ i18n.WalletHistory }}</navigation> <navigation>{{ i18n.Transfer }}</navigation>
<view class="body"> <view class="body">
<view class="form"> <view class="form">
<!-- coin选择框 --> <!-- coin选择框 -->
<view class="text">{{ i18n.SelectCurrency }}</view> <view class="text">{{ i18n.SelectCurrency }}</view>
<view class="input-item"> <view class="input-item">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none" <u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.PleaseChooseCoin"> :placeholder="i18n.PleaseChooseCoin">
</u-input> </u-input>
<view class="downSelect" @click="USDTPopupShow = true"></view> <view class="downSelect" @click="USDTPopupShow = true"></view>
</view> </view>
<!-- form地址选择框 --> <!-- form地址选择框 -->
<view class="text">{{ i18n.From }}</view> <view class="text">{{ i18n.From }}</view>
<view class="input-item"> <view class="input-item">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none" <u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.OptionAccount"> :placeholder="i18n.OptionAccount">
</u-input> </u-input>
<view class="downSelect" @click="accountPopupShow = true"></view> <view class="downSelect" @click="accountPopupShow = true"></view>
</view> </view>
<!-- to地址选择框 --> <!-- to地址选择框 -->
<view class="text">{{ i18n.To }}</view> <view class="text">{{ i18n.To }}</view>
<view class="input-item"> <view class="input-item">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none" <u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.TradingAccount"> :placeholder="i18n.TradingAccount">
</u-input> </u-input>
<view class="downSelect" @click="accountPopupShow = true"></view> <view class="downSelect" @click="accountPopupShow = true"></view>
</view> </view>
<!-- 数量 --> <!-- 数量 -->
<view class="text">{{ i18n.TransferNumber }}</view> <view class="text">{{ i18n.TransferNumber }}</view>
<view class="input-item"> <view class="input-item">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none" <u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.PleaseEnterNumber"> :placeholder="i18n.PleaseEnterNumber">
</u-input> </u-input>
<view class="numberDownSelect">USDT <view class="all">{{i18n.ALL}}</view> <view class="numberDownSelect">USDT <view class="all">{{i18n.ALL}}</view>
</view> </view>
</view> </view>
<view class="Usable">{{ i18n.Usable }} <view class="number">560878.90000000</view> <view class="Usable">{{ i18n.Usable }}
</view> <view class="number">{{info.userCapital}}{{info.coinCode}}</view>
</view> </view>
</view>
<!-- 按钮 -->
<u-button class="transferButton" color="#00E8A2" throttleTime="500">{{ <!-- 按钮 -->
<u-button class="transferButton" color="#00E8A2" throttleTime="500">{{
i18n.Transfer i18n.Transfer
}}</u-button> }}</u-button>
<!-- USDT按钮通知弹出层 --> <!-- USDT按钮通知弹出层 -->
<u-popup class="USDTPopup" :show="USDTPopupShow" round="40rpx" mode="bottom" @close="USDTPopupShow = false" <u-popup class="USDTPopup" :show="USDTPopupShow" round="40rpx" mode="bottom" @close="USDTPopupShow = false"
@open="USDTPopupShow = true" bgColor="#211F32"> @open="USDTPopupShow = true" bgColor="#211F32">
<view class="content"> <view class="content">
<view class="close" @click="USDTPopupShow = false"></view> <view class="close" @click="USDTPopupShow = false"></view>
<scroll-view scroll-y="true" style="height: 432rpx;" scroll-with-animation="true" @touchmove.stop.prevent=""> <scroll-view scroll-y="true" style="height: 432rpx;" scroll-with-animation="true"
<radio-group class="radioGroup" @change="USDTRadioChange" v-model="USDTRadioValue"> @touchmove.stop.prevent="">
<label class="checkBox" v-for="(item, index) in 10" :key="index"> <radio-group class="radioGroup" @change="USDTRadioChange" v-model="USDTRadioValue">
<view class="icon"> <label class="checkBox" v-for="(item, index) in 10" :key="index">
<u-icon name="../../static/maskets/bye.png" size="52rpx" width="52rpx"></u-icon> <view class="icon">
</view> <u-icon name="../../static/maskets/bye.png" size="52rpx" width="52rpx"></u-icon>
<view class="iconName"> </view>
<view class="top">USDT</view> <view class="iconName">
<view class="bottom">BTC</view> <view class="top">USDT</view>
</view> <view class="bottom">BTC</view>
</view>
<radio color="#00E8A2" shape="square"></radio>
</label> <radio color="#00E8A2" shape="square"></radio>
</label>
</radio-group>
</scroll-view> </radio-group>
</scroll-view>
<u-button class="button" color="#00E8A2" throttleTime="500" @click="USDTPopupShow = false">OK
</u-button> <u-button class="button" color="#00E8A2" throttleTime="500" @click="USDTPopupShow = false">OK
</view> </u-button>
</u-popup> </view>
</u-popup>
<!-- account账户按钮通知弹出层 -->
<u-popup class="accountPopup" :show="accountPopupShow" round="40rpx" mode="bottom" <!-- account账户按钮通知弹出层 -->
@close="accountPopupShow = false" @open="accountPopupShow = true" bgColor="#211F32"> <u-popup class="accountPopup" :show="accountPopupShow" round="40rpx" mode="bottom"
<view class="content"> @close="accountPopupShow = false" @open="accountPopupShow = true" bgColor="#211F32">
<view class="close" @click="accountPopupShow = false"></view> <view class="content">
<scroll-view scroll-y="true" style="height: 200rpx;" scroll-with-animation="true" @touchmove.stop.prevent=""> <view class="close" @click="accountPopupShow = false"></view>
<radio-group class="radioGroup" @change="accountRadioChange" v-model="accountRadioValue"> <scroll-view scroll-y="true" style="height: 200rpx;" scroll-with-animation="true"
<label class="checkBox" v-for="(item, index) in 3" :key="index"> @touchmove.stop.prevent="">
<view class="name">Option account</view> <radio-group class="radioGroup" @change="accountRadioChange" v-model="accountRadioValue">
<radio color="#00E8A2" shape="square"></radio> <label class="checkBox" v-for="(item, index) in 3" :key="index">
</label> <view class="name">Option account</view>
<radio color="#00E8A2" shape="square"></radio>
</radio-group> </label>
</scroll-view>
</radio-group>
<u-button class="button" color="#00E8A2" throttleTime="500" @click="accountPopupShow = false">OK </scroll-view>
</u-button>
</view> <u-button class="button" color="#00E8A2" throttleTime="500" @click="accountPopupShow = false">OK
</u-popup> </u-button>
</view>
</view> </u-popup>
</view> </view>
</view>
</template> </template>
<script> <script>
export default { import api from '@/utils/api'
name: "transfer", export default {
data() { name: "transfer",
return { data() {
coin: '', return {
USDTPopupShow: false, info:{},
accountPopupShow: false, coin: '',
USDTRadioValue: '', USDTPopupShow: false,
accountRadioValue: '', accountPopupShow: false,
}; USDTRadioValue: '',
}, accountRadioValue: '',
computed: { };
i18n() { },
return this.$t("me"); computed: {
}, i18n() {
}, return this.$t("me");
onLoad() { },
}, },
onShow() { }, onLoad() {
methods: { this.getInfo()
USDTRadioChange(e) { },
console.log(e); onShow() {},
}, methods: {
accountRadioChange(e) { getInfo() {
console.log(e); api.getTransferConfig({}).then(res => {
} console.log(res)
this.info=res
}, })
} },
USDTRadioChange(e) {
console.log(e);
},
accountRadioChange(e) {
console.log(e);
}
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.body { .body {
.form { .form {
margin: 232rpx 32rpx 0; margin: 232rpx 32rpx 0;
background: #211F32; background: #211F32;
border-radius: 32rpx; border-radius: 32rpx;
padding: 0 32rpx; padding: 0 32rpx;
overflow: hidden; overflow: hidden;
.text { .text {
margin: 32rpx 0 20rpx; margin: 32rpx 0 20rpx;
font-size: 32rpx; font-size: 32rpx;
color: #A1A0A8; color: #A1A0A8;
} }
.input-item { .input-item {
position: relative; position: relative;
background: #323045; background: #323045;
border-radius: 32rpx; border-radius: 32rpx;
.input { .input {
width: 400rpx; width: 400rpx;
height: 112rpx; height: 112rpx;
padding-left: 40rpx !important; padding-left: 40rpx !important;
} }
.downSelect { .downSelect {
position: absolute; position: absolute;
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
top: 36rpx; top: 36rpx;
right: 32rpx; right: 32rpx;
background-image: url(../../static/me/ic_input_arrow_down.png); background-image: url(../../static/me/ic_input_arrow_down.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 32rpx; background-size: 32rpx;
} }
.numberDownSelect { .numberDownSelect {
position: absolute; position: absolute;
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
top: 36rpx; top: 36rpx;
right: 148rpx; right: 148rpx;
.all { .all {
padding-left: 16rpx; padding-left: 16rpx;
display: inline; display: inline;
font-size: 28rpx; font-size: 28rpx;
color: #00E8A2; color: #00E8A2;
} }
} }
} }
.Usable { .Usable {
margin: 32rpx 0; margin: 32rpx 0;
color: #FFFFFF; color: #FFFFFF;
font-size: 12px; font-size: 12px;
.number { .number {
display: inline; display: inline;
color: #00E8A2; color: #00E8A2;
} }
} }
} }
.transferButton { .transferButton {
box-sizing: border-box; box-sizing: border-box;
margin: 64rpx 32rpx; margin: 64rpx 32rpx;
width: 686rpx; width: 686rpx;
height: 112rpx; height: 112rpx;
line-height: 112rpx; line-height: 112rpx;
border-radius: 32rpx; border-radius: 32rpx;
font-size: 32rpx; font-size: 32rpx;
color: #15141F !important; color: #15141F !important;
} }
.USDTPopup { .USDTPopup {
.content { .content {
height: 730rpx; height: 730rpx;
.close { .close {
margin: 48rpx 346rpx; margin: 48rpx 346rpx;
width: 58rpx; width: 58rpx;
height: 20rpx; height: 20rpx;
background-image: url(../../static/charity/Turn.png); background-image: url(../../static/charity/Turn.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 58rpx 20rpx; background-size: 58rpx 20rpx;
} }
.radioGroup { .radioGroup {
height: 432rpx; height: 432rpx;
.checkBox { .checkBox {
height: 84rpx; height: 84rpx;
width: 670rpx; width: 670rpx;
display: flex; display: flex;
align-items: center; align-items: center;
margin: 0 40rpx 32rpx; margin: 0 40rpx 32rpx;
.icon { .icon {
width: 84rpx; width: 84rpx;
height: 84rpx; height: 84rpx;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
background: #323045; background: #323045;
padding: 16rpx; padding: 16rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
.iconName { .iconName {
width: 520rpx; width: 520rpx;
.top { .top {
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;
} }
.bottom { .bottom {
font-size: 24rpx; font-size: 24rpx;
color: #A1A0A8; color: #A1A0A8;
} }
} }
/deep/.uni-radio-input { /deep/.uni-radio-input {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #323045; background: #323045;
} }
/deep/.uni-radio-input-checked::before { /deep/.uni-radio-input-checked::before {
font-size: 36rpx; font-size: 36rpx;
} }
} }
} }
.button { .button {
width: 654rpx; width: 654rpx;
margin: 40rpx 48rpx; margin: 40rpx 48rpx;
border-radius: 32rpx; border-radius: 32rpx;
height: 112rpx; height: 112rpx;
line-height: 112rpx; line-height: 112rpx;
color: #15141F !important; color: #15141F !important;
} }
} }
} }
.accountPopup { .accountPopup {
.content { .content {
height: 484rpx; height: 484rpx;
.close { .close {
margin: 48rpx 346rpx; margin: 48rpx 346rpx;
width: 58rpx; width: 58rpx;
height: 20rpx; height: 20rpx;
background-image: url(../../static/charity/Turn.png); background-image: url(../../static/charity/Turn.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 58rpx 20rpx; background-size: 58rpx 20rpx;
} }
.radioGroup { .radioGroup {
height: 200rpx; height: 200rpx;
.checkBox { .checkBox {
height: 84rpx; height: 84rpx;
width: 670rpx; width: 670rpx;
display: flex; display: flex;
align-items: center; align-items: center;
margin: 0 40rpx 32rpx; margin: 0 40rpx 32rpx;
.name { .name {
width: 600rpx; width: 600rpx;
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;
} }
/deep/.uni-radio-input { /deep/.uni-radio-input {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #323045; background: #323045;
} }
/deep/.uni-radio-input-checked::before { /deep/.uni-radio-input-checked::before {
font-size: 36rpx; font-size: 36rpx;
} }
} }
} }
.button { .button {
width: 654rpx; width: 654rpx;
margin: 20rpx 48rpx; margin: 20rpx 48rpx;
border-radius: 32rpx; border-radius: 32rpx;
height: 112rpx; height: 112rpx;
line-height: 112rpx; line-height: 112rpx;
color: #15141F !important; color: #15141F !important;
} }
} }
} }
} }
} }
</style> </style>

313
pages/me/walletHistory.vue

@ -1,137 +1,192 @@
<template> <template>
<view class="main"> <view class="main">
<!-- nav --> <!-- nav -->
<navigation>{{ i18n.WalletHistory }}</navigation> <navigation>{{ i18n.WalletHistory }}</navigation>
<!-- headBtn --> <!-- headBtn -->
<view class="head"> <view class="head">
<view class="headItem" @click="pageState = 'balance'" :class="{ select: pageState === 'balance' }"> <view class="headItem" @click="getType('exchange')" :class="{ select: form.ways === 'exchange' }">
{{ i18n.Balance }} {{ i18n.Balance }}
</view> </view>
<view class="headItem" @click="pageState = 'contarct'" :class="{ select: pageState === 'contarct' }"> <view class="headItem" @click="getType('contract')" :class="{ select: form.ways === 'contract' }">
{{ i18n.Contarct }} {{ i18n.Contarct }}
</view> </view>
</view> </view>
<view class="cardList"> <view class="cardList">
<view class="card" v-for="(item, index) in 4" :key="index"> <view class="card" v-for="(item, index) in userInfoObj" :key="index">
<!-- 卡片条件渲染 --> <!-- 卡片条件渲染 -->
<!-- balance --> <!-- balance -->
<card-header v-if="pageState === 'balance'" <card-header v-if="form.ways === 'exchange'"
:iconName="`../../static/me/${(0 + +balanceTestValue) > 0 ? 'ic_wallet_add' : 'ic_wallet_minus'}.png`" :iconName="`../../static/me/${ item.isIncome=='yes' ? 'ic_wallet_add' : 'ic_wallet_minus'}.png`"
:title="'973430980989323445'" :rightName="balanceTestValue" :title="item.witId" :rightName="`${ item.isIncome=='yes' ? '+' : '-'}`+item.amount+' '+item.coinCode"
:fontColor="`${(0 + +balanceTestValue) > 0 ? '#00E8A2' : '#F4506A'}`"> :fontColor="`${item.isIncome=='yes'? '#00E8A2' : '#F4506A'}`">
</card-header> </card-header>
<view class="dataBody" v-if="pageState === 'balance'"> <view class="dataBody" v-if="form.ways === 'exchange'">
<key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:51'"></key-value-row> <key-value-row :keyName="i18n.Status" :value="item.status"></key-value-row>
<view class="text">Postscript : ontact customer service on the top-left corner for identity verific <key-value-row :keyName="i18n.Time" :value="item.addTimeStr"></key-value-row>
</view> <view class="text">Postscript : {{item.witType}}
</view> </view>
</view>
<!-- contarct -->
<card-header v-if="pageState === 'contarct'" <!-- contarct -->
:iconName="`../../static/me/${(0 + +contarctTestValue) > 0 ? 'ic_wallet_add' : 'ic_wallet_minus'}.png`" <card-header v-if="form.ways === 'contract'"
:title="'973430980989323445'" :rightName="contarctTestValue" :iconName="`../../static/me/${ item.isIncome=='yes' ? 'ic_wallet_add' : 'ic_wallet_minus'}.png`"
:fontColor="`${(0 + +contarctTestValue) > 0 ? '#00E8A2' : '#F4506A'}`"> :title="item.witId" :rightName="`${ item.isIncome=='yes' ? '+' : '-'}`+item.amount+item.coinCode"
</card-header> :fontColor="`${item.isIncome=='yes'? '#00E8A2' : '#F4506A'}`">
<view class="dataBody" v-if="pageState === 'contarct'"> </card-header>
<key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:51'"></key-value-row> <view class="dataBody" v-if="form.ways === 'contract'">
<view class="text">Postscript : ontact customer service on the top-left corner for identity verific <key-value-row :keyName="i18n.Status" :value="item.status"></key-value-row>
</view> <key-value-row :keyName="i18n.Time" :value="item.addTimeStr"></key-value-row>
</view> <view class="text">Postscript : {{item.witType}}
</view>
</view>
</view>
</view>
</view> </view>
</view>
<u-empty :text="i18n.Dataisempty" mode="data" v-if="userInfoObj.length==0"></u-empty>
<u-loadmore :status="loadStatus" :loading-text="loadingText" :loadmore-text="loadmoreText"
:nomore-text="nomoreText" v-if="userInfoObj.length" height="80" />
</view>
</template> </template>
<script> <script>
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue'; import api from '@/utils/api'
import CardHeader from '../../components/cardHeader/cardHeader.vue'; import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
export default { import CardHeader from '../../components/cardHeader/cardHeader.vue';
components: { KeyValueRow, CardHeader }, export default {
name: "walletHistory", components: {
data() { KeyValueRow,
return { CardHeader
pageState: 'balance', },
balanceTestValue: '+100', // name: "walletHistory",
contarctTestValue: '-100', data() {
}; return {
}, isLoadMore: false, //
computed: { loadStatus: 'loadmore',
i18n() { loadingText: this.$t("login").toload,
return this.$t("me"); loadmoreText: this.$t("login").pullup,
}, nomoreText: this.$t("login").Nomore,
}, form: {
onLoad() { pageNumber: 1,
}, pageSize: 20,
onShow() { }, ways: 'exchange',
methods: { },
userInfoObj: [],
};
}, },
} computed: {
i18n() {
return this.$t("me");
},
},
onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getRecordList();
}
},
onLoad() {
this.getRecordList();
},
onShow() {
},
methods: {
getType(type){
this.form.ways=type
this.getRecordList()
},
//
getRecordList() {
this.isLoadMore = true
api.billList(this.form).then(res => {
if (res.content.length) {
if (this.form.pageNumber > 1) {
this.userInfoObj = this.userInfoObj.concat(res.content)
} else {
this.userInfoObj = res.content
}
if (this.userInfoObj.length >= Number(res.count)) { //
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.isLoadMore = false
}
} else {
this.isLoadMore = true
this.loadStatus = 'nomore'
this.userInfoObj = []
}
this.$forceUpdate()
})
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main {
.head { .main {
margin-top: 200rpx;
margin-left: 60rpx; .head {
width: 632rpx; margin-top: 200rpx;
display: flex; margin-left: 60rpx;
justify-content: space-around; width: 632rpx;
align-items: center; display: flex;
padding: 48rpx 0; justify-content: space-around;
align-items: center;
.headItem { padding: 48rpx 0;
width: 300rpx;
height: 68rpx; .headItem {
line-height: 68rpx; width: 300rpx;
background: #211F32; height: 68rpx;
border-radius: 16rpx; line-height: 68rpx;
text-align: center; background: #211F32;
font-size: 32rpx; border-radius: 16rpx;
color: #A1A0A8; text-align: center;
font-size: 32rpx;
&.select { color: #A1A0A8;
background: #00E8A2;
color: #15141F; &.select {
} background: #00E8A2;
color: #15141F;
} }
}
}
.cardList { }
padding-bottom: 40rpx;
.cardList {
.card { padding-bottom: 40rpx;
overflow: hidden;
background: #211F32; .card {
border-radius: 32rpx; overflow: hidden;
margin: 0 32rpx 32rpx; background: #211F32;
border-radius: 32rpx;
margin: 0 32rpx 32rpx;
.dataBody {
box-sizing: border-box;
padding: 32rpx; .dataBody {
box-sizing: border-box;
.text { padding: 32rpx;
margin-top: 20rpx;
padding: 10rpx 16rpx; .text {
background: #323045; margin-top: 20rpx;
border-radius: 8rpx; padding: 10rpx 16rpx;
font-size: 24rpx; background: #323045;
color: #A1A0A8; border-radius: 8rpx;
} font-size: 24rpx;
} color: #A1A0A8;
}
} }
}
}
} }
}
</style> </style>

333
pages/withdrawal/addOrEditBankCard.vue

@ -1,138 +1,211 @@
<template> <template>
<view class="main"> <view class="main">
<!-- nav --> <!-- nav -->
<navigation>{{ pageState === 'addBank' ? i18n.AddBankInformation : i18n.EditBankInformation }}</navigation> <navigation>{{ pageState === 'addBank' ? i18n.AddBankInformation : i18n.EditBankInformation }}</navigation>
<view class="content"> <view class="content">
<view class="inputBody"> <u--form class="form" :model="bankInfo" :rules="rules" ref="uForm" errorType="toast">
<view class="title">{{ i18n.FirstName }}</view> <view class="inputBody">
<view class="input-item"> <view class="title">{{ i18n.FirstName }}</view>
<u-input class="input" v-model="name" color="#fff" fontSize="32rpx" border="none" <view class="input-item">
:placeholder="i18n.enterName"> <u-form-item class="input-item" prop="acctName" ref="item1">
</u-input> <u-input class="input" v-model="bankInfo.acctName" color="#fff" fontSize="32rpx"
</view> border="none" :placeholder="i18n.enterName">
<view class="title">{{ i18n.Account }}</view> </u-input>
<view class="input-item"> </u-form-item>
<u-input class="input" v-model="account" color="#fff" fontSize="32rpx" border="none" </view>
:placeholder="i18n.enterAccount"> <view class="title">{{ i18n.Account }}</view>
</u-input> <view class="input-item">
</view> <u-form-item class="input-item" prop="acctId" ref="item1">
</view> <u-input class="input" v-model="bankInfo.acctId" color="#fff" fontSize="32rpx" border="none"
<view class="inputBody"> :placeholder="i18n.enterAccount">
<view class="title">{{ i18n.BankName }}</view> </u-input>
<view class="input-item"> </u-form-item>
<u-input class="input" v-model="bankName" color="#fff" fontSize="32rpx" border="none" </view>
:placeholder="i18n.enterBankName"> </view>
</u-input> <view class="inputBody">
</view> <view class="title">{{ i18n.BankName }}</view>
<view class="title">{{ i18n.BankCode }}</view> <view class="input-item">
<view class="input-item"> <u-form-item class="input-item" prop="email" ref="item1">
<u-input class="input" type="password" v-model="bankCode" color="#fff" fontSize="32rpx" <u-input class="input" v-model="bankInfo.bankName" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.enterBankCode"> border="none" :placeholder="i18n.enterBankName">
</u-input> </u-input>
</view> </u-form-item>
</view> </view>
<view class="title">{{ i18n.BankCode }}</view>
<view class="input-item">
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="btnIsCanClick">{{ i18n.Confirm }} <u-form-item class="input-item" prop="bankCode" ref="item1">
</u-button> <u-input class="input" v-model="bankInfo.bankCode" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.enterBankCode">
</view> </u-input>
</u-form-item>
</view>
</view>
</u--form>
</view>
<u-button class="button" color="#00E8A2" :throttleTime="500" :disabled="btnIsCanClick" @click="bank">
{{ i18n.Confirm }}
</u-button>
</view>
</view>
</template> </template>
<script> <script>
export default { import api from '@/utils/api'
name: "withdrawalRecord", export default {
data() { name: "withdrawalRecord",
return { data() {
pageState: 'addBank', // , return {
name: '', rules: {
account: '', acctName: {
bankName: '', type: 'string',
bankCode: '', required: true,
}; message: this.$t('withdrawal').enterName,
}, trigger: ['blur', 'change'],
computed: { },
i18n() { bankName: {
return this.$t("withdrawal"); type: 'string',
}, required: true,
btnIsCanClick() { // message: this.$t('withdrawal').enterBankName,
if (this.name && this.account && this.bankName && this.bankCode) { trigger: ['blur', 'change']
return false; // },
} else { acctId: {
return true type: 'string',
} required: true,
} message: this.$t('withdrawal').enterAccount,
}, trigger: ['blur', 'change']
onLoad(option) { },
console.log(option); bankCode: {
this.pageState = option.mode || 'addBank'; type: 'string',
}, required: true,
onShow() { }, message: this.$t('withdrawal').enterBankCode,
methods: { trigger: ['blur', 'change']
change(e) { },
console.log(e); },
} bankInfo: {
bankCode: null,
}, bankName: null,
} acctName: null,
acctId: null,
},
pageState: 'addBank', // ,
};
},
computed: {
i18n() {
return this.$t("withdrawal");
},
btnIsCanClick() {
if (this.bankInfo.bankCode && this.bankInfo.bankName && this.bankInfo.acctName && this.bankInfo.acctId) {
return false
} else {
return true
}
}
},
onLoad(option) {
this.getBank()
},
onShow() {},
methods: {
//
getBank() {
api.bankCardInfo().then(res => {
this.bankInfo = res;
if (this.bankInfo.id) {
this.pageState = 'editBank' || 'addBank';
}
})
},
//
bank() {
this.$refs.uForm.validate().then(res => {
let bankInfo = {
bankCode: this.bankInfo.bankCode,
bankName: this.bankInfo.bankName,
acctName: this.bankInfo.acctName,
acctId: this.bankInfo.acctId,
}
if (this.bankInfo.id) {
bankInfo.id = this.bankInfo.id
}
api.bindBank(bankInfo).then(res => {
if (this.bankInfo.id) {
uni.$u.toast(this.$t("me").ModifiedSuccessfully)
} else {
uni.$u.toast(this.$t("me").addSuccessfully)
}
setTimeout(() => {
uni.navigateBack({})
}, 600)
})
}).catch(errors => {
console.log('err')
})
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { /deep/ .u-form-item__body {
padding: 0 0;
.content { }
margin-top: 200rpx;
padding: 32rpx; .main {
.inputBody { .content {
overflow: hidden; margin-top: 200rpx;
background: #211F32; padding: 32rpx;
border-radius: 32rpx;
padding: 32rpx; .inputBody {
margin-bottom: 32rpx; overflow: hidden;
background: #211F32;
.title { border-radius: 32rpx;
font-size: 32rpx; padding: 32rpx;
color: #A1A0A8; margin-bottom: 32rpx;
margin-bottom: 20rpx;
} .title {
font-size: 32rpx;
.input-item { color: #A1A0A8;
height: 112rpx; margin-bottom: 20rpx;
background: #323045; }
border-radius: 32rpx;
padding-left: 40rpx; .input-item {
margin-bottom: 20rpx; height: 112rpx;
background: #323045;
.input { border-radius: 32rpx;
height: 112rpx; padding-left: 40rpx;
} margin-bottom: 20rpx;
}
.input {
height: 112rpx;
}
} }
.button {
position: fixed; }
bottom: 40rpx;
width: 686rpx;
box-sizing: border-box; .button {
height: 112rpx; position: fixed;
background: #00E8A2; bottom: 40rpx;
border-radius: 32rpx; width: 686rpx;
font-weight: 700; box-sizing: border-box;
font-size: 32rpx; height: 112rpx;
color: #15141F !important; background: #00E8A2;
border-radius: 32rpx;
} font-weight: 700;
} font-size: 32rpx;
color: #15141F !important;
}
}
}
}
</style> </style>

2
utils/api.js

@ -67,7 +67,7 @@ const api = {
receivStepsAward: (params) => Vue.prototype.$axios.post('/api/steps/receivStepsAward',params),//领取奖励 receivStepsAward: (params) => Vue.prototype.$axios.post('/api/steps/receivStepsAward',params),//领取奖励
//--------------------------------- home --------------------------------- //--------------------------------- home ---------------------------------
indexInfo: () => Vue.prototype.$axios.get('/api/index/info'),//获取系统通用配置 indexInfo: () => Vue.prototype.$axios.post('/api/index/info'),//获取系统通用配置
indexLang: (params) => Vue.prototype.$axios.post('/api/index/lang',params),//切换语言 indexLang: (params) => Vue.prototype.$axios.post('/api/index/lang',params),//切换语言
customerService: (params) => Vue.prototype.$axios.post('/api/index/customerService',params),//获取客服联系方式 customerService: (params) => Vue.prototype.$axios.post('/api/index/customerService',params),//获取客服联系方式
sendEmailCode: (params) => Vue.prototype.$axios.post('/api/index/sendEmailCode',params),//发送邮箱验证码 sendEmailCode: (params) => Vue.prototype.$axios.post('/api/index/sendEmailCode',params),//发送邮箱验证码

14
utils/axios.js

@ -139,17 +139,19 @@ service.interceptors.response.use(res => {
// console.log(res.data) // console.log(res.data)
// console.log(res.data.data[0].nameAlias) // console.log(res.data.data[0].nameAlias)
if (res.success || res.errCode === 'USER.0017') { if (res.success || res.errCode === 'USER.0017') {
return res.data; return res.data;
} else { }
if(res.errMsg=='No customer service is online'&&res.errCode=='SYS.0012'){
return res;
}
else {
uni.showToast({ uni.showToast({
title: res.errMsg, title: res.errMsg,
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
if (res.errCode === 'USER.0010') { if (res.errCode === 'USER.0010') {
uni.setStorageSync('ticket',null);
uni.removeStorage({ uni.removeStorage({
key: 'logInfo', key: 'logInfo',
success: function(res) { success: function(res) {
@ -159,8 +161,6 @@ service.interceptors.response.use(res => {
}, },
fail: (err) => {} fail: (err) => {}
}); });
// #ifdef H5 // #ifdef H5
var url = location.href; var url = location.href;
if (url.indexOf('pages') > -1) { if (url.indexOf('pages') > -1) {
@ -175,8 +175,6 @@ service.interceptors.response.use(res => {
uni.removeStorageSync('url') uni.removeStorageSync('url')
} }
// #endif // #endif
} }
uni.$emit('refreshQrCode') uni.$emit('refreshQrCode')
return Promise.reject(res.errMsg); return Promise.reject(res.errMsg);

2
utils/index.js

@ -60,7 +60,7 @@ var utils = {
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
// return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s; // return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s; return Y + '/' + M + '/' + D + ' ' + h + ':' + m + ':' + s;
}, },
formathhmm: function(time) { formathhmm: function(time) {
var date = new Date(time) var date = new Date(time)

13
utils/language/en_US.js

@ -10,6 +10,11 @@ export default {
}, },
// 登陆相关页面 // 登陆相关页面
login: { login: {
Donationsucceeded:'Donation succeeded',
Insufficient:'Insufficient available balance',
pullup:'Gently pull up',
toload:'Trying to load',
Nomore:'No more',
// 公共字段 // 公共字段
Login: 'Login', Login: 'Login',
SignUp: 'Sign Up', SignUp: 'Sign Up',
@ -78,6 +83,7 @@ export default {
// 合约页面相关 // 合约页面相关
markets: { markets: {
// markets // markets
Dataisempty:'Data is empty',
TrandingPair: 'Tranding Pair', TrandingPair: 'Tranding Pair',
LatestPrice: 'Latest Price', LatestPrice: 'Latest Price',
RiseAndfall: '24H Rise and fall', RiseAndfall: '24H Rise and fall',
@ -139,6 +145,7 @@ export default {
CharityDetails: 'Charity Details', CharityDetails: 'Charity Details',
About: 'About', About: 'About',
Participants: 'Participants', Participants: 'Participants',
Closeddonation: 'Donation Closing',
DonateNow: 'Donate Now', DonateNow: 'Donate Now',
PleaseChooseCoin: 'Please choose coin', PleaseChooseCoin: 'Please choose coin',
AvailableBlance: 'Available blance', AvailableBlance: 'Available blance',
@ -214,7 +221,7 @@ export default {
DigitalCurrency: 'Digital currency', DigitalCurrency: 'Digital currency',
OnLine: 'On-line', OnLine: 'On-line',
PleaseChooseCoin: 'Please choose coin', PleaseChooseCoin: 'Please choose coin',
WithdrawAddress: 'Withdraw address', WithdrawAddress: 'Withdraw address',
Choose: 'Choose', Choose: 'Choose',
Quantity: 'Quantity', Quantity: 'Quantity',
@ -324,6 +331,7 @@ export default {
//me //me
me: { me: {
Dataisempty:'Data is empty',
isLogOut:'Are you sure you want to log out?', isLogOut:'Are you sure you want to log out?',
account: 'account', account: 'account',
Recharge: 'Recharge', Recharge: 'Recharge',
@ -363,6 +371,7 @@ export default {
ModifyWithdrawalPassword: 'Modify Withdrawal Password', ModifyWithdrawalPassword: 'Modify Withdrawal Password',
CreateNewPassword: 'Create new password', CreateNewPassword: 'Create new password',
ModifiedSuccessfully:'Modified successfully', ModifiedSuccessfully:'Modified successfully',
addSuccessfully:'Added successfully',
Fresh: 'Fresh', Fresh: 'Fresh',
Release: 'Release', Release: 'Release',
@ -371,7 +380,7 @@ export default {
DonateRecord: 'Donate record', DonateRecord: 'Donate record',
Time: 'Time', Time: 'Time',
Status:'Status',
SelectCurrency: 'Select currency', SelectCurrency: 'Select currency',
PleaseChooseCoin: 'Please choose coin', PleaseChooseCoin: 'Please choose coin',
From: 'From', From: 'From',

Loading…
Cancel
Save