Browse Source

接口对接

master
unknown 12 months ago
parent
commit
d2abd8134f
  1. 1
      common/js/utils.js
  2. 19
      components/commentItem/commentItem.vue
  3. 22
      components/pozCard/pozCard.vue
  4. 2
      components/searchRow/searchRow.vue
  5. 18
      config/api.js
  6. 2
      manifest.json
  7. 151
      pages/indexEntry/consult/pubComplaint/pubComplaint.vue
  8. 31
      pages/indexEntry/consult/pubConsult/pubConsult.vue
  9. 49
      pages/indexEntry/consult/record/comp/complaintItem.vue
  10. 23
      pages/indexEntry/consult/record/comp/consultItem.vue
  11. 62
      pages/indexEntry/consult/record/record.vue
  12. 57
      pages/indexEntry/examines/allExamines/allExamines.vue
  13. 22
      pages/indexEntry/examines/allNews/allNews.vue
  14. 41
      pages/indexEntry/examines/comp/examineItem.vue
  15. 12
      pages/indexEntry/examines/comp/newItem.vue
  16. 57
      pages/indexEntry/examines/detail/detail.vue
  17. 29
      pages/indexEntry/examines/examines.vue
  18. 8
      pages/indexEntry/findShcool/coachComment/coachComment.vue
  19. 7
      pages/indexEntry/findShcool/comments/comments.vue
  20. 28
      pages/indexEntry/findShcool/shcoolComment/shcoolComment.vue
  21. 8
      pages/indexEntry/findShcool/shcoolDetail/comp/tab1.vue
  22. 17
      pages/indexEntry/findShcool/shcoolDetail/comp/tab2.vue
  23. 8
      pages/indexEntry/findShcool/shcoolDetail/comp/tab4.vue
  24. 62
      pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue

1
common/js/utils.js

