李双庆 10 months ago
parent
commit
db24244768
  1. 84
      api/apiRoute.js
  2. 6
      common/axios.js
  3. 15
      components/AQ/AQTabber.vue
  4. 54
      main.js
  5. 11
      pages.json
  6. 4
      pages/coach/class/info.vue
  7. 2
      pages/coach/class/list.vue
  8. 2
      pages/coach/course/info.vue
  9. 4
      pages/coach/course/info_list.vue
  10. 2
      pages/coach/course/list.vue
  11. 8
      pages/coach/home/index.vue
  12. 3
      pages/coach/job/add.vue
  13. 2
      pages/coach/job/list.vue
  14. 2
      pages/coach/my/arrival_statistics.vue
  15. 4
      pages/coach/my/due_soon.vue
  16. 2
      pages/coach/my/exam_results.vue
  17. 2
      pages/coach/my/gotake_exam.vue
  18. 16
      pages/coach/my/index.vue
  19. 2
      pages/coach/my/schooling_statistics.vue
  20. 4
      pages/coach/my/set_up.vue
  21. 4
      pages/coach/my/teaching_management.vue
  22. 2
      pages/coach/my/update_pass.vue
  23. 8
      pages/coach/student/info.vue
  24. 253
      pages/common/my_attendance.vue
  25. 4
      pages/common/my_message.vue
  26. 2
      pages/common/sys_msg_list.vue
  27. 128
      pages/market/clue/add_clues.vue
  28. 8
      pages/market/clue/clue_info.vue
  29. 126
      pages/market/clue/edit_clues.vue
  30. 44
      pages/market/clue/edit_clues_log.vue
  31. 4
      pages/market/clue/index.vue
  32. 3
      pages/market/clue/new_task.vue
  33. 3
      pages/market/clue/writing_followUp.vue
  34. 14
      pages/market/data/index.vue
  35. 27
      pages/market/my/index.vue
  36. 4
      pages/market/my/set_up.vue
  37. 2
      pages/market/my/signed_client_list.vue
  38. 5
      pages/market/my/update_pass.vue
  39. 293
      pages/student/index/index.vue
  40. 47
      pages/student/index/job_list.vue
  41. 56
      pages/student/index/work_details.vue
  42. 5
      pages/student/login/forgot.vue
  43. 12
      pages/student/login/login.vue
  44. 47
      pages/student/my/lesson_consumption.vue
  45. 25
      pages/student/my/my.vue
  46. 211
      pages/student/my/my_coach.vue
  47. 4
      pages/student/my/set_up.vue
  48. 2
      pages/student/my/update_pass.vue
  49. 183
      pages/student/timetable/index.vue
  50. 101
      pages/student/timetable/info.vue
  51. 75
      pages/student/timetable/list.vue

84
api/apiRoute.js

@ -532,6 +532,90 @@ export default {
}) })
}, },
//学生端-学生课程安排-列表
xy_personCourseSchedule(data = {}) {
let url = '/xy/personCourseSchedule'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-详情
xy_personCourseScheduleInfo(data = {}) {
let url = '/xy/personCourseSchedule/info'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-修改请假状态
xy_personCourseScheduleEditStatus(data = {}) {
let url = '/xy/personCourseSchedule/editStatus'
return http.post(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-获取排课日历
xy_personCourseScheduleGetCalendar(data = {}) {
let url = '/xy/personCourseSchedule/getCalendar'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-获取学生排课的全部场地列表
xy_personCourseScheduleGetVenueListAll(data = {}) {
let url = '/xy/personCourseSchedule/getVenueListAll'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-获取学生排课的全部场地列表
xy_personCourseScheduleGetMyCoach(data = {}) {
let url = '/xy/personCourseSchedule/getMyCoach'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-获取学生课程消耗记录列表
xy_personCourseScheduleGetStudentCourseUsageList(data = {}) {
let url = '/xy/personCourseSchedule/getStudentCourseUsageList'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-获取作业列表
xy_assignment(data = {}) {
let url = '/xy/assignment'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-获取作业详情
xy_assignmentsInfo(data = {}) {
let url = '/xy/assignment/info'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-提交作业
xy_assignmentSubmitObj(data = {}) {
let url = '/xy/assignment/submitObj'
return http.get(url, data).then(res => {
return res;
})
},

6
common/axios.js

@ -37,7 +37,7 @@ export default {
title:'加载中...' title:'加载中...'
}) })
return new Promise((cback, reject) => { return new Promise((cback, reject) => {
console.log(Api_url + url) console.log('请求地址',Api_url + url)
uni.request({ uni.request({
url: Api_url + url, url: Api_url + url,
data: param, data: param,
@ -55,7 +55,7 @@ export default {
if (res_code == 200) { if (res_code == 200) {
if (res_codes == 401) { if (res_codes == 401) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/student/login/login' url: `/pages/student/login/login?res_codes=${res_codes}`
}) })
}else{ }else{
cback(res.data); cback(res.data);
@ -70,7 +70,7 @@ export default {
} else { } else {
if (res_codes == 401) { if (res_codes == 401) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/student/login/login' url: `/pages/student/login/login?res_codes=${res_codes}`
}) })
} else { } else {
console.log('400/500', url, error, res) console.log('400/500', url, error, res)

15
components/AQ/AQTabber.vue

@ -157,9 +157,18 @@
//tabBar //tabBar
uni.setStorageSync('tabBerIndex', e.index) uni.setStorageSync('tabBerIndex', e.index)
console.log('qqq', e.urlPath) console.log('qqq', e.urlPath)
uni.navigateTo({
url: e.urlPath //
}) uni.redirectTo({
url: e.urlPath
})
//
// uni.reLaunch({
// url: e.urlPath
// })
console.log('qqq2,执行完了')
}else{ }else{
this.show = true this.show = true
} }

54
main.js

@ -21,6 +21,60 @@ Vue.prototype.$getimg = Api_url
Vue.mixin(minxin) Vue.mixin(minxin)
/**
* 全局封装跳转方法this.$navigateTo({ url: 'xxx' })
* 支持在页面栈 >= 8 层时关闭全部页面打开页面
*/
Vue.prototype.$navigateTo = function (options) {
// 只接受 { url: 'xxx' } 的形式作为参数
if (typeof options !== 'object' || !options.url) {
console.error('跳转参数错误', options);
// uni.showToast({ title: '参数错误', icon: 'none' });
return;
}
const url = options.url; // 获取要跳转的页面路径
const maxStackSize = 4; // 页面栈最大保留数量
const pages = getCurrentPages(); // 获取当前页面栈
const currentPage = pages[pages.length - 1];
const currentRoute = currentPage.route;
console.log('view-页面栈长度:',pages.length)
// 判断当前页面栈是否已满
if (pages.length >= maxStackSize) {
// 页面栈已满,使用 reLaunch 关闭所有页面并跳转
uni.reLaunch({
url,
success: () => {
// 可选:用于调试
// console.log('已通过 reLaunch 跳转到:', url);
},
fail: (err) => {
console.error('reLaunch 跳转失败:', err);
// uni.showToast({ title: '页面跳转失败', icon: 'none' });
}
});
} else {
// 页面栈未满,正常使用 navigateTo 正常跳转
uni.navigateTo({
url,
success: () => {
// 可选:用于调试
// console.log('当前页面栈:', getCurrentPages().map(p => p.route));
},
fail: (err) => {
console.error('navigateTo 跳转失败:', err);
// uni.showToast({ title: '页面跳转失败', icon: 'none' });
}
});
}
};
const app = new Vue({ const app = new Vue({
store, store,
...App ...App

11
pages.json

@ -36,6 +36,15 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{
"path": "pages/student/my/my_coach",
"style": {
"navigationBarTitleText": "我的教练",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "white"
}
},
{ {
"path": "pages/student/login/forgot", "path": "pages/student/login/forgot",
@ -481,7 +490,7 @@
"navigationBarTitleText": "线索", "navigationBarTitleText": "线索",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#292929", "navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "white"
} }
}, },
{ {

4
pages/coach/class/info.vue

@ -322,14 +322,14 @@
// //
openViewCourseInfo(item) { openViewCourseInfo(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}` url: `/pages/coach/course/info_list?id=${id}`
}) })
}, },
// //
openViewStudentInfo(item) { openViewStudentInfo(item) {
let students_id = item.student.id let students_id = item.student.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/info?students_id=${students_id}` url: `/pages/coach/student/info?students_id=${students_id}`
}) })
}, },

2
pages/coach/class/list.vue

@ -156,7 +156,7 @@ export default {
// //
openViewClassInfo(item){ openViewClassInfo(item){
let class_id = item.id let class_id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/class/info?class_id=${class_id}` url: `/pages/coach/class/info?class_id=${class_id}`
}) })
}, },

2
pages/coach/course/info.vue

@ -137,7 +137,7 @@ export default {
// //
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },

4
pages/coach/course/info_list.vue

@ -227,7 +227,7 @@
// //
openViewCourseInfo(item) { openViewCourseInfo(item) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },
@ -238,7 +238,7 @@
//- //-
openViewWorkDetails(item) { openViewWorkDetails(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/work_details?id=${id}` url: `/pages/coach/student/work_details?id=${id}`
}) })
}, },

2
pages/coach/course/list.vue

@ -233,7 +233,7 @@
// //
openViewCourseInfoList(item) { openViewCourseInfoList(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}` url: `/pages/coach/course/info_list?id=${id}`
}) })
}, },

8
pages/coach/home/index.vue

@ -199,14 +199,14 @@ export default {
//- //-
openObjAddView(){ openObjAddView(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/job/add' url: '/pages/coach/job/add'
}) })
}, },
// //
openObjListView(){ openObjListView(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/job/list' url: '/pages/coach/job/list'
}) })
}, },
@ -214,7 +214,7 @@ export default {
//- //-
openViewCourseInfoList(item){ openViewCourseInfoList(item){
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}` url: `/pages/coach/course/info_list?id=${id}`
}) })
}, },
@ -222,7 +222,7 @@ export default {
//- //-
openViewWorkDetails(item){ openViewWorkDetails(item){
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/work_details?id=${id}` url: `/pages/coach/student/work_details?id=${id}`
}) })
}, },

3
pages/coach/job/add.vue

@ -351,7 +351,8 @@ export default {
}) })
//1s //1s
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ //
uni.redirectTo({
url: '/pages/coach/home/index' url: '/pages/coach/home/index'
}) })
}, 1000) }, 1000)

2
pages/coach/job/list.vue

@ -130,7 +130,7 @@ export default {
//- //-
openViewWorkDetails(item){ openViewWorkDetails(item){
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/work_details?id=${id}` url: `/pages/coach/student/work_details?id=${id}`
}) })
}, },

2
pages/coach/my/arrival_statistics.vue

@ -156,7 +156,7 @@ export default {
// //
openViewCourseInfo(item){ openViewCourseInfo(item){
let id= item.id let id= item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}` url: `/pages/coach/course/info_list?id=${id}`
}) })
}, },

4
pages/coach/my/due_soon.vue

@ -189,13 +189,13 @@ export default {
// //
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },
// //
openViewStudentInfo(item){ openViewStudentInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/student/info' url: '/pages/coach/student/info'
}) })
}, },

2
pages/coach/my/exam_results.vue

@ -34,7 +34,7 @@
}, },
methods: { methods: {
back() { back() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/teaching_management' url: '/pages/coach/my/teaching_management'
}) })
} }

2
pages/coach/my/gotake_exam.vue

@ -105,7 +105,7 @@
}) })
const res = await apiRoute.submitTestPaper({optionList: this.optionList,testPaperId: this.testPaperId, id: this.zid}); const res = await apiRoute.submitTestPaper({optionList: this.optionList,testPaperId: this.testPaperId, id: this.zid});
if(res.code === 1) { if(res.code === 1) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/exam_results?error=' + res.data.error + '&success=' + res.data.success + '&num=' + res.data.num url: '/pages/coach/my/exam_results?error=' + res.data.error + '&success=' + res.data.success + '&num=' + res.data.num
}) })
} else { } else {

16
pages/coach/my/index.vue

@ -152,56 +152,56 @@ export default {
// //
openViewArrivalStatistics(){ openViewArrivalStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/arrival_statistics' url: '/pages/coach/my/arrival_statistics'
}) })
}, },
// //
openViewDueSoon(){ openViewDueSoon(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/due_soon' url: '/pages/coach/my/due_soon'
}) })
}, },
// //
openViewSchoolingStatistics(){ openViewSchoolingStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/schooling_statistics' url: '/pages/coach/my/schooling_statistics'
}) })
}, },
// //
teachingResearchManagement(){ teachingResearchManagement(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/teaching_management' url: '/pages/coach/my/teaching_management'
}) })
}, },
// //
openViewFeedback(){ openViewFeedback(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/feedback' url: '/pages/common/feedback'
}) })
}, },
// //
openViewMyInfo(){ openViewMyInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/info' url: '/pages/coach/my/info'
}) })
}, },
// //
openViewSetUp(){ openViewSetUp(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/set_up' url: '/pages/coach/my/set_up'
}) })
}, },
//- //-
openViewMyAttendance(){ openViewMyAttendance(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/my_attendance' url: '/pages/common/my_attendance'
}) })
}, },

2
pages/coach/my/schooling_statistics.vue

@ -141,7 +141,7 @@ export default {
// //
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },

4
pages/coach/my/set_up.vue

@ -27,12 +27,12 @@
}, },
privacy_agreement(type){ privacy_agreement(type){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/privacy_agreement?type='+type url: '/pages/common/privacy_agreement?type='+type
}) })
}, },
update_pass(){ update_pass(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/update_pass' url: '/pages/coach/my/update_pass'
}) })
} }

4
pages/coach/my/teaching_management.vue

@ -104,7 +104,7 @@
return this.tableTypeName[text] return this.tableTypeName[text]
}, },
info(id) { info(id) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/teaching_management_info?id=' + id url: '/pages/coach/my/teaching_management_info?id=' + id
}) })
}, },
@ -127,7 +127,7 @@
}) })
}, },
goTake(id,zid) { goTake(id,zid) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/gotake_exam?id=' + id + '&zid=' + zid url: '/pages/coach/my/gotake_exam?id=' + id + '&zid=' + zid
}) })
} }

2
pages/coach/my/update_pass.vue

@ -64,7 +64,7 @@
this.tset_style = 2 this.tset_style = 2
}, },
forgot() { forgot() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/login/forgot' url: '/pages/student/login/forgot'
}) })
}, },

8
pages/coach/student/info.vue

@ -292,13 +292,13 @@ export default {
// //
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },
// //
openViewStudentInfo(item){ openViewStudentInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/student/info' url: '/pages/coach/student/info'
}) })
}, },
@ -306,14 +306,14 @@ export default {
// //
openViewPhysicalExamination(item){ openViewPhysicalExamination(item){
let survey_id = item.id let survey_id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/physical_examination?survey_id=${survey_id}` url: `/pages/coach/student/physical_examination?survey_id=${survey_id}`
}) })
}, },
// //
opebViewWorkDetails(item){ opebViewWorkDetails(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/student/work_details' url: '/pages/coach/student/work_details'
}) })
}, },

