This commit is contained in:
xyc 2025-04-16 17:13:42 +08:00
parent ee27f6bf79
commit e74fc686b0
3 changed files with 1185 additions and 1196 deletions

View File

@ -6,17 +6,9 @@
</view> </view>
<view class="section_2 flex-col"> <view class="section_2 flex-col">
<view class="list_1 flex-row"> <view class="list_1 flex-row">
<view <view class="image-text_1 flex-col align-items-center justify-content-center;"
class="image-text_1 flex-col align-items-center justify-content-center;" v-for="(item, index) in loopData0" :key="index" @click="handleItemClick(item)">
v-for="(item, index) in loopData0" <image class="label_1" referrerpolicy="no-referrer" :src="item.url" />
:key="index"
@click="handleItemClick(item)"
>
<image
class="label_1"
referrerpolicy="no-referrer"
:src="item.url"
/>
<text class="text-group_1" v-text="item.text"></text> <text class="text-group_1" v-text="item.text"></text>
</view> </view>
</view> </view>
@ -24,15 +16,9 @@
<view class="image-text_2 flex-row justify-between"> <view class="image-text_2 flex-row justify-between">
<!-- <u-notice-bar direction="column" duration="10000" bgColor="#e9f1ff" color="black" :text="textList.map(item => item.title)" @click="handleNoticeClick" icon="/static/lanhu_shouye2gai/FigmaDDSSlicePNGd2c17b5f24182e597acbfa50481040c1.png"></u-notice-bar> --> <!-- <u-notice-bar direction="column" duration="10000" bgColor="#e9f1ff" color="black" :text="textList.map(item => item.title)" @click="handleNoticeClick" icon="/static/lanhu_shouye2gai/FigmaDDSSlicePNGd2c17b5f24182e597acbfa50481040c1.png"></u-notice-bar> -->
<u-notice-bar <u-notice-bar direction="column" duration="10000" bgColor="#e9f1ff" color="black" :text="textList"
direction="column"
duration="10000"
bgColor="#e9f1ff"
color="black"
:text="textList"
@click="handleNoticeClick" @click="handleNoticeClick"
icon="/static/lanhu_shouye2gai/FigmaDDSSlicePNGd2c17b5f24182e597acbfa50481040c1.png" icon="/static/lanhu_shouye2gai/FigmaDDSSlicePNGd2c17b5f24182e597acbfa50481040c1.png" />
/>
</view> </view>
<view class="group_3 flex-col justify-between"> <view class="group_3 flex-col justify-between">
@ -45,17 +31,14 @@
<text class="text_2">优质驾校</text> <text class="text_2">优质驾校</text>
<view class="image-text_3 flex-row justify-between"> <view class="image-text_3 flex-row justify-between">
<text class="text-group_3" @click="goSchoolList()">查看更多</text> <text class="text-group_3" @click="goSchoolList()">查看更多</text>
<image <image class="thumbnail_2" referrerpolicy="no-referrer"
class="thumbnail_2" src="/static/lanhu_shouye2gai/FigmaDDSSlicePNGc8586e4d9e76802e4b93ae8fb3654b38.png" />
referrerpolicy="no-referrer"
src="/static/lanhu_shouye2gai/FigmaDDSSlicePNGc8586e4d9e76802e4b93ae8fb3654b38.png"
/>
</view> </view>
</view> </view>
<view class="itemContent"> <view class="itemContent">
<!-- 使用 scroll-view 包裹 SchoolInfo 组件 --> <!-- 使用 scroll-view 包裹 SchoolInfo 组件 -->
<scroll-view class="school-scroll-view" scroll-y @scrolltolower="onReachBottomCus" <scroll-view class="school-scroll-view" scroll-y @scrolltolower="onReachBottomCus" refresher-enabled
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered"> @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<SchoolInfo style="" v-for="(school, index) in schoolList" :key="index" :schoolInfo="school" <SchoolInfo style="" v-for="(school, index) in schoolList" :key="index" :schoolInfo="school"
@click="goSchoolDetail(school)" /> @click="goSchoolDetail(school)" />
</scroll-view> </scroll-view>
@ -89,8 +72,7 @@ export default {
}, },
data() { data() {
return { return {
loopData0: [ loopData0: [{
{
url: '/static/lanhu_shouye2gai/xcbm.png', url: '/static/lanhu_shouye2gai/xcbm.png',
text: '学车报名' text: '学车报名'
}, },
@ -136,9 +118,9 @@ export default {
setInviteId(theRequest['inviteId']) setInviteId(theRequest['inviteId'])
this.getTenantIdByInviteId() this.getTenantIdByInviteId()
// //
uni.reLaunch({ // uni.reLaunch({
url: '/pages/login/login' // url: '/pages/login/login'
}) // })
} else { } else {
removeInviteId() removeInviteId()
removeCoachId() removeCoachId()
@ -164,7 +146,7 @@ export default {
uniqueCode: getInviteId() uniqueCode: getInviteId()
} }
}).then(res => { }).then(res => {
console.log(123) console.log(123, res.data)
if (res.data != null) { if (res.data != null) {
this.qTenantId = res.data.tenantId this.qTenantId = res.data.tenantId
this.qCoachId = res.data.userId this.qCoachId = res.data.userId
@ -394,6 +376,7 @@ export default {
<style lang='scss'> <style lang='scss'>
@import '../common/common.scss'; @import '../common/common.scss';
@import './assets/style/index.rpx.scss'; @import './assets/style/index.rpx.scss';
// 使 // 使
.text-group_1 { .text-group_1 {
text-align: center; text-align: center;

View File

@ -6,21 +6,20 @@
</headers> </headers>
</view> </view>
<view class="group_4 flex-col"> <view class="group_4 flex-col">
<image <image style="width: 100%; height: 100%;" referrerpolicy="no-referrer"
style="width: 100%; height: 100%;" :src="imagesUrl + '/' + schoolInfo.photo" />
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + schoolInfo.photo"
/>
<!-- src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGcd54efcc9a8c89af0ef99c8275464828.png" --> <!-- src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGcd54efcc9a8c89af0ef99c8275464828.png" -->
</view> </view>
<view class="group_5 flex-col"> <view class="group_5 flex-col">
<text class="text_3">{{ schoolInfo.corpName }}</text> <text class="text_3">{{ schoolInfo.corpName }}</text>
<text class="text_3_2">地址{{ schoolInfo.address }}</text> <text class="text_3_2">地址{{ schoolInfo.address }}</text>
<view class="text-wrapper_1 flex-row justify-between"> <!-- <view class="text-wrapper_1 flex-row justify-between">
<text class="text_4">营业时间</text> <text class="text_4">营业时间</text>
<text class="text_5" v-if=" schoolInfo.businessStartTime && schoolInfo.businessEndTime ">{{ schoolInfo.businessStartTime }} - {{ schoolInfo.businessEndTime }}</text> <text class="text_5"
v-if=" schoolInfo.businessStartTime && schoolInfo.businessEndTime ">{{ schoolInfo.businessStartTime }}
- {{ schoolInfo.businessEndTime }}</text>
<text class="text_5" v-else>08:00-18:00</text> <text class="text_5" v-else>08:00-18:00</text>
</view> </view> -->
</view> </view>
@ -30,13 +29,10 @@
<text class="text_8">报名类型</text> <text class="text_8">报名类型</text>
</view> </view>
<view v-if="schoolClassList.length > 0"> <view v-if="schoolClassList.length > 0">
<view class="box_6 flex-row" v-for="(item, index) in schoolClassList" :key="index" @click="goToDetail(item.id)"> <view class="box_6 flex-row" v-for="(item, index) in schoolClassList" :key="index"
@click="goToDetail(item.id)">
<view class="image-text_1 flex-row"> <view class="image-text_1 flex-row">
<image <image class="image_2" referrerpolicy="no-referrer" :src="imagesUrl + '/' + item.photo" />
class="image_2"
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + item.photo"
/>
<view class="text-group_2 flex-col justify-between"> <view class="text-group_2 flex-col justify-between">
<text class="text_9">{{ item.name }}</text> <text class="text_9">{{ item.name }}</text>
<view class="text-wrapper_2 flex-row justify-between"> <view class="text-wrapper_2 flex-row justify-between">
@ -45,11 +41,13 @@
</view> </view>
<view class="text-wrapper_4 flex-col"> <view class="text-wrapper_4 flex-col">
<view style="display: flex"> <view style="display: flex">
<text class="text_13" style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{ <text class="text_13"
style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{
item.tittle item.tittle
}} }}
</text> </text>
<text class="text-wrapper_3 text_13" style="color: black;padding: 5rpx 10rpx">{{ item.type }}</text> <text class="text-wrapper_3 text_13"
style="color: black;padding: 5rpx 10rpx">{{ item.type }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -58,19 +56,13 @@
<view class="box_12 flex-row"> <view class="box_12 flex-row">
<view class="image-text_2 flex-row justify-between" @click="goClassList()"> <view class="image-text_2 flex-row justify-between" @click="goClassList()">
<text class="text-group_3">查看全部班型({{ schoolAllClassList.length }})</text> <text class="text-group_3">查看全部班型({{ schoolAllClassList.length }})</text>
<image <image class="thumbnail_2" referrerpolicy="no-referrer"
class="thumbnail_2" src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb5045194768d2baa618848ea60e5a9e4.png" />
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb5045194768d2baa618848ea60e5a9e4.png"
/>
</view> </view>
</view> </view>
</view> </view>
<view v-else> <view v-else>
<u-empty <u-empty mode="data" text="该驾校没有课程...">
mode="data"
text="该驾校没有课程..."
>
</u-empty> </u-empty>
</view> </view>
</view> </view>
@ -83,11 +75,7 @@
<view v-if="schoolCoachList.length > 0"> <view v-if="schoolCoachList.length > 0">
<view class="group_10 flex-row justify-between" v-for="(item, index) in schoolCoachList" :key="index"> <view class="group_10 flex-row justify-between" v-for="(item, index) in schoolCoachList" :key="index">
<view class="image-text_3 flex-row justify-between"> <view class="image-text_3 flex-row justify-between">
<image <image class="label_3" referrerpolicy="no-referrer" :src="imagesUrl + '/' + item.image" />
class="label_3"
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + item.image"
/>
<view class="text-group_4 flex-col justify-between"> <view class="text-group_4 flex-col justify-between">
<text class="text_25">{{ item.name }}</text> <text class="text_25">{{ item.name }}</text>
<text class="text_27">教龄&nbsp;{{ item.seniority }}</text> <text class="text_27">教龄&nbsp;{{ item.seniority }}</text>
@ -96,10 +84,7 @@
</view> </view>
</view> </view>
<view v-else> <view v-else>
<u-empty <u-empty mode="list" text="该驾校没有团队教练...">
mode="list"
text="该驾校没有团队教练..."
>
</u-empty> </u-empty>
</view> </view>
@ -111,9 +96,12 @@
import request from "@/utils/request"; import request from "@/utils/request";
import config from "@/config.js" import config from "@/config.js"
import headers from "@/components/header/headers.vue"; import headers from "@/components/header/headers.vue";
import * as auth from '@/utils/auth';
export default { export default {
components: {headers}, components: {
headers
},
data() { data() {
return { return {
imagesUrl: config.imagesUrl, imagesUrl: config.imagesUrl,
@ -215,8 +203,14 @@ export default {
}, },
// //
calculateDistance(loc1, loc2) { calculateDistance(loc1, loc2) {
const {latitude: lat1, longitude: lng1} = loc1; const {
const {latitude: lat2, longitude: lng2} = loc2; latitude: lat1,
longitude: lng1
} = loc1;
const {
latitude: lat2,
longitude: lng2
} = loc2;
const rad = (d) => d * Math.PI / 180.0; const rad = (d) => d * Math.PI / 180.0;
const radLat1 = rad(lat1); const radLat1 = rad(lat1);
@ -268,19 +262,32 @@ export default {
}, },
getSchoolCoach() { getSchoolCoach() {
console.log('执行');
request({ request({
url: '/app-api/dl-drive-school-coach-small/page', url: '/app-api/dl-drive-school-coach-small/page',
method: 'GET', method: 'GET',
params: { params: {
tenantId: this.tenantId, tenantId: this.tenantId,
pageNo: 1,
pageSize: 100000
}, },
tenantIdFlag: false tenantIdFlag: false
}).then(res => { }).then(res => {
// //
const sortedList = res.data.records.sort((a, b) => b.seniority - a.seniority); const sortedList = res.data.records.sort((a, b) => b.seniority - a.seniority);
const coachId = auth.getCoachId()
console.log(coachId, 'coachId');
const coach = res.data.records.find(item => item.userId == coachId)
console.log(coach, 'coach');
if (coach) {
this.schoolCoachList.push(coach)
} else {
// //
this.schoolCoachList = sortedList.slice(0, 3); this.schoolCoachList = sortedList.slice(0, 3);
this.total = res.data.total; this.total = res.data.total;
}
}).catch(e => {
console.log(e);
}) })
}, },

View File

@ -59,7 +59,8 @@ import config from '@/config'
import { import {
getLocalUserInfo, getLocalUserInfo,
setLocalUserInfo, setLocalUserInfo,
setToken, setUserInfo setToken,
setUserInfo
} from '@/utils/auth.js' } from '@/utils/auth.js'
export default { export default {
@ -135,10 +136,8 @@ export default {
getshenfen(text) { getshenfen(text) {
this.shenfen = text this.shenfen = text
}, },
open() { open() {},
}, close() {},
close() {
},
goPolicy() { goPolicy() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/login/PrivacyPolicy" url: "/pages/login/PrivacyPolicy"
@ -252,10 +251,10 @@ export default {
userJson.userId = res.data.user.id userJson.userId = res.data.user.id
uni.setStorageSync('role', res.data.role) uni.setStorageSync('role', res.data.role)
uni.setStorageSync('userinfo', res.data.user) uni.setStorageSync('userinfo', res.data.user)
uni.reLaunch({ // uni.reLaunch({
url: '/newPages/newIndex/index' // url: '/newPages/newIndex/index'
}) // })
// uni.navigateBack() uni.navigateBack()
}) })
}, },