Browse Source

大改动,admin-api 换app-api

master
unknown 9 months ago
parent
commit
bf3024bd4e
  1. 6
      common/js/mixins.js
  2. 4
      components/user-info/user-info.vue
  3. 136
      config/api - 副本.js
  4. 128
      config/api.js
  5. 2
      config/site.config.js
  6. 2
      manifest.json
  7. 2
      pages.json
  8. 40
      pages/login/comp/privacyRadion.vue
  9. 263
      pages/login/login - 副本.vue
  10. 229
      pages/login/login.vue
  11. 43
      pages/login/privacyAgreement/privacyAgreement.vue
  12. 2
      pages/recordEntry/operate/mySchedule/comp/mySchedulePopup.vue
  13. 4
      pages/recordEntry/operate/mySchedule/comp/pickDateTimer/pickDateTimer.vue
  14. 2
      pages/recordEntry/operate/mySchedule/plan/plan.vue
  15. 15
      pages/recordEntry/operate/todayStudent/todayStudent.vue
  16. 4
      pages/tabbar/examSimulation/comp/simulation.vue
  17. 17
      pages/tabbar/mine/index.vue
  18. 2
      pages/tabbar/statistics/comp/examinCoach.vue
  19. 4
      pages/tabbar/statistics/comp/principal.vue
  20. 4
      pages/tabbar/statistics/comp/topUserInfo.vue
  21. 1
      pages/tabbar/statistics/index.vue
  22. 2
      pages/userCenter/myCar/myCar.vue
  23. 2
      pages/userCenter/myCar/notBound/notBound.vue
  24. 3
      pages/userCenter/personaInfo/personaInfo.vue
  25. 4
      pages/userCenter/scanCode/scanCode - 副本.vue
  26. 2
      store/modules/user.js

6
common/js/mixins.js

@ -7,9 +7,9 @@ export default {
identity: state=> state.user.identity, 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_userInfo: state=>state.user.vuex_userInfo,
vuex_deptId: state=>state.user.vuex_userInfo.user.deptId||'',
vuex_coachId: state=>state.user.vuex_userInfo.user.coachId||'',
vuex_schoolId: state=>state.user.vuex_userInfo.user.schoolId||'',
vuex_deptId: state=>state.user.vuex_userInfo.deptId||'',
vuex_coachId: state=>state.user.vuex_userInfo.coachId||'',
vuex_schoolId: state=>state.user.vuex_userInfo.schoolId||'',
vuex_loginInfo: state=>state.user.vuex_loginInfo, vuex_loginInfo: state=>state.user.vuex_loginInfo,
}), }),

4
components/user-info/user-info.vue

@ -5,7 +5,7 @@
</view> </view>
<view class="info" @click="$goPage('/pages/userCenter/personaInfo/personaInfo')"> <view class="info" @click="$goPage('/pages/userCenter/personaInfo/personaInfo')">
<view class="name_row"> <view class="name_row">
<view class="name oneRowText">{{ vuex_userInfo.user.nickname}}</view>
<view class="name oneRowText">{{ vuex_userInfo.name}}</view>
<view class="icon"> <view class="icon">
<image src="@/static/images/coach/ic_gengduo.png" mode=""></image> <image src="@/static/images/coach/ic_gengduo.png" mode=""></image>
</view> </view>
@ -14,7 +14,7 @@
<view class="icon"> <view class="icon">
<image src="@/static/images/index/ic_jiaxiao_cli.png" mode=""></image> <image src="@/static/images/index/ic_jiaxiao_cli.png" mode=""></image>
</view> </view>
<view class="schoolName oneRowText">{{ vuex_userInfo.user.schoolName}}</view>
<view class="schoolName oneRowText">{{ vuex_userInfo.schoolName}}</view>
<!-- <view class="tag" v-if="identity=='校长'">驾校校长</view> <!-- <view class="tag" v-if="identity=='校长'">驾校校长</view>
<view class="tag" v-else>合作教练</view> --> <view class="tag" v-else>合作教练</view> -->
</view> </view>

136
config/api - 副本.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

2
config/site.config.js

@ -4,6 +4,6 @@ module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理 H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.18:8318/',//非代理地址 WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.18:8318/',//非代理地址
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48082/', TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48082/',
httpPrefix: 'admin-api/',
httpPrefix: 'app-api/',
imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/' imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/'
}; };

2
manifest.json

