更新
This commit is contained in:
parent
ee27f6bf79
commit
e74fc686b0
@ -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,17 +31,14 @@
|
||||
<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)" />
|
||||
</scroll-view>
|
||||
@ -89,8 +72,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loopData0: [
|
||||
{
|
||||
loopData0: [{
|
||||
url: '/static/lanhu_shouye2gai/xcbm.png',
|
||||
text: '学车报名'
|
||||
},
|
||||
@ -136,9 +118,9 @@ export default {
|
||||
setInviteId(theRequest['inviteId'])
|
||||
this.getTenantIdByInviteId()
|
||||
//先登录
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/login/login'
|
||||
// })
|
||||
} else {
|
||||
removeInviteId()
|
||||
removeCoachId()
|
||||
@ -164,7 +146,7 @@ export default {
|
||||
uniqueCode: getInviteId()
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(123)
|
||||
console.log(123, res.data)
|
||||
if (res.data != null) {
|
||||
this.qTenantId = res.data.tenantId
|
||||
this.qCoachId = res.data.userId
|
||||
@ -394,6 +376,7 @@ export default {
|
||||
<style lang='scss'>
|
||||
@import '../common/common.scss';
|
||||
@import './assets/style/index.rpx.scss';
|
||||
|
||||
// 新增样式,使文字居中显示
|
||||
.text-group_1 {
|
||||
text-align: center;
|
||||
|
||||
@ -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">教龄 {{ 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>
|
||||
|
||||
@ -111,9 +96,12 @@
|
||||
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},
|
||||
components: {
|
||||
headers
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imagesUrl: config.imagesUrl,
|
||||
@ -215,8 +203,14 @@ export default {
|
||||
},
|
||||
// 计算两点间距离(单位:米)
|
||||
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);
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@ -59,7 +59,8 @@ import config from '@/config'
|
||||
import {
|
||||
getLocalUserInfo,
|
||||
setLocalUserInfo,
|
||||
setToken, setUserInfo
|
||||
setToken,
|
||||
setUserInfo
|
||||
} from '@/utils/auth.js'
|
||||
|
||||
export default {
|
||||
@ -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()
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user