更新
This commit is contained in:
parent
69ded603ce
commit
e8330e197c
@ -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">兄弟驾校/周一至周日 08:00-18:00</text>
|
<text class="text_9">周一至周日 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">
|
||||||
|
@ -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,
|
||||||
@ -141,11 +148,13 @@ export default {
|
|||||||
return {
|
return {
|
||||||
msg: "3",
|
msg: "3",
|
||||||
selfInfo: {},
|
selfInfo: {},
|
||||||
selfInfoLocal: {},
|
selfInfoLocal: {},
|
||||||
coachDetails: {},
|
coachDetails: {},
|
||||||
userDetails: {},
|
userDetails: {},
|
||||||
orderList: {},
|
orderList: {},
|
||||||
processList: {},
|
processList: {},
|
||||||
|
showQrCode: false,
|
||||||
|
isCreateQrCode:true,
|
||||||
loopData: [
|
loopData: [
|
||||||
{
|
{
|
||||||
url: '/static/myImgs/alreadyPaid.png',
|
url: '/static/myImgs/alreadyPaid.png',
|
||||||
@ -190,7 +199,7 @@ export default {
|
|||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
console.log("刷新");
|
console.log("刷新");
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
// this.show = true
|
// this.show = true
|
||||||
@ -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); // 组件内调用需传this,vue3 中 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({
|
||||||
@ -231,22 +263,31 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
getUserInfo() {
|
||||||
getUserInfo() {
|
request({
|
||||||
request({
|
url: '/app-api/small/dl-drive-school-student/getUsersInfo',
|
||||||
url: '/app-api/small/dl-drive-school-student/getUsersInfo',
|
method: 'GET',
|
||||||
method: 'GET',
|
}).then(res => {
|
||||||
}).then(res => {
|
this.selfInfo = res.data
|
||||||
this.selfInfo = res.data
|
if (this.userInfo != null) {
|
||||||
if(this.userInfo != null){
|
setLocalUserInfo(this.selfInfo)
|
||||||
setLocalUserInfo(this.selfInfo)
|
}
|
||||||
}
|
this.getOrder()
|
||||||
|
this.getStudentInfo()
|
||||||
this.getOrder()
|
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({
|
||||||
@ -260,7 +301,7 @@ export default {
|
|||||||
console.log('coachDetails', this.coachDetails);
|
console.log('coachDetails', this.coachDetails);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getOrder() {
|
getOrder() {
|
||||||
request({
|
request({
|
||||||
url: '/app-api/small/drive/school-course-order/getCourseByLoginUser',
|
url: '/app-api/small/drive/school-course-order/getCourseByLoginUser',
|
||||||
@ -269,12 +310,12 @@ export default {
|
|||||||
this.orderList = res.data
|
this.orderList = res.data
|
||||||
if (this.orderList.length > 0) {
|
if (this.orderList.length > 0) {
|
||||||
console.log('orderList', this.orderList)
|
console.log('orderList', this.orderList)
|
||||||
this.getProcess(this.orderList[0].courseId)
|
this.getProcess(this.orderList[0].courseId)
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getProcess(courseId) {
|
getProcess(courseId) {
|
||||||
request({
|
request({
|
||||||
url: '/app-api/process/getAllByCourseId',
|
url: '/app-api/process/getAllByCourseId',
|
||||||
@ -294,12 +335,12 @@ export default {
|
|||||||
if (statusOneItems.length === 1) {
|
if (statusOneItems.length === 1) {
|
||||||
// 2. 如果只有一条,直接赋值
|
// 2. 如果只有一条,直接赋值
|
||||||
result = statusOneItems[0];
|
result = statusOneItems[0];
|
||||||
this.getCoachDetails(result.coachId)
|
this.getCoachDetails(result.coachId)
|
||||||
} else if (statusOneItems.length > 1) {
|
} else if (statusOneItems.length > 1) {
|
||||||
// 3. 如果有多条,按 subject(int 类型)降序排序,取第一条(subject 最大的)
|
// 3. 如果有多条,按 subject(int 类型)降序排序,取第一条(subject 最大的)
|
||||||
const sortedItems = [...statusOneItems].sort((a, b) => b.subject - a.subject);
|
const sortedItems = [...statusOneItems].sort((a, b) => b.subject - a.subject);
|
||||||
result = sortedItems[0];
|
result = sortedItems[0];
|
||||||
this.getCoachDetails(result.coachId)
|
this.getCoachDetails(result.coachId)
|
||||||
}
|
}
|
||||||
// 如果没有数据,result 保持 null
|
// 如果没有数据,result 保持 null
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -71,44 +71,49 @@
|
|||||||
<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 class="box_6 flex-row" v-for="(item, index) in schoolClassList" :key="index" @click="goToDetail(item.id)">
|
<view v-if="schoolClassList.length > 0">
|
||||||
<view class="image-text_1 flex-row">
|
<view class="box_6 flex-row" v-for="(item, index) in schoolClassList" :key="index" @click="goToDetail(item.id)">
|
||||||
<image
|
<view class="image-text_1 flex-row">
|
||||||
class="image_2"
|
<image
|
||||||
referrerpolicy="no-referrer"
|
class="image_2"
|
||||||
:src="imagesUrl + '/' + item.photo"
|
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-group_2 flex-col justify-between">
|
||||||
<view class="text-wrapper_2 flex-row justify-between">
|
<text class="text_9">{{ item.name }}</text>
|
||||||
<text class="text_10">¥{{ item.price }}</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>
|
</view>
|
||||||
<!-- <view class="text-wrapper_3 flex-col">-->
|
</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 class="box_12 flex-row">
|
||||||
</view>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else>
|
||||||
<view class="box_12 flex-row">
|
<u-empty
|
||||||
<view class="image-text_2 flex-row justify-between" @click="goClassList()">
|
mode="data"
|
||||||
<text class="text-group_3">查看全部班型({{ schoolAllClassList.length }})</text>
|
text="该驾校没有课程..."
|
||||||
<image
|
>
|
||||||
class="thumbnail_2"
|
</u-empty>
|
||||||
referrerpolicy="no-referrer"
|
|
||||||
src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGb5045194768d2baa618848ea60e5a9e4.png"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -117,23 +122,27 @@
|
|||||||
<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 class="group_10 flex-row justify-between" v-for="(item, index) in schoolCoachList" :key="index">
|
<view v-if="schoolCoachList.length > 0">
|
||||||
<view class="image-text_3 flex-row justify-between">
|
<view class="group_10 flex-row justify-between" v-for="(item, index) in schoolCoachList" :key="index">
|
||||||
<image
|
<view class="image-text_3 flex-row justify-between">
|
||||||
class="label_3"
|
<image
|
||||||
referrerpolicy="no-referrer"
|
class="label_3"
|
||||||
:src="imagesUrl + '/' + item.image"
|
referrerpolicy="no-referrer"
|
||||||
/>
|
:src="imagesUrl + '/' + item.image"
|
||||||
<view class="text-group_4 flex-col justify-between">
|
/>
|
||||||
<text class="text_25">{{ item.name }}</text>
|
<view class="text-group_4 flex-col justify-between">
|
||||||
<!-- <text class="text_26">5.0</text>-->
|
<text class="text_25">{{ item.name }}</text>
|
||||||
<text class="text_27">教龄 {{ item.seniority }}年</text>
|
<text class="text_27">教龄 {{ item.seniority }}年</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="box_13 flex-col">-->
|
|
||||||
<!-- <u-rate :count="1" activeColor="#eda23a"></u-rate>-->
|
|
||||||
<!-- </view>-->
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <text class="text_28">学员 598人</text> -->
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<u-empty
|
||||||
|
mode="list"
|
||||||
|
text="该驾校没有团队教练..."
|
||||||
|
>
|
||||||
|
</u-empty>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user