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