Merge remote-tracking branch 'origin/master'
# Conflicts: # pagesA/register/index.vue
This commit is contained in:
commit
7f13e6cbcb
@ -55,9 +55,10 @@
|
|||||||
gogogo(id) {
|
gogogo(id) {
|
||||||
this.actindex = id;
|
this.actindex = id;
|
||||||
if (id == 1) {
|
if (id == 1) {
|
||||||
uni.reLaunch({
|
/* uni.switchTab({
|
||||||
url: '/newPages/newIndex/index'
|
url: '/newPages/newIndex/index'
|
||||||
})
|
}) */
|
||||||
|
uni.switchTab({ url: '/newPages/newIndex/index' });
|
||||||
}
|
}
|
||||||
if (id == 2) {
|
if (id == 2) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
@ -65,10 +66,11 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (id == 3) {
|
if (id == 3) {
|
||||||
uni.reLaunch({
|
/* uni.switchTab({
|
||||||
// url: '/pages/my/my'
|
// url: '/pages/my/my'
|
||||||
url: '/newPages/my/index'
|
url: '/newPages/my/index'
|
||||||
})
|
}) */
|
||||||
|
uni.switchTab({ url: '/newPages/my/index' });
|
||||||
}
|
}
|
||||||
if (id == 4) {
|
if (id == 4) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -3,7 +3,7 @@ module.exports = {
|
|||||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||||
|
|
||||||
imagesUrl: 'http://122.51.230.86:9000',
|
imagesUrl: 'http://122.51.230.86:9000',
|
||||||
// baseUrl: 'http://localhost:48080',
|
// baseUrl: 'https://www.nuoyunr.com',
|
||||||
baseUrl: 'http://192.168.1.27:48080',
|
baseUrl: 'http://192.168.1.27:48080',
|
||||||
appId:'wx684fc832e96cee65',
|
appId:'wx684fc832e96cee65',
|
||||||
appSecret:'d1fecac806c5f3cd9aca9f3d5c3759c7',
|
appSecret:'d1fecac806c5f3cd9aca9f3d5c3759c7',
|
||||||
|
@ -195,6 +195,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.messageItem {
|
.messageItem {
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
</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">
|
<u-popup round="20" :show="showQrCode" @close="closeQrCode" mode="center" zoom="false" @open="openQrCode">
|
||||||
<view style="padding: 50rpx 50rpx 20rpx 50rpx">
|
<view style="padding: 50rpx 50rpx 20rpx 50rpx">
|
||||||
<canvas id="qrcode" canvas-id="qrcode" style="width: 300rpx;height: 300rpx"/>
|
<canvas id="qrcode" canvas-id="qrcode" style="width: 300rpx;height: 300rpx"/>
|
||||||
@ -175,7 +175,9 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (getToken()) {
|
if (getToken()) {
|
||||||
// this.findSelfInfo()
|
this.selfInfoLocal = getLocalUserInfo()
|
||||||
|
this.getUserInfo()
|
||||||
|
this.systemInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -37,15 +37,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="itemContent">
|
<view class="itemContent">
|
||||||
<!-- 使用 scroll-view 包裹 SchoolInfo 组件 -->
|
<!-- 使用 scroll-view 包裹 SchoolInfo 组件 -->
|
||||||
<scroll-view class="school-scroll-view" scroll-y @scrolltolower="onReachBottomCus" refresher-enabled
|
<scroll-view class="school-scroll-view" scroll-y>
|
||||||
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
|
||||||
<SchoolInfo style="" v-for="(school, index) in schoolList" :key="index" :schoolInfo="school"
|
<SchoolInfo style="" v-for="(school, index) in schoolList" :key="index" :schoolInfo="school"
|
||||||
@click="goSchoolDetail(school)" />
|
@click="goSchoolDetail(school)" />
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<tabbar :msg='msg'></tabbar>
|
<!-- <tabbar :msg='msg'></tabbar> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -106,6 +105,7 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(query) {
|
onLoad(query) {
|
||||||
|
console.log('query', query)
|
||||||
// setInviteId('JLPXF1')
|
// setInviteId('JLPXF1')
|
||||||
// this.getTenantIdByInviteId()
|
// this.getTenantIdByInviteId()
|
||||||
this.getSwiperList()
|
this.getSwiperList()
|
||||||
@ -117,10 +117,10 @@
|
|||||||
//扫码邀请过来的,设置邀请者code
|
//扫码邀请过来的,设置邀请者code
|
||||||
setInviteId(theRequest['inviteId'])
|
setInviteId(theRequest['inviteId'])
|
||||||
this.getTenantIdByInviteId()
|
this.getTenantIdByInviteId()
|
||||||
//先登录
|
/* //先登录
|
||||||
// uni.reLaunch({
|
uni.reLaunch({
|
||||||
// url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
// })
|
}) */
|
||||||
} else {
|
} else {
|
||||||
removeInviteId()
|
removeInviteId()
|
||||||
removeCoachId()
|
removeCoachId()
|
||||||
@ -146,7 +146,7 @@
|
|||||||
uniqueCode: getInviteId()
|
uniqueCode: getInviteId()
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(123, res.data)
|
console.log(123)
|
||||||
if (res.data != null) {
|
if (res.data != null) {
|
||||||
this.qTenantId = res.data.tenantId
|
this.qTenantId = res.data.tenantId
|
||||||
this.qCoachId = res.data.userId
|
this.qCoachId = res.data.userId
|
||||||
@ -164,6 +164,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
|
console.log('getInviteId', getInviteId())
|
||||||
const params = {
|
const params = {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
@ -249,7 +250,7 @@
|
|||||||
method: 'GET'
|
method: 'GET'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
res.data.forEach(item => {
|
res.data.forEach(item => {
|
||||||
item.swiperPicture = this.imageUrl + item.swiperPicture
|
item.swiperPicture = this.imageUrl + '/' + item.swiperPicture
|
||||||
})
|
})
|
||||||
this.swiperList = res.data
|
this.swiperList = res.data
|
||||||
})
|
})
|
||||||
@ -402,6 +403,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
row-gap: 20rpx;
|
row-gap: 20rpx;
|
||||||
|
margin-bottom: 200rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top_ {
|
.top_ {
|
||||||
|
24
pages.json
24
pages.json
@ -99,11 +99,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [{
|
||||||
{
|
|
||||||
"root": "pagesA",
|
"root": "pagesA",
|
||||||
"pages": [
|
"pages": [{
|
||||||
{
|
|
||||||
"path": "appointmentAdd/index",
|
"path": "appointmentAdd/index",
|
||||||
"style": {
|
"style": {
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
@ -199,7 +197,23 @@
|
|||||||
"pages": []
|
"pages": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"tabBar": {
|
||||||
|
"color": "#999999", // 未选中时的文字颜色(默认灰色)
|
||||||
|
"selectedColor": "#2c78f5", // 选中时的文字颜色(示例蓝色)
|
||||||
|
"list": [{
|
||||||
|
"pagePath": "newPages/newIndex/index",
|
||||||
|
"text": "首页",
|
||||||
|
"iconPath": "static/imgs/homeone.png",
|
||||||
|
"selectedIconPath": "static/imgs/hometwo.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "newPages/my/index",
|
||||||
|
"text": "我的",
|
||||||
|
"iconPath": "static/imgs/myone.png",
|
||||||
|
"selectedIconPath": "static/imgs/mytwo.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "uni-app",
|
"navigationBarTitleText": "uni-app",
|
||||||
|
@ -184,8 +184,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
console.log('options', options)
|
||||||
this.userInfo = getLocalUserInfo()
|
this.userInfo = getLocalUserInfo()
|
||||||
this.getUserOrderDetails()
|
// this.getUserOrderDetails()
|
||||||
this.process.subject = options.subject
|
this.process.subject = options.subject
|
||||||
this.opTenantId = options.tenantId
|
this.opTenantId = options.tenantId
|
||||||
this.opCourseType = options.courseType
|
this.opCourseType = options.courseType
|
||||||
@ -200,6 +201,8 @@ export default {
|
|||||||
this.process.userId = this.userInfo.id
|
this.process.userId = this.userInfo.id
|
||||||
this.process.coachId = options.coachId
|
this.process.coachId = options.coachId
|
||||||
this.process.userName = options.nickname
|
this.process.userName = options.nickname
|
||||||
|
this.process.tenantId = options.tenantId
|
||||||
|
this.getCourseCompleteStatus();
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
// 动态计算滚动区域高度
|
// 动态计算滚动区域高度
|
||||||
@ -325,33 +328,35 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getUserOrderDetails() {
|
// getUserOrderDetails() {
|
||||||
request({
|
// request({
|
||||||
url: '/app-api/small/drive/school-course-order/page',
|
// url: '/app-api/small/drive/school-course-order/page',
|
||||||
method: 'GET',
|
// method: 'GET',
|
||||||
params: {
|
// params: {
|
||||||
userId: this.userInfo.id,
|
// userId: this.userInfo.id,
|
||||||
paymentStatus: '2',
|
// paymentStatus: '2',
|
||||||
ifEnd: 0,
|
// ifEnd: false,
|
||||||
},
|
// tenantId: 180,
|
||||||
tenantIdFlag: false
|
// },
|
||||||
}).then(res => {
|
// tenantIdFlag: false
|
||||||
this.orderList = res.data.records;
|
// }).then(res => {
|
||||||
if (res.data.records.length > 0) {
|
// console.log('123123', res)
|
||||||
const tempData = res.data.records[0]
|
// this.orderList = res.data.records;
|
||||||
if (this.process.subject != 2 && this.process.subject != 3) {
|
// if (res.data.records.length > 0) {
|
||||||
this.process.courseId = tempData.courseId
|
// const tempData = res.data.records[0]
|
||||||
}
|
// if (this.process.subject != 2 && this.process.subject != 3) {
|
||||||
|
// this.process.courseId = tempData.courseId
|
||||||
|
// }
|
||||||
|
|
||||||
if (this.process.subject != 2 && this.process.subject != 3) {
|
// if (this.process.subject != 2 && this.process.subject != 3) {
|
||||||
this.courseType = tempData.courseType
|
// this.courseType = tempData.courseType
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.process.tenantId = tempData.tenantId
|
// this.process.tenantId = tempData.tenantId
|
||||||
this.getCourseCompleteStatus()
|
// this.getCourseCompleteStatus()
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
|
|
||||||
getCourseCompleteStatus() {
|
getCourseCompleteStatus() {
|
||||||
request({
|
request({
|
||||||
@ -362,10 +367,15 @@ export default {
|
|||||||
courseId: this.process.courseId,
|
courseId: this.process.courseId,
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log('res123',res)
|
||||||
this.courseCompleteStatusList = res.data.records
|
this.courseCompleteStatusList = res.data.records
|
||||||
if (this.courseCompleteStatusList.length > 0) {
|
if (this.courseCompleteStatusList.length > 0) {
|
||||||
const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2)
|
const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2)
|
||||||
const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3)
|
const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3)
|
||||||
|
const subject1Or4 = this.courseCompleteStatusList.find(item => item.subject === 1 || item.subject === 4)
|
||||||
|
if (subject1Or4) {
|
||||||
|
this.courseType = subject1Or4.courseType
|
||||||
|
}
|
||||||
|
|
||||||
if (subject2?.status === '2' && subject3?.status === '2') {
|
if (subject2?.status === '2' && subject3?.status === '2') {
|
||||||
this.subjectColumns = [['科目一', '科目四']]
|
this.subjectColumns = [['科目一', '科目四']]
|
||||||
@ -383,7 +393,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
saveData() {
|
saveData() {
|
||||||
if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
|
console.log('process', this.process)
|
||||||
|
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
|
||||||
uni.showToast({title: '信息填写不完整', icon: 'none'});
|
uni.showToast({title: '信息填写不完整', icon: 'none'});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -396,24 +407,23 @@ export default {
|
|||||||
},
|
},
|
||||||
saveDataOne() {
|
saveDataOne() {
|
||||||
if (this.process.subject === 1 && this.courseCompleteStatusList.length <= 0) {
|
if (this.process.subject === 1 && this.courseCompleteStatusList.length <= 0) {
|
||||||
uni.showToast({title: '请联系驾校人员', icon: 'none'});
|
uni.showToast({title: '请联系驾校人员!', icon: 'none'});
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (this.process.subject === 4 && this.courseCompleteStatusList.length <= 0) {
|
if (this.process.subject === 4 && this.courseCompleteStatusList.length <= 0) {
|
||||||
uni.showToast({title: '请联系驾校人员', icon: 'none'});
|
uni.showToast({title: '请联系驾校人员!', icon: 'none'});
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
const postData = {
|
const postData = {
|
||||||
...this.process, // 先拷贝 process 原有数据
|
...this.process, // 先拷贝 process 原有数据
|
||||||
userName: this.userInfo.nickname,
|
|
||||||
remark: this.process.remark,
|
remark: this.process.remark,
|
||||||
images: this.fileList?.map(item => item.url).join(',') || '',
|
images: this.fileList?.map(item => item.url).join(',') || '',
|
||||||
}
|
}
|
||||||
// this.process.images = this.fileList?.map(item => item.url).join(',') || '';
|
// this.process.images = this.fileList?.map(item => item.url).join(',') || '';
|
||||||
|
|
||||||
if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
|
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
|
||||||
uni.showToast({title: '信息填写不完整', icon: 'none'});
|
uni.showToast({title: '信息填写不完整', icon: 'none'});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -447,7 +457,6 @@ export default {
|
|||||||
fraction: this.process.examScore,
|
fraction: this.process.examScore,
|
||||||
ifPass: this.process.examStatus,
|
ifPass: this.process.examStatus,
|
||||||
id: this.batchItemId,
|
id: this.batchItemId,
|
||||||
userName: this.userInfo.nickname,
|
|
||||||
remark: this.process.remark,
|
remark: this.process.remark,
|
||||||
images: this.fileList?.map(item => item.url).join(',') || '',
|
images: this.fileList?.map(item => item.url).join(',') || '',
|
||||||
}
|
}
|
||||||
@ -456,7 +465,7 @@ export default {
|
|||||||
this.process.fraction = this.process.examScore
|
this.process.fraction = this.process.examScore
|
||||||
this.process.ifPass = this.process.examStatus
|
this.process.ifPass = this.process.examStatus
|
||||||
this.process.images = this.fileList?.map(item => item.url).join(',') || ''; */
|
this.process.images = this.fileList?.map(item => item.url).join(',') || ''; */
|
||||||
if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
|
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
|
||||||
uni.showToast({title: '信息填写不完整', icon: 'none'});
|
uni.showToast({title: '信息填写不完整', icon: 'none'});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<view
|
<view
|
||||||
class="box_5 flex-col" v-for="(item, index) in examList"
|
class="box_5 flex-col" v-for="(item, index) in examList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:style="{ height: ((item.subject != 2 && item.subject != 3) || getButtonInfo(item).text === '1') ? '230rpx' : 'auto' }">
|
: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="block_3 flex-row justify-between">
|
||||||
<view class="text-group_1 flex-col justify-between">
|
<view class="text-group_1 flex-col justify-between">
|
||||||
|
|
||||||
@ -45,9 +45,8 @@
|
|||||||
<text class="text_8">考试地址:</text>
|
<text class="text_8">考试地址:</text>
|
||||||
<text class="text_9">{{ item.addr }}</text>
|
<text class="text_9">{{ item.addr }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="block_5 flex-row" v-if="(item.subject == 2 || item.subject == 3) && getButtonInfo(item).text !== '1'">
|
<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)" >
|
<view class="text-wrapper_4 flex-col" @click="handleButtonClick(item)" >
|
||||||
|
|
||||||
<text class="text_10">{{ getButtonInfo(item).text }}</text>
|
<text class="text_10">{{ getButtonInfo(item).text }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -153,13 +152,12 @@ export default {
|
|||||||
// 点击笔试成绩录入的时候 检查是否已报名课程
|
// 点击笔试成绩录入的时候 检查是否已报名课程
|
||||||
onEnterScoreClick() {
|
onEnterScoreClick() {
|
||||||
if (this.courseList.length > 0) {
|
if (this.courseList.length > 0) {
|
||||||
|
console.log('123123123', this.courseList)
|
||||||
this.pickerColumns = this.courseList.map(item => ({
|
this.pickerColumns = this.courseList.map(item => ({
|
||||||
label: item.courseName,
|
label: item.courseName,
|
||||||
value: item.courseId
|
value: item.courseId
|
||||||
}));
|
}));
|
||||||
this.pickerShow = true;
|
this.pickerShow = true;
|
||||||
} else if (this.courseList.length === 1) {
|
|
||||||
this.goToScoreEntry(this.courseList[0]);
|
|
||||||
} else {
|
} else {
|
||||||
this.$u.toast("暂无课程信息");
|
this.$u.toast("暂无课程信息");
|
||||||
}
|
}
|
||||||
@ -174,7 +172,7 @@ export default {
|
|||||||
this.getProcess(selectedCourse.courseId).then(processData => {
|
this.getProcess(selectedCourse.courseId).then(processData => {
|
||||||
if (!processData || processData.length === 0) {
|
if (!processData || processData.length === 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请联系驾校负责人',
|
title: '暂无课程进度信息',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -201,10 +199,14 @@ export default {
|
|||||||
|
|
||||||
// 跳转成绩录入界面
|
// 跳转成绩录入界面
|
||||||
goToScoreEntry(course) {
|
goToScoreEntry(course) {
|
||||||
|
console.log('course', course)
|
||||||
|
/* uni.navigateTo({
|
||||||
|
url: `/pagesA/examinationAdd/index?courseId=${course.value}&courseType=${course.courseType}&userId=${course.userId}&tenantId=${course.tenantId}&coachId=${course.coachUserId}`
|
||||||
|
}); */
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: '/pagesA/examinationAdd/index',
|
url: '/pagesA/examinationAdd/index',
|
||||||
params: {
|
params: {
|
||||||
courseId: course.value,
|
courseId: course.courseId,
|
||||||
courseType: course.courseType,
|
courseType: course.courseType,
|
||||||
userId: course.userId,
|
userId: course.userId,
|
||||||
tenantId: course.tenantId,
|
tenantId: course.tenantId,
|
||||||
@ -242,7 +244,10 @@ export default {
|
|||||||
userId: this.userInfo.id,
|
userId: this.userInfo.id,
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.examList = res.data
|
// this.examList = res.data
|
||||||
|
this.examList = res.data.sort((a, b) => {
|
||||||
|
return a.subject - b.subject;
|
||||||
|
});
|
||||||
// this.getExamTwoList()
|
// this.getExamTwoList()
|
||||||
this.isTriggered = false
|
this.isTriggered = false
|
||||||
})
|
})
|
||||||
@ -267,6 +272,7 @@ export default {
|
|||||||
url: '/app-api/small/drive/school-course-order/getCourseByLoginUser',
|
url: '/app-api/small/drive/school-course-order/getCourseByLoginUser',
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log('课程', res)
|
||||||
this.courseList = res.data
|
this.courseList = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -318,7 +324,7 @@ export default {
|
|||||||
if (item.fraction == null) {
|
if (item.fraction == null) {
|
||||||
return {text: '成绩录入', type: 'input'}
|
return {text: '成绩录入', type: 'input'}
|
||||||
} else if (!item.ifPass) {
|
} else if (!item.ifPass) {
|
||||||
return {text: '考试未通过', type: 'failed'}
|
return {text: '2', type: 'failed'}
|
||||||
} else if (!item.ifEvaluate) {
|
} else if (!item.ifEvaluate) {
|
||||||
return {text: '开始评价', type: 'evaluate'}
|
return {text: '开始评价', type: 'evaluate'}
|
||||||
}else {
|
}else {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</headers>
|
</headers>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<u-loadmore :status="status" v-if="show == true" />
|
<u-loadmore :status="status" v-if="show == true"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="bm-page">
|
<view class="bm-page">
|
||||||
<view class="bm-page-top">
|
<view class="bm-page-top">
|
||||||
@ -151,18 +151,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import headers from '../../components/header/headers.vue'
|
import headers from '../../components/header/headers.vue'
|
||||||
import request from '@/utils/request.js'
|
import request from '@/utils/request.js'
|
||||||
import tabbar from '../../components/tabbar/tabbar.vue'
|
import tabbar from '../../components/tabbar/tabbar.vue'
|
||||||
import upload from '@/utils/upload.js'
|
import upload from '@/utils/upload.js'
|
||||||
import {
|
import {getCoachId, getLocalUserInfo,getStaffType,getToken} from '../../utils/auth'
|
||||||
getCoachId,
|
|
||||||
getLocalUserInfo,
|
|
||||||
getStaffType,
|
|
||||||
getToken
|
|
||||||
} from '../../utils/auth'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
titles: "报名",
|
titles: "报名",
|
||||||
@ -282,9 +277,9 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 定金价格 or 全款价格
|
// 定金价格 or 全款价格
|
||||||
updateDisplayPrice() {
|
updateDisplayPrice() {
|
||||||
this.currentPrice = this.selectedPayType === 1 ?
|
this.currentPrice = this.selectedPayType === 1
|
||||||
this.rightInfoList.reserveMoney :
|
? this.rightInfoList.reserveMoney
|
||||||
this.rightInfoList.price;
|
: this.rightInfoList.price;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 教练信息
|
// 教练信息
|
||||||
@ -298,12 +293,71 @@
|
|||||||
},
|
},
|
||||||
tenantIdFlag: false
|
tenantIdFlag: false
|
||||||
})
|
})
|
||||||
console.log('data', res.data)
|
console.log('data',res.data)
|
||||||
|
|
||||||
|
// 1. 先过滤数据,只保留subject为2或3的教练
|
||||||
|
const filteredData = res.data.filter(coach =>
|
||||||
|
coach.subject === '2' || coach.subject === '3'
|
||||||
|
);
|
||||||
|
|
||||||
|
// 2. 去重处理 - 根据coachId去除重复教练
|
||||||
|
const uniqueCoaches = [];
|
||||||
|
const coachIds = new Set(); // 使用Set来存储已存在的coachId
|
||||||
|
|
||||||
|
filteredData.forEach(coach => {
|
||||||
|
if (!coachIds.has(coach.coachId)) {
|
||||||
|
coachIds.add(coach.coachId);
|
||||||
|
uniqueCoaches.push(coach);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.columnjl = [
|
||||||
|
uniqueCoaches.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', uniqueCoaches) // 这里改为使用去重后的数据
|
||||||
|
const defaultCoach = uniqueCoaches.find(coach =>
|
||||||
|
String(coach.coachId) === String(this.localCoachId)
|
||||||
|
);
|
||||||
|
console.log('111222333', defaultCoach)
|
||||||
|
if (defaultCoach) {
|
||||||
|
this.jlName = defaultCoach.coachName;
|
||||||
|
this.jlId = defaultCoach.coachId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* async getListAll() {
|
||||||
|
this.columnjl = []
|
||||||
|
let res = await request({
|
||||||
|
url: '/app-api/dl-drive-school-coach-small/queryCoachByCourseId',
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
courseId: this.courseId,
|
||||||
|
},
|
||||||
|
tenantIdFlag: false
|
||||||
|
})
|
||||||
|
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去除重复教练
|
||||||
|
const uniqueCoaches = [];
|
||||||
|
const coachIds = new Set();
|
||||||
|
|
||||||
|
filteredData.forEach(coach => {
|
||||||
|
if (!coachIds.has(coach.coachId)) {
|
||||||
|
coachIds.add(coach.coachId);
|
||||||
|
uniqueCoaches.push(coach);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.columnjl = [
|
this.columnjl = [
|
||||||
filteredData.map(coach => ({
|
filteredData.map(coach => ({
|
||||||
@ -313,7 +367,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
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 =>
|
||||||
@ -325,25 +379,8 @@
|
|||||||
this.jlId = defaultCoach.coachId;
|
this.jlId = defaultCoach.coachId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
/* async getListAll() {
|
|
||||||
this.columnjl = []
|
|
||||||
let res = await request({
|
|
||||||
url: '/app-api/dl-drive-school-coach-small/list',
|
|
||||||
method: 'GET',
|
|
||||||
params: {
|
|
||||||
tenantId: this.tenantId,
|
|
||||||
},
|
|
||||||
tenantIdFlag: false
|
|
||||||
})
|
|
||||||
this.columnjl = [
|
|
||||||
res.data.map(coach => ({
|
|
||||||
label: coach.name,
|
|
||||||
value: coach
|
|
||||||
}))
|
|
||||||
];
|
|
||||||
}, */
|
}, */
|
||||||
|
|
||||||
getsexindex(index) {
|
getsexindex(index) {
|
||||||
this.sex = index
|
this.sex = index
|
||||||
},
|
},
|
||||||
@ -358,8 +395,9 @@
|
|||||||
jlconfirm(e) {
|
jlconfirm(e) {
|
||||||
console.log('e', e)
|
console.log('e', e)
|
||||||
this.jlName = e.value[0].label; // 显示名称
|
this.jlName = e.value[0].label; // 显示名称
|
||||||
this.jlId = e.value[0].value.userId; // 获取教练ID
|
this.jlId = e.value[0].value.coachId; // 获取教练ID
|
||||||
this.showjl = false;
|
this.showjl = false;
|
||||||
|
console.log('jlId',this.jlId)
|
||||||
},
|
},
|
||||||
jlcancel() {
|
jlcancel() {
|
||||||
this.showjl = false
|
this.showjl = false
|
||||||
@ -414,31 +452,19 @@
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
async validateForm() {
|
async validateForm() {
|
||||||
if (!this.sfzimg) {
|
if (!this.sfzimg) {
|
||||||
uni.showToast({
|
uni.showToast({title: '请上传身份证照片', icon: 'error'});
|
||||||
title: '请上传身份证照片',
|
|
||||||
icon: 'error'
|
|
||||||
});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.phone || !this.name || !this.identity) {
|
if (!this.phone || !this.name || !this.identity) {
|
||||||
uni.showToast({
|
uni.showToast({title: '请输入完整信息', icon: 'error'});
|
||||||
title: '请输入完整信息',
|
|
||||||
icon: 'error'
|
|
||||||
});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.isValidPhoneNumber(this.phone)) {
|
if (!this.isValidPhoneNumber(this.phone)) {
|
||||||
uni.showToast({
|
uni.showToast({title: '手机号不规范', icon: 'error'});
|
||||||
title: '手机号不规范',
|
|
||||||
icon: 'error'
|
|
||||||
});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.isValidIDNumber(this.identity)) {
|
if (!this.isValidIDNumber(this.identity)) {
|
||||||
uni.showToast({
|
uni.showToast({title: '身份证不规范', icon: 'error'});
|
||||||
title: '身份证不规范',
|
|
||||||
icon: 'error'
|
|
||||||
});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -452,9 +478,7 @@
|
|||||||
try {
|
try {
|
||||||
// 1. 基础校验
|
// 1. 基础校验
|
||||||
if (!this.checkLogin()) {
|
if (!this.checkLogin()) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({url: '/pages/login/login'});
|
||||||
url: '/pages/login/login'
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!await this.validateForm()) return;
|
if (!await this.validateForm()) return;
|
||||||
@ -476,10 +500,7 @@
|
|||||||
await this.createNewOrder();
|
await this.createNewOrder();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (!error.message.includes('cancel')) {
|
if (!error.message.includes('cancel')) {
|
||||||
uni.showToast({
|
uni.showToast({title: error.message || '操作失败', icon: 'none'});
|
||||||
title: error.message || '操作失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -626,20 +647,17 @@
|
|||||||
}, */
|
}, */
|
||||||
|
|
||||||
async processExistingOrder() {
|
async processExistingOrder() {
|
||||||
uni.showLoading({
|
uni.showLoading({title: '准备支付...', mask: true});
|
||||||
title: '准备支付...',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 1. 准备当前数据
|
// 1. 准备当前数据
|
||||||
const payType = this.selectedPayType;
|
const payType = this.selectedPayType;
|
||||||
const reserveMoney = payType === 1 ?
|
const reserveMoney = payType === 1
|
||||||
this.rightInfoList.reserveMoney :
|
? this.rightInfoList.reserveMoney
|
||||||
this.rightInfoList.price;
|
: this.rightInfoList.price;
|
||||||
const restMoney = payType === 1 ?
|
const restMoney = payType === 1
|
||||||
this.rightInfoList.price - reserveMoney :
|
? this.rightInfoList.price - reserveMoney
|
||||||
0;
|
: 0;
|
||||||
|
|
||||||
// 2. 获取并对比订单数据
|
// 2. 获取并对比订单数据
|
||||||
const orderDetail = await this.getOrderDetail(this.orderId);
|
const orderDetail = await this.getOrderDetail(this.orderId);
|
||||||
@ -771,8 +789,7 @@
|
|||||||
resolve(res.errMsg === 'requestPayment:ok' ? 'success' : 'fail');
|
resolve(res.errMsg === 'requestPayment:ok' ? 'success' : 'fail');
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
resolve(err.errMsg === 'requestPayment:fail cancel' ? 'cancelled' :
|
resolve(err.errMsg === 'requestPayment:fail cancel' ? 'cancelled' : 'fail');
|
||||||
'fail');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -780,16 +797,13 @@
|
|||||||
|
|
||||||
// 创建新订单
|
// 创建新订单
|
||||||
async createNewOrder() {
|
async createNewOrder() {
|
||||||
uni.showLoading({
|
uni.showLoading({title: '创建订单中...', mask: true});
|
||||||
title: '创建订单中...',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
try {
|
try {
|
||||||
if (this.startPay === 1) {
|
if (this.startPay === 1) {
|
||||||
const payType = this.selectedPayType;
|
const payType = this.selectedPayType;
|
||||||
const reserveMoney = payType === 1 ?
|
const reserveMoney = payType === 1
|
||||||
this.rightInfoList.reserveMoney :
|
? this.rightInfoList.reserveMoney
|
||||||
this.rightInfoList.price;
|
: this.rightInfoList.price;
|
||||||
this.payPrice = reserveMoney
|
this.payPrice = reserveMoney
|
||||||
await this.wxPayClick(
|
await this.wxPayClick(
|
||||||
this.name,
|
this.name,
|
||||||
@ -809,7 +823,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 获取新订单号
|
// 获取新订单号
|
||||||
async generateOrderNo() {
|
async generateOrderNo(){
|
||||||
const res = await request({
|
const res = await request({
|
||||||
url: '/small/jxInfo/generateOrderNo',
|
url: '/small/jxInfo/generateOrderNo',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@ -912,10 +926,10 @@
|
|||||||
if (this.localCoachId && this.localStaffType == '01') {
|
if (this.localCoachId && this.localStaffType == '01') {
|
||||||
studentData.source = '01';
|
studentData.source = '01';
|
||||||
studentData.sourceUserId = getCoachId(); // 设置来源用户ID为员工ID
|
studentData.sourceUserId = getCoachId(); // 设置来源用户ID为员工ID
|
||||||
} else if (this.localCoachId && this.localStaffType == '02') {
|
}else if (this.localCoachId && this.localStaffType == '02') {
|
||||||
studentData.source = '02';
|
studentData.source = '02';
|
||||||
studentData.sourceUserId = getCoachId(); // 设置来源用户ID为教练ID
|
studentData.sourceUserId = getCoachId(); // 设置来源用户ID为教练ID
|
||||||
} else {
|
}else{
|
||||||
studentData.source = '03'; // 自来客户
|
studentData.source = '03'; // 自来客户
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -948,7 +962,7 @@
|
|||||||
}, */
|
}, */
|
||||||
|
|
||||||
// 修改users信息
|
// 修改users信息
|
||||||
updateSysUsersNickName() {
|
updateSysUsersNickName(){
|
||||||
request({
|
request({
|
||||||
url: '/app-api/system/user/update',
|
url: '/app-api/system/user/update',
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
@ -963,10 +977,7 @@
|
|||||||
checkLogin() {
|
checkLogin() {
|
||||||
const token = uni.getStorageSync('App-Token');
|
const token = uni.getStorageSync('App-Token');
|
||||||
if (!token) {
|
if (!token) {
|
||||||
uni.showToast({
|
uni.showToast({title: '请先登录', icon: 'none'});
|
||||||
title: '请先登录',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -1051,11 +1062,11 @@
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.bm-page {
|
.bm-page {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
|
|
||||||
.bm-page-button {
|
.bm-page-button {
|
||||||
@ -1203,30 +1214,30 @@
|
|||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
background: #f4f5f6;
|
background: #f4f5f6;
|
||||||
// background: linear-gradient(180deg, #9ffcc5 0%, #84fcbc 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
|
// background: linear-gradient(180deg, #9ffcc5 0%, #84fcbc 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #f4f5f6;
|
background: #f4f5f6;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-top: 88px;
|
padding-top: 88px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.onel {
|
.onel {
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid #8c8c8d;
|
border: 1px solid #8c8c8d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.twol {
|
.twol {
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@ -1237,14 +1248,14 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.d-s {
|
.d-s {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.anniu {
|
.anniu {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
@ -1254,22 +1265,22 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-box {
|
.popup-box {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title_s {
|
.title_s {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clv {
|
.clv {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #2C78F5;
|
background: #2C78F5;
|
||||||
width: 26px;
|
width: 26px;
|
||||||
@ -1280,9 +1291,9 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.size-lv {
|
.size-lv {
|
||||||
margin-right: 35px;
|
margin-right: 35px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue
Block a user