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 class="section_2 flex-col">
<view class="list_1 flex-row">
<view
class="image-text_1 flex-col align-items-center justify-content-center;"
v-for="(item, index) in loopData0"
:key="index"
@click="handleItemClick(item)"
>
<image
class="label_1"
referrerpolicy="no-referrer"
:src="item.url"
/>
<view class="image-text_1 flex-col align-items-center justify-content-center;"
v-for="(item, index) in loopData0" :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>
</view>
</view>
@ -24,15 +16,9 @@
<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"
<u-notice-bar direction="column" duration="10000" bgColor="#e9f1ff" color="black" :text="textList"
@click="handleNoticeClick"
icon="/static/lanhu_shouye2gai/FigmaDDSSlicePNGd2c17b5f24182e597acbfa50481040c1.png"
/>
icon="/static/lanhu_shouye2gai/FigmaDDSSlicePNGd2c17b5f24182e597acbfa50481040c1.png" />
</view>
<view class="group_3 flex-col justify-between">
@ -45,19 +31,16 @@
<text class="text_2">优质驾校</text>
<view class="image-text_3 flex-row justify-between">
<text class="text-group_3" @click="goSchoolList()">查看更多</text>
<image
class="thumbnail_2"
referrerpolicy="no-referrer"
src="/static/lanhu_shouye2gai/FigmaDDSSlicePNGc8586e4d9e76802e4b93ae8fb3654b38.png"
/>
<image class="thumbnail_2" referrerpolicy="no-referrer"
src="/static/lanhu_shouye2gai/FigmaDDSSlicePNGc8586e4d9e76802e4b93ae8fb3654b38.png" />
</view>
</view>
<view class="itemContent">
<!-- 使用 scroll-view 包裹 SchoolInfo 组件 -->
<scroll-view class="school-scroll-view" scroll-y @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<scroll-view class="school-scroll-view" scroll-y @scrolltolower="onReachBottomCus" refresher-enabled
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<SchoolInfo style="" v-for="(school, index) in schoolList" :key="index" :schoolInfo="school"
@click="goSchoolDetail(school)"/>
@click="goSchoolDetail(school)" />
</scroll-view>
</view>
@ -67,9 +50,9 @@
</template>
<script>
import SchoolInfo from './SchoolInfo.vue';
import request from "@/utils/request";
import {
import SchoolInfo from './SchoolInfo.vue';
import request from "@/utils/request";
import {
getCoachId,
getInviteId,
getLocalUserInfo,
@ -82,15 +65,14 @@ import {
setLocalUserInfo,
setStaffType,
setTenantId
} from '@/utils/auth'
export default {
} from '@/utils/auth'
export default {
components: {
SchoolInfo
},
data() {
return {
loopData0: [
{
loopData0: [{
url: '/static/lanhu_shouye2gai/xcbm.png',
text: '学车报名'
},
@ -117,7 +99,7 @@ export default {
pageSize: 10,
total: 0,
imageUrl: this.$imagesUrl,
textList:[],
textList: [],
noticeList: [],
qTenantId: null,
qCoachId: null,
@ -131,15 +113,15 @@ export default {
const q = decodeURIComponent(query.q) //
let theRequest = this.getUrlValue(q)
if(theRequest.hasOwnProperty("inviteId")){
if (theRequest.hasOwnProperty("inviteId")) {
//code
setInviteId(theRequest['inviteId'])
this.getTenantIdByInviteId()
//
uni.reLaunch({
url: '/pages/login/login'
})
}else{
// uni.reLaunch({
// url: '/pages/login/login'
// })
} else {
removeInviteId()
removeCoachId()
removeTenantId()
@ -150,9 +132,9 @@ export default {
}
},
methods: {
getTenantIdByInviteId(){
getTenantIdByInviteId() {
console.log('1122', getInviteId())
if(!getInviteId()){
if (!getInviteId()) {
console.log(1)
this.getList()
return
@ -164,17 +146,17 @@ export default {
uniqueCode: getInviteId()
}
}).then(res => {
console.log(123)
if(res.data != null){
console.log(123, res.data)
if (res.data != null) {
this.qTenantId = res.data.tenantId
this.qCoachId = res.data.userId
setTenantId(res.data.tenantId)
this.getList()
if(res.data.type == 'jl'){
if (res.data.type == 'jl') {
setCoachId(res.data.userId)
setStaffType('02')
}
if(res.data.type == 'yg'){
if (res.data.type == 'yg') {
setCoachId(res.data.userId)
setStaffType('01')
}
@ -388,40 +370,41 @@ export default {
}
}
};
};
</script>
<style lang='scss'>
@import '../common/common.scss';
@import './assets/style/index.rpx.scss';
// 使
.text-group_1 {
text-align: center;
}
@import '../common/common.scss';
@import './assets/style/index.rpx.scss';
// image-text_1 使
.image-text_1 {
// 使
.text-group_1 {
text-align: center;
}
// image-text_1 使
.image-text_1 {
display: flex;
flex-direction: column;
align-items: center; // 使
justify-content: center; // 使
}
}
// scroll-view
.school-scroll-view {
// scroll-view
.school-scroll-view {
height: 500rpx; //
overflow-y: auto;
margin-left: 22rpx;
}
}
.itemContent {
.itemContent {
padding: 30rpx 0;
display: flex;
flex-direction: column;
row-gap: 20rpx;
}
}
.top_ {
.top_ {
//padding-top: 200rpx;
}
}
</style>

View File

@ -6,21 +6,20 @@
</headers>
</view>
<view class="group_4 flex-col">
<image
style="width: 100%; height: 100%;"
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + schoolInfo.photo"
/>
<image style="width: 100%; height: 100%;" referrerpolicy="no-referrer"
:src="imagesUrl + '/' + schoolInfo.photo" />
<!-- src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGcd54efcc9a8c89af0ef99c8275464828.png" -->
</view>
<view class="group_5 flex-col">
<text class="text_3">{{ schoolInfo.corpName }}</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_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>
</view>
</view> -->
</view>
@ -30,13 +29,10 @@
<text class="text_8">报名类型</text>
</view>
<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">
<image
class="image_2"
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + item.photo"
/>
<image class="image_2" referrerpolicy="no-referrer" :src="imagesUrl + '/' + item.photo" />
<view class="text-group_2 flex-col justify-between">
<text class="text_9">{{ item.name }}</text>
<view class="text-wrapper_2 flex-row justify-between">
@ -45,11 +41,13 @@
</view>
<view class="text-wrapper_4 flex-col">
<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
}}
</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>
@ -58,19 +56,13 @@
<view class="box_12 flex-row">
<view class="image-text_2 flex-row justify-between" @click="goClassList()">
<text class="text-group_3">查看全部班型({{ schoolAllClassList.length }})</text>
<image
class="thumbnail_2"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb5045194768d2baa618848ea60e5a9e4.png"
/>
<image class="thumbnail_2" referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb5045194768d2baa618848ea60e5a9e4.png" />
</view>
</view>
</view>
<view v-else>
<u-empty
mode="data"
text="该驾校没有课程..."
>
<u-empty mode="data" text="该驾校没有课程...">
</u-empty>
</view>
</view>
@ -83,11 +75,7 @@
<view v-if="schoolCoachList.length > 0">
<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">
<image
class="label_3"
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + item.image"
/>
<image class="label_3" referrerpolicy="no-referrer" :src="imagesUrl + '/' + item.image" />
<view class="text-group_4 flex-col justify-between">
<text class="text_25">{{ item.name }}</text>
<text class="text_27">教龄&nbsp;{{ item.seniority }}</text>
@ -96,10 +84,7 @@
</view>
</view>
<view v-else>
<u-empty
mode="list"
text="该驾校没有团队教练..."
>
<u-empty mode="list" text="该驾校没有团队教练...">
</u-empty>
</view>
@ -108,12 +93,15 @@
</view>
</template>
<script>
import request from "@/utils/request";
import config from "@/config.js"
import headers from "@/components/header/headers.vue";
import request from "@/utils/request";
import config from "@/config.js"
import headers from "@/components/header/headers.vue";
import * as auth from '@/utils/auth';
export default {
components: {headers},
export default {
components: {
headers
},
data() {
return {
imagesUrl: config.imagesUrl,
@ -165,9 +153,9 @@ export default {
console.error('获取驾校详情失败', err);
});
},
getSchoolInfo(){
getSchoolInfo() {
request({
url:'/userClient/base/companySmallProgram/getCompanyByTenantId',
url: '/userClient/base/companySmallProgram/getCompanyByTenantId',
method: 'GET',
params: {
tenantId: this.tenantId,
@ -198,7 +186,7 @@ export default {
lat: 0,
lng: 0,
}
return new Promise((reserve, reject) => {//使promise
return new Promise((reserve, reject) => { //使promise
uni.getLocation({
success(res) {
console.log('成功')
@ -208,15 +196,21 @@ export default {
},
fail(err) {
console.log('失败', err)
reject(location);//0
reject(location); //0
}
})
})
},
//
calculateDistance(loc1, loc2) {
const {latitude: lat1, longitude: lng1} = loc1;
const {latitude: lat2, longitude: lng2} = 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);
@ -268,19 +262,32 @@ export default {
},
getSchoolCoach() {
console.log('执行');
request({
url: '/app-api/dl-drive-school-coach-small/page',
method: 'GET',
params: {
tenantId: this.tenantId,
pageNo: 1,
pageSize: 100000
},
tenantIdFlag: false
}).then(res => {
//
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.total = res.data.total;
}
}).catch(e => {
console.log(e);
})
},
@ -297,9 +304,9 @@ 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';
</style>

View File

@ -54,15 +54,16 @@
</template>
<script>
import request from '../../utils/request';
import config from '@/config'
import {
import request from '../../utils/request';
import config from '@/config'
import {
getLocalUserInfo,
setLocalUserInfo,
setToken, setUserInfo
} from '@/utils/auth.js'
setToken,
setUserInfo
} from '@/utils/auth.js'
export default {
export default {
data() {
return {
yd: false,
@ -135,10 +136,8 @@ export default {
getshenfen(text) {
this.shenfen = text
},
open() {
},
close() {
},
open() {},
close() {},
goPolicy() {
uni.navigateTo({
url: "/pages/login/PrivacyPolicy"
@ -252,10 +251,10 @@ export default {
userJson.userId = res.data.user.id
uni.setStorageSync('role', res.data.role)
uni.setStorageSync('userinfo', res.data.user)
uni.reLaunch({
url: '/newPages/newIndex/index'
})
// uni.navigateBack()
// uni.reLaunch({
// url: '/newPages/newIndex/index'
// })
uni.navigateBack()
})
},
@ -335,18 +334,18 @@ export default {
}, 1000);
},
}
}
}
</script>
<style scoped lang="scss">
.jsq {
.jsq {
border: none !important;
font-size: 14px;
font-weight: 400;
color: #0078FF;
}
}
.anniu {
.anniu {
width: 150px;
height: 40px;
border-radius: 50px;
@ -357,18 +356,18 @@ export default {
background: #0D2E8D;
color: #FFFFFF;
margin: 0 auto;
}
}
.cont-popup {
.cont-popup {
height: 250px;
width: 300px;
background-color: #FFFFFF;
box-sizing: border-box;
padding: 15px;
border-radius: 10px;
}
}
.popup-title {
.popup-title {
width: 100%;
display: flex;
align-items: center;
@ -376,9 +375,9 @@ export default {
font-size: 18px;
font-weight: bold;
color: #0D2E8D;
}
}
.dix {
.dix {
width: 100%;
display: flex;
align-items: center;
@ -386,9 +385,9 @@ export default {
margin: 20px 0px;
font-size: 18px;
font-weight: bold;
}
}
.lqiu {
.lqiu {
width: 15px;
height: 15px;
border-radius: 50%;
@ -398,29 +397,29 @@ export default {
display: flex;
align-items: center;
justify-content: center;
}
}
.qiu {
.qiu {
width: 15px;
height: 15px;
border-radius: 50%;
border: 1px solid #E8E8E8;
}
}
button {
button {
border: none !important;
background: none !important;
margin: 0px;
display: block;
}
}
button:focus {
button:focus {
color: #0078FF;
outline: none;
box-shadow: none;
}
}
.content {
.content {
box-sizing: border-box;
padding-top: 1px;
// background-image: url('http://www.nuoyunr.com/lananRsc/jdc-bj.png');
@ -428,9 +427,9 @@ button:focus {
background-size: cover;
width: 100%;
height: calc(100vh);
}
}
.top {
.top {
box-sizing: border-box;
padding: 0px 27px;
padding-top: 100px;
@ -441,9 +440,9 @@ button:focus {
background-position: center;
width: 100%;
// height: 385px;
}
}
.touxiang {
.touxiang {
width: 88px;
height: 88px;
border-radius: 10px;
@ -456,9 +455,9 @@ button:focus {
width: 100%;
height: 100%;
}
}
}
.twotap {
.twotap {
width: 100%;
display: flex;
align-items: center;
@ -470,23 +469,23 @@ button:focus {
color: #666666;
margin-right: 38.5px;
}
}
}
.blck {
.blck {
color: #333333 !important;
font-weight: bold !important;
}
}
.inputs {
.inputs {
box-sizing: border-box;
padding: 16px 0px;
display: flex;
align-items: center;
border-bottom: 2px solid #E8E8E8;
margin-top: 20px;
}
}
.wjworb {
.wjworb {
margin-top: 5px;
width: 100%;
display: flex;
@ -495,9 +494,9 @@ button:focus {
justify-content: flex-end;
align-items: center;
}
}
.dl {
.dl {
width: 90%;
height: 44px;
background-color: #0D2E8D;
@ -509,27 +508,27 @@ button:focus {
justify-content: center;
align-items: center;
margin-top: 300px;
}
}
.xiaoannoi {
.xiaoannoi {
width: 90%;
height: 40px;
margin: 0 auto;
border-radius: 50px;
overflow: hidden;
margin-top: 80px;
}
}
.hging {
.hging {
width: 100%;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #636363;
margin-top: 20px;
}
}
.wx {
.wx {
width: 38px;
height: 38px;
overflow: hidden;
@ -541,17 +540,17 @@ button:focus {
width: 100%;
height: 100%;
}
}
}
.hui {
.hui {
font-size: 10px;
width: 100%;
text-align: center;
font-weight: 400;
color: #666666;
}
}
.dbottom {
.dbottom {
width: 100%;
text-align: center;
font-size: 12px;
@ -562,40 +561,40 @@ button:focus {
display: flex;
justify-content: center;
align-items: center;
}
}
.lan {
.lan {
color: #2c78f5;
}
}
.land {
.land {
font-size: 25px;
font-weight: bold;
color: #2c78f5;
margin-bottom: 5px;
}
}
.kuang {
.kuang {
width: 90%;
margin: 0 auto;
margin-top: 100px;
}
}
.axquan {
.axquan {
width: 18px;
height: 18px;
border-radius: 50%;
border: 1px solid #AAAAAA;
margin-right: 5px;
}
}
.axquanl {
.axquanl {
width: 18px;
height: 18px;
border-radius: 50%;
border: 1px solid #AAAAAA;
margin-right: 5px;
background-color: #2c78f5;
}
}
</style>