|
|
@ -7,8 +7,10 @@ |
|
|
|
<!-- #ifdef H5 --> |
|
|
|
<view class="nav-head-H5"> |
|
|
|
<!-- #endif --> |
|
|
|
<u-button class="serviceButton" color="#323045" @click="getContact">{{ i18n.customerService }} |
|
|
|
</u-button> |
|
|
|
<!-- <u-button class="serviceButton" color="#323045" @click="getContact">{{ i18n.customerService }} |
|
|
|
</u-button> --> |
|
|
|
<a class="serviceButton" target="_blank" :href="href" color="#323045" >{{ i18n.customerService }} |
|
|
|
</a> |
|
|
|
<view class="languageBtn" @click.stop="languageShow = true"> |
|
|
|
{{ langTrue }} |
|
|
|
</view> |
|
|
@ -30,7 +32,7 @@ |
|
|
|
<!-- #endif --> |
|
|
|
</u-swiper> |
|
|
|
<!-- 消息 --> |
|
|
|
<view class="message" @click="go('/pages/me/notification')"> |
|
|
|
<view class="message" @click="go('inner','/pages/me/notification')"> |
|
|
|
<u-icon class="icon" name="../../static/home/ic_proclamation.png" size="60rpx" width="60rpx"> |
|
|
|
</u-icon> |
|
|
|
<!-- <view class="text">{{ i18n.homeMessage }}</view> --> |
|
|
@ -62,33 +64,20 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 步数 --> |
|
|
|
<view class="steps"> |
|
|
|
<view class="content"> |
|
|
|
<view class="title">{{ i18n.TodaySteps }}</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view id="chart" :stepsNum="stepsNum" :stepTarget="stepTarget" |
|
|
|
:change:stepTarget="echarts.stepTargetReceive" :change:stepsNum="echarts.receive" |
|
|
|
style="width: 280rpx;height:280rpx; font-size: 40rpx;"> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <canvas id="chart" ref="chart" style="width: 280rpx;height:280rpx; font-size: 40rpx;"></canvas> --> |
|
|
|
<u-button class="button" color="#00E8A2" @click="closeModalShow=true">{{ i18n.ReceiveEarnings }} |
|
|
|
</u-button> |
|
|
|
|
|
|
|
<view v-for="(item, index) in middleList" :key="index"> |
|
|
|
<view class="steps" > |
|
|
|
<image :src="baseURL+item.adImgPath" @click="go(item.content,item.adUrl)"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- close确认框 --> |
|
|
|
<u-modal :show="closeModalShow" :confirmText="i18n.Confirm" :cancelText="i18n.Cancel" |
|
|
|
:showCancelButton="true" :title="i18n.WarmTips" :content='i18n.WarmTipsText' @confirm="closeConfirm" |
|
|
|
@cancel="closeModalShow = false" confirmColor="#00E8A2" cancelColor="#96959E"> |
|
|
|
</u-modal> |
|
|
|
|
|
|
|
<!-- 播放器 --> |
|
|
|
<view class="videoList" v-for="(item, index) in videoList" :key="index" @click="playVideo(item.adText)"> |
|
|
|
<view class="videoImage" :style="`background-image: url(${baseURL+item.adImgPath});background-repeat: no-repeat; |
|
|
|
<view v-show="item.adText!=''" class="videoImage" :style="`background-image: url(${baseURL+item.adImgPath});background-repeat: no-repeat; |
|
|
|
background-size: cover;`"> |
|
|
|
<view class="VideoBg"> |
|
|
|
<view class="VideoLogo"></view> |
|
|
@ -113,8 +102,6 @@ |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <view class="" @click="startStep"> |
|
|
|
开始记步 |
|
|
|
</view> |
|
|
@ -185,16 +172,19 @@ |
|
|
|
stepsNum: 0, // 当前步数 |
|
|
|
stepTarget: 5000, // 目标步数 |
|
|
|
myChart: null, |
|
|
|
middleList:null, |
|
|
|
href:"" |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
this.baseURL = constant.BASE_URL |
|
|
|
this.getbanner(); |
|
|
|
this.getMiddle(); |
|
|
|
this.noticeList(); |
|
|
|
this.getUserInfoBalance(); |
|
|
|
|
|
|
|
// #ifdef APP-PLUS |
|
|
|
// this.appVersion() |
|
|
|
this.appVersion() |
|
|
|
// #endif |
|
|
|
|
|
|
|
}, |
|
|
@ -224,6 +214,7 @@ |
|
|
|
this.stepsNum = 5000; |
|
|
|
this.updateSteps(); |
|
|
|
// #endif |
|
|
|
this.getContact(); |
|
|
|
}, |
|
|
|
|
|
|
|
onHide() { |
|
|
@ -235,11 +226,17 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
logOut() { |
|
|
|
plus.runtime.openURL(this.conInfo.appUrl); |
|
|
|
}, |
|
|
|
|
|
|
|
getMiddle(){ |
|
|
|
api.indexBanner({ |
|
|
|
'mark': 'APP_INDEX_MIDDLE' |
|
|
|
}).then(res => { |
|
|
|
this.middleList=res |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 校验APP应用版本 |
|
|
|
appVersion() { |
|
|
|
console.log("校验APP应用版本", uni.getSystemInfoSync().platform) |
|
|
@ -253,7 +250,7 @@ |
|
|
|
// console.log(wgtinfo.versionCode, response.versionCode) |
|
|
|
let param = { |
|
|
|
'appId': uni.getSystemInfoSync().platform, |
|
|
|
'versionCode': '1.0.0' |
|
|
|
'versionCode': wgtinfo.version |
|
|
|
} |
|
|
|
console.log(param) |
|
|
|
this.$api.appVersion(param).then(response => { |
|
|
@ -292,7 +289,6 @@ |
|
|
|
// console.log(today) |
|
|
|
// console.log(uni.getStorageSync("stepsNumDate")) |
|
|
|
// console.log(stepsNum_date) |
|
|
|
|
|
|
|
if (stepsNum_date) { |
|
|
|
if (today != stepsNum_date.date) { |
|
|
|
uni.setStorageSync("stepsNumDate", null); |
|
|
@ -335,13 +331,21 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
bannerClick(i) { |
|
|
|
// #ifdef APP-PLUS |
|
|
|
plus.runtime.openURL(this.bannerList[i]) |
|
|
|
// #endif |
|
|
|
// #ifdef H5 |
|
|
|
var href = this.bannerList[i] |
|
|
|
window.open(href, '_blank'); |
|
|
|
// #endif |
|
|
|
if(this.bannerList[i].content=='inner'){ |
|
|
|
uni.navigateTo({ |
|
|
|
url: this.bannerList[i].adUrl |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
// #ifdef APP-PLUS |
|
|
|
plus.runtime.openURL(this.bannerList[i].adUrl) |
|
|
|
// #endif |
|
|
|
// #ifdef H5 |
|
|
|
var href = this.bannerList[i].adUrl |
|
|
|
window.open(href, '_blank'); |
|
|
|
// #endif |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
// 获取用户余额信息 |
|
|
@ -417,18 +421,25 @@ |
|
|
|
if (res.errCode == 'SYS.0012') { |
|
|
|
uni.$u.toast(res.errMsg); |
|
|
|
} else { |
|
|
|
// #ifdef APP-PLUS |
|
|
|
// console.log(res.url) |
|
|
|
plus.runtime.openURL(res.url) |
|
|
|
// #endif |
|
|
|
// #ifdef H5 |
|
|
|
var href = res.url |
|
|
|
window.open(href, '_blank'); |
|
|
|
// #endif |
|
|
|
|
|
|
|
this.href=res.url; |
|
|
|
// // #ifdef APP-PLUS |
|
|
|
// // console.log(res.url) |
|
|
|
// plus.runtime.openURL(res.url) |
|
|
|
// // #endif |
|
|
|
// // #ifdef H5 |
|
|
|
// var href = res.url |
|
|
|
// window.open(href, '_blank'); |
|
|
|
// // #endif |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getCharity() { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/home/caringwomen' |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取未读的公告 |
|
|
|
getNoReadNotice() { |
|
|
@ -457,10 +468,21 @@ |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
go(url) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: url |
|
|
|
}) |
|
|
|
go(type,url) { |
|
|
|
if(type=='inner'){ |
|
|
|
uni.navigateTo({ |
|
|
|
url: url |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
// #ifdef APP-PLUS |
|
|
|
plus.runtime.openURL(url) |
|
|
|
// #endif |
|
|
|
// #ifdef H5 |
|
|
|
var href = url |
|
|
|
window.open(href, '_blank'); |
|
|
|
// #endif |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -487,7 +509,10 @@ |
|
|
|
// this.bannerList = res |
|
|
|
for (var i = 0; i < res.length; i++) { |
|
|
|
this.swiperList.push(this.baseURL + res[i].adImgPath) |
|
|
|
this.bannerList.push(res[i].adUrl) |
|
|
|
this.bannerList.push({ |
|
|
|
content:res[i].content, |
|
|
|
adUrl:res[i].adUrl |
|
|
|
}) |
|
|
|
} |
|
|
|
this.videoList = res |
|
|
|
// banner图按照接口返回的顺序 但是底部视频倒序放 |
|
|
@ -612,7 +637,6 @@ |
|
|
|
// }else{ |
|
|
|
// this.myChart.setOption(this.option) |
|
|
|
// } |
|
|
|
|
|
|
|
}, |
|
|
|
stepTargetReceive(newValue, oldValue, ownerVm, vm) { |
|
|
|
|
|
|
@ -723,7 +747,6 @@ |
|
|
|
.main { |
|
|
|
padding-bottom: 198rpx; // 避免底部TabBar盖住内容 |
|
|
|
|
|
|
|
|
|
|
|
.nav-head-H5 { |
|
|
|
position: fixed; |
|
|
|
top: 0rpx; |
|
|
@ -746,6 +769,12 @@ |
|
|
|
padding: 0; |
|
|
|
margin: 20rpx 180rpx 0 48rpx; |
|
|
|
vertical-align: top; |
|
|
|
background-color: rgb(50, 48, 69); |
|
|
|
border-color: rgb(50, 48, 69); |
|
|
|
border-width: 1px; |
|
|
|
border-style: solid; |
|
|
|
text-align: center; |
|
|
|
text-decoration: none; |
|
|
|
} |
|
|
|
|
|
|
|
.languageBtn { |
|
|
@ -921,26 +950,50 @@ |
|
|
|
.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; |
|
|
|
|
|
|
|
margin-top: 32rpx; |
|
|
|
|
|
|
|
|
|
|
|
image{ |
|
|
|
width: 100%; |
|
|
|
border-radius: 16px; |
|
|
|
} |
|
|
|
.content { |
|
|
|
margin-left: 246rpx; |
|
|
|
//margin-left: 246rpx; |
|
|
|
|
|
|
|
height: 100%; |
|
|
|
display: flex; |
|
|
|
justify-content: space-evenly; |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
.title { |
|
|
|
font-size: 48rpx; |
|
|
|
height: 64rpx; |
|
|
|
line-height: 64rpx; |
|
|
|
width: 100%; |
|
|
|
padding-left: 10rpx; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
overflow: hidden; //超出部分隐藏 |
|
|
|
|
|
|
|
background-image: linear-gradient(to right,transparent,#00E8A2,transparent); |
|
|
|
align-items: center; |
|
|
|
font-size: 34rpx; |
|
|
|
height: 72rpx; |
|
|
|
line-height: 72rpx; |
|
|
|
} |
|
|
|
.slogan{ |
|
|
|
margin-left: 28%; |
|
|
|
width: 72%; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
padding-top:80rpx; |
|
|
|
font-weight: bold; |
|
|
|
text-align: center; |
|
|
|
padding-right:20rpx; |
|
|
|
align-items: center; |
|
|
|
font-size: 36rpx; |
|
|
|
height:150rpx; |
|
|
|
line-height: 50rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.chart { |
|
|
@ -949,12 +1002,13 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.button { |
|
|
|
width: 386rpx; |
|
|
|
height: 60rpx; |
|
|
|
width: 326rpx; |
|
|
|
height: 70rpx; |
|
|
|
line-height: 60rpx; |
|
|
|
border-radius: 40rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
color: #15141F !important; |
|
|
|
border-radius: 100rpx; |
|
|
|
font-size: 30rpx; |
|
|
|
font-weight: bold; |
|
|
|
color: #FFF !important; |
|
|
|
padding: 0; |
|
|
|
margin-right: 24rpx; |
|
|
|
} |
|
|
@ -1035,4 +1089,4 @@ |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |