@ -1,94 +1,93 @@ |
|||||
<template> |
<template> |
||||
<view class="nav-head"> |
<view class="nav-head"> |
||||
<slot name="address"></slot> |
<image src="../../static/public/back.png" mode="aspectFit" class="back" @tap="back()" v-if="showBack"></image> |
||||
|
<slot name="left"></slot> |
||||
<slot></slot> |
<slot></slot> |
||||
<slot name="bread"></slot> |
<slot name="middle"></slot> |
||||
<slot name="logo"></slot> |
<slot name="right"></slot> |
||||
<image src="../../static/tongyonh/Vector.png" mode="aspectFit" class="back" @tap="back()" v-if="showBack"></image> |
|
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
const COMPONENT_NAME = 'navigation' |
const COMPONENT_NAME = 'navigation' |
||||
export default { |
export default { |
||||
name: COMPONENT_NAME, |
name: COMPONENT_NAME, |
||||
props:{ |
props: { |
||||
showBack: { |
showBack: { |
||||
type: Boolean, |
type: Boolean, |
||||
default () { |
default() { |
||||
return true |
return true |
||||
} |
} |
||||
}, |
|
||||
bgnum: { |
|
||||
type: Boolean, |
|
||||
default () { |
|
||||
return false |
|
||||
} |
|
||||
}, |
|
||||
}, |
}, |
||||
data() { |
bgnum: { |
||||
return { |
type: Boolean, |
||||
|
default() { |
||||
|
return false |
||||
} |
} |
||||
}, |
}, |
||||
computed: { |
}, |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
}, |
} |
||||
mounted() { |
}, |
||||
|
computed: { |
||||
|
|
||||
}, |
}, |
||||
methods: { |
mounted() { |
||||
back(){ |
|
||||
|
|
||||
// #ifdef H5 |
}, |
||||
history.back() |
methods: { |
||||
// #endif |
back() { |
||||
|
|
||||
// #ifdef APP-PLUS |
// #ifdef H5 |
||||
uni.navigateBack() |
history.back() |
||||
// #endif |
// #endif |
||||
} |
|
||||
|
// #ifdef APP-PLUS |
||||
|
uni.navigateBack() |
||||
|
// #endif |
||||
|
} |
||||
}, |
}, |
||||
} |
} |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"> |
||||
|
.item { |
||||
|
font-size: 28rpx; |
||||
|
text-align: center; |
||||
|
width: 234rpx; |
||||
|
line-height: 60rpx; |
||||
|
} |
||||
|
|
||||
.item{ |
.nav-head { |
||||
font-size: 28rpx; |
overflow: hidden; |
||||
text-align: center; |
position: relative; |
||||
width: 234rpx; |
top: 0rpx; |
||||
line-height: 60rpx; |
height: 112rpx; |
||||
} |
// background-color: #fafafa; |
||||
|
// background-color: #fff; |
||||
.nav-head{ |
text-align: center; |
||||
height: 40rpx; |
font-weight: 700; |
||||
// background-color: #fafafa; |
font-size: 36rpx; |
||||
// background-color: #fff; |
color: #fff; |
||||
text-align: center; |
// padding: 40rpx 16rpx; |
||||
font-weight: 700; |
margin-top: 88rpx; |
||||
font-size: 36rpx; |
display: flex; |
||||
color: #000; |
justify-content: center; |
||||
padding: 40rpx 16rpx; |
align-items: center; |
||||
// margin-top: 50rpx; |
width: 100%; |
||||
display: flex; |
z-index: 8; |
||||
justify-content: center; |
border-bottom: 4rpx solid #323045; |
||||
flex-direction: row-reverse; |
|
||||
align-items: center; |
|
||||
margin-top: 80rpx; |
|
||||
position: relative; |
|
||||
top: 0rpx; |
|
||||
width: 100%; |
|
||||
z-index: 8; |
|
||||
|
|
||||
} |
} |
||||
.back{ |
|
||||
width: 30rpx; |
|
||||
height: 30rpx; |
|
||||
position: absolute; |
|
||||
left:36rpx; |
|
||||
top: 50%; |
|
||||
transform: translateY(-50%); |
|
||||
} |
|
||||
|
|
||||
|
.back { |
||||
|
width: 80rpx; |
||||
|
height: 80rpx; |
||||
|
position: absolute; |
||||
|
left: 36rpx; |
||||
|
top: 50%; |
||||
|
transform: translateY(-50%); |
||||
|
} |
||||
</style> |
</style> |
||||
|
|||||
@ -1,195 +1,215 @@ |
|||||
<template> |
<template> |
||||
<view class="index-header "> |
<view class="index-header"> |
||||
<view class="con"> |
<view class="con"> |
||||
<view class="tabbar_item" @click="goToPage(1)"> |
<view class="tabbar_item" @click="goToPage(1)"> |
||||
<view class="uni-tabbar_bd"> |
<view class="uni-tabbar_bd"> |
||||
<view class="uni-tabbar_icon"> |
<view class="uni-tabbar_icon"> |
||||
<image :src="'/static/tongyonh/'+(selectActive==1?'Uniona':'Union')+'.png'" mode="aspectFit" class="img1"></image> |
<image :src="`/static/tabBar/${selectActive == 1 ? 'ic_home_pr' : 'ic_home_de'}.png`" |
||||
</view> |
mode="aspectFit" class="img1"></image> |
||||
<view class="uni-tabbar_label" :class="['text', selectActive==1?'active':'']"> |
</view> |
||||
{{i18n.Wallet}} |
<view class="uni-tabbar_label" :class="['text', selectActive == 1 ? 'active' : '']"> |
||||
</view> |
{{ i18n.Home }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view class="tabbar_item" @click="goToPage(2)" v-if="showNft"> |
</view> |
||||
|
<view class="tabbar_item" @click="goToPage(2)"> |
||||
<view class="uni-tabbar_bd"> |
<view class="uni-tabbar_bd"> |
||||
<view class="uni-tabbar_icon"> |
<view class="uni-tabbar_icon"> |
||||
<image :src="'/static/tongyonh/'+(selectActive==2?'nft_icon2':'nft_icon')+'.png'" mode="aspectFit" class="img1"></image> |
<image :src="`/static/tabBar/${selectActive == 1 ? 'ic_charity_pr' : 'ic_charity_de'}.png`" |
||||
|
mode="aspectFit" class="img1"></image> |
||||
</view> |
</view> |
||||
<view class="uni-tabbar_label" :class="['text', selectActive==2?'active':'']"> |
<view class="uni-tabbar_label" :class="['text', selectActive == 2 ? 'active' : '']"> |
||||
{{i18n.NFT}} |
{{ i18n.Markets }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view class="tabbar_item" @click="goToPage(3)"> |
<view class="tabbar_item" @click="goToPage(3)"> |
||||
<view class="uni-tabbar_bd"> |
<view class="uni-tabbar_bd"> |
||||
<view class="uni-tabbar_icon"> |
<view class="uni-tabbar_icon"> |
||||
<image :src="'/static/tongyonh/'+(selectActive==3?'market_icona':'market_icon')+'.png'" mode="aspectFit" class="img1"></image> |
<image :src="`/static/tabBar/${selectActive == 1 ? 'ic_chart_pr' : 'ic_chart_de'}.png`" |
||||
|
mode="aspectFit" class="img1"></image> |
||||
</view> |
</view> |
||||
<view class="uni-tabbar_label" :class="['text', selectActive==3?'active':'']"> |
<view class="uni-tabbar_label" :class="['text', selectActive == 3 ? 'active' : '']"> |
||||
{{i18n.Market}} |
{{ i18n.Charity }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<!-- <view class="tabbar_item" @click="goToPage(4)"> |
<view class="tabbar_item" @click="goToPage(4)"> |
||||
<view class="uni-tabbar_bd"> |
<view class="uni-tabbar_bd"> |
||||
<view class="uni-tabbar_icon"> |
<view class="uni-tabbar_icon"> |
||||
<image :src="'/static/tongyonh/'+(selectActive==4?'Discover_icona':'Discover_icon')+'.png'" mode="aspectFit" class="img1"></image> |
<image :src="`/static/tabBar/${selectActive == 1 ? 'ic_home_pr' : 'ic_home_de'}.png`" |
||||
|
mode="aspectFit" class="img1"></image> |
||||
</view> |
</view> |
||||
<view class="uni-tabbar_label" :class="['text', selectActive==4?'active':'']"> |
<view class="uni-tabbar_label" :class="['text', selectActive == 4 ? 'active' : '']"> |
||||
{{i18n.Discover}} |
{{ i18n.Subscription }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> --> |
</view> |
||||
<view class="tabbar_item" @click="goToPage(5)"> |
<view class="tabbar_item" @click="goToPage(5)"> |
||||
<view class="uni-tabbar_bd"> |
<view class="uni-tabbar_bd"> |
||||
<view class="uni-tabbar_icon"> |
<view class="uni-tabbar_icon"> |
||||
<image :src="'/static/tongyonh/'+(selectActive==5?'Profile_icon':'Profile_icona')+'.png'" mode="aspectFit" class="img1"></image> |
<image :src="`/static/tabBar/${selectActive == 1 ? 'ic_me_pr' : 'ic_me_de'}.png`" |
||||
|
mode="aspectFit" class="img1"></image> |
||||
</view> |
</view> |
||||
<view class="uni-tabbar_label" :class="['text', selectActive==5?'active':'']"> |
<view class="uni-tabbar_label" :class="['text', selectActive == 5 ? 'active' : '']"> |
||||
{{i18n.Profile}} |
{{ i18n.Me }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
<script> |
<script> |
||||
|
|
||||
const COMPONENT_NAME = 'tabBar' |
const COMPONENT_NAME = 'tabBar' |
||||
export default { |
export default { |
||||
name: COMPONENT_NAME, |
name: COMPONENT_NAME, |
||||
|
|
||||
|
|
||||
|
|
||||
props: { |
props: { |
||||
selectActive: { |
selectActive: { |
||||
type: Number, |
type: Number, |
||||
default () { |
default() { |
||||
return 1 |
return 1 |
||||
} |
} |
||||
}, |
}, |
||||
}, |
}, |
||||
data() { |
data() { |
||||
return { |
return { |
||||
showNft:null, |
status: '', |
||||
status:'', |
address: '', |
||||
address:'', |
} |
||||
} |
}, |
||||
}, |
computed: { |
||||
computed: { |
|
||||
|
|
||||
}, |
}, |
||||
mounted() { |
mounted() { |
||||
this.showNft=uni.getStorageSync('showNft') |
}, |
||||
console.log(this.showNft,78787878787878787878787878787878) |
methods: { |
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
goToPage(num) { |
goToPage(num) { |
||||
if(num == 1) { |
let url = '/pages/index/index'; |
||||
uni.reLaunch({ |
switch (+num) { |
||||
url: '/pages/menu/wallet/index' |
case 1: |
||||
}) |
url = '/pages/index/index'; |
||||
|
break; |
||||
} else if (num == 2) { |
case 2: |
||||
uni.reLaunch({ |
url = '/pages/markets/index'; |
||||
url: '/pages/menu/collection/index' |
break; |
||||
}) |
case 3: |
||||
} else if (num == 3) { |
url = '/pages/charity/index'; |
||||
uni.reLaunch({ |
break; |
||||
url: '/pages/menu/market/index' |
case 4: |
||||
}) |
url = '/pages/subscription/index'; |
||||
}else if (num == 4) { |
break; |
||||
uni.reLaunch({ |
case 5: |
||||
url: '/pages/menu/discover/index' |
url = '/pages/me/index'; |
||||
}) |
break; |
||||
}else if (num == 5) { |
|
||||
uni.reLaunch({ |
|
||||
url: '/pages/menu/profile/index' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
default: |
||||
|
break; |
||||
} |
} |
||||
|
uni.reLaunch({ |
||||
|
url: '/pages/menu/profile/index' |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
|
||||
}, |
}, |
||||
computed: { |
computed: { |
||||
i18n() { |
i18n() { |
||||
return this.$t('index') |
return this.$t('tabBar') |
||||
}, |
}, |
||||
} |
} |
||||
} |
} |
||||
</script> |
</script> |
||||
|
|
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"> |
||||
.active{ |
.active { |
||||
color: #5B53FF !important; |
color: $mainColor !important; |
||||
} |
|
||||
.uni-tabbar_label { |
|
||||
color: rgb(153, 153, 153); |
|
||||
font-size: 10px; |
|
||||
line-height: normal; |
|
||||
margin-top: 3px; |
|
||||
position: relative; |
|
||||
text-align: center; |
|
||||
font-size: 20rpx !important; |
|
||||
} |
} |
||||
.uni-tabbar_icon{ |
|
||||
width: 24px !important; |
.uni-tabbar_label { |
||||
height: 24px !important; |
color: #A1A0A8; |
||||
position: relative; |
font-size: 10px; |
||||
display: inline-block; |
line-height: normal; |
||||
margin-top: 5px; |
margin-top: 3px; |
||||
} |
position: relative; |
||||
.uni-tabbar_icon image { |
text-align: center; |
||||
width: 100%; |
font-size: 24rpx !important; |
||||
height: 100%; |
|
||||
} |
} |
||||
.uni-tabbar_bd{ |
|
||||
height: 100rpx; |
.uni-tabbar_icon { |
||||
position: relative; |
width: 48rpx !important; |
||||
-webkit-flex-direction: column; |
height: 48rpx !important; |
||||
flex-direction: column; |
position: relative; |
||||
cursor: pointer; |
display: inline-block; |
||||
} |
margin-top: 5px; |
||||
.con{ |
} |
||||
|
|
||||
|
.uni-tabbar_icon image { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
|
||||
|
.uni-tabbar_bd { |
||||
|
height: 100rpx; |
||||
|
position: relative; |
||||
|
-webkit-flex-direction: column; |
||||
|
flex-direction: column; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.con { |
||||
width: 100%; |
width: 100%; |
||||
background-color: rgb(247, 247, 250); |
height: 166rpx; |
||||
position: fixed; |
background-color: #323045; |
||||
bottom: 0; |
position: fixed; |
||||
left: 0; |
bottom: 0; |
||||
padding-top: 28rpx; |
left: 0; |
||||
padding-bottom: 30rpx ; |
padding-top: 22rpx; |
||||
background-image: -webkit-linear-gradient(bottom, #FAF8F8, #FFFFFF) !important; |
display: flex; |
||||
background-image: linear-gradient(to top, #FAF8F8, #FFFFFF) !important; |
z-index: 998; |
||||
border-top: 2rpx solid #F7F4F4; |
box-sizing: border-box; |
||||
display: flex; |
|
||||
z-index: 998; |
&::after { |
||||
box-sizing: border-box; |
display: block; |
||||
|
position: absolute; |
||||
|
content: ''; |
||||
|
background: #fff; |
||||
|
width: 268rpx; |
||||
|
height: 10rpx; |
||||
|
border-radius: 10rpx; |
||||
|
top: 140rpx; |
||||
|
left: 242rpx; |
||||
|
} |
||||
} |
} |
||||
.tabbar_item{ |
|
||||
|
.tabbar_item { |
||||
display: -webkit-box; |
display: -webkit-box; |
||||
width: 150rpx; |
width: 150rpx; |
||||
height: 100rpx; |
height: 100rpx; |
||||
display: -webkit-flex; |
display: -webkit-flex; |
||||
display: flex; |
display: flex; |
||||
-webkit-box-pack: center; |
-webkit-box-pack: center; |
||||
-webkit-justify-content: center; |
-webkit-justify-content: center; |
||||
justify-content: center; |
justify-content: center; |
||||
-webkit-box-align: center; |
-webkit-box-align: center; |
||||
-webkit-align-items: center; |
-webkit-align-items: center; |
||||
align-items: center; |
align-items: center; |
||||
-webkit-box-orient: vertical; |
-webkit-box-orient: vertical; |
||||
-webkit-box-direction: normal; |
-webkit-box-direction: normal; |
||||
webkit-flex-direction: column; |
webkit-flex-direction: column; |
||||
flex-direction: column; |
flex-direction: column; |
||||
-webkit-box-flex: 1; |
-webkit-box-flex: 1; |
||||
-webkit-flex: 1; |
-webkit-flex: 1; |
||||
flex: 1; |
flex: 1; |
||||
font-size: 0; |
font-size: 0; |
||||
text-align: center; |
text-align: center; |
||||
-webkit-tap-highlight-color: rgba(0,0,0,0); |
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); |
||||
} |
} |
||||
|
|
||||
</style> |
</style> |
||||
|
|||||
@ -1,51 +1,252 @@ |
|||||
<template> |
<template> |
||||
<view class="content"> |
<view class="main"> |
||||
<view class="text-area"> |
<view class="nav-head"> |
||||
<text class="title">{{title}}</text> |
<view class="title">{{ i18n.HOME }}</view> |
||||
|
<u-button class="button" color="#323045">{{ i18n.customerService }}</u-button> |
||||
</view> |
</view> |
||||
|
|
||||
|
<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"> |
||||
|
<u-icon class="icon" name="../../static/home/ic_proclamation.png" size="60rpx" width="60rpx"></u-icon> |
||||
|
<view class="text">{{ i18n.homeMessage }}</view> |
||||
|
</view> |
||||
|
<view class="btnDiv"> |
||||
|
<view class="item"> |
||||
|
<u--image class="img" :showLoading="true" src="../../static/home/img_recharge.png" width="144rpx" |
||||
|
height="144rpx" @click="click"></u--image> |
||||
|
<view class="text">{{ i18n.Recharge }}</view> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<u--image class="img" :showLoading="true" src="../../static/home/img_Mine.png" width="144rpx" |
||||
|
height="144rpx" @click="click"></u--image> |
||||
|
<view class="text">{{ i18n.Mine }}</view> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<u--image class="img" :showLoading="true" src="../../static/home/img_Subcription.png" width="144rpx" |
||||
|
height="144rpx" @click="click"></u--image> |
||||
|
<view class="text">{{ i18n.Subcription }}</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="steps"> |
||||
|
<view class="content"> |
||||
|
<view class="title">{{ i18n.TodaySteps }}</view> |
||||
|
<u-button class="button" color="#00E8A2">{{ i18n.ReceiveEarnings }}</u-button> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view v-for="(item, index) in videoList" :key="index"> |
||||
|
<video class="video" :id="`video-${index}`" :enable-progress-gesture="false" :src="item.url" |
||||
|
:poster="item.poster" :title="item.title" controls @play="stopOtherVideoPlay" :key="index" ></video> |
||||
|
</view> |
||||
|
<tab-bar :selectActive="1"></tab-bar> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
export default { |
let videoPlayerObj = {}; |
||||
data() { |
export default { |
||||
return { |
name: 'home', |
||||
title: 'Hello' |
data() { |
||||
} |
return { |
||||
}, |
swiperList: [ |
||||
onLoad() { |
'https://cdn.uviewui.com/uview/swiper/swiper1.png', |
||||
|
'https://cdn.uviewui.com/uview/swiper/swiper2.png', |
||||
}, |
'https://cdn.uviewui.com/uview/swiper/swiper3.png', |
||||
methods: { |
], |
||||
|
videoList: [ |
||||
|
{ |
||||
|
url: 'https://cdn.uviewui.com/uview/resources/video.mp4', |
||||
|
title: '昨夜星辰昨夜风,画楼西畔桂堂东', |
||||
|
poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png' |
||||
|
}, |
||||
|
{ |
||||
|
url: 'https://cdn.uviewui.com/uview/resources/video.mp4', |
||||
|
title: '昨夜星辰昨夜风,画楼西畔桂堂东', |
||||
|
poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png' |
||||
|
}, |
||||
|
{ |
||||
|
url: 'https://cdn.uviewui.com/uview/resources/video.mp4', |
||||
|
title: '昨夜星辰昨夜风,画楼西畔桂堂东', |
||||
|
poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png' |
||||
|
}, |
||||
|
{ |
||||
|
url: 'https://cdn.uviewui.com/uview/resources/video.mp4', |
||||
|
title: '昨夜星辰昨夜风,画楼西畔桂堂东', |
||||
|
poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png' |
||||
|
}, |
||||
|
], |
||||
|
} |
||||
|
}, |
||||
|
onLoad() { |
||||
|
|
||||
|
}, |
||||
|
onShow() { |
||||
|
// 生成播放器队列对象 |
||||
|
this.videoList.forEach((item, index) => { |
||||
|
const VideoPlayer = uni.createVideoContext(`video-${index}`, this) |
||||
|
videoPlayerObj[`video-${index}`] = VideoPlayer |
||||
|
}); |
||||
|
}, |
||||
|
onHide() { |
||||
|
this.stopAllVideoPlay() |
||||
|
}, |
||||
|
computed: { |
||||
|
i18n() { |
||||
|
return this.$t('home') |
||||
} |
} |
||||
|
}, |
||||
|
methods: { |
||||
|
/** |
||||
|
* 在播放视频是暂停其他视频 |
||||
|
* @param {*} e |
||||
|
*/ |
||||
|
stopOtherVideoPlay(e) { |
||||
|
const keyArr = Object.keys(videoPlayerObj) |
||||
|
keyArr.forEach(item => { |
||||
|
if (item !== e.target.id) { |
||||
|
videoPlayerObj[item].pause() |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** |
||||
|
* 在跳转其他页面时是暂停全部视频 |
||||
|
* @param {*} e |
||||
|
*/ |
||||
|
stopAllVideoPlay() { |
||||
|
const keyArr = Object.keys(videoPlayerObj) |
||||
|
keyArr.forEach(item => { |
||||
|
videoPlayerObj[item].pause() |
||||
|
}); |
||||
|
}, |
||||
} |
} |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"> |
||||
.content { |
.main { |
||||
|
.nav-head { |
||||
|
overflow: hidden; |
||||
|
position: relative; |
||||
|
top: 0rpx; |
||||
|
height: 112rpx; |
||||
|
// text-align: center; |
||||
|
font-weight: 700; |
||||
|
font-size: 36rpx; |
||||
|
color: #fff; |
||||
|
margin-top: 88rpx; |
||||
display: flex; |
display: flex; |
||||
flex-direction: column; |
// justify-content: space-between; |
||||
align-items: center; |
align-items: center; |
||||
justify-content: center; |
width: 100%; |
||||
|
z-index: 8; |
||||
|
border-bottom: 4rpx solid #323045; |
||||
|
|
||||
|
.title { |
||||
|
margin-left: 48rpx; |
||||
|
} |
||||
|
|
||||
|
.button { |
||||
|
width: 286rpx; |
||||
|
height: 70rpx; |
||||
|
line-height: 70rpx; |
||||
|
border-radius: 90rpx; |
||||
|
font-size: 28rpx; |
||||
|
color: #F2FE8D !important; |
||||
|
padding: 0; |
||||
|
margin-right: 24rpx; |
||||
|
} |
||||
} |
} |
||||
|
|
||||
.logo { |
.swiper { |
||||
height: 200rpx; |
margin-top: 32rpx; |
||||
width: 200rpx; |
|
||||
margin-top: 200rpx; |
|
||||
margin-left: auto; |
|
||||
margin-right: auto; |
|
||||
margin-bottom: 50rpx; |
|
||||
} |
} |
||||
|
|
||||
.text-area { |
.message { |
||||
display: flex; |
margin: 24rpx 24rpx 32rpx; |
||||
justify-content: center; |
height: 96rpx; |
||||
|
background: #211F32; |
||||
|
border-radius: 16rpx; |
||||
|
|
||||
|
.icon { |
||||
|
display: inline-block; |
||||
|
vertical-align: top; |
||||
|
margin: 18rpx 20rpx; |
||||
|
} |
||||
|
|
||||
|
.text { |
||||
|
display: inline-block; |
||||
|
margin-top: 18rpx; |
||||
|
height: 68rpx; |
||||
|
width: 574rpx; |
||||
|
font-size: 24rpx; |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
word-wrap: break-word; |
||||
|
white-space: normal !important; |
||||
|
//显示4行 |
||||
|
-webkit-line-clamp: 2; |
||||
|
-webkit-box-orient: vertical; |
||||
|
} |
||||
} |
} |
||||
|
|
||||
.title { |
.btnDiv { |
||||
font-size: 36rpx; |
margin: 32rpx 48rpx; |
||||
color: #8f8f94; |
|
||||
|
.item { |
||||
|
display: inline-block; |
||||
|
width: 218rpx; |
||||
|
text-align: center; |
||||
|
|
||||
|
.img { |
||||
|
margin: 0 36rpx 16rpx; |
||||
|
} |
||||
|
} |
||||
} |
} |
||||
|
|
||||
|
.steps { |
||||
|
margin: 0 32rpx; |
||||
|
width: 686rpx; |
||||
|
height: 472rpx; |
||||
|
background-color: #211F32; |
||||
|
background-image: url(../../static/home/img_People.png); |
||||
|
background-repeat: no-repeat; |
||||
|
background-size: contain; |
||||
|
border-radius: 16px; |
||||
|
|
||||
|
.content { |
||||
|
margin-left: 246rpx; |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
justify-content: space-around; |
||||
|
align-items: center; |
||||
|
|
||||
|
flex-direction: column; |
||||
|
|
||||
|
.title { |
||||
|
font-size: 48rpx; |
||||
|
height: 64rpx; |
||||
|
line-height: 64rpx; |
||||
|
} |
||||
|
|
||||
|
.button { |
||||
|
width: 386rpx; |
||||
|
height: 60rpx; |
||||
|
line-height: 60rpx; |
||||
|
border-radius: 40rpx; |
||||
|
font-size: 24rpx; |
||||
|
color: #15141F !important; |
||||
|
padding: 0; |
||||
|
margin-right: 24rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.video { |
||||
|
margin: 32rpx 32rpx 0; |
||||
|
width: 686rpx; |
||||
|
height: 360rpx; |
||||
|
border-radius: 32rpx; |
||||
|
} |
||||
|
|
||||
|
} |
||||
</style> |
</style> |
||||
|
|||||
@ -0,0 +1,161 @@ |
|||||
|
<template> |
||||
|
<view class="main"> |
||||
|
<navigation>{{ i18n.ForgotPassword }}</navigation> |
||||
|
<view class="body"> |
||||
|
<u--form class="form" :model="userInfo" :rules="rules" ref="form1" errorType="toast"> |
||||
|
<!-- 邮箱 --> |
||||
|
<u-form-item class="input-item" prop="email" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.email ? '../../static/login/email_pr.png' : '../../static/login/email_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.email" color="#fff" fontSize="32rpx" border="none" |
||||
|
:placeholder="i18n.emailInputText"> |
||||
|
</u-input> |
||||
|
</u-form-item> |
||||
|
<!-- 验证码 --> |
||||
|
<u-form-item class="input-item vCode" prop="verificationCode" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.verificationCode ? '../../static/login/code_pr.png' : '../../static/login/code_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.verificationCode" color="#fff" fontSize="32rpx" |
||||
|
border="none" :placeholder="i18n.registerWelcomeText" maxlength="6"> |
||||
|
</u-input> |
||||
|
<u-button class="getVCodeBtn" color="#323045">Get code</u-button> |
||||
|
</u-form-item> |
||||
|
<!-- 密码 --> |
||||
|
<u-form-item class="input-item" prop="password" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.password ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.password" color="#fff" fontSize="32rpx" border="none" |
||||
|
:placeholder="i18n.passwordText"> |
||||
|
</u-input> |
||||
|
</u-form-item> |
||||
|
<!-- 重复密码 --> |
||||
|
<u-form-item class="input-item" prop="confirmPassword" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.confirmPassword ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.confirmPassword" color="#fff" fontSize="32rpx" |
||||
|
border="none" :placeholder="i18n.confirmPasswordText"> |
||||
|
</u-input> |
||||
|
</u-form-item> |
||||
|
|
||||
|
</u--form> |
||||
|
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="!agreeFlag">{{ i18n.Save }} |
||||
|
</u-button> |
||||
|
</view> |
||||
|
|
||||
|
|
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import UButton from '../../uview-ui/components/u-button/u-button.vue' |
||||
|
export default { |
||||
|
name: "ForgotPassword", |
||||
|
data() { |
||||
|
return { |
||||
|
userInfo: { |
||||
|
name: "", |
||||
|
password: "", |
||||
|
}, |
||||
|
rules: { |
||||
|
email: { |
||||
|
type: "string", |
||||
|
required: true, |
||||
|
message: this.$t("login.emailInputMessage"), |
||||
|
trigger: ["blur", "change"], |
||||
|
}, |
||||
|
verificationCode: { |
||||
|
type: "string", |
||||
|
required: true, |
||||
|
message: this.$t("login.verificationCodeMessage"), |
||||
|
trigger: ["blur", "change"] |
||||
|
}, |
||||
|
password: { |
||||
|
type: "string", |
||||
|
required: true, |
||||
|
message: this.$t("login.passwordInputMessage"), |
||||
|
trigger: ["blur", "change"] |
||||
|
}, |
||||
|
}, |
||||
|
agreeFlag: false, |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
i18n() { |
||||
|
return this.$t("login"); |
||||
|
}, |
||||
|
}, |
||||
|
onLoad() { |
||||
|
// console.log(this.$t('login.emailInputMessage')); |
||||
|
}, |
||||
|
onShow() { }, |
||||
|
methods: {}, |
||||
|
components: { UButton } |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.main { |
||||
|
|
||||
|
.body { |
||||
|
padding: 0 64rpx; |
||||
|
overflow: hidden; |
||||
|
|
||||
|
.form { |
||||
|
font-size: 32rpx; |
||||
|
margin-top: 48rpx; |
||||
|
|
||||
|
.input-item { |
||||
|
height: 112rpx; |
||||
|
line-height: 112rpx; |
||||
|
background: #211F32; |
||||
|
margin-bottom: 48rpx; |
||||
|
border-radius: 32rpx; |
||||
|
|
||||
|
.icon { |
||||
|
margin: 0 24rpx; |
||||
|
} |
||||
|
|
||||
|
/deep/.u-form-item__body { |
||||
|
padding: 0; |
||||
|
} |
||||
|
|
||||
|
.input { |
||||
|
height: 112rpx; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.vCode { |
||||
|
|
||||
|
.getVCodeBtn { |
||||
|
// position: absolute; |
||||
|
width: 154rpx; |
||||
|
height: 56rpx; |
||||
|
right: 28rpx; |
||||
|
// top: 14px; |
||||
|
border-radius: 8px; |
||||
|
line-height: 56rpx; |
||||
|
font-size: 24rpx; |
||||
|
color: #00E8A2 !important; |
||||
|
padding: 0; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.button { |
||||
|
margin-top: 64rpx; |
||||
|
height: 112rpx; |
||||
|
line-height: 112rpx; |
||||
|
border-radius: 32rpx; |
||||
|
font-size: 32rpx; |
||||
|
color: #15141F !important; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,237 @@ |
|||||
|
<template> |
||||
|
<view class="main"> |
||||
|
<navigation>{{ i18n.SignUp }}</navigation> |
||||
|
<view class="body"> |
||||
|
<view class="welcomeText">{{ i18n.registerWelcomeText }}</view> |
||||
|
<view class="signInText">{{ i18n.registerCreate }}</view> |
||||
|
<u--form class="form" :model="userInfo" :rules="rules" ref="form1" errorType="toast"> |
||||
|
<!-- 邮箱 --> |
||||
|
<u-form-item class="input-item" prop="email" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.email ? '../../static/login/email_pr.png' : '../../static/login/email_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.email" color="#fff" fontSize="32rpx" border="none" |
||||
|
:placeholder="i18n.emailInputText"> |
||||
|
</u-input> |
||||
|
</u-form-item> |
||||
|
<!-- 验证码 --> |
||||
|
<u-form-item class="input-item vCode" prop="verificationCode" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.verificationCode ? '../../static/login/code_pr.png' : '../../static/login/code_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.verificationCode" color="#fff" fontSize="32rpx" |
||||
|
border="none" :placeholder="i18n.registerWelcomeText" maxlength="6"> |
||||
|
</u-input> |
||||
|
<u-button class="getVCodeBtn" color="#323045">Get code</u-button> |
||||
|
</u-form-item> |
||||
|
<!-- 密码 --> |
||||
|
<u-form-item class="input-item" prop="password" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.password ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.password" color="#fff" fontSize="32rpx" border="none" |
||||
|
:placeholder="i18n.passwordText"> |
||||
|
</u-input> |
||||
|
</u-form-item> |
||||
|
<!-- 重复密码 --> |
||||
|
<u-form-item class="input-item" prop="confirmPassword" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.confirmPassword ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.confirmPassword" color="#fff" fontSize="32rpx" |
||||
|
border="none" :placeholder="i18n.confirmPasswordText"> |
||||
|
</u-input> |
||||
|
</u-form-item> |
||||
|
<!-- 取款密码 --> |
||||
|
<u-form-item class="input-item" prop="withdrawalPassword" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.withdrawalPassword ? '../../static/login/WithdrawalPassword_pr.png' : '../../static/login/WithdrawalPassword_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.withdrawalPassword" color="#fff" fontSize="32rpx" |
||||
|
border="none" :placeholder="i18n.withdrawalPasswordText"> |
||||
|
</u-input> |
||||
|
</u-form-item> |
||||
|
<!-- 邀请码 --> |
||||
|
<u-form-item class="input-item" prop="InvitationCode" ref="item1"> |
||||
|
<u-icon class="icon" |
||||
|
:name="userInfo.InvitationCode ? '../../static/login/Invitation_pr.png' : '../../static/login/Invitation_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<u-input class="input" v-model="userInfo.InvitationCode" color="#fff" fontSize="32rpx" border="none" |
||||
|
:placeholder="i18n.InvitationCodeText"> |
||||
|
</u-input> |
||||
|
</u-form-item> |
||||
|
</u--form> |
||||
|
<view class="agree"> |
||||
|
<u-icon class="check" @click="agreeFlag = !agreeFlag" |
||||
|
:name="agreeFlag ? '../../static/login/Checkbox_pr.png' : '../../static/login/Checkbox_de.png'" |
||||
|
size="48rpx" width="48rpx"></u-icon> |
||||
|
<view class="text">{{ i18n.agreeText }}<span>{{ i18n.Terms }}</span>{{ i18n.and }}<span>{{ |
||||
|
i18n.Conditions |
||||
|
}}</span></view> |
||||
|
</view> |
||||
|
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="!agreeFlag">{{ i18n.SignUp }} |
||||
|
</u-button> |
||||
|
<view class="signUp">{{ i18n.haveAccount }}<navigator class="navigator" url="./index">{{ i18n.Login }} |
||||
|
</navigator> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
|
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import UButton from '../../uview-ui/components/u-button/u-button.vue' |
||||
|
export default { |
||||
|
name: "register", |
||||
|
data() { |
||||
|
return { |
||||
|
userInfo: { |
||||
|
name: "", |
||||
|
password: "", |
||||
|
}, |
||||
|
rules: { |
||||
|
email: { |
||||
|
type: "string", |
||||
|
required: true, |
||||
|
message: this.$t("login.emailInputMessage"), |
||||
|
trigger: ["blur", "change"], |
||||
|
}, |
||||
|
verificationCode: { |
||||
|
type: "string", |
||||
|
required: true, |
||||
|
message: this.$t("login.verificationCodeMessage"), |
||||
|
trigger: ["blur", "change"] |
||||
|
}, |
||||
|
password: { |
||||
|
type: "string", |
||||
|
required: true, |
||||
|
message: this.$t("login.passwordInputMessage"), |
||||
|
trigger: ["blur", "change"] |
||||
|
}, |
||||
|
}, |
||||
|
agreeFlag: false, |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
i18n() { |
||||
|
return this.$t("login"); |
||||
|
}, |
||||
|
}, |
||||
|
onLoad() { |
||||
|
// console.log(this.$t('login.emailInputMessage')); |
||||
|
}, |
||||
|
onShow() { }, |
||||
|
methods: {}, |
||||
|
components: { UButton } |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.main { |
||||
|
|
||||
|
.body { |
||||
|
padding: 0 64rpx; |
||||
|
overflow: hidden; |
||||
|
|
||||
|
.welcomeText { |
||||
|
margin-top: 48rpx; |
||||
|
font-size: 48rpx; |
||||
|
font-weight: 800; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.signInText { |
||||
|
font-size: 32rpx; |
||||
|
text-align: center; |
||||
|
color: #A2A0A8; |
||||
|
} |
||||
|
|
||||
|
.form { |
||||
|
font-size: 32rpx; |
||||
|
margin-top: 48rpx; |
||||
|
|
||||
|
.input-item { |
||||
|
height: 112rpx; |
||||
|
line-height: 112rpx; |
||||
|
background: #211F32; |
||||
|
margin-bottom: 48rpx; |
||||
|
border-radius: 32rpx; |
||||
|
|
||||
|
.icon { |
||||
|
margin: 0 24rpx; |
||||
|
} |
||||
|
|
||||
|
/deep/.u-form-item__body { |
||||
|
padding: 0; |
||||
|
} |
||||
|
|
||||
|
.input { |
||||
|
height: 112rpx; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.vCode { |
||||
|
|
||||
|
.getVCodeBtn { |
||||
|
// position: absolute; |
||||
|
width: 154rpx; |
||||
|
height: 56rpx; |
||||
|
right: 28rpx; |
||||
|
// top: 14px; |
||||
|
border-radius: 8px; |
||||
|
line-height: 56rpx; |
||||
|
font-size: 24rpx; |
||||
|
color: #00E8A2 !important; |
||||
|
padding: 0; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.agree { |
||||
|
font-size: 28rpx; |
||||
|
|
||||
|
.check { |
||||
|
display: inline-block; |
||||
|
vertical-align: top; |
||||
|
margin-right: 32rpx; |
||||
|
} |
||||
|
|
||||
|
.text { |
||||
|
display: inline-block; |
||||
|
width: 542rpx; |
||||
|
} |
||||
|
|
||||
|
span { |
||||
|
cursor: pointer; |
||||
|
color: #00E8A2; |
||||
|
padding: 0 10rpx; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.button { |
||||
|
margin-top: 64rpx; |
||||
|
height: 112rpx; |
||||
|
line-height: 112rpx; |
||||
|
border-radius: 32rpx; |
||||
|
font-size: 32rpx; |
||||
|
color: #15141F !important; |
||||
|
} |
||||
|
|
||||
|
.signUp { |
||||
|
margin: 48rpx 0; |
||||
|
text-align: center; |
||||
|
font-size: 32rpx; |
||||
|
|
||||
|
.navigator { |
||||
|
display: inline; |
||||
|
color: #00E8A2; |
||||
|
padding: 0 10rpx; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,13 @@ |
|||||
|
|
||||
|
从git下拉带代码后 |
||||
|
项目中的 \node_modules\uview-ui\components\u-form\u-form.vue 第17行要添加下面这行代码 |
||||
|
this.errorType === 'toast' ?uni.$u.toast(errors[0].message): |
||||
|
|
||||
|
添加后是这样的: |
||||
|
if (uni.$u.test.array(errors)) { |
||||
|
errorsRes.push(...errors); |
||||
|
childErrors.push(...errors); |
||||
|
} |
||||
|
this.errorType === 'toast' ?uni.$u.toast(errors[0].message): |
||||
|
child.message = |
||||
|
childErrors[0]?.message ?? null; |
||||
|
After Width: | Height: | Size: 331 B |
|
After Width: | Height: | Size: 324 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 257 B |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 254 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 874 KiB |
|
After Width: | Height: | Size: 371 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 634 B |
|
After Width: | Height: | Size: 619 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 988 B |
|
After Width: | Height: | Size: 957 B |
|
Before Width: | Height: | Size: 847 B |
|
Before Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1011 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 567 B |
|
Before Width: | Height: | Size: 599 B |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
@ -1,28 +1,81 @@ |
|||||
import Vue from 'vue'; |
import Vue from 'vue'; |
||||
import qs from 'qs' |
import qs from 'qs' |
||||
const api = { |
const api = { |
||||
//获取NFT项目列表
|
//---------------------------------account---------------------------------
|
||||
getNftProjectList: (params) => Vue.prototype.$axios.get('/api/nft/getNftProjectList?' + qs.stringify(params)), |
siteInfo: () => Vue.prototype.$axios.get('/api/home/siteInfo'), |
||||
//添加NFT收藏品
|
register: (params) => Vue.prototype.$axios.post('/api/home/register',params), |
||||
addNftCollection: (params) => Vue.prototype.$axios.post('/api/nft/addNftCollection', qs.stringify(params)), |
login: (params) => Vue.prototype.$axios.post('/api/user/login',params), |
||||
getNftCollectionList: (params) => Vue.prototype.$axios.get('/api/nft/getNftCollectionList?' + qs.stringify( |
loginOut: (params) => Vue.prototype.$axios.post('/api/user/loginOut',params), |
||||
params)), |
forgotPassword: (params) => Vue.prototype.$axios.post('/api/user/forgotPassword',params), |
||||
getContractInfoList: (params) => Vue.prototype.$axios.get('/api/contract/getContractInfoList?' + qs.stringify(params)), |
updatePassword: (params) => Vue.prototype.$axios.post('/api/user/updatePassword',params), |
||||
//获取汇率
|
userInfo: (params) => Vue.prototype.$axios.post('/api/user/userInfo',params), |
||||
getCoinRate: (params) => Vue.prototype.$axios.get('/api/coinRate/getCoinRate?' + qs.stringify(params)), |
updateNickname: (params) => Vue.prototype.$axios.post('/api/user/updateNickname',params), |
||||
getChainDataList: (params) => Vue.prototype.$axios.get('/api/chainData/getChainDataList?' + qs.stringify(params)), |
updateGender: (params) => Vue.prototype.$axios.post('/api/user/updateGender',params), |
||||
getCoinTickerList: (params) => Vue.prototype.$axios.get('/api/coinTicker/getCoinTickerList'), |
|
||||
getBalance: (params) => Vue.prototype.$axios.get('/api/balance/getBalance?' + qs.stringify(params)), |
|
||||
versionUpgrade: (params) => Vue.prototype.$axios.get('/api/home/versionUpgrade?' + qs.stringify(params)), |
//--------------------------------- free ---------------------------------
|
||||
checkIp: () => Vue.prototype.$axios.get('/x/resource/ip'), |
imgCode: () => Vue.prototype.$axios.get('/api/home/imgCode'), |
||||
getConfig: (params) => Vue.prototype.$axios.get('/api/home/getConfig?'+ qs.stringify(params)), |
sendSmsCode: (params) => Vue.prototype.$axios.post('/api/home/sendSmsCode',params), |
||||
//--------------------------------- free ---------------------------------
|
article: (params) => Vue.prototype.$axios.post('/api/index/article',params), |
||||
getSearchContract: (params) => Vue.prototype.$axios.get('/api/contract/getSearchContract?' + qs.stringify(params)), |
appVersion: (params) => Vue.prototype.$axios.post('/api/index/appVersion',params), |
||||
|
|
||||
getAuAdList: (params) => Vue.prototype.$axios.get('/api/home/getAuAdList?'+ qs.stringify(params)), |
info: () => Vue.prototype.$axios.post('/api/index/info'), |
||||
// 令牌token接口
|
//--------------------------------- bet ---------------------------------
|
||||
addTokenInfo: (params) => Vue.prototype.$axios.post('/api/token/addTokenInfo', qs.stringify(params)), |
lotteryClassList: (params) => Vue.prototype.$axios.post('/api/lottery/lotteryClassList',params), |
||||
} |
nextLotteryPeriod: (params) => Vue.prototype.$axios.post('/api/lottery/nextLotteryPeriod',params), |
||||
|
bettingConfig: (params) => Vue.prototype.$axios.post('/api/lottery/bettingConfig',params), |
||||
|
betting: (params) => Vue.prototype.$axios.post('/api/lottery/betting',params), |
||||
|
lotteryRecords: (params) => Vue.prototype.$axios.post('/api/lottery/lotteryRecords',params), |
||||
|
myLotteryRecords: (params) => Vue.prototype.$axios.post('/api/lottery/myLotteryRecords',params), |
||||
|
|
||||
|
|
||||
|
//--------------------------------- me ---------------------------------
|
||||
|
getPayType: (params) => Vue.prototype.$axios.post('/api/recharge/getPayType',params), |
||||
|
rechargeConfig: (params) => Vue.prototype.$axios.post('/api/recharge/rechargeConfig',params), |
||||
|
recharge: (params) => Vue.prototype.$axios.post('/api/recharge/recharge',params), |
||||
|
rechargeList: (params) => Vue.prototype.$axios.post('/api/recharge/rechargeList',params), |
||||
|
toPay: (params) => Vue.prototype.$axios.post('/api/recharge/toPay',params), |
||||
|
withdrawConfig: (params) => Vue.prototype.$axios.post('/api/withdraw/withdrawConfig',params), |
||||
|
withdrawServiceCharge: (params) => Vue.prototype.$axios.post('/api/withdraw/withdrawServiceCharge',params), |
||||
|
withdraw: (params) => Vue.prototype.$axios.post('/api/withdraw/withdraw',params), |
||||
|
withdrawList: (params) => Vue.prototype.$axios.post('/api/withdraw/withdrawList',params), |
||||
|
billList: (params) => Vue.prototype.$axios.post('/api/summary/billList',params), |
||||
|
|
||||
|
//--------------------------------- invite ---------------------------------
|
||||
|
inviteCode: (params) => Vue.prototype.$axios.post('/api/user/inviteCode',params), |
||||
|
bonusOut: (params) => Vue.prototype.$axios.post('/api/summary/bonusOut',params), |
||||
|
bonusOutRecords: (params) => Vue.prototype.$axios.post('/api/summary/bonusOutRecords',params), |
||||
|
promotionRecords: (params) => Vue.prototype.$axios.post('/api/summary/promotionRecords',params), |
||||
|
bonusRecords: (params) => Vue.prototype.$axios.post('/api/summary/bonusRecords',params), |
||||
|
bonusSummary: (params) => Vue.prototype.$axios.post('/api/summary/bonusSummary',params), |
||||
|
//--------------------------------- bankCard ---------------------------------
|
||||
|
bankcardList: (params) => Vue.prototype.$axios.post('/api/user/bankcardList',params), |
||||
|
bindBank: (params) => Vue.prototype.$axios.post('/api/user/bindBank',params), |
||||
|
delBankCard: (params) => Vue.prototype.$axios.post('/api/user/delBankCard',params), |
||||
|
|
||||
|
//--------------------------------- address ---------------------------------
|
||||
|
addressList: (params) => Vue.prototype.$axios.post('/api/user/addressList',params), |
||||
|
addressSave: (params) => Vue.prototype.$axios.post('/api/user/addressSave',params), |
||||
|
delAddress: (params) => Vue.prototype.$axios.post('/api/user/delAddress',params), |
||||
|
//--------------------------------- goods ---------------------------------
|
||||
|
banner: () => Vue.prototype.$axios.get('/api/home/banner'), |
||||
|
goodsList: (params) => Vue.prototype.$axios.post('/api/index/goodsList',params), |
||||
|
goodsDetail: (params) => Vue.prototype.$axios.post('/api/index/goods',params), |
||||
|
|
||||
|
//--------------------------------- moni ---------------------------------
|
||||
|
// lotteryClassListM: (params) => Vue.prototype.$axios.post('/api/demo/lotteryClassListDemo',params),
|
||||
|
nextLotteryPeriodM: (params) => Vue.prototype.$axios.post('/api/demo/nextLotteryPeriodDemo',params), |
||||
|
bettingConfigM: (params) => Vue.prototype.$axios.post('/api/demo/bettingConfigDemo',params), |
||||
|
bettingM: (params) => Vue.prototype.$axios.post('/api/demo/bettingDemo',params), |
||||
|
lotteryRecordsM: (params) => Vue.prototype.$axios.post('/api/demo/lotteryRecordsDemo',params), |
||||
|
myLotteryRecordsM: (params) => Vue.prototype.$axios.post('/api/demo/myLotteryRecordsDemo',params), |
||||
|
//--------------------------------- hongbao ---------------------------------
|
||||
|
launchRedEnvelop: (params) => Vue.prototype.$axios.post('/api/user/launchRedEnvelop',params), |
||||
|
redEnvelopList: (params) => Vue.prototype.$axios.post('/api/user/redEnvelopList',params), |
||||
|
cancelRedEnvelop: (params) => Vue.prototype.$axios.post('/api/user/cancelRedEnvelop',params), |
||||
|
redEnvelop: (params) => Vue.prototype.$axios.post('/api/user/redEnvelop',params), |
||||
|
receiveRedEnvelop: (params) => Vue.prototype.$axios.post('/api/user/receiveRedEnvelop',params), |
||||
|
} |
||||
|
|
||||
|
|
||||
export default api |
export default api |
||||
|
|||||
@ -0,0 +1,14 @@ |
|||||
|
const H5 = '/start'; |
||||
|
const H5_KEY = 'key=PBcGdWvA7dUintx7WNOR11cOdCrEpasM'; |
||||
|
|
||||
|
const APP = 'https://api.wingold6.com'; //正式
|
||||
|
// const APP = 'https://apitest.luck-work.com'; //测试
|
||||
|
const APP_KEY = 'key=PBcGdWvA7dUintx7WNOR11cOdCrEpasM'; |
||||
|
const showDialog = true |
||||
|
export default { |
||||
|
H5, |
||||
|
H5_KEY, |
||||
|
APP, |
||||
|
APP_KEY, |
||||
|
showDialog, |
||||
|
} |
||||
@ -0,0 +1,100 @@ |
|||||
|
var utils = { |
||||
|
checkEmail: function(email) { |
||||
|
return RegExp( |
||||
|
/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/) |
||||
|
.test(email); |
||||
|
}, |
||||
|
checkMobile: function(mobile) { |
||||
|
return RegExp(/^1[34578]\d{9}$/).test(mobile); |
||||
|
}, |
||||
|
caculateTime: function(timeZome, time) { |
||||
|
return time + (timeZome * 1000 * 60 * 60); |
||||
|
}, |
||||
|
formatyymmdd: function(time) { |
||||
|
var date = new Date(time) |
||||
|
console.log(date,5555655) |
||||
|
var localTime = date.getTime(); |
||||
|
var localOffset = date.getTimezoneOffset() * 60000 //获得当地时间偏移的毫秒数
|
||||
|
var utc = localTime + localOffset //utc即GMT时间
|
||||
|
var offset = 8; //东8区
|
||||
|
var beijing = utc + (3600000 * offset); |
||||
|
date = new Date(beijing); |
||||
|
var Y = date.getFullYear() |
||||
|
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) |
||||
|
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() |
||||
|
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() |
||||
|
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() |
||||
|
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() |
||||
|
console.log( M + '/' + D + '/' + Y,5454545454); |
||||
|
return M + '/' + D + '/' + Y; |
||||
|
|
||||
|
}, |
||||
|
formatyymmdd2: function(time) { |
||||
|
var date = new Date(time) |
||||
|
var localTime = date.getTime(); |
||||
|
var localOffset = date.getTimezoneOffset() * 60000 ; //获得当地时间偏移的毫秒数
|
||||
|
var utc = localTime + localOffset; //utc即GMT时间
|
||||
|
var offset = 8; //东8区
|
||||
|
var beijing = utc + (3600000 * offset); |
||||
|
date = new Date(beijing); |
||||
|
var Y = date.getFullYear() |
||||
|
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) |
||||
|
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() |
||||
|
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() |
||||
|
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() |
||||
|
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() |
||||
|
return Y + M + D; |
||||
|
}, |
||||
|
formatyymmddhhmmss: function(time) { |
||||
|
var date = new Date(time) |
||||
|
var localTime = date.getTime() |
||||
|
var localOffset = date.getTimezoneOffset() * 60000 //获得当地时间偏移的毫秒数
|
||||
|
var utc = localTime + localOffset; //utc即GMT时间
|
||||
|
var offset = 8 //东8区
|
||||
|
var beijing = utc + (3600000 * offset); |
||||
|
date = new Date(beijing) |
||||
|
var Y = date.getFullYear() |
||||
|
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) |
||||
|
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() |
||||
|
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() |
||||
|
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; |
||||
|
}, |
||||
|
formathhmm: function(time) { |
||||
|
var date = new Date(time) |
||||
|
var localTime = date.getTime(); |
||||
|
var localOffset = date.getTimezoneOffset() * 60000 ; //获得当地时间偏移的毫秒数
|
||||
|
var utc = localTime + localOffset; //utc即GMT时间
|
||||
|
var offset = 8; //东8区
|
||||
|
var beijing = utc + (3600000 * offset); |
||||
|
date = new Date(beijing); |
||||
|
var Y = date.getFullYear() |
||||
|
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) |
||||
|
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() |
||||
|
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() |
||||
|
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() |
||||
|
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() |
||||
|
return h + ':' + m; |
||||
|
}, |
||||
|
//客户端时间转换为北京时间
|
||||
|
getBeijingtime: function() { |
||||
|
//获得当前运行环境时间
|
||||
|
let d = new Date(); |
||||
|
let currentDate = new Date(); |
||||
|
let tmpHours = currentDate.getHours(); |
||||
|
//算得时区
|
||||
|
let time_zone = -d.getTimezoneOffset() / 60; |
||||
|
if (time_zone < 0) { |
||||
|
time_zone = Math.abs(time_zone) + 8; |
||||
|
currentDate.setHours(tmpHours + time_zone); |
||||
|
} else { |
||||
|
time_zone -= 8; |
||||
|
currentDate.setHours(tmpHours - time_zone); |
||||
|
} |
||||
|
return currentDate; |
||||
|
}, |
||||
|
} |
||||
|
|
||||
|
export default utils |
||||
@ -1,16 +1,66 @@ |
|||||
// en.js
|
// en.js
|
||||
export default { |
export default { |
||||
|
// tab bar 相关
|
||||
|
tabBar:{ |
||||
|
Home:'Home', |
||||
|
Markets:'Markets', |
||||
|
Charity:'Charity', |
||||
|
Subscription:'Subscription', |
||||
|
Me:'Me', |
||||
|
}, |
||||
|
// 登陆相关页面
|
||||
login: { |
login: { |
||||
welcomeText:'Hi, Welcome Back!', |
// 公共字段
|
||||
signInText:'Sign in to your account.', |
Login: 'Login', |
||||
emailInputText:'Enter email address', |
SignUp: 'Sign Up', |
||||
passwordInputText:'Password', |
ForgotPassword: 'Forgot password', |
||||
forgotText:'Forgot Password?', |
// login
|
||||
loginText:'Login', |
welcomeText: 'Hi, Welcome Back!', |
||||
notAccountText:'Don’t have account?', |
signInText: 'Sign in to your account.', |
||||
signUpText:'Sign Up', |
emailInputText: 'Enter email address', |
||||
|
emailInputMessage: 'Please enter your email address', |
||||
|
passwordInputText: 'Password', |
||||
|
passwordInputMessage: 'Please enter your password', |
||||
|
forgotText: 'Forgot Password?', |
||||
|
notAccountText: 'Don’t have account?', |
||||
agreeToBackup: 'Please check the prompt to agree to backup', |
agreeToBackup: 'Please check the prompt to agree to backup', |
||||
checkTheTermsOfService: 'Please review and agree to the terms of service', |
checkTheTermsOfService: 'Please review and agree to the terms of service', |
||||
|
|
||||
|
// register
|
||||
|
registerWelcomeText: "Getting Started", |
||||
|
registerCreate: "Create an account to continue!", |
||||
|
verificationCodeText: 'Verification Code', |
||||
|
verificationCodeMessage: 'Please enter verification code', |
||||
|
passwordText: 'Create The Login Password', |
||||
|
passwordMessage: 'Please enter your password', |
||||
|
confirmPasswordText: 'Confirm Login Password', |
||||
|
confirmPasswordMessage: 'Please confirm login password', |
||||
|
withdrawalPasswordText: 'Create The Withdrawal Password', |
||||
|
withdrawalPasswordMessage: 'Please enter the withdrawal password', |
||||
|
InvitationCodeText: 'Invitation code', |
||||
|
InvitationCodeMessage: 'Please enter the invitation code', |
||||
|
agreeText: 'By creating an account, you agree to our ', |
||||
|
Terms: 'Terms', |
||||
|
and: 'and', |
||||
|
Conditions: 'Conditions', |
||||
|
haveAccount: 'Already have an account?', |
||||
|
|
||||
|
// forget
|
||||
|
Save: 'Save', |
||||
|
}, |
||||
|
|
||||
|
// 首页相关页面
|
||||
|
home: { |
||||
|
// 公共字段
|
||||
|
HOME: 'HOME', |
||||
|
// 首页
|
||||
|
customerService: 'Customer Service', |
||||
|
homeMessage: `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...`,
|
||||
|
Recharge: 'Recharge', |
||||
|
Mine: 'Mine', |
||||
|
Subcription: 'Subcription', |
||||
|
TodaySteps:"Today's steps", |
||||
|
ReceiveEarnings:"Receive yesterday's earnings", |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -1,16 +1,38 @@ |
|||||
// zh.js
|
// zh.js
|
||||
export default { |
export default { |
||||
login: { |
login: { |
||||
welcomeText:'Hi, Welcome Back!', |
// 公共字段
|
||||
signInText:'Sign in to your account.', |
Login:'Login', |
||||
emailInputText:'Enter email address', |
SignUp:'Sign Up', |
||||
passwordInputText:'Password', |
//login
|
||||
forgotText:'Forgot Password?', |
welcomeText:'你好,欢迎回来!', |
||||
loginText:'Login', |
signInText:'请登录您的账户.', |
||||
|
emailInputText:'请输入邮箱', |
||||
|
emailInputMessage:'邮箱密码不能为空', |
||||
|
passwordInputText:'请输入密码', |
||||
|
passwordInputMessage:'密码不能为空', |
||||
|
forgotText:'忘记密码?', |
||||
notAccountText:'Don’t have account?', |
notAccountText:'Don’t have account?', |
||||
signUpText:'Sign Up', |
|
||||
agreeToBackup: '请勾选同意备份的提示', |
agreeToBackup: '请勾选同意备份的提示', |
||||
checkTheTermsOfService: '请查看并同意服务条款', |
checkTheTermsOfService: '请查看并同意服务条款', |
||||
|
|
||||
|
// register
|
||||
|
registerWelcomeText: "Getting Started", |
||||
|
registerCreate: "Create an account to continue!", |
||||
|
verificationCodeText: 'Verification Code', |
||||
|
verificationCodeMessage: 'Please enter verification code', |
||||
|
passwordText: 'Create The Login Password', |
||||
|
passwordMessage: 'Please enter your password', |
||||
|
confirmPasswordText: 'Confirm Login Password', |
||||
|
confirmPasswordMessage: 'Please confirm login password', |
||||
|
withdrawalPasswordText: 'Create The Withdrawal Password', |
||||
|
withdrawalPasswordMessage: 'Please enter the withdrawal password', |
||||
|
InvitationCodeText: 'Invitation code', |
||||
|
InvitationCodeMessage: 'Please enter the invitation code', |
||||
|
aggreeText :'By creating an account, you aggree to our ', |
||||
|
Terms:'Terms', |
||||
|
and:'and', |
||||
|
Conditions:'Conditions', |
||||
|
|
||||
} |
} |
||||
} |
} |
||||