253
pages/common/my_attendance.vue

@ -25,28 +25,35 @@
<view class="li" <view class="li"
v-for="(v,k) in tableList" v-for="(v,k) in tableList"
:key="k" :key="k"
@click="openInfo(v)"
> >
<view class="left"> <view class="left" @click="openInfo(v)">
<!-- <image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png" model="aspectFill"></image>-->
</view>
<view class="right">
<view class="content">普通考勤</view> <view class="content">普通考勤</view>
<view class="content"> <view class="content">
{{v.status_name}} {{v.status_name}}
</view> </view>
<view class="content"> <view class="content">
校区{{v.campus_id_name}} 校区{{v.campus_id_name || ''}}
</view> </view>
<view class="content"> <view class="content">
备注{{v.remarks || ''}} 备注{{v.remarks || ''}}
</view> </view>
<view class="content"> <view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text> <view class="item" v-if="v.status != 'leave'">
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text> <!--考勤-->
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text> <text>开始时间{{ v.attendance_date }} {{ v.check_in_time || '' }}</text>
<text v-if="v.check_out_time">结束时间{{ v.attendance_date }} {{ v.check_out_time || '' }}</text>
</view>
<!--请假-->
<view class="item" v-else>
<text>开始时间{{ v.attendance_date }} {{v.leave_start_time || ''}}</text>
<text>结束时间{{ v.attendance_date }} {{v.leave_end_time || ''}}</text>
</view>
</view> </view>
</view> </view>
<view class="right">
<view v-if="v.status == 'present' && !v.check_out_time" class="btn" style="background-color: #00b0f0;" @click="openSignInShow('sign_out',v)">签退</view>
</view>
</view> </view>
</view> </view>
@ -67,7 +74,21 @@
:key="k" :key="k"
> >
<view class="left"> <view class="left">
<!-- <image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png" model="aspectFill"></image>--> <view class="content">普通考勤</view>
<view class="content">
{{v.status_name}}
</view>
<view class="content">
校区{{v.campus_id_name}}
</view>
<view class="content">
备注{{v.remarks || ''}}
</view>
<view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text>
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text>
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text>
</view>
</view> </view>
<view class="right"> <view class="right">
<view class="content">普通考勤</view> <view class="content">普通考勤</view>
@ -105,7 +126,21 @@
:key="k" :key="k"
> >
<view class="left"> <view class="left">
<!-- <image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png" model="aspectFill"></image>--> <view class="content">普通考勤</view>
<view class="content">
{{v.status_name}}
</view>
<view class="content">
校区{{v.campus_id_name}}
</view>
<view class="content">
备注{{v.remarks || ''}}
</view>
<view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text>
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text>
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text>
</view>
</view> </view>
<view class="right"> <view class="right">
<view class="content">普通考勤</view> <view class="content">普通考勤</view>
@ -150,8 +185,69 @@
<text class="fui-descr">{{signIn_content}}</text> <text class="fui-descr">{{signIn_content}}</text>
<fui-form class="form-section" ref="form" top="0" :model="formData" :show="false"> <fui-form class="form-section" ref="form" top="0" :model="formData" :show="false">
<view class="input-style"> <view class="input-style">
<!-- 请假日期选择-->
<fui-form-item
v-if="formData.status == 'leave'"
label="选择日期"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openLeaveData()">
{{ (formData.attendance_date) ? formData.attendance_date : '点击选择' }}
</view>
<fui-date-picker
:show="showLeaveData"
type="3"
:minDate="leaveMinDate"
:maxDate="leaveMaxDate"
@change="changeLeaveData"
@cancel="cancelLeaveData"
></fui-date-picker>
</view>
</fui-form-item>
<!-- 请假时间选择-->
<fui-form-item
v-if="formData.status == 'leave'"
label="选择时间范围"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openLeaveStartTime()">
{{ (formData.leave_time) ? formData.leave_time : '点击选择' }}
</view>
<fui-date-picker
:show="showLeaveStartTime"
range
type="6"
@change="changeLeaveStartTime"
@cancel="cancelLeaveStartTime"
></fui-date-picker>
</view>
</fui-form-item>
<!--校区选择--> <!--校区选择-->
<fui-form-item <fui-form-item
v-if="picker_options.length"
label="选择校区" label="选择校区"
asterisk asterisk
asteriskPosition="right" asteriskPosition="right"
@ -172,7 +268,6 @@
</fui-form-item> </fui-form-item>
<!--备注--> <!--备注-->
<fui-form-item <fui-form-item
v-if="formData.status == 'leave'"
label="备注" label="备注"
labelSize='26' labelSize='26'
prop="" prop=""
@ -256,7 +351,7 @@
<!-- 选择器 --> <!-- 校区下拉选择器 -->
<fui-picker <fui-picker
:linkage='picker_linkage' :linkage='picker_linkage'
:options="picker_options" :options="picker_options"
@ -266,6 +361,10 @@
@cancel="cancelCicker"> @cancel="cancelCicker">
</fui-picker> </fui-picker>
<!-- 请假日期选择器-->
<!-- 请假时间范围选择器-->
</view> </view>
</template> </template>
@ -324,6 +423,9 @@ export default {
status:'',//: present-, absent-, late-, leave_early-退,leave-,sign_out-退 status:'',//: present-, absent-, late-, leave_early-退,leave-,sign_out-退
remarks:'',// remarks:'',//
attendance_date:'',/// attendance_date:'',///
leave_time:'',//
leave_start_time:'',//
leave_end_time:'',//
longitude:'',// longitude:'',//
latitude:'',// latitude:'',//
}, },
@ -349,6 +451,16 @@ export default {
// }, // },
],// ],//
//
showLeaveData:false,
leaveMinDate:'',//
leaveMaxDate:'',//
//
showLeaveStartTime:false,
// //
info_show:false,//|true=,false= info_show:false,//|true=,false=
info_data:{},// info_data:{},//
@ -399,11 +511,20 @@ export default {
this.userInfo = res.data this.userInfo = res.data
this.picker_options = [] this.picker_options = []
res.data.cameus_dept_arr.forEach((v,k)=>{ res.data.cameus_dept_arr.forEach((v,k)=>{
this.picker_options.push({ if(v.campus_id){
text: v.campus_id_name, this.picker_options.push({
value: v.campus_id text: v.campus_id_name,
}) value: v.campus_id
})
}
}) })
//
if(!this.picker_options.length){
this.formData.campus_id = 0
this.formData.campus_id_name = ''
}
console.log(123123,this.picker_options) console.log(123123,this.picker_options)
}, },
@ -420,7 +541,17 @@ export default {
this.formData.attendance_date = res this.formData.attendance_date = res
},
//
this.leaveMinDate = res
//
const minDate = new Date(this.leaveMinDate);
minDate.setMonth(minDate.getMonth() + 6);
const max_year = minDate.getFullYear();
const max_month = String(minDate.getMonth() + 1).padStart(2, '0');
const max_day = String(minDate.getDate()).padStart(2, '0');
this.leaveMaxDate = `${max_year}-${max_month}-${max_day}`; },
//tag //tag
async segmented(e) { async segmented(e) {
@ -531,10 +662,19 @@ export default {
// //
// //
openSignInShow(status){ openSignInShow(status,obj={}){
this.formData.status = status this.formData.status = status
console.log('123123',obj);
let attendance_date = this.formData.attendance_date
if(obj.id){
this.formData.id = obj.id
attendance_date = obj.attendance_date
}else{
this.formData.id = ''
}
switch (status){ switch (status){
case 'present': case 'present':
this.signIn_title = `是否确认打卡?` this.signIn_title = `是否确认打卡?`
@ -546,7 +686,7 @@ export default {
break; break;
case 'sign_out': case 'sign_out':
this.signIn_title = `是否确认签退?` this.signIn_title = `是否确认签退?`
this.signIn_content = `${this.formData.attendance_date} 是否确认签退?` this.signIn_content = `${attendance_date} 是否确认签退?`
break; break;
} }
@ -571,7 +711,8 @@ export default {
// //
this.closeSignInShow() this.closeSignInShow()
}else{ }else{
if(!this.formData.campus_id){ console.log('提交',this.formData)
if(!this.formData.campus_id && this.picker_options.length){
uni.showToast({ uni.showToast({
title: '请选择校区', title: '请选择校区',
icon: 'none' icon: 'none'
@ -706,6 +847,10 @@ export default {
async submitFormData() { async submitFormData() {
this.closeSignInShow() this.closeSignInShow()
if(!this.formData.campus_id && !this.picker_options.length){
this.formData.campus_id = 0
}
let param = {...this.formData} let param = {...this.formData}
let res = await apiRoute.common_attendanceEdit(param) let res = await apiRoute.common_attendanceEdit(param)
if (res.code != 1) { if (res.code != 1) {
@ -773,6 +918,43 @@ export default {
return [data]; return [data];
}, },
//
//-
changeLeaveData(e){
console.log('请假日期选择',e)
this.formData.attendance_date = e.result
this.cancelLeaveData()
},
//
openLeaveData(){
this.showLeaveData = true
},
//
cancelLeaveData(){
this.showLeaveData = false
},
//-
changeLeaveStartTime(e){
console.log('请假开始时间选择',e)
let leave_start_time = e.startDate.result
let leave_end_time = e.endDate.result
this.formData.leave_time = `${leave_start_time}-${leave_end_time}`
this.formData.leave_start_time = leave_start_time
this.formData.leave_end_time = leave_end_time
this.cancelLeaveStartTime()
},
//
openLeaveStartTime(){
this.showLeaveStartTime = true
},
//
cancelLeaveStartTime(){
this.showLeaveStartTime = false
},
} }
} }
</script> </script>
@ -820,29 +1002,38 @@ export default {
.li{ .li{
border: 1px solid #5f5f5f; border: 1px solid #5f5f5f;
border-radius: 15rpx; border-radius: 15rpx;
padding: 20rpx 0; padding: 20rpx 20rpx;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
gap: 43rpx; gap: 43rpx;
.left{ .left{
image{ width: 70%;
width: 174rpx;
height: 174rpx;
border-radius: 24rpx;
background-color: #333333;
}
}
.right{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 18rpx; gap: 18rpx;
.content{ .content{
font-size: 24rpx; font-size: 24rpx;
.item{
display: flex;
flex-direction: column;
}
} }
.content:nth-child(1){ .content:nth-child(1){
font-size: 28rpx; font-size: 28rpx;
} }
} }
.right{
.btn{
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 8rpx;
color: rgba(255,255,255,1);
font-size: 28rpx;
text-align: center;
}
}
} }
} }
.title_box{ .title_box{
@ -856,6 +1047,7 @@ export default {
} }
.section_btn{ .section_btn{
margin-top: 20rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
display: flex; display: flex;
@ -901,6 +1093,7 @@ export default {
.input-style { .input-style {
text-align: right !important; text-align: right !important;
.input-title{}
} }
.button_box{ .button_box{
margin-top: 30rpx; margin-top: 30rpx;

4
pages/common/my_message.vue

@ -248,7 +248,7 @@ export default {
//- //-
openViewSysMsgList(e){ openViewSysMsgList(e){
let hair_staff_id = e.hair_staff_id//id let hair_staff_id = e.hair_staff_id//id
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/sys_msg_list?hair_staff_id=${hair_staff_id}` url: `/pages/common/sys_msg_list?hair_staff_id=${hair_staff_id}`
}) })
}, },
@ -271,7 +271,7 @@ export default {
to_id = e.personnel_id to_id = e.personnel_id
} }
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}` url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}`
}) })
} }

2
pages/common/sys_msg_list.vue

@ -134,7 +134,7 @@ export default {
openViewArticleInfo(item) { openViewArticleInfo(item) {
let id = item.id let id = item.id
let redirect = item.redirect// let redirect = item.redirect//
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/article_info?id=${id}` url: `/pages/common/article_info?id=${id}`
}) })
}, },

128
pages/market/clue/add_clues.vue

@ -27,9 +27,9 @@
<view class="title" style="margin-top: 20rpx;">基础信息</view> <view class="title" style="margin-top: 20rpx;">基础信息</view>
<view class="input-style"> <view class="input-style">
<!--来源渠道--> <!--来源-->
<fui-form-item <fui-form-item
label="来源渠道" label="来源"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
prop="" prop=""
@ -41,14 +41,15 @@
<view <view
class="input-title" class="input-title"
style="margin-right:14rpx;" style="margin-right:14rpx;"
@click="openCicker(`source_channel`)"> @click="openCicker(`source`)">
{{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }} {{ (formData.source) ? picker_config.source.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--来源--> <!--来源渠道-->
<fui-form-item <fui-form-item
label="来源" v-if="formData.source == 1"
label="来源渠道"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
prop="" prop=""
@ -60,11 +61,12 @@
<view <view
class="input-title" class="input-title"
style="margin-right:14rpx;" style="margin-right:14rpx;"
@click="openCicker(`source`)"> @click="openCicker(`source_channel`)">
{{ (formData.source) ? picker_config.source.text : '点击选择' }} {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--顾问--> <!--顾问-->
<!-- <!--
<fui-form-item <fui-form-item
@ -87,6 +89,7 @@
</fui-form-item> </fui-form-item>
--> -->
<fui-form-item <fui-form-item
v-show="false"
label="顾问" label="顾问"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
@ -188,6 +191,7 @@
backgroundColor="#434544" backgroundColor="#434544"
size="26" size="26"
color="#fff" color="#fff"
@blur="handlePhoneBlur"
></fui-input> ></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
@ -222,15 +226,12 @@
labelColor='#fff' labelColor='#fff'
:bottomBorder='false'> :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input <view
:borderBottom="false" class="input-title"
:padding="[0]" style="margin-right:14rpx;"
placeholder="点击填写" @click="openCicker(`decision_maker`)">
v-model="formData.decision_maker" {{ (formData.decision_maker) ? picker_config.decision_maker.text : '点击选择' }}
backgroundColor="#434544" </view>
size="26"
color="#fff"
></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<!--客户初步意向度--> <!--客户初步意向度-->
@ -254,6 +255,7 @@
</fui-form-item> </fui-form-item>
<!--客户状态--> <!--客户状态-->
<fui-form-item <fui-form-item
v-show="false"
label="客户状态" label="客户状态"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
@ -373,16 +375,14 @@
labelColor='#fff' labelColor='#fff'
:bottomBorder='false'> :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input <view
:borderBottom="false" class="input-title"
:padding="[0]" style="margin-right:14rpx;"
placeholder="点击填写" @click="openCicker(`distance`)">
v-model="formData.distance" {{ (formData.distance) ? picker_config.distance.text : '点击选择' }}
backgroundColor="#434544" </view>
size="26"
color="#fff"
></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<!--沟通备注--> <!--沟通备注-->
<fui-form-item <fui-form-item
@ -448,8 +448,8 @@
<!--数据列表--> <!--数据列表-->
<view class="ul" v-else> <view class="ul" v-else>
<view class="li" v-for="(v,k) in clientUserList" :key="k"> <view class="li" v-for="(v,k) in clientUserList" :key="k" @click="openViewClueInfo(v)">
<view class="left_box" @click="openViewClueInfo(v)"> <view class="left_box">
<view class="box_1"> <view class="box_1">
<image <image
class="img" class="img"
@ -496,8 +496,8 @@
</view> </view>
</view> </view>
<view class="right_box"> <view class="right_box">
<image v-if="v.member_id" class="img" :src="$util.img('/uniapp_src/static/images/index/message.png')" @click="openViewMyMessage(v)"></image> <!-- <image v-if="v.member_id" class="img" :src="$util.img('/uniapp_src/static/images/index/message.png')" @click="openViewMyMessage(v)"></image>-->
<image v-if="v.phone_number" class="img" :src="$util.img('/uniapp_src/static/images/index/phone.png')" @click="dialTel(v)"></image> <!-- <image v-if="v.phone_number" class="img" :src="$util.img('/uniapp_src/static/images/index/phone.png')" @click="dialTel(v)"></image>-->
</view> </view>
</view> </view>
</view> </view>
@ -605,7 +605,7 @@ export default {
demand:'',// demand:'',//
decision_maker:'',// decision_maker:'',//
initial_intent:'',//: high-, medium-, low- initial_intent:'',//: high-, medium-, low-
status:'',//: active-, inactive-, pending- status:'pending',//: active-, inactive-, pending-
// //
purchasing_power:'',// purchasing_power:'',//
@ -663,6 +663,11 @@ export default {
text:'', text:'',
options:[], options:[],
}, },
//
decision_maker:{
text:'',
options:[],
},
// //
campus:{ campus:{
text:'', text:'',
@ -672,7 +677,12 @@ export default {
status:{ status:{
text:'', text:'',
options:[], options:[],
} },
//
distance:{
text:'',
options:[],
},
},// },//
// //
@ -721,6 +731,8 @@ export default {
await this.getDict('initial_intent')//- await this.getDict('initial_intent')//-
await this.getDict('cognitive_idea')//- await this.getDict('cognitive_idea')//-
await this.getDict('status')//- await this.getDict('status')//-
await this.getDict('decision_maker')//-
await this.getDict('distance')//-
// this.getStaffList()// // this.getStaffList()//
// this.getAreaTree()// // this.getAreaTree()//
}, },
@ -851,6 +863,10 @@ export default {
case 'cognitive_idea': case 'cognitive_idea':
key = 'cognitive_concept' key = 'cognitive_concept'
break; break;
//
case 'decision_maker':
key = 'decision_maker'
break;
// //
case 'initial_intent': case 'initial_intent':
key = 'preliminarycustomerintention' key = 'preliminarycustomerintention'
@ -859,6 +875,11 @@ export default {
case 'status': case 'status':
key = 'kh_status' key = 'kh_status'
break; break;
//
case 'distance':
key = 'distance'
break;
} }
if(!key){ if(!key){
return return
@ -952,7 +973,7 @@ export default {
return; return;
} }
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}` url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}`
}) })
}, },
@ -961,7 +982,7 @@ export default {
openViewMyMessage(item) { openViewMyMessage(item) {
let from_id = this.userInfo.id//id let from_id = this.userInfo.id//id
let to_id = item.customerResource.id//ID let to_id = item.customerResource.id//ID
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}` url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}`
}) })
}, },
@ -1006,7 +1027,32 @@ export default {
//
async handlePhoneBlur(){
if(!this.formData.phone_number){
return
}
this.clientUserList = []
let param = {
phone_number:this.formData.phone_number
}
let res = await apiRoute.xs_getAllCustomerResources(param)
if(res.code != 1){
if(res.msg == '暂无数据'){
return
}
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
console.log('查重',res)
this.clientUserList = res.data
this.openDuplicateCheck()
},
@ -1106,10 +1152,19 @@ export default {
}, },
//- //-
changeCicker(e) { changeCicker(e) {
console.log('监听-下拉选择器', this.picker_input_name, e) console.log('监听-下拉选择器', this.picker_input_name, e,this.formData)
let input_name = this.picker_input_name let input_name = this.picker_input_name
this.formData[input_name] = e.value this.formData[input_name] = e.value
this.picker_config[input_name]['text'] = e.text this.picker_config[input_name]['text'] = e.text
if(input_name == 'source'){
if(e.value != 1){
this.formData.source_channel = '0'//0=线
}else{
this.formData.source_channel = ''//线
}
}
this.cancelCicker() this.cancelCicker()
}, },
// //
@ -1337,7 +1392,8 @@ export default {
//1s //1s
setTimeout(() => { setTimeout(() => {
//-线 //-线
uni.navigateTo({ //
uni.redirectTo({
url: `/pages/market/clue/index` url: `/pages/market/clue/index`
}) })
}, 1000) }, 1000)

8
pages/market/clue/clue_info.vue

@ -354,14 +354,14 @@
//- //-
openViewWritingFollowUp() { openViewWritingFollowUp() {
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/writing_followUp` url: `/pages/market/clue/writing_followUp`
}) })
}, },
//- //-
openViewEditClues(){ openViewEditClues(){
let resource_sharing_id = this.resource_sharing_id//id let resource_sharing_id = this.resource_sharing_id//id
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/edit_clues?resource_sharing_id=${resource_sharing_id}` url: `/pages/market/clue/edit_clues?resource_sharing_id=${resource_sharing_id}`
}) })
}, },
@ -369,14 +369,14 @@
//- //-
openViewEditCluesLog() { openViewEditCluesLog() {
let resource_id = this.clientInfo.resource_id let resource_id = this.clientInfo.resource_id
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/edit_clues_log?resource_id=${resource_id}` url: `/pages/market/clue/edit_clues_log?resource_id=${resource_id}`
}) })
}, },
//- //-
openViewNewTask() { openViewNewTask() {
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/new_task` url: `/pages/market/clue/new_task`
}) })
}, },

126
pages/market/clue/edit_clues.vue

@ -27,9 +27,9 @@
<view class="title" style="margin-top: 20rpx;">基础信息</view> <view class="title" style="margin-top: 20rpx;">基础信息</view>
<view class="input-style"> <view class="input-style">
<!--来源渠道--> <!--来源-->
<fui-form-item <fui-form-item
label="来源渠道" label="来源"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
prop="" prop=""
@ -41,14 +41,16 @@
<view <view
class="input-title" class="input-title"
style="margin-right:14rpx;" style="margin-right:14rpx;"
@click="openCicker(`source_channel`)"> @click="openCicker(`source`)">
{{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }} {{ (formData.source) ? picker_config.source.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--来源-->
<!--来源渠道-->
<fui-form-item <fui-form-item
label="来源" v-if="formData.source == 1"
label="来源渠道"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
prop="" prop=""
@ -60,11 +62,12 @@
<view <view
class="input-title" class="input-title"
style="margin-right:14rpx;" style="margin-right:14rpx;"
@click="openCicker(`source`)"> @click="openCicker(`source_channel`)">
{{ (formData.source) ? picker_config.source.text : '点击选择' }} {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--顾问--> <!--顾问-->
<!-- <!--
<fui-form-item <fui-form-item
@ -188,6 +191,7 @@
backgroundColor="#434544" backgroundColor="#434544"
size="26" size="26"
color="#fff" color="#fff"
@blur="handlePhoneBlur"
></fui-input> ></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
@ -222,15 +226,12 @@
labelColor='#fff' labelColor='#fff'
:bottomBorder='false'> :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input <view
:borderBottom="false" class="input-title"
:padding="[0]" style="margin-right:14rpx;"
placeholder="点击填写" @click="openCicker(`decision_maker`)">
v-model="formData.decision_maker" {{ (formData.decision_maker) ? picker_config.decision_maker.text : '点击选择' }}
backgroundColor="#434544" </view>
size="26"
color="#fff"
></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
@ -374,15 +375,12 @@
labelColor='#fff' labelColor='#fff'
:bottomBorder='false'> :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input <view
:borderBottom="false" class="input-title"
:padding="[0]" style="margin-right:14rpx;"
placeholder="点击填写" @click="openCicker(`distance`)">
v-model="formData.distance" {{ (formData.distance) ? picker_config.distance.text : '点击选择' }}
backgroundColor="#434544" </view>
size="26"
color="#fff"
></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<!--沟通备注--> <!--沟通备注-->
@ -715,7 +713,17 @@ export default {
status:{ status:{
text:'', text:'',
options:[], options:[],
} },
//
decision_maker:{
text:'',
options:[],
},
//
distance:{
text:'',
options:[],
},
},// },//
// //
@ -765,6 +773,8 @@ export default {
await this.getDict('initial_intent')//- await this.getDict('initial_intent')//-
await this.getDict('cognitive_idea')//- await this.getDict('cognitive_idea')//-
await this.getDict('status')//- await this.getDict('status')//-
await this.getDict('decision_maker')//-
await this.getDict('distance')//-
// this.getStaffList()// // this.getStaffList()//
// this.getAreaTree()// // this.getAreaTree()//
@ -829,9 +839,12 @@ export default {
this.picker_config.initial_intent.text = customerResource.initial_intent_name || '点击选择'// this.picker_config.initial_intent.text = customerResource.initial_intent_name || '点击选择'//
this.picker_config.status.text = customerResource.status_name || '点击选择'// this.picker_config.status.text = customerResource.status_name || '点击选择'//
this.picker_config.decision_maker.text = customerResource.decision_maker || '点击选择'//
// //
this.picker_config.purchasing_power.text = sixSpeed.purchase_power_name || '点击选择'// this.picker_config.purchasing_power.text = sixSpeed.purchase_power_name || '点击选择'//
this.picker_config.cognitive_idea.text = sixSpeed.concept_awareness_name || '点击选择'// this.picker_config.cognitive_idea.text = sixSpeed.concept_awareness_name || '点击选择'//
this.picker_config.distance.text = sixSpeed.distance || '点击选择'//
}, },
@ -943,6 +956,10 @@ export default {
case 'cognitive_idea': case 'cognitive_idea':
key = 'cognitive_concept' key = 'cognitive_concept'
break; break;
//
case 'decision_maker':
key = 'decision_maker'
break;
// //
case 'initial_intent': case 'initial_intent':
key = 'preliminarycustomerintention' key = 'preliminarycustomerintention'
@ -951,6 +968,10 @@ export default {
case 'status': case 'status':
key = 'kh_status' key = 'kh_status'
break; break;
//
case 'distance':
key = 'distance'
break;
} }
if(!key){ if(!key){
return return
@ -1032,7 +1053,7 @@ export default {
//- //-
openViewClueInfo(item) { openViewClueInfo(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/clue_info?id=${id}` url: `/pages/market/clue/clue_info?id=${id}`
}) })
}, },
@ -1040,7 +1061,7 @@ export default {
//- //-
openViewMyMessage(item) { openViewMyMessage(item) {
let hair_staff_id = item.hair_staff_id let hair_staff_id = item.hair_staff_id
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/im_chat_info?hair_staff_id=${hair_staff_id}` url: `/pages/common/im_chat_info?hair_staff_id=${hair_staff_id}`
}) })
}, },
@ -1075,7 +1096,43 @@ export default {
}, },
//
async handlePhoneBlur(){
if(!this.formData.phone_number){
return
}
this.clientUserList = []
let param = {
phone_number:this.formData.phone_number
}
let res = await apiRoute.xs_getAllCustomerResources(param)
if(res.code != 1){
if(res.msg == '暂无数据'){
return
}
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
console.log('查重',res)
this.clientUserList = res.data
if(this.clientUserList.length == 1){
if (this.clientUserList[0].id == this.formData.id) {
//,
return
}
}
this.openDuplicateCheck()
},
@ -1180,6 +1237,13 @@ export default {
let input_name = this.picker_input_name let input_name = this.picker_input_name
this.formData[input_name] = e.value this.formData[input_name] = e.value
this.picker_config[input_name]['text'] = e.text this.picker_config[input_name]['text'] = e.text
if(input_name == 'source'){
if(e.value != 1){
this.formData.source_channel = '0'//0=线
}else{
this.formData.source_channel = ''//线
}
}
this.cancelCicker() this.cancelCicker()
}, },
// //
@ -1220,6 +1284,7 @@ export default {
}, },
// //
async validatorForm(data) { async validatorForm(data) {
console.log('tijiao',data)
// //
// //
@ -1407,7 +1472,8 @@ export default {
//1s //1s
setTimeout(() => { setTimeout(() => {
//- //-
uni.navigateTo({ //
uni.redirectTo({
url: `/pages/market/clue/clue_info?resource_sharing_id=${this.resource_sharing_id}` url: `/pages/market/clue/clue_info?resource_sharing_id=${this.resource_sharing_id}`
}) })
}, 1000) }, 1000)

44
pages/market/clue/edit_clues_log.vue

@ -9,7 +9,7 @@
type="button" type="button"
radius="8" radius="8"
height="80" height="80"
color="#465cff" color="#29d3b4"
bold="true" bold="true"
@click="segmented"> @click="segmented">
</fui-segmented-control> </fui-segmented-control>
@ -25,9 +25,9 @@
> >
<!--时间轴--> <!--时间轴-->
<view class="table_list"> <view class="table_list">
<fui-timeaxis background="#f8f8f8" :padding="['36rpx','16rpx']"> <fui-timeaxis background="#292929" :padding="['36rpx','16rpx']">
<fui-timeaxis-node <fui-timeaxis-node
:lineColor="k<3?v.activeColor:'#ccc'" :lineColor="k<3 ? v.activeColor:'#ccc'"
:lined="k!==tableList.length-1" :lined="k!==tableList.length-1"
v-for="(v,k) in tableList" v-for="(v,k) in tableList"
:key="k" :key="k"
@ -35,7 +35,7 @@
<!--inco--> <!--inco-->
<view <view
class="fui-node" class="fui-node"
:style="{borderColor:(k != tableList.length-1 ? '#465CFF' :'' ) }" :style="{borderColor:(k != tableList.length-1 ? '#29d3b4' :'' ) }"
> >
</view> </view>
<template v-slot:right> <template v-slot:right>
@ -57,17 +57,17 @@
<thead> <thead>
<tr> <tr>
<th style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">字段名称</th> <th style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">字段名称</th>
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">原数据</th> <th style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">原数据</th>
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">新数据</th> <th style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">新数据</th>
</tr> </tr>
</thead> </thead>
<!-- 自定义每一行数据 --> <!-- 自定义每一行数据 -->
<tbody> <tbody>
<tr v-for="(row, index) in v.update_arr" :key="index"> <tr v-for="(row, index) in v.update_arr" :key="index">
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td> <td style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td>
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td> <td style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td>
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td> <td style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -90,7 +90,7 @@
> >
<!--时间轴--> <!--时间轴-->
<view class="table_list"> <view class="table_list">
<fui-timeaxis background="#f8f8f8" :padding="['36rpx','16rpx']"> <fui-timeaxis background="#292929" :padding="['36rpx','16rpx']">
<fui-timeaxis-node <fui-timeaxis-node
:lineColor="k<3?v.activeColor:'#ccc'" :lineColor="k<3?v.activeColor:'#ccc'"
:lined="k!==tableList.length-1" :lined="k!==tableList.length-1"
@ -100,7 +100,7 @@
<!--inco--> <!--inco-->
<view <view
class="fui-node" class="fui-node"
:style="{borderColor:(k != tableList.length-1 ? '#465CFF' :'' ) }" :style="{borderColor:(k != tableList.length-1 ? '#29d3b4' :'' ) }"
> >
</view> </view>
<template v-slot:right> <template v-slot:right>
@ -122,17 +122,17 @@
<thead> <thead>
<tr> <tr>
<th style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">字段名称</th> <th style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">字段名称</th>
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">原数据</th> <th style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">原数据</th>
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">新数据</th> <th style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">新数据</th>
</tr> </tr>
</thead> </thead>
<!-- 自定义每一行数据 --> <!-- 自定义每一行数据 -->
<tbody> <tbody>
<tr v-for="(row, index) in v.update_arr" :key="index"> <tr v-for="(row, index) in v.update_arr" :key="index">
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td> <td style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td>
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td> <td style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td>
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td> <td style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -281,13 +281,18 @@ export default {
.assemble{ .assemble{
width: 100%; width: 100%;
height: 100%; height: 100%;
//background-color: #292929; background-color: #292929;
overflow: auto; overflow: auto;
.tab_section{ .tab_section{
padding: 0 20rpx; padding: 0 20rpx;
padding-top: 30rpx; padding-top: 30rpx;
} }
.table_list{ .table_list{
color: #fff;
::v-deep .fui-timeaxis__line{
background-color: #fff;
}
.itme_box { .itme_box {
margin-top: 30rpx; margin-top: 30rpx;
display: flex; display: flex;
@ -301,6 +306,11 @@ export default {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
table-layout: fixed; table-layout: fixed;
tr{
display: flex;
th{}
td{}
}
} }
} }

4
pages/market/clue/index.vue

@ -453,7 +453,7 @@ export default {
openViewMyMessage(item) { openViewMyMessage(item) {
let from_id = this.userInfo.id//id let from_id = this.userInfo.id//id
let to_id = item.customerResource.id//ID let to_id = item.customerResource.id//ID
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}` url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}`
}) })
}, },
@ -503,7 +503,7 @@ export default {
// //
clue_info(item) { clue_info(item) {
let resource_sharing_id = item.id///id let resource_sharing_id = item.id///id
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}` url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}`
}) })
}, },

3
pages/market/clue/new_task.vue

@ -287,7 +287,8 @@ import memberApi from '@/api/member.js';
//1s //1s
setTimeout(() => { setTimeout(() => {
//-线 //-线
uni.navigateTo({ //
uni.redirectTo({
url: `/pages/market/clue/index` url: `/pages/market/clue/index`
}) })
}, 1000) }, 1000)

3
pages/market/clue/writing_followUp.vue

@ -763,7 +763,8 @@ export default {
//1s //1s
setTimeout(() => { setTimeout(() => {
//-线 //-线
uni.navigateTo({ //
uni.redirectTo({
url: `/pages/market/clue/index` url: `/pages/market/clue/index`
}) })
}, 1000) }, 1000)

14
pages/market/data/index.vue

@ -538,42 +538,42 @@ export default {
// //
openViewArrivalStatistics(){ openViewArrivalStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/arrival_statistics' url: '/pages/market/my/arrival_statistics'
}) })
}, },
// //
openViewDueSoon(){ openViewDueSoon(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/due_soon' url: '/pages/market/my/due_soon'
}) })
}, },
// //
openViewSchoolingStatistics(){ openViewSchoolingStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/schooling_statistics' url: '/pages/market/my/schooling_statistics'
}) })
}, },
// //
openViewFeedback(){ openViewFeedback(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/feedback' url: '/pages/common/feedback'
}) })
}, },
// //
openViewMyInfo(){ openViewMyInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/info' url: '/pages/market/my/info'
}) })
}, },
// //
openViewFirmInfo(){ openViewFirmInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/firm_info' url: '/pages/market/my/firm_info'
}) })
}, },
@ -581,7 +581,7 @@ export default {
// //
openViewSetUp(){ openViewSetUp(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/set_up' url: '/pages/market/my/set_up'
}) })
} }

