This commit is contained in:
Lx 2025-04-07 18:08:13 +08:00
parent 02dde0928f
commit a81983c192
12 changed files with 2245 additions and 2103 deletions

View File

@ -5,19 +5,19 @@
</view>
<view class="group_2 flex-row">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
@click="goBack()"
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
@click="goBack()"
/>
<text class="text_2">课程详情</text>
</view>
<view class="group_3 flex-col">
<image
style="width: 100%; height: 100%;"
:src="imagesUrl + '/' + courseDetails.photo"
/>
<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">
@ -45,23 +45,23 @@
</view>
<view class="image-wrapper_2 flex-row">
<image
class="image_2"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG156254d307fe40d6e67828fbe5adb90f.png"
class="image_2"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG156254d307fe40d6e67828fbe5adb90f.png"
/>
</view>
<image
class="image_3"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG40a433e56593a25193fc18c2d385444f.png"
class="image_3"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG40a433e56593a25193fc18c2d385444f.png"
/>
</view>
<view class="group_6 flex-row">
<view class="image-text_1 flex-col justify-between" @click="zxkf()">
<image
class="label_2"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG283b4603035848d5dcc7209d10653327.png"
class="label_2"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG283b4603035848d5dcc7209d10653327.png"
/>
<text class="text-group_1">咨询客服</text>
</view>
@ -75,57 +75,74 @@
import request from "@/utils/request";
import config from "@/config.js"
import {getLocalUserInfo, getUserInfo} from "@/utils/auth";
export default {
data() {
return {
courseId: undefined,
tenantId: undefined,
courseDetails: [],
imagesUrl: config.imagesUrl,
userDetails: [],
courseId: undefined,
tenantId: undefined,
courseDetails: [],
driveSchoolPhone: [],
imagesUrl: config.imagesUrl,
userDetails: [],
};
},
onLoad(options) {
this.courseId = options.courseId;
this.tenantId = options.tenantId;
console.log(options)
this.getCourseDetails();
this.courseId = options.courseId;
this.tenantId = options.tenantId;
console.log(options)
this.getCourseDetails();
this.userDetails = getLocalUserInfo();
console.log('123123',this.userDetails)
},
this.getServicePhone()
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;
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'
});
},
console.log('驾校课程列表', this.schoolAllClassList);
})
},
zxkf() {
uni.makePhoneCall({
phoneNumber: this.driveSchoolPhone.phone
});
},
getServicePhone() {
request({
url: '/app-api/dl-drive-school-course-small/getServicePhone',
method: 'GET',
params: {
tenantId: this.tenantId,
}
}).then(res => {
this.driveSchoolPhone = res.data
console.log('客服电话res', res)
console.log('客服电话1', this.driveSchoolPhone)
console.log('客服电话2', this.driveSchoolPhone.phone)
})
},
goRegisterNow(){
uni.navigateTo({
url: `/newPages/register/index?courseId=${this.courseDetails.id}&userId=${this.userDetails.id}&tenantId=${this.tenantId}`,
// url: '/pages/index/bmPage'
});
},
goRegisterNow() {
uni.navigateTo({
url: `/newPages/register/index?courseId=${this.courseDetails.id}&userId=${this.userDetails.id}&tenantId=${this.tenantId}`,
// url: '/pages/index/bmPage'
});
},
}
};
</script>

View File

