Browse Source

推荐教练驾校接口

master
unknown 9 months ago
parent
commit
0bf163ccdb
  1. 12
      common/js/utils.js
  2. 6
      components/pozCard/pozCard.vue
  3. 2
      components/searchRow/searchRow.vue
  4. 13
      config/api.js
  5. 2
      config/site.config.js
  6. 2
      package.json
  7. 1
      pages/carEntry/operaAppointment/comp/step1.vue
  8. 4
      pages/indexEntry/enroll/registInfo/registInfo.vue
  9. 74
      pages/indexEntry/enroll/uploadAvatar/uploadAvatar.vue
  10. 33
      pages/indexEntry/findCoach/comp/coachItem.vue
  11. 45
      pages/indexEntry/findCoach/findCoach.vue
  12. 24
      pages/indexEntry/findShcool/coachComment/coachComment.vue
  13. 2
      pages/indexEntry/findShcool/coachComment/coachInfo.vue
  14. 4
      pages/indexEntry/findShcool/shcoolDetail/comp/tab4.vue
  15. 5
      pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue
  16. 10
      pages/mineEntry/myEvaluate/comp/commentItem.vue
  17. 2
      pages/mineEntry/myOrder/comp/opera.vue
  18. 19
      pages/mineEntry/myOrder/myOrder.vue
  19. 6
      pages/mineEntry/personaInfo/personaInfo.vue
  20. 1
      pages/mineEntry/refund/refund.vue
  21. 21
      pages/tabbar/index/comp/coachItem.vue
  22. 13
      pages/tabbar/index/comp/schoolItem.vue
  23. 40
      pages/tabbar/index/index.vue
  24. 5
      pages/tabbar/learnCar/comp/subject0.vue
  25. 7
      pages/tabbar/learnCar/comp/topInfo.vue
  26. 4
      pages/tabbar/mine/index.scss
  27. 18
      pages/tabbar/mine/index.vue
  28. BIN
      static/images/mineIcon/avatar.png

12
common/js/utils.js

@ -124,7 +124,6 @@ const install = (Vue, vm) => {
return
}
store.commit('updateNonPlatformStudent', false)
if( vm.vuex_userInfo.applyStep<2) {
vm.$goPage('/pages/indexEntry/enroll/enroll')
}
@ -134,6 +133,14 @@ const install = (Vue, vm) => {
}
}
let isImagePath = (path)=> {
// 定义常见的图片文件扩展名
const imageExtensions = /\.(jpg|jpeg|png|gif|bmp|svg)$/i;
// 使用正则表达式进行匹配
return imageExtensions.test(path);
}
@ -147,7 +154,8 @@ const install = (Vue, vm) => {
getDate,
callPhone,
truncateText,
clickSignUp
clickSignUp,
isImagePath
}
}

6
components/pozCard/pozCard.vue

