unknown
9 months ago
26 changed files with 467 additions and 374 deletions
-
22common/css/app.scss
-
20pages.json
-
91pages/indexEntry/findCoach/comp/coachItem.vue
-
190pages/indexEntry/findCoach/findCoach.vue
-
14pages/indexEntry/findShcool/findShcool.vue
-
10pages/indexEntry/industryPolicy/industryPolicy.vue
-
3pages/indexEntry/signIn/signIn.vue
-
69pages/mineEntry/carLearnHours/carLearnHours.vue
-
44pages/mineEntry/modelChange/modelChange.vue
-
9pages/mineEntry/myAppointment/comp/opera.vue
-
87pages/mineEntry/myAppointment/myAppointment.vue
-
3pages/mineEntry/myContract/myContract.vue
-
3pages/mineEntry/myEvaluate/myEvaluate.vue
-
24pages/mineEntry/myOrder/comp/comp.scss
-
18pages/mineEntry/myOrder/comp/opera.vue
-
59pages/mineEntry/myOrder/myOrder.vue
-
16pages/mineEntry/refund/comp/myform.vue
-
43pages/mineEntry/refund/refund.vue
-
29pages/mineEntry/schoolTransfer/schoolTransfer.vue
-
2pages/tabbar/index/comp/informaItem.vue
-
2pages/tabbar/index/comp/schoolItem.vue
-
35pages/tabbar/index/index.vue
-
19pages/tabbar/learnCar/comp/comp.scss
-
29pages/tabbar/mine/index.vue
-
BINstatic/images/tabbar/btn_xueche_nor - 副本.png
-
BINstatic/images/tabbar/btn_xueche_nor.png
@ -0,0 +1,91 @@ |
|||||
|
<template> |
||||
|
<view class="itemBox" > |
||||
|
<view class="img"> |
||||
|
<image src="@/static/images/index/img_7@2x.png" mode="" ></image> |
||||
|
</view> |
||||
|
<view class="textCon"> |
||||
|
<view class="name">{{item.shortName}}</view> |
||||
|
<view class="flex-b"> |
||||
|
<view class="starBox"> |
||||
|
<view class="num">{{item.stars}}</view> |
||||
|
</view> |
||||
|
<callPhone v-if="showPhone" :servicePhone="[{name: item.phone}]"> |
||||
|
<view class="pozPhone"> |
||||
|
<image src="@/static/images/indexIcon/phone.png" mode=""></image> |
||||
|
</view> |
||||
|
</callPhone> |
||||
|
</view> |
||||
|
<view class="adr"><text style="margin-right: 6rpx;">{{item.districtName}}</text> 距您{{ $u.utils.distanceFn(item.distance)}}</view> |
||||
|
<!-- <view class="credit">行业信用 <text v-if="item.creditrating">{{item.creditrating}}</text></view> --> |
||||
|
</view> |
||||
|
|
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
props: { |
||||
|
showPhone: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
item: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.itemBox { |
||||
|
background: #FFFFFF; |
||||
|
border-radius: 16rpx; |
||||
|
padding: 20rpx; |
||||
|
position: relative; |
||||
|
display: flex; |
||||
|
// border-bottom: 1px solid #F4F4F4; |
||||
|
margin-bottom: 20rpx; |
||||
|
} |
||||
|
.img { |
||||
|
width: 200rpx; |
||||
|
height: 135rpx; |
||||
|
background: #f6f6f6; |
||||
|
border-radius: 20rpx; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
.textCon { |
||||
|
flex: 1; |
||||
|
font-size: 24rpx; |
||||
|
padding: 0 0 0 36rpx; |
||||
|
.name { |
||||
|
font-size: 28rpx; |
||||
|
margin-top: 4rpx; |
||||
|
color: #363A44; |
||||
|
} |
||||
|
|
||||
|
.starBox { |
||||
|
margin: 10rpx 0; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.credit { |
||||
|
color: #1989FA; |
||||
|
margin-bottom: 4rpx; |
||||
|
} |
||||
|
|
||||
|
.adr { |
||||
|
color: #999; |
||||
|
font-size: 24rpx; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.pozPhone { |
||||
|
width: 55rpx; |
||||
|
height: 55rpx; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,190 @@ |
|||||
|
<template> |
||||
|
<view class="pageBg"> |
||||
|
<view class="topBg"> |
||||
|
<topNavbar title="找教练"></topNavbar> |
||||
|
|
||||
|
<view class="searchCon pad"> |
||||
|
<searchRow placeholder="搜索驾校名称" @searchFn="$goPage('/pages/indexEntry/findShcool/searchShcool/searchShcool')" :disable="true"></searchRow> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="pad"> |
||||
|
<view class="navBox"> |
||||
|
<view class="tab" v-for="(item,index) in tabData" :key="index" :class="{active: (params.sercheType==item.id&&!(params.businessScope||params.district))}" @click="tabClick(item)"> |
||||
|
{{ item.text }}</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="ul"> |
||||
|
<view class="li" v-for="(item,index) in listData" :key="index" > |
||||
|
<coachItem :item="item" @click.native="goPage(item)"/> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view style="padding-bottom: 20rpx;" v-if="listData.length"> |
||||
|
<u-loadmore :status="status" /> |
||||
|
</view> |
||||
|
<nodata v-if="!listData.length&&status=='nomore'"></nodata> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import coachItem from './comp/coachItem.vue' |
||||
|
import { schoolPage } from '@/config/api.js' |
||||
|
export default { |
||||
|
components: { coachItem }, |
||||
|
data() { |
||||
|
return { |
||||
|
currentTab: 0, |
||||
|
tabData: [{ |
||||
|
text: '全部', |
||||
|
id: 1 |
||||
|
}, |
||||
|
{ |
||||
|
text: 'C1', |
||||
|
id: 2 |
||||
|
}, |
||||
|
{ |
||||
|
text: 'C2', |
||||
|
id: 3 |
||||
|
}, |
||||
|
], |
||||
|
params: { |
||||
|
pageNo: 1, |
||||
|
pageSize: 20, |
||||
|
lat: '', |
||||
|
lng: '', |
||||
|
sercheType: 1, |
||||
|
businessScope: '', |
||||
|
district: '', |
||||
|
name: '' |
||||
|
}, |
||||
|
total: 20, |
||||
|
listData: [], |
||||
|
status: 'loading' |
||||
|
} |
||||
|
}, |
||||
|
onLoad() { |
||||
|
let vuex_cityInfo = this.$store.state.user.vuex_cityInfo |
||||
|
if(!vuex_cityInfo.lat) { |
||||
|
this.$store.dispatch('getCity') |
||||
|
}else { |
||||
|
this.params.lat = vuex_cityInfo.lat |
||||
|
this.params.lng = vuex_cityInfo.lng |
||||
|
} |
||||
|
this.schoolPageFn() |
||||
|
uni.$on('screenConfirm',(obj)=>{ |
||||
|
this.params = Object.assign(this.params, obj) |
||||
|
this.listInit() |
||||
|
}) |
||||
|
}, |
||||
|
onPullDownRefresh() { |
||||
|
this.listInit() |
||||
|
}, |
||||
|
onReachBottom() { |
||||
|
if(this.total>this.listData.length) { |
||||
|
this.schoolPageFn() |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
searchFn(val) { |
||||
|
this.params.name = val |
||||
|
this.listInit() |
||||
|
}, |
||||
|
goScreen() { |
||||
|
let url = `/pages/indexEntry/findShcool/screen/screen?businessScope=${this.params.businessScope}&district=${this.params.district}` |
||||
|
this.$goPage(url) |
||||
|
}, |
||||
|
goPage(item) { |
||||
|
this.$goPage('/pages/indexEntry/findShcool/shcoolDetail/shcoolDetail?schoolId='+ item.id) |
||||
|
}, |
||||
|
tabClick(item) { |
||||
|
this.params.sercheType = item.id |
||||
|
this.params.businessScope = '' |
||||
|
this.params.district = '' |
||||
|
this.listInit() |
||||
|
}, |
||||
|
async listInit() { |
||||
|
this.listData = [] |
||||
|
this.params.pageNo = 1 |
||||
|
await this.schoolPageFn() |
||||
|
uni.stopPullDownRefresh() |
||||
|
}, |
||||
|
// 获取驾校列表 |
||||
|
async schoolPageFn() { |
||||
|
let obj = {} |
||||
|
for(let key in this.params) { |
||||
|
if(this.params[key]) { |
||||
|
obj[key] = this.params[key] |
||||
|
} |
||||
|
} |
||||
|
const {data: res} = await schoolPage(obj) |
||||
|
this.params.pageNo ++ |
||||
|
this.listData.push(...res.list) |
||||
|
this.total = res.total |
||||
|
if(this.listData.length>=this.total) this.status = 'nomore' |
||||
|
console.log(res) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.pageBg { |
||||
|
width: 100%; |
||||
|
.navBox { |
||||
|
display: flex; |
||||
|
// justify-content: space-between; |
||||
|
padding: 20rpx 0; |
||||
|
.tab { |
||||
|
font-size: 28rpx; |
||||
|
color: #999; |
||||
|
line-height: 50rpx; |
||||
|
border-radius: 10rpx; |
||||
|
background: #fff; |
||||
|
text-align: center; |
||||
|
height: 50rpx; |
||||
|
width: 126rpx; |
||||
|
margin-right: 30rpx; |
||||
|
&.active { |
||||
|
background: $themC; |
||||
|
color: #fff; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.screen { |
||||
|
width: 150rpx; |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
position: relative; |
||||
|
background: #fff; |
||||
|
color: #999; |
||||
|
border-radius: 10rpx; |
||||
|
&.active { |
||||
|
background: $themC; |
||||
|
color: #fff; |
||||
|
} |
||||
|
.txt { |
||||
|
font-size: 28rpx; |
||||
|
margin-right: 10rpx; |
||||
|
} |
||||
|
|
||||
|
.screenIcon { |
||||
|
width: 18rpx; |
||||
|
height: 12rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.ul { |
||||
|
width: 100%; |
||||
|
.li { |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.topBg { |
||||
|
padding-bottom: 20rpx; |
||||
|
} |
||||
|
</style> |
After Width: 40 | Height: 40 | Size: 1.5 KiB |
Before Width: 40 | Height: 40 | Size: 1.5 KiB After Width: 40 | Height: 40 | Size: 1.7 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue