unknown
9 months ago
26 changed files with 614 additions and 311 deletions
-
6common/js/mixins.js
-
4components/user-info/user-info.vue
-
136config/api - 副本.js
-
128config/api.js
-
2config/site.config.js
-
2manifest.json
-
2pages.json
-
40pages/login/comp/privacyRadion.vue
-
263pages/login/login - 副本.vue
-
207pages/login/login.vue
-
43pages/login/privacyAgreement/privacyAgreement.vue
-
2pages/recordEntry/operate/mySchedule/comp/mySchedulePopup.vue
-
4pages/recordEntry/operate/mySchedule/comp/pickDateTimer/pickDateTimer.vue
-
2pages/recordEntry/operate/mySchedule/plan/plan.vue
-
15pages/recordEntry/operate/todayStudent/todayStudent.vue
-
4pages/tabbar/examSimulation/comp/simulation.vue
-
17pages/tabbar/mine/index.vue
-
2pages/tabbar/statistics/comp/examinCoach.vue
-
4pages/tabbar/statistics/comp/principal.vue
-
4pages/tabbar/statistics/comp/topUserInfo.vue
-
1pages/tabbar/statistics/index.vue
-
2pages/userCenter/myCar/myCar.vue
-
2pages/userCenter/myCar/notBound/notBound.vue
-
3pages/userCenter/personaInfo/personaInfo.vue
-
4pages/userCenter/scanCode/scanCode - 副本.vue
-
2store/modules/user.js
@ -0,0 +1,136 @@ |
|||||
|
|
||||
|
|
||||
|
var http = uni.$u.http |
||||
|
|
||||
|
// 隐私政策
|
||||
|
export const getAgreement = (params, config = {}) => http.post('/util/manage/getAgreement.do', params, config) |
||||
|
// 验证码登录
|
||||
|
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: {'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, custom: { noToken: true }}) |
||||
|
// 实操预约记录分页
|
||||
|
export const bookingMasterPage = (params) => http.get('business/booking/master/page', {params: params, header: {'contentType': 3} }) |
||||
|
// 实操预约详情
|
||||
|
export const bookingMasterDetail = (params) => http.get('business/booking/master/get', {params: params, header: {'contentType': 3} }) |
||||
|
// 获得我的排课详情
|
||||
|
export const scheduleClassGetById = (params) => http.get('business/booking/schedule-class/getById', {params: params, }) |
||||
|
// 获得我的排课详情预约记录
|
||||
|
export const getBookingDetailByClassId = (params) => http.get('business/booking/master/getBookingDetailByClassId', {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 scheduleClassCreateByTime = (data) => http.post('business/booking/schedule-class/createByTime', 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.put('business/booking/schedule-template/update', data ,) |
||||
|
// 获取排课模版
|
||||
|
export const scheduleTemplateGet = (params) => http.get('business/booking/schedule-template/get', {params} ,) |
||||
|
// 训练场地
|
||||
|
export const trainingSiteList = (params) => http.get('business/training-site/list', {params} ,) |
||||
|
// 获得考场模拟预约记录分页
|
||||
|
export const examSimulationPages = (params) => http.get('business/exam-simulation-record/page', {params} ,) |
||||
|
// 已报名学员
|
||||
|
export const studentRecordPage = (params) => http.get('business/student-record/page', {params} ,) |
||||
|
// 驾校班型
|
||||
|
export const schoolClass = (params) => http.get('business/school-class/getSchoolByClass', {params} ,) |
||||
|
// 获得学员档案记录
|
||||
|
export const studentDetail = (params) => http.get('business/student-record/getStudent', {params} ,) |
||||
|
// 获得教练车信息分页
|
||||
|
export const carPage = (params) => http.get('business/car/page', {params} ,) |
||||
|
// 驾校场地分页
|
||||
|
export const sitePage = (params) => http.get('business/training-site/page', {params} ,) |
||||
|
// 驾校教练分页
|
||||
|
export const coachPage = (params) => http.get('business/coach/page', {params}) |
||||
|
// 驾校教练详情
|
||||
|
export const coachDetail = (params) => http.get('business/coach/get', {params}) |
||||
|
// 教练评价列表分页
|
||||
|
export const coachCommentPage = (params) => http.get('app/coach-comment/pageCoachComment', {params}) |
||||
|
// 获得教练员评价条数
|
||||
|
export const pageCoachCommentTotal = (params) => http.get('app/coach-comment/pageCoachCommentTotal', {params}) |
||||
|
// 获得驾校评价
|
||||
|
export const schoolCommentPage = (params) => http.get('business/school-comment/page', {params}) |
||||
|
// 获取驾校评价条数
|
||||
|
export const commentPagetotal = (params) => http.get('business/school-comment/pagetotal', { params }) |
||||
|
// 修改用户密码
|
||||
|
export const updatePassword = (data) => http.put('system/user/profile/update-password', data) |
||||
|
// 获得考场分页
|
||||
|
export const simulationPage = (params) => http.get('business/booking/simulation-record/page', {params}) |
||||
|
// 获得考场列分页
|
||||
|
export const businessSitePage = (params) => http.get('business/site/page', {params}) |
||||
|
// 教练绑定教练车
|
||||
|
export const coachBinding = (data) => http.post('business/coach/binding', data) |
||||
|
// 取消绑定教练车
|
||||
|
export const coachUnbinding = (data) => http.put('business/coach/unbinding', data) |
||||
|
// 获得考场车辆管理分页
|
||||
|
export const siteCarPage = (params) => http.get('business/site-car/page', {params}) |
||||
|
// 我的学员(累计学员、今日新增学员、等)
|
||||
|
export const studentOwner = (params) => http.get('business/student-record/owner', {params}) |
||||
|
// 获得学员档案记录列表
|
||||
|
export const studentList = (params) => http.get('business/student-record/page', {params}) |
||||
|
// 绑定教练
|
||||
|
export const studentBindCoach = (data) => http.post('business/student-record/bindCoach', data) |
||||
|
// 教练二维码生成
|
||||
|
export const getQR = (data) => http.post('business/coach/sign/getQR', data) |
||||
|
// 获取学习中的学员
|
||||
|
export const signStudentList = (data) => http.post('business/coach/sign/studentList', data) |
||||
|
// 切换学员计时
|
||||
|
export const changeStudent = (data) => http.post('business/coach/sign/changeStudent', data) |
||||
|
|
||||
|
export const getLoginCode = (data) => http.post('member/auth/send-sms-code', data, { custom: { noToken: true, catch: true,}}) |
||||
|
// 驾校教练使用手机 + 验证码登录
|
||||
|
export const coachSmsLogin = (data) => http.post('member/auth/coach_sms-login', data, { custom: { noToken: true, catch: true,}}) |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
128
config/api.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,40 @@ |
|||||
|
<template> |
||||
|
<view class="radioWrap"> |
||||
|
<u-checkbox-group > |
||||
|
<u-checkbox :checked="isCheck" shape="circle" label="已阅读并同意" :labelSize="12" @change="changeRadio">已阅读并同意</u-checkbox> |
||||
|
</u-checkbox-group> |
||||
|
<view class="privacyText"> |
||||
|
<text @click="goPage(2)">《用户协议》</text>和 <text @click="goPage(1)">《隐私协议》</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
props: ['isCheck'], |
||||
|
methods: { |
||||
|
changeRadio(val) { |
||||
|
console.log(val) |
||||
|
this.$emit('changeRadio', val) |
||||
|
}, |
||||
|
async goPage(type) { |
||||
|
this.$goPage('/pages/userCenter/login/privacyAgreement/privacyAgreement?type='+ type) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.radioWrap { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
.privacyText { |
||||
|
font-size: 24rpx; |
||||
|
color: #888E94; |
||||
|
text { |
||||
|
color: $themC; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,263 @@ |
|||||
|
<template> |
||||
|
<view class="main"> |
||||
|
<view class="u-back-top"> |
||||
|
<view class="backBox"> |
||||
|
<u-icon name="arrow-left" color="#333" size="28"></u-icon> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="title"> |
||||
|
<image :src="imgUrl" mode=""></image> |
||||
|
</view> |
||||
|
<view class="form"> |
||||
|
<view class="form-item" @click="tenantClick"> |
||||
|
<mySelect :value="FormData.tenantName" placeholder="请选择服务地区"/> |
||||
|
</view> |
||||
|
<view class="form-item"> |
||||
|
<view class="inputBox my"> |
||||
|
<u--input placeholder="请输入登录账号" border="none" clearable v-model="FormData.username"></u--input> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="form-item"> |
||||
|
<view class="inputBox my"> |
||||
|
<u--input placeholder="请输入密码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.password"></u--input> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="forgetTps"> <text @click="$u.toast('请联系管理员重置密码!')">忘记密码</text></view> |
||||
|
<view class="loginBtn" :class="{active: btnHighlight}" @click="submitFn">登 录</view> |
||||
|
<!-- <view class="radioWrap"> |
||||
|
<u-checkbox-group > |
||||
|
<u-checkbox v-model="isCheck" shape="circle" label="已阅读并同意" :labelSize="12" ></u-checkbox> |
||||
|
</u-checkbox-group> |
||||
|
<view class="privacyText"> |
||||
|
<text>《用户协议》</text>和 <text>《隐私协议》</text> |
||||
|
</view> |
||||
|
</view> --> |
||||
|
</view> |
||||
|
<u-picker :show="show" :columns="columnsArea" keyName="name" @confirm="confirmArea" @cancel="show=false" @close="show=false"></u-picker> |
||||
|
<u-action-sheet :actions="list" :title="title" :show="showRole" @select="selectClick" ></u-action-sheet> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { loginPwd, tenantPage } from '@/config/api.js' |
||||
|
import { imgUrl } from '@/config/site.config.js' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
isCheck: false, |
||||
|
codeText: '获取验证码', |
||||
|
FormData: { |
||||
|
username: '', |
||||
|
password: '', |
||||
|
tenantName: '' |
||||
|
}, |
||||
|
imgUrl: imgUrl+'loginTitle.png', |
||||
|
codeOn: false, |
||||
|
show: false, |
||||
|
columnsArea: [], |
||||
|
list: [], |
||||
|
title: '请选择您要登录的角色', |
||||
|
showRole: false, |
||||
|
roleObj: {} |
||||
|
} |
||||
|
}, |
||||
|
onLoad() { |
||||
|
this.tenantPageFn() |
||||
|
this.roleObj = this.$store.state.user.vuex_role |
||||
|
}, |
||||
|
onPullDownRefresh() { |
||||
|
this.tenantPageFn() |
||||
|
}, |
||||
|
computed: { |
||||
|
|
||||
|
btnHighlight() { |
||||
|
let { FormData } = this |
||||
|
return FormData.username.length>3&&FormData.password.length>3&&FormData.tenantName |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
tenantClick() { |
||||
|
if(!this.columnsArea.length) return this.$u.toast('没有获得服务地区,请下拉刷新重新加载') |
||||
|
this.show = true |
||||
|
}, |
||||
|
selectClick(item) { |
||||
|
this.showRole = false |
||||
|
this.chooseIdentity(item.name) |
||||
|
// alert(item.name) |
||||
|
}, |
||||
|
chooseIdentity(name) { |
||||
|
let url = '/pages/tabbar/statistics/index' |
||||
|
this.$store.commit('upDateIdentity', name) |
||||
|
if(name=='实操教练') { |
||||
|
url = '/pages/tabbar/student/index' |
||||
|
}else if(name=='模拟器老师') { |
||||
|
url = '/pages/tabbar/examSimulation/index' |
||||
|
} |
||||
|
uni.reLaunch({ |
||||
|
url |
||||
|
}) |
||||
|
}, |
||||
|
confirmArea(val) { |
||||
|
let item = val.value[0] |
||||
|
this.FormData.tenantName =item.name |
||||
|
this.$store.commit('upDateTenantId', item.id) |
||||
|
this.show = false |
||||
|
}, |
||||
|
async tenantPageFn() { |
||||
|
let obj = { |
||||
|
pageNo: 1, |
||||
|
pageSize: 100, |
||||
|
status: 0 |
||||
|
} |
||||
|
const {data: res} = await tenantPage(obj) |
||||
|
this.columnsArea = [res.list] |
||||
|
console.log(res) |
||||
|
}, |
||||
|
// 是否选择协议 |
||||
|
groupChangeEnvnt(e) { |
||||
|
this.isCheck = e.value |
||||
|
console.log('是否选择协议', this.isCheck) |
||||
|
}, |
||||
|
// 发送短信验证码 |
||||
|
async goSms() { |
||||
|
const { |
||||
|
FormData |
||||
|
} = this |
||||
|
if (!FormData.phone) return this.$u.toast('请输入手机号'); |
||||
|
if (!this.isPhone) return this.$u.toast('手机号格式有误'); |
||||
|
if (this.codeOn) return |
||||
|
const data = await getLoginCode({ |
||||
|
codeType: 1, |
||||
|
phone: FormData.phone, |
||||
|
}) |
||||
|
console.log(data) |
||||
|
// 获取验证码 |
||||
|
var time = 60; |
||||
|
var timer = setInterval(() => { |
||||
|
time--; |
||||
|
this.codeText = time + "秒后重新发送" |
||||
|
this.codeOn = true; |
||||
|
if (time == 0) { |
||||
|
clearInterval(timer); |
||||
|
this.codeText = "获取验证码"; |
||||
|
this.codeOn = false; |
||||
|
} |
||||
|
}, 1000); |
||||
|
}, |
||||
|
|
||||
|
async submitFn() { |
||||
|
// return |
||||
|
if(!this.btnHighlight) return |
||||
|
const {data: res} = await loginPwd(this.FormData) |
||||
|
this.$store.commit('update_vuex_loginInfo', res) |
||||
|
// this.chooseIdentity('实操教练') |
||||
|
// return |
||||
|
await this.$store.dispatch('getUserInfo') |
||||
|
|
||||
|
console.log(this.role) |
||||
|
this.list = [] |
||||
|
this.role.forEach((item)=>{ |
||||
|
let obj = { |
||||
|
name: this.roleObj[item] |
||||
|
} |
||||
|
this.list.push(obj) |
||||
|
}) |
||||
|
if(this.list.length>1) { |
||||
|
this.showRole = true |
||||
|
}else { |
||||
|
this.chooseIdentity(this.list[0].name) |
||||
|
} |
||||
|
console.log(this.list) |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
.main { |
||||
|
width: 100%; |
||||
|
min-height: 100vh; |
||||
|
// background: url('http://192.168.1.20:81/zhili/image/20230922/f5e2cfaf05f441c1b9f897e7dc284f1d.png') no-repeat; |
||||
|
// background-size: 100% 360rpx; |
||||
|
.u-back-top { |
||||
|
padding: 32rpx 0 0 0; |
||||
|
.backBox { |
||||
|
padding: 24rpx; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.title { |
||||
|
width: 658rpx; |
||||
|
height: 94rpx; |
||||
|
margin: 100rpx auto 100rpx auto; |
||||
|
} |
||||
|
|
||||
|
.form { |
||||
|
padding: 0 46rpx; |
||||
|
.form-item { |
||||
|
height: 112rpx; |
||||
|
background: #F4F7FF; |
||||
|
border-radius: 16rpx; |
||||
|
width: 100%; |
||||
|
line-height: 112rpx; |
||||
|
display: flex; |
||||
|
margin-bottom: 40rpx; |
||||
|
padding: 0 40rpx; |
||||
|
.prefix { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
font-size: 32rpx; |
||||
|
color: #333; |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
|
||||
|
.inputBox { |
||||
|
flex: 1; |
||||
|
} |
||||
|
.code { |
||||
|
color: #BBBBBB; |
||||
|
margin-left: 30rpx; |
||||
|
&.active { |
||||
|
color: $themC |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.forgetTps { |
||||
|
font-size: 28rpx; |
||||
|
color: $themC; |
||||
|
margin-top: -20rpx; |
||||
|
text-align: right; |
||||
|
} |
||||
|
.loginBtn { |
||||
|
width: 100%; |
||||
|
height: 112rpx; |
||||
|
background: rgba(25,137,250,0.3); |
||||
|
border-radius: 16rpx; |
||||
|
text-align: center; |
||||
|
line-height: 112rpx; |
||||
|
font-size: 32rpx; |
||||
|
font-weight: 600; |
||||
|
color: #fff; |
||||
|
margin-top: 100rpx; |
||||
|
&.active { |
||||
|
background: rgba(25,137,250,1); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.radioWrap { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
margin-top: 40rpx; |
||||
|
.privacyText { |
||||
|
font-size: 24rpx; |
||||
|
color: #888E94; |
||||
|
text { |
||||
|
color: $themC; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,43 @@ |
|||||
|
<template> |
||||
|
<view class="main"> |
||||
|
<web-view :src="url"></web-view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { getAgreement } from '@/config/api.js' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
type: 1, |
||||
|
url: '' |
||||
|
} |
||||
|
}, |
||||
|
onLoad(options) { |
||||
|
this.type = options.type |
||||
|
if(this.type==1) { |
||||
|
uni.setNavigationBarTitle({ |
||||
|
title: '隐私政策' |
||||
|
}) |
||||
|
}else { |
||||
|
uni.setNavigationBarTitle({ |
||||
|
title: '用户使用协议' |
||||
|
}) |
||||
|
} |
||||
|
this.getAgreementFn() |
||||
|
}, |
||||
|
methods: { |
||||
|
async getAgreementFn() { |
||||
|
const {data: res} = await getAgreement() |
||||
|
if(this.type==1) { |
||||
|
this.url = res.privacyAgreementUrl |
||||
|
}else { |
||||
|
this.url = res.useAgreementUrl |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue