This commit is contained in:
许允枞 2025-04-09 16:01:16 +08:00
parent 69ded603ce
commit e8330e197c
5 changed files with 128 additions and 76 deletions

View File

@ -17,7 +17,7 @@
<text class="text_3"></text>
<text class="text_4">{{ courseDetails.price ? courseDetails.price.toFixed(2) : '--' }}</text>
</view>
<text class="text_5">3000.00</text>
<!-- <text class="text_5">3000.00</text>-->
</view>
<text class="text_6">{{ courseDetails.name }}</text>
<view class="section_3 flex-row justify-between">
@ -28,7 +28,7 @@
<text class="text_8">{{ courseDetails.type }}</text>
</view>
</view>
<text class="text_9">兄弟驾校/周一至周日&nbsp;08:00-18:00</text>
<text class="text_9">周一至周日&nbsp;08:00-18:00</text>
</view>
<view class="group_5 flex-col">
<view class="section_4 flex-row justify-between">

View File

@ -21,7 +21,7 @@
<text v-if="!selfInfo.username" class="text_3">登录将开启全部服务</text>
</view>
</view>
<view class="image-text_2 flex-col justify-between">
<view class="image-text_2 flex-col justify-between" @click="toMyQrCode()">
<image
class="label_1"
referrerpolicy="no-referrer"
@ -123,12 +123,19 @@
</view>
</view>
<tabbar :msg='msg'></tabbar>
<u-popup round="20" :show="showQrCode" @close="closeQrCode" mode="center" zoom="false" @open="openQrCode">
<view style="padding: 50rpx">
<canvas id="qrcode" canvas-id="qrcode" style="width: 600rpx;height:600rpx;"/>
</view>
<span style="text-align: center">学车码</span>
</u-popup>
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
import tabbar from '../../components/tabbar/tabbar.vue'
import request from '@/utils/request.js'
import UQRCode from 'uqrcodejs';
import {
getLocalUserInfo,
getToken,
@ -141,11 +148,13 @@ export default {
return {
msg: "3",
selfInfo: {},
selfInfoLocal: {},
selfInfoLocal: {},
coachDetails: {},
userDetails: {},
orderList: {},
processList: {},
showQrCode: false,
isCreateQrCode:true,
loopData: [
{
url: '/static/myImgs/alreadyPaid.png',
@ -190,7 +199,7 @@ export default {
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
this.getUserInfo()
this.getUserInfo()
},
onReachBottom() {
// this.show = true
@ -211,6 +220,26 @@ export default {
url: "/pages/login/login"
})
},
createQrCode(data) {
const qr = new UQRCode();
qr.data = data;
qr.size = 300;
qr.make();
const ctx = uni.createCanvasContext('qrcode', this); // thisvue3 this getCurrentInstance()?.proxy
qr.canvasContext = ctx;
qr.drawCanvas();
this.isCreateQrCode = false
},
closeQrCode() {
this.showQrCode = false
},
openQrCode(){
console.log(this.userDetails,'202222')
//
if (this.isCreateQrCode){
this.createQrCode(this.userDetails.uniqueCode)
}
},
/*async findSelfInfo() {
let res = await request({
url: `/app-api/small/driving/findSelfInfo`,
@ -219,6 +248,9 @@ export default {
console.log(res, 138);
this.selfInfo = res
},*/
toMyQrCode() {
this.showQrCode = true
},
toOrderPage(orderType, type) {
uni.navigateTo({
@ -232,21 +264,30 @@ export default {
},
getUserInfo() {
request({
url: '/app-api/small/dl-drive-school-student/getUsersInfo',
method: 'GET',
}).then(res => {
this.selfInfo = res.data
if(this.userInfo != null){
setLocalUserInfo(this.selfInfo)
}
this.getOrder()
console.log('userDetails', this.selfInfo)
})
},
getUserInfo() {
request({
url: '/app-api/small/dl-drive-school-student/getUsersInfo',
method: 'GET',
}).then(res => {
this.selfInfo = res.data
if (this.userInfo != null) {
setLocalUserInfo(this.selfInfo)
}
this.getOrder()
this.getStudentInfo()
console.log('userDetails', this.selfInfo)
})
},
getStudentInfo(){
request({
url: '/app-api/small/dl-drive-school-student/getByUserId',
method: 'GET',
params: { userId: this.selfInfo.id }
}).then(res => {
console.log('userDetailsRes', res)
this.userDetails = { ...res.data };
});
},
getCoachDetails(coachId) {
request({
@ -269,7 +310,7 @@ export default {
this.orderList = res.data
if (this.orderList.length > 0) {
console.log('orderList', this.orderList)
this.getProcess(this.orderList[0].courseId)
this.getProcess(this.orderList[0].courseId)
}
})
@ -294,12 +335,12 @@ export default {
if (statusOneItems.length === 1) {
// 2.
result = statusOneItems[0];
this.getCoachDetails(result.coachId)
this.getCoachDetails(result.coachId)
} else if (statusOneItems.length > 1) {
// 3. subjectint subject
const sortedItems = [...statusOneItems].sort((a, b) => b.subject - a.subject);
result = sortedItems[0];
this.getCoachDetails(result.coachId)
this.getCoachDetails(result.coachId)
}
// result null
}

View File

@ -2,7 +2,8 @@
background-color: rgba(242, 244, 248, 1);
position: relative;
width: 750rpx;
height: 2208rpx;
min-height: 100vh;
//height: 2208rpx;
overflow: hidden;
.group_1 {
background-color: rgba(255, 255, 255, 1);
@ -217,7 +218,7 @@
.group_6 {
background-color: rgba(255, 255, 255, 1);
border-radius: 8px;
height: 642rpx;
//height: 642rpx;
margin-left: 32rpx;
width: 686rpx;
justify-content: flex-center;
@ -577,7 +578,7 @@
.group_8 {
background-color: rgba(255, 255, 255, 1);
border-radius: 8px;
height: 560rpx;
//height: 560rpx;
width: 686rpx;
justify-content: flex-center;
margin: 20rpx 0 24rpx 32rpx;

View File

@ -71,44 +71,49 @@
<view class="box_5 flex-col"></view>
<text class="text_8">报名类型</text>
</view>
<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"
/>
<view class="text-group_2 flex-col justify-between">
<text class="text_9">{{ item.name }}</text>
<view class="text-wrapper_2 flex-row justify-between">
<text class="text_10">{{ item.price }}</text>
<view v-if="schoolClassList.length > 0">
<view class="box_6 flex-row" v-for="(item, index) in schoolClassList" :key="index" @click="goToDetail(item.id)">
<view class="image-text_1 flex-row">
<image
class="image_2"
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + item.photo"
/>
<view class="text-group_2 flex-col justify-between">
<text class="text_9">{{ item.name }}</text>
<view class="text-wrapper_2 flex-row justify-between">
<text class="text_10">{{ item.price }}</text>
</view>
</view>
<view class="text-wrapper_4 flex-col">
<view style="display: flex">
<text class="text_13" style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{
item.tittle
}}
</text>
<text class="text-wrapper_3 text_13" style="color: black;padding: 5rpx 15rpx">{{ item.type }}</text>
</view>
</view>
</view>
<!-- <view class="text-wrapper_3 flex-col">-->
<!-- -->
<!-- </view>-->
<view class="text-wrapper_4 flex-col">
<view style="display: flex">
<text class="text_13" style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{
item.tittle
}}
</text>
</view>
<text class="text-wrapper_3 text_13" style="color: black;padding: 5rpx 15rpx">{{ item.type }}</text>
</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"
/>
</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"
/>
</view>
<view v-else>
<u-empty
mode="data"
text="该驾校没有课程..."
>
</u-empty>
</view>
</view>
@ -117,23 +122,27 @@
<view class="block_3 flex-col"></view>
<text class="text_24">团队教练</text>
</view>
<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"
/>
<view class="text-group_4 flex-col justify-between">
<text class="text_25">{{ item.name }}</text>
<!-- <text class="text_26">5.0</text>-->
<text class="text_27">教龄&nbsp;{{ item.seniority }}</text>
<view v-if="schoolCoachList.length > 0">
<view class="group_10 flex-row justify-between" v-for="(item, index) in schoolCoachList" :key="index">
<view class="image-text_3 flex-row justify-between">
<image
class="label_3"
referrerpolicy="no-referrer"
:src="imagesUrl + '/' + item.image"
/>
<view class="text-group_4 flex-col justify-between">
<text class="text_25">{{ item.name }}</text>
<text class="text_27">教龄&nbsp;{{ item.seniority }}</text>
</view>
</view>
<!-- <view class="box_13 flex-col">-->
<!-- <u-rate :count="1" activeColor="#eda23a"></u-rate>-->
<!-- </view>-->
</view>
<!-- <text class="text_28">学员&nbsp;598</text> -->
</view>
<view v-else>
<u-empty
mode="list"
text="该驾校没有团队教练..."
>
</u-empty>
</view>
</view>

View File

@ -4,6 +4,7 @@
"dommatrix": "^1.0.3",
"pdfh5": "^1.4.9",
"qs": "^6.12.1",
"uqrcodejs": "^4.0.7",
"web-streams-polyfill": "^3.2.1"
}
}