@ -12,6 +12,7 @@ const install = (Vue, vm) => {
// 距离换算 // 距离换算
const distanceFn = (val) => { const distanceFn = (val) => {
if(!val) return
if (val * 1 < 1000) { if (val * 1 < 1000) {
return val + '米' return val + '米'
} else { } else {

19
components/commentItem/commentItem.vue

@ -1,23 +1,26 @@
<template> <template>
<view class="box"> <view class="box">
<view class="flex-b"> <view class="flex-b">
<view class="name">匿名用户</view>
<view class="date">2023/08/08</view>
<view class="name">{{ item.studentName}}</view>
<view class="date">{{ $u.date(item.createTime ,'yyyy/mm/dd' ) }}</view>
</view> </view>
<view class="starBox"> <view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="4" disabled></u-rate>
<view class="num">4.9</view>
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" :count="5" :readonly="true" ></u-rate>
<view class="num">{{ item.stars }}</view>
</view> </view>
<view class="text">教学质量高技术好超有耐心有责任心学车就找这个驾校教练都超好满意满意满意</view>
<view class="imgBox">
<view class="img">
<image src="@/static/images/logo.png" mode=""></image>
<view class="text">{{ item.description }}</view>
<view class="imgBox" v-if="item.images&&item.images.length">
<view class="img" v-for="(img, imgIndex) in item.images" :key="imgIndex">
<image :src="img" mode=""></image>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default {
props: ['item']
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

22
components/pozCard/pozCard.vue

@ -2,8 +2,8 @@
<view class="card"> <view class="card">
<view class="flex-b" @click="openMap"> <view class="flex-b" @click="openMap">
<view class="left_text"> <view class="left_text">
<view class="adr ">江西省江西市江西区某某镇尚坤丁兰国际1190号820</view>
<view class="distance">距您100km</view>
<view class="adr ">{{ info.address}}</view>
<view class="distance" v-if="info.distance">距您{{ $u.utils.distanceFn(info.distance) }}</view>
</view> </view>
<view class="mapEntry"> <view class="mapEntry">
<view class="icon"> <view class="icon">
@ -17,20 +17,14 @@
<script> <script>
export default { export default {
props: ['info'],
methods: { methods: {
openMap() { openMap() {
uni.getLocation({
type: 'gcj02', //uni.openLocation
success: function (res) {
const latitude = res.latitude;
const longitude = res.longitude;
uni.openLocation({
latitude: latitude,
longitude: longitude,
success: function () {
console.log('success');
}
});
uni.openLocation({
latitude: this.info.lat,
longitude: this.info.lng,
success: function () {
console.log('success');
} }
}); });
} }

2
components/searchRow/searchRow.vue

@ -5,7 +5,7 @@
<image src="@/static/images/index/searchIcon.png" mode=""></image> <image src="@/static/images/index/searchIcon.png" mode=""></image>
</view> </view>
<view class="inputBox"> <view class="inputBox">
<u-search :placeholder="placeholder" v-model="keyword" :color="'#fff'" placeholderColor="#fff" :bgColor="'transparent'" :showAction="false" @search="searchFn" @clear="searchFn"></u-search>
<u-search :placeholder="placeholder" v-model="keyword" :color="'#fff'" placeholderColor="#fff" :bgColor="'transparent'" :showAction="false" @search="$u.debounce(searchFn, 500)" @clear="searchFn"></u-search>
</view> </view>
</view> </view>
</view> </view>

18
config/api.js

@ -14,6 +14,16 @@ export const getUserInfo = (data) => http.post('member/user/get', {header: {'con
export const logOut = (data={}) => http.post('member/auth/logout', data,) export const logOut = (data={}) => http.post('member/auth/logout', data,)
// 驾校列表分页 // 驾校列表分页
export const schoolPage = (params) => http.get('business/school/page', {params: params}) export const schoolPage = (params) => http.get('business/school/page', {params: params})
// 附近场地
export const getexamSite = (params) => http.get('business/school/getexamSite', {params: params})
// 考场详情
export const getExamSiteDatil = (params) => http.get('business/school/getExamSiteDatil', {params: params})
// 考场资讯
export const getExamSiteInfo = (params) => http.get('business/school/getExamSiteInfo', {params: params})
// 驾校评论分页
export const getSchoolListComment = (params) => http.get('business/school/getListComment', {params: params})
// 驾校详情
export const getSchoolDetail = (params) => http.get('business/school/getSchool', {params: params})
// 教练列表分页 // 教练列表分页
export const coachPage = (params) => http.get('business/coach/page', {params: params}) export const coachPage = (params) => http.get('business/coach/page', {params: params})
// 公益视频 // 公益视频
@ -40,6 +50,14 @@ export const getarticlezcList = (params) => http.get('business/video/articlezc',
export const getarticle = (params) => http.get('business/video/getarticle', {params: params}) export const getarticle = (params) => http.get('business/video/getarticle', {params: params})
// 创建咨询 // 创建咨询
export const createconsult = (data) => http.post('business/appcomplain/createconsult', data) export const createconsult = (data) => http.post('business/appcomplain/createconsult', data)
// 创建投诉
export const createcomplain = (data) => http.post('business/appcomplain/createcomplain', data)
// 关闭投诉/咨询
export const consultationClosed = (params) => http.get('business/appcomplain/closed', {params: params})
// 投诉类型
export const consultationType = (params) => http.get('system/dict/consultationType',)
// 投诉咨询记录
export const studentComplain = (params) => http.get('business/appcomplain/studentComplain', {params: params})
// 上传图片 // 上传图片
export const uploadImg = (data) => http.post('infra/file/upload', data) export const uploadImg = (data) => http.post('infra/file/upload', data)

2
manifest.json

@ -94,7 +94,7 @@
"proxy" : { "proxy" : {
"/api" : { "/api" : {
// "target" : "http://192.168.1.26:48080/", // "target" : "http://192.168.1.26:48080/",
"target" : "http://192.168.1.26:48080/",
"target" : "http://192.168.1.36:48080/",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : true, "secure" : true,
"pathRewrite" : { "pathRewrite" : {

151
pages/indexEntry/consult/pubComplaint/pubComplaint.vue

@ -8,14 +8,14 @@
<view class="label">投诉类别</view> <view class="label">投诉类别</view>
<view class="rightSelect"> <view class="rightSelect">
<u-radio-group <u-radio-group
v-model="form.radiovalue1"
v-model="form.userType"
> >
<u-radio <u-radio
:customStyle="{marginRight: '24rpx'}" :customStyle="{marginRight: '24rpx'}"
v-for="(item, index) in radiolist1" v-for="(item, index) in radiolist1"
:key="index" :key="index"
:label="item.name" :label="item.name"
:name="item.name"
:name="item.id"
> >
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
@ -26,15 +26,15 @@
<view class="card"> <view class="card">
<view class="row"> <view class="row">
<view class="label">驾校名称</view> <view class="label">驾校名称</view>
<view @click="showShoolName=true" class="select_row my" >
<input v-model="form.classModel" placeholder="请选择" @click="showShoolName=true" disabled/></input>
<view @click="showSchool=true" class="select_row my" >
<input v-model="form.schoolName" placeholder="请选择" @click="showSchool=true" disabled style="pointer-events: none;"/></input>
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon> <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view> </view>
</view> </view>
<view class="row"> <view class="row">
<view class="label">教练名称</view> <view class="label">教练名称</view>
<view @click="showShoolName=true" class="select_row" >
<input v-model="form.classModel" placeholder="请选择" @click="showShoolName=true" disabled/></input>
<view @click="goCoach" class="select_row" >
<input v-model="form.coachName" placeholder="请选择" @click="goCoach" style="pointer-events: none;" disabled/></input>
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon> <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view> </view>
</view> </view>
@ -43,8 +43,8 @@
<view class="card"> <view class="card">
<view class="row"> <view class="row">
<view class="label">投诉类型</view> <view class="label">投诉类型</view>
<view @click="showShoolName=true" class="select_row" >
<input v-model="form.classModel" placeholder="请选择" @click="showShoolName=true" disabled/></input>
<view @click="showComplainType=true" class="select_row" >
<input v-model="form.complainTypeName" placeholder="请选择" @click="showComplainType=true" style="pointer-events: none;" disabled/></input>
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon> <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view> </view>
</view> </view>
@ -58,19 +58,19 @@
<image src="@/static/images/index/edit.png" mode=""></image> <image src="@/static/images/index/edit.png" mode=""></image>
</view> </view>
<view class="inputBox"> <view class="inputBox">
<u-textarea v-model="value" ref="textarea" placeholder="详细说明问题,以便获得更好的回答~"></u-textarea>
<u-textarea v-model.trim="form.content" ref="textarea" placeholder="详细说明问题,以便获得更好的回答~"></u-textarea>
</view> </view>
</view> </view>
<view class="phoneBox"> <view class="phoneBox">
<view class="imgBox"> <view class="imgBox">
<view class="img">
<view class="minusCircle">
<u-icon name="close-circle-fill" size="20" color="#b9061d"></u-icon>
<view class="img" v-for="(item,index) in imgArr" :key="item">
<view class="minusCircle" @click="deleteImg(item)">
<u-icon name="close-circle-fill" size="20" color="#b9061d"></u-icon>
</view> </view>
<image src="../../../../static/logo.png" mode=""></image>
<image :src="item" mode=""></image>
</view> </view>
</view> </view>
<view class="phone" @click="chooseImages">
<view class="phone" @click="chooseImages" v-if="imgArr.length<3">
<view class="phoneIcon"> <view class="phoneIcon">
<image src="@/static/images/index/btn_tupian.png" mode=""></image> <image src="@/static/images/index/btn_tupian.png" mode=""></image>
</view> </view>
@ -83,52 +83,107 @@
<view class="card"> <view class="card">
<view class="phone_row"> <view class="phone_row">
<view class="label">联系电话</view> <view class="label">联系电话</view>
<view class="uInput my">
<u--input placeholder="输入手机号码,以便我们回复您!" v-model="value" border="none" type="number" fontSize="14"></u--input>
</view>
<view class="uInput my">{{ this.vuex_userInfo.mobile }}</view>
</view> </view>
</view> </view>
<view class="btn active">提交</view>
<view class="btn" :class="{active: btnActive}" @click="submintFn">提交</view>
</view> </view>
<u-picker :show="showShoolName" :columns="shoolArr" keyName="lab" @confirm="confirmSex" @cancel="showShoolName=false"></u-picker>
<u-picker :show="showComplainType" :columns="complainTypeArr" keyName="label" @confirm="confirmComplainType" @cancel="showComplainType=false"></u-picker>
<u-popup :show="showSchool" mode="bottom" :round="8" @close="showSchool=false">
<searchSchool @chooseSchool="chooseSchool"/>
</u-popup>
<!-- <u-picker :show="show" :columns="shoolArr" keyName="lab"></u-picker> --> <!-- <u-picker :show="show" :columns="shoolArr" keyName="lab"></u-picker> -->
</view> </view>
</template> </template>
<script> <script>
import { APP_API, APP_HOST } from '@/site.config.js';
const _url = APP_HOST + APP_API + '/util/manage/uploadFile.do';
import { createcomplain, consultationType } from '@/config/api.js'
import { WX_API, H5_API, prefix } from '@/config/site.config.js';
import searchSchool from '@/pages/indexEntry/enroll/registInfo/comp/searchSchool.vue'
var _url = H5_API+ WX_API
export default { export default {
components: { searchSchool },
data() { data() {
return { return {
showSchool: false,
value: '', value: '',
imgArr: [], imgArr: [],
showShoolName: false,
shoolArr: [
[
{lab: '翔力驾校',id: 1}
]
],
showComplainType: false,
// 123退456,(1)
complainTypeArr: [],
form: { form: {
value: '投诉驾校'
value: '投诉驾校',
complainType: '',
complainTypeName: '',
userType: 1,
coachName: '',
schoolName: '',
schoolId: '',
content: '',
type: 2
}, },
radiolist1: [{ radiolist1: [{
name: '投诉驾校', name: '投诉驾校',
id: 1,
disabled: false disabled: false
}, },
{ {
name: '投诉教练', name: '投诉教练',
id: 2,
disabled: false disabled: false
}, },
], ],
} }
}, },
computed: {
btnActive() {
if(this.form.schoolId&&this.form.complainType&&this.form.content) {
return true
}else {
return false
}
}
},
onLoad() {
uni.$on('upDateCoachItem',(item)=>{
console.log(item)
this.form.coachId = item.id
this.form.coachName = item.name
})
this.consultationTypeFn()
},
methods: { methods: {
//
confirmSex(val) {
//
async consultationTypeFn() {
const {data: res} = await consultationType()
this.complainTypeArr = [res]
},
//
confirmComplainType(val) {
console.log(val) console.log(val)
this.showShoolName = false
let item = val.value[0]
this.form.complainType = item.value
this.form.complainTypeName = item.label
this.showComplainType = false
},
//
chooseSchool(item) {
this.form.schoolName = item.name
this.form.schoolId = item.id
console.log(this.columnsCar)
this.showSchool = false
},
//
goCoach() {
if(!this.form.schoolId) return this.$u.toast('请先选择驾校')
this.$goPage('/pages/indexEntry/enroll/registInfo/chooseCoach/chooseCoach?schoolId=' + this.form.schoolId)
},
deleteImg(item) {
let index = this.imgArr.findIndex(val=>val==item)
this.imgArr.splice(index, 1)
}, },
// //
chooseImages(type) { chooseImages(type) {
@ -141,27 +196,32 @@
uni.showLoading({ uni.showLoading({
title: '图片上传中...' title: '图片上传中...'
}); });
res.tempFilePaths.forEach( (item,index)=>{
this.uploadImgApi(item)
console.log(res)
res.tempFiles.forEach( (item,index)=>{
this.uploadImgApi(item.path, item.name)
}) })
} }
}) })
}, },
uploadImgApi(filePath) {
uploadImgApi(filePath, imgName) {
console.log(filePath) console.log(filePath)
let token = 'Bearer '+ this.$store.state.user.vuex_loginInfo.accessToken
let _this = this let _this = this
let timer = new Date() * 1
// //
uni.uploadFile({ uni.uploadFile({
url: _url,//
url: _url + 'app-api/infra/file/upload',//
filePath: filePath,// filePath: filePath,//
name: 'file', name: 'file',
formData: { formData: {
fileType: 1,
path: 'complain/'+ uni.$u.date(name, 'yyyy-mm-dd')+'/'+timer + '-'+ imgName,
type: 1,
fileSuffix: "png" fileSuffix: "png"
}, },
header: { header: {
token: uni.getStorageSync("Authorization") || '',
Authorization: token,
'tenant-id': 1
}, },
success(res) { success(res) {
console.log('上传成功') console.log('上传成功')
@ -170,9 +230,24 @@
console.log(res2) console.log(res2)
uni.hideLoading(); uni.hideLoading();
}, },
complete: ()=> {}
complete: (err)=> {
console.log(err)
}
}) })
}, },
async submintFn() {
if(!this.btnActive) return
if(!this.form.content) return this.$u.toast('请输入内容')
this.form.images = this.imgArr.join(',')
let obj = Object.assign({}, this.form)
delete obj.value
delete obj.complainTypeName
const {data: res} = await createcomplain(this.form)
this.$u.toast('发布成功')
setTimeout(()=>{
this.$goPage('/pages/indexEntry/consult/record/record?tab=2')
},1500)
},
} }
} }
</script> </script>

31
pages/indexEntry/consult/pubConsult/pubConsult.vue

@ -10,7 +10,7 @@
<image src="@/static/images/index/edit.png" mode=""></image> <image src="@/static/images/index/edit.png" mode=""></image>
</view> </view>
<view class="inputBox"> <view class="inputBox">
<u-textarea v-model="value" ref="textarea" placeholder="详细说明问题,以便获得更好的回答~"></u-textarea>
<u-textarea v-model.trim="value" ref="textarea" placeholder="详细说明问题,以便获得更好的回答~"></u-textarea>
</view> </view>
</view> </view>
<view class="phoneBox"> <view class="phoneBox">
@ -22,7 +22,7 @@
<image :src="item" mode=""></image> <image :src="item" mode=""></image>
</view> </view>
</view> </view>
<view class="phone" @click="chooseImages">
<view class="phone" @click="chooseImages" v-if="imgArr.length<3">
<view class="phoneIcon"> <view class="phoneIcon">
<image src="@/static/images/index/btn_tupian.png" mode=""></image> <image src="@/static/images/index/btn_tupian.png" mode=""></image>
</view> </view>
@ -32,14 +32,14 @@
</view> </view>
</view> </view>
<view class="card" style="padding-bottom: 0;">
<view class="card" style="padding-bottom: 0; margin-top: 24rpx;">
<view class="phone_row"> <view class="phone_row">
<view class="label">联系电话</view> <view class="label">联系电话</view>
<view class="uInput my">{{ this.vuex_userInfo.mobile }}</view> <view class="uInput my">{{ this.vuex_userInfo.mobile }}</view>
</view> </view>
</view> </view>
<view class="btn active" @click="submintFn">提交</view>
<view class="btn" :class="{active: value.length}" @click="submintFn">提交</view>
</view> </view>
</view> </view>
</template> </template>
@ -61,6 +61,7 @@
methods: { methods: {
async submintFn() { async submintFn() {
let images = this.imgArr.join(',') let images = this.imgArr.join(',')
if(!this.value.trim()) return this.$u.toast('请输入内容')
let obj = { let obj = {
images, images,
studentPhone: this.vuex_userInfo.mobile, studentPhone: this.vuex_userInfo.mobile,
@ -69,8 +70,15 @@
content: this.value content: this.value
} }
const {data: res} = await createconsult(obj) const {data: res} = await createconsult(obj)
this.$u.toast('发布成功')
this.value = ''
this.imgArr = []
setTimeout(()=>{
this.$goPage('/pages/indexEntry/consult/record/record?tab=1')
},1500)
}, },
deleteImg(item,index) {
deleteImg(item) {
let index = this.imgArr.findIndex(val=>val==item)
this.imgArr.splice(index, 1) this.imgArr.splice(index, 1)
}, },
// //
@ -84,18 +92,17 @@
uni.showLoading({ uni.showLoading({
title: '图片上传中...' title: '图片上传中...'
}); });
res.tempFilePaths.forEach( (item,index)=>{
this.uploadImgApi(item)
res.tempFiles.forEach( (item,index)=>{
this.uploadImgApi(item.path, item.name)
}) })
} }
}) })
}, },
uploadImgApi(filePath) {
uploadImgApi(filePath, imgNamme) {
console.log(filePath) console.log(filePath)
// let token = 'Bearer '+ this.$store.state.user.vuex_loginInfo.accessToken
let token = 'Bearer 15409b4b67574665bbc4a3e16dd3debb'
let token = 'Bearer '+ this.$store.state.user.vuex_loginInfo.accessToken
let _this = this let _this = this
let name = new Date() * 1
let timer = new Date() * 1
// //
uni.uploadFile({ uni.uploadFile({
url: _url + 'app-api/infra/file/upload',// url: _url + 'app-api/infra/file/upload',//
@ -103,7 +110,7 @@
name: 'file', name: 'file',
formData: { formData: {
path: 'complain/'+name,
path: 'complain/'+ uni.$u.date(name, 'yyyy-mm-dd')+timer + '-'+ imgName,
type: 1, type: 1,
fileSuffix: "png" fileSuffix: "png"
}, },

49
pages/indexEntry/consult/record/comp/complaintItem.vue

@ -2,10 +2,10 @@
<view class="consultItem"> <view class="consultItem">
<view class="top_row"> <view class="top_row">
<view class="flex"> <view class="flex">
<view class="tag">投诉教练</view>
<view class="tag">服务态度</view>
<view class="tag"> {{ item.complainDO.userType==1?'投诉驾校':'投诉教练'}}</view>
<view class="tag">{{ item.complainType }}</view>
</view> </view>
<view class="status">待处理</view>
<view class="status">{{dealStatus[item.complainDO.dealStatus]}}</view>
</view> </view>
<view class="target"> <view class="target">
<view class="row"> <view class="row">
@ -15,41 +15,54 @@
</view> </view>
<view class="lab">驾校名称</view> <view class="lab">驾校名称</view>
</view> </view>
<view class="name">翔力驾校</view>
<view class="name towRowText">{{ item.complainDO.schoolName }}</view>
</view> </view>
<view class="row">
<view class="row" v-if="item.complainDO.coachName">
<view class="leftLab"> <view class="leftLab">
<view class="icon"> <view class="icon">
<image src="@/static/images/index/edit.png" mode=""></image> <image src="@/static/images/index/edit.png" mode=""></image>
</view> </view>
<view class="lab">教练名称</view> <view class="lab">教练名称</view>
</view> </view>
<view class="name">翔力驾校</view>
<view class="name">{{ item.complainDO.coachName }}</view>
</view> </view>
</view> </view>
<view class="content"> <view class="content">
<view class="lab">问题描述</view> <view class="lab">问题描述</view>
<view class="text">能退学费吗</view>
<view class="text">{{ item.complainDO.content }}</view>
</view>
<view class="content" v-if="item.complainReplayDOS&&item.complainReplayDOS.length">
<view class="lab">回复内容</view>
<view class="text" v-for="(item2,index2) in item.complainReplayDOS" :key="index2">{{ item2.replyContent }}</view>
</view> </view>
<view class="border_bottom"> <view class="border_bottom">
<view class="dateBox"> <view class="dateBox">
<view class="date">创建时间2022-01-04</view>
<!-- <view class="date">处理时间2022-01-04</view> -->
<view class="date">创建时间{{ $u.date(item.createTime, 'yyyy-mm-dd')}}</view>
<view class="date" v-if="item.complainDO.dealStatus==2&&item.complainReplayDOS.length">处理时间{{ $u.date(item.complainReplayDOS[0].updateTime, 'yyyy-mm-dd')}} </view>
</view> </view>
<view class="close_btn" @click="closeFn">关闭</view>
<view class="close_btn" @click="closeFn(item.complainDO.id)" v-if="item.complainDO.dealStatus==1">关闭</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { consultationClosed } from '@/config/api.js'
export default { export default {
props: ['item'],
data() {
return {
dealStatus: ['','未处理', '已处理', '已关闭' ],//123
}
},
methods: { methods: {
closeFn() {
closeFn(id) {
uni.showModal({ uni.showModal({
content:'确定要关闭吗?', content:'确定要关闭吗?',
success: function(res) {
success: async (res)=> {
if (res.confirm) { if (res.confirm) {
const result = await consultationClosed({id})
this.$u.toast('关闭成功')
this.item.complainDO.dealStatus = 3
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }
@ -69,7 +82,7 @@
} }
.row { .row {
display: flex; display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 24rpx 0; padding: 24rpx 0;
.leftLab { .leftLab {
display: flex; display: flex;
@ -80,15 +93,19 @@
} }
.lab { .lab {
margin-left: 10rpx;
// margin-left: 10rpx;
font-size: 28rpx; font-size: 28rpx;
color: #ADADAD; color: #ADADAD;
white-space: nowrap;
} }
} }
.name { .name {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
width: 0;
flex: 1;
padding-left: 15rpx;
} }
} }
.top_row { .top_row {
@ -117,7 +134,7 @@
} }
.content { .content {
padding: 24rpx 0 50rpx 0;
padding: 24rpx 0 20rpx 0;
font-size: 28rpx; font-size: 28rpx;
.lab { .lab {
color: #ADADAD; color: #ADADAD;

23
pages/indexEntry/consult/record/comp/consultItem.vue

@ -2,32 +2,41 @@
<view class="consultItem"> <view class="consultItem">
<view class="top_row"> <view class="top_row">
<view class="tag">咨询</view> <view class="tag">咨询</view>
<view class="status">待处理</view>
<view class="status">{{dealStatus[item.complainDO.dealStatus]}}</view>
</view> </view>
<view class="content"> <view class="content">
<view class="lab">问题描述</view> <view class="lab">问题描述</view>
<view class="text">能退学费吗</view>
<view class="text">{{ item.complainDO.content }}</view>
</view> </view>
<view class="border_bottom"> <view class="border_bottom">
<view class="dateBox"> <view class="dateBox">
<view class="date">创建时间2022-01-04</view>
<!-- <view class="date">处理时间2022-01-04</view> -->
<view class="date" v-if="item.complainDO&&item.complainDO.createTime">创建时间{{ $u.date(item.complainDO.createTime, 'yyyy-mm-dd')}}</view>
<!-- <view class="date">处理时间{{item.complainDO.createTime}}</view> -->
</view> </view>
<view class="close_btn">关闭</view>
<view class="close_btn" v-if="item.complainDO.dealStatus==1">关闭</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { consultationClosed } from '@/config/api.js'
export default { export default {
props: ['item'],
data() {
return {
dealStatus: ['','未处理', '已处理', '已关闭' ],//123
}
},
methods: { methods: {
closeFn() { closeFn() {
uni.showModal({ uni.showModal({
content:'确定要关闭吗?', content:'确定要关闭吗?',
success: function(res) {
success: async (res)=> {
if (res.confirm) { if (res.confirm) {
const result = await consultationClosed({id})
this.$u.toast('关闭成功')
this.item.complainDO.dealStatus = 3
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }

62
pages/indexEntry/consult/record/record.vue

@ -3,33 +3,35 @@
<topNavbar title="投诉咨询记录"></topNavbar> <topNavbar title="投诉咨询记录"></topNavbar>
<view class="pad"> <view class="pad">
<view class="tabs"> <view class="tabs">
<view class="tab" v-for="(item,index) in tabList" :key="index" :class="{active: currentTab==item.id}" @click="changeTab(item)">{{ item.text }}</view>
<view class="tab" v-for="(item,index) in tabList" :key="index" :class="{active: params.type==item.id}" @click="changeTab(item)">{{ item.text }}</view>
</view> </view>
<view class="navs"> <view class="navs">
<view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view>
<view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: params.dealStatus==item.id}" @click="changeNav(item)">{{ item.text }}</view>
</view> </view>
<view class="recordTotal">100条记录</view>
<view class="recordTotal" v-if="total">{{ total }}条记录</view>
<view class="tabCon" v-if="currentTab==1">
<view class="card" v-for="(item,index) in 10" :key="index">
<consultItem></consultItem>
<view class="tabCon" v-if="params.type==1">
<view class="card" v-for="(item,index) in list" :key="index">
<consultItem :item="item"></consultItem>
</view> </view>
</view> </view>
<view class="tabCon" v-if="currentTab==2">
<view class="card" v-for="(item,index) in 10" :key="index">
<complaintItem></complaintItem>
<view class="tabCon" v-if="params.type==2">
<view class="card" v-for="(item,index) in list" :key="index">
<complaintItem :item="item"></complaintItem>
</view> </view>
</view> </view>
</view> </view>
<view style="padding-bottom: 20rpx;">
<u-loadmore :status="status" />
</view>
</view> </view>
</template> </template>
<script> <script>
import consultItem from './comp/consultItem' import consultItem from './comp/consultItem'
import complaintItem from './comp/complaintItem' import complaintItem from './comp/complaintItem'
import { studentComplain } from '@/config/api.js'
export default { export default {
components: { consultItem, complaintItem }, components: { consultItem, complaintItem },
data() { data() {
@ -44,17 +46,45 @@
{text: '已处理', id: 2}, {text: '已处理', id: 2},
{text: '已关闭', id: 3}, {text: '已关闭', id: 3},
], ],
currentTab: 1,
currentNav: 0,
status: 'loading',
total: 0,
params: {
type: 1,
dealStatus: 0,
pageNo: 1,
pageSize: 20
},
list: []
} }
}, },
onLoad(options) {
if(options.tab) this.params.type = options.tab
this.params.studentPhone = this.vuex_userInfo.mobile
this.studentComplainFn()
},
methods: { methods: {
changeTab(item) { changeTab(item) {
this.currentTab = item.id
this.params.type = item.id
this.initList()
}, },
changeNav(item) { changeNav(item) {
this.currentNav = item.id
this.params.dealStatus = item.id
this.initList()
}, },
initList() {
this.params.pageNo = 1
this.list = []
this.status = 'loading'
this.studentComplainFn()
},
//
async studentComplainFn() {
const {data: res} = await studentComplain(this.params)
this.list.push(...res.list)
this.total = res.total
if(this.list.length>=this.total) this.status = 'nomore'
console.log(res)
}
} }
} }
</script> </script>
@ -89,7 +119,7 @@
justify-content: space-between; justify-content: space-between;
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
padding: 24rpx 0 40rpx 0;
padding: 24rpx 24rpx 40rpx 24rpx;
color: #fff; color: #fff;
.nav { .nav {
&.active { &.active {

57
pages/indexEntry/examines/allExamines/allExamines.vue

@ -3,20 +3,24 @@
<topNavbar title="找考场"></topNavbar> <topNavbar title="找考场"></topNavbar>
<view class="pad"> <view class="pad">
<view class="search"> <view class="search">
<searchRow placeholder="搜索考场名称"/>
<searchRow placeholder="搜索考场名称" @searchFn="searchFn"/>
</view> </view>
<view class="navBox"> <view class="navBox">
<view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view>
<view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: params.siteType==item.id}" @click="changeNav(item)">{{ item.text }}</view>
</view> </view>
<view class="card">
<examineItem></examineItem>
<view class="card" v-for="(item,index) in list" :key="index">
<examineItem :item="item"></examineItem>
</view> </view>
</view> </view>
<view style="padding-bottom: 20rpx;">
<u-loadmore :status="status" />
</view>
</view> </view>
</template> </template>
<script> <script>
import examineItem from '../comp/examineItem.vue' import examineItem from '../comp/examineItem.vue'
import { getexamSite } from '@/config/api.js'
export default { export default {
components: { components: {
examineItem examineItem
@ -29,12 +33,53 @@
{text: '科目二', id: 2}, {text: '科目二', id: 2},
{text: '科目三', id: 3}, {text: '科目三', id: 3},
], ],
currentNav: 0
currentNav: 0,
list: [],
params: {
pageNo: 1,
pageSize: 20,
siteType: 0
},
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.getexamSiteFn()
},
onReachBottom() {
if(this.total>this.list.length) {
this.getexamSiteFn()
} }
}, },
methods: { methods: {
changeNav(item) { changeNav(item) {
this.currentNav = item.id
this.params.siteType = item.id
this.status = 'loading'
this.initList()
},
searchFn(val) {
this.params.name = val
this.initList()
},
initList() {
this.params.pageNo = 1
this.list = []
this.getexamSiteFn()
},
async getexamSiteFn() {
const {data: res} = await getexamSite(this.params)
this.list.push(...res.list)
this.total = res.total
if(this.list.length>=this.total) this.status = 'nomore'
console.log(res)
} }
} }
} }

22
pages/indexEntry/examines/allNews/allNews.vue

@ -2,8 +2,8 @@
<view class="pageBgImg"> <view class="pageBgImg">
<topNavbar title="信息资讯"></topNavbar> <topNavbar title="信息资讯"></topNavbar>
<view class="ul"> <view class="ul">
<view class="card" v-for="(item,index) in 6" :key="index">
<newItem></newItem>
<view class="card" v-for="(item,index) in infoList" :key="index">
<newItem :item="item"></newItem>
</view> </view>
</view> </view>
</view> </view>
@ -12,7 +12,23 @@
<script> <script>
import newItem from '../comp/newItem' import newItem from '../comp/newItem'
export default { export default {
components: { newItem }
components: { newItem },
data() {
return {
infoList: [],
id: ''
}
},
onLoad(options) {
this.id = options.id
this.getExamSiteInfoFn()
},
methods: {
async getExamSiteInfoFn() {
const {data: res} = await getExamSiteInfo({id: this.id,pageNo: 1,pageSize: 2, })
this.infoList = res.list
}
}
} }
</script> </script>

41
pages/indexEntry/examines/comp/examineItem.vue

@ -1,31 +1,33 @@
<template> <template>
<view class="li" @click="$goPage('/pages/indexEntry/examines/detail/detail')">
<view class="li" @click="$goPage('/pages/indexEntry/examines/detail/detail?id='+ item.id)">
<view class="flex"> <view class="flex">
<view class="cover"> <view class="cover">
<image src="@/static/images/logo.png" mode=""></image> <image src="@/static/images/logo.png" mode=""></image>
</view> </view>
<view class="textCon"> <view class="textCon">
<view class="name">江西海正驾校</view>
<view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="4" disabled></u-rate>
<view class="name">{{ item.name}}</view>
<!-- <view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="4" :readonly="true"></u-rate>
<view class="num">4.9</view> <view class="num">4.9</view>
</view>
<view class="modeCar">准考车型C1/C2</view>
</view> -->
<view class="modeCar">准考车型{{item.carType}}</view>
</view> </view>
<callPhone>
<callPhone :servicePhone="[{name: item.phone}]">
<view class="pozPhone"> <view class="pozPhone">
<image src="@/static/images/index/telephone.png" mode=""></image> <image src="@/static/images/index/telephone.png" mode=""></image>
</view> </view>
</callPhone> </callPhone>
</view> </view>
<view class="redBox">
<!-- <view class="icon">
<image src="@/static/images/index/ic_tongzhi.png" mode=""></image>
</view> -->
<view class="redBox" v-if="item.notification&&item.notification.length">
<!-- <view class="marqueeW"> --> <!-- <view class="marqueeW"> -->
<u-notice-bar :text="'免费开放日免费开放日免费开放日免费开放日2023/08/08'" bgColor="#FBE8EA" color="#C12727" fontSize="12"></u-notice-bar>
<!-- </view> --> <!-- </view> -->
<view class="minText" v-if="item.notification.length<24">
<u-icon name="volume" color="#C12727" size="18"></u-icon>
<view class="redTxt">{{ item.notification }}</view>
</view>
<u-notice-bar :text="item.notification" bgColor="#FBE8EA" color="#C12727" fontSize="12" v-else></u-notice-bar>
</view> </view>
</view> </view>
</template> </template>
@ -33,6 +35,7 @@
<script> <script>
import marquee from './marquee' import marquee from './marquee'
export default { export default {
props: ['item'],
components: { marquee }, components: { marquee },
data() { data() {
return { return {
@ -58,6 +61,7 @@
.name { .name {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
margin-bottom: 24rpx;
} }
.starBox { .starBox {
@ -73,7 +77,7 @@
.pozPhone { .pozPhone {
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 40rpx;
right: 20rpx;
width: 72rpx; width: 72rpx;
height: 72rpx; height: 72rpx;
transform: translateY(-50%); transform: translateY(-50%);
@ -100,4 +104,15 @@
flex: 1; flex: 1;
} }
} }
.minText {
display: flex;
align-items: center;
padding-left: 20rpx;
.redTxt {
color: #C12727;
font-size: 24rpx;
padding-left: 20rpx;
}
}
</style> </style>

12
pages/indexEntry/examines/comp/newItem.vue

@ -1,12 +1,16 @@
<template> <template>
<view class="newItem" @click="$goPage('/pages/indexEntry/examines/newsDetail/newsDetail')">
<view class="h2">最新免费开放日来啦</view>
<view class="text">2023/08/082023/08/09 全天免费开放咯~</view>
<view class="date">发布时间2023/08/06</view>
<view class="newItem" >
<view class="h2">{{ item.title}}</view>
<view class="text">{{ item.mainBody }}</view>
<view class="date">发布时间{{ $u.date(item.createTime, 'yyyy/mm/dd')}}</view>
</view> </view>
</template> </template>
<script> <script>
export default {
props: ['item']
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

57
pages/indexEntry/examines/detail/detail.vue

@ -1,11 +1,11 @@
<template> <template>
<!-- 考场详情 --> <!-- 考场详情 -->
<view class="pageBg"> <view class="pageBg">
<view class="swiper-box">
<view class="swiper-box" :style="{ backgroundImage: `url(${detailInfo.images})`, backgroundSize: backgroundSize }">
<view class="navPoz"> <view class="navPoz">
<topNavbar title=" "></topNavbar> <topNavbar title=" "></topNavbar>
</view> </view>
<u-swiper :list="list1" :height="261"></u-swiper>
<!-- <u-swiper :list="list1" :height="261"></u-swiper> -->
<view class="radian"> <view class="radian">
<image :src="radianImg" mode=""></image> <image :src="radianImg" mode=""></image>
</view> </view>
@ -13,31 +13,33 @@
<view <view class="pad traTop"> <view <view class="pad traTop">
<view class="card info"> <view class="card info">
<view class="cover"> <view class="cover">
<image src="@/static/images/logo.png" mode=""></image>
<image :src="detailInfo.images" mode="widthFix"></image>
</view> </view>
<view class="textCon"> <view class="textCon">
<view class="name">江西海正驾校</view>
<view class="modeCar">准考车型C1/C2</view>
</view>
<view class="pozPhone">
<image src="@/static/images/index/telephone.png" mode=""></image>
<view class="name">{{detailInfo.name}}</view>
<view class="modeCar">准考车型{{detailInfo.carType}}</view>
</view> </view>
<callPhone :servicePhone="[{name: detailInfo.phone}]">
<view class="pozPhone">
<image src="@/static/images/index/telephone.png" mode=""></image>
</view>
</callPhone>
</view> </view>
<!-- 考场位置 --> <!-- 考场位置 -->
<view class="location"> <view class="location">
<view class="h1">考场位置</view> <view class="h1">考场位置</view>
<view class="pozLi"> <view class="pozLi">
<pozCard></pozCard>
<pozCard :info="{address: detailInfo.address, lat:detailInfo.lat,lng: detailInfo.lng, distance: distance}"></pozCard>
</view> </view>
</view> </view>
<!-- 信息资讯 --> <!-- 信息资讯 -->
<view class="news"> <view class="news">
<view class="flex-b"> <view class="flex-b">
<view class="h1">信息资讯</view> <view class="h1">信息资讯</view>
<moreRight text='查看全部' @click.native="$goPage('/pages/indexEntry/examines/allNews/allNews')"></moreRight>
<moreRight text='查看全部' @click.native="$goPage('/pages/indexEntry/examines/allNews/allNews?id='+ id)"></moreRight>
</view> </view>
<view class="card">
<newItem></newItem>
<view class="card" v-for="(item,index) in infoList" :key="index" style="margin-bottom: 20rpx;">
<newItem :item="item"></newItem>
</view> </view>
</view> </view>
<view class="btn">我要模拟</view> <view class="btn">我要模拟</view>
@ -48,6 +50,7 @@
<script> <script>
import newItem from '../comp/newItem' import newItem from '../comp/newItem'
import { imgUrl } from '@/config/site.config.js' import { imgUrl } from '@/config/site.config.js'
import { getExamSiteDatil, getExamSiteInfo } from '@/config/api.js'
export default { export default {
components: { newItem }, components: { newItem },
data() { data() {
@ -58,7 +61,36 @@
'https://cdn.uviewui.com/uview/swiper/swiper2.png', 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper3.png', 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
], ],
detailInfo: {},
infoList: [],
id: '',
params: {},
distance: ''
}
},
onLoad(options) {
this.id = options.id
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.getExamSiteDatilFn()
this.getExamSiteInfoFn()
},
methods: {
async getExamSiteDatilFn() {
const {data: res} = await getExamSiteDatil( Object.assign({id: this.id, },this.params))
this.distance = res.distance
this.detailInfo = res.siteDO
},
async getExamSiteInfoFn() {
const {data: res} = await getExamSiteInfo({id: this.id,pageNo: 1,pageSize: 2, })
this.infoList = res.list
} }
} }
} }
</script> </script>
@ -67,6 +99,7 @@
.swiper-box { .swiper-box {
position: relative; position: relative;
height: 500rpx;
.navPoz { .navPoz {
position: absolute; position: absolute;
top: 0; top: 0;

29
pages/indexEntry/examines/examines.vue

@ -16,8 +16,8 @@
<view class="h1">附近考场</view> <view class="h1">附近考场</view>
<moreRight text="查看全部考场" @click.native="$goPage('/pages/indexEntry/examines/allExamines/allExamines')"></moreRight> <moreRight text="查看全部考场" @click.native="$goPage('/pages/indexEntry/examines/allExamines/allExamines')"></moreRight>
</view> </view>
<view class="card">
<examineItem></examineItem>
<view class="card" v-for="(item,index) in list" :key="index">
<examineItem :item="item"></examineItem>
</view> </view>
</view> </view>
</view> </view>
@ -25,6 +25,7 @@
<script> <script>
import examineItem from './comp/examineItem.vue' import examineItem from './comp/examineItem.vue'
import { getexamSite } from '@/config/api.js'
export default { export default {
components: { examineItem }, components: { examineItem },
data() { data() {
@ -35,7 +36,29 @@
{text: '领证宣誓', icon: require('../../../static/images/index/btn_xuanshi.png'), id: 3 }, {text: '领证宣誓', icon: require('../../../static/images/index/btn_xuanshi.png'), id: 3 },
{text: '警示教育', icon: require('../../../static/images/index/btn_jiaoyu.png'), id: 4 , url: '/pages/indexEntry/examines/warningEducation/warningEducation'}, {text: '警示教育', icon: require('../../../static/images/index/btn_jiaoyu.png'), id: 4 , url: '/pages/indexEntry/examines/warningEducation/warningEducation'},
{text: '驾照邮寄', icon: require('../../../static/images/index/btn_youjix.png'), id: 5 }, {text: '驾照邮寄', icon: require('../../../static/images/index/btn_youjix.png'), id: 5 },
]
],
list: [],
params: {
pageNo: 1,
pageSize: 10,
}
}
},
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.getexamSiteFn()
},
methods: {
async getexamSiteFn() {
const {data: res} = await getexamSite(this.params)
this.list = res.list
console.log(res)
} }
} }
} }

8
pages/indexEntry/findShcool/coachComment/coachComment.vue

@ -1,17 +1,17 @@
<template> <template>
<view class="pageBg"> <view class="pageBg">
<view class="infoBox pad">
<!-- <view class="infoBox pad">
<info :showSign="true"></info> <info :showSign="true"></info>
</view>
</view> -->
<comments></comments> <comments></comments>
</view> </view>
</template> </template>
<script> <script>
import comments from '../comments/comments.vue' import comments from '../comments/comments.vue'
import info from '../shcoolDetail/comp/tab3.vue'
// import info from '../shcoolDetail/comp/tab3.vue'
export default { export default {
components: { comments, info }
components: { comments, }
} }
</script> </script>

7
pages/indexEntry/findShcool/comments/comments.vue

@ -3,8 +3,8 @@
<view class="navBox"> <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 class="nav" v-for="(item,index) in navList" :key="index" @click="changeNav(item)" :class="{active: currentNav==item.id}">{{ item.text }}</view>
</view> </view>
<view class="card">
<commentItem/>
<view class="card" v-for="(item,index) in list">
<commentItem :item="item"/>
</view> </view>
</view> </view>
</template> </template>
@ -13,12 +13,13 @@
// import commentItem from './commentItem' // import commentItem from './commentItem'
export default { export default {
// components: { commentItem }, // components: { commentItem },
props: ['list'],
data() { data() {
return { return {
navList: [ navList: [
{text: '全部', id: 1}, {text: '全部', id: 1},
{text: '最新', id: 2}, {text: '最新', id: 2},
{text: '有图22', id: 3},
{text: '有图', id: 3},
{text: '有视频', id: 4}, {text: '有视频', id: 4},
], ],
currentNav: 1, currentNav: 1,

28
pages/indexEntry/findShcool/shcoolComment/shcoolComment.vue

@ -1,13 +1,37 @@
<template> <template>
<view class="main"> <view class="main">
<comments></comments>
<comments :list="list"></comments>
</view> </view>
</template> </template>
<script> <script>
import comments from '../comments/comments.vue' import comments from '../comments/comments.vue'
import { getSchoolListComment } from '@/config/api.js'
export default { export default {
components: { comments }
components: { comments },
data() {
return {
params: {
pageNo: 1,
pageSize: 20,
schoolId: '',
},
total: 20,
list: []
}
},
onLoad(options) {
this.params.schoolId = options.id
this.getSchoolListCommentFn()
},
methods: {
async getSchoolListCommentFn() {
const {data: res} = await getSchoolListComment(this.params)
this.params.pageNo ++
this.list.push(...res.list)
this.total = res.total
}
}
} }
</script> </script>

8
pages/indexEntry/findShcool/shcoolDetail/comp/tab1.vue

@ -1,10 +1,10 @@
<template> <template>
<view class="tabCon"> <view class="tabCon">
<view class="tab1"> <view class="tab1">
<view class="card">
<view class="name">C2自动挡一对一VIP班</view>
<view class="card" v-for="(item, index) in classList" :key="index">
<view class="name">{{ item.name }}</view>
<view class="flex-b"> <view class="flex-b">
<view class="price">2566</view>
<view class="price">{{ $u.utils.priceTo(item.totalAmount) }}</view>
<view class="btn">报名</view> <view class="btn">报名</view>
</view> </view>
</view> </view>
@ -14,7 +14,7 @@
<script> <script>
export default { export default {
props: ['classList']
} }
</script> </script>

17
pages/indexEntry/findShcool/shcoolDetail/comp/tab2.vue

@ -1,12 +1,12 @@
<template> <template>
<view class="tabCon"> <view class="tabCon">
<view class="tab1"> <view class="tab1">
<view class="card">
<view class="name">江西路场地</view>
<view class="adr">江西省江西市江西区尚坤丁兰国际1190</view>
<view class="card" v-for="(item,index) in siteList" :key="index">
<view class="name">{{ item.name }}</view>
<view class="adr">{{ item.address }}</view>
<view class="flex-b"> <view class="flex-b">
<view class="distance">距您100km</view>
<view class="btn">导航</view>
<view class="distance">距您 {{ $u.utils.distanceFn(item.distance) }}</view>
<view class="btn" @click="mapClick(item)">导航</view>
</view> </view>
</view> </view>
</view> </view>
@ -15,7 +15,12 @@
<script> <script>
export default { export default {
props: ['siteList'],
methods: {
mapClick(item) {
this.$u.utils.openMap(item.lat,item.lng)
}
}
} }
</script> </script>

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

@ -1,9 +1,9 @@
<template> <template>
<view class="tabCon"> <view class="tabCon">
<view class="tab1"> <view class="tab1">
<view class="card">
<view class="leftTxt">浙A·99999</view>
<view class="rightTxt">大众朗逸</view>
<view class="card" v-for="(item,index) in carList" :key="index">
<view class="leftTxt">{{ item.licnum}}</view>
<view class="rightTxt">{{ item.model }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -11,7 +11,7 @@
<script> <script>
export default { export default {
props: ['carList']
} }
</script> </script>

62
pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue

@ -17,13 +17,13 @@
<image src="@/static/images/logo.png" mode=""></image> <image src="@/static/images/logo.png" mode=""></image>
</view> </view>
<view class="textCon"> <view class="textCon">
<view class="name">江西海正驾校</view>
<view class="name">{{schoolDetail.shortName}}</view>
<view class="starBox"> <view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="4" disabled></u-rate>
<view class="num">4.9</view>
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="schoolDetail.stars" disabled></u-rate>
<view class="num">{{schoolDetail.stars}}</view>
</view> </view>
<view class="evaluate" @click="$goPage('/pages/indexEntry/findShcool/shcoolComment/shcoolComment')">
<view class="txt">50条评价</view>
<view class="evaluate" @click="$goPage('/pages/indexEntry/findShcool/shcoolComment/shcoolComment?id='+ schoolId)">
<view class="txt">{{schoolDetail.reviewTotal}}条评价</view>
<u-icon name="arrow-right" color="#363A44" size="14"></u-icon> <u-icon name="arrow-right" color="#363A44" size="14"></u-icon>
</view> </view>
</view> </view>
@ -37,7 +37,7 @@
<!-- 驾校位置 --> <!-- 驾校位置 -->
<view class="shoolPoz"> <view class="shoolPoz">
<view class="h1">驾校位置</view> <view class="h1">驾校位置</view>
<pozCard></pozCard>
<pozCard :info="{address: schoolDetail.address,distance: schoolDetail.distance, lat: schoolDetail.lat, lng: schoolDetail.lng}"></pozCard>
</view> </view>
<!-- 驾校服务 --> <!-- 驾校服务 -->
<view class="severCon"> <view class="severCon">
@ -46,10 +46,10 @@
<view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view> <view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view>
</view> </view>
</view> </view>
<tab1 v-show="currentNav==1"></tab1>
<tab2 v-show="currentNav==2"></tab2>
<tab1 v-show="currentNav==1" :classList="schoolDetail.schoolClassDOList"></tab1>
<tab2 v-show="currentNav==2" :siteList="schoolDetail.trainingSiteDOS"></tab2>
<tab3 v-show="currentNav==3" :coachList="coachList" :status="tab3Status"></tab3> <tab3 v-show="currentNav==3" :coachList="coachList" :status="tab3Status"></tab3>
<tab4 v-show="currentNav==4"></tab4>
<tab4 v-show="currentNav==4" :carList="schoolDetail.carDOS"></tab4>
</view> </view>
</view> </view>
</template> </template>
@ -59,7 +59,7 @@
import tab2 from './comp/tab2.vue' import tab2 from './comp/tab2.vue'
import tab3 from './comp/tab3.vue' import tab3 from './comp/tab3.vue'
import tab4 from './comp/tab4.vue' import tab4 from './comp/tab4.vue'
import { coachPage } from '@/config/api.js'
import { coachPage, getSchoolDetail, getListComment } from '@/config/api.js'
import { imgUrl } from '@/config/site.config' import { imgUrl } from '@/config/site.config'
export default { export default {
components: { tab1, tab2, tab3, tab4}, components: { tab1, tab2, tab3, tab4},
@ -78,11 +78,17 @@
{text: '教练', id: 3}, {text: '教练', id: 3},
{text: '教练车', id: 4}, {text: '教练车', id: 4},
], ],
params: {},
schoolDetail: {},
currentNav: 1, currentNav: 1,
coachParams: { coachParams: {
pageNo: 1, pageNo: 1,
pageSize: 20 pageSize: 20
}, },
commentParams: {
pageNo: 1,
pageSize: 20
},
schoolId: '', schoolId: '',
coachList: [], coachList: [],
tab3Status: 'loading', tab3Status: 'loading',
@ -92,29 +98,57 @@
onLoad(options) { onLoad(options) {
this.schoolId = options.schoolId this.schoolId = options.schoolId
this.coachParams.schoolId = this.schoolId this.coachParams.schoolId = this.schoolId
this.commentParams.schoolId = this.schoolId
this.coachPageFn() this.coachPageFn()
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.getSchoolDetailFn()
// this.getListCommentFn()
}, },
onPullDownRefresh() { onPullDownRefresh() {
},
onReachBottom() {
this.getSchoolDetailFn()
if(this.currentNav==3&&this.coachList.length<this.tab3Total) { if(this.currentNav==3&&this.coachList.length<this.tab3Total) {
this.coachParams.pageNo = 1 this.coachParams.pageNo = 1
this.coachList = [] this.coachList = []
this.coachPageFn() this.coachPageFn()
} }
}, },
onReachBottom() {
if(this.currentNav==3&&this.coachList.length<this.tab3Total) {
this.coachPageFn()
}
},
methods: { methods: {
changeNav(item) { changeNav(item) {
this.currentNav = item.id this.currentNav = item.id
}, },
//
async getSchoolDetailFn() {
const {data: res} = await getSchoolDetail(Object.assign(this.params,{id: this.schoolId}))
this.schoolDetail = res
},
//
async coachPageFn() { async coachPageFn() {
const {data: res} = await coachPage(this.coachParams) const {data: res} = await coachPage(this.coachParams)
this.coachParams.pageNo ++ this.coachParams.pageNo ++
this.coachList.push(...res.list) this.coachList.push(...res.list)
this.tab3Total = res.total this.tab3Total = res.total
if(this.coachList.length>=this.tab3Total) this.tab3Status = 'nomore' if(this.coachList.length>=this.tab3Total) this.tab3Status = 'nomore'
}
},
//
// async getListCommentFn() {
// const {data: res} = await getListComment(this.commentParams)
// this.coachParams.pageNo ++
// this.commentList.push(...res.list)
// this.tab3Total = res.total
// if(this.commentList.length>=this.tab4Total) this.tab3Status = 'nomore'
// }
} }
} }
</script> </script>

Loading…
Cancel
Save