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:
Lx 2025-04-07 18:11:01 +08:00
commit 58c3b759bf
8 changed files with 818 additions and 685 deletions

View File

@ -41,7 +41,8 @@
</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="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>
@ -71,8 +72,10 @@
<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)">
<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>
@ -87,10 +90,10 @@
</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 {
export default {
components: {
headers
},
@ -104,7 +107,7 @@ export default {
constants: {},
list: ['预约记录', '训练记录'],
curNow: 0,
subjectArr:['科目一','科目二','科目三','科目四']
subjectArr: ['科目一', '科目二', '科目三', '科目四']
};
},
onLoad() {
@ -177,7 +180,7 @@ export default {
this.isTriggered = false
})
},
goDetail(data,str) {
goDetail(data, str) {
//data
uni.navigateTo({
url: `/newPages/appointmentDetail/index?data=${JSON.stringify(data)}&type=${str}`
@ -227,35 +230,35 @@ export default {
})
},
}
};
};
</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 {
//
.content-box {
margin-top: 88rpx;
/* 根据头部高度调整 */
padding: 20rpx;
overflow-y: auto;
height: calc(100vh - 88rpx);
/* 确保内容区域高度正确 */
}
}
.header {
.header {
width: 100%;
background: #f4f5f6;
box-sizing: border-box;
padding-top: 88px;
}
}
.bottom_ {
.bottom_ {
position: fixed;
bottom: 0;
}
}
.ytg {
.ytg {
background-color: #cfe2ff;
border-radius: 4px;
height: 40rpx;
@ -275,5 +278,5 @@ export default {
line-height: 24rpx;
margin: 8rpx 0 0 12rpx;
}
}
}
</style>

View File

@ -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;
}
}
}

View File

@ -1,25 +1,16 @@
<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_kechengliebiao/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
@click="goBack()"
/>
<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>
<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="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"
@ -33,13 +24,22 @@
<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>
<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>
</view>
</scroll-view>
@ -48,8 +48,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,

View File

@ -1,65 +1,64 @@
<template>
<view class="page flex-col">
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
<headers titles="预约">
<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"
>
<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" v-html="item.lanhutext0"></text>
<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" v-html="item.lanhutext1"></text>
<text class="text_3">{{ item.busiName.slice(0, 3) }}</text>
</view>
<view class="text-wrapper_3 flex-col">
<text class="text_4" v-html="item.lanhutext2"></text>
<text class="text_4">{{ item.courseType }}</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 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 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 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},
export default {
components: {
headers
},
data() {
return {
loopData0: [
{
loopData0: [{
lanhutext0: '科目二训练',
lanhutext1: '科目二',
lanhutext2: 'C2',
lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png',
lanhuimage0: 'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png',
lanhutext3: '马文峰',
lanhutext4: '4.0'
},
@ -67,16 +66,18 @@ export default {
lanhutext0: '科目二考试',
lanhutext1: '科目二',
lanhutext2: 'C2',
lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png',
lanhuimage0: 'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png',
lanhutext3: '马文峰',
lanhutext4: '4.0'
}
],
evaluate: [],
constants: {},
userId: getLocalUserInfo().id,
pageNo: 1,
pageSize: 10
pageSize: 10,
total: 0,
isTriggered: false
};
},
onLoad() {
@ -88,18 +89,63 @@ export default {
url: '/app-api/feed-back/page',
method: 'GET',
params: {
userId: 5171,
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>

View File

@ -9,13 +9,15 @@
<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_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">{{ subjectArr[info.subject - 1] }}</text>
<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>
@ -23,16 +25,13 @@
</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"
/>
<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>
@change="changeRate" :readonly="!show"></u-rate>
<text style="margin-left: 5rpx;color:#E1A652;">{{ info.rate }}</text>
</view>
</view>
@ -41,16 +40,18 @@
<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>
<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" placeholder="请输入内容"></u--textarea>
<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 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>
@ -59,13 +60,21 @@
</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},
export default {
components: {
UInput,
headers
},
data() {
return {
constants: {},
@ -84,6 +93,7 @@ export default {
},
onLoad(options) {
const data = JSON.parse(options.data);
console.log('穿进来的数据');
//
if (options.controls) {
this.show = true
@ -103,13 +113,14 @@ export default {
//
this.info.evaluateType = 0
}
} else {
Object.assign(this.info, data);
}
console.log(this.info)
},
methods: {
changeRate() {
},
changeRate() {},
submit() {
//
if (this.info.rate === 0.0 || this.info.serviceEvaluate === '' || this.info.technologyEvaluate === '') {
@ -143,13 +154,13 @@ export default {
})
}
}
};
};
</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_ {
.bottom_ {
//
position: fixed;
bottom: 10rpx;
@ -157,6 +168,7 @@ export default {
background: white;
padding: 40rpx 0;
display: flex;
justify-content: center; /* 新增:水平居中 */
}
justify-content: center;
/* 新增:水平居中 */
}
</style>

View File

@ -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;
@ -307,12 +308,11 @@
.text-wrapper_3 {
background-color: rgba(255, 239, 229, 1);
border-radius: 2px;
height: 36rpx;
width: 52rpx;
margin: 48rpx 86rpx 0 -138rpx;
.text_12 {
width: 32rpx;
height: 24rpx;
//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;
@ -320,20 +320,22 @@
font-weight: NaN;
text-align: left;
white-space: nowrap;
margin-left: 10rpx;
.text_12 {
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 {

View File

@ -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">教龄&nbsp;{{ 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">学员&nbsp;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({

View File

@ -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;