Merge remote-tracking branch 'origin/master'
# Conflicts: # pagesA/courseDetail/index.vue # pagesA/register/index.vue
This commit is contained in:
commit
457b953046
@ -7,7 +7,7 @@
|
||||
</view>
|
||||
<view class="group_4 flex-col">
|
||||
<image style="width: 100%; height: 100%;" referrerpolicy="no-referrer"
|
||||
:src="imagesUrl + '/' + schoolInfo.photo" />
|
||||
:src="imagesUrl + '/' + schoolInfo.photo" v-if="schoolInfo.photo" />
|
||||
<!-- src="/static/lanhu_jiaxiaoxiangqing/FigmaDDSSlicePNGcd54efcc9a8c89af0ef99c8275464828.png" -->
|
||||
</view>
|
||||
<view class="group_5 flex-col">
|
||||
@ -276,11 +276,18 @@
|
||||
// 对数据进行排序
|
||||
const sortedList = res.data.records.sort((a, b) => b.seniority - a.seniority);
|
||||
const coachId = auth.getCoachId()
|
||||
const staffType = auth.getStaffType()
|
||||
console.log(coachId, 'coachId');
|
||||
const coach = res.data.records.find(item => item.userId == coachId)
|
||||
console.log(coach, 'coach');
|
||||
if (coach) {
|
||||
this.schoolCoachList.push(coach)
|
||||
if (coachId && staffType === '02') {
|
||||
const coach = res.data.records.find(item => item.userId == coachId)
|
||||
console.log(coach, 'coach');
|
||||
if (coach) {
|
||||
this.schoolCoachList.push(coach)
|
||||
} else {
|
||||
// 取排序后的前三条数据
|
||||
this.schoolCoachList = sortedList.slice(0, 3);
|
||||
this.total = res.data.total;
|
||||
}
|
||||
} else {
|
||||
// 取排序后的前三条数据
|
||||
this.schoolCoachList = sortedList.slice(0, 3);
|
||||
|
@ -8,6 +8,9 @@
|
||||
<scroll-view :style="{ height: scrollHeight + 'px' }" scroll-y="true" class="scroll-view">
|
||||
<view class="group_3 flex-col">
|
||||
<image style="width: 100%; height: 100%;" :src="imagesUrl + '/' + courseDetails.photo" />
|
||||
v-if="courseDetails.photo" />
|
||||
<u-empty mode="data" text='暂无图片' v-else>
|
||||
</u-empty>
|
||||
</view>
|
||||
<view class="group_4 flex-col">
|
||||
<view class="section_2 flex-row justify-between">
|
||||
@ -168,4 +171,4 @@
|
||||
margin-top: 20rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<headers :titles="titles">
|
||||
<uni-icons @click="goback()" type="left" color="#000000" size="22px"></uni-icons>
|
||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||
</headers>
|
||||
<!-- #endif -->
|
||||
<!-- #endif -->
|
||||
@ -254,6 +254,10 @@
|
||||
this.localCoachId = getCoachId()
|
||||
console.log('localCoachId', this.localCoachId);
|
||||
console.log('userId', this.userId);
|
||||
if (this.localStaffType === '02') {
|
||||
this.localCoachId = getCoachId()
|
||||
console.log('localCoachId', this.localCoachId);
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getListAll()
|
||||
@ -361,34 +365,34 @@
|
||||
tenantIdFlag: false
|
||||
})
|
||||
console.log('data',res.data)
|
||||
|
||||
|
||||
// 过滤数据,只保留subject为2或3的教练
|
||||
const filteredData = res.data.filter(coach =>
|
||||
const filteredData = res.data.filter(coach =>
|
||||
coach.subject === '2' || coach.subject === '3'
|
||||
);
|
||||
// 去重处理 - 根据coachId去除重复教练
|
||||
const uniqueCoaches = [];
|
||||
const coachIds = new Set();
|
||||
|
||||
|
||||
filteredData.forEach(coach => {
|
||||
if (!coachIds.has(coach.coachId)) {
|
||||
coachIds.add(coach.coachId);
|
||||
uniqueCoaches.push(coach);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.columnjl = [
|
||||
filteredData.map(coach => ({
|
||||
label: coach.coachName,
|
||||
value: coach
|
||||
}))
|
||||
];
|
||||
|
||||
|
||||
if (this.localStaffType === '02' && this.localCoachId) {
|
||||
console.log('123123',this.localStaffType)
|
||||
console.log('321321', this.localCoachId)
|
||||
console.log('coach', filteredData)
|
||||
const defaultCoach = filteredData.find(coach =>
|
||||
const defaultCoach = filteredData.find(coach =>
|
||||
String(coach.coachId) === String(this.localCoachId)
|
||||
);
|
||||
console.log('111222333', defaultCoach)
|
||||
@ -661,7 +665,7 @@
|
||||
url: `/small/jxInfo/prepayment?type=jsapi&orderNo=${this.orderNo}&orderId=${this.orderId}&payType=${payType}`,
|
||||
method: 'get'
|
||||
});
|
||||
|
||||
|
||||
|
||||
const result = await this.handleWxPayment(res);
|
||||
if (result === 'success') {
|
||||
@ -1341,4 +1345,4 @@
|
||||
.size-lv {
|
||||
margin-right: 35px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user