-
16components/commentItem/commentItem.vue
-
13components/searchRow/searchRow.vue
-
15config/api.js
-
8config/request.js
-
28pages.json
-
7pages/tabbar/mine/index.vue
-
7pages/tabbar/student/index.vue
-
10pages/userCenter/myCar/myCar.vue
-
80pages/userCenter/schoolCoach/coachComment/coachComment.vue
-
68pages/userCenter/schoolCoach/coachComment/comp/comments.vue
-
93pages/userCenter/schoolCoach/coachComment/comp/info.vue
-
137pages/userCenter/schoolCoach/schoolCoach.vue
-
147pages/userCenter/schoolSite/schoolSite.vue
-
86pages/userCenter/studentComment/studentComment.vue
-
BINstatic/images/coach/coach.png
-
BINstatic/images/coach/site.png
-
BINstatic/images/index/avatar.png
-
BINstatic/images/userCenter/adsIcon.png
-
BINstatic/images/userCenter/coach.png
-
BINstatic/images/userCenter/site.png
-
BINstatic/images/userCenter/siteIcon.png
-
2store/modules/user.js
-
4uni_modules/uview-ui/components/u-search/u-search.vue
@ -0,0 +1,80 @@ |
|||
<template> |
|||
<view class="pageBgImg"> |
|||
<view class="pad"> |
|||
<topNavbar title="教练详情"></topNavbar> |
|||
<view class="infoBox"> |
|||
<info :showSign="true" :item="info"></info> |
|||
</view> |
|||
<comments :list="list" @changeNav="changeNav"></comments> |
|||
<view style="padding-bottom: 20rpx;" v-if="list.length"> |
|||
<u-loadmore :status="status" /> |
|||
</view> |
|||
<nodata v-if="!list.length&&status=='nomore'"></nodata> |
|||
</view> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import comments from './comp/comments.vue' |
|||
import info from './comp/info.vue' |
|||
import { coachDetail, coachCommentPage } from '@/config/api.js' |
|||
export default { |
|||
components: { comments, info}, |
|||
data() { |
|||
return { |
|||
params: { |
|||
pageNo: 1, |
|||
pageSize: 20, |
|||
coachId: '', |
|||
coachType: 1, |
|||
condition: 0 |
|||
}, |
|||
total: 20, |
|||
list: [], |
|||
coachList: [], |
|||
status: 'loading', |
|||
info: {} |
|||
} |
|||
}, |
|||
onLoad(options) { |
|||
this.params.coachId = options.id |
|||
this.coachDetailFn() |
|||
this.coachCommentPageFn() |
|||
}, |
|||
methods: { |
|||
// 获取教练详情 |
|||
async coachDetailFn() { |
|||
const {data: res} = await coachDetail({id: this.params.coachId}) |
|||
this.info = res |
|||
}, |
|||
changeNav(val) { |
|||
this.params.condition = val |
|||
this.initList() |
|||
}, |
|||
initList() { |
|||
this.params.pageNo = 1 |
|||
this.status = 'loading' |
|||
this.list = [] |
|||
this.coachCommentPageFn() |
|||
}, |
|||
async coachCommentPageFn() { |
|||
const {data: res} = await coachCommentPage(this.params) |
|||
this.params.pageNo ++ |
|||
this.total = res.total |
|||
let arr = res.list.map(item=>{ |
|||
if(item.images) { |
|||
item.images = item.images.split(',') |
|||
} |
|||
return item |
|||
}) |
|||
this.list.push(...arr) |
|||
if(this.list.length>=this.list.length) this.status = 'nomore' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
|
|||
</style> |
@ -0,0 +1,68 @@ |
|||
<template> |
|||
<view class="comments"> |
|||
<view class="navBox"> |
|||
<view class="nav" v-for="(item,index) in navList" :key="index" @click="changeNav(item)" :class="{active: currentNav==item.id}">{{ item.text }}</view> |
|||
</view> |
|||
<view class="card" v-for="(item,index) in list"> |
|||
<commentItem :item="item"/> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
// import commentItem from './commentItem' |
|||
export default { |
|||
// components: { commentItem }, |
|||
props: ['list'], |
|||
data() { |
|||
return { |
|||
// 0,全部,1,有图,2最新,3有视频 |
|||
navList: [ |
|||
{text: '全部', id: 0}, |
|||
{text: '最新', id: 2}, |
|||
{text: '有图', id: 1}, |
|||
{text: '有视频', id: 3}, |
|||
], |
|||
currentNav: 0, |
|||
} |
|||
}, |
|||
methods: { |
|||
changeNav(item) { |
|||
this.currentNav = item.id |
|||
this.$emit('changeNav', item.id) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.comments { |
|||
width: 100%; |
|||
padding: 0 28rpx; |
|||
.navBox { |
|||
padding: 32rpx 0 24rpx 0; |
|||
display: flex; |
|||
.nav { |
|||
padding: 10rpx 24rpx; |
|||
height: 60rpx; |
|||
background: rgba(25,137,250,0.1); |
|||
border-radius: 8rpx; |
|||
border: 2rpx solid #1989FA; |
|||
font-size: 28rpx; |
|||
color: $themC; |
|||
margin-right: 20rpx; |
|||
text-align: center; |
|||
&.active { |
|||
color: #fff; |
|||
background: $themC; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.card { |
|||
width: 100%; |
|||
padding: 24rpx 28rpx; |
|||
margin-bottom: 20rpx; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,93 @@ |
|||
<template> |
|||
<view class="tabCon"> |
|||
<view class="tab1"> |
|||
<view class="card" > |
|||
<view class="flex"> |
|||
<view class="avatar"> |
|||
<image :src="item.photoPath" mode="" @error="handleImageError(item)"></image> |
|||
</view> |
|||
<view class="rightCon"> |
|||
<view class="name">{{ item.name }}</view> |
|||
<view class="flex-b"> |
|||
<view class="starBox"> |
|||
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" disabled style="pointer-events: none;"></u-rate> |
|||
<view class="num">{{item.stars}}分</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="text">证件号:{{item.idcard}}</view> |
|||
<view class="text">联系电话:{{item.mobile}}</view> |
|||
<view class="text">绑定学员:<text>暂时没字段</text>人</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
export default { |
|||
props: ['item', ], |
|||
methods: { |
|||
handleImageError(item) { |
|||
item.photoPath = require('@/static/images/index/avatar.png') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.tabCon { |
|||
width: 100%; |
|||
.tab1 { |
|||
width: 100%; |
|||
.card { |
|||
width: 100%; |
|||
padding: 36rpx; |
|||
// margin-top: 20rpx; |
|||
.flex { |
|||
margin-bottom: 20rpx; |
|||
} |
|||
.text { |
|||
font-size: 28rpx; |
|||
padding: 10rpx 0; |
|||
text { |
|||
color: $themC; |
|||
} |
|||
} |
|||
.avatar { |
|||
width: 100rpx; |
|||
height: 98rpx; |
|||
border-radius: 50%; |
|||
margin-right: 34rpx; |
|||
background-color: #f6f6f6; |
|||
} |
|||
.rightCon { |
|||
flex: 1; |
|||
width: 0; |
|||
.name { |
|||
font-size: 32rpx; |
|||
color: #333; |
|||
font-weight: 500; |
|||
} |
|||
|
|||
.flex-b { |
|||
margin-top: 14rpx; |
|||
.more { |
|||
display: flex; |
|||
align-items: center; |
|||
.moreText { |
|||
font-size: 24rpx; |
|||
color: #686B73; |
|||
margin-right: 10rpx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,137 @@ |
|||
<template> |
|||
<view class="pageBgImg"> |
|||
<topNavbar title="驾校教练"></topNavbar> |
|||
<view class="pad"> |
|||
<view class="search_Box"> |
|||
<searchRow placeholder="搜索教练员" @searchFn="searchFn"></searchRow> |
|||
</view> |
|||
<view class="ul"> |
|||
<view class="card" v-for="(item,index) in list" :key="index" @click="$goPage('/pages/userCenter/schoolCoach/coachComment/coachComment?id='+ item.id)"> |
|||
<view class="avatar"> |
|||
<image :src="item.photoPath" mode="" @error="handleImageError(item)"></image> |
|||
</view> |
|||
<view class="rightTxt"> |
|||
<view class="name">{{item.name}}</view> |
|||
<view class="star_row"> |
|||
<view class="starBox"> |
|||
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" :readonly="true" style="pointer-events: none;"></u-rate> |
|||
<view class="num">{{item.stars}}分</view> |
|||
</view> |
|||
<moreRight text="查看详情"/> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view style="padding-bottom: 20rpx;" v-if="list.length"> |
|||
<u-loadmore :status="status" /> |
|||
</view> |
|||
<nodata v-if="!list.length&&status=='nomore'"></nodata> |
|||
</view> |
|||
</template> |
|||
|
|||
|
|||
<script> |
|||
import { coachPage } from '@/config/api.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
list: [], |
|||
params: { |
|||
pageNo: 1, |
|||
pageSize: 20 |
|||
}, |
|||
total: 20, |
|||
status: 'loading' |
|||
} |
|||
}, |
|||
onLoad() { |
|||
this.coachPageFn() |
|||
}, |
|||
onPullDownRefresh() { |
|||
this.list = [] |
|||
this.params.pageNo = 1 |
|||
this.coachPageFn().then(()=>{uni.stopPullDownRefresh()}) |
|||
}, |
|||
onReachBottom() { |
|||
if(this.total>this.list.length) { |
|||
this.coachPageFn() |
|||
} |
|||
}, |
|||
methods: { |
|||
async coachPageFn() { |
|||
const {data: res} = await coachPage(this.params) |
|||
this.params.pageNo ++ |
|||
this.list.push(...res.list) |
|||
this.total = res.total |
|||
if(this.list.length>=this.total) { |
|||
this.status = 'nomore' |
|||
}else { |
|||
this.status = 'loading' |
|||
} |
|||
console.log(res) |
|||
}, |
|||
searchFn(val) { |
|||
console.log(val) |
|||
this.params.name = val |
|||
this.list = [] |
|||
this.params.pageNo = 1 |
|||
this.coachPageFn() |
|||
}, |
|||
handleImageError(item) { |
|||
item.photoPath = require('@/static/images/index/avatar.png') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
|
|||
<style lang="scss" scoped> |
|||
.pageBgImg { |
|||
.search_Box { |
|||
margin-bottom: 20rpx; |
|||
searchrow { |
|||
|
|||
} |
|||
} |
|||
|
|||
.ul { |
|||
width: 100%; |
|||
.card { |
|||
padding: 28rpx 30rpx; |
|||
margin-bottom: 20rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
.avatar { |
|||
width: 108rpx; |
|||
height: 108rpx; |
|||
border-radius: 50%; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.rightTxt { |
|||
padding-left: 20rpx; |
|||
flex: 1; |
|||
.name { |
|||
font-size: 32rpx; |
|||
color: #333; |
|||
font-weight: 500; |
|||
margin-bottom: 10rpx; |
|||
} |
|||
|
|||
.star_row { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
.starBox { |
|||
display: flex; |
|||
padding: 6rpx 0 6rpx 0; |
|||
.num { |
|||
color: $themC; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,147 @@ |
|||
<template> |
|||
<view class="pageBgImg"> |
|||
<topNavbar title="驾校场地"></topNavbar> |
|||
<view class="pad"> |
|||
<view class="search_Box"> |
|||
<searchRow placeholder="搜索场地名称" @searchFn="searchFn"></searchRow> |
|||
</view> |
|||
<view class="ul"> |
|||
<view class="card" v-for="(item,index) in list" :key="index"> |
|||
<view class="name_row"> |
|||
<view class="icon"> |
|||
<image src="@/static/images/userCenter/siteIcon.png" mode=""></image> |
|||
</view> |
|||
<view class="name">{{item.name}}</view> |
|||
</view> |
|||
<view class="addres_row"> |
|||
<view class="icon"> |
|||
<image src="@/static/images/userCenter/adsIcon.png" mode=""></image> |
|||
</view> |
|||
<view class="ads">{{item.address}}</view> |
|||
</view> |
|||
<view class="status_row"> |
|||
使用状态:<text v-if="item.siteStatus==1">正常</text> <text v-if="item.siteStatus==0" class="orange">停用</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view style="padding-bottom: 20rpx;" v-if="list.length"> |
|||
<u-loadmore :status="status" /> |
|||
</view> |
|||
<nodata v-if="!list.length&&status=='nomore'"></nodata> |
|||
</view> |
|||
</template> |
|||
|
|||
|
|||
<script> |
|||
import { sitePage } from '@/config/api.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
list: [], |
|||
params: { |
|||
pageNo: 1, |
|||
pageSize: 20 |
|||
}, |
|||
total: 20, |
|||
status: 'loading' |
|||
} |
|||
}, |
|||
onLoad() { |
|||
this.sitePageFn() |
|||
}, |
|||
onPullDownRefresh() { |
|||
this.list = [] |
|||
this.params.pageNo = 1 |
|||
this.sitePageFn().then(()=>{uni.stopPullDownRefresh()}) |
|||
}, |
|||
onReachBottom() { |
|||
if(this.total>this.list.length) { |
|||
this.sitePageFn() |
|||
} |
|||
}, |
|||
methods: { |
|||
async sitePageFn() { |
|||
const {data: res} = await sitePage(this.params) |
|||
this.params.pageNo ++ |
|||
this.list.push(...res.list) |
|||
this.total = res.total |
|||
if(this.list.length>=this.total) { |
|||
this.status = 'nomore' |
|||
}else { |
|||
this.status = 'loading' |
|||
} |
|||
console.log(res) |
|||
}, |
|||
searchFn(val) { |
|||
console.log(val) |
|||
this.params.name = val |
|||
this.list = [] |
|||
this.params.pageNo = 1 |
|||
this.sitePageFn() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
|
|||
<style lang="scss" scoped> |
|||
.pageBgImg { |
|||
.search_Box { |
|||
margin-bottom: 20rpx; |
|||
searchrow { |
|||
|
|||
} |
|||
} |
|||
|
|||
.ul { |
|||
width: 100%; |
|||
.card { |
|||
padding: 28rpx 30rpx; |
|||
margin-bottom: 20rpx; |
|||
.name_row { |
|||
display: flex; |
|||
align-items: center; |
|||
.icon { |
|||
width: 30rpx; |
|||
height: 32rpx; |
|||
} |
|||
|
|||
.name { |
|||
font-size: 32rpx; |
|||
font-weight: 600; |
|||
color: #333333; |
|||
margin-left: 10rpx; |
|||
} |
|||
} |
|||
|
|||
.addres_row { |
|||
padding: 16rpx 0 36rpx 0; |
|||
display: flex; |
|||
align-items: center; |
|||
.icon { |
|||
width: 30rpx; |
|||
height: 32rpx; |
|||
} |
|||
|
|||
.ads { |
|||
font-size: 24rpx; |
|||
color: #333333; |
|||
margin-left: 10rpx; |
|||
} |
|||
} |
|||
|
|||
.status_row { |
|||
font-size: 24rpx; |
|||
color: #686B73; |
|||
text { |
|||
color: #1989FA; |
|||
&.orange { |
|||
color: #FF6A2A; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
After Width: 72 | Height: 72 | Size: 3.3 KiB |
After Width: 72 | Height: 72 | Size: 2.9 KiB |
After Width: 50 | Height: 50 | Size: 4.5 KiB |
After Width: 32 | Height: 36 | Size: 1.2 KiB |
After Width: 72 | Height: 72 | Size: 3.3 KiB |
After Width: 72 | Height: 72 | Size: 2.9 KiB |
After Width: 30 | Height: 32 | Size: 982 B |