This commit is contained in:
Lx 2025-03-27 15:49:36 +08:00
parent b9c92167c5
commit 87a636eeed
23 changed files with 1685 additions and 488 deletions

View File

@ -53,7 +53,7 @@
},
methods: {
gogogo(id) {
this.actindex = id
this.actindex = id;
if (id == 1) {
uni.reLaunch({
url: '/newPages/newIndex/index'
@ -65,9 +65,9 @@
})
}
if (id == 3) {
uni.reLaunch({
url: '/pages/my/my'
// url: '/pages/my/my'
url: '/newPages/my/index'
})
}
if (id == 4) {

View File

@ -99,10 +99,12 @@
}
.group_3 {
height: 594rpx;
background: url(/static/lanhu_kechengxiangqing/FigmaDDSSlicePNGd876ad79433fb9b2d50bcb5270f579a4.png)
100% no-repeat;
background-size: 100% 100%;
width: 750rpx;
background: 100% no-repeat;
background-size: 100% 100%;
width: 750rpx;
border-bottom-left-radius: 30rpx; /* 设置左下角圆角 */
border-bottom-right-radius: 30rpx; /* 设置右下角圆角 */
overflow: hidden; /* 确保内容不会溢出圆角区域 */
.section_1 {
background-color: rgba(255, 255, 255, 1);
width: 750rpx;

View File

@ -1,54 +1,39 @@
<template>
<view class="page flex-col">
<view class="group_1 flex-row">
<text class="text_1">9:41</text>
<view class="block_1 flex-col"></view>
<view class="block_2 flex-col"></view>
<image
class="image_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNGa0ae945f09e82ebeb726c4adbf82b9fd.png"
/>
</view>
<view class="group_2 flex-row">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
@click="goBack()"
/>
<text class="text_2">课程详情</text>
<view class="box_1 flex-col">
<view class="image-wrapper_1 flex-row">
<image
class="thumbnail_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNGdc9929c2b5fd86c1689cc5990a0b4397.png"
/>
</view>
<view class="box_2 flex-row justify-between">
<view class="box_3 flex-col"></view>
<view class="box_4 flex-col"></view>
</view>
</view>
</view>
<view class="group_3 flex-col">
<view class="section_1 flex-col"></view>
<image
style="width: 100%; height: 100%;"
:src="imagesUrl + '/' + courseDetails.photo"
/>
</view>
<view class="group_4 flex-col">
<view class="section_2 flex-row justify-between">
<view class="text-wrapper_1">
<text class="text_3"></text>
<text class="text_4">3000.00</text>
<text class="text_4">{{ courseDetails.price ? courseDetails.price.toFixed(2) : '--' }}</text>
</view>
<text class="text_5">3000.00</text>
</view>
<text class="text_6">AI智能+人工教学</text>
<text class="text_6">{{ courseDetails.name }}</text>
<view class="section_3 flex-row justify-between">
<view class="text-wrapper_2 flex-col">
<text class="text_7">自动挡</text>
<text class="text_7">{{ courseDetails.tittle }}</text>
</view>
<view class="text-wrapper_3 flex-col">
<text class="text_8">C2</text>
<text class="text_8">{{ courseDetails.type }}</text>
</view>
</view>
<text class="text_9">兄弟驾校/周一至周日&nbsp;08:00-18:00</text>
@ -72,7 +57,7 @@
/>
</view>
<view class="group_6 flex-row">
<view class="image-text_1 flex-col justify-between">
<view class="image-text_1 flex-col justify-between" @click="zxkf()">
<image
class="label_2"
referrerpolicy="no-referrer"
@ -80,20 +65,68 @@
/>
<text class="text-group_1">咨询客服</text>
</view>
<view class="text-wrapper_4 flex-col">
<text class="text_11">预约训练</text>
<view class="text-wrapper_4 flex-col" @click="goRegisterNow()">
<text class="text_11">立即报名</text>
</view>
</view>
</view>
</template>
<script>
import request from "@/utils/request";
import config from "@/config.js"
import {getLocalUserInfo, getUserInfo} from "@/utils/auth";
export default {
data() {
return {
constants: {}
courseId: undefined,
tenantId: undefined,
courseDetails: [],
imagesUrl: config.imagesUrl,
userDetails: [],
};
},
methods: {}
onLoad(options) {
this.courseId = options.courseId;
this.tenantId = options.tenantId;
console.log(options)
this.getCourseDetails();
this.userDetails = getLocalUserInfo();
console.log('123123',this.userDetails)
},
methods: {
goBack() {
uni.navigateBack({
delta: 1
});
},
getCourseDetails(){
request({
url: '/app-api/dl-drive-school-course-small/get',
method: 'GET',
params: {
id: this.courseId,
tenantId: this.tenantId,
},
tenantIdFlag: false
}).then(res => {
this.courseDetails = res.data;
console.log('驾校课程列表', this.schoolAllClassList);
})
},
zxkf() {
uni.makePhoneCall({
phoneNumber: '18888888888'
});
},
goRegisterNow(){
uni.navigateTo({
url: `/newPages/register/index?courseId=${this.courseDetails.id}&userId=${this.userDetails.id}&tenantId=${this.tenantId}`,
// url: '/pages/index/bmPage'
});
},
}
};
</script>
<style lang='scss'>

View File

@ -101,8 +101,8 @@
background-color: rgba(255, 255, 255, 1);
border-radius: 8px;
width: 686rpx;
height: 1504rpx;
margin: 20rpx 0 76rpx 32rpx;
height: 200rpx;
margin: 20rpx 0 20rpx 32rpx;
.image-text_1 {
position: relative;
width: 478rpx;

View File

@ -1,243 +1,118 @@
<template>
<view class="page flex-col">
<view class="group_1 flex-row">
<text class="text_1">9:41</text>
<view class="section_1 flex-col"></view>
<view class="section_2 flex-col"></view>
<image
class="image_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNGa0ae945f09e82ebeb726c4adbf82b9fd.png"
/>
</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 class="box_1 flex-col">
<view class="image-wrapper_1 flex-row">
<image
class="thumbnail_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNGdc9929c2b5fd86c1689cc5990a0b4397.png"
/>
</view>
<view class="group_3 flex-row justify-between">
<view class="group_4 flex-col"></view>
<view class="group_5 flex-col"></view>
</view>
</view>
</view>
<view class="group_6 flex-col">
<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/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png"
:src="imagesUrl + '/' + item.photo"
/>
<view class="text-group_1 flex-col justify-between">
<text class="text_3">AI智能+人工教学</text>
<text class="text_3">{{ item.tittle }}</text>
<view class="text-wrapper_1 flex-row justify-between">
<text class="text_4">3000.00</text>
<text class="text_5">3000.00</text>
<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">C2</text>
<text class="text_6">{{ item.type }}</text>
</view>
<view class="text-wrapper_3 flex-col">
<text class="text_7">自动挡</text>
</view>
</view>
<view class="box_2 flex-row justify-between">
<image
class="image_3"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNG8011b35e0a146200944eed2a34bf4a6e.png"
/>
<view class="box_3 flex-col justify-between">
<text class="text_8">一对一人工班</text>
<view class="section_3 flex-row justify-between">
<view class="text-wrapper_4 flex-col">
<text class="text_9">自动挡</text>
</view>
<view class="text-wrapper_5 flex-col">
<text class="text_10">C2</text>
</view>
</view>
<view class="text-wrapper_6 flex-row justify-between">
<text class="text_11">3000.00</text>
<text class="text_12">3000.00</text>
</view>
</view>
</view>
<view class="box_4 flex-row justify-between">
<image
class="image_4"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNG55be18372a730c3c6b7f6dae5ed42efc.png"
/>
<view class="group_7 flex-col justify-between">
<text class="text_13">轻型牵引挂车</text>
<view class="group_8 flex-row justify-between">
<view class="text-wrapper_7 flex-col">
<text class="text_14">手动挡</text>
</view>
<view class="text-wrapper_8 flex-col">
<text class="text_15">B1</text>
</view>
</view>
<view class="text-wrapper_9 flex-row justify-between">
<text class="text_16">3000.00</text>
<text class="text_17">3000.00</text>
</view>
</view>
</view>
<view class="image-text_2 flex-row">
<image
class="image_5"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png"
/>
<view class="text-group_2 flex-col justify-between">
<text class="text_18">AI智能+人工教学</text>
<view class="text-wrapper_10 flex-row justify-between">
<text class="text_19">3000.00</text>
<text class="text_20">3000.00</text>
</view>
</view>
<view class="text-wrapper_11 flex-col">
<text class="text_21">C2</text>
</view>
<view class="text-wrapper_12 flex-col">
<text class="text_22">自动挡</text>
</view>
</view>
<view class="box_5 flex-row justify-between">
<image
class="image_6"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNG8011b35e0a146200944eed2a34bf4a6e.png"
/>
<view class="box_6 flex-col justify-between">
<text class="text_23">一对一人工班</text>
<view class="box_7 flex-row justify-between">
<view class="text-wrapper_13 flex-col">
<text class="text_24">自动挡</text>
</view>
<view class="text-wrapper_14 flex-col">
<text class="text_25">C2</text>
</view>
</view>
<view class="text-wrapper_15 flex-row justify-between">
<text class="text_26">3000.00</text>
<text class="text_27">3000.00</text>
</view>
</view>
</view>
<view class="box_8 flex-row justify-between">
<image
class="image_7"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNG55be18372a730c3c6b7f6dae5ed42efc.png"
/>
<view class="box_9 flex-col justify-between">
<text class="text_28">轻型牵引挂车</text>
<view class="section_4 flex-row justify-between">
<view class="text-wrapper_16 flex-col">
<text class="text_29">手动挡</text>
</view>
<view class="text-wrapper_17 flex-col">
<text class="text_30">B1</text>
</view>
</view>
<view class="text-wrapper_18 flex-row justify-between">
<text class="text_31">3000.00</text>
<text class="text_32">3000.00</text>
</view>
</view>
</view>
<view class="image-text_3 flex-row">
<image
class="image_8"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png"
/>
<view class="text-group_3 flex-col justify-between">
<text class="text_33">AI智能+人工教学</text>
<view class="text-wrapper_19 flex-row justify-between">
<text class="text_34">3000.00</text>
<text class="text_35">3000.00</text>
</view>
</view>
<view class="text-wrapper_20 flex-col">
<text class="text_36">C2</text>
</view>
<view class="text-wrapper_21 flex-col">
<text class="text_37">自动挡</text>
</view>
</view>
<view class="box_10 flex-row justify-between">
<image
class="image_9"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNG8011b35e0a146200944eed2a34bf4a6e.png"
/>
<view class="section_5 flex-col justify-between">
<text class="text_38">一对一人工班</text>
<view class="block_1 flex-row justify-between">
<view class="text-wrapper_22 flex-col">
<text class="text_39">自动挡</text>
</view>
<view class="text-wrapper_23 flex-col">
<text class="text_40">C2</text>
</view>
</view>
<view class="text-wrapper_24 flex-row justify-between">
<text class="text_41">3000.00</text>
<text class="text_42">3000.00</text>
</view>
</view>
</view>
<view class="box_11 flex-row justify-between">
<image
class="image_10"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNG55be18372a730c3c6b7f6dae5ed42efc.png"
/>
<view class="box_12 flex-col justify-between">
<text class="text_43">轻型牵引挂车</text>
<view class="group_9 flex-row justify-between">
<view class="text-wrapper_25 flex-col">
<text class="text_44">手动挡</text>
</view>
<view class="text-wrapper_26 flex-col">
<text class="text_45">B1</text>
</view>
</view>
<view class="text-wrapper_27 flex-row justify-between">
<text class="text_46">3000.00</text>
<text class="text_47">3000.00</text>
</view>
<text class="text_7">{{ item.name }}</text>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import request from "@/utils/request";
import config from "@/config.js"
export default {
data() {
return {
constants: {}
imagesUrl: config.imagesUrl,
tenantId: undefined,
schoolAllClassList: [],
scrollHeight: 0,
};
},
methods: {}
onLoad(options) {
if (options.tenantId) {
this.tenantId = options.tenantId
console.log("首页传入数据", options)
console.log("驾校租户id", this.tenantId)
this.getSchoolAllClass()
}
},
onReady() {
//
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);
})
},
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>
<style lang='scss'>
@import '../common/common.scss';
@import './assets/style/index.rpx.scss';
.scroll-view {
flex: 1;
overflow-y: auto;
}
</style>

View File

@ -175,7 +175,7 @@
height: 48rpx;
}
.text-group_1 {
width: 84rpx;
/* width: 84rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
@ -185,7 +185,19 @@
text-align: left;
white-space: nowrap;
line-height: 28rpx;
margin-top: 10rpx;
margin-top: 10rpx; */
width: 84rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 28rpx;
font-family: PingFang SC-Regular;
font-weight: NaN;
text-align: center;
white-space: nowrap;
line-height: 28rpx;
margin-top: 0;
justify-content: center;
}
}
.section_2 {

View File

@ -305,8 +305,12 @@
margin: 30rpx 0 30rpx 64rpx;
.image-text_3 {
width: 72rpx;
height: 116rpx;
margin-right: 90rpx;
height: 116rpx;
margin-right: 90rpx;
display: flex; /* 使用 flex 布局 */
flex-direction: column; /* 垂直排列子元素 */
align-items: center; /* 水平居中 */
justify-content: center; /* 垂直居中 */
.label_3 {
width: 72rpx;
height: 72rpx;
@ -323,6 +327,7 @@
white-space: nowrap;
line-height: 24rpx;
margin-top: 20rpx;
}
}
}

View File

@ -1,29 +1,8 @@
<template>
<view class="page flex-col">
<view class="box_1 flex-col justify-end">
<view class="box_2 flex-row">
<text class="text_1">9:41</text>
<view class="section_1 flex-col"></view>
<view class="section_2 flex-col"></view>
<image
class="image_1"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGa0ae945f09e82ebeb726c4adbf82b9fd.png"
/>
</view>
<view class="box_3 flex-col">
<view class="image-wrapper_1 flex-row">
<image
class="thumbnail_1"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGdc9929c2b5fd86c1689cc5990a0b4397.png"
/>
</view>
<view class="box_4 flex-row justify-between">
<view class="box_5 flex-col"></view>
<view class="box_6 flex-col"></view>
</view>
</view>
<view class="box_7 flex-row justify-between">
<view class="image-text_1 flex-row justify-between">
<view class="group_1 flex-col">
@ -31,13 +10,15 @@
<image
class="image_2"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG185e54e3ffd47170ac4e6e5108c9a54f.png"
:src="imageUrl + '/' + selfInfo.avatar || '/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG185e54e3ffd47170ac4e6e5108c9a54f.png'"
/>
</view>
</view>
<view class="text-group_1 flex-col justify-between">
<text class="text_2">登录/注册</text>
<text class="text_3">登录将开启全部服务</text>
<view v-if="selfInfo.nickname" class="text_3">{{ selfInfo.nickname}}</view>
<view v-if="selfInfo.username" class="text_3">{{selfInfo.username}}</view>
<view v-else @click="toLogin()" class="text_2">登录/注册</view>
<text v-if="!selfInfo.username"class="text_3">登录将开启全部服务</text>
</view>
</view>
<view class="image-text_2 flex-col justify-between">
@ -77,15 +58,16 @@
<view class="list_1 flex-row">
<view
class="image-text_3 flex-col justify-between"
v-for="(item, index) in loopData0"
v-for="(item, index) in loopData"
:key="index"
@click="toOrderPage(item.type)"
>
<image
class="label_3"
referrerpolicy="no-referrer"
:src="item.lanhuimage0"
:src="item.url"
/>
<text class="text-group_4" v-html="item.lanhutext0"></text>
<text class="text-group_4" v-text="item.text"></text>
</view>
</view>
</view>
@ -135,56 +117,99 @@
/>
</view>
</view>
<view class="box_10 flex-row justify-around">
<view class="image-text_4 flex-col justify-between">
<image
class="label_4"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG82212e80ecdefd484ea3d1f3bdd664b7.png"
/>
<text class="text-group_5">首页</text>
</view>
<view class="image-text_5 flex-col justify-between">
<image
class="label_5"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGb503e40eb80b2c7197a8be0e5149844c.png"
/>
<text class="text-group_6">我的</text>
</view>
</view>
<tabbar :msg='msg'></tabbar>
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
import tabbar from '../../components/tabbar/tabbar.vue'
import request from '@/utils/request.js'
import {
getLocalUserInfo,
getToken
} from '@/utils/auth'
export default {
data() {
return {
loopData0: [
msg: "3",
selfInfo: {},
loopData: [
{
lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG757a781e4fd248437b6eb4a6d92191ae.png',
lanhutext0: '已付款'
url: '/static/myImgs/alreadyPaid.png',
text: '已付款',
type: '2',
},
{
lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG281070034b1d3055b7b6e61e883a1312.png',
lanhutext0: '已面签'
url: '/static/myImgs/alreadyInterviewed.png',
text: '已面签',
type: '3',
},
{
lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNGe538524dc2b344e74de297d27521c48a.png',
lanhutext0: '已报名'
url: '/static/myImgs/registered.png',
text: '已报名',
type: '1',
},
{
lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNG4314db51cf3d042aea4ef65e73b73f7d.png',
lanhutext0: '全部订单'
url: '/static/myImgs/allOrder.png',
text: '全部订单',
type: '1',
}
],
constants: {}
constants: {},
imageUrl: this.$imagesUrl,
};
},
methods: {}
onLoad() {
this.selfInfo = getLocalUserInfo()
console.log("用户信息", this.selfInfo)
},
onShow() {
if (getToken()) {
// this.findSelfInfo()
}
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
components: {
headers,
tabbar
},
methods: {
goback() {
uni.navigateBack()
},
toLogin() {
uni.navigateTo({
url: "/pages/login/login"
})
},
/*async findSelfInfo() {
let res = await request({
url: `/app-api/small/driving/findSelfInfo`,
method: 'get',
})
console.log(res, 138);
this.selfInfo = res
},*/
toOrderPage(orderType) {
uni.navigateTo({
url: `/newPages/orderList/index?orderType=${orderType}&userId=${this.selfInfo.userId}`
})
},
}
};
</script>
<style lang='scss'>

View File

@ -1,5 +1,5 @@
<template>
<view class="school-info flex-row">
<view class="school-info flex-row" @click="handleClick">
<!-- 驾校图片 -->
<image
class="school-image"
@ -38,7 +38,12 @@ export default {
type: Object,
required: true
}
}
},
methods: {
handleClick() {
this.$emit('click', this.schoolInfo);
}
}
};
</script>
@ -49,8 +54,8 @@ export default {
align-items: center;
padding: 15rpx;
border-bottom: 1rpx solid #e5e5e5;
margin-bottom: 25rpx;
padding-bottom: 35rpx;
margin-bottom: 15rpx;
padding-bottom: 15rpx;
}
.school-image {
@ -65,7 +70,7 @@ export default {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 130rpx;
flex: 1;
}
.school-name {
@ -73,6 +78,11 @@ export default {
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 480rpx; /* 适当调整 */
line-height: 1.2;
}
.status-time {

View File

@ -6,9 +6,10 @@
<view class="section_2 flex-col">
<view class="list_1 flex-row">
<view
class="image-text_1 flex-col align-items-center"
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"
@ -147,13 +148,14 @@ export default {
methods: {
getList() {
request({
url: '/userClient/base/company/page',
url: '/userClient/base/companySmallProgram/pageNoTenantId',
method: 'GET',
params: {
pageNo: this.pageNo,
pageSize: this.pageSize,
serviceCodes: 'jiaxiao'
}
},
tenantIdFlag : false
}).then(res => {
res.data.records.forEach(item => {
item.features = ['有接送', '规模大']
@ -206,9 +208,40 @@ export default {
},
goSchoolDetail(data) {
uni.navigateTo({
url: '/newPages/schoolDetail/index?id' + data.id,
url: `/newPages/schoolDetail/index?id=${data.id}&tenantId=${data.tenantId}`,
// url: '/newPages/schoolDetail/index',
});
}
},
handleItemClick(item) {
// item.text
switch (item.text) {
case '学车报名':
uni.navigateTo({
// url: '/pages/enroll/index'
});
break;
case '预约训练':
uni.navigateTo({
url: '/newPages/appointment/index'
});
break;
case '考试结果录入':
uni.navigateTo({
url: '/newPages/examinationList/index'
});
break;
case '评价':
uni.navigateTo({
url: '/newPages/evaluate/index'
});
break;
default:
console.warn('未知的点击项:', item.text);
break;
}
}
}
};
</script>
@ -231,7 +264,7 @@ export default {
// scroll-view
.school-scroll-view {
height: 100%;
height: 500rpx; //
overflow-y: auto;
margin-left: 22rpx;
}
@ -241,7 +274,6 @@ export default {
display: flex;
flex-direction: column;
row-gap: 20rpx;
height: calc(100% - 65px);
}
.top_{
//padding-top: 200rpx;

View File

@ -306,17 +306,52 @@
margin-left: 104rpx;
}
}
.box_8 {
width: 32rpx;
height: 6rpx;
margin: 20rpx 0 0 78rpx;
.group_3 {
.group_8 {
background-color: rgba(44, 120, 245, 1);
border-radius: 999px;
width: 32rpx;
height: 6rpx;
}
}
.box_9 {
width: 32rpx;
height: 6rpx;
margin: 20rpx 0 0 270rpx;
.group_9 {
background-color: rgba(44, 120, 245, 1);
border-radius: 999px;
width: 32rpx;
height: 6rpx;
}
}
.box_10 {
width: 32rpx;
height: 6rpx;
margin: 20rpx 0 0 455rpx;
.group_10 {
background-color: rgba(44, 120, 245, 1);
border-radius: 999px;
width: 32rpx;
height: 6rpx;
}
}
.box_11 {
width: 32rpx;
height: 6rpx;
margin: 20rpx 0 0 645rpx;
.group_11 {
background-color: rgba(44, 120, 245, 1);
border-radius: 999px;
width: 32rpx;
height: 6rpx;
}
}
}
}
}

View File

@ -1,18 +1,7 @@
<template>
<view class="page flex-col">
<view class="block_1 flex-row">
<image
class="image_1"
referrerpolicy="no-referrer"
src="/static/lanhu_quanbudingdan/FigmaDDSSlicePNG5472ef46deab947fe098747eb1b07bd2.png"
/>
<view class="box_1 flex-col"></view>
<view class="box_2 flex-col"></view>
<image
class="image_2"
referrerpolicy="no-referrer"
src="/static/lanhu_quanbudingdan/FigmaDDSSlicePNGb239db97c719ec7467ee7c9615d3d24a.png"
/>
</view>
<view class="block_2 flex-col">
<view class="group_1 flex-row">
@ -20,26 +9,15 @@
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_quanbudingdan/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
@click="handleBack()"
/>
<text class="text_1">全部订单</text>
<view class="section_1 flex-col">
<view class="image-wrapper_1 flex-row">
<image
class="thumbnail_1"
referrerpolicy="no-referrer"
src="/static/lanhu_quanbudingdan/FigmaDDSSlicePNGdc9929c2b5fd86c1689cc5990a0b4397.png"
/>
</view>
<view class="box_3 flex-row justify-between">
<view class="box_4 flex-col"></view>
<view class="box_5 flex-col"></view>
</view>
</view>
</view>
<view class="list_1 flex-col">
<view
class="list-items_1 flex-col"
v-for="(item, index) in loopData0"
v-for="(item, index) in orderList"
:key="index"
>
<view class="box_6 flex-row justify-between">
@ -81,19 +59,44 @@
</view>
<view class="group_2 flex-col justify-end">
<view class="text-wrapper_5 flex-row">
<text class="text_9">全部订单</text>
<text class="text_10">已付款</text>
<text class="text_11">已面签</text>
<text class="text_12">已报名</text>
<text
class="text_9"
:class="{ active: orderType === 1 }"
@click="changeOrderType()"
>
全部订单
</text>
<text
class="text_10"
:class="{ active: orderType === 2 }"
@click="changeOrderType(2)"
>
已付款
</text>
<text
class="text_11"
:class="{ active: orderType === 3 }"
@click="changeOrderType(4)"
>
已面签
</text>
<text
class="text_12"
:style="{ color: orderType === 4 ? 'rgba(44, 120, 245, 1)' : '' }"
@click="changeOrderType(2)"
>
已报名
</text>
</view>
<view class="box_8 flex-row">
<view class="group_3 flex-col"></view>
<view class="group_8 flex-col"></view>
</view>
</view>
</view>
</view>
</template>
<script>
import request from '@/utils/request.js'
export default {
data() {
return {
@ -103,8 +106,8 @@ export default {
lanhuBg2: 'rgba(255,244,228,1.000000)',
lanhutext1: '已付款',
lanhufontColor1: 'rgba(237,162,58,1.000000)',
lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png',
/* lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png', */
lanhutext2: 'AI智能+人工教学',
lanhutext3: '¥3000.00',
lanhutext4: '¥3000.00',
@ -116,8 +119,8 @@ export default {
lanhuBg2: 'rgba(218,255,239,1.000000)',
lanhutext1: '已面签',
lanhufontColor1: 'rgba(17,186,113,1.000000)',
lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png',
/* lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png', */
lanhutext2: 'AI智能+人工教学',
lanhutext3: '¥3000.00',
lanhutext4: '¥3000.00',
@ -129,8 +132,8 @@ export default {
lanhuBg2: 'rgba(227,238,255,1.000000)',
lanhutext1: '已报名',
lanhufontColor1: 'rgba(44,120,245,1.000000)',
lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png',
/* lanhuimage0:
'https://lanhu-oss-2537-2.lanhuapp.com/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png', */
lanhutext2: 'AI智能+人工教学',
lanhutext3: '¥3000.00',
lanhutext4: '¥3000.00',
@ -138,10 +141,55 @@ export default {
lanhutext6: '自动挡'
}
],
orderType: '1', //
underlinePosition: 0, // 线 X
userId:null,
orderList:[],
constants: {}
};
},
methods: {}
onLoad(options){
this.orderType = options.orderType; // orderType
this.userId = options.userId;
// this.getUserOrderDetails(this.orderType); //
console.log(options)
},
mounted() {
this.updateUnderlinePosition(this.orderType);
},
methods: {
handleBack() {
uni.navigateBack({
delta: 1
});
},
getUserOrderDetails(paymentStatus) {
console.log(paymentStatus)
request({
url: '/app-api/small/drive/school-course-order/page',
method: 'GET',
params: {
userId: '1',
paymentStatus:paymentStatus
},
tenantIdFlag : false
}).then(res => {
this.orderList = res.data;
});
},
changeOrderType(type) {
this.orderType = type;
console.log(type)
this.getUserOrderDetails(type); // Tab
this.updateUnderlinePosition(type);
},
updateUnderlinePosition(type) {
const index = parseInt(type) - 1; // 0
const tabWidth = uni.getSystemInfoSync().windowWidth / 4; // 4
this.underlinePosition = index * tabWidth;
},
}
};
</script>
<style lang='scss'>

907
newPages/register/index.vue Normal file
View File

@ -0,0 +1,907 @@
<template>
<view class="content">
<view class="container">
<!-- #ifdef MP-WEIXIN -->
<!-- #ifdef MP-WEIXIN -->
<headers :titles="titles">
<uni-icons @click="goback()" type="left" color="#000000" size="22px"></uni-icons>
</headers>
<!-- #endif -->
<!-- #endif -->
<u-loadmore :status="status" v-if="show == true" />
</view>
<view class="bm-page">
<view class="bm-page-top">
<image class="top-left-img" :src="baseUrl +'/'+ rightInfoList.photo" mode=""></image>
<view class="bm-page-right">
<view class="bm-page-right-1">{{ rightInfoList.name}}</view>
<view class="bm-page-right-2">
<view class="bm-page-right-zd">{{rightInfoList.tittle}}</view>
<view class="bm-page-right-c2">{{rightInfoList.type}}</view>
</view>
<view class="bm-page-right-3"> <text class="bm-page-right-price">{{rightInfoList.price}}</text>
<text class="bm-page-right-jprice">{{rightInfoList.price}}</text>
</view>
</view>
</view>
<view class="bm-page-info" v-if="hideTeacher==0">
<view style="width: 100%; display: flex;align-items: center;justify-content: space-between; ">
<view class="bm-page-info-title">
选择教练
</view>
<view class="d-s" @click="showjl = true">
<view class="" v-if="!jlName">请选择</view>
<view class="" v-else>{{jlName}}</view>
<u-icon name="arrow-right" size="16"></u-icon>
</view>
</view>
</view>
<view class="bm-page-info">
<view style="width: 100%; display: flex;align-items: center;justify-content: space-between; ">
<view class="bm-page-info-title">
填写身份信息
</view>
<view class="anniu" @click="popupShow = true">
点击上传身份证
</view>
</view>
<view class="info-name">
<view class="info-name-left">姓名</view>
<view class="info-name-right">
<input class="info-name-input" v-model="name" type="text" placeholder="请填写真实姓名">
</view>
</view>
<view class="info-name">
<view class="info-name-left">性别</view>
<view class="d-s" style="width: 70%;">
<view class="size-lv" :class="{'clv' : sex == index }" v-for=" (item,index) in sexlist"
:key="index" @click="getsexindex(index)">{{item}}</view>
</view>
</view>
<view class="info-name">
<view class="info-name-left">年龄</view>
<view class="info-name-right">
<input class="info-name-input" v-model="age" type="number" placeholder="请填写真实年龄">
</view>
</view>
<view class="info-name">
<view class="info-name-left">手机号</view>
<view class="info-name-right">
<input class="info-name-input" v-model="phone" type="text" placeholder="请输入正确手机号">
</view>
</view>
<view class="info-name">
<view class="info-name-left">身份证号</view>
<view class="info-name-right">
<input class="info-name-input" v-model="identity" type="text" placeholder="请输入身份证号">
</view>
</view>
<!-- <view style="padding: 0;" class="info-name">
<view class="info-name-left">选择教练</view>
<view class="info-name-right">
<view class="bm-page-button">
<button @click="goBookingJl()" class="bm-page-button-main">预约教师</button>
</view>
</view>
</view> -->
</view>
<view class="bm-page-dj">
<view class="bm-page-dj-title" @click="show = true">
<view class="d-s">
<view>{{dname}}</view>
<text class="bm-page-dj-title-price">
{{ currentPrice }} <!-- 动态显示当前价格 -->
</text>
</view>
<u-icon name="arrow-right" color="#999" size="18"></u-icon>
</view>
<view @click="changeStartPay(2)" class="dj-list">
<view class="dj-list-left">
<image class="dj-list-left-img" src="../../static/imgs/yfk.png" mode=""></image>
<view class="dj-list-left-name">线下支付</view>
</view>
<view class="dj-list-right">
<view v-if="startPay === 1" class="onel"></view>
<view v-else class="twol">
<u-icon name="checkmark" color="#FFF" size="16"></u-icon>
</view>
</view>
</view>
<view @click="changeStartPay(1)" class="dj-list">
<view class="dj-list-left">
<image class="dj-list-left-img" src="../../static/imgs/qbdd.png" mode=""></image>
<view class="dj-list-left-name">微信</view>
</view>
<view class="dj-list-right">
<view v-if="startPay === 2" class="onel"></view>
<view v-else class="twol">
<u-icon name="checkmark" color="#FFF" size="16"></u-icon>
</view>
</view>
</view>
</view>
<view class="bm-page-button">
<button @click="applicationClick" class="bm-page-button-main">点击报名</button>
</view>
<u-picker :show="show" :columns="columns" keyName="label" @confirm="confirm" @cancel="cancel"></u-picker>
<u-picker :show="showjl" :columns="columnjl" keyName="label" @confirm="jlconfirm"
@cancel="jlcancel"></u-picker>
<u-popup :show="popupShow" :round="10" mode="center" @close="close" @open="open">
<view class="popup-box">
<view class="title_s">请上传身份证人像面</view>
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="1" width="280" height="150">
<image src="https://cdn.uviewui.com/uview/demo/upload/positive.png" mode="widthFix"
style="width: 280px;height: 150px;"></image>
</u-upload>
</view>
</u-popup>
</view>
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
import request from '@/utils/request.js'
import tabbar from '../../components/tabbar/tabbar.vue'
import upload from '@/utils/upload.js'
import Decimal from "@/unpackage/dist/dev/mp-weixin/common/vendor";
export default {
data() {
return {
titles: "报名",
id: null,
List: [],
show: false,
showjl: false,
popupShow: false,
sfzimg: null,
fileList1: [],
baseUrl: this.$imagesUrl,
status: 'loading',
sexlist: [
"男",
"女"
],
name: null,
phone: null,
sex: 0,
identity: null,
age: null,
startPay: 2,
courseId: null,
rightInfoList: [],
columnjl: [],
jxId: null,
orderId: null,
orderNo: null,
dname: "全款", //
currentPrice: 0,
selectedPayType: 2, // (2)
settings: { //
width: '750', //
height: '500', //
lineWidth: 4, //线
textColor: '#000' //
},
jlName: null,
jlId: null,
hideTeacher: 0,
Address: '',
djshow: false,
userId: null,
tenantId: null,
columns: [
[{
label: '全款',
//
id: 2
// ...
}, {
label: '定金',
id: 1
}]
],
}
},
onLoad: function(option) {
uni.showToast({
title: '请完善个人信息',
icon: 'none'
})
if (uni.getStorageSync('jlId')) {
this.hideTeacher = 1
}
this.jlId = uni.getStorageSync('jlId');
this.courseId = option.courseId,
this.userId = option.userId,
this.tenantId = option.tenantId
console.log("驾校id", this.jxId, "课程id", this.courseId)
console.log("userId", this.userId, "tenantId", this.tenantId)
console.log('当前存储的所有键:', uni.getStorageInfoSync().keys)
console.log('token值:', uni.getStorageSync('App-Token'))
},
onShow() {
this.getListAll()
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
this.getRightInfoList()
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
//
onShareAppMessage(res) {
return {
title: this.titles,
path: '/pages/index/index',
}
},
//
onShareTimeline(res) {
return {
title: this.titles,
path: '/pages/index/index',
}
},
components: {
headers,
tabbar
},
methods: {
updateDisplayPrice() {
//
this.currentPrice = this.selectedPayType === 1
? this.rightInfoList.reserveMoney
: this.rightInfoList.price;
},
async getListAll() {
this.columnjl = []
let res = await request({
url: '/app-api/dl-drive-school-coach-small/page',
method: 'get',
params: {
tenantId: this.tenantId,
},
tenantIdFlag: false
})
console.log(res);
this.columnjl = [
res.data.records.map(coach => ({
label: coach.name,
value: coach
}))
];
},
getsexindex(index) {
this.sex = index
},
open() {
// console.log('open');
},
close() {
this.popupShow = false
// console.log('close');
},
jlconfirm(e) {
console.log("选中教练:", e.value[0]);
this.jlName = e.value[0].label; //
this.jlId = e.value[0].value.id; // ID
this.showjl = false;
},
jlcancel() {
this.showjl = false
},
confirm(e) {
const selected = e.value[0];
this.dname = selected.label;
this.selectedPayType = selected.id;
this.updateDisplayPrice(); //
this.show = false;
},
cancel() {
this.show = false
},
goback() {
uni.navigateBack()
},
changeStartPay(id) {
this.startPay = id
},
goBookingJl() {
uni.navigateTo({
url: '/pages/index/bookingJl',
})
},
//
isValidPhoneNumber(phoneNumber) {
const regex = /^1[3-9]\d{9}$/;
if (regex.test(phoneNumber)) {
return true;
} else {
return false;
}
},
//
isValidIDNumber(idNumber) {
const regex = /^\d{15}|\d{17}(?:\d|X)$/;
if (regex.test(idNumber)) {
return true;
} else {
return false;
}
},
applicationClick() {
//
if (!this.checkLogin()) {
uni.navigateTo({ url: '/pages/login/login' });
return;
}
//
/*if(this.sfzimg === null ){
uni.showToast({
title: '请上传身份证照片',
icon: 'error',
duration: 2000
})
return
}*/
//
if (this.phone === null || this.name === null) {
uni.showToast({
title: '请输入完整信息',
icon: 'error',
duration: 2000
})
return
}
//
let isPhone = this.isValidPhoneNumber(this.phone)
if (isPhone === false) {
uni.showToast({
title: '输入的手机号不规范',
icon: 'error',
duration: 2000
})
return
}
//
let isIdentity = this.isValidIDNumber(this.identity)
if (isIdentity === false) {
uni.showToast({
title: '输入的身份证不规范',
icon: 'error',
duration: 2000
})
return
}
if (this.startPay === 1) {
//
if(this.selectedPayType === 1){
//
let payType = 1
let reserveMoney = this.rightInfoList.reserveMoney
/* let restMoney = new Decimal(this.rightInfoList.price)
.minus(new Decimal(this.rightInfoList.reserveMoney))*/
let restMoney = this.rightInfoList.price - this.rightInfoList.reserveMoney
console.log("定金")
console.log("reserveMoney", reserveMoney)
console.log("restMoney", restMoney)
this.wxPayClick(this.name, this.phone, this.identity, this.courseId, payType, reserveMoney, restMoney)
}else if (this.selectedPayType === 2) {
//
let payType = 2
let reserveMoney = this.rightInfoList.price
let restMoney = 0
console.log('全款')
console.log("reserveMoney", reserveMoney)
console.log("restMoney", restMoney)
this.wxPayClick(this.name, this.phone, this.identity, this.courseId, payType, reserveMoney, restMoney)
}
} else {
// 线
this.xxiaPayClick(this.name, this.phone, this.identity, this.startPay, this.courseId, this.jxId)
}
},
async wxPayClick(name, phone, identity, courseId, payType, reserveMoney, restMoney) {
console.log("微信支付", )
let res = await request({
url: '/small/jxInfo/onLinePay',
data: {
userName: name,
userPhone: phone,
userSex: this.sex,
tenantId: this.tenantId,
userNo: identity,
courseId: courseId,
coachUserName: this.jlName,
coachUserId: this.jlId,
courseType: this.rightInfoList.type,
courseName: this.rightInfoList.name,
userId: this.userId,
reserveMoney: this.rightInfoList.reserveMoney,
payType: payType,
restMoney: restMoney,
},
method: 'post',
})
this.orderId = res.orderId
this.orderNo = res.orderNo
console.log("收到为单位1 =====>", this.orderId)
console.log("收到为单位2 =====>", this.orderNo)
console.log("收到为单位3 =====>", res)
let item = await request({
url: '/small/jxInfo/prepayment?type=jsapi' + '&orderNo=' + this.orderNo + '&orderId=' + this.orderId + "&payType=" + payType,
method: 'get'
})
console.log("获取到的数据为 =========>", item)
wx.requestPayment({
timeStamp: item.timeStamp, // 19701100:00:00
nonceStr: item.nonceStr, // 32
package: item.package, // prepay_id prepay_id=*
signType: item.signType, // MD5RSA
paySign: item.paySign, //
success: function(res) {
console.log('成功', res);
if (res.errMsg = 'requestPayment:ok') {
uni.showToast({
title: '支付成功'
})
const contractData = {
adress: this.Address,
name: this.name,
tenantId: this.tenantId,
type: this.rightInfoList.type,
money: reserveMoney,
indent: this.identity,
phone: this.phone,
time: this.getCurrentDateTime()
};
uni.navigateTo({
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
})
/*uni.navigateTo({
url: '/pages/index/contract?Address=' +
this.Address + '&name=' + this.name
})*/
}
// res.errMsg = 'requestPayment:ok'
},
fail: function(res) {
console.log('执行失败1', res);
that.cancelpay()
}
})
uni.showToast({
title: '成功提示',
icon: 'success',
duration: 2000
})
},
async xxiaPayClick(name, phone, identity, startPay, courseId) {
let res = await request({
url: '/small/jxInfo/offLinePay',
data: {
userName: name,
userPhone: phone,
userSex: this.sex,
tenantId: this.tenantId,
userNo: this.identity,
courseId: courseId,
coachUserName: this.jlName,
coachUserId: this.jlId,
courseType: this.rightInfoList.type,
courseName: this.rightInfoList.name,
userId: this.userId,
},
method: 'post',
})
if (res.code == 0) {
const contractData = {
adress: this.Address,
name: this.name,
tenantId: this.tenantId,
type: this.rightInfoList.type,
money: this.rightInfoList.price,
indent: this.identity,
phone: this.phone,
time: this.getCurrentDateTime()
};
uni.navigateTo({
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
})
/*uni.navigateTo({
url: '/pages/index/contract?Address=' +
this.Address + '&name=' + this.name + '&tenantId=' + this.tenantId
})*/
}
},
async getRightInfoList() {
let res = await request({
url: '/app-api/dl-drive-school-course-small/get?id=' + this.courseId,
method: 'get',
})
this.rightInfoList = res.data,
this.currentPrice = this.rightInfoList.price;
console.log("报名班类型", this.rightInfoList)
},
async xxgetRightInfoList() {
let res = await request({
url: '/drivingSchool/system/driveSchoolCourse/list?id=' + this.courseId + '&payType=' +
this.id,
method: 'get',
})
this.rightInfoList = res.data.records[0],
console.log("报名班类型", this.rightInfoList)
},
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
if (event.name == '1') {
this.photoUrl.splice(event.index, 1)
}
if (event.name == '2') {
this.videoUr = null
}
},
//
async afterRead(event) {
// multiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
uploadFilePromise(e) {
console.log(e);
upload({
url: '/app-api/small-upload/common/upload',
filePath: e,
}).then((res) => {
console.log('sfz', res)
this.sfzimg = this.baseUrl + '/' + res.data.url
console.log(this.sfzimg);
if (this.sfzimg) {
this.idOcr(this.sfzimg)
}
})
},
async idOcr(url) {
console.log('url', url)
console.log('sfz', this.sfzimg)
let that = this
let res = await request({
url: '/app-api/small-upload/idOcr',
method: 'post',
params: {
imagePath: url
}
})
console.log('321',res)
that.name = res.data.name
that.phone = res.data.phone
that.sex = res.data.sex
that.identity = res.data.idCard
that.age = res.data.age
that.Address = res.data.Address
console.log('654',res);
that.popupShow = false
},
checkLogin() {
const token = uni.getStorageSync('App-Token');
console.log(token)
if (!token) {
uni.showToast({ title: '请先登录', icon: 'none' });
return false;
}
return true;
},
getCurrentDateTime() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); // 0
const day = String(now.getDate()).padStart(2, '0');
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
}
}
</script>
<style scoped lang="scss">
.bm-page {
padding: 30rpx;
.bm-page-button {
margin-top: 30rpx;
.bm-page-button-main {
border-radius: 50rpx;
background-color: #4aa76f;
color: #fff;
}
}
.bm-page-dj {
margin-top: 30rpx;
padding: 30rpx;
background-color: #fff;
border-radius: 20rpx;
.dj-list {
padding: 20rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
.dj-list-left {
display: flex;
align-items: center;
.dj-list-left-name {
margin-left: 20rpx;
}
.dj-list-left-img {
height: 50rpx;
width: 50rpx;
}
}
}
.bm-page-dj-title {
border-bottom: 1rpx solid #eee;
padding-bottom: 20rpx;
margin-bottom: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
.bm-page-dj-title-price {
color: red;
}
}
}
.bm-page-info {
margin-top: 30rpx;
padding: 30rpx;
background-color: #fff;
border-radius: 20rpx;
.info-name {
width: 100%;
padding: 40rpx 0;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
width: 100%;
align-items: center;
.info-name-right {
display: flex;
align-items: center;
margin-left: 30rpx;
flex: 3;
}
.info-name-left {
flex: 1;
}
}
.bm-page-info-title {
font-size: 34rpx;
font-weight: 600;
}
}
.bm-page-top {
display: flex;
padding: 30rpx;
background-color: #fff;
border-radius: 20rpx;
.bm-page-right {
margin-left: 30rpx;
display: flex;
justify-content: space-between;
flex-direction: column;
.bm-page-right-3 {
.bm-page-right-price {
color: red;
}
.bm-page-right-jprice {
margin-left: 20rpx;
text-decoration: underline;
font-size: 20rpx;
}
}
.bm-page-right-1 {
font-weight: 800;
}
.bm-page-right-2 {
display: flex;
font-size: 22rpx;
.bm-page-right-zd {
background-color: rgba(94, 255, 153, 0.2);
}
.bm-page-right-c2 {
background-color: rgba(255, 208, 112, 0.2);
}
view {
text-align: center;
border-radius: 12rpx;
padding: 10rpx;
background-color: red;
margin-right: 10rpx;
}
&:last-child {
margin-right: 20rpx;
}
}
}
.top-left-img {
height: 150rpx;
width: 230rpx;
border-radius: 12rpx;
}
}
}
.content {
background: #f4f5f6;
// background: linear-gradient(180deg, #9ffcc5 0%, #84fcbc 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
height: 100vh;
}
.container {
width: 100%;
background: #f4f5f6;
box-sizing: border-box;
padding-top: 88px;
}
.onel {
width: 18px;
height: 18px;
border-radius: 50%;
overflow: hidden;
border: 1px solid #8c8c8d;
}
.twol {
width: 18px;
height: 18px;
border-radius: 50%;
overflow: hidden;
border: 1px solid #4aa76f;
background: #4aa76f;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
.d-s {
display: flex;
align-items: center;
}
.anniu {
width: 120px;
height: 35px;
border-radius: 4px;
background: #4aa76f;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
}
.popup-box {
width: 300px;
border-radius: 10px;
background: #fff;
box-sizing: border-box;
padding: 10px;
}
.title_s {
font-weight: bold;
margin-bottom: 10px;
}
.clv {
color: #fff;
background: #4aa76f;
width: 26px;
height: 26px;
border-radius: 50%;
display: flex;
font-size: 14px;
align-items: center;
justify-content: center;
font-weight: bold;
}
.size-lv {
margin-right: 35px;
}
</style>

View File

@ -99,8 +99,8 @@
}
.group_4 {
height: 482rpx;
background: url(/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGcd54efcc9a8c89af0ef99c8275464828.png)
100% no-repeat;
/* background: url(/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGcd54efcc9a8c89af0ef99c8275464828.png)
100% no-repeat; */
background-size: 100% 100%;
width: 750rpx;
.box_3 {
@ -303,6 +303,7 @@
}
}
}
.text-wrapper_3 {
background-color: rgba(255, 239, 229, 1);
border-radius: 2px;
@ -833,4 +834,113 @@
}
}
}
.container {
padding: 20rpx;
background: #fff;
border-radius: 16rpx;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 20rpx;
}
.class-list {
display: flex;
flex-direction: column;
gap: 20rpx;
width: 90%;
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;
display: flex;
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;
justify-content: center;
align-items: center;
color: #007aff;
font-size: 28rpx;
}
.arrow-icon {
width: 20rpx;
height: 20rpx;
}
.class-type,
.class-license {
display: flex; /* 设置为行内块元素 */
padding: 6rpx;
border-radius: 3px; /* 圆角 */
font-size: 12px; /* 较小的字体 */
font-weight: bold; /* 加粗 */
justify-content: center;
align-items: center;
}
/* 如果需要区分两个标签的样式,可以单独设置 */
.class-type {
color: #3478DC;
background-color: #DDEDFE; /* 红色背景 */
}
.class-license {
color: #8B623D;
background-color: #FFF0E4; /* 蓝色背景 */
}
}

View File

@ -1,39 +1,30 @@
<template>
<view class="page flex-col">
<view class="group_1 flex-row">
<text class="text_1">9:41</text>
<view class="section_1 flex-col"></view>
<view class="section_2 flex-col"></view>
<image
class="image_1"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGa0ae945f09e82ebeb726c4adbf82b9fd.png"
/>
</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 class="block_1 flex-col">
<view class="image-wrapper_1 flex-row">
<image
class="thumbnail_1"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGdc9929c2b5fd86c1689cc5990a0b4397.png"
/>
</view>
<view class="group_3 flex-row justify-between">
<view class="box_1 flex-col"></view>
<view class="box_2 flex-col"></view>
</view>
</view>
</view>
<view class="group_4 flex-col"><view class="box_3 flex-col"></view></view>
<view class="group_4 flex-col">
<image
style="width: 100%; height: 100%;"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGcd54efcc9a8c89af0ef99c8275464828.png"
/>
</view>
<view class="group_5 flex-col">
<text class="text_3">兄弟驾校</text>
<text class="text_3">{{ schoolDetails.corpName }}</text>
<view class="text-wrapper_1 flex-row justify-between">
<text class="text_4">营业中</text>
<text class="text_5">08:00-18:00</text>
@ -52,80 +43,71 @@
</view>
</view>
</view>
<!-- <view class="container">
<view class="section-title">
<text class="title">报名类型</text>
</view>
<view class="class-list">
<view class="class-item" v-for="(item, index) in schoolClassList" :key="index">
<image class="class-image" :src="item.photo" />
<view class="class-info">
<text class="class-name">{{ item.tittle }}</text>
<view class="class-details">
<text class="class-type">{{ item.name }}</text>
<text class="class-license">{{ item.type }}</text>
</view>
<view class="class-price">
<text class="price">{{ item.price - item.favour }}</text>
<text class="original-price">{{ item.price }}</text>
</view>
</view>
</view>
</view>
<view class="view-all" @click="goClassList()">
<text>查看全部班型 ({{ schoolClassList.length }})</text>
<image src="/static/arrow.png" class="arrow-icon" />
</view>
</view> -->
<view class="group_6 flex-col">
<view class="box_4 flex-row justify-between">
<view class="box_5 flex-col"></view>
<text class="text_8">报名类型</text>
</view>
<view class="box_6 flex-row">
<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="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGcdb906a0aec43afcbb43c980454f42f5.png"
:src="imagesUrl + '/' + item.photo"
/>
<view class="text-group_2 flex-col justify-between">
<text class="text_9">AI智能+人工教学</text>
<text class="text_9">{{ item.tittle }}</text>
<view class="text-wrapper_2 flex-row justify-between">
<text class="text_10">3000.00</text>
<text class="text_11">3000.00</text>
<text class="text_10">{{ item.price - item.favour }}</text>
<text class="text_11">{{ item.price }}</text>
</view>
</view>
<view class="text-wrapper_3 flex-col">
<text class="text_12">C2</text>
<text class="text_12">{{ item.type }}</text>
</view>
<view class="text-wrapper_4 flex-col">
<text class="text_13">自动挡</text>
</view>
</view>
</view>
<view class="box_7 flex-row justify-between">
<image
class="image_3"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNG8011b35e0a146200944eed2a34bf4a6e.png"
/>
<view class="group_7 flex-col justify-between">
<text class="text_14">一对一人工班</text>
<view class="box_8 flex-row justify-between">
<view class="text-wrapper_5 flex-col">
<text class="text_15">自动挡</text>
</view>
<view class="text-wrapper_6 flex-col">
<text class="text_16">C2</text>
</view>
</view>
<view class="text-wrapper_7 flex-row justify-between">
<text class="text_17">3000.00</text>
<text class="text_18">3000.00</text>
</view>
</view>
</view>
<view class="box_9 flex-row justify-between">
<image
class="image_4"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNG55be18372a730c3c6b7f6dae5ed42efc.png"
/>
<view class="box_10 flex-col justify-between">
<text class="text_19">轻型牵引挂车</text>
<view class="box_11 flex-row justify-between">
<view class="text-wrapper_8 flex-col">
<text class="text_20">手动挡</text>
</view>
<view class="text-wrapper_9 flex-col">
<text class="text_21">B1</text>
</view>
</view>
<view class="text-wrapper_10 flex-row justify-between">
<text class="text_22">3000.00</text>
<text class="text_23">3000.00</text>
<text class="text_13">{{ item.name }}</text>
</view>
</view>
</view>
<view class="box_12 flex-row">
<view class="image-text_2 flex-row justify-between">
<text class="text-group_3">查看全部班型(61)</text>
<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"
@ -134,77 +116,151 @@
</view>
</view>
</view>
<view class="group_8 flex-col">
<view class="group_9 flex-row justify-between">
<view class="block_3 flex-col"></view>
<text class="text_24">团队教练</text>
</view>
<view class="group_10 flex-row justify-between">
<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="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGf0e25647be779586973aa199e063d380.png"
:src="imagesUrl + '/' + item.image"
/>
<view class="text-group_4 flex-col justify-between">
<text class="text_25">伊彦婷</text>
<text class="text_25">{{ item.name }}</text>
<text class="text_26">5.0</text>
<text class="text_27">教龄&nbsp;10</text>
<text class="text_27">教龄&nbsp;{{ item.seniority }}</text>
</view>
<view class="box_13 flex-col"></view>
</view>
<text class="text_28">学员&nbsp;598</text>
</view>
<view class="group_11 flex-row justify-between">
<view class="image-text_4 flex-row justify-between">
<image
class="label_4"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGd5227f6b0c45724d9cfee7b89bd583ad.png"
/>
<view class="text-group_5 flex-col justify-between">
<text class="text_29">王海英</text>
<text class="text_30">5.0</text>
<text class="text_31">教龄&nbsp;10</text>
</view>
<view class="section_3 flex-col"></view>
</view>
<text class="text_32">学员&nbsp;598</text>
</view>
<view class="group_12 flex-row justify-between">
<view class="image-text_5 flex-row justify-between">
<image
class="label_5"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNG0f72c97c2ca8f8e6121c092e495b1340.png"
/>
<view class="text-group_6 flex-col justify-between">
<text class="text_33">王丽萍</text>
<text class="text_34">5.0</text>
<text class="text_35">教龄&nbsp;10</text>
</view>
<view class="block_4 flex-col"></view>
</view>
<text class="text_36">学员&nbsp;598</text>
</view>
</view>
</view>
</template>
<script>
import request from "@/utils/request";
import config from "@/config.js"
export default {
data() {
return {
imagesUrl: config.imagesUrl,
constants: {},
schoolId: undefined,
tenantId: undefined,
schoolDetails: {},
schoolClassList: [],
schoolAllClassList: [],
schoolCoachList: [],
};
},
onLoad(options) {
if (options.id) {
this.schoolId = options.id;
this.schoolId = options.id;
this.tenantId = options.tenantId
console.log("首页传入数据", options)
console.log("驾校id", this.schoolId)
console.log("驾校租户id", this.tenantId)
this.getSchoolDetails();
this.getSchoolClass();
this.getSchoolAllClass()
this.getSchoolCoach()
}
},
methods: {}
methods: {
handleBack() {
uni.navigateBack({
delta: 1
});
},
getSchoolDetails() {
request({
url: '/userClient/base/companySmallProgram/noTenantIdGet',
method: 'GET',
params: {
id: this.schoolId
},
tenantIdFlag : false
}).then(res => {
this.schoolDetails = res.data;
this.tenantId = res.data.tenantId
console.log('租户id', this.tenantId)
console.log('学校详情', this.schoolDetails);
}).catch(err => {
console.error('获取驾校详情失败', err);
});
},
getSchoolClass() {
console.log('tenantId',this.tenantId)
request({
url: '/app-api/dl-drive-school-course-small/noTenantIdPage',
method: 'GET',
params: {
pageNo: 1,
pageSize: 3,
tenantId: this.tenantId,
},
tenantIdFlag: false
}).then(res => {
this.schoolClassList = res.data.records;
this.total = res.data.total;
console.log('驾校课程列表', this.schoolClassList);
})
},
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);
})
},
getSchoolCoach(){
request({
url: '/app-api/dl-drive-school-coach-small/page',
method: 'GET',
params: {
tenantId: this.tenantId,
},
tenantIdFlag: false
}).then(res => {
//
const sortedList = res.data.records.sort((a, b) => b.seniority - a.seniority);
//
this.schoolCoachList = sortedList.slice(0, 3);
this.total = res.data.total;
console.log('驾校教练列表', this.schoolCoachList);
})
},
goClassList(){
uni.navigateTo({
url: '/newPages/courseList/index?tenantId=' + this.tenantId,
});
},
//
goToDetail(courseId) {
uni.navigateTo({
url: `/newPages/courseDetail/index?courseId=${courseId}&tenantId=${this.tenantId}`,
});
},
}
};
</script>
<style lang='scss'>