@ -1,47 +1,48 @@
<template>
<view class="page flex-col">
<view class="group_1 flex-row">
</view>
<view class="group_2 flex-row">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
@click="goBack()"
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kechengliebiao/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
@click="goBack()"
/>
<text class="text_2">课程</text>
</view>
<scroll-view
class="scroll-view"
scroll-y
:style="{ height: scrollHeight + 'px' }"
>
<view class="group_6 flex-col" v-for="(item, index) in schoolAllClassList" :key="index" @click="goToDetail(item.id)">
<view class="image-text_1 flex-row">
<image
class="image_2"
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + item.photo"
/>
<view class="text-group_1 flex-col justify-between">
<text class="text_3">{{ item.tittle }}</text>
<view class="text-wrapper_1 flex-row justify-between">
<text class="text_4">{{ item.price - item.favour }}</text>
<text class="text_5">{{ item.price }}</text>
<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="imagesUrl + '/' + item.photo"
/>
<view class="text-group_1 flex-col justify-between">
<text class="text_3">{{ item.tittle }}</text>
<view class="text-wrapper_1 flex-row justify-between">
<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">{{ item.type }}</text>
</view>
<view class="text-wrapper_3 flex-col">
<text class="text_7">{{ item.name }}</text>
</view>
</view>
<view class="text-wrapper_2 flex-col">
<text class="text_6">{{ item.type }}</text>
</view>
<view class="text-wrapper_3 flex-col">
<text class="text_7">{{ item.name }}</text>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</template>
<script>
@ -51,59 +52,59 @@ import config from "@/config.js"
export default {
data() {
return {
imagesUrl: config.imagesUrl,
tenantId: undefined,
schoolAllClassList: [],
scrollHeight: 0,
imagesUrl: config.imagesUrl,
tenantId: undefined,
schoolAllClassList: [],
scrollHeight: 0,
};
},
onLoad(options) {
if (options.tenantId) {
this.tenantId = options.tenantId
console.log("首页传入数据", options)
console.log("驾校租户id", this.tenantId)
this.getSchoolAllClass()
this.tenantId = options.tenantId
console.log("首页传入数据", options)
console.log("驾校租户id", this.tenantId)
this.getSchoolAllClass()
}
},
onReady() {
//
this.calculateScrollHeight();
},
//
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}`,
});
},
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>

View File

@ -9,7 +9,7 @@
<view class="box_2 flex-col">
<view class="block_3 flex-row">
<view class="text-group_1 flex-col justify-between">
<text class="text_2">{{ subjectArr[info.subject - 1] }}{{ title}}</text>
<text class="text_2">{{ subjectArr[info.subject - 1] }}{{ title }}</text>
<text class="text_3">{{ info.time }}</text>
</view>
</view>
@ -24,14 +24,15 @@
<view class="block_5 flex-row">
<view class="image-text_1 flex-row justify-between">
<image
class="label_2"
referrerpolicy="no-referrer"
src="/static/lanhu_pingjiabiaodan/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png"
class="label_2"
referrerpolicy="no-referrer"
src="/static/lanhu_pingjiabiaodan/FigmaDDSSlicePNG9781bf564ae15eee66e88c90622422db.png"
/>
<text class="text-group_2">{{ info.coachName }}</text>
</view>
<view style="display: flex; align-items: center;">
<u-rate active-color="#EAA140" v-model="info.rate" allowHalf inactive-color="#b2b2b2" @change="changeRate"></u-rate>
<u-rate active-color="#EAA140" v-model="info.rate" allowHalf inactive-color="#b2b2b2"
@change="changeRate"></u-rate>
<text style="margin-left: 5rpx;color:#E1A652;">{{ info.rate }}</text>
</view>
</view>
@ -40,11 +41,11 @@
<view class="section_4 flex-col">
<text class="text_7">服务评价</text>
<view class="text-wrapper_3 flex-col">
<u--textarea v-model="info.serviceContent" placeholder="请输入内容" ></u--textarea>
<u--textarea v-model="info.serviceContent" placeholder="请输入内容"></u--textarea>
</view>
<text class="text_9">技术评价</text>
<view class="text-wrapper_4 flex-col">
<u--textarea v-model="info.teachContent" placeholder="请输入内容" ></u--textarea>
<u--textarea v-model="info.teachContent" placeholder="请输入内容"></u--textarea>
</view>
</view>
<view class="bottom_" v-if="show">
@ -69,9 +70,9 @@ export default {
return {
constants: {},
show: false,
title:'',
title: '',
//
info:{
info: {
rate: 0.0,
evaluateType: 0,
busiId: '',
@ -81,7 +82,7 @@ export default {
subjectArr: ['科目一', '科目二', '科目三', '科目四'],
};
},
onLoad(options){
onLoad(options) {
const data = JSON.parse(options.data);
//
if (options.controls) {
@ -107,8 +108,9 @@ export default {
console.log(this.info)
},
methods: {
changeRate(){},
submit(){
changeRate() {
},
submit() {
//
if (this.info.rate === 0.0 || this.info.serviceEvaluate === '' || this.info.technologyEvaluate === '') {
uni.showToast({
@ -146,7 +148,8 @@ export default {
<style lang='scss'>
@import '../common/common.scss';
@import './assets/style/index.rpx.scss';
.bottom_{
.bottom_ {
//
position: fixed;
bottom: 10rpx;

View File

@ -1,56 +1,60 @@
<template>
<view class="page flex-col">
<view class="group_1 flex-row">
</view>
<view class="group_2 flex-row">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguo/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
@click="handleBack()"
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguo/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
@click="handleBack()"
/>
<text class="text_1">考试结果</text>
</view>
<view class="group_4 flex-col">
<view class="block_1 flex-row justify-between" @click="show = true">
<text class="text_19">是否通过</text>
<view class="image-text_1 flex-row justify-between">
<view>
<u-picker v-model="process.examStatus" :show="show" :columns="ifPassColumns" title="是否通过" @confirm="ifPassOnConfirm" @cancel="show = false">
</u-picker>
<text class="text-group_2">{{ selectedValue || '请选择' }}</text>
</view>
<view>
<u-picker v-model="process.examStatus" :show="show" :columns="ifPassColumns" title="是否通过"
@confirm="ifPassOnConfirm" @cancel="show = false">
</u-picker>
<text class="text-group_2">{{ selectedValue || '请选择' }}</text>
</view>
</view>
</view>
<view class="text-wrapper_7 flex-row justify-between">
<text class="text_4">分数</text>
<view class="text_5_1 ">
<u--input
placeholder="请输入分数"
border="none"
v-model="process.examScore"
maxlength="3"
inputAlign="right"
></u--input>
<view class="text_5_1 ">
<u--input
placeholder="请输入分数"
border="none"
v-model="process.examScore"
maxlength="3"
inputAlign="right"
>
</u--input>
</view>
</view>
<view class="text-wrapper_8 flex-row justify-between">
<text class="text_20">时间</text>
<view>
<u-datetime-picker
:show="showTimePicker"
v-model="process.examTime"
mode="datetime"
@confirm="onConfirmExamTime"
@cancel="showTimePicker = false"
></u-datetime-picker>
<text class="text_3" @click="showTimePicker = true">{{ process.examTime ? formatDate(process.examTime) : '选择时间' }}</text>
</view>
<view>
<u-datetime-picker
:show="showTimePicker"
v-model="process.examTime"
mode="datetime"
@confirm="onConfirmExamTime"
@cancel="showTimePicker = false"
></u-datetime-picker>
<text class="text_3" @click="showTimePicker = true">
{{ process.examTime ? formatDate(process.examTime) : '选择时间' }}
</text>
</view>
</view>
<!-- <view class="text-wrapper_9 flex-row justify-between">
<text class="text_6">姓名</text>
@ -66,103 +70,106 @@
</view> -->
<view class="text-wrapper_10 flex-row justify-between">
<text class="text_8">考试类型</text>
<text class="text_9" v-if="process.subject != 2 && process.subject != 3" >{{ courseType }}</text>
<text class="text_9" v-else >{{ opCourseType }}</text>
<text class="text_9" v-if="process.subject != 2 && process.subject != 3">{{ courseType }}</text>
<text class="text_9" v-else>{{ opCourseType }}</text>
</view>
<view class="text-wrapper_11 flex-row justify-between" @click="subjectShow = true" v-if="process.subject != 2 && process.subject != 3">
<view class="text-wrapper_11 flex-row justify-between" @click="subjectShow = true"
v-if="process.subject != 2 && process.subject != 3">
<text class="text_10">考试科目</text>
<view>
<u-picker v-model="process.subject" :show="subjectShow" :columns="subjectColumns" title="科目" @confirm="subjectOnConfirm" @cancel="subjectShow = false">
</u-picker>
<text class="text-group_2">{{ subjectValue || '请选择科目' }}</text>
</view>
<view>
<u-picker v-model="process.subject" :show="subjectShow" :columns="subjectColumns" title="科目"
@confirm="subjectOnConfirm" @cancel="subjectShow = false">
</u-picker>
<text class="text-group_2">{{ subjectValue || '请选择科目' }}</text>
</view>
</view>
</view>
<view class="group_5 flex-col">
<text class="text_16">备注</text>
<u--textarea class="text_17" v-model="process.remark" placeholder="请输入内容" count ></u--textarea>
<u--textarea class="text_17" v-model="process.remark" placeholder="请输入内容" count></u--textarea>
<text class="text_18">图片</text>
<view class="image-wrapper_4 flex-row justify-between">
<u-upload
:fileList="displayFileList"
@afterRead="afterRead"
@delete="deletePic"
multiple
:maxCount="2"
></u-upload>
<u-upload
:fileList="displayFileList"
@afterRead="afterRead"
@delete="deletePic"
multiple
:maxCount="2"
></u-upload>
</view>
</view>
<view class="block_8 flex-col">
<view class="text-wrapper_8 flex-col" @click="saveData()">
<text class="text_19">确定</text>
</view>
</view>
<view class="block_8 flex-col">
<view class="text-wrapper_8 flex-col" @click="saveData()">
<text class="text_19">确定</text>
</view>
</view>
</view>
</template>
<script>
import upload from '@/utils/upload.js'
import request from '@/utils/request.js'
import { getLocalUserInfo } from '../../utils/auth';
import upload from '@/utils/upload.js'
import request from '@/utils/request.js'
import {getLocalUserInfo} from '../../utils/auth';
export default {
data() {
return {
show: false,
showTimePicker: false,
subjectShow: false,
ifPassColumns: [['已通过', '未通过']],
subjectColumns: [['科目一']],
selectedValue: '',
subjectValue: '',
fileList: [],
imageUrl: this.$imagesUrl,
userInfo: [],
courseType: null,
courseCompleteStatusList: {},
opTenantId: null,
opCourseType: null,
examId:null,
batchId:null,
batchItemId: null,
process: {
id:null,
userName: null,
userId: null,
subject:null,
fraction: null,
examNum: null,
examStatus: null,
examScore: null,
remark: '',
examTime: null,
images: null,
tenantId: null,
courseId: null,
ifPass: null,
batchId: null,
coachId: null,
},
show: false,
showTimePicker: false,
subjectShow: false,
ifPassColumns: [['已通过', '未通过']],
subjectColumns: [['科目一']],
selectedValue: '',
subjectValue: '',
fileList: [],
imageUrl: this.$imagesUrl,
userInfo: [],
courseType: null,
courseCompleteStatusList: {},
opTenantId: null,
opCourseType: null,
examId: null,
batchId: null,
batchItemId: null,
process: {
id: null,
userName: null,
userId: null,
subject: null,
fraction: null,
examNum: null,
examStatus: null,
examScore: null,
remark: '',
examTime: null,
images: null,
tenantId: null,
courseId: null,
ifPass: null,
batchId: null,
coachId: null,
},
constants: {}
};
},
onLoad(options) {
this.userInfo = getLocalUserInfo()
console.log('userInfo', this.userInfo)
this.getUserOrderDetails()
this.process.subject = options.subject
this.opTenantId = options.tenantId
this.opCourseType = options.courseType
this.process.subject = options.subject
this.process.courseId = options.courseId
this.process.batchId = options.batchId
this.examId = options.id
this.batchId = options.batchId
this.batchItemId = options.id
this.process.id = options.id
this.process.coachId = options.coachId
this.process.userId = this.userInfo.id
console.log('options',options)
console.log('batchItemId',this.batchItemId)
this.userInfo = getLocalUserInfo()
console.log('userInfo', this.userInfo)
this.getUserOrderDetails()
this.process.subject = options.subject
this.opTenantId = options.tenantId
this.opCourseType = options.courseType
this.process.subject = options.subject
this.process.courseId = options.courseId
this.process.batchId = options.batchId
this.examId = options.id
this.batchId = options.batchId
this.batchItemId = options.id
this.process.id = options.id
this.process.coachId = options.coachId
this.process.userId = this.userInfo.id
console.log('options', options)
console.log('batchItemId', this.batchItemId)
},
computed: {
displayFileList() {
@ -170,12 +177,12 @@ export default {
if (item.url.startsWith('http')) {
return item;
}
const prefix = this.$imagesUrl.endsWith('/') ? this.$imagesUrl : `${this.$imagesUrl}/`;
const fullUrl = item.url.startsWith('/')
? `${prefix}${item.url.slice(1)}`
: `${prefix}${item.url}`;
const fullUrl = item.url.startsWith('/')
? `${prefix}${item.url.slice(1)}`
: `${prefix}${item.url}`;
return {
...item,
url: fullUrl,
@ -184,256 +191,256 @@ export default {
},
},
methods: {
handleBack() {
uni.navigateBack({
delta: 1
});
},
ifPassOnConfirm(value) {
console.log('选中的值:', value);
const statusMap = {
'已通过': 1,
'未通过': 0
};
//
this.process.examStatus = statusMap[value.value[0]];
console.log('value[0]', value.value[0])
this.selectedValue = value.value[0];
this.show = false;
console.log('examStatus:', this.process.examStatus);
console.log('process', this.process)
},
subjectOnConfirm(value) {
console.log('选中的值:', value);
const statusMap = {
'科目一': 1,
'科目四': 4
};
//
this.process.subject = statusMap[value.value[0]];
console.log('value[0]', value.value[0])
this.subjectValue = value.value[0];
this.subjectShow = false;
console.log('subject:', this.process.subject);
console.log('process', this.process)
},
onConfirmExamTime(value) {
console.log("选中的时间:", value);
this.process.examTime = value;
this.showTimePicker = false;
},
//
formatDate(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}`;
},
deletePic(event) {
this.fileList.splice(event.index, 1);
},
//
async afterRead(event) {
let lists = [].concat(event.file);
let fileListLen = this.fileList.length;
for (let i = 0; i < lists.length; i++) {
try {
const resultUrl = await this.uploadFilePromise(lists[i].url);
let item = {
status: 'success',
url: resultUrl,
};
this.fileList.splice(fileListLen, 0, item);
fileListLen++;
} catch (error) {
console.error('图片上传失败', error);
}
}
},
uploadFilePromise(filePath) {
console.log('图片地址', filePath)
return new Promise((resolve, reject) => {
upload({
url: '/app-api/small-upload/common/upload',
filePath: filePath,
}).then((res) => {
if (res.data && res.data.url) {
resolve(res.data.url);
console.log('返回', res)
console.log('返回url', res.data.url)
} else {
reject(new Error('上传失败'));
}
}).catch(err => reject(err));
});
},
getUserOrderDetails() {
request({
url: '/app-api/small/drive/school-course-order/page',
method: 'GET',
params: {
userId: this.userInfo.id,
paymentStatus:'2',
ifEnd: 0,
},
tenantIdFlag : false
}).then(res => {
this.orderList = res.data.records;
console.log('订单信息',res.data)
if(res.data.records.length > 0){
const tempData = res.data.records[0]
if(this.process.subject != 2 && this.process.subject != 3){
this.process.courseId = tempData.courseId
}
if(this.process.subject != 2 && this.process.subject != 3){
this.courseType = tempData.courseType
}
this.process.tenantId = tempData.tenantId
this.getCourseCompleteStatus()
}
});
},
getCourseCompleteStatus(){
console.log('userId', this.userId)
console.log('courseId', this.process.courseId)
request({
url:'/app-api/process/page',
method: 'GET',
params: {
userId: this.userInfo.id,
courseId: this.process.courseId,
}
}).then(res => {
this.courseCompleteStatusList = res.data.records
console.log('res.data',res.data)
if(this.courseCompleteStatusList.length > 0){
console.log('courseCompleteStatusList', this.courseCompleteStatusList)
const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2)
const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3)
console.log('subject2', subject2)
console.log('subject3', subject3)
console.log(subject2?.status === '2' && subject3?.status === '2')
if (subject2?.status === '2' && subject3?.status === '2') {
console.log(subject2?.status === 2 && subject3?.status === 2)
this.subjectColumns = [['科目一', '科目四']]
}
}
})
},
saveData() {
if(this.process.subject == 1 || this.process.subject == 4){
this.saveDataOne()
}
if(this.process.subject == 2 || this.process.subject == 3){
this.saveDataTwo()
}
},
saveDataOne(){
if(this.process.subject === 1 && this.courseCompleteStatusList.length <= 0){
console.log('this.courseCompleteStatusList',this.courseCompleteStatusList)
uni.showToast({ title: '请联系驾校人员', icon: 'none' });
return;
}
if(this.process.subject === 4 && this.courseCompleteStatusList.length <= 0){
uni.showToast({ title: '请联系驾校人员', icon: 'none' });
return;
}
console.log('courseCompleteStatusList', this.courseCompleteStatusList.length)
this.process.images = this.fileList?.map(item => item.url).join(',') || '';
console.log('process', this.process)
if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
uni.showToast({ title: '信息填写不完整', icon: 'none' });
return;
}
request({
url: '/app-api/process/updateProcess',
method: 'PUT',
data: this.process,
}).then(res => {
if(res.code === 0){
uni.showToast({
title: '保存成功',
icon: 'success',
duration: 1000
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1500);
}else{
uni.showToast({ title: res.data?.message || '保存失败', icon: 'none' });
}
})
},
saveDataTwo(){
/* const postData = {
...this.process, // process
tenantId: this.opTenantId,
fraction: this.process.examScore,
ifPass: this.process.examStatus,
id: this.batchItemId,
remark: this.process.remark
images: this.fileList?.map(item => item.url).join(',') || '',
} */
// console.log('', postData)
this.process.userId = this.userInfo.id
this.process.tenantId = this.opTenantId
this.process.fraction = this.process.examScore
this.process.ifPass = this.process.examStatus
this.process.images = this.fileList?.map(item => item.url).join(',') || '';
if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
uni.showToast({ title: '信息填写不完整', icon: 'none' });
return;
}
request({
url: '/app-api/examBatch/update',
method: 'PUT',
// data: postData,
data: this.process,
}).then(res => {
if(res.code === 0){
uni.showToast({
title: '保存成功',
icon: 'success',
duration: 1000
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1500);
}else{
uni.showToast({ title: res.data?.message || '保存失败', icon: 'none' });
}
})
}
handleBack() {
uni.navigateBack({
delta: 1
});
},
ifPassOnConfirm(value) {
console.log('选中的值:', value);
const statusMap = {
'已通过': 1,
'未通过': 0
};
//
this.process.examStatus = statusMap[value.value[0]];
console.log('value[0]', value.value[0])
this.selectedValue = value.value[0];
this.show = false;
console.log('examStatus:', this.process.examStatus);
console.log('process', this.process)
},
subjectOnConfirm(value) {
console.log('选中的值:', value);
const statusMap = {
'科目一': 1,
'科目四': 4
};
//
this.process.subject = statusMap[value.value[0]];
console.log('value[0]', value.value[0])
this.subjectValue = value.value[0];
this.subjectShow = false;
console.log('subject:', this.process.subject);
console.log('process', this.process)
},
onConfirmExamTime(value) {
console.log("选中的时间:", value);
this.process.examTime = value;
this.showTimePicker = false;
},
//
formatDate(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}`;
},
deletePic(event) {
this.fileList.splice(event.index, 1);
},
//
async afterRead(event) {
let lists = [].concat(event.file);
let fileListLen = this.fileList.length;
for (let i = 0; i < lists.length; i++) {
try {
const resultUrl = await this.uploadFilePromise(lists[i].url);
let item = {
status: 'success',
url: resultUrl,
};
this.fileList.splice(fileListLen, 0, item);
fileListLen++;
} catch (error) {
console.error('图片上传失败', error);
}
}
},
uploadFilePromise(filePath) {
console.log('图片地址', filePath)
return new Promise((resolve, reject) => {
upload({
url: '/app-api/small-upload/common/upload',
filePath: filePath,
}).then((res) => {
if (res.data && res.data.url) {
resolve(res.data.url);
console.log('返回', res)
console.log('返回url', res.data.url)
} else {
reject(new Error('上传失败'));
}
}).catch(err => reject(err));
});
},
getUserOrderDetails() {
request({
url: '/app-api/small/drive/school-course-order/page',
method: 'GET',
params: {
userId: this.userInfo.id,
paymentStatus: '2',
ifEnd: 0,
},
tenantIdFlag: false
}).then(res => {
this.orderList = res.data.records;
console.log('订单信息', res.data)
if (res.data.records.length > 0) {
const tempData = res.data.records[0]
if (this.process.subject != 2 && this.process.subject != 3) {
this.process.courseId = tempData.courseId
}
if (this.process.subject != 2 && this.process.subject != 3) {
this.courseType = tempData.courseType
}
this.process.tenantId = tempData.tenantId
this.getCourseCompleteStatus()
}
});
},
getCourseCompleteStatus() {
console.log('userId', this.userId)
console.log('courseId', this.process.courseId)
request({
url: '/app-api/process/page',
method: 'GET',
params: {
userId: this.userInfo.id,
courseId: this.process.courseId,
}
}).then(res => {
this.courseCompleteStatusList = res.data.records
console.log('res.data', res.data)
if (this.courseCompleteStatusList.length > 0) {
console.log('courseCompleteStatusList', this.courseCompleteStatusList)
const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2)
const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3)
console.log('subject2', subject2)
console.log('subject3', subject3)
console.log(subject2?.status === '2' && subject3?.status === '2')
if (subject2?.status === '2' && subject3?.status === '2') {
console.log(subject2?.status === 2 && subject3?.status === 2)
this.subjectColumns = [['科目一', '科目四']]
}
}
})
},
saveData() {
if (this.process.subject == 1 || this.process.subject == 4) {
this.saveDataOne()
}
if (this.process.subject == 2 || this.process.subject == 3) {
this.saveDataTwo()
}
},
saveDataOne() {
if (this.process.subject === 1 && this.courseCompleteStatusList.length <= 0) {
console.log('this.courseCompleteStatusList', this.courseCompleteStatusList)
uni.showToast({title: '请联系驾校人员', icon: 'none'});
return;
}
if (this.process.subject === 4 && this.courseCompleteStatusList.length <= 0) {
uni.showToast({title: '请联系驾校人员', icon: 'none'});
return;
}
console.log('courseCompleteStatusList', this.courseCompleteStatusList.length)
this.process.images = this.fileList?.map(item => item.url).join(',') || '';
console.log('process', this.process)
if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
uni.showToast({title: '信息填写不完整', icon: 'none'});
return;
}
request({
url: '/app-api/process/updateProcess',
method: 'PUT',
data: this.process,
}).then(res => {
if (res.code === 0) {
uni.showToast({
title: '保存成功',
icon: 'success',
duration: 1000
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1500);
} else {
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
}
})
},
saveDataTwo() {
/* const postData = {
...this.process, // process
tenantId: this.opTenantId,
fraction: this.process.examScore,
ifPass: this.process.examStatus,
id: this.batchItemId,
remark: this.process.remark
images: this.fileList?.map(item => item.url).join(',') || '',
} */
// console.log('', postData)
this.process.userId = this.userInfo.id
this.process.tenantId = this.opTenantId
this.process.fraction = this.process.examScore
this.process.ifPass = this.process.examStatus
this.process.images = this.fileList?.map(item => item.url).join(',') || '';
if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
uni.showToast({title: '信息填写不完整', icon: 'none'});
return;
}
request({
url: '/app-api/examBatch/update',
method: 'PUT',
// data: postData,
data: this.process,
}).then(res => {
if (res.code === 0) {
uni.showToast({
title: '保存成功',
icon: 'success',
duration: 1000
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1500);
} else {
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
}
})
}
}
};
</script>

View File

@ -1,61 +1,60 @@
<template>
<view class="page flex-col">
<view class="box_1 flex-row">
</view>
<view class="box_4 flex-col">
<view class="box_5 flex-row">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
@click="handleBack()"
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
@click="handleBack()"
/>
<text class="text_1">个人信息</text>
</view>
<view class="box_6 flex-col">
<view class="box_7 flex-row justify-between">
<text class="text_2">头像</text>
<u-upload
:fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
:maxCount="1"
width="80"
height="80"
:previewFullImage="true"
>
<image
v-if="userDetails.avatar"
class="label_2"
:src="userDetails.avatar"
mode="aspectFill"
/>
<image
v-else
class="label_2"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGcc6ee579083c2c921f6c93c250df5d44.png"
/>
</u-upload>
<!-- <image
class="label_2"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGcc6ee579083c2c921f6c93c250df5d44.png"
/> -->
<u-upload
:fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
:maxCount="1"
width="80"
height="80"
:previewFullImage="true"
>
<image
v-if="userDetails.avatar"
class="label_2"
:src="userDetails.avatar"
mode="aspectFill"
/>
<image
v-else
class="label_2"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGcc6ee579083c2c921f6c93c250df5d44.png"
/>
</u-upload>
<!-- <image
class="label_2"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGcc6ee579083c2c921f6c93c250df5d44.png"
/> -->
</view>
<view class="text-wrapper_1 flex-row justify-between">
<text class="text_3">昵称</text>
<input class="text_4" v-model="name" type="text" placeholder="请填写昵称">
<input class="text_4" v-model="name" type="text" placeholder="请填写昵称">
<!-- <text class="text_4">千舟寻渡</text> -->
</view>
<view class="text-wrapper_2 flex-row justify-between">
<text class="text_5">联系方式</text>
<input class="text_6" v-model="name" type="text" placeholder="请填写联系方式">
<input class="text_6" v-model="name" type="text" placeholder="请填写联系方式">
<!-- <text class="text_6">166&nbsp;8888&nbsp;6666</text> -->
</view>
</view>
@ -66,16 +65,16 @@
<view class="group_2 flex-row justify-between">
<view class="image-wrapper_2 flex-col">
<image
class="image_3"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNG613ddce187a71bcc667c56c84cd2d022.png"
class="image_3"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNG613ddce187a71bcc667c56c84cd2d022.png"
/>
</view>
<view class="image-wrapper_3 flex-col">
<image
class="image_4"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGc70887b65324cf1c7b3d66fcb7a32970.png"
class="image_4"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGc70887b65324cf1c7b3d66fcb7a32970.png"
/>
</view>
</view>
@ -85,9 +84,9 @@
<view class="block_2 flex-row">
<view class="image-text_1 flex-col justify-between">
<image
class="label_3"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNG6ea89e46a56641bc7e118ef1d4d789d5.png"
class="label_3"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNG6ea89e46a56641bc7e118ef1d4d789d5.png"
/>
<text class="text-group_1">添加图片</text>
</view>
@ -103,6 +102,7 @@
</template>
<script>
import request from '@/utils/request.js'
export default {
data() {
return {
@ -121,11 +121,11 @@ export default {
methods: {
handleBack() {
uni.navigateBack({
delta: 1
delta: 1
});
},
getUserInfo(){
getUserInfo() {
request({
url: '/app-api/small/dl-drive-school-student/getByUserId',
method: 'GET',
@ -140,17 +140,17 @@ export default {
status: 'success'
}]
}
console.log('res.data',res.data);
console.log('res.data', res.data);
console.log('userDetails', this.userDetails);
})
},
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
this.userDetails.avatar = '' //
},
//
afterRead(event) {
// mutiple true , file
@ -163,7 +163,7 @@ export default {
message: '上传中'
})
})
//
lists.map((item, index) => {
this.uploadFilePromise(item.url).then(res => {
@ -186,7 +186,7 @@ export default {
})
})
},
// -
uploadFilePromise(e) {
return new Promise((resolve, reject) => {

View File

@ -8,24 +8,24 @@
<view class="group_1 flex-col">
<view class="image-wrapper_2 flex-col">
<image
class="image_2"
referrerpolicy="no-referrer"
:src="selfInfo && selfInfo.avatar ? imageUrl + '/' + selfInfo.avatar : '/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG185e54e3ffd47170ac4e6e5108c9a54f.png'"
class="image_2"
referrerpolicy="no-referrer"
:src="selfInfo && selfInfo.avatar ? imageUrl + '/' + selfInfo.avatar : '/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG185e54e3ffd47170ac4e6e5108c9a54f.png'"
/>
</view>
</view>
<view class="text-group_1 flex-col justify-between">
<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 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">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG7e67772393591f7c5436c0b59f7b3b17.png"
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG7e67772393591f7c5436c0b59f7b3b17.png"
/>
<text class="text-group_2">学车码</text>
</view>
@ -33,20 +33,20 @@
<view class="box_8 flex-row">
<view class="image-wrapper_3 flex-col justify-center">
<image
class="label_2"
referrerpolicy="no-referrer"
:src="coachDetails && coachDetails.image ? imageUrl + '/' + coachDetails.image : '/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGa95a4d1d98d08b238a3082514eefafd0.png'"
class="label_2"
referrerpolicy="no-referrer"
:src="coachDetails && coachDetails.image ? imageUrl + '/' + coachDetails.image : '/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGa95a4d1d98d08b238a3082514eefafd0.png'"
/>
</view>
<view class="text-group_3 flex-col justify-between">
<text class="text_4" v-if="coachDetails.name != null">{{ coachDetails.name }}</text>
<text class="text_111" v-else> 暂无教练信息 </text>
<text class="text_111" v-else> 暂无教练信息</text>
<view class="text-wrapper_1" v-if="coachDetails.seniority != null">
<text class="text_5">教龄</text>
<text class="text_6">{{ coachDetails.seniority }}</text>
<text class="text_7"></text>
</view>
</view>
<!-- <view class="text-wrapper_2" v-if="coachDetails">
<text class="text_8">学员数</text>
@ -62,15 +62,15 @@
<text class="text_10">我的订单</text>
<view class="list_1 flex-row">
<view
class="image-text_3 flex-col justify-between"
v-for="(item, index) in loopData"
:key="index"
@click="toOrderPage(item.orderType,item.type)"
class="image-text_3 flex-col justify-between"
v-for="(item, index) in loopData"
:key="index"
@click="toOrderPage(item.orderType,item.type)"
>
<image
class="label_3"
referrerpolicy="no-referrer"
:src="item.url"
class="label_3"
referrerpolicy="no-referrer"
:src="item.url"
/>
<text class="text-group_4" v-text="item.text"></text>
</view>
@ -79,46 +79,46 @@
<view class="block_2 flex-row" @click="goMyInDetails()">
<view class="image-wrapper_4 flex-col">
<image
class="thumbnail_2"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG1bb0cdc369203c305a42d848736e8f01.png"
class="thumbnail_2"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG1bb0cdc369203c305a42d848736e8f01.png"
/>
</view>
<text class="text_11">个人信息</text>
<image
class="thumbnail_3"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png"
class="thumbnail_3"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png"
/>
</view>
<view class="block_3 flex-row">
<view class="image-wrapper_5 flex-col">
<image
class="thumbnail_4"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGb5e90b5b4c1f154eb4e27313164118a4.png"
class="thumbnail_4"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGb5e90b5b4c1f154eb4e27313164118a4.png"
/>
</view>
<text class="text_12">在线客服</text>
<image
class="thumbnail_5"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png"
class="thumbnail_5"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png"
/>
</view>
<view class="block_4 flex-row">
<view class="image-wrapper_6 flex-col">
<image
class="thumbnail_6"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGa728895586dafec1bde5f90c89d05c48.png"
class="thumbnail_6"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGa728895586dafec1bde5f90c89d05c48.png"
/>
</view>
<text class="text_13">建议反馈</text>
<image
class="thumbnail_7"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png"
class="thumbnail_7"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png"
/>
</view>
</view>
@ -126,45 +126,46 @@
</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'
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 {
msg: "3",
selfInfo: {},
coachDetails:{},
userDetails: {},
msg: "3",
selfInfo: {},
coachDetails: {},
userDetails: {},
loopData: [
{
url: '/static/myImgs/alreadyPaid.png',
text: '已付款',
orderType: '2',
type: '2',
orderType: '2',
type: '2',
},
{
url: '/static/myImgs/alreadyInterviewed.png',
text: '已面签',
orderType: '4',
type: '3',
orderType: '4',
type: '3',
},
{
url: '/static/myImgs/registered.png',
text: '已报名',
orderType: '2',
type: '4',
orderType: '2',
type: '4',
},
{
url: '/static/myImgs/allOrder.png',
text: '全部订单',
orderType: '',
type: '1',
orderType: '',
type: '1',
}
],
constants: {},
@ -172,87 +173,87 @@ export default {
};
},
onLoad() {
this.selfInfo = getLocalUserInfo()
this.selfInfo = getLocalUserInfo()
console.log("用户信息", this.selfInfo)
this.getUserInfo()
this.getUserInfo()
},
onShow() {
if (getToken()) {
// this.findSelfInfo()
}
if (getToken()) {
// this.findSelfInfo()
}
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
components: {
headers,
tabbar
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
},*/
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,type) {
uni.navigateTo({
url: `/newPages/orderList/index?orderType=${orderType}&type=${type}&userId=${this.selfInfo.id}`
})
},
goMyInDetails(){
uni.navigateTo({
url: `/newPages/informationAdd/index?userId=${this.selfInfo.id}`
})
},
getUserInfo(){
request({
url: '/app-api/small/dl-drive-school-student/getByUserId',
method: 'GET',
params: {
userId: this.selfInfo.id,
},
}).then(res => {
this.userDetails = res.data
console.log('userDetails', this.userDetails)
if(this.userDetails.sourceUserId !== null){
this.getCoachDetails(this.userDetails.sourceUserId)
}
})
},
getCoachDetails(userId){
request({
url: '/app-api/dl-drive-school-coach-small/getCoachByUserId',
method: 'GET',
params: {
userId: userId
}
}).then(res => {
this.coachDetails = res.data
console.log('coachDetails', this.coachDetails);
})
}
toOrderPage(orderType, type) {
uni.navigateTo({
url: `/newPages/orderList/index?orderType=${orderType}&type=${type}&userId=${this.selfInfo.id}`
})
},
goMyInDetails() {
uni.navigateTo({
url: `/newPages/informationAdd/index?userId=${this.selfInfo.id}`
})
},
getUserInfo() {
request({
url: '/app-api/small/dl-drive-school-student/getByUserId',
method: 'GET',
params: {
userId: this.selfInfo.id,
},
}).then(res => {
this.userDetails = res.data
console.log('userDetails', this.userDetails)
if (this.userDetails.sourceUserId !== null) {
this.getCoachDetails(this.userDetails.sourceUserId)
}
})
},
getCoachDetails(userId) {
request({
url: '/app-api/dl-drive-school-coach-small/getCoachByUserId',
method: 'GET',
params: {
userId: userId
}
}).then(res => {
this.coachDetails = res.data
console.log('coachDetails', this.coachDetails);
})
}
}
};

View File

@ -1,7 +1,8 @@
<template>
<view class="page flex-col">
<view class="top_">
<u-swiper class="lunbo_" :list="swiperList" keyName="swiperPicture" radius="10" height="300" indicator indicatorMode="line"></u-swiper>
<u-swiper class="lunbo_" :list="swiperList" keyName="swiperPicture" radius="10" height="300" indicator
indicatorMode="line"></u-swiper>
</view>
<view class="section_2 flex-col">
<view class="list_1 flex-row">
@ -9,7 +10,7 @@
class="image-text_1 flex-col align-items-center justify-content-center;"
v-for="(item, index) in loopData0"
:key="index"
@click="handleItemClick(item)"
@click="handleItemClick(item)"
>
<image
class="label_1"
@ -51,7 +52,8 @@
<!-- 使用 scroll-view 包裹 SchoolInfo 组件 -->
<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)"/>
<SchoolInfo style="" v-for="(school, index) in schoolList" :key="index" :schoolInfo="school"
@click="goSchoolDetail(school)"/>
</scroll-view>
</view>
@ -132,7 +134,7 @@ export default {
// address: '168',
// features: ['', '']
// },
],
],
//
isTriggered: false,
pageNo: 1,
@ -155,7 +157,7 @@ export default {
pageSize: this.pageSize,
serviceCodes: 'jiaxiao'
},
tenantIdFlag : false
tenantIdFlag: false
}).then(res => {
res.data.records.forEach(item => {
item.features = ['有接送', '规模大']
@ -176,7 +178,7 @@ export default {
this.swiperList = res.data
console.log('轮播图', this.swiperList)
})
},
},
/**
* 上滑加载数据
*/
@ -209,39 +211,39 @@ export default {
goSchoolDetail(data) {
uni.navigateTo({
url: `/newPages/schoolDetail/index?id=${data.id}&tenantId=${data.tenantId}`,
// url: '/newPages/schoolDetail/index',
// 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;
}
}
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>
@ -275,7 +277,8 @@ export default {
flex-direction: column;
row-gap: 20rpx;
}
.top_{
.top_ {
//padding-top: 200rpx;
}
</style>

View File

@ -1,87 +1,94 @@
<template>
<view class="page flex-col">
<view class="block_1 flex-row">
</view>
<view class="block_2 flex-col">
<view class="group_1 flex-row">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_quanbudingdan/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
@click="handleBack()"
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_quanbudingdan/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
@click="handleBack()"
/>
<text class="text_1">订单</text>
</view>
<view class="list_1 flex-col">
<scroll-view
class="scroll-view"
scroll-y
:style="{ height: scrollHeight + 'px' }"
>
<view class="list-items_1 flex-col" v-for="(item, index) in orderList" :key="index" >
<view class="box_6 flex-row justify-between">
<text class="text_2">订单号: {{item.orderNo}}</text>
<view class="text-wrapper_1 flex-col" :style="{ background: statusMap[item.paymentStatus].background }">
<text class="text_3" :style="{ color: statusMap[item.paymentStatus].color }">{{ statusMap[item.paymentStatus].name}}</text>
<scroll-view
class="scroll-view"
scroll-y
:style="{ height: scrollHeight + 'px' }"
@scrolltolower="loadMoreData"
:refresher-enabled="true"
:refresher-triggered="isRefreshing"
@refresherrefresh="onRefresherrefresh"
>
<view class="list-items_1 flex-col" v-for="(item, index) in orderList" :key="index">
<view class="box_6 flex-row justify-between">
<text class="text_2">订单号: {{item.orderNo}}</text>
<view class="text-wrapper_1 flex-col" :style="{ background: statusMap[item.paymentStatus].background }">
<text class="text_3" :style="{ color: statusMap[item.paymentStatus].color }">{{
statusMap[item.paymentStatus].name}}
</text>
</view>
</view>
</view>
<view class="box_7 flex-row">
<view class="image-text_1 flex-row">
<image
class="image_3"
referrerpolicy="no-referrer"
src='/static/lanhu_shouye2gai/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png'
/>
<view class="text-group_1 flex-col justify-between">
<text class="text_4" >{{item.courseName}}</text>
<view class="text-wrapper_2 flex-row justify-between">
<text class="text_5" >{{item.reserveMoney}}</text>
<text class="text_6" >{{item.reserveMoney}}</text>
<view class="box_7 flex-row">
<view class="image-text_1 flex-row">
<image
class="image_3"
referrerpolicy="no-referrer"
:src="imageUrl + '/' + item.photo"
/>
<view class="text-group_1 flex-col justify-between">
<text class="text_4">{{item.courseName}}</text>
<view class="text-wrapper_2 flex-row justify-between">
<text class="text_5">{{item.reserveMoney}}</text>
<text class="text_6">{{item.reserveMoney}}</text>
</view>
</view>
<view class="text-wrapper_3 flex-col">
<text class="text_7">{{typeFormat(item.type).code}}</text>
</view>
<view class="text-wrapper_4 flex-col">
<text class="text_8">{{typeFormat(item.type).desc}}</text>
</view>
</view>
<view class="text-wrapper_3 flex-col">
<text class="text_7" >{{item.courseType}}</text>
</view>
<view class="text-wrapper_4 flex-col">
<text class="text_8" >{{item.courseType}}</text>
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
<view class="group_2 flex-col justify-end">
<view class="text-wrapper_5 flex-row">
<text
class="text_9"
:class="{ 'active-blue': type === 1 }"
@click="changeOrderType('',1)"
>
全部订单
</text>
<text
class="text_10"
:class="{ 'active-blue': type === 2 }"
@click="changeOrderType(2,2)"
>
已付款
</text>
<text
class="text_11"
:class="{ 'active-blue': type === 3 }"
@click="changeOrderType(4,3)"
>
已面签
</text>
<text
class="text_12"
:class="{ 'active-blue': type === 4 }"
@click="changeOrderType(2,4)"
>
已报名
</text>
class="text_9"
:class="{ 'active-blue': type === 1 }"
@click="changeOrderType('',1)"
>
全部订单
</text>
<text
class="text_10"
:class="{ 'active-blue': type === 2 }"
@click="changeOrderType(2,2)"
>
已付款
</text>
<text
class="text_11"
:class="{ 'active-blue': type === 3 }"
@click="changeOrderType(4,3)"
>
已面签
</text>
<text
class="text_12"
:class="{ 'active-blue': type === 4 }"
@click="changeOrderType(2,4)"
>
已报名
</text>
</view>
<view class="box_8 flex-row">
<!-- <view class="group_8 flex-col"></view> -->
@ -92,9 +99,11 @@
</template>
<script>
import request from '@/utils/request.js'
export default {
data() {
return {
imageUrl: this.$imagesUrl,
loopData0: [
{
lanhutext0: '订单号44782938752039585',
@ -136,106 +145,199 @@ export default {
lanhutext6: '自动挡'
}
],
type: null,
orderType: null,
scrollHeight: 0,
userId:null,
orderList:[],
type: null,
orderType: null,
scrollHeight: 0,
userId: null,
orderList: [],
constants: {},
courseDetails: {},
statusMap: {
5: { name: '已完成', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
4: { name: '已面签', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
3: { name: '待面签', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
2: { name: '已付款', background: 'rgba(255,244,228,1)', color: 'rgba(237,162,58,1)' },
1: { name: '未付款', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
0: { name: '待支付', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
}
courseDetails: {},
pageNo: 1,
pageSize: 10,
total: 0,
loading: false,
isRefreshing: false,
statusMap: {
5: {name: '已完成', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'},
4: {name: '已面签', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'},
3: {name: '待面签', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'},
2: {name: '已付款', background: 'rgba(255,244,228,1)', color: 'rgba(237,162,58,1)'},
1: {name: '未付款', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'},
0: {name: '待支付', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)'},
}
};
},
onLoad(options){
// this.orderType = options.orderType; // orderType
this.orderType = options.orderType ? parseInt(options.orderType) : '';
this.type = options.type ? parseInt(options.type) : 1;
this.userId = options.userId;
// this.type = options.type;
// this.getUserOrderDetails(this.orderType); //
// this.getUserOrderDetails(options.orderType);
console.log('options',options)
console.log('type', this.type)
console.log('type', this.type === 2)
console.log('orderType',this.orderType)
console.log('orderType',this.orderType === 2)
this.changeOrderType(this.orderType, this.type)
onLoad(options) {
// this.orderType = options.orderType; // orderType
this.orderType = options.orderType ? parseInt(options.orderType) : '';
this.type = options.type ? parseInt(options.type) : 1;
this.userId = options.userId;
// this.type = options.type;
// this.getUserOrderDetails(this.orderType); //
// this.getUserOrderDetails(options.orderType);
console.log('options', options)
console.log('type', this.type)
console.log('type', this.type === 2)
console.log('orderType', this.orderType)
console.log('orderType', this.orderType === 2)
this.changeOrderType(this.orderType, this.type)
},
onReady() {
//
this.calculateScrollHeight();
},
//
this.calculateScrollHeight();
},
mounted() {
// this.updateUnderlinePosition(this.orderType);
},
// this.updateUnderlinePosition(this.orderType);
},
methods: {
handleBack() {
uni.navigateBack({
delta: 1
});
},
getUserOrderDetails(paymentStatus) {
console.log(paymentStatus)
console.log(this.userId)
request({
url: '/app-api/small/drive/school-course-order/page',
method: 'GET',
params: {
userId: this.userId,
paymentStatus:paymentStatus
},
tenantIdFlag : false
}).then(res => {
this.orderList = res.data.records;
console.log('订单信息',res.data)
});
},
changeOrderType(orderType,type) {
this.orderType = orderType;
this.type = type;
console.log('type',type)
console.log('orderType',orderType)
this.getUserOrderDetails(orderType); // Tab
// this.updateUnderlinePosition(type);
},
getStatusStyle(status) {
return this.statusMap[status] || { name: '未知状态', background: '', color: '' };
},
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;
})
},
calculateScrollHeight() {
//
const screenHeight = uni.getSystemInfoSync().windowHeight;
//
const topHeight = 160;
//
this.scrollHeight = screenHeight - topHeight;
},
/* updateUnderlinePosition(type) {
const index = parseInt(type) - 1; // 0
const tabWidth = uni.getSystemInfoSync().windowWidth / 4; // 4
this.underlinePosition = index * tabWidth;
}, */
handleBack() {
uni.navigateBack({
delta: 1
});
},
/**
* 上滑加载数据
*/
loadMoreData() {
//
if (this.loading || this.pageNo * this.pageSize >= this.total) {
return;
}
this.loading = true;
this.pageNo++;
this.getUserOrderDetails(this.orderType, false);
},
/**
* 下拉刷新数据
*/
onRefresherrefresh() {
if (this.isRefreshing) return;
this.isRefreshing = true;
//
this.pageNo = 1;
this.getUserOrderDetails(this.orderType, true);
},
/* getUserOrderDetails(paymentStatus) {
console.log(paymentStatus)
console.log(this.userId)
request({
url: '/app-api/small/drive/school-course-order/page',
method: 'GET',
params: {
userId: this.userId,
paymentStatus:paymentStatus
},
tenantIdFlag : false
}).then(res => {
this.orderList = res.data.records;
console.log('订单信息',res.data)
});
}, */
getUserOrderDetails(paymentStatus, isRefresh = false) {
if (!isRefresh && this.loading) return;
request({
url: '/app-api/small/drive/school-course-order/page',
method: 'GET',
params: {
userId: this.userId,
paymentStatus: paymentStatus,
pageNo: this.pageNo,
pageSize: this.pageSize
},
tenantIdFlag: false
}).then(res => {
if (isRefresh) {
//
this.orderList = res.data.records;
this.isRefreshing = false;
//
uni.stopPullDownRefresh();
} else if (this.pageNo === 1) {
// tab
this.orderList = res.data.records;
} else {
//
this.orderList = [...this.orderList, ...res.data.records];
}
this.total = res.data.total;
this.loading = false;
console.log('订单信息', res.data);
}).catch(err => {
this.loading = false;
this.isRefreshing = false;
if (isRefresh) {
uni.stopPullDownRefresh();
}
console.error('获取订单失败', err);
});
},
changeOrderType(orderType, type) {
this.orderType = orderType;
this.type = type;
this.pageNo = 1;
console.log('type', type)
console.log('orderType', orderType)
this.getUserOrderDetails(orderType); // Tab
// this.updateUnderlinePosition(type);
},
getStatusStyle(status) {
return this.statusMap[status] || {name: '未知状态', background: '', color: ''};
},
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;
})
},
calculateScrollHeight() {
//
const screenHeight = uni.getSystemInfoSync().windowHeight;
//
const topHeight = 160;
//
this.scrollHeight = screenHeight - topHeight;
},
/* updateUnderlinePosition(type) {
const index = parseInt(type) - 1; // 0
const tabWidth = uni.getSystemInfoSync().windowWidth / 4; // 4
this.underlinePosition = index * tabWidth;
}, */
typeFormat(type) {
const typeMap = {
'1': {code: 'C1', desc: '小型手动挡汽车', full: 'C1小型手动挡汽车'},
'2': {code: 'C2', desc: '小型自动档汽车', full: 'C2小型自动档汽车'},
'3': {code: 'B1', desc: '中型客车', full: 'B1中型客车'},
'4': {code: 'B2', desc: '大型货车', full: 'B2大型货车'},
'5': {code: 'A1', desc: '大型客车', full: 'A1大型客车'},
'6': {code: 'A2', desc: '牵引车', full: 'A2牵引车'},
'7': {code: 'A3', desc: '城市公交车', full: 'A3城市公交车'},
'8': {code: 'D', desc: '三轮摩托车', full: 'D三轮摩托车'},
'9': {code: 'E', desc: '两轮摩托车', full: 'E两轮摩托车'},
'10': {code: 'F', desc: '轻便摩托车', full: 'F轻便摩托车'}
};
const typeStr = typeof type === 'number' ? type.toString() : type;
return typeMap[typeStr] || {code: '未知', desc: '未知类型', full: '未知类型'};
}
}
};
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +1,26 @@
<template>
<view class="page flex-col">
<view class="group_1 flex-row">
</view>
<view class="group_2 flex-row">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
@click="handleBack"
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNG53ddee177d4f9800624b95a9ec941112.png"
@click="handleBack"
/>
<text class="text_2">驾校</text>
</view>
<view class="group_4 flex-col">
<image
style="width: 100%; height: 100%;"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGcd54efcc9a8c89af0ef99c8275464828.png"
/>
</view>
<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">{{ schoolDetails.corpName }}</text>
<view class="text-wrapper_1 flex-row justify-between">
@ -36,47 +34,47 @@
</view>
<view class="image-wrapper_2 flex-col">
<image
class="label_2"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb598f2a62156745f7ba827352fd17464.png"
class="label_2"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb598f2a62156745f7ba827352fd17464.png"
/>
</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="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>
@ -85,9 +83,9 @@
<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"
class="image_2"
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + item.photo"
/>
<view class="text-group_2 flex-col justify-between">
<text class="text_9">{{ item.tittle }}</text>
@ -104,19 +102,19 @@
</view>
</view>
</view>
<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"
class="thumbnail_2"
referrerpolicy="no-referrer"
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb5045194768d2baa618848ea60e5a9e4.png"
/>
</view>
</view>
</view>
<view class="group_8 flex-col">
<view class="group_9 flex-row justify-between">
<view class="block_3 flex-col"></view>
@ -125,9 +123,9 @@
<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"
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>
@ -138,9 +136,9 @@
</view>
<text class="text_28">学员&nbsp;598</text>
</view>
</view>
</view>
</template>
<script>
@ -150,116 +148,116 @@ import config from "@/config.js"
export default {
data() {
return {
imagesUrl: config.imagesUrl,
imagesUrl: config.imagesUrl,
constants: {},
schoolId: undefined,
tenantId: undefined,
tenantId: undefined,
schoolDetails: {},
schoolClassList: [],
schoolAllClassList: [],
schoolCoachList: [],
schoolClassList: [],
schoolAllClassList: [],
schoolCoachList: [],
};
},
onLoad(options) {
if (options.id) {
this.schoolId = options.id;
this.tenantId = options.tenantId
console.log("首页传入数据", options)
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()
console.log("驾校租户id", this.tenantId)
this.getSchoolDetails();
this.getSchoolClass();
this.getSchoolAllClass()
this.getSchoolCoach()
}
},
methods: {
handleBack() {
uni.navigateBack({
delta: 1
});
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);
});
request({
url: '/userClient/base/companySmallProgram/noTenantIdGet',
method: 'GET',
params: {
id: this.schoolId
},
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}`,
});
},
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>

