更新
This commit is contained in:
parent
f4e040e0a8
commit
b0e2af62e3
@ -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);
|
||||||
|
|||||||
@ -158,7 +158,7 @@
|
|||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// 在这里写需要延迟执行的代码
|
// 在这里写需要延迟执行的代码
|
||||||
uni.navigateTo({
|
uni.switchTab({
|
||||||
url: '/newPages/newIndex/index'
|
url: '/newPages/newIndex/index'
|
||||||
})
|
})
|
||||||
}, 2600); // 3000毫秒即为3秒
|
}, 2600); // 3000毫秒即为3秒
|
||||||
|
|||||||
@ -1,157 +1,159 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page flex-col">
|
<view class="page flex-col">
|
||||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||||
<headers titles="课程详情">
|
<headers titles="课程详情">
|
||||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||||
</headers>
|
</headers>
|
||||||
</view>
|
</view>
|
||||||
<view class="group_3 flex-col">
|
<view class="group_3 flex-col">
|
||||||
<image
|
<image style="width: 100%; height: 100%;" :src="imagesUrl + '/' + courseDetails.photo"
|
||||||
style="width: 100%; height: 100%;"
|
v-if="courseDetails.photo" />
|
||||||
:src="imagesUrl + '/' + courseDetails.photo"
|
<u-empty mode="data" text='暂无图片' v-else>
|
||||||
/>
|
</u-empty>
|
||||||
</view>
|
|
||||||
<view class="group_4 flex-col">
|
</view>
|
||||||
<view class="section_2 flex-row justify-between">
|
<view class="group_4 flex-col">
|
||||||
<view class="text-wrapper_1">
|
<view class="section_2 flex-row justify-between">
|
||||||
<text class="text_3">¥</text>
|
<view class="text-wrapper_1">
|
||||||
<text class="text_4">{{ courseDetails.price ? courseDetails.price.toFixed(2) : '--' }}</text>
|
<text class="text_3">¥</text>
|
||||||
</view>
|
<text class="text_4">{{ courseDetails.price ? courseDetails.price.toFixed(2) : '--' }}</text>
|
||||||
<!-- <text class="text_5">¥3000.00</text>-->
|
</view>
|
||||||
</view>
|
<!-- <text class="text_5">¥3000.00</text>-->
|
||||||
<text class="text_6">{{ courseDetails.name }}</text>
|
</view>
|
||||||
<view class="section_3 flex-row justify-between">
|
<text class="text_6">{{ courseDetails.name }}</text>
|
||||||
<view class="text-wrapper_2 flex-col">
|
<view class="section_3 flex-row justify-between">
|
||||||
<text class="text_7">{{ courseDetails.tittle }}</text>
|
<view class="text-wrapper_2 flex-col">
|
||||||
</view>
|
<text class="text_7">{{ courseDetails.tittle }}</text>
|
||||||
<view class="text-wrapper_3 flex-col">
|
</view>
|
||||||
<text class="text_8">{{ courseDetails.type }}</text>
|
<view class="text-wrapper_3 flex-col">
|
||||||
</view>
|
<text class="text_8">{{ courseDetails.type }}</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="text_9">周一至周日 08:00-18:00</text>
|
</view>
|
||||||
</view>
|
<text class="text_9">周一至周日 08:00-18:00</text>
|
||||||
<view class="group_5 flex-col">
|
</view>
|
||||||
<view class="section_4 flex-row justify-between">
|
<view class="group_5 flex-col">
|
||||||
<view class="block_3 flex-col"></view>
|
<view class="section_4 flex-row justify-between">
|
||||||
<text class="text_10">课程介绍</text>
|
<view class="block_3 flex-col"></view>
|
||||||
</view>
|
<text class="text_10">课程介绍</text>
|
||||||
<view class="u-content" v-if="courseDetails.remark">
|
</view>
|
||||||
<u-parse :content="courseDetails.remark"></u-parse>
|
<view class="u-content" v-if="courseDetails.remark">
|
||||||
</view>
|
<u-parse :content="courseDetails.remark"></u-parse>
|
||||||
<view class="u-content" v-else>
|
</view>
|
||||||
<u-empty
|
<view class="u-content" v-else>
|
||||||
mode="list"
|
<u-empty mode="list" text="该课程没有简介...">
|
||||||
text="该课程没有简介..."
|
</u-empty>
|
||||||
>
|
</view>
|
||||||
</u-empty>
|
</view>
|
||||||
</view>
|
<view class="group_6 flex-row">
|
||||||
</view>
|
<view class="image-text_1 flex-col justify-between" @click="zxkf()">
|
||||||
<view class="group_6 flex-row">
|
<image class="label_2" referrerpolicy="no-referrer"
|
||||||
<view class="image-text_1 flex-col justify-between" @click="zxkf()">
|
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG283b4603035848d5dcc7209d10653327.png" />
|
||||||
<image
|
<text class="text-group_1">咨询客服</text>
|
||||||
class="label_2"
|
</view>
|
||||||
referrerpolicy="no-referrer"
|
<view class="text-wrapper_4 flex-col" @click="goRegisterNow()">
|
||||||
src="/static/lanhu_kechengxiangqing/FigmaDDSSlicePNG283b4603035848d5dcc7209d10653327.png"
|
<text class="text_11">立即报名</text>
|
||||||
/>
|
</view>
|
||||||
<text class="text-group_1">咨询客服</text>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-wrapper_4 flex-col" @click="goRegisterNow()">
|
|
||||||
<text class="text_11">立即报名</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import config from "@/config.js"
|
import config from "@/config.js"
|
||||||
import {getLocalUserInfo, getUserInfo, getToken} from "@/utils/auth";
|
import {
|
||||||
import headers from "@/components/header/headers.vue";
|
getLocalUserInfo,
|
||||||
|
getUserInfo,
|
||||||
|
getToken
|
||||||
|
} from "@/utils/auth";
|
||||||
|
import headers from "@/components/header/headers.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {headers},
|
components: {
|
||||||
data() {
|
headers
|
||||||
return {
|
},
|
||||||
courseId: undefined,
|
data() {
|
||||||
tenantId: undefined,
|
return {
|
||||||
courseDetails: [],
|
courseId: undefined,
|
||||||
driveSchoolPhone: [],
|
tenantId: undefined,
|
||||||
imagesUrl: config.imagesUrl,
|
courseDetails: [],
|
||||||
userDetails: [],
|
driveSchoolPhone: [],
|
||||||
};
|
imagesUrl: config.imagesUrl,
|
||||||
},
|
userDetails: [],
|
||||||
onLoad(options) {
|
};
|
||||||
this.courseId = options.courseId;
|
},
|
||||||
this.tenantId = options.tenantId;
|
onLoad(options) {
|
||||||
this.getCourseDetails();
|
this.courseId = options.courseId;
|
||||||
this.userDetails = getLocalUserInfo();
|
this.tenantId = options.tenantId;
|
||||||
this.getServicePhone()
|
this.getCourseDetails();
|
||||||
},
|
this.userDetails = getLocalUserInfo();
|
||||||
methods: {
|
this.getServicePhone()
|
||||||
goBack() {
|
},
|
||||||
uni.navigateBack({
|
methods: {
|
||||||
delta: 1
|
goBack() {
|
||||||
});
|
uni.navigateBack({
|
||||||
},
|
delta: 1
|
||||||
getCourseDetails() {
|
});
|
||||||
request({
|
},
|
||||||
url: '/app-api/dl-drive-school-course-small/get',
|
getCourseDetails() {
|
||||||
method: 'GET',
|
request({
|
||||||
params: {
|
url: '/app-api/dl-drive-school-course-small/get',
|
||||||
id: this.courseId,
|
method: 'GET',
|
||||||
tenantId: this.tenantId,
|
params: {
|
||||||
},
|
id: this.courseId,
|
||||||
tenantIdFlag: false
|
tenantId: this.tenantId,
|
||||||
}).then(res => {
|
},
|
||||||
this.courseDetails = res.data;
|
tenantIdFlag: false
|
||||||
})
|
}).then(res => {
|
||||||
},
|
this.courseDetails = res.data;
|
||||||
zxkf() {
|
})
|
||||||
uni.makePhoneCall({
|
},
|
||||||
phoneNumber: this.driveSchoolPhone.phone
|
zxkf() {
|
||||||
});
|
uni.makePhoneCall({
|
||||||
},
|
phoneNumber: this.driveSchoolPhone.phone
|
||||||
getServicePhone() {
|
});
|
||||||
request({
|
},
|
||||||
url: '/app-api/dl-drive-school-course-small/getServicePhone',
|
getServicePhone() {
|
||||||
method: 'GET',
|
request({
|
||||||
params: {
|
url: '/app-api/dl-drive-school-course-small/getServicePhone',
|
||||||
tenantId: this.tenantId,
|
method: 'GET',
|
||||||
}
|
params: {
|
||||||
}).then(res => {
|
tenantId: this.tenantId,
|
||||||
this.driveSchoolPhone = res.data
|
}
|
||||||
})
|
}).then(res => {
|
||||||
},
|
this.driveSchoolPhone = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
goRegisterNow() {
|
goRegisterNow() {
|
||||||
console.log('token',getToken())
|
console.log('token', getToken())
|
||||||
if (!getToken()) {
|
if (!getToken()) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '未登录',
|
title: '未登录',
|
||||||
content: '请先登录',
|
content: '请先登录',
|
||||||
confirmText: '去登录',
|
confirmText: '去登录',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
uni.navigateTo({
|
||||||
});
|
url: `/pagesA/register/index?courseId=${this.courseDetails.id}&userId=${this.userDetails.id}&tenantId=${this.tenantId}`,
|
||||||
return;
|
// url: '/pages/index/bmPage'
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
};
|
||||||
url: `/pagesA/register/index?courseId=${this.courseDetails.id}&userId=${this.userDetails.id}&tenantId=${this.tenantId}`,
|
|
||||||
// url: '/pages/index/bmPage'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
@import '../common/common.scss';
|
@import '../common/common.scss';
|
||||||
@import './assets/style/index.rpx.scss';
|
@import './assets/style/index.rpx.scss';
|
||||||
.u-content{
|
|
||||||
margin-top: 20rpx;
|
.u-content {
|
||||||
padding: 10rpx;
|
margin-top: 20rpx;
|
||||||
}
|
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 -->
|
||||||
@ -248,8 +248,10 @@
|
|||||||
this.tenantId = option.tenantId
|
this.tenantId = option.tenantId
|
||||||
this.userinfo = getLocalUserInfo()
|
this.userinfo = getLocalUserInfo()
|
||||||
this.localStaffType = getStaffType()
|
this.localStaffType = getStaffType()
|
||||||
this.localCoachId = getCoachId()
|
if (this.localStaffType === '02') {
|
||||||
console.log('localCoachId', this.localCoachId);
|
this.localCoachId = getCoachId()
|
||||||
|
console.log('localCoachId', this.localCoachId);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getListAll()
|
this.getListAll()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user