Browse Source

首页升级

master
vee 3 years ago
parent
commit
5d5cf94658
  1. BIN
      .DS_Store
  2. 7
      manifest.json
  3. 90
      pages/home/index.vue
  4. 4
      pages/subscription/details.vue

BIN
.DS_Store

Binary file not shown.

7
manifest.json

@ -2,8 +2,8 @@
"name" : "Same home", "name" : "Same home",
"appid" : "__UNI__C4028F6", "appid" : "__UNI__C4028F6",
"description" : "", "description" : "",
"versionName" : "1.0.3", "versionName" : "1.0.4",
"versionCode" : 103, "versionCode" : 104,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -16,6 +16,9 @@
"autoclose" : true, "autoclose" : true,
"delay" : 0 "delay" : 0
}, },
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
/* */ /* */
"modules" : { "modules" : {
"VideoPlayer" : {} "VideoPlayer" : {}

90
pages/home/index.vue

@ -30,7 +30,7 @@
<!-- #endif --> <!-- #endif -->
</u-swiper> </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 class="icon" name="../../static/home/ic_proclamation.png" size="60rpx" width="60rpx">
</u-icon> </u-icon>
<!-- <view class="text">{{ i18n.homeMessage }}</view> --> <!-- <view class="text">{{ i18n.homeMessage }}</view> -->
@ -62,18 +62,10 @@
</view> </view>
</view> </view>
<!-- 步数 --> <!-- 步数 -->
<view class="steps">
<view class="content">
<view class="title">{{ i18n.CaringForWomen }}</view>
<view class="slogan">{{ i18n.LoveFeminist }}<br>{{ i18n.LoveFeminist1 }}</view> <view v-for="(item, index) in middleList" :key="index">
<view class="steps" >
<image :src="baseURL+item.adImgPath" @click="go(item.content,item.adUrl)"></image>
<!-- <canvas id="chart" ref="chart" style="width: 280rpx;height:280rpx; font-size: 40rpx;"></canvas> -->
<u-button class="button" color="#00E8A2" @click="getCharity">{{ i18n.checkTheDetails }}
</u-button>
</view> </view>
</view> </view>
@ -85,7 +77,7 @@
<!-- 播放器 --> <!-- 播放器 -->
<view class="videoList" v-for="(item, index) in videoList" :key="index" @click="playVideo(item.adText)"> <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;`"> background-size: cover;`">
<view class="VideoBg"> <view class="VideoBg">
<view class="VideoLogo"></view> <view class="VideoLogo"></view>
@ -182,16 +174,18 @@
stepsNum: 0, // stepsNum: 0, //
stepTarget: 5000, // stepTarget: 5000, //
myChart: null, myChart: null,
middleList:null
} }
}, },
onLoad() { onLoad() {
this.baseURL = constant.BASE_URL this.baseURL = constant.BASE_URL
this.getbanner(); this.getbanner();
this.getMiddle();
this.noticeList(); this.noticeList();
this.getUserInfoBalance(); this.getUserInfoBalance();
// #ifdef APP-PLUS // #ifdef APP-PLUS
// this.appVersion() this.appVersion()
// #endif // #endif
}, },
@ -236,7 +230,13 @@
logOut() { logOut() {
plus.runtime.openURL(this.conInfo.appUrl); plus.runtime.openURL(this.conInfo.appUrl);
}, },
getMiddle(){
api.indexBanner({
'mark': 'APP_INDEX_MIDDLE'
}).then(res => {
this.middleList=res
})
},
// APP // APP
appVersion() { appVersion() {
console.log("校验APP应用版本", uni.getSystemInfoSync().platform) console.log("校验APP应用版本", uni.getSystemInfoSync().platform)
@ -250,7 +250,7 @@
// console.log(wgtinfo.versionCode, response.versionCode) // console.log(wgtinfo.versionCode, response.versionCode)
let param = { let param = {
'appId': uni.getSystemInfoSync().platform, 'appId': uni.getSystemInfoSync().platform,
'versionCode': '1.0.0' 'versionCode': wgtinfo.version
} }
console.log(param) console.log(param)
this.$api.appVersion(param).then(response => { this.$api.appVersion(param).then(response => {
@ -332,13 +332,21 @@
}, },
bannerClick(i) { bannerClick(i) {
// #ifdef APP-PLUS if(this.bannerList[i].content=='inner'){
plus.runtime.openURL(this.bannerList[i]) uni.navigateTo({
// #endif url: this.bannerList[i].adUrl
// #ifdef H5 })
var href = this.bannerList[i] }else{
window.open(href, '_blank'); // #ifdef APP-PLUS
// #endif plus.runtime.openURL(this.bannerList[i].adUrl)
// #endif
// #ifdef H5
var href = this.bannerList[i].adUrl
window.open(href, '_blank');
// #endif
}
}, },
// //
@ -461,10 +469,21 @@
}, },
go(url) { go(type,url) {
uni.navigateTo({ if(type=='inner'){
url: url uni.navigateTo({
}) url: url
})
}else{
// #ifdef APP-PLUS
plus.runtime.openURL(url)
// #endif
// #ifdef H5
var href = url
window.open(href, '_blank');
// #endif
}
}, },
@ -491,7 +510,10 @@
// this.bannerList = res // this.bannerList = res
for (var i = 0; i < res.length; i++) { for (var i = 0; i < res.length; i++) {
this.swiperList.push(this.baseURL + res[i].adImgPath) 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 this.videoList = res
// banner // banner
@ -925,13 +947,13 @@
.steps { .steps {
margin: 0 32rpx; margin: 0 32rpx;
width: 686rpx; width: 686rpx;
height: 472rpx; margin-top: 32rpx;
background-color: #211F32;
background-image: url(../../static/home/img_People.png);
background-repeat: no-repeat;
background-size: contain;
border-radius: 16px;
image{
width: 100%;
border-radius: 16px;
}
.content { .content {
//margin-left: 246rpx; //margin-left: 246rpx;

4
pages/subscription/details.vue

@ -54,8 +54,8 @@
<!-- ProjectDetails --> <!-- ProjectDetails -->
<view class="contentTitle"> <view class="contentTitle">
<view class="ProjectDetails">{{ i18n.ProjectDetails }}</view> <view class="ProjectDetails">{{ i18n.ProjectDetails }}</view>
<view class="videoBtn" @click="playVideo(deinfo.sysCoinInfo.videoWebsite)">{{ i18n.Video }}</view> <view class="videoBtn" v-show="deinfo.sysCoinInfo.videoWebsite!=''" @click="playVideo(deinfo.sysCoinInfo.videoWebsite)">{{ i18n.Video }}</view>
<view class="whiteBook" @click="getContact('book')">{{ i18n.WhiteBook }}</view> <view class="whiteBook" v-show="deinfo.sysCoinInfo.whitePaperWebsite!=''" @click="getContact('book')">{{ i18n.WhiteBook }}</view>
</view> </view>
<!-- 文字内容 --> <!-- 文字内容 -->

Loading…
Cancel
Save