27
pages/market/my/index.vue

@ -23,12 +23,12 @@
<view class="bottom" v-for="(v,k) in userInfo.cameus_dept_arr"> <view class="bottom" v-for="(v,k) in userInfo.cameus_dept_arr">
<view class="left"> <view class="left">
<view class="title">校区</view> <view class="title">校区</view>
<view class="title">{{v.campus_id_name}}</view> <view class="title">{{v.campus_id_name || ''}}</view>
</view> </view>
<view class="division"></view> <view class="division"></view>
<view class="right"> <view class="right">
<view class="title">部门</view> <view class="title">部门</view>
<view class="title dept">{{v.dept_name_str}}</view> <view class="title dept">{{v.dept_name_str || ''}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -185,35 +185,35 @@ export default {
// //
openViewArrivalStatistics(){ openViewArrivalStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/arrival_statistics' url: '/pages/market/my/arrival_statistics'
}) })
}, },
// //
openViewDueSoon(){ openViewDueSoon(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/due_soon' url: '/pages/market/my/due_soon'
}) })
}, },
// //
openViewSchoolingStatistics(){ openViewSchoolingStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/schooling_statistics' url: '/pages/market/my/schooling_statistics'
}) })
}, },
// //
openViewFeedback(){ openViewFeedback(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/feedback' url: '/pages/common/feedback'
}) })
}, },
// //
openViewMyInfo(){ openViewMyInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/info' url: '/pages/market/my/info'
}) })
}, },
@ -221,14 +221,14 @@ export default {
//- //-
openViewSignedClientList(){ openViewSignedClientList(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/signed_client_list' url: '/pages/market/my/signed_client_list'
}) })
}, },
//- //-
openViewMyAttendance(){ openViewMyAttendance(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/my_attendance' url: '/pages/common/my_attendance'
}) })
}, },
@ -236,7 +236,7 @@ export default {
// //
openViewFirmInfo(){ openViewFirmInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/firm_info' url: '/pages/market/my/firm_info'
}) })
}, },
@ -244,14 +244,14 @@ export default {
// //
openViewSetUp(){ openViewSetUp(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/set_up' url: '/pages/market/my/set_up'
}) })
}, },
//- //-
openViewMyMessage(){ openViewMyMessage(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/my_message' url: '/pages/common/my_message'
}) })
}, },
@ -279,7 +279,8 @@ export default {
/* 小程序端样式 */ /* 小程序端样式 */
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
padding: 80rpx 0rpx; padding-top: 110rpx;
padding-bottom: 40rpx;
// #endif // #endif
font-size: 30rpx; font-size: 30rpx;

4
pages/market/my/set_up.vue

@ -27,12 +27,12 @@
}, },
privacy_agreement(type){ privacy_agreement(type){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/privacy_agreement?type='+type url: '/pages/common/privacy_agreement?type='+type
}) })
}, },
update_pass(){ update_pass(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/update_pass' url: '/pages/market/my/update_pass'
}) })
} }