@ -86,7 +86,7 @@
"disableHostCheck" : true, "disableHostCheck" : true,
"proxy" : { "proxy" : {
"/api" : { "/api" : {
"target" : "http://192.168.1.18:8318/",
"target" : "http://192.168.1.43:8318/",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : true, "secure" : true,
"pathRewrite" : { "pathRewrite" : {

2
pages.json

@ -116,7 +116,7 @@
"style": { "style": {
"navigationBarTitleText": "今日预约学员", "navigationBarTitleText": "今日预约学员",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark" "backgroundTextStyle": "dark"
} }
}, },

40
pages/login/comp/privacyRadion.vue

@ -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>

263
pages/login/login - 副本.vue

@ -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>

229
pages/login/login.vue

@ -1,185 +1,144 @@
<template> <template>
<view class="main">
<view class="u-back-top">
<view class="main" :style="{ background: `url(${imgUrl}) no-repeat`, backgroundSize: backgroundSize }">
<!-- <view class="u-back-top">
<view class="backBox"> <view class="backBox">
<u-icon name="arrow-left" color="#333" size="28"></u-icon> <u-icon name="arrow-left" color="#333" size="28"></u-icon>
</view> </view>
</view>
<view class="title">
<image :src="imgUrl" mode=""></image>
</view>
</view> -->
<u-navbar title=" " :bgColor="bgColor" :autoBack="true" ></u-navbar>
<view class="title">教练端短信验证码登录</view>
<view class="form"> <view class="form">
<view class="form-item" @click="tenantClick">
<mySelect :value="FormData.tenantName" placeholder="请选择服务地区"/>
</view>
<view class="form-item"> <view class="form-item">
<view class="prefix">
<view class="jia">+</view>
<view class="num">86</view>
<view class="" style="margin: 0 32rpx 0 12rpx;">
<u-icon name="arrow-down" color="#333" size="16" ></u-icon>
</view>
</view>
<view class="inputBox my"> <view class="inputBox my">
<u--input placeholder="请输入登录账号" border="none" clearable v-model="FormData.username"></u--input>
<u--input placeholder="请输入手机号" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="inputBox my"> <view class="inputBox my">
<u--input placeholder="请输入密码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.password"></u--input>
<u--input placeholder="请输入验证码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.code"></u--input>
</view> </view>
<view class="code" @click='goSms' :class="{active: isPhone&&!codeOn}">{{codeText}}</view>
</view> </view>
<view class="forgetTps"> <text @click="$u.toast('请联系管理员重置密码!')">忘记密码</text></view>
<view class="loginBtn" :class="{active: btnHighlight}" @click="submitFn"> </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 style="margin-top: 40rpx;">
<privacyRadion :isCheck="isCheck" @changeRadio="changeRadio"></privacyRadion>
</view>
<!-- <button @click="$goPage('/pages/userCenter/login/face')">进入人脸识别</button> -->
</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>
<u-action-sheet :actions="list" title="请选择您要登录的角色" :show="showRole" @select="selectClick" ></u-action-sheet>
</view> </view>
</template> </template>
<script> <script>
import { loginPwd, tenantPage } from '@/config/api.js'
import { imgUrl } from '@/config/site.config.js'
import { getLoginCode, loginSMS, coachSmsLogin } from '@/config/api.js'
import privacyRadion from './comp/privacyRadion.vue'
import { imgUrl } from '@/config/site.config'
export default { export default {
components: {privacyRadion},
data() { data() {
return { return {
isCheck: false,
imgUrl: imgUrl+'loginTopBg.png',
backgroundSize: '100% 360rpx',
isCheck:false,
codeText: '获取验证码', codeText: '获取验证码',
FormData: {
username: '',
password: '',
tenantName: ''
},
imgUrl: imgUrl+'loginTitle.png',
FormData: {},
codeOn: false, codeOn: false,
show: false,
columnsArea: [],
list: [],
title: '请选择您要登录的角色',
bgColor: 'transparent',
list: [{name: '实操教练', id: 3}, {name: '校长', id: 4}],
showRole: false, showRole: false,
roleObj: {}
} }
}, },
onLoad() {
this.tenantPageFn()
this.roleObj = this.$store.state.user.vuex_role
},
onPullDownRefresh() {
this.tenantPageFn()
onLoad(options) {
}, },
computed: { computed: {
isPhone() {
return uni.$u.test.mobile(this.FormData.phone)
},
btnHighlight() { btnHighlight() {
let { FormData } = this
return FormData.username.length>3&&FormData.password.length>3&&FormData.tenantName
return this.isPhone&&uni.$u.test.code(this.FormData.code, 4)
} }
}, },
methods: { 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)
changeRadio(val) {
this.isCheck = val
}, },
// //
async goSms() {
goSms() {
const { const {
FormData FormData
} = this } = this
if (!FormData.phone) return this.$u.toast('请输入手机号'); if (!FormData.phone) return this.$u.toast('请输入手机号');
if (!this.isPhone) return this.$u.toast('手机号格式有误'); if (!this.isPhone) return this.$u.toast('手机号格式有误');
if (this.codeOn) return if (this.codeOn) return
const data = await getLoginCode({
codeType: 1,
phone: FormData.phone,
this.codeOn = true;
getLoginCode({
scene: 11,
mobile: FormData.phone,
}).then(()=>{
var time = 60;
this.codeText = time + "秒后重新发送"
var timer = setInterval(() => {
time--;
this.codeText = time + "秒后重新发送"
if (time == 0) {
clearInterval(timer);
this.codeText = "获取验证码";
this.codeOn = false;
}
}, 1000);
}).catch(()=>{
this.codeOn = false;
}) })
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() { async submitFn() {
// return
if(!this.btnHighlight) return if(!this.btnHighlight) return
const {data: res} = await loginPwd(this.FormData)
this.$store.commit('update_vuex_loginInfo', res)
// this.chooseIdentity('')
// return
if(!this.isCheck) return this.$u.toast('请勾选产品协议与隐私政策');
let obj = {
mobile: this.FormData.phone,
code: this.FormData.code
}
const res = await coachSmsLogin(obj)
this.$store.commit('update_vuex_loginInfo',res.data)
await this.$store.dispatch('getUserInfo') 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
if(res.userType==5) {
uni.switchTab({
url: '/pages/tabbar/statistics/index'
})
}else { }else {
this.chooseIdentity(this.list[0].name)
this.showRole = true
} }
console.log(this.list)
},
selectClick(item) {
this.showRole = false
this.$store.commit('upDateIdentity', item.name)
uni.switchTab({
url: '/pages/tabbar/statistics/index'
})
// alert(item.name)
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
// background: url('http://192.168.1.20:81/zhili/image/20230922/f5e2cfaf05f441c1b9f897e7dc284f1d.png') no-repeat;
// background: url('../../../static/images/userCenter/loginTopBg.png') no-repeat;
// background-size: 100% 360rpx; // background-size: 100% 360rpx;
.u-back-top { .u-back-top {
padding: 32rpx 0 0 0; padding: 32rpx 0 0 0;
@ -189,9 +148,11 @@
} }
.title { .title {
width: 658rpx;
height: 94rpx;
margin: 100rpx auto 100rpx auto;
font-size: 48rpx;
color: #333;
padding: 202rpx 0 80rpx 0;
text-align: center;
font-weight: 600;
} }
.form { .form {
@ -224,12 +185,7 @@
} }
} }
} }
.forgetTps {
font-size: 28rpx;
color: $themC;
margin-top: -20rpx;
text-align: right;
}
.loginBtn { .loginBtn {
width: 100%; width: 100%;
height: 112rpx; height: 112rpx;
@ -246,18 +202,7 @@
} }
} }
.radioWrap {
display: flex;
align-items: center;
margin-top: 40rpx;
.privacyText {
font-size: 24rpx;
color: #888E94;
text {
color: $themC;
}
}
}
} }
} }
</style> </style>

