Commit 2157d1c8 authored by LiZongLin's avatar LiZongLin

答题详细日期格式修改,首页Bug修改

parent 69196163
......@@ -219,16 +219,16 @@
console.log(this.activityInfo);
//时间格式处理
let index = this.activityInfo.activityEnd.indexOf(' ')
// this.activityInfo.activityEnd = this.activityInfo.activityEnd.substr(0, index)
this.activityInfo.activityEnd = this.activityInfo.activityEnd.substr(0, index)
let activityEnd = this.activityInfo.activityEnd.substr(0, index)
// this.activityInfo.activityEnd = this.activityInfo.activityEnd
index = this.activityInfo.activityStart.indexOf(' ')
// this.activityInfo.activityStart = this.activityInfo.activityStart.substr(0, index)
let activityStart = this.activityInfo.activityStart.substr(0, index)
// this.activityInfo.activityStart = this.activityInfo.activityStart
this.activityInfo.activityTime = this.activityInfo.activityStart + '-' + this.activityInfo
.activityEnd
// this.activityInfo.activityTime = activityStart + '—' + activityEnd
// this.activityInfo.activityTime = this.activityInfo.activityStart + '-' + this.activityInfo
// .activityEnd
this.activityInfo.activityTime = activityStart + '—' + activityEnd
this.activityInfo.signupTime = this.activityInfo.signupTime
// this.getDaysBetween(this.activityInfo.signupTime)
selectexamType(this.activityInfo.examType).then(response=>{
......
......@@ -64,7 +64,8 @@
<view class="home_activity_item" v-for="(item1,index1) in activityList" :key="index1"
@click="goActDetil(item1)">
<view class="activity_image">
<image class="image" :src="'https://www.aiwanyundong.com/stage-api' + item1.bannerImage"></image>
<image class="image" :src="'https://www.aiwanyundong.com/stage-api' + item1.bannerImage">
</image>
</view>
<view class="activity-body">
<view class="activity_image_title">
......@@ -188,21 +189,21 @@
})
},
getWXUserCode() {
return new Promise((resolve,reject)=>{
if(!this.token){
return new Promise((resolve, reject) => {
if (!this.token) {
resolve();
return
}
console.log(this.token);
console.log("获取登录信息")
new
new
uni.login({
provider: 'weixin',
success: res => {
console.log("uni.login res", res.code)
let code = res.code
getToken(code, this.token).then(res => {
console.log(res);
// console.log(res);
this.updateToken(res.data.token)
this.updateUserInfo(res.data.user)
})
......@@ -219,7 +220,7 @@
getActivityList() {
listActivityStart().then(res => {
this.activityList = [...this.activityList, ...res.data] || []
console.log(res.data);
console.log("热门活动", res.data);
}).catch(err => {
})
......@@ -227,6 +228,7 @@
getExerciseList() {
listExercise().then(res => {
this.exerciseList = [...this.exerciseList, ...res.data] || []
console.log("训练体验", res.data);
}).catch(err => {
})
......@@ -276,9 +278,15 @@
this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + 9 + 'px'
},
onShow() {
this.getWXUserCode().then(()=>{
this.getWXUserCode().then(() => {
this.activityList = []
this.exerciseList = []
this.login()
})
},
onHide() {
this.activityList = []
this.exerciseList = []
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment