@ -5,52 +5,35 @@
< view class = "body" >
< view class = "titleBody" >
<!-- 海报 -- >
< u - -image class = "img" :showLoading ="true" src = "../../static/charity/Rectangle 2.pn g" width = "750rpx"
< u - -image class = "img" :showLoading ="true" :src ="baseURL+detail.charityDetails.im g" width = "750rpx"
height = "762rpx" > < / u - - i m a g e >
<!-- 文章标题 -- >
< view class = "title" > New Balance Raff Simons Bright < / view >
< view class = "title" > { { detail . charityDetails . title } } < / view >
< / view >
< view class = "contentBody" >
< view class = "about" > { { i18n . About } } < / view >
<!-- 文字内容 -- >
< view class = "content" > Minimum deposit amount : 10 USDT . Deposit less than the minimum amount will not be
posted
and cannot be returned
This address is your latest deposit address . When the system receives deposit , it will be
automatically
credited to the account 。 The transfer needs to be confirmed by the entire blockchain network . When it
reaches 10 network confirmations , your USDT will be automatically deposit into the account 。
Minimum deposit amount : 10 USDT . Deposit less than the minimum amount will not be posted and cannot
be
returned
This address is your latest deposit address . When the system receives deposit , it will be
automatically
credited to the account 。 The transfer needs to be confirmed by the entire blockchain network . When it
reaches 10 network confirmations , your USDT will be automatically deposit into the account 。 Minimum
deposit amount : 10 USDT . Deposit less than the minimum amount will not be posted and cannot be
returned
This address is your latest deposit address . When the < / view >
< view class = "content" v-html ="detail.charityDetails.content" > < / view >
<!-- 捐赠详情 -- >
< view class = "Participants" >
< view class = "title" > { { i18n . Participants } } < / view >
<!-- 进度条 -- >
< u -line -progress class = "progressbar" :showText ="false" :percentage ="50 " activeColor = "#00E8A2"
< u -line -progress class = "progressbar" :showText ="false" :percentage ="detail.charityDetails.percentage" activeColor = "#00E8A2"
height = "32rpx" >
< / u - l i n e - p r o g r e s s >
<!-- 百分比 -- >
< view class = "progress" > 50 % < / view >
< view class = "progress" > { { detail . charityDetails . percentage } } % < / view >
<!-- 捐赠用户头像 -- >
< view class = "userIconList" >
< u - -image v -for = " ( item , index ) in 10 " :key ="index" class = "userIcon" :showLoading ="true"
src = "../../static/charity/Ellipse 502.png " width = "64rpx" height = "64rpx" > < / u - - i m a g e >
< u - -image v -for = " ( item , index ) in detail.headerImgList " :key ="index" class = "userIcon" :showLoading ="true"
: src = "baseURL+item.headImgPath" width = "64rpx" height = "64rpx" > < / u - - i m a g e >
< / view >
< / view >
<!-- 按钮 -- >
< u -button class = "button" color = "#00E8A2" throttleTime = "500" @ click = "DonatePopupShow = true" > { {
i18n . DonateNow
} }
< u -button class = "button" color = "#00E8A2" throttleTime = "500" @ click = "DonatePopupShow = true" :disabled ="detail.charityDetails.status!='open'" >
{ { detail . charityDetails . status != 'open' ? i18n . Closeddonation : i18n . DonateNow } }
< / u - b u t t o n >
<!-- DonateNow按钮通知弹出层 -- >
@ -60,30 +43,30 @@
< view class = "close" @ click = "DonatePopupShow = false" > < / view >
< u - -form class = "form" :model ="coinInfo" :rules ="rules" ref = "form1" errorType = "toast" >
<!-- coin选择框 -- >
< u -form -item class = "input-item" prop = "verificatio nCode" ref = "item1" >
< u -input class = "input" v -model = " coinInfo.verificationCode " color = "#fff" fontSize = "32rpx"
border = "none" : placeholder = "i18n.PleaseChooseCoin" >
< u -form -item class = "input-item" prop = "coi nCode" ref = "item1" >
< u -input class = "input" color = "#fff" fontSize = "32rpx"
border = "none" : placeholder = "i18n.PleaseChooseCoin" : disabled = "true " >
< / u - i n p u t >
< view class = "selectCoinBtn" @ click = "USDTPopupShow = true" > USDT
< view class = "selectCoinBtn" @ click = "USDTPopupShow = true" > { { coinInfo . coinCode } }
< / view >
< / u - f o r m - i t e m >
< view class = "Available" > { { i18n . AvailableBlance } } : 0 USDT < / view >
< view class = "Available" > { { i18n . AvailableBlance } } : { { detail . userCapital } } { { " " } } { { detail . coins [ 0 ] . enname } } < / view >
<!-- 数量 -- >
< u -form -item class = "input-item" prop = "number " ref = "item1" >
< u -input class = "input" v -model = " coinInfo.number " color = "#fff" fontSize = "32rpx"
< u -form -item class = "input-item" prop = "amount " ref = "item1" >
< u -input class = "input" v -model = " coinInfo.amount " color = "#fff" fontSize = "32rpx"
border = "none" : placeholder = "i18n.Quantity" >
< / u - i n p u t >
< / u - f o r m - i t e m >
<!-- 密码 -- >
< u -form -item class = "input-item" prop = "password" ref = "item1" >
< u -input class = "input" v -model = " coinInfo.password " color = "#fff" fontSize = "32rpx"
< u -form -item class = "input-item" prop = "payP assword" ref = "item1" >
< u -input class = "input" v -model = " coinInfo.payP assword " color = "#fff" fontSize = "32rpx"
border = "none" : placeholder = "i18n.WithdrawalPassword" >
< / u - i n p u t >
< / u - f o r m - i t e m >
< / u - - f o r m >
< u -button class = "button" color = "#00E8A2" throttleTime = "500" :disabled ="DonatePopupDisabled"
@ click = "DonatePopupShow = false " > { { i18n . DonateNow } }
@ click = "donate" : throttleTime = "500 " > { { i18n . DonateNow } }
< / u - b u t t o n >
< / view >
< / u - p o p u p >
@ -96,17 +79,16 @@
< view class = "close" @ click = "USDTPopupShow = false" > < / view >
< scroll -view scroll -y = " true " style = "height: 580rpx;" scroll -with -animation = " true "
@ touchmove . stop . prevent = "" >
< radio -group class = "radioGroup" @change ="radioChange" v-model ="radioValue" >
< label class = "checkBox" v-for ="(item, index) in 40" :key ="index " >
< radio -group class = "radioGroup" v-model ="radioValue" >
< label class = "checkBox" v-for ="(item, index) in detail.coins" :key="index" @click="radioChange(item) " >
< view class = "icon" >
< u -icon name = "../../static/maskets/bye.png " size = "52rpx" width = "52rpx" > < / u - i c o n >
< u -icon :name ="baseURL+'/coins/'+item.enname+'.png' " size = "52rpx" width = "52rpx" > < / u - i c o n >
< / view >
< view class = "iconName" >
< view class = "top" > USDT < / view >
< view class = "bottom" > BTC < / view >
< view class = "top" > { { item . enname } } < / view >
< view class = "bottom" > { { item . useCapital } } { { " " } } { { item . code } } < / view >
< / view >
< radio color = "#00E8A2" shape = "square" > < / radio >
< radio color = "#00E8A2" shape = "square" :checked ="coinInfo.coinCode==item.enname" > < / radio >
< / label >
< / r a d i o - g r o u p >
@ -128,37 +110,95 @@
< script >
import UButton from '../../uview-ui/components/u-button/u-button'
import api from '@/utils/api'
import constant from '@/utils/constant.js' ;
import md5 from 'js-md5'
export default {
name : "charityDetails" ,
data ( ) {
return {
id : '' ,
baseURL : '' ,
DonatePopupShow : false ,
USDTPopupShow : false ,
DonatePopupDisabled : true ,
coinInfo : { } ,
rules : { } ,
coinInfo : {
amount : null ,
coinCode : null ,
payPassword : null ,
} ,
rules : {
} ,
radioValue : '' ,
detail : { } ,
} ;
} ,
computed : {
i18n ( ) {
return this . $t ( "charity" ) ;
} ,
DonatePopupDisabled ( ) {
if ( this . coinInfo . amount && this . coinInfo . coinCode && this . coinInfo . payPassword ) {
return false
} else {
return true
}
}
} ,
onLoad ( ) {
onLoad ( res ) {
this . baseURL = constant . BASE_URL
this . id = res . id
this . getDetail ( this . id )
/ / c o n s o l e . l o g ( t h i s . $ t ( ' l o g i n . e m a i l I n p u t M e s s a g e ' ) ) ;
} ,
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 ) {
/ / c o n s o l e . l o g ( 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 }
} ,
components : {
UButton
}
}
< / script >
< style lang = "scss" scoped >
/deep/ . u - input {
background : # 323045 ! important ;
}
. main {
. body {