43
pages/login/privacyAgreement/privacyAgreement.vue

@ -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>

2
pages/recordEntry/operate/mySchedule/comp/mySchedulePopup.vue

@ -119,7 +119,7 @@
let obj = { let obj = {
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
schoolId: this.vuex_userInfo.user.schoolId
schoolId: this.vuex_userInfo.schoolId
} }
const {data: res} = await trainingSiteList(obj) const {data: res} = await trainingSiteList(obj)
this.siteColumns = [ res ] this.siteColumns = [ res ]

4
pages/recordEntry/operate/mySchedule/comp/pickDateTimer/pickDateTimer.vue

@ -166,8 +166,8 @@
}, },
// //
async scheduleClassGetFn() { async scheduleClassGetFn() {
let id = this.vuex_userInfo.user.id
let coachId = this.vuex_userInfo.user.coachId
let id = this.vuex_userInfo.id
let coachId = this.vuex_userInfo.coachId
let deptId = this.vuex_deptId let deptId = this.vuex_deptId
const {data: res} = await scheduleClassGet({id, coachId, classDate: this.chooseDay, deptId}) const {data: res} = await scheduleClassGet({id, coachId, classDate: this.chooseDay, deptId})

2
pages/recordEntry/operate/mySchedule/plan/plan.vue

@ -209,7 +209,7 @@
let obj = { let obj = {
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
schoolId: this.vuex_userInfo.user.schoolId
schoolId: this.vuex_userInfo.schoolId
} }
const {data: res} = await trainingSiteList(obj) const {data: res} = await trainingSiteList(obj)
this.siteColumns = [ res ] this.siteColumns = [ res ]

15
pages/recordEntry/operate/todayStudent/todayStudent.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="pageBgImg"> <view class="pageBgImg">
<topNavbar title="今日上课学员"></topNavbar>
<topNavbar title="上课学员"></topNavbar>
<view class="con"> <view class="con">
<view class="card" v-for="(item,index) in list" :key="index"> <view class="card" v-for="(item,index) in list" :key="index">
<appointItem :item="item"/> <appointItem :item="item"/>
@ -11,6 +11,7 @@
<script> <script>
import appointItem from './comp/appointItem-operate' import appointItem from './comp/appointItem-operate'
import { signStudentList, changeStudent } from '@/config/api.js'
export default { export default {
components: { components: {
appointItem appointItem
@ -60,6 +61,18 @@
} }
] ]
} }
},
onLoad() {
this.signStudentListFn()
},
onPullDownRefresh() {
this.signStudentListFn()
},
methods: {
async signStudentListFn() {
const {data: res} = await signStudentList()
console.log(res)
}
} }
} }
</script> </script>

