Compare commits

...

2 Commits

Author SHA1 Message Date
Lx
d40c61efd2 0417-3 2025-04-17 15:38:34 +08:00
Lx
15e1a31e7b 0417-3 2025-04-17 14:49:28 +08:00
5 changed files with 779 additions and 729 deletions

View File

@ -7,11 +7,8 @@
<view class="image-text_1 flex-row justify-between">
<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'"
/>
<image 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">
@ -22,21 +19,15 @@
</view>
</view>
<view class="image-text_2 flex-col justify-between" @click="toMyQrCode()">
<image
class="label_1"
referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG7e67772393591f7c5436c0b59f7b3b17.png"
/>
<image class="label_1" referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG7e67772393591f7c5436c0b59f7b3b17.png" />
<text class="text-group_2">学车码</text>
</view>
</view>
<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'"
/>
<image 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>
@ -61,17 +52,9 @@
<view class="block_1 flex-col">
<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)"
>
<image
class="label_3"
referrerpolicy="no-referrer"
:src="item.url"
/>
<view 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" />
<text class="text-group_4" v-text="item.text"></text>
</view>
</view>
@ -80,9 +63,11 @@
<view class="menu-list">
<!-- 个人信息 -->
<view class="menu-item" @click="goMyInDetails()">
<image class="menu-icon" src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG1bb0cdc369203c305a42d848736e8f01.png" />
<image class="menu-icon"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG1bb0cdc369203c305a42d848736e8f01.png" />
<text class="menu-text">个人信息</text>
<image class="menu-arrow" src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png" />
<image class="menu-arrow"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png" />
</view>
<!-- <view class="menu-item">
@ -94,10 +79,12 @@
<!-- 消息中心 -->
<view class="menu-item" @click="goFeedback">
<image class="menu-icon" src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGa728895586dafec1bde5f90c89d05c48.png" />
<image class="menu-icon"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGa728895586dafec1bde5f90c89d05c48.png" />
<text class="menu-text">消息中心</text>
<text class="message-num" v-if="noReadNum > 0">{{ noReadNum }}</text>
<image class="menu-arrow" src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png" />
<image class="menu-arrow"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG4f20daae79bb7c60189f8702897465d1.png" />
</view>
</view>
</view>
@ -137,8 +124,7 @@ export default {
isCreateQrCode: true,
noReadNum: 0,
rpxUnit: 2,
loopData: [
{
loopData: [{
url: '/static/myImgs/alreadyPaid.png',
text: '已付款',
orderType: '2',
@ -168,6 +154,8 @@ export default {
};
},
onLoad() {
console.log('userInfo', getLocalUserInfo())
console.log('myToken', getToken())
this.selfInfoLocal = getLocalUserInfo()
this.getUserInfo()
this.systemInfo()
@ -215,7 +203,8 @@ export default {
qr.data = data;
qr.size = 300 * this.rpxUnit - 10;
qr.make();
const ctx = uni.createCanvasContext('qrcode', this); // thisvue3 this getCurrentInstance()?.proxy
const ctx = uni.createCanvasContext('qrcode',
this); // thisvue3 this getCurrentInstance()?.proxy
qr.canvasContext = ctx;
qr.drawCanvas();
this.isCreateQrCode = false
@ -295,7 +284,7 @@ export default {
method: 'GET',
}).then(res => {
this.selfInfo = res.data
if (this.userInfo != null) {
if (this.selfInfo != null) {
setLocalUserInfo(this.selfInfo)
}
this.getOrder()
@ -307,9 +296,13 @@ export default {
request({
url: '/app-api/small/dl-drive-school-student/getByUserId',
method: 'GET',
params: { userId: this.selfInfo.id }
params: {
userId: this.selfInfo.id
}
}).then(res => {
this.userDetails = { ...res.data };
this.userDetails = {
...res.data
};
});
},

View File

@ -103,7 +103,7 @@
}
.section_2 {
width: 750rpx;
height: 1020rpx;
// height: 1020rpx;
.list_1 {
width: 618rpx;
height: 112rpx;

View File

@ -35,9 +35,10 @@
src="/static/lanhu_shouye2gai/FigmaDDSSlicePNGc8586e4d9e76802e4b93ae8fb3654b38.png" />
</view>
</view>
<view class="itemContent">
<!-- 使用 scroll-view 包裹 SchoolInfo 组件 -->
<scroll-view class="school-scroll-view" scroll-y>
<scroll-view class="scroll-view" scroll-y :style="{ height: scrollHeight + 'px' }">
<SchoolInfo style="" v-for="(school, index) in schoolList" :key="index" :schoolInfo="school"
@click="goSchoolDetail(school)" />
</scroll-view>
@ -103,12 +104,15 @@
noticeList: [],
qTenantId: null,
qCoachId: null,
scrollHeight: 0,
};
},
onLoad(query) {
console.log('query', query)
// setInviteId('JLPXF1')
// this.getTenantIdByInviteId()
console.log('userInfo', getLocalUserInfo())
console.log('token', getToken())
this.getSwiperList()
this.getTextList()
@ -132,6 +136,10 @@
}) */
}
},
onReady() {
//
this.calculateScrollHeight();
},
methods: {
getTenantIdByInviteId() {
console.log('1122', getInviteId())
@ -296,6 +304,36 @@
});
},
calculateScrollHeight() {
/* // 获取屏幕高度
const screenHeight = uni.getSystemInfoSync().windowHeight;
//
const topHeight = 490;
//
this.scrollHeight = screenHeight - topHeight; */
const systemInfo = uni.getSystemInfoSync();
const windowHeight = systemInfo.windowHeight;
const rpxToPx = systemInfo.windowWidth / 750;
const topOccupiedHeight = 960 * rpxToPx;
this.scrollHeight = windowHeight - topOccupiedHeight;
},
/* calculateScrollHeight() {
//
const screenHeight = uni.getSystemInfoSync().windowHeight;
// 使
const query = uni.createSelectorQuery().in(this);
query.select('.top_').boundingClientRect(data => {
const topHeight = data ? data.height : 0;
query.select('.section_2').boundingClientRect(data => {
const sectionHeight = data ? data.height : 0;
// rpx ( 1px = 2rpx)
this.scrollHeight = (screenHeight - topHeight - sectionHeight) * 2;
}).exec();
}).exec();
}, */
handleItemClick(item) {
// item.text
switch (item.text) {
@ -398,16 +436,17 @@
// scroll-view
.school-scroll-view {
height: 500rpx; //
/* height: 500rpx; // 设置一个固定高度,根据需要调整 */
overflow-y: auto;
margin-left: 22rpx;
}
.itemContent {
padding: 30rpx 0;
margin-top: 20rpx;
/* padding: 10rpx 0; */
display: flex;
flex-direction: column;
row-gap: 20rpx;
/* row-gap: 10rpx; */
margin-bottom: 200rpx;
}

View File

@ -94,9 +94,18 @@
status: 'loading',
selfInfo: {}
}
},
onLoad() {
if (getToken()) {
console.log('myToken', getToken())
this.findSelfInfo()
}
},
onShow() {
if (getToken()) {
console.log('myToken', getToken())
this.findSelfInfo()
}
@ -143,7 +152,7 @@
},
async findSelfInfo() {
let res = await request({
url: `/app-api/driving/findSelfInfo`,
url: `/app-api/small/driving/findSelfInfo`,
method: 'get',
})
console.log(res, 138);

View File

@ -6,15 +6,9 @@
</headers>
</view>
<view class="block_2 flex-col">
<scroll-view
class="scroll-view"
scroll-y
:style="{ height: scrollHeight + 'px' }"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered"
>
<view
class="box_5 flex-col" v-for="(item, index) in examList"
:key="index"
<scroll-view class="scroll-view" scroll-y :style="{ height: scrollHeight + 'px' }" refresher-enabled
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view class="box_5 flex-col" v-for="(item, index) in examList" :key="index"
:style="{ height: ((item.subject != 2 && item.subject != 3) || (getButtonInfo(item).text === '1' || getButtonInfo(item).text === '2')) ? '230rpx' : 'auto' }">
<view class="block_3 flex-row justify-between">
<view class="text-group_1 flex-col justify-between">
@ -24,7 +18,6 @@
}}
</text>
<text class="text_2" v-else>{{ formatDate(item.startTime) }}</text>
<text class="text_3">{{ item.courseName }}</text>
</view>
<view class="text-group_2 flex-col justify-between">
@ -45,7 +38,8 @@
<text class="text_8">考试地址</text>
<text class="text_9">{{ item.addr }}</text>
</view>
<view class="block_5 flex-row" v-if="(item.subject == 2 || item.subject == 3) && (getButtonInfo(item).text !== '1' && getButtonInfo(item).text !== '2')">
<view class="block_5 flex-row"
v-if="(item.subject == 2 || item.subject == 3) && (getButtonInfo(item).text !== '1' && getButtonInfo(item).text !== '2')">
<view class="text-wrapper_4 flex-col" @click="handleButtonClick(item)">
<text class="text_10">{{ getButtonInfo(item).text }}</text>
</view>
@ -58,29 +52,27 @@
<view class="text-wrapper_8 flex-col" @click="onEnterScoreClick()">
<text class="text_19">笔试成绩录入</text>
<u-picker
:show="pickerShow"
:columns="[pickerColumns]"
keyName="label"
@confirm="onPickerConfirm"
@cancel="pickerShow = false"
/>
<u-picker :show="pickerShow" :columns="[pickerColumns]" keyName="label" @confirm="onPickerConfirm"
@cancel="pickerShow = false" />
</view>
</view>
</view>
</template>
<script>
import {getLocalUserInfo} from '../../utils/auth';
import {
getLocalUserInfo
} from '../../utils/auth';
import request from '@/utils/request.js'
import headers from "@/components/header/headers.vue";
export default {
components: {headers},
components: {
headers
},
data() {
return {
loopData0: [
{
loopData0: [{
lanhutext0: '2025-01-20',
lanhutext1: '考试名称',
lanhutext2: '60分',
@ -245,10 +237,15 @@ export default {
}
}).then(res => {
// this.examList = res.data
console.log('res', res)
// subject subject createTime
this.examList = res.data.sort((a, b) => {
if (a.subject !== b.subject) {
return a.subject - b.subject;
} else {
return new Date(a.createTime) - new Date(b.createTime);
}
});
// this.getExamTwoList()
this.isTriggered = false
})
},
@ -322,13 +319,25 @@ export default {
getButtonInfo(item) {
if (item.fraction == null) {
return {text: '成绩录入', type: 'input'}
return {
text: '成绩录入',
type: 'input'
}
} else if (!item.ifPass) {
return {text: '2', type: 'failed'}
return {
text: '2',
type: 'failed'
}
} else if (!item.ifEvaluate) {
return {text: '开始评价', type: 'evaluate'}
return {
text: '开始评价',
type: 'evaluate'
}
} else {
return {text: '1', type: 'evaluate'}
return {
text: '1',
type: 'evaluate'
}
}
// else if (item.ifEvaluate) {
// return { text: '', type: 'view' }