2
pages/market/my/signed_client_list.vue

@ -147,7 +147,7 @@ export default {
// //
openViewStudentInfo(item){ openViewStudentInfo(item){
let students_id= item.id let students_id= item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/info?students_id=${students_id}` url: `/pages/coach/student/info?students_id=${students_id}`
}) })
}, },

5
pages/market/my/update_pass.vue

@ -123,7 +123,7 @@ import apiRoute from '@/api/apiRoute.js';
}, },
// //
forgot() { forgot() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/login/forgot' url: '/pages/student/login/forgot'
}) })
}, },
@ -178,7 +178,8 @@ import apiRoute from '@/api/apiRoute.js';
//1s //1s
setTimeout(() => { setTimeout(() => {
//- //-
uni.navigateTo({ //
uni.redirectTo({
url: `/pages/market/my/index` url: `/pages/market/my/index`
}) })
}, 1000) }, 1000)

293
pages/student/index/index.vue

@ -49,17 +49,19 @@
<view class="more" @click="physical_examination()">更多</view> <view class="more" @click="physical_examination()">更多</view>
</view> </view>
<view class="upcomin-classes"> <view class="upcomin-classes" v-if="personCourseScheduleInfo.id">
<view class="upcomin-classes-div"> <view class="upcomin-classes-div">
<view class="upcomin-classes-div-con"> <view class="upcomin-classes-div-con">
<view class="upcomin-classes-div-con-left">课程预告</view> <view class="upcomin-classes-div-con-left">课程预告</view>
<view class="upcomin-classes-div-con-centre"
style="width: 2rpx;height: 60rpx;background-color: #fff;margin-left: 25rpx;"></view> <view class="centre_box">
<view style="margin-left: 25rpx;"> <view class="upcomin-classes-div-con-centre"></view>
<view>{{$util.formatToDateTime(memberIndexData.kcyg.date_time,'m-d')}} {{memberIndexData.kcyg.weekday}} {{memberIndexData.kcyg.time_slot[0]}}-{{memberIndexData.kcyg.time_slot[1]}}</view> <view class="centre">
<view>{{memberIndexData.kcyg.address}} {{memberIndexData.kcyg.courses_name}}</view> <view>{{$util.formatToDateTime(personCourseScheduleInfo.course_date,'m-d')}} {{personCourseScheduleInfo.time_slot}}</view>
</view> <view style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{personCourseScheduleInfo.courseScheduleHasOne.venue.venue_name}} {{personCourseScheduleInfo.courseScheduleHasOne.course.course_name}}</view>
<view class="upcomin-classes-div-con-right" @click="openViewTimetableInfo(memberIndexData.kcyg)"> </view>
</view>
<view class="upcomin-classes-div-con-right" @click="openViewTimetableInfo(personCourseScheduleInfo)">
详情 详情
</view> </view>
</view> </view>
@ -74,37 +76,48 @@
<view class="after-class-con" v-for="(v,k) in jobAssignmentsInfo" :key="k" @click="openViewWorkDetails(v)"> <view class="after-class-con" v-for="(v,k) in jobAssignmentsInfo" :key="k" @click="openViewWorkDetails(v)">
<view class="after-class-con-txt"> <view class="after-class-con-txt">
<view style="width: 25%;margin-top: 5%;"> <!-- <view style="width: 25%;margin-top: 5%;">-->
<view style="font-size: 55rpx;color: #fff;"><span style="color: #29d3b4;">12</span>/23 <!-- <view style="font-size: 55rpx;color: #fff;"><span style="color: #29d3b4;">12</span>/23-->
</view> <!-- </view>-->
<view style="font-size: 35rpx;color: #ccc;padding-left: 10rpx;">已完成</view> <!-- <view style="font-size: 35rpx;color: #ccc;padding-left: 10rpx;">已完成</view>-->
</view> <!-- </view>-->
<view style="width: 70%;"> <view style="width: 100%;">
<view style="color: #fff;display: flex;justify-content: space-between;align-items: center;"> <view style="color: #fff;display: flex;justify-content: space-between;align-items: center;">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image :src="$util.img(v.coach_pic)" style="width: 50rpx;height: 50rpx;"> <image :src="v.student.customerResources.member.headimg ? v.student.customerResources.member.headimg : $util.img('/uniapp_src/static/images/common/yong_hu.png')" style="width: 50rpx;height: 50rpx;">
</image> </image>
<span style="padding-left: 10rpx;font-size: 35rpx;">{{v.coach_name}}</span> <span style="padding-left: 10rpx;font-size: 35rpx;">{{v.student.name}}</span>
</view> </view>
<view> <view>
<fui-button background="#404045" color="#F59A23" borderColor="#F59A23" <fui-button background="#404045" color="#F59A23" borderColor="#F59A23"
btnSize="mini" @click="submitJob(v)">上传</fui-button> btnSize="mini" @click="submitJob(v)">上传</fui-button>
</view> </view>
</view> </view>
<view style="color: #fff;padding: 10rpx;">时间{{v.create_time}}</view> <view style="color: #fff;padding: 10rpx;">时间{{$util.formatToDateTime(v.created_at, "Y-m-d H:i")}}</view>
<view class="multi-line-ellipsis" v-html="v.content_text"> <view style="color: #fff;padding: 10rpx;">类型{{v.content_type == 1 ? '图片' : (v.content_type == 2 ? '视频':'文本')}}</view>
<view class="description">
{{v.description}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 已提交的作业列表-->
<view class="item" v-for="(v,k) in assignmentsList" :key="k" @click="openViewWorkDetails(v)"> <view class="item" v-for="(v,k) in assignmentsList" :key="k" @click="openViewWorkDetails(v)">
<view class="multi-line-ellipsis text-style" v-html="v.content_text"></view> <view class="box">
<view style="width: 92%;margin: auto;border-radius: 15rpx;" v-if="v.student_file"> <view class="description">
<video v-if="v.student_file_type == 2" style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.student_file)"></video> 描述:{{v.description}}
<image v-else style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.student_file)" mode="aspectFit"></image> </view>
</view>
<view class="content_box" v-if="v.content_text">
<video class="video" v-if="v.content_type == 2" :src="v.content_text"></video>
<image class="image" v-else-if="v.content_type == 1" :src="v.content_text" mode="aspectFit"></image>
<view class="text" v-else-if="v.content_type == 3" >作业内容{{ v.content_text }}</view>
</view>
</view>
</view> </view>
<!-- <view class="multi-line-ellipsis text-style">--> <!-- <view class="multi-line-ellipsis text-style">-->
@ -133,36 +146,17 @@
}, },
data() { data() {
return { return {
inited: false, // init
// //
uploadApiUrl: ``, uploadApiUrl: ``,
uploadImageApiUrl: `${Api_url}/file/image`, uploadImageApiUrl: `${Api_url}/memberUploadImage`,//
uploadVideoApiUrl: `${Api_url}/file/video`, uploadVideoApiUrl: `${Api_url}/memberUploadVideo`,//
member_info: {},// member_info: {},//
assignmentsList: [],// assignmentsList: [],//
jobAssignmentsInfo: [],// jobAssignmentsInfo: [],//
memberIndexData:{
tx:{//
height: '', //
weight: '', //
score: '', //
create_time: '' //
},
kcyg: { //
id: '', // ID
date_time: "", //
time_slot: "", //
address: "", //
courses_name: "", //
date_md: "", // /
weekday: "" //
}
},//
path_arr:{ path_arr:{
'1':'/pages/coach/home/index',// '1':'/pages/coach/home/index',//
'2':'/pages/market/index/index',// '2':'/pages/market/index/index',//
@ -177,24 +171,22 @@
height:'0',// height:'0',//
weight:'0',// weight:'0',//
},// },//
personCourseScheduleInfo:{
id:'',
},//
} }
}, },
onLoad() { onLoad() {},
this.openViewHome()//-
},
onShow(){ onShow(){
// onShow init this.init()
if (!this.inited) {
this.init()
this.inited = true
}
}, },
methods: { methods: {
// //
async init(){ async init(){
await this.member_init() await this.member_init()
await this.getPhysicalTestList() await this.getPhysicalTestList()
this.getMemberIndex() await this.getPersonCourseScheduleList()
this.getList() this.getList()
this.getJobAssignmentsInfo() this.getJobAssignmentsInfo()
}, },
@ -223,54 +215,29 @@
} }
}, },
//--
async getPersonCourseScheduleList(){
async openViewHome_COPY(){ let params = {
// page: 1,//
let pages = getCurrentPages(); limit: 1,//
// total: 1,//
this.thisPath = '/' + pages[0].route resources_id:this.member_info.id,//id
// status:'0',//012
let userType = String(uni.getStorageSync('userType'))
this.openPath = this.path_arr[userType]
console.log(
'跳转',
this.thisPath,
userType,
this.path_arr[userType]
)
if(this.thisPath != this.openPath){
console.log('打印1')
//tabBar-
uni.setStorageSync('tabBerIndex', 0)
uni.navigateTo({
url: this.openPath
})
return
}else{
//->
this.init()
} }
}, let res = await apiRoute.xy_personCourseSchedule(params)
async getMemberIndex(){
let res = await memberApi.memberIndex({})
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
}) })
return
} }
// console.log('',res)
if(res.data.kcyg.time_slot){ console.log('课程安排',res.data)
res.data.kcyg.time_slot = res.data.kcyg.time_slot.split(',');
}
this.memberIndexData = res.data let arr = res.data.data
if(arr.length){
this.personCourseScheduleInfo = arr[0]
}
}, },
// //
@ -278,9 +245,10 @@
let data = { let data = {
page: 1, page: 1,
limit: 10, limit: 10,
status: '2',//1=,2=,3= resources_id: this.member_info.id,
status: '3',//1 2 3
} }
let res = await memberApi.assignmentsList(data) let res = await apiRoute.xy_assignment(data)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -297,9 +265,10 @@
let data = { let data = {
page: 1, page: 1,
limit: 1, limit: 1,
status: '1',//1=,2=,3= resources_id: this.member_info.id,
status: '2',// 1 2 3
} }
let res = await memberApi.assignmentsList(data) let res = await apiRoute.xy_assignment(data)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -328,35 +297,35 @@
//- //-
details() { details() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/index/work_details' url: '/pages/student/index/work_details'
}) })
}, },
// //
physical_examination(){ physical_examination(){
let resource_id = this.member_info.id let resource_id = this.member_info.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/index/physical_examination?resource_id=${resource_id}` url: `/pages/student/index/physical_examination?resource_id=${resource_id}`
}) })
}, },
// //
jobList(){ jobList(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/index/job_list' url: '/pages/student/index/job_list'
}) })
}, },
// //
async submitJob(item) { async submitJob(item) {
let type = item.content_type // 12 let type = item.content_type // 123
try { try {
// //
let uploadRes = await this.uploadFile(type) let uploadRes = await this.uploadFile(type)
// console.log('', uploadRes) console.log('上传结果', uploadRes)
// //
if (!uploadRes.data.path) { if (!uploadRes.data.url) {
return return
} }
@ -364,22 +333,28 @@
let data = { let data = {
id: item.id, // id id: item.id, // id
student_file: uploadRes.data.path, // student_file: uploadRes.data.path, //
student_file_type: type, // 12 resources_id:this.member_info.id, // id
student_content: '', // content_text:uploadRes.data.url
} }
// //
await this.assignmentsSubmit(data) await this.assignmentsSubmit(data)
} catch (error) { } catch (error) {
console.error('上传或提交作业失败:', error) console.error('上传或提交作业失败:', error)
alert('上传或提交作业失败') //alert('')
//
uni.showToast({
title: '上传或提交作业失败',
icon: 'none'
})
} }
}, },
// (/) type=12 // (/) type=123
async uploadFile(type) { async uploadFile(type) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (type == 1) { if (type == 1) {
//
this.uploadApiUrl = this.uploadImageApiUrl this.uploadApiUrl = this.uploadImageApiUrl
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
@ -399,7 +374,8 @@
reject(error) reject(error)
} }
}) })
} else { } else if(type == 2){
//
this.uploadApiUrl = this.uploadVideoApiUrl this.uploadApiUrl = this.uploadVideoApiUrl
uni.chooseVideo({ uni.chooseVideo({
count: 1, count: 1,
@ -468,12 +444,11 @@
// //
async assignmentsSubmit(item) { async assignmentsSubmit(item) {
let data = { let data = {
id: item.id, // id resources_id:item.resources_id, // id
student_file: item.student_file, // id:item.id,
student_file_type: item.student_file_type, // 12 content_text:item.content_text
student_content: item.student_content, //
} }
let res = await memberApi.assignmentsSubmit(data) let res = await apiRoute.xy_assignmentSubmitObj(data)
if (res.code != 1) { if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -494,16 +469,16 @@
//- //-
openViewWorkDetails(item) { openViewWorkDetails(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/index/work_details?id=${id}` url: `/pages/student/index/work_details?id=${id}`
}) })
}, },
//- //-
openViewTimetableInfo(item) { openViewTimetableInfo(item) {
let id = item.id let person_course_schedule_id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/timetable/info?id=${id}` url: `/pages/student/timetable/info?person_course_schedule_id=${person_course_schedule_id}`
}) })
}, },
@ -544,6 +519,7 @@
} }
.multi-line-ellipsis { .multi-line-ellipsis {
width: 100%;
color: #fff; color: #fff;
padding: 5rpx 10rpx; padding: 5rpx 10rpx;
display: -webkit-box; display: -webkit-box;
@ -696,32 +672,37 @@
.upcomin-classes-div-con { .upcomin-classes-div-con {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
color: #fff; color: #fff;
padding: 0 40rpx;
.upcomin-classes-div-con-left {
width: 60rpx;
text-align: right;
}
.centre_box{
display: flex;
align-items: center;
.upcomin-classes-div-con-centre {
margin: 0 20rpx;
width: 2rpx;
height: 60rpx;
background-color: #fff;
}
.centre{
width:80%;
}
}
.upcomin-classes-div-con-right {
width: 100rpx;
height: 50rpx;
background-color: #32baa1;
text-align: center;
line-height: 50rpx;
border-radius: 50rpx;
}
} }
.upcomin-classes-div-con-left {
width: 60rpx;
margin-left: 80rpx;
text-align: right;
}
.upcomin-classes-div-con-centre {
width: 2rpx;
height: 60rpx;
background-color: #fff;
margin-left: 25rpx;
}
.upcomin-classes-div-con-right {
width: 100rpx;
height: 50rpx;
background-color: #32baa1;
text-align: center;
line-height: 50rpx;
border-radius: 50rpx;
margin-left: 80rpx;
}
.after-class { .after-class {
background-color: #292929; background-color: #292929;
@ -749,7 +730,7 @@
.after-class-con { .after-class-con {
width: 92%; width: 92%;
height: 246rpx; //height: 246rpx;
background-color: #404045; background-color: #404045;
border-radius: 20rpx; border-radius: 20rpx;
margin: 15rpx auto; margin: 15rpx auto;
@ -761,9 +742,11 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 20rpx; padding: 20rpx;
height: 95%;
width: 100%; width: 100%;
align-content: space-around; align-content: space-around;
.description{
color: #fff;
}
} }
.pic { .pic {
@ -771,4 +754,32 @@
height: 144rpx; height: 144rpx;
border-radius: 50%; border-radius: 50%;
} }
.item{
padding: 40rpx;
.box{
color: #fff;
display: flex;
flex-direction: column;
.description{
}
.content_box{
width: 100%;
margin: auto;
margin-top: 20rpx;
border-radius: 15rpx;
.video{
width: 100%;
border-radius: 15rpx;
}
.image{
width: 100%;
border-radius: 15rpx;
}
.text{
color: #fff;
}
}
}
}
</style> </style>

47
pages/student/index/job_list.vue

@ -13,24 +13,25 @@
> >
<view class="con-list" v-for="(v,k) in tableList" :key="k" @click="openViewWorkDetails(v)"> <view class="con-list" v-for="(v,k) in tableList" :key="k" @click="openViewWorkDetails(v)">
<view class="con-list-img" v-if="v.student_file"> <view class="con-list-img" v-if="v.content_text">
<video v-if="v.student_file_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.student_file)"></video> <video v-if="v.content_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.content_text)"></video>
<image v-else style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.student_file)" mode="aspectFit"></image> <image v-else-if="v.content_type == 1" style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.content_text)" mode="aspectFit"></image>
<view class="text" v-else>{{v.content_text}}</view>
</view> </view>
<view class="date_box"> <view class="date_box">
<view class="describe" style="margin-top: 20rpx;"> <view class="describe" style="margin-top: 20rpx;">
时间{{v.create_time}} 时间{{v.created_at}}
</view> </view>
<!--是否已经完成作业--> <!--是否已经完成作业-->
<view class="mark" v-if="v.status == 2"> <view class="mark" v-if="v.status == 3">
<image class="check_mark" :src="$util.img('/uniapp_src/static/images/index/check_mark.png')"></image> <image class="check_mark" :src="$util.img('/uniapp_src/static/images/index/check_mark.png')"></image>
</view> </view>
</view> </view>
<!--作业描述--> <!--作业描述-->
<view class="con" style="margin-bottom: 20rpx; color:#fff;" v-html="v.content_text"></view> <view class="con" style="margin-bottom: 20rpx; color:#fff;" v-html="v.description"></view>
<view class="assignment"> <view class="assignment">
<view>{{v.type == 1 ? '班级作业' : '个人作业'}}</view> <view>{{v.type == 1 ? '班级作业' : '个人作业'}}</view>
@ -44,6 +45,7 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
export default { export default {
@ -58,11 +60,14 @@ import memberApi from '@/api/member.js';
page:1,// page:1,//
limit:10,// limit:10,//
total:10,// total:10,//
status: '',//1=,2=,3= resources_id: '',//id
status: '',// 1 2 3
}, },
tableList:[],// tableList:[],//
member_info:{},//
} }
}, },
onShow(){ onShow(){
@ -77,9 +82,25 @@ import memberApi from '@/api/member.js';
methods: { methods: {
// //
async init(){ async init(){
await this.memberInit()
await this.getList(); await this.getList();
}, },
//
async memberInit() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.member_info = res.data
this.filteredData.resources_id = this.member_info.id,//id
console.log('xxxx',this.member_info)
},
//() //()
loadMoreData() { loadMoreData() {
// //
@ -117,7 +138,7 @@ import memberApi from '@/api/member.js';
this.tableList = [] this.tableList = []
} }
let res = await memberApi.assignmentsList(data) let res = await apiRoute.xy_assignment(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -138,7 +159,7 @@ import memberApi from '@/api/member.js';
//- //-
openViewWorkDetails(item) { openViewWorkDetails(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/index/work_details?id=${id}` url: `/pages/student/index/work_details?id=${id}`
}) })
}, },
@ -192,7 +213,6 @@ import memberApi from '@/api/member.js';
} }
.con-list-img{ .con-list-img{
width: 100%; width: 100%;
height: 280rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -205,6 +225,13 @@ import memberApi from '@/api/member.js';
width: 100%; width: 100%;
height: 280rpx; height: 280rpx;
} }
.text{
width: 100%;
font-size: 28rpx;
color:#fff;
white-space: pre-wrap;
word-wrap: break-word;
}
} }
.pic{ .pic{

56
pages/student/index/work_details.vue

@ -1,25 +1,27 @@
<!--作业详情--> <!--作业详情-->
<template> <template>
<view> <view class="main_box">
<!-- 作业展示--> <!-- 作业展示-->
<view class="top-style" v-if="infoData.student_file"> <view class="top-style" v-if="infoData.content_text">
<video v-if="infoData.student_file_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.student_file)"></video> <video v-if="infoData.content_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.content_text)"></video>
<image v-else style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.student_file)" mode="aspectFit"></image> <image v-else-if="infoData.content_type == 1" style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.content_text)" mode="aspectFit"></image>
</view> </view>
<!-- 简练信息+作业描述--> <!-- 简练信息+作业描述-->
<view class="below-style"> <view class="below-style">
<view class="head-img"> <view class="head-img">
<!--教练头像--> <!--学生头像-->
<fui-avatar width="80" :src="$util.img(infoData.coach_pic)"></fui-avatar> <fui-avatar width="80" :src="infoData.student.customerResources.member.headimg ? infoData.student.customerResources.member.headimg : $util.img('/uniapp_src/static/images/common/yong_hu.png')"></fui-avatar>
<view class="head-text">{{infoData .coach_name}}</view> <view class="head-text">{{infoData .student.name}}</view>
</view> </view>
<view class="multi-line-ellipsis" v-html="infoData.content_text"></view> <view class="multi-line-ellipsis">
状态{{ infoData.status == 1 ? '待批改' : infoData.status == 2 ? '未提交' : infoData.status == 3 ? '已提交' :''}} </view>
<view class="multi-line-ellipsis" v-html="infoData.description"></view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import memberApi from '@/api/member.js'; import apiRoute from '@/api/apiRoute.js';
export default { export default {
@ -34,7 +36,7 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
this.filteredData.id = options.id this.filteredData.id = options.id//id
}, },
onShow(){ onShow(){
this.init()// this.init()//
@ -48,7 +50,7 @@ export default {
// //
async getAssignmentsInfo() { async getAssignmentsInfo() {
let params = {...this.filteredData} let params = {...this.filteredData}
let res = await memberApi.assignmentsInfo(params) let res = await apiRoute.xy_assignmentsInfo(params)
if (res.code != 1) { if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -64,11 +66,16 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.main_box{
width: 100%;
height: 100%;
background: #292929;
padding-top: 45rpx;
}
.top-style{ .top-style{
width: 92%; width: 92%;
height: 700rpx; height: 700rpx;
margin: auto; margin: auto;
margin-top: 45rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -80,19 +87,22 @@ export default {
.below-style{ .below-style{
width: 92%; width: 92%;
margin: auto; margin: auto;
.head-img {
display: flex;
align-items: center;
padding: 10rpx 20rpx;
}
.head-text {
color: #fff;
font-size: 35rpx;
padding-left: 20rpx;
}
} }
.head-img {
display: flex;
align-items: center;
padding: 10rpx 20rpx;
}
.head-text {
color: #333333;
font-size: 35rpx;
padding-left: 20rpx;
}
.multi-line-ellipsis { .multi-line-ellipsis {
color: #333333; margin-top: 20rpx;
color: #fff;
font-size: 29rpx; font-size: 29rpx;
padding: 5rpx 10rpx; padding: 5rpx 10rpx;
// display: -webkit-box; // display: -webkit-box;

5
pages/student/login/forgot.vue

@ -18,7 +18,7 @@
</fui-input> </fui-input>
</view> </view>
<view style="width: 95%;margin: auto; margin-top: 30rpx;" @click="openPicker()"> <view style="width: 95%;margin: auto; margin-top: 30rpx;" @click="openPicker()">
<fui-form-item label="" arrow highlight background="#f2f2f2"> <fui-form-item arrow highlight background="#f2f2f2">
<input class="fui-page__input" v-model="formData.user_type_name" placeholder="请选择用户类型" placeholder-style="color:#ccc;" disabled/> <input class="fui-page__input" v-model="formData.user_type_name" placeholder="请选择用户类型" placeholder-style="color:#ccc;" disabled/>
</fui-form-item> </fui-form-item>
</view> </view>
@ -206,7 +206,8 @@ import apiRoute from '@/api/apiRoute.js';
//1s //1s
setTimeout(() => { setTimeout(() => {
//- //-
uni.navigateTo({ //
uni.redirectTo({
url: `/pages/student/login/login` url: `/pages/student/login/login`
}) })
}, 1000) }, 1000)

12
pages/student/login/login.vue

@ -103,7 +103,9 @@ export default {
// uni.hideHomeButton() // uni.hideHomeButton()
// console.log(uni.getStorageSync('um_id')) // console.log(uni.getStorageSync('um_id'))
// onShow init // onShow init
if (!this.inited) {
let res_codes = options.res_codes || ''//axios.jscode,401,
if (!this.inited && !res_codes) {
this.openViewHome() this.openViewHome()
this.inited = true this.inited = true
} }
@ -122,7 +124,7 @@ export default {
this.password = !this.password this.password = !this.password
}, },
forgot() { forgot() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/login/forgot' url: '/pages/student/login/forgot'
}) })
}, },
@ -222,7 +224,7 @@ export default {
}) })
return; return;
} }
uni.navigateTo({ this.$navigateTo({
url: url_path url: url_path
}) })
}, },
@ -275,8 +277,8 @@ export default {
this.password1= '123123' // this.password1= '123123' //
}else{ }else{
// //
this.user= '15335526445' // this.user= '13042409890' //
this.password1= '123123' // this.password1= '13042409890' //
} }
}, },

47
pages/student/my/lesson_consumption.vue

@ -2,27 +2,23 @@
<template> <template>
<view class="assemble"> <view class="assemble">
<view style="height: 50rpx;"></view> <view style="height: 50rpx;"></view>
<view class="ul">
<view class="message_box" v-if="!tableList.length">
暂无更多数据
</view>
<view class="ul" v-if="tableList.length">
<view class="li" v-for="(v,k) in tableList" :key="k"> <view class="li" v-for="(v,k) in tableList" :key="k">
<view class="left"> <view class="left">
<view class="title">{{v.name}}</view> <view class="title">{{v.name}}</view>
<view class="date">上课时间{{v.create_time}}</view> <view class="date">课程使用日期{{v.usage_date}}</view>
</view> </view>
<view class="right"> <view class="right">
<view <view
v-if="v.status == 1"
class="btn" class="btn"
style="background-color: #29d3b4;" style="background-color: #29d3b4;"
> >
{{v.hour}}课时 {{v.usage_date}}课时
</view>
<view
v-if="v.status == 2"
class="btn"
style="background-color: #FAD04D;"
>
请假
</view> </view>
</view> </view>
</view> </view>
@ -31,7 +27,7 @@
</template> </template>
<script> <script>
import memberApi from '@/api/member.js'; import apiRoute from '@/api/apiRoute.js';
export default { export default {
data() { data() {
@ -45,9 +41,12 @@ import memberApi from '@/api/member.js';
page:1,// page:1,//
limit:10,// limit:10,//
total:10,// total:10,//
resources_id:'',//id
}, },
tableList:[],// tableList:[],//
memberInfo:{},//
} }
}, },
onLoad(options) { onLoad(options) {
@ -65,9 +64,24 @@ import memberApi from '@/api/member.js';
methods: { methods: {
// //
async init(){ async init(){
await this.getMemberInfo()//
await this.getList()// await this.getList()//
}, },
//
async getMemberInfo() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
this.filteredData.resources_id = res.data.id
},
//() //()
loadMoreData() { loadMoreData() {
// //
@ -105,7 +119,7 @@ import memberApi from '@/api/member.js';
this.tableList = [] this.tableList = []
} }
let res = await memberApi.studentsSignList(data) let res = await apiRoute.xy_personCourseScheduleGetStudentCourseUsageList(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -128,6 +142,11 @@ import memberApi from '@/api/member.js';
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.message_box{
font-size: 30rpx;
text-align: center;
color: #fff;
}
.assemble { .assemble {
width: 100%; width: 100%;
height: 100vh; height: 100vh;

25
pages/student/my/my.vue

@ -64,7 +64,7 @@
<view class="section_box"> <view class="section_box">
<view class="item"> <view class="item">
<view>我的教练</view> <view @click="openViewMyCoach()">我的教练</view>
<view></view> <view></view>
</view> </view>
<!-- <view class="item">--> <!-- <view class="item">-->
@ -118,48 +118,55 @@
}, },
// //
setup(item) { setup(item) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/set_up' url: '/pages/student/my/set_up'
}) })
}, },
// //
feedback() { feedback() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/feedback' url: '/pages/common/feedback'
}) })
}, },
// //
lesson_consumption() { lesson_consumption() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/lesson_consumption' url: '/pages/student/my/lesson_consumption'
}) })
}, },
// //
my_members() { my_members() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/my_members' url: '/pages/student/my/my_members'
}) })
}, },
// //
personal_data() { personal_data() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/personal_data' url: '/pages/student/my/personal_data'
}) })
}, },
//- //-
openViewContractList(item) { openViewContractList(item) {
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/contract_list` url: `/pages/common/contract_list`
}) })
}, },
//- //-
openViewMyMessage(item) { openViewMyMessage(item) {
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/my_message` url: `/pages/common/my_message`
}) })
}, },
//-
openViewMyCoach(){
this.$navigateTo({
url: `/pages/student/my/my_coach`
})
},
} }
} }
</script> </script>
@ -167,7 +174,7 @@
<style lang="less" scoped> <style lang="less" scoped>
.main_box { .main_box {
background: #292929; background: #292929;
min-height: 28vh; height: 100%;
} }
// //

211
pages/student/my/my_coach.vue

@ -0,0 +1,211 @@
<!--我的教练-列表-->
<template>
<view class="main_box">
<scroll-view scroll-y="true" :lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData" style="height: 100%;padding-top:50rpx;padding-bottom: 50rpx">
<!-- <view class="data_hint" v-if="!this.tableList.length">暂无更多数据</view>-->
<view class="main_section" v-for="(v,k) in tableList" :key="k">
<view class="left">
<!-- 头像-->
<image :src="v.head_img ? v.head_img : $util.img('/uniapp_src/static/images/common/yong_hu.png')" class="pic"></image>
</view>
<view class="right">
<view class="title">姓名{{v.name}}</view>
<view class="title">电话{{v.phone}}</view>
</view>
</view>
</scroll-view>
<!-- 加载状态-->
<!-- <fui-loading :isFixed="true" srcCol="/static/icon-img/loading_white.png" text="正在加载..." v-if="loading"></fui-loading>-->
</view>
</template>
<script>
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
AQTabber,
},
data() {
return {
loading:false,//
lowerThreshold: 100,//
isReachedBottom: false,//|true=|false=
memberInfo:{id:''},//
//
filteredData:{
page:1,//
limit:10,//
total:10,//
resources_id:'',//id
},
tableList:[],//
}
},
onLoad(options) {},
onShow() {
this.init()//
},
//
async onPullDownRefresh() {
//
await this.resetFilteredData()
await this.getList()
},
methods: {
//
async init() {
await this.getMemberInfo();
await this.getList();
},
//
async resetFilteredData() {
this.isReachedBottom = false; // 便
this.filteredData.page = 1//
this.filteredData.limit = 10//
this.filteredData.total = 10//
},
//
async getMemberInfo() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
this.filteredData.resources_id = res.data.id
},
//()
loadMoreData() {
return //
//
if (!this.isReachedBottom) {
this.isReachedBottom = true;//
this.getList();
}
},
//
loadData() {
setTimeout(() => {
this.isReachedBottom = false; // 便
}, 1000);
},
//
async getList(){
this.loading = true
let data = {...this.filteredData}
//
if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) {
this.loading = false
uni.showToast({
title: '暂无更多',
icon: 'none'
})
return
}
if(data.page == 1){
this.tableList = []
}
let res = await apiRoute.xy_personCourseScheduleGetMyCoach(data)
this.loading = false
this.isReachedBottom = false;
if (res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.tableList = this.tableList.concat(res.data.data); // 使 concat
console.log('列表',this.tableList)
this.filteredData.total = res.data.total
this.filteredData.page++
},
}
}
</script>
<style lang="less" scoped>
.main_box {
width: 100%;
height: 100%;
overflow: auto;
background: #292929;
}
.data_hint{
margin-top: 100rpx;
font-size: 30rpx;
text-align: center;
color: #fff;
}
.main_section{
width: 92%;
border-radius: 15rpx;
background-color: #404045;
margin: 20rpx auto;
padding: 30rpx;
color: #fff;
display: flex;
align-items: center;
.left{
display: flex;
flex-direction: column;
align-items: center;
.pic{
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
.right{
margin-left: 20rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
}
}
.title{
font-size: 32rpx;
}
.con{
color: #D7D7D7;
font-size: 26rpx;
margin-top: 20rpx;
}
.current-venue{
border-radius: 8rpx;
border: 2rpx #F59A23 solid;
width: 120rpx;
text-align: center;
color: #F59A23;
position: absolute;
top: 10%;
right: 3%;
}
</style>

4
pages/student/my/set_up.vue

@ -26,12 +26,12 @@
}, },
privacy_agreement(type){ privacy_agreement(type){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/privacy_agreement?type='+type url: '/pages/common/privacy_agreement?type='+type
}) })
}, },
update_pass(){ update_pass(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/update_pass' url: '/pages/student/my/update_pass'
}) })
} }

2
pages/student/my/update_pass.vue

@ -82,7 +82,7 @@
}); });
}, },
forgot() { forgot() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/login/forgot' url: '/pages/student/login/forgot'
}) })
}, },

183
pages/student/timetable/index.vue

@ -12,9 +12,9 @@
<view class="li" v-for="(v,k) in dateList" :key="k" @click="selectDate(v.date)"> <view class="li" v-for="(v,k) in dateList" :key="k" @click="selectDate(v.date)">
<text>{{v.week}}</text> <text>{{v.week}}</text>
<text :class="[filteredData.schedule_date == v.date ? 'today':'']">{{today == v.date ? '今':v.today}}</text> <text :class="[filteredData.course_date == v.date ? 'today':'']">{{today == v.date ? '今':v.today}}</text>
<text :class="[v.status == 2 ?'select_plan':'']"></text> <text :class="[v.is_sign == 1 ? 'select_plan':'']"></text>
</view> </view>
</view> </view>
<view class="btn" @click="show_calendar=true"> <view class="btn" @click="show_calendar=true">
@ -24,10 +24,10 @@
<view class="section_2"> <view class="section_2">
<view class="item_box"> <view class="item_box">
{{venuesInfo.name}} <text v-if="(venuesInfo.id || '')">{{venuesInfo.venue_name}}</text>
</view> </view>
<view class="item_box" style="text-align: right;color: #F59A23;" @click="more"> <view class="item_box" style="text-align: right;color: #F59A23;" @click="more">
更多 更多场馆
</view> </view>
</view> </view>
@ -43,29 +43,31 @@
<view v-for="(v,k) in tableList" :key="k" class="li" @click="openViewCourseInfo(v)"> <view v-for="(v,k) in tableList" :key="k" class="li" @click="openViewCourseInfo(v)">
<view class="top_box"> <view class="top_box">
<view class="center_box"> <view class="center_box">
<view>班级{{v.classes_name}}</view> <view>教练{{v.courseScheduleHasOne.coach.name}}</view>
<view>时间{{v.date}}</view> <view>课程{{v.courseScheduleHasOne.course.course_name}}</view>
<view>课室{{v.address}}</view> <view>时间{{v.course_date}}</view>
<view>{{v.courses_name}}</view> <view>{{v.courseScheduleHasOne.campus_name}} {{v.courseScheduleHasOne.venue.venue_name}}</view>
</view> </view>
<view class="right_box"> <view class="right_box">
<!-- v.status|1=未开始,2=进行中,3=已结束--> <!-- v.status|1=未开始,2=进行中,3=已结束-->
<view class="tag" :style="{background: v.status == 1 ? '#1cd188' : v.status == 2 ? '#fad24e' : '#ff4d4f'}"> <view class="tag"
{{ v.status === 1 ? '未开始' : v.status === 2 ? '上课中' : '已结束' }} v-if="v.status != null"
:style="{background: v.status == 1 ? '#1cd188' : v.status == 2 ? '#fad24e' : '#ff4d4f'}">
{{ v.status == 0 ? '待上课' : v.status == 1 ? '已上课' : '请假' }}
</view> </view>
<!-- <view class="tag" style="background:#1cd188;">待上课</view>--> <!-- <view class="tag" style="background:#1cd188;">待上课</view>-->
</view> </view>
</view> </view>
<view class="bottom_box"> <view class="bottom_box">
<view class="hint"> <view class="hint">
已签到学生 ({{v.sign_list.length }}/{{v.max_students.split(',').length }}) <!-- 已签到学生 ({{v.sign_list.length }}/{{v.max_students.split(',').length }})-->
</view> </view>
<view class="list_box"> <view class="list_box">
<view class="list"> <!-- <view class="list">-->
<view class="itme" v-for="(item,index) in v.sign_list || 0" :key="index"> <!-- <view class="itme" v-for="(item,index) in v.sign_list || 0" :key="index">-->
<image :src="$util.img(item.header)"></image> <!-- <image :src="$util.img(item.header)"></image>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="btn"> <view class="btn">
详情 详情
</view> </view>
@ -99,6 +101,7 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
import commonApi from '@/api/common.js'; import commonApi from '@/api/common.js';
import AQTabber from "@/components/AQ/AQTabber.vue" import AQTabber from "@/components/AQ/AQTabber.vue"
@ -114,17 +117,20 @@ export default {
lowerThreshold: 100,// lowerThreshold: 100,//
isReachedBottom: false,//|true=|false= isReachedBottom: false,//|true=|false=
memberInfo:{},//
// //
filteredData: { filteredData: {
page: 1,// page: 1,//
limit: 10,// limit: 10,//
total: 10,// total: 10,//
schedule_date: '',// resources_id:'',//id
course_date: '',//
venue_id: '',//id venue_id: '',//id
}, },
tableList: [],// tableList: [],//
venuesInfo: {},// venuesInfo: {id:''},//
// //
today: '', today: '',
@ -134,7 +140,16 @@ export default {
show_calendar:false,// show_calendar:false,//
startDate:'',// startDate:'',//
endDate:'',// endDate:'',//
calendarSelected: [],// calendarSelected: [
// {
// date: '2025-04-07',//
// },
// {
// date: '2025-04-09',//
// },
],//()
} }
}, },
onLoad(options) { onLoad(options) {
@ -148,27 +163,58 @@ export default {
// //
async onPullDownRefresh() { async onPullDownRefresh() {
// //
let schedule_date = this.filteredData.schedule_date let course_date = this.filteredData.course_date
await this.loadData() await this.loadData()
this.filteredData.schedule_date = schedule_date this.filteredData.course_date = course_date
await this.getList() await this.getList()
}, },
methods: { methods: {
// //
async init() { async init() {
await this.getThisDate() await this.getMemberInfo()//
await this.getHeadDate() await this.getThisDate()//
await this.getList() await this.getList()//
await this.getHeadDate()//
this.getDateRange() this.getDateRange()//
this.setCalendarSelected() this.setCalendarSelected()//
}, },
//
async getMemberInfo() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
this.filteredData.resources_id = res.data.id
},
// //
async getHeadDate() { async getHeadDate() {
let res = await commonApi.getDate() // 2
let startDate = new Date();
startDate.setDate(startDate.getDate() - 2);
let start_date = startDate.toISOString().split('T')[0];
// 4
let endDate = new Date();
endDate.setDate(endDate.getDate() + 4);
let end_date = endDate.toISOString().split('T')[0];
let params = {
resources_id: this.memberInfo.id, // ID
start_date: start_date, // (Y-m-d)
end_date: end_date, // (Y-m-d)
}
let res = await apiRoute.xy_personCourseScheduleGetCalendar(params)
if (res.code != 1) { if (res.code != 1) {
// //
uni.showToast({ uni.showToast({
@ -180,12 +226,12 @@ export default {
this.dateList = [] this.dateList = []
res.data.forEach((v, k) => { res.data.forEach((v, k) => {
let today = v.date.split("-")[2]; // "09"
this.dateList.push({ this.dateList.push({
date: v.date, date: v.date,
status: v.status,//1 2 status: v.status,//1 2
week: v.week, week: v.week,
today: today, today: v.today,
is_sign: v.is_sign,
}) })
}) })
@ -206,15 +252,15 @@ export default {
let res = `${year}-${month}-${day}`; // let res = `${year}-${month}-${day}`; //
this.today = res; this.today = res;
this.filteredData.schedule_date = res; this.filteredData.course_date = res;
}, },
//() //()
loadMoreData() { async loadMoreData() {
// //
if (!this.isReachedBottom) { if (!this.isReachedBottom) {
this.isReachedBottom = true;// this.isReachedBottom = true;//
this.getList(); await this.getList();
} }
}, },
// //
@ -230,6 +276,9 @@ export default {
this.loading = true this.loading = true
let data = {...this.filteredData} let data = {...this.filteredData}
if(this.filteredData.page == 1){
this.tableList = []
}
// //
if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) { if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) {
@ -241,7 +290,7 @@ export default {
return return
} }
let res = await memberApi.courseList(data) let res = await apiRoute.xy_personCourseSchedule(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1) { if (res.code != 1) {
@ -252,18 +301,19 @@ export default {
return return
} }
this.tableList = res.data.list.data this.tableList = this.tableList.concat(res.data.data); // 使 concat
// //
this.venuesInfo = res.data.venues_info this.venuesInfo = res.data.venues_info
this.filteredData.total = res.data.list.total this.filteredData.total = res.data.total
this.filteredData.page++ this.filteredData.page++
}, },
// //
async selectDate(date) { async selectDate(date) {
this.loadData() this.loadData()
this.filteredData.schedule_date = date this.filteredData.course_date = date
this.getList() this.getList()
}, },
@ -296,25 +346,43 @@ export default {
// //
async setCalendarSelected(){ async setCalendarSelected(){
// //
let month = new Date().getMonth() + 1; const today = new Date(); //
const year = today.getFullYear(); //
const month = today.getMonth(); // 0-11
let res = await commonApi.getMonthDate({month:month}) //
if (res.code != 1){ const firstDay = new Date(year, month, 1);
// // 1
uni.showToast({ const lastDay = new Date(year, month + 1, 0);
title: res.msg,
icon: 'none', // YYYY-MM-DD
duration: 2000 const formatDate = (date) => {
}) const y = date.getFullYear();
return const m = String(date.getMonth() + 1).padStart(2, '0'); //
const d = String(date.getDate()).padStart(2, '0'); //
return `${y}-${m}-${d}`;
};
let start_date = formatDate(firstDay); //
let end_date = formatDate(lastDay); //
let params = {
resources_id: this.memberInfo.id, // ID
start_date: start_date, // (Y-m-d)
end_date: end_date, // (Y-m-d)
} }
let res = await apiRoute.xy_personCourseScheduleGetCalendar(params)
this.calendarSelected = [] this.calendarSelected = []
res.data.forEach((v,k)=>{ res.data.forEach((v,k)=>{
this.calendarSelected.push({ if(v.is_sign == 1){
date: v.date, this.calendarSelected.push({
}) date: v.date,
})
}
}) })
// this.calendarSelected = [ // this.calendarSelected = [
// { // {
// date: '2025-04-07', // date: '2025-04-07',
@ -334,23 +402,24 @@ export default {
console.log('日历',e) console.log('日历',e)
this.show_calendar = false this.show_calendar = false
this.loadData() this.loadData()
this.filteredData.schedule_date = e.fulldate this.filteredData.course_date = e.fulldate
this.getList() this.getList()
}, },
// //
openViewCourseInfo(item) { openViewCourseInfo(item) {
uni.navigateTo({ let person_course_schedule_id = item.id
url: `/pages/student/timetable/info?id=${item.id}` this.$navigateTo({
url: `/pages/student/timetable/info?person_course_schedule_id=${person_course_schedule_id}`
}) })
}, },
// //
more() { more() {
let schedule_date = this.filteredData.schedule_date let course_date = this.filteredData.course_date
let venue_id = this.venuesInfo.id//id let venue_id = this.venuesInfo.id || ''//id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/timetable/list?schedule_date=${schedule_date}&venue_id=${venue_id}` url: `/pages/student/timetable/list?course_date=${course_date}&venue_id=${venue_id}`
}) })
} }
} }
@ -443,8 +512,8 @@ export default {
padding: 0 20rpx ; padding: 0 20rpx ;
color: #fff; color: #fff;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
gap: 20rpx;
.item_box { .item_box {
width: 45%; width: 45%;
.fui-filter__item { .fui-filter__item {

101
pages/student/timetable/info.vue

@ -3,55 +3,55 @@
<view class="main_box"> <view class="main_box">
<view class="main_section"> <view class="main_section">
<view class="section_1"> <view class="section_1">
<view class="title_box">{{infoData.courses_name}}</view> <view class="title_box">{{infoData.courseScheduleHasOne.course.course_name}}</view>
<view class="ul"> <view class="ul">
<view class="li"> <view class="li">
<view class="title">课程名称</view> <view class="title">课程名称</view>
<view class="content">{{infoData.courses_name}}</view> <view class="content">{{infoData.courseScheduleHasOne.course.course_name}}</view>
</view> </view>
<view class="li"> <!-- <view class="li">-->
<view class="title">班级</view> <!-- <view class="title">班级</view>-->
<view class="content">{{infoData.classes_name}}</view> <!-- <view class="content">{{infoData.classes_name}}</view>-->
</view> <!-- </view>-->
<view class="li"> <view class="li">
<view class="title">上课时间</view> <view class="title">上课时间</view>
<view class="content">{{infoData.date_time}} {{infoData.time_slot.replace(',', '-')}}</view> <view class="content">{{infoData.courseScheduleHasOne.course_date}} {{infoData.courseScheduleHasOne.time_slot}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">上课地址</view> <view class="title">上课地址</view>
<view class="content">{{infoData.address}}</view> <view class="content">{{infoData.courseScheduleHasOne.campus_name}} {{infoData.courseScheduleHasOne.venue.venue_name}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">教练</view> <view class="title">教练</view>
<view class="content">{{infoData.staff_name}}</view> <view class="content">{{infoData.courseScheduleHasOne.coach.name}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">教练号码</view> <view class="title">教练号码</view>
<view class="content">{{infoData.staff_phone}}</view> <view class="content">{{infoData.courseScheduleHasOne.coach.phone}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">扣除课时</view> <view class="title">扣除课时</view>
<view class="content">{{infoData.hour}}个课时</view> <view class="content">{{infoData.courseScheduleHasOne.course.single_session_count}}个课时</view>
</view> </view>
<!--1未上课 2已上课--> <!--状态0待上课1已上课2请假-->
<view class="state_box" v-if="infoData.status == 2"> <view class="state_box" v-if="infoData.status == 1">
<view>已上</view> <view>已上</view>
</view> </view>
<view class="state_box_btn" v-if="infoData.status != 2"> <view class="state_box_btn" v-if="infoData.status != 1">
<!--sign_status字段| 0未签到 1已签到 2请假--> <!--状态0待上课1已上课2请假-->
<view v-if="!['1','2'].includes(String(infoData.sign_status))" @click="askForLeave(1)">请假</view> <view v-if="['2'].includes(String(infoData.status))" @click="askForLeave(2)">取消请假</view>
<view v-else @click="askForLeave(2)">取消请假</view> <view v-else @click="askForLeave(1)">请假</view>
</view> </view>
</view> </view>
@ -61,11 +61,11 @@
<!-- 请假模态框--> <!-- 请假模态框-->
<fui-modal class="leave_section" :buttons="[{text: '取消',plain: true}, {text: '保存'}]" width="600" :show="leaveShow" @cancel="closeLeaveModal" @click="closeLeaveModal"> <fui-modal class="leave_section" :buttons="[{text: '取消',plain: true}, {text: '保存'}]" width="600" :show="leaveShow" @cancel="closeLeaveModal" @click="closeLeaveModal">
<text class="fui-title" style="font-size: 30rpx;padding: 15rpx">请假申请</text> <text class="fui-title" style="font-size: 30rpx;padding: 15rpx">请假申请</text>
<view class="form_box" style="width: 100%;padding: 20rpx"> <!-- <view class="form_box" style="width: 100%;padding: 20rpx">-->
<view class="input_box" style="border: 1px solid #888888;font-size: 28rpx;"> <!-- <view class="input_box" style="border: 1px solid #888888;font-size: 28rpx;">-->
<fui-input style="font-size: 28rpx;height: 60rpx;line-height: 60rpx;padding-left: 15rpx" :borderBottom="false" placeholder="请输入请假原因" v-model="leaveFormData.reason"></fui-input> <!-- <fui-input style="font-size: 28rpx;height: 60rpx;line-height: 60rpx;padding-left: 15rpx" :borderBottom="false" placeholder="请输入请假原因" v-model="leaveFormData.reason"></fui-input>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</fui-modal> </fui-modal>
<!--取消请假--> <!--取消请假-->
@ -74,6 +74,7 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
import AQTabber from "@/components/AQ/AQTabber.vue" import AQTabber from "@/components/AQ/AQTabber.vue"
@ -84,18 +85,19 @@ export default {
}, },
data() { data() {
return { return {
infoData:{},// memberInfo:{id:''},//
infoData:{id:''},//
// //
filteredData: { filteredData: {
id: '',//id person_course_schedule_id: '',//id
}, },
leaveShow:false,// leaveShow:false,//
// //
leaveFormData:{ leaveFormData:{
schedules_id: '',// id person_course_schedule_id: '',//id
courses_id: '',//id status: '',//012
reason: '',// reason: '',//
file_url: '',// file_url: '',//
}, },
@ -105,9 +107,10 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
this.filteredData.id = options.id//id
this.leaveFormData.courses_id = options.id//id this.filteredData.person_course_schedule_id = options.person_course_schedule_id//id
this.leaveFormData.schedules_id = options.id//id
this.leaveFormData.person_course_schedule_id = options.person_course_schedule_id//id
}, },
onShow(){ onShow(){
this.init() this.init()
@ -115,13 +118,27 @@ export default {
methods: { methods: {
// //
async init(){ async init(){
await this.getMemberInit()
await this.getInfo() await this.getInfo()
}, },
//
async getMemberInit(){
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
},
// //
async getInfo(){ async getInfo(){
let res = await memberApi.courseInfo({ let res = await apiRoute.xy_personCourseScheduleInfo({
id: this.filteredData.id, person_course_schedule_id: this.filteredData.person_course_schedule_id,
}) })
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
@ -136,7 +153,7 @@ export default {
// //
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },
@ -162,13 +179,13 @@ export default {
this.leaveFormData.reason = '' this.leaveFormData.reason = ''
}else{ }else{
// //
if (!this.leaveFormData.reason){ // if (!this.leaveFormData.reason){
uni.showToast({ // uni.showToast({
title: '请输入请假原因', // title: '',
icon: 'none' // icon: 'none'
}) // })
return // return
} // }
this.submitLeave()// this.submitLeave()//
} }
this.leaveShow = false this.leaveShow = false
@ -176,7 +193,8 @@ export default {
// //
async submitLeave(){ async submitLeave(){
let data = {...this.leaveFormData} let data = {...this.leaveFormData}
let res = await memberApi.askForLeave(data) data.status = 2
let res = await apiRoute.xy_personCourseScheduleEditStatus(data)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -203,7 +221,8 @@ export default {
// //
this.leaveFormData.reason = ''// this.leaveFormData.reason = ''//
let data = {...this.leaveFormData} let data = {...this.leaveFormData}
let res = await memberApi.delAskForLeave(data) data.status = 0
let res = await apiRoute.xy_personCourseScheduleEditStatus(data)
this.cancelLeaveShow = false this.cancelLeaveShow = false
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({

75
pages/student/timetable/list.vue

@ -4,11 +4,13 @@
<scroll-view scroll-y="true" :lower-threshold="lowerThreshold" <scroll-view scroll-y="true" :lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData" style="height: 100vh;"> @scrolltolower="loadMoreData" style="height: 100vh;">
<view class="data_hint" v-if="!this.tableList.length">暂无更多数据</view>
<view class="main_section" v-for="(v,k) in tableList" :key="k" @click="opebViewTimetable(v)"> <view class="main_section" v-for="(v,k) in tableList" :key="k" @click="opebViewTimetable(v)">
<view class="title">{{v.name}}</view> <view class="title">{{v.campus.campus_name}} </view>
<view class="con">{{v.address}}</view> <view class="con">{{v.campus.campus_address}} {{v.venue_name}}</view>
<view class="con" v-if="v.distance === null ">无法获取定位</view> <!-- <view class="con" v-if="v.distance === null ">无法获取定位</view>-->
<view class="con" v-else-if="v.distance">距您{{v.distance}}km</view> <!-- <view class="con" v-else-if="v.distance">距您{{v.distance}}km</view>-->
<view class="current-venue" v-if="venue_id == v.id"> <view class="current-venue" v-if="venue_id == v.id">
当前场馆 当前场馆
</view> </view>
@ -20,6 +22,7 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
import AQTabber from "@/components/AQ/AQTabber.vue" import AQTabber from "@/components/AQ/AQTabber.vue"
@ -34,12 +37,15 @@
lowerThreshold: 100,// lowerThreshold: 100,//
isReachedBottom: false,//|true=|false= isReachedBottom: false,//|true=|false=
memberInfo:{id:''},//
// //
filteredData:{ filteredData:{
// page:1,// // page:1,//
// limit:10,// // limit:10,//
// total:10,// // total:10,//
schedule_date:'',// course_date:'',//
resources_id:'',//ID
}, },
tableList:[],// tableList:[],//
@ -50,9 +56,9 @@
} }
}, },
onLoad(options) { onLoad(options) {
this.filteredData.schedule_date = options.schedule_date// this.filteredData.course_date = options.course_date//
//id //id
this.venue_id = options.venue_id || '' this.venue_id = options.venue_id || ''//ID
}, },
onShow() { onShow() {
this.init()// this.init()//
@ -60,10 +66,26 @@
methods: { methods: {
// //
async init() { async init() {
await this.getUserLocation(); // await this.getUserLocation();
await this.getMemberInfo();
await this.getList(); await this.getList();
}, },
//
async getMemberInfo() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
this.filteredData.resources_id = res.data.id
},
// //
async getUserLocation() { async getUserLocation() {
@ -142,16 +164,16 @@
let data = {...this.filteredData} let data = {...this.filteredData}
// //
if(this.filteredData.page * this.filteredData.limit > this.total){ // if(this.filteredData.page * this.filteredData.limit > this.total){
this.loading = false // this.loading = false
uni.showToast({ // uni.showToast({
title: '暂无更多', // title: '',
icon: 'none' // icon: 'none'
}) // })
return // return
} // }
let res = await memberApi.venuesList(data) let res = await apiRoute.xy_personCourseScheduleGetVenueListAll(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -165,9 +187,9 @@
this.tableList = res.data this.tableList = res.data
this.tableList.forEach((v,k)=>{ this.tableList.forEach((v,k)=>{
if(this.longitude && this.latitude && v.longitude && v.latitude){ if(this.longitude && this.latitude && (v.longitude || '') && (v.latitude || '')){
//
v.distance = this.getDistance(this.latitude, this.longitude, v.latitude, v.longitude) v.distance = this.getDistance(this.latitude, this.longitude, v.latitude, v.longitude)
}else{ }else{
v.distance = null v.distance = null
@ -175,17 +197,12 @@
}) })
console.log('列表',this.tableList) console.log('列表',this.tableList)
}, },
//- //-
opebViewTimetable(item) { opebViewTimetable(item) {
let venue_id = item.id let venue_id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/timetable/index?venue_id=${venue_id}` url: `/pages/student/timetable/index?venue_id=${venue_id}`
}) })
}, },
@ -201,6 +218,12 @@
overflow: auto; overflow: auto;
background: #292929; background: #292929;
} }
.data_hint{
margin-top: 100rpx;
font-size: 30rpx;
text-align: center;
color: #fff;
}
.main_section{ .main_section{
width: 92%; width: 92%;
border-radius: 15rpx; border-radius: 15rpx;

Loading…
Cancel
Save