4
pages/tabbar/examSimulation/comp/simulation.vue

@ -103,8 +103,8 @@
} }
}, },
created() { created() {
this.params.coachId = this.vuex_userInfo.user.coachId
// this.params.deptId = this.vuex_userInfo.user.deptId
this.params.coachId = this.vuex_userInfo.coachId
// this.params.deptId = this.vuex_userInfo.deptId
// this.examSimulationPagesFn() // this.examSimulationPagesFn()
this.initList() this.initList()
}, },

17
pages/tabbar/mine/index.vue

@ -3,7 +3,7 @@
<view class="status_bar"></view> <view class="status_bar"></view>
<view class="" style="height: 88rpx;"></view> <view class="" style="height: 88rpx;"></view>
<view class="card"> <view class="card">
<view class="cut_row" @click.stop="showRole=true" v-if="list.length>1">
<view class="cut_row" @click.stop="showRole=true" v-if="vuex_loginInfo.userType==5">
<view class="flex-b"> <view class="flex-b">
<view class="cut_icon"> <view class="cut_icon">
<image src="@/static/images/userCenter/cut.png" mode=""></image> <image src="@/static/images/userCenter/cut.png" mode=""></image>
@ -39,14 +39,13 @@
data() { data() {
return { return {
tabData: [], tabData: [],
list: [],
list: [{name: '实操教练', id: 3}, {name: '校长', id: 4}],
showRole: false showRole: false
} }
}, },
onLoad() { onLoad() {
// this.$store.dispatch('refreshToken') // this.$store.dispatch('refreshToken')
this.initMenu() this.initMenu()
this.roleListFn()
}, },
onShow() { onShow() {
uni.hideTabBar(); uni.hideTabBar();
@ -104,18 +103,6 @@
}) })
}, },
roleListFn() {
this.list = []
if(this.role.length<=1) return
let roleObj = this.$store.state.user.vuex_role
this.role.forEach((item)=>{
let obj = {
name: roleObj[item]
}
this.list.push(obj)
})
},
getIpAddress() { getIpAddress() {
// 使APIIPipinfo.io // 使APIIPipinfo.io

2
pages/tabbar/statistics/comp/examinCoach.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="content"> <view class="content">
<view class="userInfo"> <view class="userInfo">
<view class="tit">Hi,{{ vuex_userInfo.user.nickname }}</view>
<view class="tit">Hi,{{ vuex_userInfo.name }}</view>
<view class="flex userRow"> <view class="flex userRow">
<view class="schoolIcon"> <view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image> <image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>

4
pages/tabbar/statistics/comp/principal.vue

@ -1,12 +1,12 @@
<template> <template>
<view class="content"> <view class="content">
<view class="userInfo"> <view class="userInfo">
<view class="tit">Hi,{{ vuex_userInfo.user.nickname }}</view>
<view class="tit">Hi,{{ vuex_userInfo.name }}</view>
<view class="flex userRow"> <view class="flex userRow">
<view class="schoolIcon"> <view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image> <image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view> </view>
<view class="schoolName oneRowText">{{ vuex_userInfo.user.schoolName}}</view>
<view class="schoolName oneRowText">{{ vuex_userInfo.schoolName}}</view>
<view class="tag">{{ identity }}</view> <view class="tag">{{ identity }}</view>
</view> </view>
</view> </view>

4
pages/tabbar/statistics/comp/topUserInfo.vue

@ -1,11 +1,11 @@
<template> <template>
<view class="userInfo"> <view class="userInfo">
<view class="tit">Hi,{{vuex_userInfo.user.nickname}}</view>
<view class="tit">Hi,{{vuex_userInfo.name}}</view>
<view class="flex userRow"> <view class="flex userRow">
<view class="schoolIcon"> <view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image> <image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view> </view>
<view class="schoolName oneRowText">{{ vuex_userInfo.user.schoolName}}</view>
<view class="schoolName oneRowText">{{ vuex_userInfo.schoolName}}</view>
<view class="tag">{{identity}}</view> <view class="tag">{{identity}}</view>
</view> </view>
</view> </view>

1
pages/tabbar/statistics/index.vue

@ -3,6 +3,7 @@
<!-- <examinCoach v-if="identity=='考场模拟教练'"/> --> <!-- <examinCoach v-if="identity=='考场模拟教练'"/> -->
<operateCoach v-if="identity=='实操教练'"/> <operateCoach v-if="identity=='实操教练'"/>
<principal v-if="identity=='校长'||identity=='驾校财务'"/> <principal v-if="identity=='校长'||identity=='驾校财务'"/>
<UserTab name ='统计'></UserTab>
</view> </view>
</template> </template>

2
pages/userCenter/myCar/myCar.vue

@ -102,7 +102,7 @@
let obj = { let obj = {
"carId": item.id, "carId": item.id,
"coachId": this.vuex_coachId, "coachId": this.vuex_coachId,
"coachName": this.vuex_userInfo.user.nickname
"coachName": this.vuex_userInfo.name
} }
const res = await coachUnbinding(obj) const res = await coachUnbinding(obj)
if(res.code==0) { if(res.code==0) {

2
pages/userCenter/myCar/notBound/notBound.vue

@ -73,7 +73,7 @@
let obj = { let obj = {
"carId": item.id, "carId": item.id,
"coachId": this.vuex_coachId, "coachId": this.vuex_coachId,
"coachName": this.vuex_userInfo.user.nickname
"coachName": this.vuex_userInfo.name
} }
const res = await coachBinding(obj) const res = await coachBinding(obj)
if(res.code==0) { if(res.code==0) {

3
pages/userCenter/personaInfo/personaInfo.vue

@ -5,7 +5,7 @@
<view class="card"> <view class="card">
<view class="row"> <view class="row">
<view class="lab">手机号</view> <view class="lab">手机号</view>
<view class="val"> {{ hideMiddleDigits(vuex_userInfo.user.phone) }} </view>
<view class="val"> {{ hideMiddleDigits(vuex_userInfo.phone) }} </view>
</view> </view>
</view> </view>
@ -51,6 +51,7 @@
methods: { methods: {
hideMiddleDigits(phoneNumber) { hideMiddleDigits(phoneNumber) {
if(!phoneNumber) return
// //
if (phoneNumber.length === 11) { if (phoneNumber.length === 11) {
// //

4
pages/userCenter/scanCode/scanCode - 副本.vue

@ -48,12 +48,12 @@
}, },
methods: { methods: {
refresh() { refresh() {
let {coachId, nickname, schoolId, tenantId, schoolName} = this.vuex_userInfo.user
let {coachId, name, schoolId, tenantId, schoolName} = this.vuex_userInfo
// //
qr.data = JSON.stringify({ qr.data = JSON.stringify({
coachId, coachId,
schoolId, schoolId,
nickname: encodeURIComponent(nickname),
nickname: encodeURIComponent(name),
timer: Date.now(), timer: Date.now(),
schoolName: encodeURIComponent(schoolName), schoolName: encodeURIComponent(schoolName),
}) })

2
store/modules/user.js

@ -62,7 +62,7 @@ const user = {
async getUserInfo({commit}) { async getUserInfo({commit}) {
const http = uni.$u.http const http = uni.$u.http
let config = { custom: { auth: false }, header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'} } let config = { custom: { auth: false }, header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'} }
const res = await http.get('system/auth/get-permission-info-app',config)
const res = await http.post('business/coach/getCoachInfo',config)
commit('update_vuex_userInfo',res.data) commit('update_vuex_userInfo',res.data)
}, },
// 刷新token // 刷新token

Loading…
Cancel
Save