Commit 2157d1c8 authored by LiZongLin's avatar LiZongLin

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

parent 69196163
...@@ -219,16 +219,16 @@ ...@@ -219,16 +219,16 @@
console.log(this.activityInfo); console.log(this.activityInfo);
//时间格式处理 //时间格式处理
let index = this.activityInfo.activityEnd.indexOf(' ') 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) let activityEnd = this.activityInfo.activityEnd.substr(0, index)
// this.activityInfo.activityEnd = this.activityInfo.activityEnd // this.activityInfo.activityEnd = this.activityInfo.activityEnd
index = this.activityInfo.activityStart.indexOf(' ') index = this.activityInfo.activityStart.indexOf(' ')
// this.activityInfo.activityStart = this.activityInfo.activityStart.substr(0, index) // this.activityInfo.activityStart = this.activityInfo.activityStart.substr(0, index)
let activityStart = this.activityInfo.activityStart.substr(0, index) let activityStart = this.activityInfo.activityStart.substr(0, index)
// this.activityInfo.activityStart = this.activityInfo.activityStart // this.activityInfo.activityStart = this.activityInfo.activityStart
this.activityInfo.activityTime = this.activityInfo.activityStart + '-' + this.activityInfo // this.activityInfo.activityTime = this.activityInfo.activityStart + '-' + this.activityInfo
.activityEnd // .activityEnd
// this.activityInfo.activityTime = activityStart + '—' + activityEnd this.activityInfo.activityTime = activityStart + '—' + activityEnd
this.activityInfo.signupTime = this.activityInfo.signupTime this.activityInfo.signupTime = this.activityInfo.signupTime
// this.getDaysBetween(this.activityInfo.signupTime) // this.getDaysBetween(this.activityInfo.signupTime)
selectexamType(this.activityInfo.examType).then(response=>{ selectexamType(this.activityInfo.examType).then(response=>{
......
...@@ -64,7 +64,8 @@ ...@@ -64,7 +64,8 @@
<view class="home_activity_item" v-for="(item1,index1) in activityList" :key="index1" <view class="home_activity_item" v-for="(item1,index1) in activityList" :key="index1"
@click="goActDetil(item1)"> @click="goActDetil(item1)">
<view class="activity_image"> <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>
<view class="activity-body"> <view class="activity-body">
<view class="activity_image_title"> <view class="activity_image_title">
...@@ -188,21 +189,21 @@ ...@@ -188,21 +189,21 @@
}) })
}, },
getWXUserCode() { getWXUserCode() {
return new Promise((resolve,reject)=>{ return new Promise((resolve, reject) => {
if(!this.token){ if (!this.token) {
resolve(); resolve();
return return
} }
console.log(this.token); console.log(this.token);
console.log("获取登录信息") console.log("获取登录信息")
new new
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: res => { success: res => {
console.log("uni.login res", res.code) console.log("uni.login res", res.code)
let code = res.code let code = res.code
getToken(code, this.token).then(res => { getToken(code, this.token).then(res => {
console.log(res); // console.log(res);
this.updateToken(res.data.token) this.updateToken(res.data.token)
this.updateUserInfo(res.data.user) this.updateUserInfo(res.data.user)
}) })
...@@ -219,7 +220,7 @@ ...@@ -219,7 +220,7 @@
getActivityList() { getActivityList() {
listActivityStart().then(res => { listActivityStart().then(res => {
this.activityList = [...this.activityList, ...res.data] || [] this.activityList = [...this.activityList, ...res.data] || []
console.log(res.data); console.log("热门活动", res.data);
}).catch(err => { }).catch(err => {
}) })
...@@ -227,6 +228,7 @@ ...@@ -227,6 +228,7 @@
getExerciseList() { getExerciseList() {
listExercise().then(res => { listExercise().then(res => {
this.exerciseList = [...this.exerciseList, ...res.data] || [] this.exerciseList = [...this.exerciseList, ...res.data] || []
console.log("训练体验", res.data);
}).catch(err => { }).catch(err => {
}) })
...@@ -276,9 +278,15 @@ ...@@ -276,9 +278,15 @@
this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + 9 + 'px' this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + 9 + 'px'
}, },
onShow() { onShow() {
this.getWXUserCode().then(()=>{ this.getWXUserCode().then(() => {
this.activityList = []
this.exerciseList = []
this.login() this.login()
}) })
},
onHide() {
this.activityList = []
this.exerciseList = []
} }
} }
</script> </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