Merge remote-tracking branch 'origin/master'
# Conflicts: # newPages/courseList/index.vue # newPages/evaluateAdd/index.vue # newPages/schoolDetail/index.vue # newPages/schoolList/index.vue
This commit is contained in:
commit
58c3b759bf
@ -1,279 +1,282 @@
|
||||
<template>
|
||||
<view class="page flex-col">
|
||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||
<headers titles="预约训练">
|
||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||
</headers>
|
||||
</view>
|
||||
<view style="padding: 10rpx 30rpx">
|
||||
<u-subsection :list="list" :current="curNow" @change="sectionChange"></u-subsection>
|
||||
</view>
|
||||
<scroll-view style="height: 1200rpx;" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<!-- 新增内容容器 -->
|
||||
<view class="box_2 flex-col" v-if="curNow === 0">
|
||||
<view class="box_4 flex-col" v-for="item in appointmentList" @click="goDetail(item,'')" :key="item.id">
|
||||
<view class="group_5 flex-row justify-between">
|
||||
<view class="block_3 flex-col justify-between">
|
||||
<text class="text_2">{{ item.reservDay }}</text>
|
||||
<view class="group_6 flex-row justify-between">
|
||||
<view class="text-wrapper_1 flex-col">
|
||||
<text class="text_3">{{ item.subjectStr }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_4">{{ item.courseType }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="item.status === true ? 'ytg' : 'text-wrapper_3'" class=" flex-col">
|
||||
<text class="text_5">{{ item.statusStr }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-wrapper_4 flex-row justify-between">
|
||||
<text class="text_6">时间范围:</text>
|
||||
<text class="text_7">{{ item.reservTime }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_5 flex-row justify-between">
|
||||
<text class="text_8">教练名称:</text>
|
||||
<text class="text_9">{{ item.coachName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 新增内容容器 -->
|
||||
<view class="box_2 flex-col" v-if="curNow === 1">
|
||||
<view class="box_4 flex-col" v-for="item in appointmentList" @click="goDetail(item,'train')" :key="item.id">
|
||||
<view class="group_5 flex-row justify-between">
|
||||
<view class="block_3 flex-col justify-between">
|
||||
<text class="text_2">{{ item.trainDay }}</text>
|
||||
<view class="group_6 flex-row justify-between">
|
||||
<view class="text-wrapper_1 flex-col">
|
||||
<text class="text_3">{{ subjectArr[item.subject - 1] }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_4">{{ item.courseType }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-wrapper_4 flex-row justify-between">
|
||||
<text class="text_6">交通方式:</text>
|
||||
<text class="text_7">{{ item.transWay }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_4 flex-row justify-between">
|
||||
<text class="text_6">训练地址:</text>
|
||||
<text class="text_7">{{ item.addr }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_4 flex-row justify-between">
|
||||
<text class="text_6">训练时长:</text>
|
||||
<text class="text_7">{{ item.trainTime }}分钟</text>
|
||||
</view>
|
||||
<view class="text-wrapper_5 flex-row justify-between">
|
||||
<text class="text_8">教练名称:</text>
|
||||
<text class="text_9">{{ item.coachName }}</text>
|
||||
</view>
|
||||
<view class="block_5 box_10 flex-row" style="justify-content: flex-end; margin: 0 20rpx 15rpx 0;" v-if="!item.ifEvaluate" @click="goEvaluateAdd(item)">
|
||||
<view style="border: 1px solid rgba(44, 120, 245, 1); padding: 7rpx 30rpx; border-radius: 50rpx;color: rgba(44, 120, 245, 1)">
|
||||
<text class="text_18">开始评价</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="box_6 flex-col bottom_">
|
||||
<view class="text-wrapper_12 flex-col " @click="goAppointment()">
|
||||
<text class="text_19">预约</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page flex-col">
|
||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||
<headers titles="预约训练">
|
||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||
</headers>
|
||||
</view>
|
||||
<view style="padding: 10rpx 30rpx">
|
||||
<u-subsection :list="list" :current="curNow" @change="sectionChange"></u-subsection>
|
||||
</view>
|
||||
<scroll-view style="height: 1200rpx;" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<!-- 新增内容容器 -->
|
||||
<view class="box_2 flex-col" v-if="curNow === 0">
|
||||
<view class="box_4 flex-col" v-for="item in appointmentList" @click="goDetail(item,'')" :key="item.id">
|
||||
<view class="group_5 flex-row justify-between">
|
||||
<view class="block_3 flex-col justify-between">
|
||||
<text class="text_2">{{ item.reservDay }}</text>
|
||||
<view class="group_6 flex-row justify-between">
|
||||
<view class="text-wrapper_1 flex-col">
|
||||
<text class="text_3">{{ item.subjectStr }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_4">{{ item.courseType }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="item.status === true ? 'ytg' : 'text-wrapper_3'" class=" flex-col">
|
||||
<text class="text_5">{{ item.statusStr }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-wrapper_4 flex-row justify-between">
|
||||
<text class="text_6">时间范围:</text>
|
||||
<text class="text_7">{{ item.reservTime }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_5 flex-row justify-between">
|
||||
<text class="text_8">教练名称:</text>
|
||||
<text class="text_9">{{ item.coachName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 新增内容容器 -->
|
||||
<view class="box_2 flex-col" v-if="curNow === 1">
|
||||
<view class="box_4 flex-col" v-for="item in appointmentList" @click="goDetail(item,'train')"
|
||||
:key="item.id">
|
||||
<view class="group_5 flex-row justify-between">
|
||||
<view class="block_3 flex-col justify-between">
|
||||
<text class="text_2">{{ item.trainDay }}</text>
|
||||
<view class="group_6 flex-row justify-between">
|
||||
<view class="text-wrapper_1 flex-col">
|
||||
<text class="text_3">{{ subjectArr[item.subject - 1] }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_4">{{ item.courseType }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-wrapper_4 flex-row justify-between">
|
||||
<text class="text_6">交通方式:</text>
|
||||
<text class="text_7">{{ item.transWay }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_4 flex-row justify-between">
|
||||
<text class="text_6">训练地址:</text>
|
||||
<text class="text_7">{{ item.addr }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_4 flex-row justify-between">
|
||||
<text class="text_6">训练时长:</text>
|
||||
<text class="text_7">{{ item.trainTime }}分钟</text>
|
||||
</view>
|
||||
<view class="text-wrapper_5 flex-row justify-between">
|
||||
<text class="text_8">教练名称:</text>
|
||||
<text class="text_9">{{ item.coachName }}</text>
|
||||
</view>
|
||||
<view class="block_5 box_10 flex-row" style="justify-content: flex-end; margin: 0 20rpx 15rpx 0;"
|
||||
v-if="!item.ifEvaluate" @click="goEvaluateAdd(item)">
|
||||
<view
|
||||
style="border: 1px solid rgba(44, 120, 245, 1); padding: 7rpx 30rpx; border-radius: 50rpx;color: rgba(44, 120, 245, 1)">
|
||||
<text class="text_18">开始评价</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="box_6 flex-col bottom_">
|
||||
<view class="text-wrapper_12 flex-col " @click="goAppointment()">
|
||||
<text class="text_19">预约</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import headers from "@/components/header/headers.vue";
|
||||
import request from "@/utils/request";
|
||||
import headers from "@/components/header/headers.vue";
|
||||
import request from "@/utils/request";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
headers
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isTriggered: false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
appointmentList: [],
|
||||
constants: {},
|
||||
list: ['预约记录', '训练记录'],
|
||||
curNow: 0,
|
||||
subjectArr:['科目一','科目二','科目三','科目四']
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
uni.$on('refresh', (data) => {
|
||||
this.pageNo = 1
|
||||
this.appointmentList = []
|
||||
if (this.curNow === 0) {
|
||||
this.getList()
|
||||
} else {
|
||||
this.getTrainList()
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
sectionChange(index) {
|
||||
this.curNow = index;
|
||||
this.pageNo = 1
|
||||
this.appointmentList = []
|
||||
if (this.curNow === 0) {
|
||||
this.getList()
|
||||
} else {
|
||||
this.getTrainList()
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
request({
|
||||
url: '/app-api/drivingSchool/system/reservationCourse/list',
|
||||
method: 'GET',
|
||||
params: {
|
||||
pageNum: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
ifCancel: false
|
||||
},
|
||||
tenantIdFlag: false
|
||||
}).then(res => {
|
||||
console.log('获取预约列表', res)
|
||||
if (this.pageNo === 1) {
|
||||
this.total = res.data.total
|
||||
this.appointmentList = []
|
||||
this.appointmentList = res.data.records
|
||||
} else {
|
||||
this.appointmentList = this.appointmentList.concat(res.data.records)
|
||||
}
|
||||
this.isTriggered = false
|
||||
})
|
||||
},
|
||||
getTrainList() {
|
||||
request({
|
||||
url: '/app-api/train/page',
|
||||
method: 'GET',
|
||||
params: {
|
||||
pageNum: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
selectType: 'all'
|
||||
},
|
||||
tenantIdFlag: false
|
||||
}).then(res => {
|
||||
console.log('获取预约列表', res)
|
||||
if (this.pageNo === 1) {
|
||||
this.total = res.data.total
|
||||
this.appointmentList = []
|
||||
this.appointmentList = res.data.records
|
||||
} else {
|
||||
this.appointmentList = this.appointmentList.concat(res.data.records)
|
||||
}
|
||||
this.isTriggered = false
|
||||
})
|
||||
},
|
||||
goDetail(data,str) {
|
||||
//将data转为字符串
|
||||
uni.navigateTo({
|
||||
url: `/newPages/appointmentDetail/index?data=${JSON.stringify(data)}&type=${str}`
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 上滑加载数据
|
||||
*/
|
||||
onReachBottomCus() {
|
||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||
if (this.pageNo * this.pageSize >= this.total) {
|
||||
uni.$u.toast('没有更多数据了')
|
||||
return
|
||||
}
|
||||
//页码+1,调用获取数据的方法获取第二页数据
|
||||
this.pageNo++
|
||||
//此处调用自己获取数据列表的方法
|
||||
if (this.curNow === 1) {
|
||||
this.getTrainList()
|
||||
} else {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 下拉刷新数据
|
||||
*/
|
||||
onRefresherrefresh() {
|
||||
this.isTriggered = true
|
||||
this.pageNo = 1
|
||||
this.total = 0
|
||||
this.appointmentList = []
|
||||
if (this.curNow === 1) {
|
||||
this.getTrainList()
|
||||
} else {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
goAppointment() {
|
||||
uni.navigateTo({
|
||||
url: '/newPages/appointmentAdd/index'
|
||||
})
|
||||
},
|
||||
goEvaluateAdd(data) {
|
||||
data = JSON.stringify(data)
|
||||
uni.navigateTo({
|
||||
url: `/newPages/evaluateAdd/index?data=${data}&type=xunlian&controls=add`
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
export default {
|
||||
components: {
|
||||
headers
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isTriggered: false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
appointmentList: [],
|
||||
constants: {},
|
||||
list: ['预约记录', '训练记录'],
|
||||
curNow: 0,
|
||||
subjectArr: ['科目一', '科目二', '科目三', '科目四']
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
uni.$on('refresh', (data) => {
|
||||
this.pageNo = 1
|
||||
this.appointmentList = []
|
||||
if (this.curNow === 0) {
|
||||
this.getList()
|
||||
} else {
|
||||
this.getTrainList()
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
sectionChange(index) {
|
||||
this.curNow = index;
|
||||
this.pageNo = 1
|
||||
this.appointmentList = []
|
||||
if (this.curNow === 0) {
|
||||
this.getList()
|
||||
} else {
|
||||
this.getTrainList()
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
request({
|
||||
url: '/app-api/drivingSchool/system/reservationCourse/list',
|
||||
method: 'GET',
|
||||
params: {
|
||||
pageNum: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
ifCancel: false
|
||||
},
|
||||
tenantIdFlag: false
|
||||
}).then(res => {
|
||||
console.log('获取预约列表', res)
|
||||
if (this.pageNo === 1) {
|
||||
this.total = res.data.total
|
||||
this.appointmentList = []
|
||||
this.appointmentList = res.data.records
|
||||
} else {
|
||||
this.appointmentList = this.appointmentList.concat(res.data.records)
|
||||
}
|
||||
this.isTriggered = false
|
||||
})
|
||||
},
|
||||
getTrainList() {
|
||||
request({
|
||||
url: '/app-api/train/page',
|
||||
method: 'GET',
|
||||
params: {
|
||||
pageNum: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
selectType: 'all'
|
||||
},
|
||||
tenantIdFlag: false
|
||||
}).then(res => {
|
||||
console.log('获取预约列表', res)
|
||||
if (this.pageNo === 1) {
|
||||
this.total = res.data.total
|
||||
this.appointmentList = []
|
||||
this.appointmentList = res.data.records
|
||||
} else {
|
||||
this.appointmentList = this.appointmentList.concat(res.data.records)
|
||||
}
|
||||
this.isTriggered = false
|
||||
})
|
||||
},
|
||||
goDetail(data, str) {
|
||||
//将data转为字符串
|
||||
uni.navigateTo({
|
||||
url: `/newPages/appointmentDetail/index?data=${JSON.stringify(data)}&type=${str}`
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 上滑加载数据
|
||||
*/
|
||||
onReachBottomCus() {
|
||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||
if (this.pageNo * this.pageSize >= this.total) {
|
||||
uni.$u.toast('没有更多数据了')
|
||||
return
|
||||
}
|
||||
//页码+1,调用获取数据的方法获取第二页数据
|
||||
this.pageNo++
|
||||
//此处调用自己获取数据列表的方法
|
||||
if (this.curNow === 1) {
|
||||
this.getTrainList()
|
||||
} else {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 下拉刷新数据
|
||||
*/
|
||||
onRefresherrefresh() {
|
||||
this.isTriggered = true
|
||||
this.pageNo = 1
|
||||
this.total = 0
|
||||
this.appointmentList = []
|
||||
if (this.curNow === 1) {
|
||||
this.getTrainList()
|
||||
} else {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
goAppointment() {
|
||||
uni.navigateTo({
|
||||
url: '/newPages/appointmentAdd/index'
|
||||
})
|
||||
},
|
||||
goEvaluateAdd(data) {
|
||||
data = JSON.stringify(data)
|
||||
uni.navigateTo({
|
||||
url: `/newPages/evaluateAdd/index?data=${data}&type=xunlian&controls=add`
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
@import '../common/common.scss';
|
||||
@import './assets/style/index.rpx.scss';
|
||||
@import '../common/common.scss';
|
||||
@import './assets/style/index.rpx.scss';
|
||||
|
||||
// 新增样式
|
||||
.content-box {
|
||||
margin-top: 88rpx;
|
||||
/* 根据头部高度调整 */
|
||||
padding: 20rpx;
|
||||
overflow-y: auto;
|
||||
height: calc(100vh - 88rpx);
|
||||
/* 确保内容区域高度正确 */
|
||||
}
|
||||
// 新增样式
|
||||
.content-box {
|
||||
margin-top: 88rpx;
|
||||
/* 根据头部高度调整 */
|
||||
padding: 20rpx;
|
||||
overflow-y: auto;
|
||||
height: calc(100vh - 88rpx);
|
||||
/* 确保内容区域高度正确 */
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
box-sizing: border-box;
|
||||
padding-top: 88px;
|
||||
}
|
||||
.header {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
box-sizing: border-box;
|
||||
padding-top: 88px;
|
||||
}
|
||||
|
||||
.bottom_ {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
.bottom_ {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.ytg {
|
||||
background-color: #cfe2ff;
|
||||
border-radius: 4px;
|
||||
height: 40rpx;
|
||||
margin-top: 22rpx;
|
||||
width: 96rpx;
|
||||
.ytg {
|
||||
background-color: #cfe2ff;
|
||||
border-radius: 4px;
|
||||
height: 40rpx;
|
||||
margin-top: 22rpx;
|
||||
width: 96rpx;
|
||||
|
||||
.text_5 {
|
||||
width: 72rpx;
|
||||
height: 24rpx;
|
||||
overflow-wrap: break-word;
|
||||
color: rgba(4, 78, 242, 1);
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Regular;
|
||||
font-weight: NaN;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
line-height: 24rpx;
|
||||
margin: 8rpx 0 0 12rpx;
|
||||
}
|
||||
}
|
||||
.text_5 {
|
||||
width: 72rpx;
|
||||
height: 24rpx;
|
||||
overflow-wrap: break-word;
|
||||
color: rgba(4, 78, 242, 1);
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Regular;
|
||||
font-weight: NaN;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
line-height: 24rpx;
|
||||
margin: 8rpx 0 0 12rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -163,9 +163,9 @@
|
||||
.text-wrapper_2 {
|
||||
background-color: rgba(255, 239, 229, 1);
|
||||
border-radius: 2px;
|
||||
height: 36rpx;
|
||||
//height: 36rpx;
|
||||
width: 52rpx;
|
||||
margin: 48rpx 86rpx 0 -138rpx;
|
||||
//margin: 48rpx 86rpx 0 -138rpx;
|
||||
.text_6 {
|
||||
width: 32rpx;
|
||||
height: 24rpx;
|
||||
@ -181,15 +181,15 @@
|
||||
}
|
||||
}
|
||||
.text-wrapper_3 {
|
||||
background-color: rgba(223, 235, 255, 1);
|
||||
//background-color: rgba(223, 235, 255, 1);
|
||||
border-radius: 2px;
|
||||
height: 36rpx;
|
||||
width: 92rpx;
|
||||
//height: 36rpx;
|
||||
//width: 92rpx;
|
||||
position: absolute;
|
||||
left: 232rpx;
|
||||
top: 48rpx;
|
||||
.text_7 {
|
||||
width: 72rpx;
|
||||
//width: 72rpx;
|
||||
height: 24rpx;
|
||||
overflow-wrap: break-word;
|
||||
color: rgba(44, 120, 245, 1);
|
||||
@ -199,7 +199,7 @@
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
line-height: 24rpx;
|
||||
margin: 6rpx 0 0 10rpx;
|
||||
//margin: 6rpx 0 0 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,110 +1,112 @@
|
||||
<template>
|
||||
<view class="page flex-col">
|
||||
<view class="group_1 flex-row">
|
||||
|
||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||
<headers titles="课程">
|
||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||
</headers>
|
||||
</view>
|
||||
<view class="group_2 flex-row">
|
||||
<image
|
||||
class="label_1"
|
||||
<scroll-view
|
||||
class="scroll-view"
|
||||
scroll-y
|
||||
:style="{ height: scrollHeight + 'px' }"
|
||||
>
|
||||
<view class="group_6 flex-col" v-for="(item, index) in schoolAllClassList" :key="index" @click="goToDetail(item.id)">
|
||||
<view class="image-text_1 flex-row">
|
||||
<image
|
||||
class="image_2"
|
||||
referrerpolicy="no-referrer"
|
||||
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
|
||||
@click="goBack()"
|
||||
/>
|
||||
<text class="text_2">课程</text>
|
||||
|
||||
</view>
|
||||
<scroll-view
|
||||
class="scroll-view"
|
||||
scroll-y
|
||||
:style="{ height: scrollHeight + 'px' }"
|
||||
>
|
||||
<view class="group_6 flex-col" v-for="(item, index) in schoolAllClassList" :key="index"
|
||||
@click="goToDetail(item.id)">
|
||||
<view class="image-text_1 flex-row">
|
||||
<image
|
||||
class="image_2"
|
||||
referrerpolicy="no-referrer"
|
||||
:src="imagesUrl + '/' + item.photo"
|
||||
/>
|
||||
<view class="text-group_1 flex-col justify-between">
|
||||
<text class="text_3">{{ item.tittle }}</text>
|
||||
<view class="text-wrapper_1 flex-row justify-between">
|
||||
<text class="text_4">¥{{ item.price - item.favour }}</text>
|
||||
<text class="text_5">¥{{ item.price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_6">{{ item.type }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_3 flex-col">
|
||||
<text class="text_7">{{ item.name }}</text>
|
||||
:src="imagesUrl + '/' + item.photo"
|
||||
/>
|
||||
<view class="text-group_1 flex-col justify-between">
|
||||
<text class="text_3">{{ item.tittle }}</text>
|
||||
<view class="text-wrapper_1 flex-row justify-between">
|
||||
<text class="text_4">¥{{ item.price - item.favour }}</text>
|
||||
<text class="text_5">¥{{ item.price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-wrapper_3 flex-col">
|
||||
<view style="display: flex">
|
||||
<text class="text_7" style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{ item.name }}</text>
|
||||
<text class="text-wrapper_2 text_7" style="color: black;padding: 5rpx 15rpx;margin-left: 10rpx">{{ item.type }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="text-wrapper_3 flex-col">-->
|
||||
<!-- <view >-->
|
||||
<!-- <text class="text_7">{{ item.name }}</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="text-wrapper_2 flex-col">-->
|
||||
<!-- <text class="text_6">{{ item.type }}</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import request from "@/utils/request";
|
||||
import config from "@/config.js"
|
||||
import headers from "@/components/header/headers.vue";
|
||||
|
||||
export default {
|
||||
components: {headers},
|
||||
data() {
|
||||
return {
|
||||
imagesUrl: config.imagesUrl,
|
||||
tenantId: undefined,
|
||||
schoolAllClassList: [],
|
||||
scrollHeight: 0,
|
||||
imagesUrl: config.imagesUrl,
|
||||
tenantId: undefined,
|
||||
schoolAllClassList: [],
|
||||
scrollHeight: 0,
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.tenantId) {
|
||||
this.tenantId = options.tenantId
|
||||
console.log("首页传入数据", options)
|
||||
console.log("驾校租户id", this.tenantId)
|
||||
this.getSchoolAllClass()
|
||||
this.tenantId = options.tenantId
|
||||
console.log("首页传入数据", options)
|
||||
console.log("驾校租户id", this.tenantId)
|
||||
this.getSchoolAllClass()
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
// 动态计算滚动区域高度
|
||||
this.calculateScrollHeight();
|
||||
},
|
||||
// 动态计算滚动区域高度
|
||||
this.calculateScrollHeight();
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
getSchoolAllClass() {
|
||||
request({
|
||||
url: '/app-api/dl-drive-school-course-small/list',
|
||||
method: 'GET',
|
||||
params: {
|
||||
tenantId: this.tenantId,
|
||||
},
|
||||
tenantIdFlag: false
|
||||
}).then(res => {
|
||||
this.schoolAllClassList = res.data;
|
||||
this.total = res.data.total;
|
||||
console.log('驾校课程列表', this.schoolAllClassList);
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
getSchoolAllClass() {
|
||||
request({
|
||||
url: '/app-api/dl-drive-school-course-small/list',
|
||||
method: 'GET',
|
||||
params: {
|
||||
tenantId: this.tenantId,
|
||||
},
|
||||
tenantIdFlag: false
|
||||
}).then(res => {
|
||||
this.schoolAllClassList = res.data;
|
||||
this.total = res.data.total;
|
||||
console.log('驾校课程列表', this.schoolAllClassList);
|
||||
})
|
||||
},
|
||||
|
||||
calculateScrollHeight() {
|
||||
// 获取屏幕高度
|
||||
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
||||
// 获取顶部区域高度(根据实际情况调整)
|
||||
const topHeight = 100; // 假设顶部区域高度为 100px
|
||||
// 计算滚动区域高度
|
||||
this.scrollHeight = screenHeight - topHeight;
|
||||
},
|
||||
// 跳转到详情页
|
||||
goToDetail(courseId) {
|
||||
uni.navigateTo({
|
||||
url: `/newPages/courseDetail/index?courseId=${courseId}&tenantId=${this.tenantId}`,
|
||||
});
|
||||
},
|
||||
calculateScrollHeight() {
|
||||
// 获取屏幕高度
|
||||
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
||||
// 获取顶部区域高度(根据实际情况调整)
|
||||
const topHeight = 100; // 假设顶部区域高度为 100px
|
||||
// 计算滚动区域高度
|
||||
this.scrollHeight = screenHeight - topHeight;
|
||||
},
|
||||
// 跳转到详情页
|
||||
goToDetail(courseId) {
|
||||
uni.navigateTo({
|
||||
url: `/newPages/courseDetail/index?courseId=${courseId}&tenantId=${this.tenantId}`,
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,105 +1,151 @@
|
||||
<template>
|
||||
<view class="page flex-col">
|
||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||
<headers titles="预约">
|
||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||
</headers>
|
||||
</view>
|
||||
<view class="group_4 flex-col">
|
||||
<view class="list_1 flex-col">
|
||||
<view
|
||||
class="list-items_1 flex-col"
|
||||
v-for="(item, index) in loopData0"
|
||||
:key="index"
|
||||
>
|
||||
<view class="text-wrapper_1 flex-row">
|
||||
<text class="text_2" v-html="item.lanhutext0"></text>
|
||||
</view>
|
||||
<view class="group_6 flex-row justify-between">
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_3" v-html="item.lanhutext1"></text>
|
||||
</view>
|
||||
<view class="text-wrapper_3 flex-col">
|
||||
<text class="text_4" v-html="item.lanhutext2"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group_7 flex-row">
|
||||
<view class="image-text_1 flex-row justify-between">
|
||||
<image
|
||||
class="label_2"
|
||||
referrerpolicy="no-referrer"
|
||||
:src="item.lanhuimage0"
|
||||
/>
|
||||
<text class="text-group_1" v-html="item.lanhutext3"></text>
|
||||
</view>
|
||||
<view class="section_2 flex-col"></view>
|
||||
<view class="section_3 flex-col"></view>
|
||||
<view class="section_4 flex-col"></view>
|
||||
<view class="section_5 flex-col"></view>
|
||||
<view class="section_6 flex-col"></view>
|
||||
<text class="text_5" v-html="item.lanhutext4"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page flex-col">
|
||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||
<headers titles="评价中心">
|
||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||
</headers>
|
||||
</view>
|
||||
<view class="group_4 flex-col">
|
||||
<view class="list_1 flex-col">
|
||||
<scroll-view style="height: 1400rpx;" scroll-y="true" class="itemContent"
|
||||
@scrolltolower="onReachBottomCus" refresher-enabled @refresherrefresh="onRefresherrefresh"
|
||||
:refresher-triggered="isTriggered">
|
||||
<view class="list-items_1 flex-col" v-for="(item, index) in evaluate" :key="index"
|
||||
@click="goEvaluateDetail(item)">
|
||||
<view class="text-wrapper_1 flex-row">
|
||||
<text class="text_2">{{ item.busiName }}</text>
|
||||
</view>
|
||||
<view class="group_6 flex-row justify-between">
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_3">{{ item.busiName.slice(0, 3) }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_3 flex-col">
|
||||
<text class="text_4">{{ item.courseType }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group_7 flex-row">
|
||||
<view class="image-text_1 flex-row justify-between" style="align-items: center;">
|
||||
<image class="label_2" referrerpolicy="no-referrer"
|
||||
src="/static/lanhu_pingjiabiaodan/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png" />
|
||||
<text class="text-group_1">{{ item.coachName }}</text>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center;">
|
||||
<u-rate active-color="#EAA140" v-model="item.rate" allowHalf inactive-color="#b2b2b2"
|
||||
readonly></u-rate>
|
||||
<text style="margin-left: 5rpx;color:#E1A652;">{{ item.rate }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import headers from "@/components/header/headers.vue";
|
||||
import {getLocalUserInfo} from "@/utils/auth";
|
||||
import request from "@/utils/request";
|
||||
import headers from "@/components/header/headers.vue";
|
||||
import {
|
||||
getLocalUserInfo
|
||||
} from "@/utils/auth";
|
||||
import request from "@/utils/request";
|
||||
|
||||
export default {
|
||||
components: {headers},
|
||||
data() {
|
||||
return {
|
||||
loopData0: [
|
||||
{
|
||||
lanhutext0: '科目二训练',
|
||||
lanhutext1: '科目二',
|
||||
lanhutext2: 'C2',
|
||||
lanhuimage0:
|
||||
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png',
|
||||
lanhutext3: '马文峰',
|
||||
lanhutext4: '4.0'
|
||||
},
|
||||
{
|
||||
lanhutext0: '科目二考试',
|
||||
lanhutext1: '科目二',
|
||||
lanhutext2: 'C2',
|
||||
lanhuimage0:
|
||||
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png',
|
||||
lanhutext3: '马文峰',
|
||||
lanhutext4: '4.0'
|
||||
}
|
||||
],
|
||||
constants: {},
|
||||
userId: getLocalUserInfo().id,
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
request({
|
||||
url: '/app-api/feed-back/page',
|
||||
method: 'GET',
|
||||
params: {
|
||||
userId: 5171,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
export default {
|
||||
components: {
|
||||
headers
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loopData0: [{
|
||||
lanhutext0: '科目二训练',
|
||||
lanhutext1: '科目二',
|
||||
lanhutext2: 'C2',
|
||||
lanhuimage0: 'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png',
|
||||
lanhutext3: '马文峰',
|
||||
lanhutext4: '4.0'
|
||||
},
|
||||
{
|
||||
lanhutext0: '科目二考试',
|
||||
lanhutext1: '科目二',
|
||||
lanhutext2: 'C2',
|
||||
lanhuimage0: 'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png',
|
||||
lanhutext3: '马文峰',
|
||||
lanhutext4: '4.0'
|
||||
}
|
||||
],
|
||||
evaluate: [],
|
||||
constants: {},
|
||||
userId: getLocalUserInfo().id,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
isTriggered: false
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
request({
|
||||
url: '/app-api/feed-back/page',
|
||||
method: 'GET',
|
||||
params: {
|
||||
userId: this.userId,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.total = res.data.total
|
||||
if (this.pageNo == 1) {
|
||||
this.evaluate = res.data.records
|
||||
} else {
|
||||
this.evaluate = this.evaluate.concat(res.data.records)
|
||||
}
|
||||
this.isTriggered = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 上滑加载数据
|
||||
*/
|
||||
onReachBottomCus() {
|
||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||
if (this.pageNo * this.pageSize >= this.total) {
|
||||
uni.$u.toast('没有更多数据了')
|
||||
return
|
||||
}
|
||||
//页码+1,调用获取数据的方法获取第二页数据
|
||||
this.pageNo++
|
||||
//此处调用自己获取数据列表的方法
|
||||
if (this.curNow === 1) {
|
||||
this.getTrainList()
|
||||
} else {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 下拉刷新数据
|
||||
*/
|
||||
onRefresherrefresh() {
|
||||
this.isTriggered = true
|
||||
this.pageNo = 1
|
||||
this.total = 0
|
||||
this.appointmentList = []
|
||||
if (this.curNow === 1) {
|
||||
this.getTrainList()
|
||||
} else {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
goEvaluateDetail(data) {
|
||||
data = JSON.stringify(data)
|
||||
uni.navigateTo({
|
||||
url: `/newPages/evaluateAdd/index?data=${data}`
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
@import '../common/common.scss';
|
||||
@import './assets/style/index.rpx.scss';
|
||||
@import '../common/common.scss';
|
||||
@import './assets/style/index.rpx.scss';
|
||||
</style>
|
||||
|
@ -1,162 +1,174 @@
|
||||
<template>
|
||||
<view class="page flex-col">
|
||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||
<headers titles="评价表单">
|
||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||
</headers>
|
||||
</view>
|
||||
<view class="section_2 flex-col">
|
||||
<view class="box_2 flex-col">
|
||||
<view class="block_3 flex-row">
|
||||
<view class="text-group_1 flex-col justify-between">
|
||||
<text class="text_2">{{ subjectArr[info.subject - 1] }}{{ title }}</text>
|
||||
<text class="text_3">{{ info.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="block_4 flex-row justify-between">
|
||||
<view class="text-wrapper_1 flex-col">
|
||||
<text class="text_4">{{ subjectArr[info.subject - 1] }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_5">{{ info.courseType }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="block_5 flex-row">
|
||||
<view class="image-text_1 flex-row justify-between">
|
||||
<image
|
||||
class="label_2"
|
||||
referrerpolicy="no-referrer"
|
||||
src="/static/lanhu_pingjiabiaodan/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png"
|
||||
/>
|
||||
<text class="text-group_2">{{ info.coachName }}</text>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center;">
|
||||
<u-rate active-color="#EAA140" v-model="info.rate" allowHalf inactive-color="#b2b2b2"
|
||||
@change="changeRate"></u-rate>
|
||||
<text style="margin-left: 5rpx;color:#E1A652;">{{ info.rate }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="section_4 flex-col">
|
||||
<text class="text_7">服务评价</text>
|
||||
<view class="text-wrapper_3 flex-col">
|
||||
<u--textarea v-model="info.serviceContent" placeholder="请输入内容"></u--textarea>
|
||||
</view>
|
||||
<text class="text_9">技术评价</text>
|
||||
<view class="text-wrapper_4 flex-col">
|
||||
<u--textarea v-model="info.teachContent" placeholder="请输入内容"></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom_" v-if="show">
|
||||
<view class="page flex-col">
|
||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||
<headers titles="评价表单">
|
||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||
</headers>
|
||||
</view>
|
||||
<view class="section_2 flex-col">
|
||||
<view class="box_2 flex-col">
|
||||
<view class="block_3 flex-row">
|
||||
<view class="text-group_1 flex-col justify-between">
|
||||
<text class="text_2" v-if="show">{{ subjectArr[info.subject - 1] }}{{ title}}</text>
|
||||
<text class="text_2" v-else>{{ info.busiName }}{{ title}}</text>
|
||||
<text class="text_3">{{ info.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="block_4 flex-row justify-between">
|
||||
<view class="text-wrapper_1 flex-col">
|
||||
<text class="text_4" v-if="show">{{ subjectArr[info.subject - 1] }}</text>
|
||||
<text class="text_4" v-else>{{ info.busiName.slice(0, 3) }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_5">{{ info.courseType }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="block_5 flex-row">
|
||||
<view class="image-text_1 flex-row justify-between">
|
||||
<image class="label_2" referrerpolicy="no-referrer"
|
||||
src="/static/lanhu_pingjiabiaodan/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png" />
|
||||
<text class="text-group_2">{{ info.coachName }}</text>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center;">
|
||||
<u-rate active-color="#EAA140" v-model="info.rate" allowHalf inactive-color="#b2b2b2"
|
||||
@change="changeRate" :readonly="!show"></u-rate>
|
||||
<text style="margin-left: 5rpx;color:#E1A652;">{{ info.rate }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="section_4 flex-col">
|
||||
<text class="text_7">服务评价</text>
|
||||
<view class="text-wrapper_3 flex-col">
|
||||
<u--textarea v-model="info.serviceContent" :disabled="!show" autoHeight
|
||||
placeholder="请输入内容"></u--textarea>
|
||||
</view>
|
||||
<text class="text_9">技术评价</text>
|
||||
<view class="text-wrapper_4 flex-col">
|
||||
<u--textarea v-model="info.teachContent" :disabled="!show" autoHeight placeholder="请输入内容"></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom_" v-if="show">
|
||||
|
||||
<view class="text-wrapper_5 flex-col" style="display: flex; justify-content: center; width: 60%;" @click="submit">
|
||||
<view style="background-color: #044EF2; padding: 20rpx 80rpx; border-radius: 18rpx;text-align: center ">
|
||||
<text style="color: white; font-size: 28rpx;">确认评价</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-wrapper_5 flex-col" style="display: flex; justify-content: center; width: 60%;"
|
||||
@click="submit">
|
||||
<view style="background-color: #044EF2; padding: 20rpx 80rpx; border-radius: 18rpx;text-align: center ">
|
||||
<text style="color: white; font-size: 28rpx;">确认评价</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import headers from "@/components/header/headers.vue";
|
||||
import request from "@/utils/request";
|
||||
import UInput from "@/uni_modules/uview-ui/components/u--input/u--input.vue";
|
||||
import {getLocalUserInfo} from "@/utils/auth";
|
||||
import headers from "@/components/header/headers.vue";
|
||||
import request from "@/utils/request";
|
||||
import UInput from "@/uni_modules/uview-ui/components/u--input/u--input.vue";
|
||||
import {
|
||||
getLocalUserInfo
|
||||
} from "@/utils/auth";
|
||||
import {
|
||||
login
|
||||
} from "../../api/login";
|
||||
|
||||
export default {
|
||||
components: {UInput, headers},
|
||||
data() {
|
||||
return {
|
||||
constants: {},
|
||||
show: false,
|
||||
title: '',
|
||||
// 评价信息
|
||||
info: {
|
||||
rate: 0.0,
|
||||
evaluateType: 0,
|
||||
busiId: '',
|
||||
tenantId: '',
|
||||
subject: 0,
|
||||
},
|
||||
subjectArr: ['科目一', '科目二', '科目三', '科目四'],
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
const data = JSON.parse(options.data);
|
||||
// 判断新增还是查看
|
||||
if (options.controls) {
|
||||
this.show = true
|
||||
Object.assign(this.info, data);
|
||||
this.info.id = null
|
||||
//设置默认评分
|
||||
this.info.rate = 0.0
|
||||
if (options.type === 'xunlian') {
|
||||
this.title = '训练'
|
||||
//评价类型为训练
|
||||
this.info.evaluateType = 0
|
||||
//业务id
|
||||
this.info.busiId = data.id
|
||||
this.info.time = data.trainDay
|
||||
} else if (options.type === 'kaoshi') {
|
||||
this.title = '考试'
|
||||
//评价类型为考试
|
||||
this.info.evaluateType = 0
|
||||
}
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
UInput,
|
||||
headers
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
constants: {},
|
||||
show: false,
|
||||
title: '',
|
||||
// 评价信息
|
||||
info: {
|
||||
rate: 0.0,
|
||||
evaluateType: 0,
|
||||
busiId: '',
|
||||
tenantId: '',
|
||||
subject: 0,
|
||||
},
|
||||
subjectArr: ['科目一', '科目二', '科目三', '科目四'],
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
const data = JSON.parse(options.data);
|
||||
console.log('穿进来的数据');
|
||||
// 判断新增还是查看
|
||||
if (options.controls) {
|
||||
this.show = true
|
||||
Object.assign(this.info, data);
|
||||
this.info.id = null
|
||||
//设置默认评分
|
||||
this.info.rate = 0.0
|
||||
if (options.type === 'xunlian') {
|
||||
this.title = '训练'
|
||||
//评价类型为训练
|
||||
this.info.evaluateType = 0
|
||||
//业务id
|
||||
this.info.busiId = data.id
|
||||
this.info.time = data.trainDay
|
||||
} else if (options.type === 'kaoshi') {
|
||||
this.title = '考试'
|
||||
//评价类型为考试
|
||||
this.info.evaluateType = 0
|
||||
}
|
||||
} else {
|
||||
Object.assign(this.info, data);
|
||||
}
|
||||
|
||||
console.log(this.info)
|
||||
},
|
||||
methods: {
|
||||
changeRate() {
|
||||
},
|
||||
submit() {
|
||||
// 判断评分、评价不能为空
|
||||
if (this.info.rate === 0.0 || this.info.serviceEvaluate === '' || this.info.technologyEvaluate === '') {
|
||||
uni.showToast({
|
||||
title: '请填写完整评价信息',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
//获取userId
|
||||
const user = getLocalUserInfo();
|
||||
this.info.userId = user.id
|
||||
this.info.userName = user.nickname
|
||||
console.log(this.info)
|
||||
},
|
||||
methods: {
|
||||
changeRate() {},
|
||||
submit() {
|
||||
// 判断评分、评价不能为空
|
||||
if (this.info.rate === 0.0 || this.info.serviceEvaluate === '' || this.info.technologyEvaluate === '') {
|
||||
uni.showToast({
|
||||
title: '请填写完整评价信息',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
//获取userId
|
||||
const user = getLocalUserInfo();
|
||||
this.info.userId = user.id
|
||||
this.info.userName = user.nickname
|
||||
|
||||
request({
|
||||
url: '/app-api/feed-back',
|
||||
method: 'post',
|
||||
data: this.info,
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: '评价成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(() => {
|
||||
//触发刷新事件
|
||||
uni.$emit('refresh');
|
||||
uni.navigateBack()
|
||||
}, 2000)
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
request({
|
||||
url: '/app-api/feed-back',
|
||||
method: 'post',
|
||||
data: this.info,
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: '评价成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(() => {
|
||||
//触发刷新事件
|
||||
uni.$emit('refresh');
|
||||
uni.navigateBack()
|
||||
}, 2000)
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
@import '../common/common.scss';
|
||||
@import './assets/style/index.rpx.scss';
|
||||
@import '../common/common.scss';
|
||||
@import './assets/style/index.rpx.scss';
|
||||
|
||||
.bottom_ {
|
||||
//固定在底部
|
||||
position: fixed;
|
||||
bottom: 10rpx;
|
||||
width: 100%;
|
||||
background: white;
|
||||
padding: 40rpx 0;
|
||||
display: flex;
|
||||
justify-content: center; /* 新增:水平居中 */
|
||||
}
|
||||
.bottom_ {
|
||||
//固定在底部
|
||||
position: fixed;
|
||||
bottom: 10rpx;
|
||||
width: 100%;
|
||||
background: white;
|
||||
padding: 40rpx 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
/* 新增:水平居中 */
|
||||
}
|
||||
</style>
|
||||
|
@ -117,8 +117,9 @@
|
||||
rgba(255, 255, 255, 0) 100%
|
||||
);
|
||||
width: 750rpx;
|
||||
height: 304rpx;
|
||||
//height: 304rpx;
|
||||
justify-content: flex-center;
|
||||
margin-bottom: 30rpx;
|
||||
.text_3 {
|
||||
width: 160rpx;
|
||||
height: 40rpx;
|
||||
@ -303,37 +304,38 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.text-wrapper_3 {
|
||||
background-color: rgba(255, 239, 229, 1);
|
||||
border-radius: 2px;
|
||||
height: 36rpx;
|
||||
width: 52rpx;
|
||||
margin: 48rpx 86rpx 0 -138rpx;
|
||||
//height: 36rpx;
|
||||
width: 33rpx;
|
||||
//margin: 48rpx 86rpx 0 -138rpx;
|
||||
//width: 32rpx;
|
||||
//height: 24rpx;
|
||||
overflow-wrap: break-word;
|
||||
color: rgba(123, 81, 11, 1);
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Regular;
|
||||
font-weight: NaN;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
margin-left: 10rpx;
|
||||
.text_12 {
|
||||
width: 32rpx;
|
||||
height: 24rpx;
|
||||
overflow-wrap: break-word;
|
||||
color: rgba(123, 81, 11, 1);
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Regular;
|
||||
font-weight: NaN;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
|
||||
line-height: 24rpx;
|
||||
margin: 6rpx 0 0 10rpx;
|
||||
}
|
||||
}
|
||||
.text-wrapper_4 {
|
||||
background-color: rgba(223, 235, 255, 1);
|
||||
//background-color: rgba(223, 235, 255, 1);
|
||||
border-radius: 2px;
|
||||
height: 36rpx;
|
||||
width: 92rpx;
|
||||
//width: 92rpx;
|
||||
position: absolute;
|
||||
left: 232rpx;
|
||||
top: 48rpx;
|
||||
.text_13 {
|
||||
width: 72rpx;
|
||||
height: 24rpx;
|
||||
overflow-wrap: break-word;
|
||||
color: rgba(44, 120, 245, 1);
|
||||
@ -644,7 +646,7 @@
|
||||
}
|
||||
.text_27 {
|
||||
width: 106rpx;
|
||||
height: 24rpx;
|
||||
height: 45rpx;
|
||||
overflow-wrap: break-word;
|
||||
color: rgba(137, 146, 162, 1);
|
||||
font-size: 24rpx;
|
||||
@ -657,10 +659,9 @@
|
||||
}
|
||||
}
|
||||
.box_13 {
|
||||
background-color: rgba(237, 162, 58, 1);
|
||||
position: absolute;
|
||||
left: 116rpx;
|
||||
top: 48rpx;
|
||||
left: 110rpx;
|
||||
top: 40rpx;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
@ -676,7 +677,7 @@
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
line-height: 24rpx;
|
||||
margin-top: 92rpx;
|
||||
margin-top: 72rpx;
|
||||
}
|
||||
}
|
||||
.group_11 {
|
||||
@ -839,13 +840,13 @@
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.class-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -854,20 +855,20 @@
|
||||
height: 30%;
|
||||
margin: 40rpx 0 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.class-item {
|
||||
display: flex;
|
||||
|
||||
|
||||
padding: 20rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
|
||||
.class-image {
|
||||
width: 160rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
|
||||
.class-info {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
@ -875,39 +876,39 @@
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
.class-name {
|
||||
font-size: 35rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
.class-price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.price {
|
||||
font-size: 28rpx;
|
||||
color: #ff4d4f;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.original-price {
|
||||
font-size: 24rpx;
|
||||
text-decoration: line-through;
|
||||
color: #999;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.class-details {
|
||||
display: flex;
|
||||
gap: 8rpx; /* 设置两个标签之间的间距 */
|
||||
align-items: center;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.view-all {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
@ -916,12 +917,12 @@
|
||||
color: #007aff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
|
||||
.arrow-icon {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.class-type,
|
||||
.class-license {
|
||||
display: flex; /* 设置为行内块元素 */
|
||||
@ -932,13 +933,13 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
/* 如果需要区分两个标签的样式,可以单独设置 */
|
||||
.class-type {
|
||||
color: #3478DC;
|
||||
background-color: #DDEDFE; /* 红色背景 */
|
||||
}
|
||||
|
||||
|
||||
.class-license {
|
||||
color: #8B623D;
|
||||
background-color: #FFF0E4; /* 蓝色背景 */
|
||||
|
@ -1,18 +1,9 @@
|
||||
<template>
|
||||
<view class="page flex-col">
|
||||
<view class="group_1 flex-row">
|
||||
|
||||
|
||||
</view>
|
||||
<view class="group_2 flex-row">
|
||||
<image
|
||||
class="label_1"
|
||||
referrerpolicy="no-referrer"
|
||||
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
|
||||
@click="handleBack"
|
||||
/>
|
||||
<text class="text_2">驾校</text>
|
||||
|
||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||
<headers titles="驾校">
|
||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||
</headers>
|
||||
</view>
|
||||
<view class="group_4 flex-col">
|
||||
<image
|
||||
@ -27,19 +18,19 @@
|
||||
<text class="text_4">营业中</text>
|
||||
<text class="text_5">08:00-18:00</text>
|
||||
</view>
|
||||
<view class="block_2 flex-row">
|
||||
<view class="text-group_1 flex-col justify-between">
|
||||
<text class="text_6">山东省济南市历下区工业路城投伴山居三区</text>
|
||||
<text class="text_7">距离4.0km</text>
|
||||
</view>
|
||||
<view class="image-wrapper_2 flex-col">
|
||||
<image
|
||||
class="label_2"
|
||||
referrerpolicy="no-referrer"
|
||||
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb598f2a62156745f7ba827352fd17464.png"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="block_2 flex-row">-->
|
||||
<!-- <view class="text-group_1 flex-col justify-between">-->
|
||||
<!-- <text class="text_6">{{ schoolDetails.address }}</text>-->
|
||||
<!-- <text class="text_7">距离4.0km</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="image-wrapper_2 flex-col">-->
|
||||
<!-- <image-->
|
||||
<!-- class="label_2"-->
|
||||
<!-- referrerpolicy="no-referrer"-->
|
||||
<!-- src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb598f2a62156745f7ba827352fd17464.png"-->
|
||||
<!-- />-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
|
||||
<!-- <view class="container">
|
||||
@ -94,11 +85,18 @@
|
||||
<text class="text_11">¥{{ item.price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-wrapper_3 flex-col">
|
||||
<text class="text_12">{{ item.type }}</text>
|
||||
</view>
|
||||
<!-- <view class="text-wrapper_3 flex-col">-->
|
||||
<!-- -->
|
||||
<!-- </view>-->
|
||||
<view class="text-wrapper_4 flex-col">
|
||||
<text class="text_13">{{ item.name }}</text>
|
||||
<view style="display: flex">
|
||||
<text class="text_13" style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{
|
||||
item.name
|
||||
}}
|
||||
</text>
|
||||
|
||||
<text class="text-wrapper_3 text_13" style="color: black;padding: 5rpx 15rpx">{{ item.type }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -129,10 +127,12 @@
|
||||
/>
|
||||
<view class="text-group_4 flex-col justify-between">
|
||||
<text class="text_25">{{ item.name }}</text>
|
||||
<text class="text_26">5.0</text>
|
||||
<!-- <text class="text_26">5.0</text>-->
|
||||
<text class="text_27">教龄 {{ item.seniority }}年</text>
|
||||
</view>
|
||||
<view class="box_13 flex-col"></view>
|
||||
<!-- <view class="box_13 flex-col">-->
|
||||
<!-- <u-rate :count="1" activeColor="#eda23a"></u-rate>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<text class="text_28">学员 598人</text>
|
||||
</view>
|
||||
@ -144,8 +144,10 @@
|
||||
<script>
|
||||
import request from "@/utils/request";
|
||||
import config from "@/config.js"
|
||||
import headers from "@/components/header/headers.vue";
|
||||
|
||||
export default {
|
||||
components: {headers},
|
||||
data() {
|
||||
return {
|
||||
imagesUrl: config.imagesUrl,
|
||||
@ -159,6 +161,11 @@ export default {
|
||||
|
||||
};
|
||||
},
|
||||
async onShow() {
|
||||
// const res = await this.getLocation();
|
||||
// console.log('位置信息',res)
|
||||
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.schoolId = options.id;
|
||||
@ -212,6 +219,66 @@ export default {
|
||||
console.log('驾校课程列表', this.schoolClassList);
|
||||
})
|
||||
},
|
||||
//获取当前位置
|
||||
getLocation() {
|
||||
let location = {
|
||||
lat: 0,
|
||||
lng: 0,
|
||||
}
|
||||
return new Promise((reserve, reject) => {//因为获取位置是异步接口所以需要使用promise
|
||||
uni.getLocation({
|
||||
success(res) {
|
||||
console.log('成功')
|
||||
location.lat = res.latitude
|
||||
location.lng = res.longitude,
|
||||
reserve(location);
|
||||
},
|
||||
fail(err) {
|
||||
console.log('失败', err)
|
||||
reject(location);//获取失败则返回经纬坐标为0
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 计算两点间距离(单位:米)
|
||||
calculateDistance(loc1, loc2) {
|
||||
const {latitude: lat1, longitude: lng1} = loc1;
|
||||
const {latitude: lat2, longitude: lng2} = loc2;
|
||||
|
||||
const rad = (d) => d * Math.PI / 180.0;
|
||||
const radLat1 = rad(lat1);
|
||||
const radLat2 = rad(lat2);
|
||||
const a = radLat1 - radLat2;
|
||||
const b = rad(lng1) - rad(lng2);
|
||||
|
||||
const distance = 2 * Math.asin(Math.sqrt(
|
||||
Math.pow(Math.sin(a / 2), 2) +
|
||||
Math.cos(radLat1) *
|
||||
Math.cos(radLat2) *
|
||||
Math.pow(Math.sin(b / 2), 2)
|
||||
));
|
||||
|
||||
const EARTH_RADIUS = 6378.137; // 地球半径(千米)
|
||||
// 修改计算结果(原米制 → 公里制)
|
||||
const result = (distance * EARTH_RADIUS).toFixed(2); // 直接得到公里,保留2位小数
|
||||
console.log('距离:', result + 'km');
|
||||
return result;
|
||||
},
|
||||
wxGeocoder(address) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// 需要先通过chooseLocation获取坐标(用户交互触发)
|
||||
uni.chooseLocation({
|
||||
success: (res) => {
|
||||
resolve({
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude
|
||||
});
|
||||
},
|
||||
fail: (err) => reject(err)
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
getSchoolAllClass() {
|
||||
request({
|
||||
|
@ -1,16 +1,14 @@
|
||||
<template>
|
||||
<view class="page flex-col">
|
||||
<view class="container">
|
||||
<headers titles="驾校">
|
||||
<uni-icons @click="goback()" type="arrow-left" color="#000000"
|
||||
size="22px"></uni-icons>
|
||||
</headers>
|
||||
<headers titles="驾校"><uni-icons @click="goback()" type="left" color="#000000"
|
||||
size="22px"></uni-icons></headers>
|
||||
</view>
|
||||
<view class="itemContent">
|
||||
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<!-- 使用 SchoolInfo 组件渲染驾校信息 -->
|
||||
<SchoolInfo v-for="(school, index) in schoolList" :key="index" :schoolInfo="school"/>
|
||||
<SchoolInfo v-for="(school, index) in schoolList" :key="index" :schoolInfo="school" @click="goSchoolDetail(school)"/>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
@ -100,10 +98,16 @@ export default {
|
||||
})
|
||||
this.schoolList = this.schoolList.concat(res.data.records)
|
||||
this.total = res.data.total
|
||||
console.log('长度', this.schoolList.length)
|
||||
console.log('长度',this.schoolList.length)
|
||||
this.isTriggered = false
|
||||
})
|
||||
},
|
||||
goSchoolDetail(data) {
|
||||
uni.navigateTo({
|
||||
url: `/newPages/schoolDetail/index?id=${data.id}&tenantId=${data.tenantId}`,
|
||||
// url: '/newPages/schoolDetail/index',
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 上滑加载数据
|
||||
@ -122,7 +126,7 @@ export default {
|
||||
/**
|
||||
* 下拉刷新数据
|
||||
*/
|
||||
onRefresherrefresh() {
|
||||
onRefresherrefresh(){
|
||||
this.isTriggered = true
|
||||
this.pageNo = 1
|
||||
this.total = 0
|
||||
@ -176,15 +180,13 @@ export default {
|
||||
<style lang='scss'>
|
||||
@import '../common/common.scss';
|
||||
@import './assets/style/index.rpx.scss';
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
background: #f4f5f6;
|
||||
box-sizing: border-box;
|
||||
padding-top: 88px;
|
||||
}
|
||||
|
||||
.itemContent {
|
||||
.itemContent{
|
||||
padding: 30rpx 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
Loading…
Reference in New Issue
Block a user