View File

@ -84,7 +84,7 @@ export default {
},
getList() {
request({
url: '/userClient/base/company/page',
url: '/userClient/base/companySmallProgram/pageNoTenantId',
method: 'GET',
params: {
pageNo: this.pageNo,

View File

@ -26,18 +26,35 @@
lineWidth: 4, //线
textColor: '#000' //
},
contentTemp: '',
content: '',
List: [],
show: false,
status: 'loading',
name: '',
Address: ''
Address: '',
tenantId: '',
contractData: {},
userData: {},
}
},
onLoad(option) {
this.name = option.name
onLoad(options) {
/*this.name = option.name
this.Address = option.Address
this.tenantId = option.tenantId
console.log('name',this.name)
console.log('Address',this.Address)
console.log('tenantId',this.tenantId)*/
if (options.data) {
this.contractData = JSON.parse(decodeURIComponent(options.data));
console.log(this.contractData.adress);
console.log(this.contractData.name);
console.log(this.contractData.tenantId);
console.log(this.contractData.type);
console.log(this.contractData.money);
}
this.userData = uni.getStorageSync('userInfo');
},
onShow() {
this.getdriveSchool()
@ -60,10 +77,24 @@
methods: {
async getdriveSchool() {
let res = await request({
url: '/system/driveSchool/test/1',
url: `/app-api/small/driveSchool/obtainContract/tenantId/${this.contractData.tenantId}`,
method: 'get',
})
this.content = res.data.content
//
for (const [key, value] of Object.entries(this.contractData)) {
this.content = this.content.replace(
new RegExp(`&nbsp;${key}&nbsp;|${key}`, 'g'),
value
);
}
// 线
this.content = this.content.replace(/<u[^>]*>([^<]*)name([^<]*)<\/u>/g, `<u>$1${this.contractData.name}$2</u>`);
this.content = this.content.replace(/<u[^>]*>([^<]*)type([^<]*)<\/u>/g, `<u>$1${this.contractData.type}$2</u>`);
},
signatureCancel() {
@ -72,23 +103,25 @@
async signatureChange(e) {
this.imgUrl = e
let res = await request({
url: '/system/driveSchool/contract',
url: '/app-api/small/driveSchool/obtainContract',
method: 'post',
data: {
userName: this.name,
address: this.Address
userName: this.contractData.name,
tenantId: this.tenantId,
userId: this.userData.id,
content: this.content,
}
})
console.log(res);
uni.showToast({
title: '支付成功',
title: '报名成功',
duration: 3000
})
setTimeout(function() {
//
uni.navigateTo({
url: '/pages/index/index'
url: '/newPages/newIndex/index'
})
}, 3000); // 30003
@ -99,7 +132,8 @@
},
goback() {
uni.navigateBack()
}
},
}
}
</script>
@ -123,4 +157,4 @@
box-sizing: border-box;
padding: 15px;
}
</style>
</style>

View File

@ -57,7 +57,9 @@
import request from '../../utils/request';
import config from '@/config'
import {
setToken
getLocalUserInfo,
setLocalUserInfo,
setToken, setUserInfo
} from '@/utils/auth.js'
export default {
@ -198,6 +200,7 @@ export default {
// clearInterval(this.loginStatus)
// }
setToken(rex.data.data.token)
setLocalUserInfo(rex.data.data.userinfo)
//uni.setStorageSync('App-Token', );
if (this.returnUrl) {
uni.navigateBack()

BIN
static/myImgs/allOrder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -1,5 +1,6 @@
const TokenKey = 'App-Token'
const TenantIdKey = 'TENANT_ID'
const userInfo = 'userInfo'
export function getToken() {
return uni.getStorageSync(TokenKey)
@ -16,6 +17,15 @@ export function removeToken() {
export function setTenantId(TenantId) {
return uni.setStorageSync(TenantIdKey, TenantId);
}
export function getTenantId(){
return uni.getStorageSync(TenantIdKey)
}
export function setLocalUserInfo(userinfo){
return uni.setStorageSync(userInfo,userinfo)
}
export function getLocalUserInfo() {
return uni.getStorageSync(userInfo)
}