@ -1,5 +1,5 @@
<template>
<view class="card">
<view class="box">
<view class="flex-b" @click="openMap">
<view class="left_text">
<view class="adr ">{{ info.schoolName}}</view>
@ -30,8 +30,10 @@
</script>
<style lang="scss" scoped>
.card {
.box {
padding: 24rpx;
border-radius: 20rpx;
background: #fff;
.flex-b {
align-items: center;
.left_text {

2
components/searchRow/searchRow.vue

@ -66,7 +66,7 @@
.inputBox {
flex: 1;
color: #fff;
font-size: 28rpx;
font-size: 24rpx;
}
}
}

13
config/api.js

@ -173,7 +173,18 @@ export const trainingApplyDelete = (params={}) => http.delete('app/training-appl
// 新增的接口
export const getBannerList = (params={}) => http.get('business/video/getBannerList ', {params})
export const getBannerList = (params={}) => http.get('business/video/getBannerList', {params})
// 获得推荐教练员信息列表
export const getRecommendList = (data={}) => http.get('business/coach/recommendCoachList', data )
// 推荐驾校
export const recommendSchoolList = (params={}) => http.get('business/school/recommendSchoolList', {params})
// 教练评价
export const getBycoachId = (params={}) => http.get('business/appcomplain/getBycoachId', {params})

2
config/site.config.js

@ -2,7 +2,7 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
// localIp = false
module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.36:48080/',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.36:8318/',//非代理地址
// website: 'http://192.168.1.37:90/h5/#', 192.168.1.15:48080/
website: 'http://192.168.1.37',
httpPrefix: 'app-api/',

2
package.json

@ -1,5 +1,5 @@
{
"name": "recruitStudent",
"name": "洛阳学车",
"version": "1.0.0",
"description": "",
"main": "main.js",

1
pages/carEntry/operaAppointment/comp/step1.vue

@ -87,7 +87,6 @@
// background: #F6F6F6;
.btn_row {
display: flex;
height: 200rpx;
align-items: center;
justify-content: center;
.btnBg {

4
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -283,7 +283,7 @@
oldTrainType: '',//
finishSubject: '',//
waitSubject: '',//
photoPath: '123.png',
photoPath: '',
address: '',
totalAmount: 0,
transfer: 2, //
@ -357,6 +357,8 @@
this.form.phone = this.vuex_userInfo.phone
this.form.nationality = this.vuex_userInfo.nationality || '中国'
this.form.cardType = this.vuex_userInfo.cardType || '1'
if(this.vuex_userInfo.photoPath&&this.form.cardType=='1') this.form.photoPath = this.vuex_userInfo.photoPath
this.form.sex = this.vuex_userInfo.sex
},
//
async schoolClassFn() {

74
pages/indexEntry/enroll/uploadAvatar/uploadAvatar.vue

@ -16,7 +16,7 @@
<image :src="avatar" mode=""></image>
</view>
<view class="btnBg" @click="$goPage('/pages/indexEntry/enroll/registInfo/registInfo')">上传</view>
<view class="btnBg" @click="goPage">上传</view>
</view>
</view>
</view>
@ -25,6 +25,7 @@
<script>
import { APP_API, APP_HOST } from '@/config/site.config.js';;
const _url = APP_HOST + APP_API + '/util/manage/uploadFile.do';
import { uploadImgApi } from '@/config/utils.js'
export default {
data() {
return {
@ -39,45 +40,7 @@
})
},
methods: {
addImage() {
var that = this;
// 使
uni.chooseImage({
count: 1, //9
//album camera 使
sourceType: ['album'],
success: function(res) {
//
uni.getImageInfo({
src: res.tempFilePaths[0],
success: function(image) {
that.src = (res.tempFilePaths[0]);
console.log('这都能成功')
console.log(that.src); //,
// POST content-type multipart/form-data
}
})
}
})
},
//
chooseImages(type) {
uni.chooseImage({
count: 1, //
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: res => {
uni.showLoading({
title: '图片上传中...'
});
res.tempFilePaths.forEach( (item,index)=>{
this.uploadImgApi(item)
})
}
})
},
uploadTap() {
const _this = this;
uni.chooseImage({
@ -93,32 +56,13 @@
}
});
},
uploadImgApi(filePath) {
console.log(filePath)
let _this = this
//
uni.uploadFile({
url: _url,//
filePath: filePath,//
name: 'file',
formData: {
fileType: 1,
fileSuffix: "png"
},
header: {
token: uni.getStorageSync("Authorization") || '',
},
success(res) {
console.log('上传成功')
let res2 = JSON.parse(res.data)
_this.imgArr.push(res2.data)
console.log(res2)
uni.hideLoading();
},
complete: ()=> {}
})
},
//
async goPage() {
const photoPath = await uploadImgApi(this.avatar, 'avatar')
console.log(photoPath)
this.vuex_userInfo.photoPath = photoPath
this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
}
}
}
</script>

33
pages/indexEntry/findCoach/comp/coachItem.vue

@ -1,21 +1,26 @@
<template>
<view class="itemBox" >
<view class="img">
<image src="@/static/images/index/img_7@2x.png" mode="" ></image>
<image :src="item.photoPath" mode="" v-if="$u.utils.isImagePath(item.photoPath)"></image>
<image src="@/static/images/index/avatar.png" mode="" v-else></image>
</view>
<view class="textCon">
<view class="name">{{item.shortName}}</view>
<view class="name oneRowText">{{item.name}}</view>
<view class="flex-b">
<view class="starBox">
<view class="num">{{item.stars}}</view>
<view class="flex">
<view class="starBox">
<view class="num">{{item.stars || '无'}}</view>
</view>
<view class="pingjia" v-if="item.commentTotal">{{item.commentTotal }}条评价</view>
</view>
<callPhone v-if="showPhone" :servicePhone="[{name: item.phone}]">
<callPhone v-if="showPhone&&item.mobile" :servicePhone="[{name: item.mobile}]">
<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="adr"><text style="margin-right: 6rpx;">{{item.districtName}}</text> <text v-if="item.distance">距您{{ $u.utils.distanceFn(item.distance)}}</text></view>
<!-- <view class="credit">行业信用 <text v-if="item.creditrating">{{item.creditrating}}</text></view> -->
</view>
@ -51,17 +56,19 @@
margin-bottom: 20rpx;
}
.img {
width: 200rpx;
height: 135rpx;
width: 134rpx;
height: 134rpx;
background: #f6f6f6;
border-radius: 20rpx;
border-radius: 50%;
overflow: hidden;
flex-shrink: 0;
}
.textCon {
flex: 1;
font-size: 24rpx;
padding: 0 0 0 36rpx;
padding: 0 0 0 20rpx;
width: 0;
.name {
font-size: 28rpx;
margin-top: 4rpx;
@ -72,6 +79,11 @@
margin: 10rpx 0;
}
.pingjia {
font-size: 24rpx;
color: #999;
margin-left: 14rpx;
}
.credit {
color: #1989FA;
@ -87,5 +99,6 @@
.pozPhone {
width: 55rpx;
height: 55rpx;
margin-top: 14rpx;
}
</style>

45
pages/indexEntry/findCoach/findCoach.vue

@ -4,15 +4,10 @@
<topNavbar title="找教练"></topNavbar>
<view class="searchCon pad">
<searchRow placeholder="搜索驾校名称" @searchFn="$goPage('/pages/indexEntry/findShcool/searchShcool/searchShcool')" :disable="true"></searchRow>
<searchRow placeholder="搜索教练名称" @searchFn="searchFn" ></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)"/>
@ -28,7 +23,7 @@
<script>
import coachItem from './comp/coachItem.vue'
import { schoolPage } from '@/config/api.js'
import { coachPage } from '@/config/api.js'
export default {
components: { coachItem },
data() {
@ -50,11 +45,6 @@
params: {
pageNo: 1,
pageSize: 20,
lat: '',
lng: '',
sercheType: 1,
businessScope: '',
district: '',
name: ''
},
total: 20,
@ -63,14 +53,14 @@
}
},
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()
// 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.coachPageFn()
uni.$on('screenConfirm',(obj)=>{
this.params = Object.assign(this.params, obj)
this.listInit()
@ -81,7 +71,7 @@
},
onReachBottom() {
if(this.total>this.listData.length) {
this.schoolPageFn()
this.coachPageFn()
}
},
methods: {
@ -89,12 +79,9 @@
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)
let objStr = encodeURIComponent(JSON.stringify(item))
this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?item='+ objStr)
},
tabClick(item) {
this.params.sercheType = item.id
@ -105,18 +92,18 @@
async listInit() {
this.listData = []
this.params.pageNo = 1
await this.schoolPageFn()
await this.coachPageFn()
uni.stopPullDownRefresh()
},
//
async schoolPageFn() {
async coachPageFn() {
let obj = {}
for(let key in this.params) {
if(this.params[key]) {
obj[key] = this.params[key]
}
}
const {data: res} = await schoolPage(obj)
const {data: res} = await coachPage(obj)
this.params.pageNo ++
this.listData.push(...res.list)
this.total = res.total

24
pages/indexEntry/findShcool/coachComment/coachComment.vue

@ -4,7 +4,7 @@
<info :showSign="true" :item="info"></info>
</view>
<view class="pad">
<view class="card" style="margin: 20rpx 0;">
<view class="card">
<view class="h1"><text class="active">教练评价</text></view>
<comments :list="list" @changeNav="changeNav"></comments>
<view style="padding-bottom: 20rpx;" v-if="list.length">
@ -20,7 +20,7 @@
<script>
import comments from '../comments/comments.vue'
import info from './coachInfo.vue'
import { getListCoachComment } from '@/config/api.js'
import { getBycoachId, } from '@/config/api.js'
export default {
components: { comments, info},
data() {
@ -41,11 +41,12 @@
if(!options.item) return
this.info = JSON.parse(decodeURIComponent(options.item))
console.log(this.info)
this.params.coachId = this.info.coachId
this.getListCoachCommentFn()
this.params.coachId = this.info.id
this.getBycoachIdFn()
},
methods: {
changeNav(val) {
if(this.params.condition == val) return
this.params.condition = val
this.initList()
},
@ -53,10 +54,10 @@
this.params.pageNo = 1
this.status = 'loading'
this.list = []
this.getListCoachCommentFn()
this.getBycoachIdFn()
},
async getListCoachCommentFn() {
const {data: res} = await getListCoachComment(this.params)
async getBycoachIdFn() {
const {data: res} = await getBycoachId(this.params)
this.params.pageNo ++
this.total = res.total
let arr = res.list.map(item=>{
@ -73,7 +74,14 @@
</script>
<style lang="scss" scoped>
.card {
padding: 20rpx 0;
margin-top: 20rpx;
}
.h1 {
padding: 0 20rpx;
margin-bottom: 20rpx;
}
.infoBox {
background: #F6F6F6;
overflow: hidden;

2
pages/indexEntry/findShcool/coachComment/coachInfo.vue

@ -42,7 +42,7 @@
<style lang="scss" scoped>
.card {
padding: 20rpx;
padding: 20rpx !important;
display: flex;
.avatar {
width: 134rpx;

4
pages/indexEntry/findShcool/shcoolDetail/comp/tab4.vue

@ -30,12 +30,12 @@
padding: 24rpx;
border-bottom: 1rpx solid #f4f4f4;
.leftTxt {
font-size: 32rpx;
font-size: 28rpx;
color: $themC;
font-weight: 500;
}
.rightTxt {
font-size: 28rpx;
font-size: 26rpx;
color: #686B73;
}
}

5
pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue

@ -20,7 +20,7 @@
</view>
</view>
<!-- 驾校位置 -->
<view class="shoolPoz" style="margin-top: 20rpx;">
<view class="shoolPoz" style="margin-top: 20rpx; ">
<pozCard :info="{address: schoolDetail.address,distance: schoolDetail.distance, lat: schoolDetail.lat, lng: schoolDetail.lng, schoolName:schoolDetail.shortName}"></pozCard>
</view>
<!-- 驾校服务 -->
@ -176,6 +176,7 @@
z-index: 99;
}
.card {
padding: 0 20rpx;
.flex {
position: relative;
.schoolLogo {
@ -225,7 +226,7 @@
.navBox {
display: flex;
justify-content: space-between;
padding: 10rpx 32rpx 20rpx 32rpx;
padding: 10rpx 20rpx 20rpx 20rpx;
.nav {
width: 126rpx;
height: 50rpx;

10
pages/mineEntry/myEvaluate/comp/commentItem.vue

@ -7,8 +7,7 @@
<view class="textInfo">
<view class="name oneRowText">{{ item.name}}</view>
<view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.score" :readonly="true" allowHalf></u-rate>
<view class="num">{{ item.score?item.score.toFixed(1):0 }}</view>
<view class="num">{{ item.score?item.score.toFixed(1):'无' }}</view>
</view>
</view>
<view class="date">{{ $u.date(item.createTime ,'yyyy/mm/dd' ) }}</view>
@ -40,6 +39,7 @@
overflow: hidden;
border-radius: 50%;
background: #f6f6f6;
flex-shrink: 0;
}
.textInfo {
flex: 1;
@ -52,15 +52,15 @@
padding: 0 10rpx;
}
.starBox {
margin-top: 12rpx;
}
.date {
font-size: 24rpx;
color: #686B73;
}
}
.starBox {
padding: 10rpx 0 0rpx 0;
}
.text {
font-size: 24rpx;

2
pages/mineEntry/myOrder/comp/opera.vue

@ -34,7 +34,7 @@
<!-- <view class="btnBg">去评价</view> -->
<view class="rows">
<view class="label hui">实际支付</view>
<view class="value blue">暂无字段</view>
<view class="value blue">{{ $u.utils.priceTo(item.totalAmount)}}</view>
</view>
</view>
</view>

19
pages/mineEntry/myOrder/myOrder.vue

@ -4,8 +4,6 @@
<view class="nav" v-for="(item,index) in tabList" :key="index" :class="{active: params.orderStatus==item.id}" @click="changeTab(item)">{{ item.text }}</view>
</view>
<view class="pad">
<view class="tabCon">
<view class="card" v-for="(item,index) in list" :key="index" @click="goDetail(item)">
<opera :item="item"></opera>
@ -32,7 +30,7 @@
tabList: [
{text: '已完成',id: 1},
{text: '待付款',id: 0},
{text: '退款',id: 3},
{text: '退款',id: -1},
],//01-12
navList: [
{text: '全部', id: 0},
@ -46,14 +44,14 @@
orderType: 0,
sercheValue: ''
},
list: [{id: 1}],
list: [],
total: 0,
status: 'loading'
}
},
onLoad() {
this.params.studentId = this.studentId
// this.applyOrderPageFn()
this.applyOrderPageFn()
},
onPullDownRefresh() {
this.initList()
@ -93,16 +91,7 @@
let obj = Object.assign({},this.params)
if(obj.orderType==0) delete obj.orderType
if(!obj.sercheValue) delete obj.sercheValue
if(this.params.orderStatus==3) {
delete obj.orderStatus
if(obj.orderType) {
obj.feeType = obj.orderType
delete obj.orderType
}
var {data: res} = await refundPage(obj)
}else {
var {data: res} = await applyOrderPage(obj)
}
let {data: res} = await applyOrderPage(obj)
this.list.push(...res.list)
this.params.pageNo ++
this.total = res.total

6
pages/mineEntry/personaInfo/personaInfo.vue

@ -1,14 +1,14 @@
<template>
<view class="pageBg">
<view class="pad">
<view class="avatarBox" @click="uploadTap">
<!-- <view class="avatarBox" @click="uploadTap">
<view class="avatar">
<image :src="avatarLink" mode=""></image>
</view>
<view class="phoneIcon">
<image src="@/static/images/mineIcon/camera.png" mode=""></image>
</view>
</view>
</view> -->
<view class="card">
<view class="row">
<view class="lab">手机号</view>
@ -61,7 +61,7 @@
</view>
</view>
<!-- <view class="logout" @click="deleteTestClick" style="margin-top: 40rpx;">删除测试账号开发用的</view> -->
<view class="logout" @click="deleteTestClick" style="margin-top: 40rpx;">删除测试账号开发用的</view>
</view>
<view class="footerBtn">

1
pages/mineEntry/refund/refund.vue

@ -20,6 +20,7 @@
}
},
onLoad(options) {
if(!options.orderId) return
this.orderId = options.orderId
this.applyOrderGetFn()
},

21
pages/tabbar/index/comp/coachItem.vue

@ -1,33 +1,35 @@
<template>
<view class="coachItem">
<view class="starBoxBg">5.0</view>
<view class="starBoxBg">{{ item.stars}}</view>
<view class="info">
<view class="avatar">
<image src="@/static/images/indexIcon/xccard.png" mode=""></image>
<image :src="item.photoPath" mode="" v-if="$u.utils.isImagePath(item.photoPath)"></image>
<image src="@/static/images/index/avatar.png" mode="" v-else></image>
</view>
<view class="name">张小平</view>
<view class="schoolName">翔力驾校</view>
</view>
<view class="tags">
<view class="tag" v-for="(item,index) in 3" :key="index">优秀教练</view>
<view class="name">{{ item.name}}</view>
<view class="schoolName">{{ item.schoolName }}</view>
</view>
<!-- <view class="tags">
<view class="tag" v-for="(item2,index) in 3" :key="index">没有字段</view>
</view> -->
</view>
</template>
<script>
export default {
props: ['item'],
data() {
return {
tagArr: ['']
}
}
},
}
</script>
<style lang="scss" scoped>
.coachItem {
width: 280rpx;
height: 385rpx;
background: #FFFFFF;
border-radius: 20rpx;
position: relative;
@ -70,6 +72,7 @@
font-size: 24rpx;
color: #999;
margin-bottom: 16rpx;
text-align: center;
}
}

13
pages/tabbar/index/comp/schoolItem.vue

@ -1,13 +1,13 @@
<template>
<view class="itemBox" >
<view class="img">
<image src="@/static/images/index/img_7@2x.png" mode="" ></image>
<image :src="item.schoolIntroduceDO.iconPath" mode="" v-if="item.schoolIntroduceDO"></image>
</view>
<view class="textCon">
<view class="name">{{item.shortName}}</view>
<view class="name oneRowText">{{item.name}}</view>
<view class="flex-b">
<view class="starBox">
<view class="num">{{item.stars}}</view>
<view class="num">{{item.stars|| '无'}}</view>
</view>
<callPhone v-if="showPhone" :servicePhone="[{name: item.phone}]">
<view class="pozPhone">
@ -55,14 +55,16 @@
background: #f6f6f6;
border-radius: 20rpx;
overflow: hidden;
flex-shrink: 0;
}
.textCon {
flex: 1;
font-size: 24rpx;
padding: 0 0 0 36rpx;
padding: 0 0 0 20rpx;
width: 0;
.name {
font-size: 28rpx;
font-size: 26rpx;
margin-top: 4rpx;
color: #363A44;
}
@ -86,5 +88,6 @@
.pozPhone {
width: 55rpx;
height: 55rpx;
margin-top: 10rpx;
}
</style>

40
pages/tabbar/index/index.vue

@ -55,10 +55,10 @@
<view class="schoolCon card">
<view class="h1_row">
<view class="h1" ><text class="active">优质驾校</text></view>
<moreRight text="查看全部"/>
<moreRight text="查看全部" @click.native="$goPage('/pages/indexEntry/findShcool/findShcool')"/>
</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>
@ -71,8 +71,8 @@
<scroll-view style="width: 100%;" scroll-x="true" scroll-with-animation >
<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>
</scroll-view>
@ -127,7 +127,7 @@
<script>
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 informaItem from './comp/informaItem'
import coachItem from './comp/coachItem'
@ -244,6 +244,8 @@
bgColor: 'transparent',
informList: [],
informa: 1,
coachList: [],//
recommendSchool: [],//
}
},
async onLoad() {
@ -273,11 +275,30 @@
// this.getarticleListFn()
}
this.getarticleListFn()
this.getRecommendList()
this.recommendSchoolList()
},
computed: {
},
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() {
const {data: res} = await getBannerList()
this.swiperInfo = res.list.map(item=>{
@ -286,14 +307,9 @@
console.log(this.swiperInfo)
},
async entrySectionClick(item) {
if(item.text=='我要报名') {
if(item.text=='学车报名') {
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)
},
changeInforma(val) {

5
pages/tabbar/learnCar/comp/subject0.vue

@ -6,10 +6,11 @@
<view class="card mt20">
<view class="flex-b" >
<view class="lab">实操预约</view>
<view class="link-arrow">
<!-- <view class="link-arrow" @click="$goPage('/pages/carEntry/operaAppointment/operaAppointment?subject=3')">
<view class="txt">去预约</view>
<u-icon name="arrow-right" color="#3776FF" size="16"></u-icon>
</view>
</view> -->
<view class="btn" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate?subject=2&coachType=1')">去评价</view>
</view>
</view>
<view class="h1"><text class="active">学习状态</text></view>

7
pages/tabbar/learnCar/comp/topInfo.vue

@ -2,10 +2,10 @@
<view class="topInfo card">
<view class="user_row">
<view class="avatar">
<image src="@/static/images/mineIcon/emtryIcon (1).png" mode=""></image>
<image :src="vuex_userInfo.photoPath" mode="widthFix" v-if="vuex_userInfo.photoPath"></image>
</view>
<view class="rightTxt" @click="showType=true">
<view class="name">JOE宝宝</view>
<view class="name">{{ vuex_userInfo.name?vuex_userInfo.name:vuex_userInfo.phone?vuex_userInfo.phone:'请登录' }}</view>
<view class="btn_row">
<view class="txt">{{ carType }}</view>
<u-icon name="arrow-down-fill" color="#fff" size="10"></u-icon>
@ -87,7 +87,8 @@
height: 120rpx;
border-radius: 50%;
overflow: hidden;
// transform: translateY(-50rpx);
background: url('../../../../static/images/mineIcon/avatar.png');
background-size: 100% 100%;
margin-top: -36rpx;
background: #F6F7FA;
}

4
pages/tabbar/mine/index.scss

@ -12,7 +12,9 @@
height: 120rpx;
border-radius: 50%;
overflow: hidden;
background: #f4f4f4;
background: url('../../../static/images/mineIcon/avatar.png');
background-size: 100% 100%;
// background: #f4f4f4;
image {
}

18
pages/tabbar/mine/index.vue

@ -4,12 +4,12 @@
<!-- 用户信息 -->
<view class="userInfo">
<view class="avatar">
<image src="@/static/images/mineIcon/emtryIcon (3).png" mode=""></image>
<image :src="vuex_userInfo.photoPath" mode="widthFix" v-if="vuex_userInfo.photoPath"></image>
</view>
<view class="rightInfo" @click="topClick">
<view class="name-row">
<view class="leftTxt">
<view class="name">JOE宝宝</view>
<view class="name">{{ vuex_userInfo.name?vuex_userInfo.name:vuex_userInfo.phone?vuex_userInfo.phone:'请登录' }}</view>
<view class="arrowIcon">
<image src="@/static/images/icon/arrowRightfff.png" mode=""></image>
</view>
@ -18,13 +18,13 @@
<image src="@/static/images/mineIcon/sanCode.png" mode=""></image>
</view>
</view>
<view class="phone">18267103167</view>
<view class="phone" v-if="vuex_userInfo.name">{{ vuex_userInfo.phone }}</view>
</view>
</view>
<view class="pad">
<view class="ul">
<view class="li" v-for="(item,index) in ulData" :key="index" @click="$goPage(item.url)">
<view class="li" v-for="(item,index) in ulData" :key="index" @click="goPage(item)">
<view class="icon">
<image :src="item.icon" mode=""></image>
</view>
@ -33,7 +33,7 @@
</view>
<view class="ul2">
<view class="li2" v-for="(item,index) in ulData2" :key="index" @click="$goPage(item.url)">
<view class="li2" v-for="(item,index) in ulData2" :key="index" @click="goPage(item)">
<view class="icon">
<image :src="item.icon" mode=""></image>
</view>
@ -79,6 +79,14 @@
this.$goPage('/pages/mineEntry/personaInfo/personaInfo')
}
},
goPage(item) {
if(item.name!='关于我们') {
if(this.vuex_userInfo.applyStep!=6) {
return this.$u.toast('您还未报名驾校')
}
}
this.$goPage(item.url)
}
}
}
</script>

BIN
static/images/mineIcon/avatar.png

After

Width: 120  |  Height: 120  |  Size: 12 KiB

Loading…
Cancel
Save