|
@ -55,10 +55,10 @@ |
|
|
<view class="schoolCon card"> |
|
|
<view class="schoolCon card"> |
|
|
<view class="h1_row"> |
|
|
<view class="h1_row"> |
|
|
<view class="h1" ><text class="active">优质驾校</text></view> |
|
|
<view class="h1" ><text class="active">优质驾校</text></view> |
|
|
<moreRight text="查看全部"/> |
|
|
|
|
|
|
|
|
<moreRight text="查看全部" @click.native="$goPage('/pages/indexEntry/findShcool/findShcool')"/> |
|
|
</view> |
|
|
</view> |
|
|
<view class="li" v-for="(item,index) in 3" :key="index"> |
|
|
|
|
|
<schoolItem :item="{}"/> |
|
|
|
|
|
|
|
|
<view class="li" v-for="(item,index) in recommendSchool" :key="index" @click="$goPage('/pages/indexEntry/findShcool/shcoolDetail/shcoolDetail?schoolId='+ item.id)"> |
|
|
|
|
|
<schoolItem :item="item"/> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
@ -71,8 +71,8 @@ |
|
|
|
|
|
|
|
|
<scroll-view style="width: 100%;" scroll-x="true" scroll-with-animation > |
|
|
<scroll-view style="width: 100%;" scroll-x="true" scroll-with-animation > |
|
|
<view class="ul3"> |
|
|
<view class="ul3"> |
|
|
<view class="li3" v-for="item in 6" :key="item"> |
|
|
|
|
|
<coachItem/> |
|
|
|
|
|
|
|
|
<view class="li3" v-for="item in coachList" :key="item.id" @click="goCoachDetail(item)"> |
|
|
|
|
|
<coachItem :item="item"/> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
@ -127,7 +127,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { imgUrl } from '@/config/site.config' |
|
|
import { imgUrl } from '@/config/site.config' |
|
|
import { getarticleList, getBannerList, getarticlezcList } from '@/config/api.js' |
|
|
|
|
|
|
|
|
import { getarticleList, getBannerList, getarticlezcList,getRecommendList, recommendSchoolList } from '@/config/api.js' |
|
|
import schoolItem from './comp/schoolItem' |
|
|
import schoolItem from './comp/schoolItem' |
|
|
import informaItem from './comp/informaItem' |
|
|
import informaItem from './comp/informaItem' |
|
|
import coachItem from './comp/coachItem' |
|
|
import coachItem from './comp/coachItem' |
|
@ -244,6 +244,8 @@ |
|
|
bgColor: 'transparent', |
|
|
bgColor: 'transparent', |
|
|
informList: [], |
|
|
informList: [], |
|
|
informa: 1, |
|
|
informa: 1, |
|
|
|
|
|
coachList: [],//推荐教练 |
|
|
|
|
|
recommendSchool: [],//推荐驾校 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
async onLoad() { |
|
|
async onLoad() { |
|
@ -273,11 +275,30 @@ |
|
|
// this.getarticleListFn() |
|
|
// this.getarticleListFn() |
|
|
} |
|
|
} |
|
|
this.getarticleListFn() |
|
|
this.getarticleListFn() |
|
|
|
|
|
this.getRecommendList() |
|
|
|
|
|
this.recommendSchoolList() |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
goCoachDetail(item) { |
|
|
|
|
|
let objStr = encodeURIComponent(JSON.stringify(item)) |
|
|
|
|
|
this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?item='+ objStr) |
|
|
|
|
|
}, |
|
|
|
|
|
// 推荐教练 |
|
|
|
|
|
async getRecommendList() { |
|
|
|
|
|
const {data: res} = await getRecommendList({pageNo:1,pageSize: 20, lat: this.vuex_cityInfo.lat||'', lng: this.vuex_cityInfo.lng||''}) |
|
|
|
|
|
this.coachList = res |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
}, |
|
|
|
|
|
// 推荐驾校 |
|
|
|
|
|
async recommendSchoolList() { |
|
|
|
|
|
const {data: res} = await recommendSchoolList({pageNo:1,pageSize: 3, lat: this.vuex_cityInfo.lat||'', lng: this.vuex_cityInfo.lng||''}) |
|
|
|
|
|
this.recommendSchool = res |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
async getBannerListFn() { |
|
|
async getBannerListFn() { |
|
|
const {data: res} = await getBannerList() |
|
|
const {data: res} = await getBannerList() |
|
|
this.swiperInfo = res.list.map(item=>{ |
|
|
this.swiperInfo = res.list.map(item=>{ |
|
@ -286,14 +307,9 @@ |
|
|
console.log(this.swiperInfo) |
|
|
console.log(this.swiperInfo) |
|
|
}, |
|
|
}, |
|
|
async entrySectionClick(item) { |
|
|
async entrySectionClick(item) { |
|
|
if(item.text=='我要报名') { |
|
|
|
|
|
|
|
|
if(item.text=='学车报名') { |
|
|
return this.$u.utils.clickSignUp() |
|
|
return this.$u.utils.clickSignUp() |
|
|
} |
|
|
} |
|
|
if(item.text=='找驾驶馆') { |
|
|
|
|
|
const res = await this.$store.dispatch('checkLogin') |
|
|
|
|
|
if(!res) return |
|
|
|
|
|
if(!this.vuex_userInfo.schoolId) return this.$u.toast('您不是平台学员') |
|
|
|
|
|
} |
|
|
|
|
|
this.$goPage(item.url) |
|
|
this.$goPage(item.url) |
|
|
}, |
|
|
}, |
|
|
changeInforma(val) { |
|
|
changeInforma(val) { |
|
|