Compare commits

...

2 Commits

Author SHA1 Message Date
vee c107c79f75 合并 3 years ago
vee 92b47e67ff 修改主页 3 years ago
  1. 47
      App.vue
  2. 41
      pages/home/index.vue
  3. 2
      utils/axios.js

47
App.vue

@ -21,12 +21,57 @@
},
onShow: function() {
console.log('App Show')
// // #ifdef APP-PLUS
// this.appVersion()
// // #endif
},
onHide: function() {
console.log('App Hide')
},
methods: {
// APP
appVersion() {
console.log("校验APP应用版本", uni.getSystemInfoSync().platform)
// console.log('ss' + JSON.stringify(uni.getSystemInfoSync()))
// const response = await this.$api.appVersion(param)
// console.log(response)
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
console.log('当前版本号' + wgtinfo.versionCode)
console.log(wgtinfo)
let param = {
'appId': 'android',
'versionCode': wgtinfo.version
}
console.log(param)
this.$api.appVersion(param).then(response => {
console.log(response)
if (wgtinfo.version < response.versionCode) {
console.log('更新了吗')
let that = this;
this.conInfo = response
this.showLogOut=true
// uni.showModal({
// title: this.$t("login").Versionupdate,
// content: response.info,
// showCancel: false,
// confirmText: this.$t("login").Confirm,
// success: function(res) {
// if (res.confirm) {
// plus.runtime.openURL(response.appUrl);
// }
// }
// })
}
})
});
},
}
}

41
pages/home/index.vue

@ -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>
@ -68,13 +70,11 @@
<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 v-show="item.adText!=''" class="videoImage" :style="`background-image: url(${baseURL+item.adImgPath});background-repeat: no-repeat;
@ -102,8 +102,6 @@
</view>
</u-popup>
</view>
<!-- <view class="" @click="startStep">
开始记步
</view>
@ -174,7 +172,8 @@
stepsNum: 0, //
stepTarget: 5000, //
myChart: null,
middleList:null
middleList:null,
href:""
}
},
onLoad() {
@ -215,6 +214,7 @@
this.stepsNum = 5000;
this.updateSteps();
// #endif
this.getContact();
},
onHide() {
@ -289,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);
@ -422,15 +421,15 @@
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
}
})
},
@ -638,7 +637,6 @@
// }else{
// this.myChart.setOption(this.option)
// }
},
stepTargetReceive(newValue, oldValue, ownerVm, vm) {
@ -749,7 +747,6 @@
.main {
padding-bottom: 198rpx; // TabBar
.nav-head-H5 {
position: fixed;
top: 0rpx;
@ -772,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 {

2
utils/axios.js

@ -29,7 +29,7 @@ service.interceptors.request.use(
// mask: true
// })
}
console.log(config.data)
//console.log(config.data)
if (config.url.indexOf("/api/index/register") !== -1 ||
config.url.indexOf("/api/user/login") !== -1 ||
config.url.indexOf("/api/user/forgotPassword") !== -1 ||

Loading…
Cancel
Save