Browse Source

完成申购挖矿等

master
j1ack 3 years ago
parent
commit
6c267a44dd
  1. 1
      pages/home/index.vue
  2. 2
      pages/me/changeWithdrawalPassword.vue
  3. 16
      pages/me/donateRecord.vue
  4. 51
      pages/mine/mine.vue
  5. 83
      pages/mine/mineDetails.vue
  6. 90
      pages/mine/mineRecord.vue
  7. 157
      pages/subscription/details.vue
  8. 84
      pages/subscription/index.vue
  9. 5
      pages/withdrawal/withdrawal.vue
  10. 2
      pages/withdrawal/withdrawalRecord.vue
  11. 8
      utils/language/en_US.js

1
pages/home/index.vue

@ -152,7 +152,6 @@ Blame
this.baseURL = constant.BASE_URL this.baseURL = constant.BASE_URL
this.getbanner(); this.getbanner();
this.noticeList(); this.noticeList();
this.getContact()
}, },
onShow() { onShow() {
// //

2
pages/me/changeWithdrawalPassword.vue

@ -13,7 +13,7 @@
:placeholder="i18n.confirmPassword"> :placeholder="i18n.confirmPassword">
</u-input> </u-input>
<!-- 修改登录密码按钮 :disabled="disabled"--> <!-- 修改登录密码按钮 :disabled="disabled"-->
<u-button class="button" color="#00E8A2" throttleTime="500"> <u-button class="button" color="#00E8A2" throttleTime="500" @click="changePassword">
{{ i18n.Confirm }} {{ i18n.Confirm }}
</u-button> </u-button>
</view> </view>

16
pages/me/donateRecord.vue

@ -21,9 +21,11 @@
<script> <script>
import api from '@/utils/api' 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 {
@ -53,7 +55,7 @@ export default {
onLoad() { onLoad() {
this.getList() this.getList()
}, },
onShow() { }, onShow() {},
methods: { methods: {
getList() { getList() {
this.isLoadMore = true this.isLoadMore = true
@ -92,11 +94,11 @@ export default {
}) })
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.body { .body {
overflow: hidden; overflow: hidden;
@ -149,5 +151,5 @@ export default {
} }
} }
</style> </style>

51
pages/mine/mine.vue

@ -4,16 +4,19 @@
<navigation>{{ i18n.MinePool }}</navigation> <navigation>{{ i18n.MinePool }}</navigation>
<view class="poolContent"> <view class="poolContent">
<!-- pool选择框 --> <!-- pool选择框 -->
<view class="pool-item" v-for="(item, index) in 4" :key="index"> <view class="pool-item" v-for="(item, index) in mineCon.mineList" :key="index">
<u-icon class="icon" :name="'../../static/mine/img_mine01.png'" size="92rpx" width="92rpx"></u-icon> <u-icon class="icon" :name="mineCon.imgAddress+item.imgMobile" size="92rpx" width="92rpx"></u-icon>
<view class="right"> <view class="right">
<view class="title">0.1 BTC 30 days</view> <view class="title">{{item.name}}</view>
<view class="description">every time lock 0.1 BTC,Lock 30 Mine poolLock,to produce 300 ACTA per 1 <view class="description">{{item.remarks}}</view>
day</view>
</view> </view>
<u-button class="button" @click="gotoDetails(index)" color="#00E8A2" throttleTime="500">{{ i18n.OpenMine }}</u-button> <u-button class="button" @click="gotoDetails(item,index)" color="#00E8A2" throttleTime="500" :disabled="item.status!='open'">
{{ i18n.OpenMine }}</u-button>
</view> </view>
<u-empty :text="i18n.Dataisempty" mode="data" v-if="mineCon.mineList.length==0"></u-empty>
<u-loadmore :status="loadStatus" :loading-text="loadingText" :loadmore-text="loadmoreText"
:nomore-text="nomoreText" v-if="mineCon.mineList.length" height="80" />
</view> </view>
@ -22,16 +25,24 @@
</template> </template>
<script> <script>
export default { import api from '@/utils/api'
import constant from '@/utils/constant.js';
export default {
name: "mine", name: "mine",
data() { data() {
return { return {
mineCon:[],
pageState: 'coinRecharge', pageState: 'coinRecharge',
coin: '', coin: '',
USDTPopupShow: false, USDTPopupShow: false,
USDTRadioValue: '', USDTRadioValue: '',
selectNumberValue: 100, selectNumberValue: 100,
selectMethod: '1', selectMethod: '1',
isLoadMore: false, //
loadStatus: 'loadmore',
loadingText: this.$t("login").toload,
loadmoreText: this.$t("login").pullup,
nomoreText: this.$t("login").Nomore,
}; };
}, },
computed: { computed: {
@ -40,22 +51,30 @@ export default {
}, },
}, },
onLoad() { onLoad() {
this.getMine()
}, },
onShow() { }, onShow() {},
methods: { methods: {
gotoDetails(index) { //
console.log(index); getMine() {
this.isLoadMore = true
api.mineList().then(res => {
this.mineCon=res
this.loadStatus = 'nomore'
})
},
gotoDetails(item,index) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/mine/mineDetails?id=${index}` url: `/pages/mine/mineDetails?id=${item.id}&imgAddress=${this.mineCon.imgAddress}`
}); });
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.poolContent { .poolContent {
overflow: hidden; overflow: hidden;
@ -104,7 +123,7 @@ export default {
.button { .button {
height: 64rpx; height: 64rpx;
line-height:64rpx; line-height: 64rpx;
font-size: 28rpx; font-size: 28rpx;
color: #15141F !important; color: #15141F !important;
margin-top: 48rpx; margin-top: 48rpx;
@ -113,7 +132,7 @@ export default {
font-weight: 600; font-weight: 600;
} }
&:last-child{ &:last-child {
margin-bottom: 80rpx; margin-bottom: 80rpx;
} }
} }
@ -121,5 +140,5 @@ export default {
} }
} }
</style> </style>

83
pages/mine/mineDetails.vue

@ -1,41 +1,45 @@
<template> <template>
<view class="main"> <view class="main">
<!-- nav --> <!-- nav -->
<navigation>{{ i18n.MineDetails }}<view slot="right" class="right" @click="goto('mineRecord')">{{ i18n.Record }} <navigation>{{ i18n.MineDetails }}
<view slot="right" class="right" @click="goto('mineRecord')">{{ i18n.Record }}
</view> </view>
</navigation> </navigation>
<view class="content"> <view class="content">
<view class="card"> <view class="card">
<view class="top"> <view class="top">
<u-icon class="icon" :name="'../../static/mine/coinLogo.png'" size="80rpx" width="80rpx"></u-icon> <u-icon class="icon" :name="imgAddress+detail.mineDetails.imgMobile" size="80rpx" width="80rpx">
<view class="title">{{ i18n.YourBTC }}</view> </u-icon>
<view class="coinValue">{{ coinValue }}</view> <view class="title">{{ detail.mineDetails.name }}</view>
<view class="coinValue">{{ detail.userCapital }} <text
style="font-size: 26rpx;">{{detail.mineDetails.baseCoin}}</text> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="item"> <view class="item">
<view class="title">{{ i18n.LockBTC }}</view> <view class="title">{{ i18n.LockBTC }}</view>
<view class="value">0.1</view> <view class="value">{{ detail.mineDetails.limitMin }}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="title">{{ i18n.dayproduce }}</view> <view class="title">{{ i18n.dayproduce }}</view>
<view class="value">300 ACTA</view> <view class="value">{{ detail.mineDetails.price }} {{ detail.mineDetails.profitCoin }}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="title">{{ i18n.MinLockTime }}</view> <view class="title">{{ i18n.MinLockTime }}</view>
<view class="value">30{{ i18n.days }}</view> <view class="value">{{ detail.mineDetails.day}}{{ i18n.days }}</view>
</view> </view>
</view> </view>
</view> </view>
<input class="input" v-model="codeValue" focus :placeholder="i18n.invuteCode" <!-- <input class="input" v-model="info.inviteCode" focus :placeholder="i18n.invuteCode"
placeholder-style="color:#A1A0A8" /> placeholder-style="color:#A1A0A8" :disabled="detail.inviteCode" /> -->
<view class="allItem"> <view class="allItem">
<input class="input" v-model="coinQuantity" :placeholder="i18n.lockBTC" <input class="input" v-model="info.amount" :placeholder="i18n.lockBTC"
placeholder-style="color:#A1A0A8" /> placeholder-style="color:#A1A0A8" />
<view class="all">{{ i18n.ALL }}</view> <view class="all" @click="info.amount=detail.userCapital">{{ i18n.ALL }}</view>
</view> </view>
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="true">{{ i18n.LockBTCBtn }} <u-button class="button" color="#00E8A2" throttleTime="500" :disabled="lockBTCBtned" @click="Lock">
{{ i18n.LockBTCBtn }}
</u-button> </u-button>
</view> </view>
@ -44,25 +48,64 @@
</template> </template>
<script> <script>
import uniCopy from '@/utils/uni-copy' import uniCopy from '@/utils/uni-copy'
export default { import api from '@/utils/api'
import constant from '@/utils/constant.js';
export default {
name: "mineDetails", name: "mineDetails",
data() { data() {
return { return {
id:null,
info: {
productId: null,
amount: null,
// inviteCode: null,
},
coinValue: 1000.001, coinValue: 1000.001,
codeValue: '', codeValue: '',
coinQuantity: '', coinQuantity: '',
detail: {},
imgAddress: '',
}; };
}, },
computed: { computed: {
i18n() { i18n() {
return this.$t("mine"); return this.$t("mine");
}, },
lockBTCBtned() {
if (!this.info.amount && !this.info.amount) {
return true;
} else {
return false;
}
}
}, },
onLoad() { onLoad(res) {
this.id=res.id
this.getMineDetail(this.id)
this.imgAddress = res.imgAddress
}, },
onShow() { }, onShow() {},
methods: { methods: {
//
Lock() {
api.mineSubmit(this.info).then(res => {
uni.$u.toast(this.$t("login").Purchasesucceeded)
setTimeout(()=>{
this.getMineDetail(this.id)
},1200)
})
},
//
getMineDetail(id) {
api.showMineDetails({
mineId: id
}).then(res => {
this.detail = res
this.info.productId = this.detail.mineDetails.id
})
},
goto(page) { goto(page) {
// console.log(page); // console.log(page);
let url = ''; let url = '';
@ -106,11 +149,11 @@ export default {
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.right { .right {
position: absolute; position: absolute;
@ -148,7 +191,7 @@ export default {
.coinValue { .coinValue {
flex: 1; flex: 1;
text-align: right; text-align: right;
font-size: 68rpx; font-size: 48rpx;
line-height: 144rpx; line-height: 144rpx;
padding-right: 20rpx; padding-right: 20rpx;
} }
@ -229,5 +272,5 @@ export default {
} }
} }
} }
</style> </style>

90
pages/mine/mineRecord.vue

@ -2,37 +2,48 @@
<view class="main"> <view class="main">
<!-- nav --> <!-- nav -->
<navigation>{{ i18n.MinePool }}</navigation> <navigation>{{ i18n.MinePool }}</navigation>
<!-- 数据为空格显示 --> <u-empty :show="userInfoObj.length === 0" marginTop="350rpx" :text="i18n.NoData" textColor="#818197"
<u-empty :show="dataList.length === 0" marginTop="350rpx" :text="i18n.NoData" textColor="#818197"
textSize="36rpx" icon="../../static/mine/img_data.png"></u-empty> textSize="36rpx" icon="../../static/mine/img_data.png"></u-empty>
<!-- 列表 --> <!-- 列表 -->
<view class="content" v-if="dataList.length > 0"> <view class="content" v-if="userInfoObj.length > 0">
<view class="dataBody" v-for="(item, index) in 4" :key="index"> <view class="dataBody" v-for="(item, index) in userInfoObj" :key="index">
<key-value-row :keyName="i18n.BaseCoin" :value="'100BTC'"></key-value-row> <key-value-row :keyName="i18n.BaseCoin" :value="item.amount+item.baseCoin"></key-value-row>
<key-value-row :keyName="i18n.ProfitCoin" :value="'CEH'"></key-value-row> <key-value-row :keyName="i18n.ProfitCoin" :value="item.profitCoin"></key-value-row>
<key-value-row :keyName="i18n.DayRebate" :value="'75000'"></key-value-row> <key-value-row :keyName="i18n.DayRebate" :value="item.price"></key-value-row>
<u-divider text="" lineColor="#B9C1D9"></u-divider> <u-divider text="" lineColor="#B9C1D9"></u-divider>
<key-value-row :keyName="i18n.RebateDay" :value="'0/120'"></key-value-row> <key-value-row :keyName="i18n.RebateDay" :value="item.rebateDay+'/'+item.day"></key-value-row>
<key-value-row :keyName="i18n.RebateAmount" :value="'150000/9000000'"></key-value-row> <key-value-row :keyName="i18n.RebateAmount" :value="item.rebateAmount+'/'+item.deadAmount"></key-value-row>
<u-divider text="" lineColor="#B9C1D9"></u-divider> <u-divider text="" lineColor="#B9C1D9"></u-divider>
<key-value-row :keyName="i18n.AddTime" :value="'2022/08/06 14:50:34'"></key-value-row> <key-value-row :keyName="i18n.AddTime" :value="item.timestr"></key-value-row>
<key-value-row :keyName="i18n.ReleaseTime" :value="'2022/08/06 14:50:34'"></key-value-row> <key-value-row :keyName="i18n.ReleaseTime" :value="item.timestr2"></key-value-row>
</view> </view>
</view> </view>
<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 KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue'; import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import api from '@/utils/api'
import constant from '@/utils/constant.js';
export default { export default {
components: { KeyValueRow }, components: { KeyValueRow },
name: "mineRecord", name: "mineRecord",
data() { data() {
return { return {
dataList: [{}], form: {
pageNumber: 1,
pageSize: 20,
},
baseURL: '',
isLoadMore: false, //
loadStatus: 'loadmore',
loadingText: this.$t("login").toload,
loadmoreText: this.$t("login").pullup,
nomoreText: this.$t("login").Nomore,
userInfoObj: [],
}; };
}, },
computed: { computed: {
@ -40,11 +51,60 @@ export default {
return this.$t("mine"); return this.$t("mine");
}, },
}, },
onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getList();
}
},
onLoad() { onLoad() {
this.getList()
}, },
onShow() { }, onShow() { },
methods: { methods: {
getList() {
this.isLoadMore = true
api.mineRecord(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)
}
if (this.userInfoObj[i].releaseTime) {
this.userInfoObj[i].timestr2 = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].releaseTime)
}
}
} 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[i].releaseTime) {
this.userInfoObj[i].timestr2 = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].releaseTime)
}
}
}
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>

157
pages/subscription/details.vue

@ -7,36 +7,36 @@
<view class="countDown"> <view class="countDown">
<view class="item"> <view class="item">
<view class="title">{{ i18n.Days }}</view> <view class="title">{{ i18n.Days }}</view>
<view class="value">20</view> <view class="value">{{day}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="title">{{ i18n.Hours }}</view> <view class="title">{{ i18n.Hours }}</view>
<view class="value">8</view> <view class="value">{{hr}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="title">{{ i18n.Minutes }}</view> <view class="title">{{ i18n.Minutes }}</view>
<view class="value">47</view> <view class="value">{{min}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="title">{{ i18n.Seconds }}</view> <view class="title">{{ i18n.Seconds }}</view>
<view class="value">9</view> <view class="value">{{sec}}</view>
</view> </view>
</view> </view>
<!-- input --> <!-- input -->
<view class="input-item"> <view class="input-item">
<u-input class="input" v-model="SubscribeCount" color="#A1A0A8" fontSize="32rpx" border="none" <u-input class="input" v-model="SubscribeCount" color="#A1A0A8" fontSize="32rpx" border="none"
:placeholder="i18n.PleaseChooseCoin"> :placeholder="i18n.PleaseChooseCoin" @focus="SubscribeCount=''">
</u-input> </u-input>
<view class="selectCoin" @click="USDTPopupShow = true">USDT <view class="selectCoin" @click="USDTPopupShow = true">{{deinfo.sysCoinInfo.coinCode}}
</view> </view>
</view> </view>
<!-- total --> <!-- total -->
<key-value-row :keyName="i18n.Total" :value="'≈ 993.64069952 ACTA'" :size="'24rpx'" :leftColor="'#A1A0A8'" <key-value-row :keyName="i18n.Total" :value="'≈'+coinPirce+deinfo.coins[0].code" :size="'24rpx'"
:rightColor="'#A1A0A8'"></key-value-row> :leftColor="'#A1A0A8'" :rightColor="'#A1A0A8'"></key-value-row>
<!-- 按钮 --> <!-- 按钮 -->
<u-button class="button" color="#00E8A2" throttleTime="500">{{ <u-button class="button" color="#00E8A2" throttleTime="500" :disabled="SubscribeNowed" @click="subscribe">{{
i18n.SubscribeNow i18n.SubscribeNow
}} }}
</u-button> </u-button>
@ -44,37 +44,31 @@
<!-- ProjectDetails --> <!-- ProjectDetails -->
<view class="contentTitle"> <view class="contentTitle">
<view class="ProjectDetails">{{ i18n.ProjectDetails }}</view> <view class="ProjectDetails">{{ i18n.ProjectDetails }}</view>
<view class="videoBtn">{{ i18n.Video }}</view> <view class="videoBtn" @click="getContact('video')">{{ i18n.Video }}</view>
<view class="whiteBook">{{ i18n.WhiteBook }}</view> <view class="whiteBook" @click="getContact('book')">{{ i18n.WhiteBook }}</view>
</view> </view>
<!-- 文字内容 --> <!-- 文字内容 -->
<view class="content">Access to COVID-19 Tools Accelerator (ACTA) is a fully decentralized financial (DeFi) <view class="content">{{des}}</view>
ecosystem with blockchain as the underlying architecture, 100% decentralized exchange, 100% free
trading, 100% customized trading model, 100% cross-chain support. We have pre-customized two trading
models, ACTA/BTC and ACTA/USDT. ACTA/BTC is the mainstream currency with stable appreciation space;
ACTA/USDT is a stable settlement virtual currency which can be 1:1 freely convertible with US dollars.
ACTA is the leader of the global digital encryption currency decentralized market.
Full name of the token: Access to COVID-19 Tools Accelerator
ACTA total circulation: 1,200,000,000.00
ICO Price: 0.02 USDT
ICO Time: From December 12,2021 to March 12, 2022</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue'; import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
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'
import constant from '@/utils/constant.js';
export default {
name: "subscriptionDetails", name: "subscriptionDetails",
data() { data() {
return { return {
//
coinPirce: 0,
toLiveBtn: '',
_interval: null,
des: '',
SubscribeCount: 0, SubscribeCount: 0,
DonatePopupShow: false, DonatePopupShow: false,
USDTPopupShow: false, USDTPopupShow: false,
@ -82,28 +76,120 @@ export default {
coinInfo: {}, coinInfo: {},
rules: {}, rules: {},
radioValue: '', radioValue: '',
baseURL: '',
deinfo: {},
day: '',
hr: '',
min: '',
sec: '',
}; };
}, },
computed: { computed: {
i18n() { i18n() {
return this.$t("subscription"); return this.$t("subscription");
}, },
SubscribeNowed() {
if (this.SubscribeCount == 0 || !this.SubscribeCount || isNaN(this.SubscribeCount)) {
return true
} else {
return false
}
}
}, },
onLoad() { watch: {
SubscribeCount: {
handler(newName, oldName) {
this.SubscribeCount = newName
this.coinPirce = newName / this.deinfo.sysCoinInfo.initalPrice
this.coinPirce = parseFloat(this.coinPirce.toPrecision(10))
this.coinPirce = String(this.coinPirce)
this.coinPirce = this.coinPirce.substring(0, this.coinPirce.indexOf(".") + 9);
}
}
},
onLoad(res) {
this.baseURL = constant.BASE_URL
this.getDetail(res.id);
// console.log(this.$t('login.emailInputMessage')); // console.log(this.$t('login.emailInputMessage'));
}, },
onShow() { }, onShow() {},
methods: { methods: {
//
subscribe() {
api.exchangeCoin({
baseSymbol: this.deinfo.coins[0].code,
coinSymbol: this.deinfo.sysCoinInfo.coinCode,
baseAmount: this.SubscribeCount,
}).then(res => {
uni.$u.toast(this.$t("login").Successfulsubscription)
})
},
//
beforeDestroy() {
clearInterval(this._interval)
},
//
countdown(e) {
const that = this
that._interval = setInterval(() => {
if (e == 0) {
//
clearInterval(that._interval)
} else {
e--
let day = parseInt(e / 60 / 60 / 24)
let hr = parseInt(e / 60 / 60 % 24)
let min = parseInt(e / 60 % 60)
let sec = parseInt(e % 60)
this.day = day > 9 ? day : '0' + day
this.hr = hr > 9 ? hr : '0' + hr
this.min = min > 9 ? min : '0' + min
this.sec = sec > 9 ? sec : '0' + sec
that.toLiveBtn = `${this.day}${this.hr}${this.min}${this.sec}`
}
}, 1000);
},
radioChange(e) { radioChange(e) {
// console.log(e); // console.log(e);
},
// pdfe
getContact(e) {
let url;
if (e == 'video') {
url = this.deinfo.sysCoinInfo.videoWebsite
} else {
url = this.deinfo.sysCoinInfo.whitePaperWebsite
} }
// #ifdef APP-PLUS
plus.runtime.openURL(url);
// #endif
// #ifdef H5
window.location.href = url
// #endif
}, },
components: { UButton, KeyValueRow } //
} getDetail(e) {
api.subscription({
coinCode: e,
}).then(res => {
this.deinfo = res;
this.des = this.deinfo.sysCoinInfo.info
this.deinfo.lefttime=this.deinfo.lefttime/1000
this.countdown(this.deinfo.lefttime)
})
},
},
components: {
UButton,
KeyValueRow
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
.body { .body {
overflow: hidden; overflow: hidden;
@ -124,7 +210,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
.item { .item {
width: 140rpx; // width: 140rpx;
height: 174rpx; height: 174rpx;
font-weight: bold; font-weight: bold;
@ -247,6 +333,7 @@ export default {
font-size: 24rpx; font-size: 24rpx;
color: #A1A0A8; color: #A1A0A8;
margin-bottom: 48rpx; margin-bottom: 48rpx;
line-height: 40rpx;
} }
@ -254,5 +341,5 @@ export default {
} }
} }
</style> </style>

84
pages/subscription/index.vue

@ -14,16 +14,19 @@
</view> </view>
<!-- Product 产品列表 --> <!-- Product 产品列表 -->
<view class="cardList"> <view class="cardList">
<view class="card" v-for="(item, index) in 10" :key="index" @click="gotoDetails(index)"> <view class="card" v-for="(item, index) in info" :key="index" @click="gotoDetails(item,index)">
<!-- 卡片条件渲染 --> <!-- 卡片条件渲染 -->
<!-- product --> <!-- product -->
<card-header v-if="pageState === 'product'" :iconName="'../../static/maskets/bye.png'" <card-header v-if="pageState === 'product'" :iconName="baseURL+'/coins/'+item.coinCode+'.png'"
:title="'BTC(Bitcoin)'" :rightName="i18n.Subscribe" :hasBtn="true" :btnColor="'#00E8A2'"> :title="item.fullName"
:rightName="item.status=='open'?'Subscribe':item.status=='close'?'Ended':'Coming soon'"
:hasBtn="true" :btnColor="item.status=='open'?'#00E8A2':item.status=='close'?'#A1A0A8':'#F2FE8D'">
</card-header> </card-header>
<view class="dataBody" v-if="pageState === 'product'"> <view class="dataBody" v-if="pageState === 'product'">
<key-value-row :keyName="i18n.STLTotalCirculation" :value="'23989'"></key-value-row> <key-value-row :keyName="i18n.STLTotalCirculation" :value="item.issueAmount"></key-value-row>
<key-value-row :keyName="i18n.PrivateSalePrice" :value="'284145.61'"></key-value-row> <key-value-row :keyName="i18n.PrivateSalePrice" :value="item.initalPrice+item.coinCode">
<key-value-row :keyName="i18n.ICOTime" :value="'2022/08/06-2022/08/31'"></key-value-row> </key-value-row>
<key-value-row :keyName="i18n.ICOTime" :value="item.startDate"></key-value-row>
</view> </view>
@ -58,52 +61,87 @@
</view> </view>
</view> </view>
<u-empty :text="i18n.Dataisempty" mode="data" v-if="info.length==0"></u-empty>
<u-loadmore :status="loadStatus" :loading-text="loadingText" :loadmore-text="loadmoreText"
:nomore-text="nomoreText" v-if="info.length" height="80" />
<!-- tabBar --> <!-- tabBar -->
<tab-bar :selectActive="4"></tab-bar> <tab-bar :selectActive="4"></tab-bar>
</view> </view>
</template> </template>
<script> <script>
import CardHeader from '../../components/cardHeader/cardHeader.vue'; import CardHeader from '../../components/cardHeader/cardHeader.vue';
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue'; import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
export default { import api from '@/utils/api'
components: { KeyValueRow, CardHeader }, import constant from '@/utils/constant.js';
export default {
components: {
KeyValueRow,
CardHeader
},
name: 'subscription', name: 'subscription',
data() { data() {
return { return {
baseURL: '',
userInfoObj: [],
isLoadMore: false, //
loadStatus: 'loadmore',
loadingText: this.$t("login").toload,
loadmoreText: this.$t("login").pullup,
nomoreText: this.$t("login").Nomore,
info: [],
pageState: 'product', // pageState: 'product', //
form: {
pageNumber: 1,
pageSize: 20,
type: 'crypto',
},
} }
}, },
onLoad() { onLoad() {
}, },
onShow() { onShow() {
this.baseURL = constant.BASE_URL
}, this.getGoods();
onHide() {
}, },
onHide() {},
computed: { computed: {
i18n() { i18n() {
return this.$t('subscription') return this.$t('subscription')
} }
}, },
methods: { methods: {
gotoDetails(index) { getGoods() {
api.subscriptionList().then(res => {
this.info = res;
this.isLoadMore = true
this.loadStatus = 'nomore'
})
},
gotoDetails(i, index) {
if (this.pageState !== 'product') return if (this.pageState !== 'product') return
if (i.status == 'close') {
uni.$u.toast(this.$t("subscription").Subcompleted)
return;
}
if (i.status == 'unstart') {
uni.$u.toast(this.$t("subscription").Substarted)
return;
}
uni.navigateTo({ uni.navigateTo({
url: `/pages/subscription/details?id=${index}` url: `/pages/subscription/details?id=${i.coinCode}`
}); });
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { /deep/ .cardHeader .button {
width: 160rpx;
}
.main {
padding-bottom: 198rpx; // TabBar padding-bottom: 198rpx; // TabBar
.nav-head { .nav-head {
@ -160,5 +198,5 @@ export default {
} }
</style> </style>

5
pages/withdrawal/withdrawal.vue

@ -166,6 +166,7 @@
import api from '@/utils/api' import api from '@/utils/api'
import constant from '@/utils/constant.js'; import constant from '@/utils/constant.js';
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue'; import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import md5 from 'js-md5'
export default { export default {
components: { components: {
KeyValueRow KeyValueRow
@ -255,14 +256,14 @@
tranAmt: this.coinInfo.tranAmt, tranAmt: this.coinInfo.tranAmt,
addressId: this.coinInfo.addressId, addressId: this.coinInfo.addressId,
coinCode: this.coinInfo.coinCode2, coinCode: this.coinInfo.coinCode2,
payPassword: this.coinInfo.payPassword payPassword:md5(this.coinInfo.payPassword),
} }
}else{ }else{
info={ info={
type: this.coinInfo.type, type: this.coinInfo.type,
tranAmt: this.coinInfo.tranAmt, tranAmt: this.coinInfo.tranAmt,
addressId: this.coinInfo.addressId, addressId: this.coinInfo.addressId,
payPassword: this.coinInfo.payPassword payPassword:md5(this.coinInfo.payPassword),
} }
} }
api.withdraw(info).then(res => { api.withdraw(info).then(res => {

2
pages/withdrawal/withdrawalRecord.vue

@ -64,7 +64,7 @@
<view style="padding:20rpx 32rpx;"> <view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.USDTRate" :value="item.usdtRate"></key-value-row> <key-value-row :keyName="i18n.USDTRate" :value="item.usdtRate"></key-value-row>
<!-- --> <!-- -->
<key-value-row :keyName="i18n.USDT" :value="parseInt(item.channelAmount,16)"></key-value-row> <key-value-row :keyName="i18n.USDT" :value="item.usdt"></key-value-row>
</view> </view>
<view style="border-top: 2rpx solid #323045;padding:20rpx 32rpx;"> <view style="border-top: 2rpx solid #323045;padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.CardNo" :value="item.acctId"> <key-value-row :keyName="i18n.CardNo" :value="item.acctId">

8
utils/language/en_US.js

@ -10,6 +10,8 @@ export default {
}, },
// 登陆相关页面 // 登陆相关页面
login: { login: {
Purchasesucceeded:'Purchase succeeded',
Successfulsubscription:'Successful subscription',
Withdrawalsucceeded:'Withdrawal succeeded', Withdrawalsucceeded:'Withdrawal succeeded',
Deletesucceeded:'Delete succeeded', Deletesucceeded:'Delete succeeded',
Savesucceeded:'Saved successfully', Savesucceeded:'Saved successfully',
@ -194,11 +196,12 @@ export default {
//mine //mine
mine: { mine: {
Dataisempty:'Data is empty',
MinePool: 'Mine pool', MinePool: 'Mine pool',
OpenMine: 'Open mine', OpenMine: 'Open mine',
MineDetails: 'Mine details', MineDetails: 'Mine details',
Record: 'Record', Record: 'Record',
Dataisempty:'Data is empty',
YourBTC: 'Your BTC', YourBTC: 'Your BTC',
LockBTC: 'Lock BTC', LockBTC: 'Lock BTC',
dayproduce: '1 day produce', dayproduce: '1 day produce',
@ -303,6 +306,9 @@ export default {
// 申购页面相关 subscription // 申购页面相关 subscription
subscription: { subscription: {
Subcompleted:'Subscription has been completed',
Substarted:'Subscription has not started',
Dataisempty:'Data is empty',
// 公共 // 公共
Product: 'Product', Product: 'Product',
Pending: 'Pending', Pending: 'Pending',

Loading…
Cancel
Save