Browse Source

合并提交

master
j1ack 3 years ago
parent
commit
24d5f83892
  1. 9
      App.vue
  2. 2
      components/cardHeader/cardHeader.vue
  3. 3
      main.js
  4. 152
      pages/charity/details.vue
  5. 76
      pages/charity/index.vue
  6. 163
      pages/home/index.vue
  7. 73
      pages/me/changeWithdrawalPassword.vue
  8. 62
      pages/me/donateRecord.vue
  9. 25
      pages/me/index.vue
  10. 81
      pages/me/notification.vue
  11. 39
      pages/me/notificationDetails.vue
  12. 30
      pages/me/transfer.vue
  13. 111
      pages/me/walletHistory.vue
  14. 123
      pages/withdrawal/addOrEditBankCard.vue
  15. 2
      utils/api.js
  16. 14
      utils/axios.js
  17. 2
      utils/index.js
  18. 11
      utils/language/en_US.js

9
App.vue

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

2
components/cardHeader/cardHeader.vue

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

3
main.js

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

152
pages/charity/details.vue

@ -5,52 +5,35 @@
<view class="body">
<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>
<!-- 文章标题 -->
<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 accountThe 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 accountThe transfer needs to be confirmed by the entire blockchain network. When it
reaches 10 network confirmations, your USDT will be automatically deposit into the accountMinimum
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-line-progress>
<!-- 百分比 -->
<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--image>
<u--image v-for="(item, index) in detail.headerImgList" :key="index" class="userIcon" :showLoading="true"
:src="baseURL+item.headImgPath" width="64rpx" height="64rpx"></u--image>
</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-button>
<!-- 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="verificationCode" 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="coinCode" ref="item1">
<u-input class="input" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.PleaseChooseCoin" :disabled="true">
</u-input>
<view class="selectCoinBtn" @click="USDTPopupShow = true">USDT
<view class="selectCoinBtn" @click="USDTPopupShow = true">{{coinInfo.coinCode}}
</view>
</u-form-item>
<view class="Available">{{ i18n.AvailableBlance }}:0USDT</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-input>
</u-form-item>
<!-- 密码 -->
<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="payPassword" ref="item1">
<u-input class="input" v-model="coinInfo.payPassword" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.WithdrawalPassword">
</u-input>
</u-form-item>
</u--form>
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="DonatePopupDisabled"
@click="DonatePopupShow = false">{{ i18n.DonateNow }}
@click="donate" :throttleTime="500">{{ i18n.DonateNow }}
</u-button>
</view>
</u-popup>
@ -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-icon>
<u-icon :name="baseURL+'/coins/'+item.enname+'.png'" size="52rpx" width="52rpx"></u-icon>
</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>
</radio-group>
@ -127,39 +109,97 @@
</template>
<script>
import UButton from '../../uview-ui/components/u-button/u-button'
export default {
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)
// console.log(this.$t('login.emailInputMessage'));
},
onShow() { },
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) {
// console.log(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>
.main {
/deep/ .u-input{
background: #323045 !important;
}
.main {
.body {
overflow: hidden;
@ -415,5 +455,5 @@ export default {
}
}
}
</style>

76
pages/charity/index.vue

@ -2,55 +2,105 @@
<view class="main">
<!-- 列表 -->
<view class="charityList">
<view class="item" v-for="(item, index) in 10" :key="index" @click="goto(index)">
<u--image class="img" :showLoading="true" src="../../static/charity/Rectangle 2.png" width="318rpx"
<view class="item" v-for="(item, index) in userInfoObj" :key="index" @click="goto(item.id)">
<u--image class="img" :showLoading="true" :src="baseURL+item.img" width="318rpx"
height="230rpx"></u--image>
<view class="title">New Balance Raff Simons Bright Bright </view>
<view class="target">Target: $1309348</view>
<u-line-progress class="progressbar" :showText="(index * 10) > 18" :percentage="index * 10"
<view class="title">{{item.title}} </view>
<view class="target">Target: {{item.targetAmount}}{{" "}}{{coinTypeInfo.system_cropto_code}}</view>
<u-line-progress class="progressbar" :percentage="item.percentage"
activeColor="#00E8A2" height="22rpx">
</u-line-progress>
</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" />
<!-- tabBar -->
<tab-bar :selectActive="3"></tab-bar>
</view>
</template>
<script>
export default {
import api from '@/utils/api'
import constant from '@/utils/constant.js';
export default {
name: 'charity',
data() {
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,
ways: 'exchange',
},
userInfoObj: [],
baseURL:'',
}
},
onLoad() {
this.baseURL = constant.BASE_URL
this.getList()
},
onShow() {
},
onHide() {
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>
<style lang="scss" scoped>
.main {
.main {
padding-bottom: 198rpx; // TabBar
.charityList {
@ -114,5 +164,5 @@ export default {
}
}
</style>

163
pages/home/index.vue

@ -1,4 +1,3 @@
原始文件
永久链接
Blame
@ -7,7 +6,7 @@ Blame
<view class="main">
<!-- nav -->
<view class="nav-head">
<u-button class="serviceButton" color="#323045">{{ i18n.customerService }}</u-button>
<u-button class="serviceButton" color="#323045" @click="getContact">{{ i18n.customerService }}</u-button>
<view class="languageBtn" @click.stop="languageShow = true">
{{ langTrue }}
</view>
@ -21,11 +20,11 @@ Blame
<u-swiper class="swiper" :list="swiperList" previousMargin="48rpx" nextMargin="80rpx" circular :autoplay="true"
radius="32rpx" bgColor="rgba(0,0,0,0)" height="360rpx"></u-swiper>
<!-- 消息 -->
<view class="message" @click="popupShow = true">
<view class="message">
<u-icon class="icon" name="../../static/home/ic_proclamation.png" size="60rpx" width="60rpx"></u-icon>
<!-- <view class="text">{{ i18n.homeMessage }}</view> -->
<u-notice-bar class="notice" :text="messageList" icon="" fontSize="24rpx" bgColor="#211F32" color="#fff"
direction="column">
direction="column" @click="go('/pages/me/notification')">
</u-notice-bar>
</view>
<!-- 三个按钮 -->
@ -69,16 +68,16 @@ Blame
<video class="video" v-show="videoShow" id="video" :enable-progress-gesture="false" autoplay="true"
:src="videoUrl" controls x5-video-player-type="h5-page" @fullscreenchange="ifStopVideo"></video>
<!-- 通知弹出层 -->
<u-popup class="popup" :show="popupShow" round="32rpx" mode="center" @close="popupShow = false"
<u-popup class="popup" v-if="popupShow" round="32rpx" mode="center" @close="popupShow = false"
@open="popupShow = true" bgColor="#211F32" :customStyle="{
margin: 'auto 102rpx auto 118rpx',
}">
<view class="content">
<scroll-view scroll-y="true" style="height: 288rpx;" scroll-with-animation="true"
<scroll-view scroll-y="true" style="max-height: 288rpx;" scroll-with-animation="true"
@touchmove.stop.prevent="">
{{ i18n.homeMessage }}
<view class="" v-html="contentFirst"></view>
</scroll-view>
<u-button class="button" color="#00E8A2" @click="popupShow = false">OK</u-button>
<u-button class="button" color="#00E8A2" @click="toRead" :throttleTime="500">OK</u-button>
</view>
</u-popup>
<!-- tabBar -->
@ -87,38 +86,42 @@ Blame
</template>
<script>
import languagePopups from '@/components/language-popups/language-popups.vue'
import languageData from '@/utils/language/config'
import api from '@/utils/api'
// echarts
// import * as echarts from 'echarts';
// let videoPlayerObj = {};
let videoPlayer;
let myChart;
export default {
import languagePopups from '@/components/language-popups/language-popups.vue'
import languageData from '@/utils/language/config'
import api from '@/utils/api'
import constant from '@/utils/constant.js';
// echarts
// import * as echarts from 'echarts';
// let videoPlayerObj = {};
let videoPlayer;
let myChart;
export default {
name: 'home',
components: { languagePopups },
components: {
languagePopups
},
data() {
return {
//
contentFirst:'',
//
noticeId:null,
//
notice: [],
//
noticeDetail: {},
baseURL: '',
languageShow: false,
langTrue: languageData[0].title || 'English',
languageData,
popupShow: false,
messageList: [
`Please contact customer service on the top-left corner for identity verification on your first Please contact customer service on the top-left corner for identity verification on your first...Please contact customer service on the top-left corner for identity verification on your first... `,
`Please contact customer service on the top-left corner for identity verification on your first Please contact customer service on the top-left corner for identity verification on your first...Please contact customer service on the top-left corner for identity verification on your first... `,
`Please contact customer service on the top-left corner for identity verification on your first Please contact customer service on the top-left corner for identity verification on your first...Please contact customer service on the top-left corner for identity verification on your first... `,
`Please contact customer service on the top-left corner for identity verification on your first Please contact customer service on the top-left corner for identity verification on your first...Please contact customer service on the top-left corner for identity verification on your first... `,
],
popupShow: true,
messageList: [],
swiperList: [
'https://cdn.uviewui.com/uview/swiper/swiper1.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
],
videoShow: false,
videoUrl: '',
videoList: [
{
videoList: [{
url: 'https://cdn.uviewui.com/uview/resources/video.mp4',
title: 'Video name 1',
poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png'
@ -141,13 +144,15 @@ export default {
],
option: null,
stepsNum: 5000, //
stepTarget: 10000,//
stepTarget: 10000, //
myChart: null,
}
},
onLoad() {
this.baseURL = constant.BASE_URL
this.getbanner();
this.noticeList();
this.getContact()
},
onShow() {
//
@ -163,7 +168,7 @@ export default {
if (uni.getStorageSync('langTrue')) {
this.langTrue = uni.getStorageSync('langTrue')
}
this.getbanner();
},
onHide() {
@ -175,9 +180,70 @@ export default {
}
},
methods: {
//
getContact(){
api.customerService({}).then(res => {
if(res.errCode=='SYS.0012'){
uni.$u.toast(res.errMsg);
}else{
// #ifdef APP-PLUS
plus.runtime.openURL(res.url);
// #endif
// #ifdef H5
window.location.href=res.url
// #endif
}
})
},
//
getNoReadNotice(){
for (var i = 0; i < this.notice.length; i++) {
if(this.notice[i].isRead=='no'){
this.contentFirst=this.notice[i].content
this.noticeId=this.notice[i].id
}
}
if(!this.noticeId){
this.popupShow=false
}
},
go(url){
uni.navigateTo({
url:url
})
},
toRead() {
api.noticeRead({
noticeId: this.noticeId
}).then(res => {
this.noticeId=null;
this.popupShow = false
this.getNoReadNotice()
console.log(res,'已经读了吗')
})
},
//
noticeList() {
api.noticeList({}).then(res => {
this.notice = res;
for (var i = 0; i < res.length; i++) {
this.messageList.push(res[i].title)
}
//
this.getNoReadNotice()
})
},
//
getbanner() {
const indexBanner = api.indexBanner({ 'mark': 'APP_INDEX' });
console.log(indexBanner)
api.indexBanner({
'mark': 'APP_INDEX'
}).then(res => {
for (var i = 0; i < res.length; i++) {
this.swiperList.push(this.baseURL + res[i].adImgPath)
}
})
},
//
laug() {
@ -219,7 +285,9 @@ export default {
playVideo(data) {
this.videoUrl = data.url;
this.videoShow = true;
videoPlayer.requestFullScreen({ direction: 0 })
videoPlayer.requestFullScreen({
direction: 0
})
},
/**
* 跳转
@ -296,8 +364,7 @@ export default {
},
data: [{
value: +this.stepsNum / this.stepTarget
,
value: +this.stepsNum / this.stepTarget,
name: '步数',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
@ -309,8 +376,7 @@ export default {
}, {
offset: 1,
color: '#0589FF'
}
]),
}]),
borderRadius: 800,
@ -334,8 +400,7 @@ export default {
// });
}
}
}
}
</script>
<script module="echarts" lang="renderjs">
@ -345,7 +410,7 @@ export default {
// this.initEcharts();
if (typeof window.echarts === 'object') {
this.initEcharts()
}else if (typeof window.echarts === 'function') {
} else if (typeof window.echarts === 'function') {
this.initEcharts()
} else {
//
@ -413,8 +478,7 @@ export default {
},
data: [{
value: +this.stepsNum / this.stepTarget
,
value: +this.stepsNum / this.stepTarget,
name: '步数',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
@ -426,8 +490,7 @@ export default {
}, {
offset: 1,
color: '#0589FF'
}
]),
}]),
borderRadius: 800,
}
},
@ -460,7 +523,7 @@ export default {
</script>
<style lang="scss" scoped>
.main {
.main {
padding-bottom: 198rpx; // TabBar
.nav-head {
@ -705,5 +768,5 @@ export default {
}
}
}
</style>

73
pages/me/changeWithdrawalPassword.vue

@ -6,12 +6,14 @@
<u-input class="input" type="password" v-model="oldPassword" color="#A1A0A8" fontSize="28rpx" border="none"
:placeholder="i18n.PleaseEnterTheOldPassword">
</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">
</u-input>
<!-- 修改登录密码按钮 -->
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="disabled">
<u-input class="input" type="password" v-model="confirmPassword" color="#A1A0A8" fontSize="28rpx" border="none"
:placeholder="i18n.confirmPassword">
</u-input>
<!-- 修改登录密码按钮 :disabled="disabled"-->
<u-button class="button" color="#00E8A2" throttleTime="500">
{{ i18n.Confirm }}
</u-button>
</view>
@ -19,13 +21,19 @@
</template>
<script>
export default {
import api from '@/utils/api'
import md5 from 'js-md5'
export default {
name: "changeWithdrawalPassword",
data() {
return {
oldPassword: '',
newPassword: '',
password: '',
confirmPassword: '',
disabled: true,
//
isCanPassword: false,
};
},
computed: {
@ -33,17 +41,60 @@ export default {
return this.$t("me");
},
},
onLoad() {
watch: {
'password': {
handler(newValue) {
const numberReg = /^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])[A-Za-z0-9 _]{6,20}$/
this.isCanPassword = numberReg.test(newValue)
}
},
},
onShow() { },
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>
<style lang="scss" scoped>
.main {
.main {
.body {
overflow: hidden;
@ -74,5 +125,5 @@ export default {
}
}
}
</style>

62
pages/me/donateRecord.vue

@ -3,26 +3,40 @@
<!-- nav -->
<navigation>{{ i18n.DonateRecord }}</navigation>
<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>
<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'">
</key-value-row>
<view class="date">2022/08/06 14:50:34</view>
<view class="date">{{item.timestr}}</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>
<script>
import api from '@/utils/api'
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
export default {
components: { KeyValueRow },
name: "donateRecord",
data() {
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: {
@ -30,11 +44,53 @@ export default {
return this.$t("me");
},
},
onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getList();
}
},
onLoad() {
this.getList()
},
onShow() { },
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>

25
pages/me/index.vue

@ -3,7 +3,7 @@
<view class="contentBody">
<!-- 用户头像和id -->
<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>
<view class="idAndAccount">
<view class="id">ID:{{userInfo.uid}}</view>
@ -32,17 +32,17 @@
<view class="balanceRow">
<!-- 可用余额 -->
<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>
<!-- 质押余额 -->
<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>
<!-- 合约余额 -->
<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>
</view>
@ -85,10 +85,12 @@
<script>
import api from '@/utils/api'
import constant from '@/utils/constant.js';
export default {
name: 'me',
data() {
return {
baseURL:'',
// 退
showLogOut: false,
//
@ -98,11 +100,11 @@
}
},
onLoad() {
},
onShow() {
this.baseURL=constant.BASE_URL
//
this.getUserInfo()
},
onShow() {
//
this.getUserInfoBalance();
},
@ -110,6 +112,10 @@
computed: {
i18n() {
return this.$t('me')
},
//
coinTypeInfo(){
return uni.getStorageSync('coinTypeInfo')
}
},
methods: {
@ -327,8 +333,9 @@
.number {
margin: 32rpx auto;
font-size: 48rpx;
display: flex;
align-items: center;
justify-content: center;
}

81
pages/me/notification.vue

@ -3,28 +3,37 @@
<!-- nav -->
<navigation>{{ i18n.Notification }}</navigation>
<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>
<view class="content">
<view class="title">Please contact customer service on the top-left corner for identity verification
on your firstPlease contactservice on firstPlease contact customer service on the top-left
corner for identity Please contact customer service on the top-left corner for identity
verification on your firstPlease contactservice on firstPlease contact customer service on the
top-left corner for identity Please contact customer service on the top-left corner for identity
verification on your firstPlease contactservice on firstPlease contact customer ser</view>
<view class="date">{{ i18n.Release }}: 2022/08/06 14:51:34</view>
<view class="title">{{item.title}}</view>
<view class="date">{{ i18n.Release }}: {{item.timestr}}</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>
<script>
export default {
import api from '@/utils/api'
export default {
name: "notification",
data() {
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: {
@ -32,22 +41,66 @@ export default {
return this.$t("me");
},
},
onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getRecordList();
}
},
onLoad() {
this.getRecordList()
},
onShow() { },
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) {
console.log(index);
uni.navigateTo({
url: `/pages/me/notificationDetails?id=${index}`
});
}
},
}
}
</script>
<style lang="scss" scoped>
.main {
.main {
.body {
overflow: hidden;
@ -110,5 +163,5 @@ export default {
}
}
}
</style>

39
pages/me/notificationDetails.vue

@ -5,17 +5,10 @@
<view class="body">
<view class="userItem">
<view class="content">
<view class="title">Please contact customer service on the top-left corner for identity verification
on your firstPlease contactservice on firstPlease contact customer service on the top-left
corner for identity Please contact customer service on </view>
<view class="article">Please contact customer service on the top-left corner for identity
verification on your firstPlease contactservice on firstPlease contact customer service on the
top-left corner for identity Please contact customer service on the top-left corner for identity
verification on your firstPlease contactservice on firstPlease contact customer service on the
top-left corner for identity Please contact customer service on the top-left corner for identity
verification on your firstPlease contactservice on firstPlease contact customer ser</view>
<view class="date">{{ i18n.Release }}: 2022/08/06 14:51:34</view>
<view class="title">{{detail.title}}</view>
<view class="article" v-html="detail.content"></view>
<view class="date">{{ i18n.Release }}: {{detail.timestr}}</view>
</view>
</view>
</view>
@ -23,10 +16,12 @@
</template>
<script>
export default {
import api from '@/utils/api'
export default {
name: "notificationDetails",
data() {
return {
detail:{},
};
},
computed: {
@ -34,17 +29,25 @@ export default {
return this.$t("me");
},
},
onLoad() {
onLoad(res) {
this.getNoticeDetail(res.id)
},
onShow() { },
onShow() {},
methods: {
getNoticeDetail(id){
api.noticeDetail({
noticeId: id
}).then(res => {
this.detail=res
this.detail.timestr = this.$index.formatyymmddhhmmss(this.detail.addTime)
})
},
},
}
}
</script>
<style lang="scss" scoped>
.main {
.main {
.body {
overflow: hidden;
@ -96,5 +99,5 @@ export default {
}
}
}
</style>

30
pages/me/transfer.vue

@ -1,7 +1,7 @@
<template>
<view class="main">
<!-- nav -->
<navigation>{{ i18n.WalletHistory }}</navigation>
<navigation>{{ i18n.Transfer }}</navigation>
<view class="body">
<view class="form">
<!-- coin选择框 -->
@ -37,7 +37,8 @@
<view class="numberDownSelect">USDT <view class="all">{{i18n.ALL}}</view>
</view>
</view>
<view class="Usable">{{ i18n.Usable }} <view class="number">560878.90000000</view>
<view class="Usable">{{ i18n.Usable }}
<view class="number">{{info.userCapital}}{{info.coinCode}}</view>
</view>
</view>
@ -51,7 +52,8 @@
@open="USDTPopupShow = true" bgColor="#211F32">
<view class="content">
<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"
@touchmove.stop.prevent="">
<radio-group class="radioGroup" @change="USDTRadioChange" v-model="USDTRadioValue">
<label class="checkBox" v-for="(item, index) in 10" :key="index">
<view class="icon">
@ -78,7 +80,8 @@
@close="accountPopupShow = false" @open="accountPopupShow = true" bgColor="#211F32">
<view class="content">
<view class="close" @click="accountPopupShow = false"></view>
<scroll-view scroll-y="true" style="height: 200rpx;" scroll-with-animation="true" @touchmove.stop.prevent="">
<scroll-view scroll-y="true" style="height: 200rpx;" scroll-with-animation="true"
@touchmove.stop.prevent="">
<radio-group class="radioGroup" @change="accountRadioChange" v-model="accountRadioValue">
<label class="checkBox" v-for="(item, index) in 3" :key="index">
<view class="name">Option account</view>
@ -99,10 +102,12 @@
</template>
<script>
export default {
import api from '@/utils/api'
export default {
name: "transfer",
data() {
return {
info:{},
coin: '',
USDTPopupShow: false,
accountPopupShow: false,
@ -116,9 +121,16 @@ export default {
},
},
onLoad() {
this.getInfo()
},
onShow() { },
onShow() {},
methods: {
getInfo() {
api.getTransferConfig({}).then(res => {
console.log(res)
this.info=res
})
},
USDTRadioChange(e) {
console.log(e);
},
@ -127,11 +139,11 @@ export default {
}
},
}
}
</script>
<style lang="scss" scoped>
.main {
.main {
.body {
.form {
margin: 232rpx 32rpx 0;
@ -351,5 +363,5 @@ export default {
}
}
</style>

111
pages/me/walletHistory.vue

@ -4,39 +4,41 @@
<navigation>{{ i18n.WalletHistory }}</navigation>
<!-- headBtn -->
<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 }}
</view>
<view class="headItem" @click="pageState = 'contarct'" :class="{ select: pageState === 'contarct' }">
<view class="headItem" @click="getType('contract')" :class="{ select: form.ways === 'contract' }">
{{ i18n.Contarct }}
</view>
</view>
<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 -->
<card-header v-if="pageState === 'balance'"
:iconName="`../../static/me/${(0 + +balanceTestValue) > 0 ? 'ic_wallet_add' : 'ic_wallet_minus'}.png`"
:title="'973430980989323445'" :rightName="balanceTestValue"
:fontColor="`${(0 + +balanceTestValue) > 0 ? '#00E8A2' : '#F4506A'}`">
<card-header v-if="form.ways === 'exchange'"
:iconName="`../../static/me/${ item.isIncome=='yes' ? 'ic_wallet_add' : 'ic_wallet_minus'}.png`"
:title="item.witId" :rightName="`${ item.isIncome=='yes' ? '+' : '-'}`+item.amount+' '+item.coinCode"
:fontColor="`${item.isIncome=='yes'? '#00E8A2' : '#F4506A'}`">
</card-header>
<view class="dataBody" v-if="pageState === 'balance'">
<key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:51'"></key-value-row>
<view class="text">Postscript : ontact customer service on the top-left corner for identity verific
<view class="dataBody" v-if="form.ways === 'exchange'">
<key-value-row :keyName="i18n.Status" :value="item.status"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.addTimeStr"></key-value-row>
<view class="text">Postscript : {{item.witType}}
</view>
</view>
<!-- contarct -->
<card-header v-if="pageState === 'contarct'"
:iconName="`../../static/me/${(0 + +contarctTestValue) > 0 ? 'ic_wallet_add' : 'ic_wallet_minus'}.png`"
:title="'973430980989323445'" :rightName="contarctTestValue"
:fontColor="`${(0 + +contarctTestValue) > 0 ? '#00E8A2' : '#F4506A'}`">
<card-header v-if="form.ways === 'contract'"
:iconName="`../../static/me/${ item.isIncome=='yes' ? 'ic_wallet_add' : 'ic_wallet_minus'}.png`"
:title="item.witId" :rightName="`${ item.isIncome=='yes' ? '+' : '-'}`+item.amount+item.coinCode"
:fontColor="`${item.isIncome=='yes'? '#00E8A2' : '#F4506A'}`">
</card-header>
<view class="dataBody" v-if="pageState === 'contarct'">
<key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:51'"></key-value-row>
<view class="text">Postscript : ontact customer service on the top-left corner for identity verific
<view class="dataBody" v-if="form.ways === 'contract'">
<key-value-row :keyName="i18n.Status" :value="item.status"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.addTimeStr"></key-value-row>
<view class="text">Postscript : {{item.witType}}
</view>
</view>
@ -44,20 +46,35 @@
</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>
<script>
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import CardHeader from '../../components/cardHeader/cardHeader.vue';
export default {
components: { KeyValueRow, CardHeader },
import api from '@/utils/api'
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import CardHeader from '../../components/cardHeader/cardHeader.vue';
export default {
components: {
KeyValueRow,
CardHeader
},
name: "walletHistory",
data() {
return {
pageState: 'balance',
balanceTestValue: '+100', //
contarctTestValue: '-100',
isLoadMore: false, //
loadStatus: 'loadmore',
loadingText: this.$t("login").toload,
loadmoreText: this.$t("login").pullup,
nomoreText: this.$t("login").Nomore,
form: {
pageNumber: 1,
pageSize: 20,
ways: 'exchange',
},
userInfoObj: [],
};
},
computed: {
@ -65,18 +82,56 @@ export default {
return this.$t("me");
},
},
onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getRecordList();
}
},
onLoad() {
this.getRecordList();
},
onShow() {
},
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>
<style lang="scss" scoped>
.main {
.main {
.head {
margin-top: 200rpx;
@ -133,5 +188,5 @@ export default {
}
}
}
}
</style>

123
pages/withdrawal/addOrEditBankCard.vue

@ -3,37 +3,47 @@
<!-- nav -->
<navigation>{{ pageState === 'addBank' ? i18n.AddBankInformation : i18n.EditBankInformation }}</navigation>
<view class="content">
<u--form class="form" :model="bankInfo" :rules="rules" ref="uForm" errorType="toast">
<view class="inputBody">
<view class="title">{{ i18n.FirstName }}</view>
<view class="input-item">
<u-input class="input" v-model="name" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.enterName">
<u-form-item class="input-item" prop="acctName" ref="item1">
<u-input class="input" v-model="bankInfo.acctName" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.enterName">
</u-input>
</u-form-item>
</view>
<view class="title">{{ i18n.Account }}</view>
<view class="input-item">
<u-input class="input" v-model="account" color="#fff" fontSize="32rpx" border="none"
<u-form-item class="input-item" prop="acctId" ref="item1">
<u-input class="input" v-model="bankInfo.acctId" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.enterAccount">
</u-input>
</u-form-item>
</view>
</view>
<view class="inputBody">
<view class="title">{{ i18n.BankName }}</view>
<view class="input-item">
<u-input class="input" v-model="bankName" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.enterBankName">
<u-form-item class="input-item" prop="email" ref="item1">
<u-input class="input" v-model="bankInfo.bankName" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.enterBankName">
</u-input>
</u-form-item>
</view>
<view class="title">{{ i18n.BankCode }}</view>
<view class="input-item">
<u-input class="input" type="password" v-model="bankCode" color="#fff" fontSize="32rpx"
<u-form-item class="input-item" prop="bankCode" ref="item1">
<u-input class="input" v-model="bankInfo.bankCode" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.enterBankCode">
</u-input>
</u-form-item>
</view>
</view>
</u--form>
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="btnIsCanClick">{{ i18n.Confirm }}
<u-button class="button" color="#00E8A2" :throttleTime="500" :disabled="btnIsCanClick" @click="bank">
{{ i18n.Confirm }}
</u-button>
</view>
@ -45,45 +55,108 @@
</template>
<script>
export default {
import api from '@/utils/api'
export default {
name: "withdrawalRecord",
data() {
return {
rules: {
acctName: {
type: 'string',
required: true,
message: this.$t('withdrawal').enterName,
trigger: ['blur', 'change'],
},
bankName: {
type: 'string',
required: true,
message: this.$t('withdrawal').enterBankName,
trigger: ['blur', 'change']
},
acctId: {
type: 'string',
required: true,
message: this.$t('withdrawal').enterAccount,
trigger: ['blur', 'change']
},
bankCode: {
type: 'string',
required: true,
message: this.$t('withdrawal').enterBankCode,
trigger: ['blur', 'change']
},
},
bankInfo: {
bankCode: null,
bankName: null,
acctName: null,
acctId: null,
},
pageState: 'addBank', // ,
name: '',
account: '',
bankName: '',
bankCode: '',
};
},
computed: {
i18n() {
return this.$t("withdrawal");
},
btnIsCanClick() { //
if (this.name && this.account && this.bankName && this.bankCode) {
return false; //
btnIsCanClick() {
if (this.bankInfo.bankCode && this.bankInfo.bankName && this.bankInfo.acctName && this.bankInfo.acctId) {
return false
} else {
return true
}
}
},
onLoad(option) {
console.log(option);
this.pageState = option.mode || 'addBank';
this.getBank()
},
onShow() { },
onShow() {},
methods: {
change(e) {
console.log(e);
//
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>
<style lang="scss" scoped>
.main {
/deep/ .u-form-item__body {
padding: 0 0;
}
.main {
.content {
margin-top: 200rpx;
@ -134,5 +207,5 @@ export default {
}
}
}
}
</style>

2
utils/api.js

@ -67,7 +67,7 @@ const api = {
receivStepsAward: (params) => Vue.prototype.$axios.post('/api/steps/receivStepsAward',params),//领取奖励
//--------------------------------- 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),//切换语言
customerService: (params) => Vue.prototype.$axios.post('/api/index/customerService',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.data[0].nameAlias)
if (res.success || res.errCode === 'USER.0017') {
return res.data;
} else {
}
if(res.errMsg=='No customer service is online'&&res.errCode=='SYS.0012'){
return res;
}
else {
uni.showToast({
title: res.errMsg,
icon: 'none',
duration: 1500
})
if (res.errCode === 'USER.0010') {
uni.setStorageSync('ticket',null);
uni.removeStorage({
key: 'logInfo',
success: function(res) {
@ -159,8 +161,6 @@ service.interceptors.response.use(res => {
},
fail: (err) => {}
});
// #ifdef H5
var url = location.href;
if (url.indexOf('pages') > -1) {
@ -175,8 +175,6 @@ service.interceptors.response.use(res => {
uni.removeStorageSync('url')
}
// #endif
}
uni.$emit('refreshQrCode')
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 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;
},
formathhmm: function(time) {
var date = new Date(time)

11
utils/language/en_US.js

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

Loading…
Cancel
Save