View File

@ -1,14 +1,16 @@
<template>
<view class="page flex-col">
<view class="container">
<headers titles="驾校"><uni-icons @click="goback()" type="arrow-left" color="#000000"
size="22px"></uni-icons></headers>
<headers titles="驾校">
<uni-icons @click="goback()" type="arrow-left" color="#000000"
size="22px"></uni-icons>
</headers>
</view>
<view class="itemContent">
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<!-- 使用 SchoolInfo 组件渲染驾校信息 -->
<SchoolInfo v-for="(school, index) in schoolList" :key="index" :schoolInfo="school" />
<SchoolInfo v-for="(school, index) in schoolList" :key="index" :schoolInfo="school"/>
</scroll-view>
</view>
</view>
@ -98,7 +100,7 @@ export default {
})
this.schoolList = this.schoolList.concat(res.data.records)
this.total = res.data.total
console.log('长度',this.schoolList.length)
console.log('长度', this.schoolList.length)
this.isTriggered = false
})
},
@ -120,7 +122,7 @@ export default {
/**
* 下拉刷新数据
*/
onRefresherrefresh(){
onRefresherrefresh() {
this.isTriggered = true
this.pageNo = 1
this.total = 0
@ -174,13 +176,15 @@ export default {
<style lang='scss'>
@import '../common/common.scss';
@import './assets/style/index.rpx.scss';
.container {
width: 100%;
background: #f4f5f6;
box-sizing: border-box;
padding-top: 88px;
}
.itemContent{
.itemContent {
padding: 30rpx 0;
display: flex;
flex-direction: column;

View File

@ -1,160 +1,163 @@
<template>
<view class="content">
<view class="container">
<headers :titles="titles"><uni-icons type="arrow-left" color="#000000" size="22px"></uni-icons></headers>
<view class="f-box">
<u-parse :content="content"></u-parse>
</view>
<view class="content">
<view class="container">
<headers :titles="titles">
<uni-icons type="arrow-left" color="#000000" size="22px"></uni-icons>
</headers>
<view class="f-box">
<u-parse :content="content"></u-parse>
</view>
<jushi-signature :settings="settings" base64 @cancel="signatureCancel"
@change="signatureChange"></jushi-signature>
</view>
<jushi-signature :settings="settings" base64 @cancel="signatureCancel"
@change="signatureChange"></jushi-signature>
</view>
</view>
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
import request from '@/utils/request.js'
export default {
data() {
return {
titles: "合同",
settings: { //
width: '750', //
height: '500', //
lineWidth: 4, //线
textColor: '#000' //
},
contentTemp: '',
content: '',
List: [],
show: false,
status: 'loading',
name: '',
Address: '',
tenantId: '',
contractData: {},
userData: {},
import headers from '../../components/header/headers.vue'
import request from '@/utils/request.js'
}
},
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);
export default {
data() {
return {
titles: "合同",
settings: { //
width: '750', //
height: '500', //
lineWidth: 4, //线
textColor: '#000' //
},
contentTemp: '',
content: '',
List: [],
show: false,
status: 'loading',
name: '',
Address: '',
tenantId: '',
contractData: {},
userData: {},
}
},
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()
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
components: {
headers
},
methods: {
async getdriveSchool() {
let res = await request({
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.userData = uni.getStorageSync('userInfo');
},
onShow() {
this.getdriveSchool()
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
components: {
headers
},
methods: {
async getdriveSchool() {
let res = await request({
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() {
uni.navigateBack()
},
async signatureChange(e) {
this.imgUrl = e
let res = await request({
url: '/app-api/small/driveSchool/obtainContract',
method: 'post',
data: {
userName: this.contractData.name,
tenantId: this.tenantId,
userId: this.userData.id,
content: this.content,
}
})
console.log(res);
uni.showToast({
title: '报名成功',
duration: 3000
// 线
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>`);
})
setTimeout(function () {
//
uni.navigateTo({
url: '/newPages/newIndex/index'
})
}, 3000); // 30003
// const index = e.lastIndexOf("/")
// let fileName = e.substring(index + 1, e.length)
// this.uploadFile(this.imgUrl, fileName)
},
},
goback() {
uni.navigateBack()
},
signatureCancel() {
uni.navigateBack()
},
async signatureChange(e) {
this.imgUrl = e
let res = await request({
url: '/app-api/small/driveSchool/obtainContract',
method: 'post',
data: {
userName: this.contractData.name,
tenantId: this.tenantId,
userId: this.userData.id,
content: this.content,
}
})
console.log(res);
uni.showToast({
title: '报名成功',
duration: 3000
})
setTimeout(function() {
//
uni.navigateTo({
url: '/newPages/newIndex/index'
})
}, 3000); // 30003
// const index = e.lastIndexOf("/")
// let fileName = e.substring(index + 1, e.length)
// this.uploadFile(this.imgUrl, fileName)
},
goback() {
uni.navigateBack()
},
}
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
.content {
background: #f4f5f6;
height: 100vh;
}
height: 100vh;
}
.container {
width: 100%;
background: #f4f5f6;
box-sizing: border-box;
padding-top: 88px;
}
.container {
width: 100%;
background: #f4f5f6;
box-sizing: border-box;
padding-top: 88px;
}
.f-box {
width: 100%;
box-sizing: border-box;
padding: 15px;
}
.f-box {
width: 100%;
box-sizing: border-box;
padding: 15px;
}
</style>