Merge remote-tracking branch 'origin/master'

This commit is contained in:
Lx 2025-04-09 18:03:02 +08:00
commit a40070c88e
6 changed files with 132 additions and 76 deletions

View File

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

View File

@ -157,6 +157,10 @@ export default {
this.userInfo = getLocalUserInfo() this.userInfo = getLocalUserInfo()
this.getExamList() this.getExamList()
this.getCourseList() this.getCourseList()
//
uni.$on('refresh', () => {
this.getExamList()
})
}, },
onReady() { onReady() {
// //

View File

@ -21,7 +21,7 @@
<text v-if="!selfInfo.username" class="text_3">登录将开启全部服务</text> <text v-if="!selfInfo.username" class="text_3">登录将开启全部服务</text>
</view> </view>
</view> </view>
<view class="image-text_2 flex-col justify-between"> <view class="image-text_2 flex-col justify-between" @click="toMyQrCode()">
<image <image
class="label_1" class="label_1"
referrerpolicy="no-referrer" referrerpolicy="no-referrer"
@ -123,12 +123,19 @@
</view> </view>
</view> </view>
<tabbar :msg='msg'></tabbar> <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> </view>
</template> </template>
<script> <script>
import headers from '../../components/header/headers.vue' import headers from '../../components/header/headers.vue'
import tabbar from '../../components/tabbar/tabbar.vue' import tabbar from '../../components/tabbar/tabbar.vue'
import request from '@/utils/request.js' import request from '@/utils/request.js'
import UQRCode from 'uqrcodejs';
import { import {
getLocalUserInfo, getLocalUserInfo,
getToken, getToken,
@ -146,6 +153,8 @@ export default {
userDetails: {}, userDetails: {},
orderList: {}, orderList: {},
processList: {}, processList: {},
showQrCode: false,
isCreateQrCode:true,
loopData: [ loopData: [
{ {
url: '/static/myImgs/alreadyPaid.png', url: '/static/myImgs/alreadyPaid.png',
@ -211,6 +220,26 @@ export default {
url: "/pages/login/login" 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() { /*async findSelfInfo() {
let res = await request({ let res = await request({
url: `/app-api/small/driving/findSelfInfo`, url: `/app-api/small/driving/findSelfInfo`,
@ -219,6 +248,9 @@ export default {
console.log(res, 138); console.log(res, 138);
this.selfInfo = res this.selfInfo = res
},*/ },*/
toMyQrCode() {
this.showQrCode = true
},
toOrderPage(orderType, type) { toOrderPage(orderType, type) {
uni.navigateTo({ uni.navigateTo({
@ -232,7 +264,6 @@ export default {
}, },
getUserInfo() { getUserInfo() {
request({ request({
url: '/app-api/small/dl-drive-school-student/getUsersInfo', url: '/app-api/small/dl-drive-school-student/getUsersInfo',
@ -242,11 +273,21 @@ export default {
if (this.userInfo != null) { if (this.userInfo != null) {
setLocalUserInfo(this.selfInfo) setLocalUserInfo(this.selfInfo)
} }
this.getOrder() this.getOrder()
this.getStudentInfo()
console.log('userDetails', this.selfInfo) 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) { getCoachDetails(coachId) {
request({ request({

View File

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

View File

@ -71,6 +71,7 @@
<view class="box_5 flex-col"></view> <view class="box_5 flex-col"></view>
<text class="text_8">报名类型</text> <text class="text_8">报名类型</text>
</view> </view>
<view v-if="schoolClassList.length > 0">
<view class="box_6 flex-row" v-for="(item, index) in schoolClassList" :key="index" @click="goToDetail(item.id)"> <view class="box_6 flex-row" v-for="(item, index) in schoolClassList" :key="index" @click="goToDetail(item.id)">
<view class="image-text_1 flex-row"> <view class="image-text_1 flex-row">
<image <image
@ -84,16 +85,12 @@
<text class="text_10">{{ item.price }}</text> <text class="text_10">{{ item.price }}</text>
</view> </view>
</view> </view>
<!-- <view class="text-wrapper_3 flex-col">-->
<!-- -->
<!-- </view>-->
<view class="text-wrapper_4 flex-col"> <view class="text-wrapper_4 flex-col">
<view style="display: flex"> <view style="display: flex">
<text class="text_13" style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{ <text class="text_13" style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{
item.tittle item.tittle
}} }}
</text> </text>
<text class="text-wrapper_3 text_13" style="color: black;padding: 5rpx 15rpx">{{ item.type }}</text> <text class="text-wrapper_3 text_13" style="color: black;padding: 5rpx 15rpx">{{ item.type }}</text>
</view> </view>
</view> </view>
@ -111,12 +108,21 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else>
<u-empty
mode="data"
text="该驾校没有课程..."
>
</u-empty>
</view>
</view>
<view class="group_8 flex-col"> <view class="group_8 flex-col">
<view class="group_9 flex-row justify-between"> <view class="group_9 flex-row justify-between">
<view class="block_3 flex-col"></view> <view class="block_3 flex-col"></view>
<text class="text_24">团队教练</text> <text class="text_24">团队教练</text>
</view> </view>
<view v-if="schoolCoachList.length > 0">
<view class="group_10 flex-row justify-between" v-for="(item, index) in schoolCoachList" :key="index"> <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"> <view class="image-text_3 flex-row justify-between">
<image <image
@ -126,14 +132,17 @@
/> />
<view class="text-group_4 flex-col justify-between"> <view class="text-group_4 flex-col justify-between">
<text class="text_25">{{ item.name }}</text> <text class="text_25">{{ item.name }}</text>
<!-- <text class="text_26">5.0</text>-->
<text class="text_27">教龄&nbsp;{{ item.seniority }}</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> </view>
<!-- <text class="text_28">学员&nbsp;598</text> --> </view>
</view>
<view v-else>
<u-empty
mode="list"
text="该驾校没有团队教练..."
>
</u-empty>
</view> </view>
</view> </view>

View File

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