Browse Source

修改页面

master
王泽彦 10 months ago
parent
commit
60fff21f33
  1. 703
      api/apiRoute.js
  2. 239
      common/axios.js
  3. 92
      components/AQ/AQTabber.vue
  4. 44
      pages.json
  5. 150
      pages/market/clue/edit_clues.vue
  6. 375
      pages/market/home/index.vue
  7. 580
      pages/market/index/index.vue
  8. 249
      pages/student/login/login.vue

703
api/apiRoute.js

@ -2,702 +2,321 @@ import http from '../common/axios.js'
//全部api接口
export default {
// getDemo(data = {}) {
// let url = '/member/member_edit'
// return http.get(url, data).then(res => {
// return res;
// })
// },
// postDemo(data = {}) {
// let url = '/member/member_edit'
// return http.post(url, data).then(res => {
// return res;
// })
// },
//↓↓↓↓↓↓↓↓↓↓↓↓-----公共接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓
//教师/销售端登陆
personnelLogin(data = {}) {
let url = '/personnelLogin'
return http.post(url, data).then(res => {
return res;
})
async personnelLogin(data = {}) {
const response = await http.post('/personnelLogin', data);
console.log('登录响应:', response);
return response;
},
//教师/销售端详情
getPersonnelInfo(data = {}) {
let url = '/personnel/info'
return http.get(url, data).then(res => {
return res;
})
async getPersonnelInfo(data = {}) {
return await http.get('/personnel/info', data);
},
//教师/销售端详情
editPersonnelInfo(data = {}) {
let url = '/personnel/edit'
return http.post(url, data).then(res => {
return res;
})
async editPersonnelInfo(data = {}) {
return await http.post('/personnel/edit', data);
},
//教师/销售端请假/打卡/签退-编辑
common_attendanceEdit(data = {}) {
let url = '/attendance/edit'
return http.post(url, data).then(res => {
return res;
})
async common_attendanceEdit(data = {}) {
return await http.post('/attendance/edit', data);
},
//教师/销售端请假/打卡/签退-列表
common_attendanceIndex(data = {}) {
let url = '/attendance/index'
return http.post(url, data).then(res => {
return res;
})
async common_attendanceIndex(data = {}) {
return await http.post('/attendance/index', data);
},
//获取字典数据
common_Dictionary(data = {}) {
let url = '/common/getDictionary'
return http.get(url, data).then(res => {
return res;
})
async common_Dictionary(data = {}) {
return await http.get('/common/getDictionary', data);
},
//公共端-获取全部员工列表
common_getPersonnelAll(data = {}) {
let url = '/personnel/getPersonnelAll'
return http.get(url, data).then(res => {
return res;
})
async common_getPersonnelAll(data = {}) {
return await http.get('/personnel/getPersonnelAll', data);
},
//公共端-获取全部课程列表
common_getCourseAll(data = {}) {
let url = '/common/getCourseAll'
return http.get(url, data).then(res => {
return res;
})
async common_getCourseAll(data = {}) {
return await http.get('/common/getCourseAll', data);
},
//公共端-获取全部班级列表
common_getClassAll(data = {}) {
let url = '/common/getClassAll'
return http.get(url, data).then(res => {
return res;
})
async common_getClassAll(data = {}) {
return await http.get('/common/getClassAll', data);
},
//公共端-教师/销售端验证旧密码是否正确
common_personnelCheckOldPwd(data = {}) {
let url = '/personnel/checkOldPwd'
return http.post(url, data).then(res => {
return res;
})
async common_personnelCheckOldPwd(data = {}) {
return await http.post('/personnel/checkOldPwd', data);
},
//公共端-教师/销售端验证旧密码是否正确
common_personnelEdidPassword(data = {}) {
let url = '/personnel/edidPassword'
return http.post(url, data).then(res => {
return res;
})
async common_personnelEdidPassword(data = {}) {
return await http.post('/personnel/edidPassword', data);
},
//公共端-教师/销售端验证旧密码是否正确
common_getPersonnelCampus(data = {}) {
let url = '/campus/getPersonnelCampus'
return http.get(url, data).then(res => {
return res;
})
async common_getPersonnelCampus(data = {}) {
return await http.get('/campus/getPersonnelCampus', data);
},
//公共端-忘记密码-通过短信验证码进行密码重置(学生/员工通用)
common_forgetPassword(data = {}) {
let url = '/common/forgetPassword'
return http.post(url, data).then(res => {
return res;
})
async common_forgetPassword(data = {}) {
return await http.post('/common/forgetPassword', data);
},
//公共端-获取配置项
common_getConfig(data = {}) {
let url = '/common/getConfig'
return http.get(url, data).then(res => {
return res;
})
async common_getConfig(data = {}) {
return await http.get('/common/getConfig', data);
},
//公共端-获取配置项
common_getMiniWxOpenId(data = {}) {
let url = '/common/getMiniWxOpenId'
return http.post(url, data).then(res => {
return res;
})
async common_getMiniWxOpenId(data = {}) {
return await http.post('/common/getMiniWxOpenId', data);
},
//↑↑↑↑↑↑↑↑↑↑↑↑-----公共接口相关-----↑↑↑↑↑↑↑↑↑↑↑↑
//↓↓↓↓↓↓↓↓↓↓↓↓-----教练接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓
//获取我的页面统计个数
getStatisticsInfo(data = {}) {
let url = '/class/Statistics/info'
return http.get(url, data).then(res => {
return res;
})
async getStatisticsInfo(data = {}) {
return await http.get('/class/Statistics/info', data);
},
//添加作业
jlPublishJob(data = {}) {
let url = '/class/jlPublishJob/add'
return http.get(url, data).then(res => {
return res;
})
async jlPublishJob(data = {}) {
return await http.get('/class/jlPublishJob/add', data);
},
//添加作业-学员列表
jlGetStudentList(data = {}) {
let url = '/class/jlGetStudentList/list'
return http.get(url, data).then(res => {
return res;
})
async jlGetStudentList(data = {}) {
return await http.get('/class/jlGetStudentList/list', data);
},
//添加作业-获取课程列表
jlGetCoursesList(data = {}) {
let url = '/class/jlGetCoursesList/list'
return http.get(url, data).then(res => {
return res;
})
async jlGetCoursesList(data = {}) {
return await http.get('/class/jlGetCoursesList/list', data);
},
//添加作业-获取班级列表
jlGetClassesList(data = {}) {
let url = '/class/jlGetClasses/list'
return http.get(url, data).then(res => {
return res;
})
async jlGetClassesList(data = {}) {
return await http.get('/class/jlGetClasses/list', data);
},
//体测报告-详情
physicalTestInfo(data = {}) {
let url = '/class/physicalTest/info'
return http.get(url, data).then(res => {
return res;
})
async physicalTestInfo(data = {}) {
return await http.get('/class/physicalTest/info', data);
},
//体测报告-列表
physicalTest(data = {}) {
let url = '/class/physicalTest'
return http.get(url, data).then(res => {
return res;
})
async physicalTest(data = {}) {
return await http.get('/class/physicalTest', data);
},
//获取学员详情
jlStudentsInfo(data = {}) {
let url = '/class/jlStudentsInfo'
return http.get(url, data).then(res => {
return res;
})
async jlStudentsInfo(data = {}) {
return await http.get('/class/jlStudentsInfo', data);
},
//获取添加学员列表
addStudentList(data = {}) {
let url = '/course/addStudentList'
return http.get(url, data).then(res => {
return res;
})
},
addStudent(data = {}) {
let url = '/course/addStudent'
return http.post(url, data).then(res => {
return res;
})
},
delStudentCourse(data = {}) {
let url = '/course/delStudentCourse'
return http.get(url, data).then(res => {
return res;
})
async addStudentList(data = {}) {
return await http.get('/course/addStudentList', data);
},
async addStudent(data = {}) {
return await http.post('/course/addStudent', data);
},
async delStudentCourse(data = {}) {
return await http.get('/course/delStudentCourse', data);
},
//获取班级列表
jlClassList(data = {}) {
let url = '/class/jlClassList'
return http.get(url, data).then(res => {
return res;
})
async jlClassList(data = {}) {
return await http.get('/class/jlClassList', data);
},
//获取班级详情
jlClassInfo(data = {}) {
let url = '/class/jlClassInfo'
return http.get(url, data).then(res => {
return res;
})
async jlClassInfo(data = {}) {
return await http.get('/class/jlClassInfo', data);
},
//获取课程列表
courseList(data = {}) {
let url = '/course/courseList'
return http.get(url, data).then(res => {
return res;
})
async courseList(data = {}) {
return await http.get('/course/courseList', data);
},
//获取班级课程列表
classCourseList(data = {}) {
let url = '/course/classCourseList'
return http.get(url, data).then(res => {
return res;
})
async classCourseList(data = {}) {
return await http.get('/course/classCourseList', data);
},
//获取课程详情
courseInfo(data = {}) {
let url = '/course/courseInfo'
return http.get(url, data).then(res => {
return res;
})
async courseInfo(data = {}) {
return await http.get('/course/courseInfo', data);
},
//教研管理文章列表
teachingResearchList(data = {}) {
let url = '/teachingResearch/list'
return http.get(url, data).then(res => {
return res;
})
async teachingResearchList(data = {}) {
return await http.get('/teachingResearch/list', data);
},
//教研管理文章详情
teachingResearchInfo(id) {
let url = '/teachingResearch/info/' + id
return http.get(url).then(res => {
return res;
})
async teachingResearchInfo(id) {
return await http.get('/teachingResearch/info/' + id);
},
//获取能看的教研管理类型
teachingResearchLookType(data = {}) {
let url = '/teachingResearch/lookType'
return http.get(url, data).then(res => {
return res;
})
async teachingResearchLookType(data = {}) {
return await http.get('/teachingResearch/lookType', data);
},
//获取试卷
getTeachingTestPaper(data = {}) {
let url = '/teachingResearch/teachingTestPaper'
return http.get(url, data).then(res => {
return res;
})
async getTeachingTestPaper(data = {}) {
return await http.get('/teachingResearch/teachingTestPaper', data);
},
//提交试卷
submitTestPaper(data = {}) {
let url = '/teachingResearch/submitTestPaper'
return http.get(url, data).then(res => {
return res;
})
async submitTestPaper(data = {}) {
return await http.get('/teachingResearch/submitTestPaper', data);
},
//↑↑↑↑↑↑↑↑↑↑↑↑-----教练接口相关-----↑↑↑↑↑↑↑↑↑↑↑↑
//↓↓↓↓↓↓↓↓↓↓↓↓-----销售接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓
//修改销售端个人资料
editPersonnel(data = {}) {
let url = '/personnel/info'
return http.get(url, data).then(res => {
return res;
})
async editPersonnel(data = {}) {
return await http.get('/personnel/info', data);
},
//销售端-客户资源-添加
xs_addCustomerResources(data = {}) {
let url = '/customerResources/add'
return http.post(url, data).then(res => {
return res;
})
async xs_addCustomerResources(data = {}) {
return await http.post('/customerResources/add', data);
},
//销售端-客户资源-编辑
xs_editCustomerResources(data = {}) {
let url = '/customerResources/edit'
return http.post(url, data).then(res => {
return res;
})
async xs_editCustomerResources(data = {}) {
return await http.post('/customerResources/edit', data);
},
//销售端-查询客户资源全部列表
xs_getAllCustomerResources(data = {}) {
let url = '/customerResources/getAll'
return http.get(url, data).then(res => {
return res;
})
async xs_getAllCustomerResources(data = {}) {
return await http.get('/customerResources/getAll', data);
},
//销售端-客户资源-获取修改日志列表
xs_customerResourcesGetEditLogList(data = {}) {
let url = '/customerResources/getEditLogList'
return http.get(url, data).then(res => {
return res;
})
async xs_customerResourcesGetEditLogList(data = {}) {
return await http.get('/customerResources/getEditLogList', data);
},
//销售端-资源共享-列表
xs_resourceSharingIndex(data = {}) {
let url = '/resourceSharing/index'
return http.get(url, data).then(res => {
return res;
})
async xs_resourceSharingIndex(data = {}) {
return await http.get('/resourceSharing/index', data);
},
//销售端-资源共享-分配员工
xs_resourceSharingAssign(data = {}) {
let url = '/resourceSharing/assign'
return http.post(url, data).then(res => {
return res;
})
async xs_resourceSharingAssign(data = {}) {
return await http.post('/resourceSharing/assign', data);
},
//销售端-资源共享-详情(客户资源详情)
xs_resourceSharingInfo(data = {}) {
let url = '/resourceSharing/info'
return http.get(url, data).then(res => {
return res;
})
async xs_resourceSharingInfo(data = {}) {
return await http.get('/resourceSharing/info', data);
},
//销售端-沟通记录-添加
xs_communicationRecordsAdd(data = {}) {
let url = '/communicationRecords/add'
return http.post(url, data).then(res => {
return res;
})
async xs_communicationRecordsAdd(data = {}) {
return await http.post('/communicationRecords/add', data);
},
//销售端-获取好友关系绑定详情
xs_chatGetChatFriendsInfo(data = {}) {
let url = '/chat/getChatFriendsInfo'
return http.get(url, data).then(res => {
return res;
})
async xs_chatGetChatFriendsInfo(data = {}) {
return await http.get('/chat/getChatFriendsInfo', data);
},
//销售端-获取聊天消息列表
xs_chatGetChatMessagesList(data = {}) {
let url = '/chat/getChatMessagesList'
return http.get(url, data).then(res => {
return res;
})
async xs_chatGetChatMessagesList(data = {}) {
return await http.get('/chat/getChatMessagesList', data);
},
//销售端-发送聊天消息
xs_chatSendChatMessages(data = {}) {
let url = '/chat/sendChatMessages'
return http.post(url, data).then(res => {
return res;
})
async xs_chatSendChatMessages(data = {}) {
return await http.post('/chat/sendChatMessages', data);
},
//销售端-好友关系列表
xs_chatGetChatFriendsList(data = {}) {
let url = '/chat/getChatFriendsList'
return http.get(url, data).then(res => {
return res;
})
async xs_chatGetChatFriendsList(data = {}) {
return await http.get('/chat/getChatFriendsList', data);
},
//员工端统计(销售)-获取销售首页数据统计
xs_statisticsMarketHome(data = {}) {
let url = '/statistics/marketHome'
return http.get(url, data).then(res => {
return res;
})
async xs_statisticsMarketHome(data = {}) {
return await http.get('/statistics/marketHome', data);
},
//员工端统计(销售)-获取销售数据页统计
xs_statisticsMarketData(data = {}) {
let url = '/statistics/marketData'
return http.get(url, data).then(res => {
return res;
})
async xs_statisticsMarketData(data = {}) {
return await http.get('/statistics/marketData', data);
},
//员工端(销售)-订单管理-列表
xs_orderTableList(data = {}) {
let url = '/orderTable'
return http.get(url, data).then(res => {
return res;
})
async xs_orderTableList(data = {}) {
return await http.get('/orderTable', data);
},
//员工端(销售)-订单管理-详情
xs_orderTableInfo(data = {}) {
let url = '/orderTable/info'
return http.get(url, data).then(res => {
return res;
})
async xs_orderTableInfo(data = {}) {
return await http.get('/orderTable/info', data);
},
//员工端(销售)-订单管理-添加
xs_orderTableAdd(data = {}) {
let url = '/orderTable/add'
return http.post(url, data).then(res => {
return res;
})
async xs_orderTableAdd(data = {}) {
return await http.post('/orderTable/add', data);
},
//↑↑↑↑↑↑↑↑↑↑↑↑-----销售接口相关-----↑↑↑↑↑↑↑↑↑↑↑
//↓↓↓↓↓↓↓↓↓↓↓↓-----学生接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓
//学生登陆接口
xy_login(data = {}) {
let url = '/customerResourcesAuth/login'
return http.post(url, data).then(res => {
return res;
})
async xy_login(data = {}) {
const response = await http.post('/customerResourcesAuth/login', data);
console.log('学生登录响应:', response);
return response;
},
//学生详情
xy_memberInfo(data = {}) {
let url = '/customerResourcesAuth/info'
return http.get(url, data).then(res => {
return res;
})
async xy_memberInfo(data = {}) {
return await http.get('/customerResourcesAuth/info', data);
},
//学生详情-修改
xy_memberEdit(data = {}) {
let url = '/customerResourcesAuth/edit'
return http.post(url, data).then(res => {
return res;
})
async xy_memberEdit(data = {}) {
return await http.post('/customerResourcesAuth/edit', data);
},
//学生-意见反馈-添加
xy_userFeedbackAdd(data = {}) {
let url = '/userFeedback/add'
return http.post(url, data).then(res => {
return res;
})
async xy_userFeedbackAdd(data = {}) {
return await http.post('/userFeedback/add', data);
},
//学生端-获取好友关系绑定详情
xy_chatGetChatFriendsInfo(data = {}) {
let url = '/xy/chat/getChatFriendsInfo'
return http.get(url, data).then(res => {
return res;
})
async xy_chatGetChatFriendsInfo(data = {}) {
return await http.get('/xy/chat/getChatFriendsInfo', data);
},
//学生端-获取聊天消息列表
xy_chatGetChatMessagesList(data = {}) {
let url = '/xy/chat/getChatMessagesList'
return http.get(url, data).then(res => {
return res;
})
async xy_chatGetChatMessagesList(data = {}) {
return await http.get('/xy/chat/getChatMessagesList', data);
},
//学生端-发送聊天消息
xy_chatSendChatMessages(data = {}) {
let url = '/xy/chat/sendChatMessages'
return http.post(url, data).then(res => {
return res;
})
async xy_chatSendChatMessages(data = {}) {
return await http.post('/xy/chat/sendChatMessages', data);
},
//学生端-好友关系列表
xy_chatGetChatFriendsList(data = {}) {
let url = '/xy/chat/getChatFriendsList'
return http.get(url, data).then(res => {
return res;
})
async xy_chatGetChatFriendsList(data = {}) {
return await http.get('/xy/chat/getChatFriendsList', data);
},
//学生端-体测报告-列表
xy_physicalTest(data = {}) {
let url = '/xy/physicalTest'
return http.get(url, data).then(res => {
return res;
})
async xy_physicalTest(data = {}) {
return await http.get('/xy/physicalTest', data);
},
//学生端-体测报告-详情
xy_physicalTestInfo(data = {}) {
let url = '/xy/physicalTest/info'
return http.get(url, data).then(res => {
return res;
})
async xy_physicalTestInfo(data = {}) {
return await http.get('/xy/physicalTest/info', data);
},
//学生端-学生课程安排-列表
xy_personCourseSchedule(data = {}) {
let url = '/xy/personCourseSchedule'
return http.get(url, data).then(res => {
return res;
})
async xy_personCourseSchedule(data = {}) {
return await http.get('/xy/personCourseSchedule', data);
},
//学生端-学生课程安排-详情
xy_personCourseScheduleInfo(data = {}) {
let url = '/xy/personCourseSchedule/info'
return http.get(url, data).then(res => {
return res;
})
async xy_personCourseScheduleInfo(data = {}) {
return await http.get('/xy/personCourseSchedule/info', data);
},
//学生端-学生课程安排-修改请假状态
xy_personCourseScheduleEditStatus(data = {}) {
let url = '/xy/personCourseSchedule/editStatus'
return http.post(url, data).then(res => {
return res;
})
async xy_personCourseScheduleEditStatus(data = {}) {
return await http.post('/xy/personCourseSchedule/editStatus', data);
},
//学生端-学生课程安排-获取排课日历
xy_personCourseScheduleGetCalendar(data = {}) {
let url = '/xy/personCourseSchedule/getCalendar'
return http.get(url, data).then(res => {
return res;
})
async xy_personCourseScheduleGetCalendar(data = {}) {
return await http.get('/xy/personCourseSchedule/getCalendar', data);
},
//学生端-学生课程安排-获取学生排课的全部场地列表
xy_personCourseScheduleGetVenueListAll(data = {}) {
let url = '/xy/personCourseSchedule/getVenueListAll'
return http.get(url, data).then(res => {
return res;
})
async xy_personCourseScheduleGetVenueListAll(data = {}) {
return await http.get('/xy/personCourseSchedule/getVenueListAll', data);
},
//学生端-学生课程安排-获取学生排课的全部场地列表
xy_personCourseScheduleGetMyCoach(data = {}) {
let url = '/xy/personCourseSchedule/getMyCoach'
return http.get(url, data).then(res => {
return res;
})
async xy_personCourseScheduleGetMyCoach(data = {}) {
return await http.get('/xy/personCourseSchedule/getMyCoach', data);
},
//学生端-学生课程安排-获取学生课程消耗记录列表
xy_personCourseScheduleGetStudentCourseUsageList(data = {}) {
let url = '/xy/personCourseSchedule/getStudentCourseUsageList'
return http.get(url, data).then(res => {
return res;
})
async xy_personCourseScheduleGetStudentCourseUsageList(data = {}) {
return await http.get('/xy/personCourseSchedule/getStudentCourseUsageList', data);
},
//学生端-获取作业列表
xy_assignment(data = {}) {
let url = '/xy/assignment'
return http.get(url, data).then(res => {
return res;
})
async xy_assignment(data = {}) {
return await http.get('/xy/assignment', data);
},
//学生端-获取作业详情
xy_assignmentsInfo(data = {}) {
let url = '/xy/assignment/info'
return http.get(url, data).then(res => {
return res;
})
async xy_assignmentsInfo(data = {}) {
return await http.get('/xy/assignment/info', data);
},
//学生端-提交作业
xy_assignmentSubmitObj(data = {}) {
let url = '/xy/assignment/submitObj'
return http.get(url, data).then(res => {
return res;
})
async xy_assignmentSubmitObj(data = {}) {
return await http.get('/xy/assignment/submitObj', data);
},
//学生端-订单管理-列表
xy_orderTableList(data = {}) {
let url = '/xy/orderTable'
return http.get(url, data).then(res => {
return res;
})
async xy_orderTableList(data = {}) {
return await http.get('/xy/orderTable', data);
},
//学生端-订单管理-详情
xy_orderTableInfo(data = {}) {
let url = '/xy/orderTable/info'
return http.get(url, data).then(res => {
return res;
})
async xy_orderTableInfo(data = {}) {
return await http.get('/xy/orderTable/info', data);
},
//学生端-订单管理-添加
xy_orderTableAdd(data = {}) {
let url = '/xy/orderTable/add'
return http.post(url, data).then(res => {
return res;
})
},
//↑↑↑↑↑↑↑↑↑↑↑↑-----学生接口相关-----↑↑↑↑↑↑↑↑↑↑↑↑
async xy_orderTableAdd(data = {}) {
return await http.post('/xy/orderTable/add', data);
}
}

239
common/axios.js

@ -4,86 +4,199 @@ import {
// import {Token} from './token.js'
// var token = new Token();
export default {
async post(url, param, yanci = false) {
// wx.showLoading();
// 防抖函数
const debounce = (fn, delay = 1000) => {
let timer = null;
return function (...args) {
if (timer) clearTimeout(timer);
timer = setTimeout(() => {
fn.apply(this, args);
}, delay);
}
}
// 请求拦截器
const requestInterceptor = (config) => {
// 在这里可以统一处理请求头、token等
const token = uni.getStorageSync("token");
if (token) {
config.header = {
...config.header,
'token': token
}
}
return config;
}
// setTimeout(() => {
// wx.hideLoading();
// }, 3000)
const res = await this.uni_request(url, param, 'post')
// 响应拦截器
const responseInterceptor = (response) => {
const { statusCode, data } = response;
console.log('响应数据:', response);
return res;
},
async get(url, param, yanci = false) {
// wx.showLoading();
// setTimeout(() => {
// wx.hideLoading();
// }, 3000)
const res = await this.uni_request(url, param, 'get')
return res;
// 处理HTTP状态码
if (statusCode >= 200 && statusCode < 300) {
// 处理业务状态码
if (data && data.code) {
if (data.code === 1) { // 成功状态码为1
// 登录成功,保存token
if (data.data && data.data.token) {
uni.setStorageSync("token", data.data.token);
// 保存用户类型
if (data.data.user_type) {
uni.setStorageSync("userType", data.data.user_type);
}
// 保存过期时间
if (data.data.expires_time) {
uni.setStorageSync("expires_time", data.data.expires_time);
}
}
return data;
} else if (data.code === 401) {
// 未授权或token过期
uni.removeStorageSync("token");
uni.removeStorageSync("userType");
uni.removeStorageSync("expires_time");
uni.showToast({
title: data.msg || '登录已过期,请重新登录',
icon: 'none'
});
setTimeout(() => {
uni.reLaunch({
url: '/pages/student/login/login?code=401'
});
}, 1500);
return Promise.reject(data);
} else {
// 其他业务错误
uni.showToast({
title: data.msg || '请求失败',
icon: 'none'
});
return Promise.reject(data);
}
}
return data;
}
// HTTP错误处理
uni.showToast({
title: '网络请求失败',
icon: 'none'
});
return Promise.reject(response);
};
export default {
// 存储正在进行的请求
pendingRequests: new Map(),
// 生成请求的唯一key
generateRequestKey(config) {
const { url, method, data } = config;
return [url, method, JSON.stringify(data)].join('&');
},
async put(url, param) {
// wx.showLoading();
// setTimeout(() => {
// wx.hideLoading();
// }, 3000)
const res = await this.uni_request(url, param, 'put')
return res;
// 取消重复请求
cancelRequest(config) {
const requestKey = this.generateRequestKey(config);
if (this.pendingRequests.has(requestKey)) {
const controller = this.pendingRequests.get(requestKey);
controller.abort();
this.pendingRequests.delete(requestKey);
}
},
uni_request(url, param, method, again_quest = false) {
const that = this
uni.showLoading({
title:'加载中...'
})
return new Promise((cback, reject) => {
console.log('请求地址',Api_url + url)
uni.request({
url: Api_url + url,
data: param,
method: method,
// 防抖处理
uni_request: debounce((options) => {
return new Promise((resolve, reject) => {
// 创建请求配置
const config = {
url: Api_url + options.url,
data: options.data,
method: options.method || 'GET',
header: {
'token': uni.getStorageSync("token")
},
}).then(data => { //data为一个数组,数组第一项为错误信息,第二项为返回数据
var [error, res] = data;
uni.hideLoading()
var res_code = res.statusCode.toString();
var res_codes = res.data.code.toString();
if (res_code.charAt(0) == 2) {
if (res_code == 200) {
if (res_codes == 401) {
uni.navigateTo({
url: `/pages/student/login/login?res_codes=${res_codes}`
})
}else{
cback(res.data);
timeout: 10000 // 设置10秒超时
};
// 应用请求拦截器
const interceptedConfig = requestInterceptor(config);
uni.showLoading({
title: '加载中...'
});
console.log('请求配置:', interceptedConfig);
uni.request({
...interceptedConfig,
success: (res) => {
try {
console.log('原始响应数据:', res);
const response = responseInterceptor(res);
console.log('处理后的响应数据:', response);
resolve(response);
} catch (error) {
console.error('请求处理失败:', error);
uni.showToast({
title: error.msg || '请求失败',
icon: 'none'
});
reject(error);
}
} else {
console.log('201', url)
},
fail: (error) => {
console.error('请求失败:', error);
uni.showToast({
title: res.data.msg,
title: '网络请求失败',
icon: 'none'
})
});
reject(error);
},
complete: () => {
uni.hideLoading();
}
} else {
if (res_codes == 401) {
});
});
}, 300),
// 封装请求方法
post(url, data = {}) {
return this.uni_request({
url,
data,
method: 'POST'
});
},
get(url, data = {}) {
return this.uni_request({
url,
data,
method: 'GET'
});
},
put(url, data = {}) {
return this.uni_request({
url,
data,
method: 'PUT'
});
},
// 统一的错误处理
handleError(error) {
if (error.statusCode === 401) {
uni.navigateTo({
url: `/pages/student/login/login?res_codes=${res_codes}`
url: `/pages/student/login/login?res_codes=${error.data.code}`
})
} else {
console.log('400/500', url, error, res)
uni.showToast({
title: res.data.msg ? res.data.msg : '请求异常',
title: error.data?.msg || '请求异常',
icon: 'none'
})
}
}
}).catch(err => {
console.log('catch:', err);
})
})
},
}

92
components/AQ/AQTabber.vue

@ -7,19 +7,10 @@
<view class="fui-custom__wrap">
<view class="title" style="font-size: 36rpx;text-align: center;padding: 36rpx 0;">快捷新增</view>
<view class="but-style">
<!-- <view class="but-style-top">-->
<!-- <view class="left" @click="writingFollowUp">-->
<!-- <image src="@/static/images/index/writing.png" class="drop-image-x"></image>-->
<!-- <view class="title-x">添加跟进记录</view>-->
<!-- </view>-->
<!-- <view class="right" @click="newTask">-->
<!-- <image src="@/static/images/index/task.png" class="drop-image-x"></image>-->
<!-- <view class="title-x">转交跟进任务</view>-->
<!-- </view>-->
<!-- </view>-->
<view class="but-style-below" @click="addClues">
<!-- <image src="@/static/images/index/addto.png" class="drop-image-x"></image>-->
<image :src="$util.img('/uniapp_src/static/images/index/addto.png')" class="drop-image-x"></image>
<!-- <image src="@/static/images/index/addto.png" class="drop-image-x"></image>-->
<image :src="$util.img('/uniapp_src/static/images/index/addto.png')" class="drop-image-x">
</image>
<view class="title-x">添加客户</view>
</view>
</view>
@ -54,7 +45,7 @@
async init() {
let userType = uni.getStorageSync('userType')
this.userType = userType
let tabBerIndex = uni.getStorageSync('tabBerIndex')// tabBerIndex=0|1
let tabBerIndex = uni.getStorageSync('tabBerIndex') // tabBerIndex=0|1
if (tabBerIndex) {
this.tabBerIndex = String(tabBerIndex)
@ -62,7 +53,43 @@
this.tabBerIndex = '0'
}
switch (String(this.userType)) {
case "1": //
case "1": //
this.tabBar = [{
text: "首页",
urlPath: '/pages/market/home/index', //
iconPath: util.img('/uniapp_src/static/images/tabbar/index.png'),
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/indexs.png")
},
{
text: "线索",
urlPath: '/pages/market/clue/index', //
iconPath: util.img('/uniapp_src/static/images/tabbar/clue.png'),
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/clues.png")
},
{
text: "",
urlPath: '/pages/market/clue/add_clues', //
iconPath: util.img('/uniapp_src/static/images/tabbar/plus.png'),
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/plus.png'),
midButton: true,
width: 70,
height: 70
},
{
text: "数据",
urlPath: '/pages/market/data/index', //
iconPath: util.img('/uniapp_src/static/images/tabbar/timetable.png'),
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/timetables.png'),
},
{
text: "我的",
urlPath: '/pages/market/my/index', //
iconPath: util.img('/uniapp_src/static/images/tabbar/my.png'),
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/mys.png')
}
]
break;
case "2": //
this.tabBar = [{
text: "首页",
urlPath: '/pages/coach/home/index', //
@ -90,7 +117,8 @@
}
]
break;
case "2": //
case "3": //
this.tabBar = [{
text: "首页",
urlPath: '/pages/market/index/index', //
@ -126,9 +154,8 @@
}
]
break;
case "3": //
this.tabBar = [
{
case "4": //
this.tabBar = [{
text: "首页",
urlPath: '/pages/student/index/index', //
iconPath: util.img('/uniapp_src/static/images/tabbar/index.png'),
@ -169,7 +196,7 @@
// })
console.log('qqq2,执行完了')
}else{
} else {
this.show = true
}
},
@ -177,19 +204,19 @@
this.show = false
},
//
writingFollowUp(){
writingFollowUp() {
uni.navigateTo({
url: '/pages/market/clue/writing_followUp'
})
},
//
newTask(){
newTask() {
uni.navigateTo({
url: '/pages/market/clue/new_task'
})
},
//
addClues(){
addClues() {
uni.navigateTo({
url: '/pages/market/clue/add_clues'
})
@ -206,27 +233,32 @@
padding-bottom: env(safe-area-inset-bottom);
/* #endif */
}
.fui-custom__wrap {
width: 100%;
//height: 600rpx;
height: 450rpx;
}
.title{
.title {
font-size: 36rpx;
text-align: center;
padding: 36rpx 0;
}
.but-style{
.but-style {
width: 92%;
height: 70%;
margin: auto;
}
.but-style-top{
.but-style-top {
width: 100%;
display: flex;
justify-content: space-between;
}
.left{
.left {
width: 45%;
height: 180rpx;
border-radius: 16rpx;
@ -235,7 +267,8 @@
align-items: center;
justify-content: center;
}
.right{
.right {
width: 45%;
height: 180rpx;
border-radius: 16rpx;
@ -244,7 +277,8 @@
align-items: center;
justify-content: center;
}
.but-style-below{
.but-style-below {
width: 100%;
height: 180rpx;
margin-top: 36rpx;
@ -254,10 +288,12 @@
align-items: center;
justify-content: center;
}
.drop-image-x {
width: 50rpx;
height: 50rpx;
}
.title-x {
font-size: 32rpx;
color: #fff;

44
pages.json

@ -1,6 +1,5 @@
{
"pages": [
{
"pages": [{
"path": "pages/student/login/login",
"style": {
"navigationBarTitleText": "",
@ -65,7 +64,7 @@
}
},
{
"path" : "pages/student/index/physical_examination",
"path": "pages/student/index/physical_examination",
"style": {
"navigationBarTitleText": "体测数据",
"navigationStyle": "default",
@ -74,7 +73,7 @@
}
},
{
"path" : "pages/student/timetable/info",
"path": "pages/student/timetable/info",
"style": {
"navigationBarTitleText": "课表详情",
"navigationStyle": "default",
@ -83,7 +82,7 @@
}
},
{
"path" : "pages/student/timetable/list",
"path": "pages/student/timetable/list",
"style": {
"navigationBarTitleText": "场馆",
"navigationStyle": "default",
@ -92,7 +91,7 @@
}
},
{
"path" : "pages/student/my/set_up",
"path": "pages/student/my/set_up",
"style": {
"navigationBarTitleText": "设置",
"navigationStyle": "default",
@ -101,7 +100,7 @@
}
},
{
"path" : "pages/student/my/update_pass",
"path": "pages/student/my/update_pass",
"style": {
"navigationBarTitleText": "修改密码",
"navigationStyle": "default",
@ -110,7 +109,7 @@
}
},
{
"path" : "pages/student/my/lesson_consumption",
"path": "pages/student/my/lesson_consumption",
"style": {
"navigationBarTitleText": "课时消耗",
"navigationStyle": "default",
@ -119,7 +118,7 @@
}
},
{
"path" : "pages/student/my/my_members",
"path": "pages/student/my/my_members",
"style": {
"navigationBarTitleText": "我的成员",
"navigationStyle": "default",
@ -128,7 +127,7 @@
}
},
{
"path" : "pages/student/my/personal_data",
"path": "pages/student/my/personal_data",
"style": {
"navigationBarTitleText": "个人资料",
"navigationStyle": "default",
@ -137,7 +136,7 @@
}
},
{
"path" : "pages/student/index/job_list",
"path": "pages/student/index/job_list",
"style": {
"navigationBarTitleText": "作业列表",
"navigationStyle": "default",
@ -147,11 +146,18 @@
},
{
"path": "pages/market/home/index",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "white"
}
},
{
"path" : "pages/common/privacy_agreement",
"path": "pages/common/privacy_agreement",
"style": {
"navigationBarTitleText": "隐私协议",
"navigationStyle": "default",
@ -160,7 +166,7 @@
}
},
{
"path" : "pages/common/my_message",
"path": "pages/common/my_message",
"style": {
"navigationBarTitleText": "我的消息",
"navigationStyle": "default",
@ -169,7 +175,7 @@
}
},
{
"path" : "pages/common/im_chat_info",
"path": "pages/common/im_chat_info",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "default",
@ -178,7 +184,7 @@
}
},
{
"path" : "pages/common/sys_msg_list",
"path": "pages/common/sys_msg_list",
"style": {
"navigationBarTitleText": "系统消息",
"navigationStyle": "default",
@ -187,7 +193,7 @@
}
},
{
"path" : "pages/common/article_info",
"path": "pages/common/article_info",
"style": {
"navigationBarTitleText": "文章详情",
"navigationStyle": "default",
@ -196,7 +202,7 @@
}
},
{
"path" : "pages/common/feedback",
"path": "pages/common/feedback",
"style": {
"navigationBarTitleText": "意见反馈",
"navigationStyle": "default",
@ -205,7 +211,7 @@
}
},
{
"path" : "pages/common/contract_list",
"path": "pages/common/contract_list",
"style": {
"navigationBarTitleText": "订单列表",
"navigationStyle": "default",

150
pages/market/clue/edit_clues.vue

@ -1079,157 +1079,7 @@
},
//
async validatorForm(data) {
console.log('tijiao', data)
//
//
if (!data.source_channel.length) {
uni.showToast({
title: '请选择来源渠道',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if (!data.source) {
uni.showToast({
title: '请选择来源',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if (!data.name) {
uni.showToast({
title: '学生姓名必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if (!data.age) {
uni.showToast({
title: '年龄必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if (!data.gender) {
uni.showToast({
title: '性别必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if (!data.phone_number) {
uni.showToast({
title: '电话必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if (!data.demand) {
uni.showToast({
title: '需求必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if (!data.decision_maker) {
uni.showToast({
title: '决策人必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if (!data.initial_intent) {
uni.showToast({
title: '客户初步意向度必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if (!data.status) {
uni.showToast({
title: '客户状态必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//##### #####
//
if (!data.purchasing_power) {
uni.showToast({
title: '购买力必填',
icon: 'none'
})
this.nextStep('1')
return false
}
//
if (!data.cognitive_idea) {
uni.showToast({
title: '认知理念必填',
icon: 'none'
})
this.nextStep('1')
return false
}
//
if (!data.communication) {
uni.showToast({
title: '沟通备注必填',
icon: 'none'
})
this.nextStep('1')
return false
}
//访
if (!data.promised_visit_time) {
uni.showToast({
title: '承诺到访时间必填',
icon: 'none'
})
this.nextStep('1')
return false
}
//
if (!data.distance) {
uni.showToast({
title: '距离必填',
icon: 'none'
})
this.nextStep('1')
return false
}
//
if (!data.optional_class_time) {
uni.showToast({
title: '可选上课时间必填',
icon: 'none'
})
this.nextStep('1')
return false
}
return true
},
//

375
pages/market/home/index.vue

@ -0,0 +1,375 @@
<template>
<view class="assemble">
<view style="height: 20rpx;"></view>
<!-- 市场人员展示-->
<view class="div-style">
<view style="height: 38vh;">
<view style="display: flex;align-items: center;padding: 20rpx 0 0 20rpx;">
<view>
<image :src="$util.img('/uniapp_src/static/images/index/danlan.png')" class="drop-image">
</image>
</view>
<view class="title">本月业绩</view>
</view>
<view class="coach-message">
<view class="left1">
<view style="padding: 20rpx 0;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/huang.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">资源总数</view>
</view>
<view class="title-x1">{{infoData.month.new_total}}</view>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/lvs.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">已分配</view>
</view>
<view class="title-x1">{{infoData.month.new_total}}</view>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/shenlan.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">昨日新增</view>
</view>
<view class="title-x1">{{infoData.month.yesterday_new}}</view>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/lan.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">今日新增</view>
</view>
<view class="title-x1">{{infoData.month.today_new}}</view>
</view>
</view>
<!-- 统计图-->
<view class="right1">
<view style="text-align: center;">{{infoData.date_range}}</view>
<view class="statistics_box">
<view class="item">
<view class="box">
<view class="progress-bar"
:style="{ height: `${infoData.month.yesterday_new_rate}%`, background: '#f59a23' }">
</view>
<view class="ratio"
:style="{ color: infoData.month.yesterday_new_rate <= 0 ? '#333333' : '#000' }">
{{ infoData.month.yesterday_new_rate }}%
</view>
</view>
<view class="title">昨日</view>
</view>
<view class="item">
<view class="box">
<view class="progress-bar"
:style="{ height: `${infoData.month.assigned_sales_rate}%`, background: '#039f64' }">
</view>
<view class="ratio"
:style="{ color: infoData.month.assigned_sales_rate <= 0 ? '#333333' : '#000' }">
{{ infoData.month.assigned_sales_rate }}%
</view>
</view>
<view class="title">分配</view>
</view>
<view class="item">
<view class="box">
<view class="progress-bar"
:style="{ height: `${infoData.month.today_new_rate}%`, background: '#4066f2' }">
</view>
<view class="ratio"
:style="{ color: infoData.month.today_new_rate <= 0 ? '#333333' : '#000' }">
{{ infoData.month.today_new_rate }}%
</view>
</view>
<view class="title">今日</view>
</view>
</view>
</view>
</view>
</view>
<view style="width: 90%;background: #EFF3F8;height: 4rpx;margin: auto;"></view>
<view style="height: 38vh;">
<view style="display: flex;align-items: center;padding: 20rpx 0 0 20rpx;">
<view>
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')" class="drop-image"></image>
</view>
<view class="title">个人业绩</view>
</view>
<view class="coach-message">
<view class="this_month">
<view style="padding: 20rpx 0;display: flex;justify-content: space-between;">
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">今日新增资源</view>
</view>
<view class="title-x1">{{infoData.last_month.xzzy}}</view>
</view>
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">今日业绩收入</view>
</view>
<view class="title-x1">{{infoData.last_month.yjsr}}</view>
</view>
</view>
<view style="padding: 20rpx 0;display: flex;justify-content: space-between;">
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">历史关单数量</view>
</view>
<view class="title-x1">{{infoData.last_month.gdsl}}</view>
</view>
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">资源未分配数量</view>
</view>
<view class="title-x1">{{infoData.last_month.wfpsl}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<AQTabber />
</view>
</template>
<script>
import apiRoute from '@/api/apiRoute.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
AQTabber,
},
data() {
return {
infoData: {}, //
userInfo: {}, //
}
},
onShow() {
this.init()
},
methods: {
async init() {
await this.getUserInfo()
await this.getXsIndex()
},
//
async getUserInfo() {
let res = await apiRoute.getPersonnelInfo({})
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.userInfo = res.data
},
//
async getXsIndex() {
let role_key_arr = this.userInfo.role_key_arr.join(',')
let params = {
personnel_id: this.userInfo.id, //id
role_key_arr: role_key_arr, // key
}
let res = await apiRoute.xs_statisticsMarketHome(params)
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.infoData = res.data
console.log('统计', this.infoData)
},
}
}
</script>
<style lang="less" scoped>
//
.navbar_section {
border: 1px solid #fff;
display: flex;
justify-content: center;
align-items: center;
background: #fff;
.title {
padding: 40rpx 0rpx;
/* 小程序端样式 */
// #ifdef MP-WEIXIN
padding: 80rpx 0rpx;
// #endif
font-size: 30rpx;
color: #858585;
}
}
.assemble {
width: 100%;
height: 100vh;
background: #292929;
}
.div-style {
width: 92%;
height: 85vh;
background: #fff;
border-radius: 16rpx;
margin: auto;
}
.coach-message {
width: 92%;
margin: 10rpx auto;
display: flex;
align-items: center;
padding-top: 20rpx;
}
.drop-image {
width: 50rpx;
height: 50rpx;
}
.title {
font-size: 30rpx;
color: #7F7F7F;
padding-left: 20rpx;
}
.left1 {
width: 48%;
height: 95%;
margin: auto;
}
.right1 {
width: 48%;
height: 95%;
margin: auto;
.statistics_box {
margin: auto;
margin-top: 10rpx;
display: flex;
justify-content: space-between;
.item {
width: 90rpx;
display: flex;
flex-direction: column;
align-items: center;
.box {
width: 100%;
height: 328rpx;
border: 1px solid #ddd;
border-radius: 6rpx;
background: #f5f5f5;
position: relative;
.progress-bar {
width: 100%;
height: 0;
transition: height 0.3s ease;
position: absolute;
bottom: 0;
}
.ratio {
width: 100%;
position: absolute;
bottom: -0rpx;
font-size: 26rpx;
text-align: center;
}
}
.title {
margin-top: 5rpx;
padding: 0;
font-size: 26rpx;
color: #999999;
;
text-align: center;
}
}
}
}
.this_month {
width: 100%;
height: 95%;
margin: auto;
}
.drop-image-x {
width: 20rpx;
height: 20rpx;
}
.title-x {
font-size: 28rpx;
color: #7F7F7F;
padding-left: 20rpx;
}
.title-x1 {
font-size: 28rpx;
color: #333333;
padding-left: 60rpx;
}
</style>

580
pages/market/index/index.vue

@ -1,381 +1,124 @@
<template>
<view class="assemble">
<!--自定义导航栏-->
<view class="navbar_section">
<view class="title">首页</view>
</view>
<view style="height: 20rpx;"></view>
<!-- 市场人员展示-->
<view class="div-style" v-if="infoData.role_type == 'market_type'">
<view style="height: 38vh;">
<view style="display: flex;align-items: center;padding: 20rpx 0 0 20rpx;">
<view>
<image :src="$util.img('/uniapp_src/static/images/index/danlan.png')" class="drop-image">
</image>
</view>
<view class="title">本月业绩</view>
</view>
<view class="coach-message">
<view class="left1">
<view style="padding: 20rpx 0;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/huang.png')"
class="drop-image-x"></image>
<!-- 时间筛选 -->
<view class="filter-section">
<picker mode="date" fields="month" :value="currentDate" @change="onDateChange">
<view class="date-picker">
<text>{{currentDate}}</text>
<image class="drop-image" src="/static/images/drop.png" mode="aspectFit"></image>
</view>
<view class="title-x">资源总数</view>
</view>
<view class="title-x1">{{infoData.month.new_total}}</view>
</picker>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/lvs.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">已分配</view>
</view>
<view class="title-x1">{{infoData.month.new_total}}</view>
<!-- 本月提成卡片 -->
<view class="commission-card">
<view class="card-title">本月提成</view>
<view class="commission-amount">¥{{totalCommission}}</view>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/shenlan.png')"
class="drop-image-x"></image>
<!-- 续费体测记录 -->
<view class="record-card">
<view class="card-title">续费体测记录</view>
<view class="table">
<view class="table-header">
<view class="th">时间</view>
<view class="th">到期数</view>
<view class="th">续费数</view>
<view class="th">续费率</view>
<view class="th">提成</view>
</view>
<view class="title-x">昨日新增</view>
<view class="table-body">
<view class="tr" v-for="(item, index) in renewalRecords" :key="index">
<view class="td">{{item.time}}</view>
<view class="td">{{item.expireCount}}</view>
<view class="td">{{item.renewCount}}</view>
<view class="td">{{item.renewRate}}%</view>
<view class="td">¥{{item.commission}}</view>
</view>
<view class="title-x1">{{infoData.month.yesterday_new}}</view>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/lan.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">今日新增</view>
</view>
<view class="title-x1">{{infoData.month.today_new}}</view>
</view>
</view>
<!-- 统计图-->
<view class="right1">
<view style="text-align: center;">{{infoData.date_range}}</view>
<view class="statistics_box">
<view class="item">
<view class="box">
<view class="progress-bar"
:style="{ height: `${infoData.month.yesterday_new_rate}%`, background: '#f59a23' }">
</view>
<view class="ratio"
:style="{ color: infoData.month.yesterday_new_rate <= 0 ? '#333333' : '#000' }">
{{ infoData.month.yesterday_new_rate }}%</view>
</view>
<view class="title">昨日</view>
</view>
<view class="item">
<view class="box">
<view class="progress-bar"
:style="{ height: `${infoData.month.assigned_sales_rate}%`, background: '#039f64' }">
</view>
<view class="ratio"
:style="{ color: infoData.month.assigned_sales_rate <= 0 ? '#333333' : '#000' }">
{{ infoData.month.assigned_sales_rate }}%</view>
<!-- 新招课包 -->
<view class="record-card">
<view class="card-title">新招课包</view>
<view class="table">
<view class="table-header">
<view class="th">成交数</view>
<view class="th">提成</view>
<view class="th">合计</view>
</view>
<view class="title">分配</view>
<view class="table-body">
<view class="tr">
<view class="td">{{newPackageCount}}</view>
<view class="td">¥{{newPackageCommission}}</view>
<view class="td">¥{{newPackageTotal}}</view>
</view>
<view class="item">
<view class="box">
<view class="progress-bar"
:style="{ height: `${infoData.month.today_new_rate}%`, background: '#4066f2' }">
</view>
<view class="ratio"
:style="{ color: infoData.month.today_new_rate <= 0 ? '#333333' : '#000' }">
{{ infoData.month.today_new_rate }}%</view>
</view>
<view class="title">今日</view>
</view>
<!-- 私教课包 -->
<view class="record-card">
<view class="card-title">私教课包</view>
<view class="table">
<view class="table-header">
<view class="th">数量</view>
<view class="th">提成</view>
</view>
</view>
<view class="table-body">
<view class="tr">
<view class="td">{{privatePackageCount}}</view>
<view class="td">¥{{privatePackageCommission}}</view>
</view>
</view>
<view style="width: 90%;background: #EFF3F8;height: 4rpx;margin: auto;"></view>
<view style="height: 38vh;">
<view style="display: flex;align-items: center;padding: 20rpx 0 0 20rpx;">
<view>
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')" class="drop-image"></image>
</view>
<view class="title">个人业绩</view>
</view>
<view class="coach-message">
<view class="this_month">
<view style="padding: 20rpx 0;display: flex;justify-content: space-between;">
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">今日新增资源</view>
</view>
<view class="title-x1">{{infoData.last_month.xzzy}}</view>
</view>
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">今日业绩收入</view>
</view>
<view class="title-x1">{{infoData.last_month.yjsr}}</view>
</view>
</view>
<view style="padding: 20rpx 0;display: flex;justify-content: space-between;">
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">历史关单数量</view>
</view>
<view class="title-x1">{{infoData.last_month.gdsl}}</view>
</view>
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">资源未分配数量</view>
</view>
<view class="title-x1">{{infoData.last_month.wfpsl}}</view>
</view>
<!-- 时间卡 -->
<view class="record-card">
<view class="card-title">时间卡</view>
<view class="table">
<view class="table-header">
<view class="th">时间卡</view>
<view class="th">数量</view>
<view class="th">提成</view>
</view>
<view class="table-body">
<view class="tr">
<view class="td">{{timeCardCount}}</view>
<view class="td">{{timeCardAmount}}</view>
<view class="td">¥{{timeCardCommission}}</view>
</view>
</view>
</view>
</view>
<!-- 销售人员展示-->
<view class="div-style" v-if="infoData.role_type == 'sale_type'">
<view style="height: 38vh;">
<view style="display: flex;align-items: center;padding: 20rpx 0 0 20rpx;">
<view>
<image :src="$util.img('/uniapp_src/static/images/index/danlan.png')" class="drop-image">
</image>
</view>
<view class="title">本月业绩</view>
</view>
<view class="coach-message">
<view class="left1">
<view style="padding: 20rpx 0;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/huang.png')"
class="drop-image-x"></image>
<!-- 其他提成 -->
<view class="record-card">
<view class="card-title">其他提成</view>
<view class="table">
<view class="table-header">
<view class="th">项目</view>
<view class="th">金额</view>
</view>
<view class="title-x">已分配</view>
<view class="table-body">
<view class="tr" v-for="(item, index) in otherCommissions" :key="index">
<view class="td">{{item.project}}</view>
<view class="td">¥{{item.amount}}</view>
</view>
<view class="title-x1">{{infoData.month.assigned_clients}}</view>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/lvs.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">已沟通</view>
</view>
<view class="title-x1">{{infoData.month.contacted_clients}}</view>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/shenlan.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">未成交</view>
</view>
<view class="title-x1">{{infoData.month.unconverted_clients}}</view>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/lan.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">待续费</view>
</view>
<view class="title-x1">{{infoData.month.renewal_clients}}</view>
</view>
<view>
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/lan.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">已关单</view>
</view>
<view class="title-x1">{{infoData.month.closed_clients}}</view>
</view>
</view>
<!--统计图-->
<view class="right1">
<view style="text-align: center;">{{infoData.date}}</view>
<view class="statistics_box">
<!--未成交-->
<view class="item">
<view class="box">
<view class="progress-bar"
:style="{ height: `${infoData.month.unconverted_rate}%`, background: '#f59a23' }">
</view>
<view class="ratio"
:style="{ color: infoData.month.unconverted_rate <= 0 ? '#333333' : '#fff' }">
{{ infoData.month.unconverted_rate }}%</view>
</view>
<view class="title">未成交</view>
</view>
<!--待续费-->
<view class="item">
<view class="box">
<view class="progress-bar"
:style="{ height: `${infoData.month.renewal_rate}%`, background: '#039f64' }">
</view>
<view class="ratio"
:style="{ color: infoData.month.renewal_rate <= 0 ? '#333333' : '#fff' }">
{{ infoData.month.renewal_rate }}%</view>
</view>
<view class="title">待续费</view>
</view>
<!--已关单-->
<view class="item">
<view class="box">
<view class="progress-bar"
:style="{ height: `${infoData.month.closed_rate}%`, background: '#4066f2' }">
</view>
<view class="ratio"
:style="{ color: infoData.month.closed_rate <= 0 ? '#333333' : '#fff' }">
{{ infoData.month.closed_rate }}%</view>
</view>
<view class="title">已关单</view>
</view>
</view>
</view>
</view>
</view>
<view style="width: 90%;background: #EFF3F8;height: 4rpx;margin: auto;"></view>
<view style="height: 38vh;">
<view style="display: flex;align-items: center;padding: 20rpx 0 0 20rpx;">
<view>
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')" class="drop-image"></image>
</view>
<view class="title">上月业绩</view>
</view>
<view class="coach-message">
<view class="this_month">
<view style="padding: 20rpx 0;display: flex;justify-content: space-between;">
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">已分配</view>
</view>
<view class="title-x1">{{infoData.last_month.assigned_clients}}</view>
</view>
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">已沟通</view>
</view>
<view class="title-x1">{{infoData.last_month.contacted_clients}}</view>
</view>
</view>
<view style="padding: 20rpx 0;display: flex;justify-content: space-between;">
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">未成交</view>
</view>
<view class="title-x1">{{infoData.last_month.unconverted_clients}}</view>
</view>
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">待续费</view>
</view>
<view class="title-x1">{{infoData.last_month.renewal_clients}}</view>
</view>
</view>
<view style="padding: 20rpx 0;display: flex;justify-content: space-between;">
<view style="width: 48%;">
<view style="display: flex;align-items: center;">
<view style="padding: 12rpx;">
<image :src="$util.img('/uniapp_src/static/images/index/danlv.png')"
class="drop-image-x"></image>
</view>
<view class="title-x">已关单</view>
</view>
<view class="title-x1">{{infoData.last_month.closed_clients}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<AQTabber />
</view>
</template>
<script>
import apiRoute from '@/api/apiRoute.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
import apiRoute from '@/api/apiRoute.js'
export default {
components: {
@ -383,52 +126,60 @@
},
data() {
return {
infoData: {}, //
userInfo: {}, //
currentDate: this.formatDate(new Date()),
totalCommission: 0,
renewalRecords: [],
newPackageCount: 0,
newPackageCommission: 0,
newPackageTotal: 0,
privatePackageCount: 0,
privatePackageCommission: 0,
timeCardCount: 0,
timeCardAmount: 0,
timeCardCommission: 0,
otherCommissions: []
}
},
onShow() {
this.init()
this.getStatisticsData()
},
methods: {
async init() {
await this.getUserInfo()
await this.getXsIndex()
formatDate(date) {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
return `${year}-${month}`
},
//
async getUserInfo() {
let res = await apiRoute.getPersonnelInfo({})
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.userInfo = res.data
onDateChange(e) {
this.currentDate = e.detail.value
this.getStatisticsData()
},
//
async getXsIndex() {
let role_key_arr = this.userInfo.role_key_arr.join(',')
let params = {
personnel_id: this.userInfo.id, //id
role_key_arr: role_key_arr, // key
async getStatisticsData() {
try {
const res = await apiRoute.xs_statisticsMarketData({
date: this.currentDate
})
if (res && res.code === 1) {
const data = res.data
this.totalCommission = data.totalCommission || 0
this.renewalRecords = data.renewalRecords || []
this.newPackageCount = data.newPackageCount || 0
this.newPackageCommission = data.newPackageCommission || 0
this.newPackageTotal = data.newPackageTotal || 0
this.privatePackageCount = data.privatePackageCount || 0
this.privatePackageCommission = data.privatePackageCommission || 0
this.timeCardCount = data.timeCardCount || 0
this.timeCardAmount = data.timeCardAmount || 0
this.timeCardCommission = data.timeCardCommission || 0
this.otherCommissions = data.otherCommissions || []
}
let res = await apiRoute.xs_statisticsMarketHome(params)
if (res.code != 1) {
} catch (error) {
console.error('获取统计数据失败:', error)
uni.showToast({
title: res.msg,
title: '获取数据失败',
icon: 'none'
})
return
}
this.infoData = res.data
console.log('统计', this.infoData)
},
}
}
}
</script>
@ -457,8 +208,9 @@
.assemble {
width: 100%;
height: 100vh;
background: #292929;
min-height: 100vh;
background: #f5f5f5;
padding-bottom: 100rpx;
}
.div-style {
@ -570,4 +322,92 @@
color: #333333;
padding-left: 60rpx;
}
.filter-section {
padding: 20rpx 30rpx;
background: #fff;
margin-bottom: 20rpx;
.date-picker {
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #333;
.drop-image {
width: 30rpx;
height: 30rpx;
margin-left: 10rpx;
}
}
}
.commission-card {
background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
margin: 20rpx;
padding: 30rpx;
border-radius: 16rpx;
color: #fff;
.card-title {
font-size: 28rpx;
margin-bottom: 20rpx;
}
.commission-amount {
font-size: 48rpx;
font-weight: bold;
}
}
.record-card {
background: #fff;
margin: 20rpx;
padding: 20rpx;
border-radius: 16rpx;
.card-title {
font-size: 30rpx;
color: #333;
margin-bottom: 20rpx;
font-weight: bold;
}
.table {
width: 100%;
.table-header {
display: flex;
background: #f8f8f8;
padding: 20rpx 0;
.th {
flex: 1;
text-align: center;
font-size: 26rpx;
color: #666;
}
}
.table-body {
.tr {
display: flex;
padding: 20rpx 0;
border-bottom: 1px solid #eee;
&:last-child {
border-bottom: none;
}
.td {
flex: 1;
text-align: center;
font-size: 26rpx;
color: #333;
}
}
}
}
}
</style>

249
pages/student/login/login.vue

@ -7,42 +7,31 @@
<image :src="$util.img('/uniapp_src/static/images/login/login2.png')" class="overlay-image"></image>
</view>
<view style="width: 100%;font-size: 60rpx;color: #ccc;text-align: center;margin-top: 60rpx;">
运动课
运动识
</view>
</view>
<view :style="{'background-color':'#fff','width':'100%','height':'100vh' }">
<view style="width: 95%;height: 30rpx;"></view>
<view style="width: 95%;margin:30rpx auto;">
<fui-input borderTop placeholder="登录账号" v-model="user" @input="input"
<fui-input borderTop placeholder="登录账号" v-model="user"
backgroundColor="#f2f2f2"></fui-input>
</view>
<view style="width: 95%;margin: auto;">
<fui-input borderTop :padding="['20rpx','32rpx']" v-model="password1" placeholder="登录密码"
:password="password" @input="input" backgroundColor="#f2f2f2">
:password="password" backgroundColor="#f2f2f2">
<fui-icon :name="password?'invisible':'visible'" color="#B2B2B2" :size="50"
@click="change"></fui-icon>
</fui-input>
</view>
<view style="width: 95%;margin:30rpx auto;">
<fui-input
@click="picker_show_loginType=true"
v-model="loginType_str"
placeholder="请选择登录类型"
backgroundColor="#f2f2f2"
>
<fui-icon name="arrowdown" color="#B2B2B2" :size="50"
@click="change"></fui-icon>
<fui-input @click="picker_show_loginType=true" v-model="loginType_str" placeholder="请选择登录类型"
backgroundColor="#f2f2f2">
<fui-icon name="arrowdown" color="#B2B2B2" :size="50" @click="change"></fui-icon>
</fui-input>
<fui-picker
layer="1"
:linkage="true"
:options="loginType_Arr"
:show="picker_show_loginType"
@change="changePicker_loginType"
@cancel="picker_show_loginType=false"
></fui-picker>
<fui-picker layer="1" :linkage="true" :options="loginType_Arr" :show="picker_show_loginType"
@change="changePicker_loginType" @cancel="picker_show_loginType=false"></fui-picker>
</view>
<view style="width: 95%;margin:60rpx auto;">
@ -58,9 +47,9 @@
</template>
<script>
import apiRoute from '@/api/apiRoute.js';
import apiRoute from '@/api/apiRoute.js';
export default {
export default {
data() {
return {
inited: false, // init
@ -68,58 +57,56 @@ export default {
password: true,
user: '', //
password1: '', //
mini_wx_openid:'',//openid
mini_wx_openid: '', //openid
loginType:'',//|1=,2=,3=
loginType_str:'',//
loginType_Arr:[
{
loginType: '', //|1=,2=,3=
loginType_str: '', //
loginType_Arr: [{
value: '1',
text: '教师登陆'
text: '市场登陆'
},
{
value: '2',
text: '销售登陆'
text: '教师登陆'
},
{
value: '3',
text: '销售登陆'
},
{
value: '4',
text: '学员登陆'
}
],
picker_show_loginType:false,//
picker_show_loginType: false, //
path_arr:{
'1':'/pages/coach/home/index',//
'2':'/pages/market/index/index',//
'3':'/pages/student/index/index',//
path_arr: {
'1': '/pages/market/home/index', //
'2': '/pages/coach/home/index', //
'3': '/pages/market/index/index', //
'4': '/pages/student/index/index', //
},
}
},
onLoad(options) {
this.loginType = options.loginType ?? '2'//|1=,2=,3=
this.loginType = options.loginType ?? '1' //|1=,2=,3=4=
const selectedItem = this.loginType_Arr.find(item => item.value === String(this.loginType));
this.loginType_str = selectedItem ? selectedItem.text : '未知类型';
// uni.hideHomeButton()
// console.log(uni.getStorageSync('um_id'))
// onShow init
let res_codes = options.res_codes || ''//axios.jscode,401,
let res_codes = options.res_codes || '' //axios.jscode,401,
if (!this.inited && !res_codes) {
this.openViewHome()
this.inited = true
}
},
methods: {
async init(){
async init() {
//
//#ifdef MP-WEIXIN
await this.getMiNiWxOpenId()
//#endif
},
input(e) {
//console.log(e)
},
change() {
this.password = !this.password
},
@ -130,103 +117,80 @@ export default {
},
//
async login() {
try {
//
if (!this.user) {
uni.showToast({
title: '请输入用户名',
title: '请输入手机号',
icon: 'none'
})
return
});
return;
}
if (!this.password1) {
uni.showToast({
title: '请输入密码',
icon: 'none'
})
return
});
return;
}
if (!this.loginType) {
uni.showToast({
title: '请选择登陆类型',
title: '请选择登录类型',
icon: 'none'
})
return
});
return;
}
let item = {};
item['username'] = this.user
item['password'] = this.password1
let res
//|1=,2=,3=
if(this.loginType == 1){
//
let params = {
'phone': this.user,
'password': this.password1,
'login_type': 1,
'mini_wx_openid':this.mini_wx_openid,//openid
const params = {
phone: this.user,
password: this.password1,
login_type: this.loginType,
mini_wx_openid: this.mini_wx_openid //openid
};
console.log('登录参数:', params);
let res;
if (this.loginType != 4) {
//
res = await apiRoute.personnelLogin(params);
} else {
//
res = await apiRoute.xy_login(params);
}
res = await apiRoute.personnelLogin(params)
}else if(this.loginType == 2){
//
let params = {
'phone': this.user,
'password': this.password1,
'login_type': 2,
'mini_wx_openid':this.mini_wx_openid,//openid
console.log('登录响应:', res);
if (res && res.code === 1) { // 1
//
if (res.data && res.data.token) {
uni.setStorageSync("token", res.data.token);
//
if (res.data.user_type) {
uni.setStorageSync("userType", res.data.user_type);
}
res = await apiRoute.personnelLogin(params)
console.log(123123,res)
}else if (this.loginType == 3){
//
let params = {
'phone': this.user,
'password': this.password1,
'login_type': 2,
'mini_wx_openid':this.mini_wx_openid,//openid
//
if (res.data.expires_time) {
uni.setStorageSync("expires_time", res.data.expires_time);
}
res = await apiRoute.xy_login(params)
}
if(!res.code){
uni.showToast({
title: res.msg,
title:'登录成功',
icon: 'success'
});
} else {
uni.showToast({
title: res || '登录失败',
icon: 'none'
})
return
});
}
uni.setStorageSync('expires_time', res.data.expires_time);//token
uni.setStorageSync('token', res.data.token);
let userType = res.data.user_type
console.log('用户类型', userType)
uni.setStorageSync('userType', userType);
uni.setStorageSync('tabBerIndex', 0);
let url_path = ''
switch (String(userType)) {
case '1': //
url_path = '/pages/coach/home/index'
break;
case '2': //
url_path = '/pages/market/index/index'
break;
case '3': //
url_path = '/pages/student/index/index'
break;
default:
} catch (error) {
console.error('登录失败:', error);
uni.showToast({
title: '用户类型错误',
title: error || '登录失败,请重试',
icon: 'none'
})
return;
});
}
this.$navigateTo({
url: url_path
})
},
//openid
@ -239,17 +203,20 @@ export default {
this.fetchOpenId(code); //
},
fail: () => {
uni.showToast({ title: '微信登录失败', icon: 'none' });
uni.showToast({
title: '微信登录失败',
icon: 'none'
});
}
});
},
// code openid
async fetchOpenId(code){
async fetchOpenId(code) {
let params = {
code: code,
}
let res = await apiRoute.common_getMiniWxOpenId(params)
if (res.code != 1){
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
@ -260,25 +227,25 @@ export default {
},
//
changePicker_loginType(e){
changePicker_loginType(e) {
console.log('监听选择', e)
this.loginType = e.value
this.loginType_str = e.text
this.picker_show_loginType = false
//@todo 线
if(this.loginType == 1){
if (this.loginType == 1) {
//
this.user= '15374889135' //
this.password1= '15374889135' //
}else if(this.loginType == 2){
this.user = '15374889135' //
this.password1 = '15374889135' //
} else if (this.loginType == 2) {
//
this.user= '15148228108' //
this.password1= '123123' //
}else{
this.user = '15148228108' //
this.password1 = '123123' //
} else {
//
this.user= '13042409890' //
this.password1= '13042409890' //
this.user = '13042409890' //
this.password1 = '13042409890' //
}
},
@ -288,7 +255,7 @@ export default {
const userType = String(uni.getStorageSync('userType') || '');
const token = uni.getStorageSync('token') || ''
if(!userType || !token){
if (!userType || !token) {
return
}
@ -319,42 +286,42 @@ export default {
// onShow
},
}
}
}
</script>
<style lang="less" scoped>
page {
page {
font-weight: normal;
}
}
.fui-section__title {
.fui-section__title {
margin-left: 32rpx;
}
}
.fui-left__icon {
.fui-left__icon {
padding-right: 24rpx;
}
}
.image-container {
.image-container {
margin: auto;
position: relative;
width: 150rpx;
/* 设置与第一张图片相同的宽度 */
height: 150rpx;
/* 设置与第一张图片相同的高度 */
}
}
.base-image {
.base-image {
width: 100%;
height: 100%;
}
}
.overlay-image {
.overlay-image {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100rpx;
height: 100rpx;
}
}
</style>
Loading…
Cancel
Save