diff --git a/common/js/mixins.js b/common/js/mixins.js index c248b2d..83c942e 100644 --- a/common/js/mixins.js +++ b/common/js/mixins.js @@ -5,7 +5,11 @@ export default { computed: { ...mapState({ identity: state=> state.user.identity, - role: state=>state.user.vuex_userInfo.roles + role: state=>state.user.vuex_userInfo.roles, + vuex_userInfo: state=>state.user.vuex_userInfo, + vuex_deptId: state=>state.user.vuex_userInfo.user.deptId, + vuex_coachId: state=>state.user.vuex_userInfo.coachId || '1591015108974329858', + }), }, data() { diff --git a/config/api.js b/config/api.js index e02a20d..465eb98 100644 --- a/config/api.js +++ b/config/api.js @@ -7,13 +7,41 @@ export const getAgreement = (params, config = {}) => http.post('/util/manage/get // 验证码登录 export const loginPwd = (data) => http.post('system/auth/login', data, { custom: { noToken: true , 'Tenant-Id': data['Tenant-Id']}}) // 获取个人信息 -export const getUserInfo = (data) => http.post('member/user/get', {header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}}) +export const getUserInfo = (data) => http.post('member/user/get', {header: {'contentType': 1}}) // 退出登录 export const logOut = (data={}) => http.post('member/auth/logout', data, { custom: { noToken: true }}) // 驾校列表分页 export const schoolPage = (params) => http.get('business/school/page', {params: params}) // 获得租户分页 -export const tenantPage = (params) => http.get('system/tenant/pages', {params: params}) +export const tenantPage = (params) => http.get('system/tenant/pages', {params: params, custom: { noToken: true }}) +// 实操预约记录分页 +export const bookingMasterPage = (params) => http.get('business/booking/master/page', {params: params, }) +// 获得我的排课详情 +export const scheduleClassGetById = (params) => http.get('business/booking/schedule-class/getById', {params: params, }) +// 获得排课 +export const scheduleClassGet = (params) => http.get('business/booking/schedule-class/get', {params: params, }) +// 发布排课计划 +export const scheduleClassCreate = (data) => http.post('business/booking/schedule-class/create', data) +// 获取排课日期范围 +export const getClassDateLimit = (params) => http.get('business/booking/global-config/getClassDateLimit', {params} ,) +// 获取排课时间段范围 +export const getClassTimeLimt = (params) => http.get('business/booking/global-config/getClassTimeLimt', {params} ,) +// 创建排课模板 +export const getClassCreate = (data) => http.post('business/booking/schedule-template/create', data ,) +// 排课模板分页 +export const scheduleTemplatePage = (params) => http.get('business/booking/schedule-template/page', {params} ,) +// 更新排课模版 +export const scheduleTemplateUpdate = (data) => http.post('business/booking/schedule-template/update', data ,) +// 获取排课模版 +export const scheduleTemplateGet = (params) => http.get('business/booking/schedule-template/get', {params} ,) + + + + + + + + diff --git a/config/request.js b/config/request.js index 2c173f6..2d2e92c 100644 --- a/config/request.js +++ b/config/request.js @@ -3,7 +3,7 @@ import { H5_API, WX_API,httpPrefix } from './site.config.js' import { checkToken } from './utils' - +const ContentType = ['application/json;charset=utf-8', 'application/x-www-form-urlencoded','multipart/form-data', 'application/x-www-form-urlencoded; charset=UTF-8']; @@ -15,7 +15,6 @@ module.exports = (vm) => { /* config 为默认全局配置*/ config.baseURL = H5_API+ WX_API + prefix; /* 根域名 */ console.log(config) - // config.header['content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8' config.header['tenant-id'] = vm.$store.state.user.vuex_TenantId return config @@ -24,7 +23,10 @@ module.exports = (vm) => { // 请求拦截 uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作 console.log(config) - // config.header['tenant-id'] = config.custom['Tenant-id'] + let contentTypeIndex = config.header.contentType + if(contentTypeIndex) { + config.header['content-type'] = ContentType[contentTypeIndex] + } // 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{} config.data = config.data || {} // 根据custom参数中配置的是否需要token,添加对应的请求头 diff --git a/config/site.config.js b/config/site.config.js index 6098d6b..aec4aaf 100644 --- a/config/site.config.js +++ b/config/site.config.js @@ -1,8 +1,8 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM; // localIp = false module.exports = { - H5_API: VUE_APP_PLATFORM === 'h5' ? '/api/' : '',//h5代理 - WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/',//非代理地址 + H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理 + WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48080/',//非代理地址 TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/', httpPrefix: 'admin-api/', imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/' diff --git a/manifest.json b/manifest.json index 99cec3a..4cdbdbe 100644 --- a/manifest.json +++ b/manifest.json @@ -82,7 +82,7 @@ "disableHostCheck" : true, "proxy" : { "/api" : { - "target" : "http://192.168.1.26:48082/", + "target" : "http://192.168.1.39:48080/", "changeOrigin" : true, "secure" : true, "pathRewrite" : { diff --git a/pages.json b/pages.json index 591164e..089b68d 100644 --- a/pages.json +++ b/pages.json @@ -139,7 +139,7 @@ } }, { - "path": "operate/mySchedule/mouldEdit/mouldEdit", + "path": "operate/mySchedule/mouldEdit/mouldAdd", "style": { "navigationBarTitleText": "添加编辑模版", "navigationStyle": "custom", @@ -148,6 +148,15 @@ } }, { + "path": "operate/mySchedule/mouldEdit/mouldEdit", + "style": { + "navigationBarTitleText": "编辑编辑模版", + "navigationStyle": "custom", + "enablePullDownRefresh": false, + "backgroundTextStyle": "dark" + } + }, + { "path": "operate/mySchedule/detail/detail", "style": { "navigationBarTitleText": "我的排课详情", diff --git a/pages/login/login.vue b/pages/login/login.vue index e526471..c351ea9 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -10,7 +10,7 @@ - + @@ -59,8 +59,11 @@ title: '请选择您要登录的角色', showRole: false, roleObj: { - app_school_principal: '校长', - xinghuiSchoolManager: '实操教练' + schoolManager: '校长', + schoolFinance: '驾校财务', + coach: '实操教练', + examSiteCoach: '考场模拟教练', + bookingSimulationTeacher: '模拟器老师' } } }, @@ -105,13 +108,13 @@ // val = '模拟器老师' // } - if(name=='模拟器老师') { - this.$store.commit('upDateIdentity', val) - uni.reLaunch({ - url: '/pages/tabbar/examSimulation/index' - }) - return false - } + // if(name=='模拟器老师') { + // this.$store.commit('upDateIdentity', val) + // uni.reLaunch({ + // url: '/pages/tabbar/examSimulation/index' + // }) + // return false + // } this.$store.commit('upDateIdentity', name) uni.reLaunch({ url: '/pages/tabbar/statistics/index' @@ -166,8 +169,8 @@ }, async submitFn() { - this.chooseIdentity('考场模拟教练') - return + // this.chooseIdentity('考场模拟教练') + // return if(!this.btnHighlight) return const {data: res} = await loginPwd(this.FormData) this.$store.commit('update_vuex_loginInfo', res) diff --git a/pages/other/webView/webView.vue b/pages/other/webView/webView.vue index 61d9919..2b6fbf2 100644 --- a/pages/other/webView/webView.vue +++ b/pages/other/webView/webView.vue @@ -1,7 +1,7 @@ diff --git a/pages/recordEntry/operate/mySchedule/mould/mould.vue b/pages/recordEntry/operate/mySchedule/mould/mould.vue index 44f3f52..2d568d3 100644 --- a/pages/recordEntry/operate/mySchedule/mould/mould.vue +++ b/pages/recordEntry/operate/mySchedule/mould/mould.vue @@ -2,36 +2,55 @@ - + - 模板标题 - 管理 + {{item.templateName}} + 管理 时间段 最多人数 - - {{ item.time}} - {{ item.num }} + + {{ item2.startTime}} - {{item2.endTime}} + {{ item2.personCount }} + + + 新增模版 + + + \ No newline at end of file diff --git a/pages/recordEntry/operate/mySchedule/mouldEdit/mouldEdit.vue b/pages/recordEntry/operate/mySchedule/mouldEdit/mouldEdit.vue index f9c9ccd..fd7e1a2 100644 --- a/pages/recordEntry/operate/mySchedule/mouldEdit/mouldEdit.vue +++ b/pages/recordEntry/operate/mySchedule/mouldEdit/mouldEdit.vue @@ -1,90 +1,143 @@ diff --git a/pages/tabbar/operateTrain/index.vue b/pages/tabbar/operateTrain/index.vue index ee68cdc..6766f37 100644 --- a/pages/tabbar/operateTrain/index.vue +++ b/pages/tabbar/operateTrain/index.vue @@ -55,6 +55,7 @@