体检 与 培训验证token
This commit is contained in:
parent
a03f5c08b4
commit
c4dec49f28
67
main.js
67
main.js
|
|
@ -7,11 +7,11 @@ import Vue from 'vue'
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
// Vue.prototype.$api = $api
|
// Vue.prototype.$api = $api
|
||||||
Vue.prototype.$store = store
|
Vue.prototype.$store = store
|
||||||
Vue.prototype.$adpid = "1111111111"
|
Vue.prototype.$adpid = '1111111111'
|
||||||
Vue.prototype.$backgroundAudioData = {
|
Vue.prototype.$backgroundAudioData = {
|
||||||
playing: false,
|
playing: false,
|
||||||
playTime: 0,
|
playTime: 0,
|
||||||
formatedPlayTime: '00:00:00'
|
formatedPlayTime: '00:00:00'
|
||||||
}
|
}
|
||||||
|
|
||||||
import uView from '@/uni_modules/uview-ui'
|
import uView from '@/uni_modules/uview-ui'
|
||||||
|
|
@ -24,29 +24,56 @@ Vue.use(uView)
|
||||||
// const vconsole = require('vconsole')
|
// const vconsole = require('vconsole')
|
||||||
// Vue.prototype.$vconsole = new vconsole() // 使用vconsole
|
// Vue.prototype.$vconsole = new vconsole() // 使用vconsole
|
||||||
|
|
||||||
|
Vue.prototype.$verificationToken = function () {
|
||||||
|
console.log('验证Token-->')
|
||||||
|
uni.request({
|
||||||
|
url: 'http://192.168.0.14:19999/exam-bmw/users/current',
|
||||||
|
method: 'get',
|
||||||
|
header: {
|
||||||
|
Authorization: uni.getStorageSync('access_token')
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
console.log('🚀 ~ res:', res)
|
||||||
|
let data = res.data
|
||||||
|
console.log('🚀 ~ res.data:', data)
|
||||||
|
if (data === '' || data === undefined) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '已在其他设备登录,请重新登录',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log('🚀 ~ err:', err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
App.mpType = 'app'
|
App.mpType = 'app'
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
store,
|
store,
|
||||||
...App
|
...App
|
||||||
})
|
})
|
||||||
app.$mount()
|
app.$mount()
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef VUE3
|
// #ifdef VUE3
|
||||||
import {
|
import { createSSRApp } from 'vue'
|
||||||
createSSRApp
|
import { data } from 'uview-ui/libs/mixin/mixin';
|
||||||
} from 'vue'
|
|
||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App)
|
const app = createSSRApp(App)
|
||||||
app.use(store)
|
app.use(store)
|
||||||
app.config.globalProperties.$adpid = "1111111111"
|
app.config.globalProperties.$adpid = '1111111111'
|
||||||
app.config.globalProperties.$backgroundAudioData = {
|
app.config.globalProperties.$backgroundAudioData = {
|
||||||
playing: false,
|
playing: false,
|
||||||
playTime: 0,
|
playTime: 0,
|
||||||
formatedPlayTime: '00:00:00'
|
formatedPlayTime: '00:00:00'
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
app
|
app
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|
|
||||||
14
pages.json
14
pages.json
|
|
@ -261,6 +261,20 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "体检预约单"
|
"navigationBarTitleText" : "体检预约单"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/HealthExaminationApp/index/userInfo",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "个人信息"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/HealthExaminationApp/index/message",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "消息通知"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- <u-navbar title="首页" placeholder @leftClick="leftClick" /> -->
|
|
||||||
<div v-if="isShow">
|
<div v-if="isShow">
|
||||||
<div class="top-swiper">
|
<div class="top-swiper">
|
||||||
<div class="swiper">
|
<div class="swiper">
|
||||||
|
|
@ -11,17 +10,55 @@
|
||||||
<div class="title">体检服务</div>
|
<div class="title">体检服务</div>
|
||||||
|
|
||||||
<div class="opt-list">
|
<div class="opt-list">
|
||||||
<div class="opt-item" v-for="(item, index) in optList" :key="index" @click="handlePage(item.url)">
|
<div class="opt-item" v-if="personnelType != 0" @click="handlePage(optList[0].url)">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<u--image :showLoading="true" :src="item.src" width="70px" height="60px" />
|
<u--image :showLoading="true" :src="optList[0].src" width="70px" height="60px" />
|
||||||
<div class="name">{{ item.name }}</div>
|
<div class="name">{{ optList[0].name }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="opt-item" v-if="status != 0" @click="handlePage(optList[1].url)">
|
||||||
|
<div class="item">
|
||||||
|
<u--image :showLoading="true" :src="optList[1].src" width="70px" height="60px" />
|
||||||
|
<div class="name">{{ optList[1].name }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="opt-item" @click="handlePage(optList[2].url)">
|
||||||
|
<div class="item">
|
||||||
|
<u--image :showLoading="true" :src="optList[2].src" width="70px" height="60px" />
|
||||||
|
<div class="name">{{ optList[2].name }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="opt-item" @click="handlePage(optList[3].url)">
|
||||||
|
<div class="item">
|
||||||
|
<u--image :showLoading="true" :src="optList[3].src" width="70px" height="60px" />
|
||||||
|
<div class="name">{{ optList[3].name }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="top-swiper">个人中心</div>
|
<div class="top-swiper avatar">
|
||||||
|
<u--image :showLoading="true" :src="avatar" shape="circle" width="120px" height="120px" />
|
||||||
|
<div style="margin-top: 20px; font-size: 18px">{{ userInfo.phyName }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="user">
|
||||||
|
<div class="item" @click="handleUserInfo">
|
||||||
|
<u-icon name="/static/images-tijian/userInfo.png" size="16"></u-icon>
|
||||||
|
<div>个人信息</div>
|
||||||
|
</div>
|
||||||
|
<u-line color="#F2F2F2"></u-line>
|
||||||
|
<div class="item" @click="handleMsg">
|
||||||
|
<u-icon name="/static/images-tijian/message.png" size="16"></u-icon>
|
||||||
|
<div>消息通知</div>
|
||||||
|
</div>
|
||||||
|
<u-line color="#F2F2F2"></u-line>
|
||||||
|
<div class="item" @click="handleLogout">
|
||||||
|
<u-icon name="/static/images-tijian/logout.png" size="16"></u-icon>
|
||||||
|
<div>退出登录</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 底部导航 -->
|
<!-- 底部导航 -->
|
||||||
|
|
@ -49,12 +86,17 @@ export default {
|
||||||
'/static/images-tijian/swiper-2.png',
|
'/static/images-tijian/swiper-2.png',
|
||||||
'/static/images-tijian/swiper-3.png'
|
'/static/images-tijian/swiper-3.png'
|
||||||
],
|
],
|
||||||
|
personnelType: '',
|
||||||
|
status: '',
|
||||||
optList: [
|
optList: [
|
||||||
{ name: '体检预约', src: '/static/images-tijian/preOrder.png', url: 'appointment' },
|
{ name: '体检预约', src: '/static/images-tijian/preOrder.png', url: 'appointment' },
|
||||||
{ name: '体检报告', src: '/static/images-tijian/report.png', url: 'report' },
|
{ name: '职业预约', src: '/static/images-tijian/careerExam.png', url: 'jobAppointment' },
|
||||||
{ name: '我的预约', src: '/static/images-tijian/myPreOrder.png', url: 'myAppointment' },
|
{ name: '我的预约', src: '/static/images-tijian/myPreOrder.png', url: 'myAppointment' },
|
||||||
{ name: '职业预约', src: '/static/images-tijian/careerExam.png', url: 'jobAppointment' }
|
{ name: '体检报告', src: '/static/images-tijian/report.png', url: 'report' }
|
||||||
]
|
],
|
||||||
|
// 头像
|
||||||
|
avatar:
|
||||||
|
'https://img.zcool.cn/community/0104c958b69c23a801219c77ba5da2.png?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -86,7 +128,7 @@ export default {
|
||||||
url: `/pages/HealthExaminationApp/${url}/${url}?params=${JSON.stringify(this.userInfo)}`
|
url: `/pages/HealthExaminationApp/${url}/${url}?params=${JSON.stringify(this.userInfo)}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//
|
// 获取状态
|
||||||
getStatus() {
|
getStatus() {
|
||||||
const params = {
|
const params = {
|
||||||
token: this.token,
|
token: this.token,
|
||||||
|
|
@ -103,13 +145,13 @@ export default {
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log('🚀 ~ getStatus ~ res:', res)
|
console.log('🚀 ~ getStatus ~ res:', res)
|
||||||
// if (res.data.code === 200) {
|
res = res.data
|
||||||
// if (res.data.data.status === 1) {
|
if (res.res === 1) {
|
||||||
// this.isShow = true
|
this.personnelType = res.obj.personnelType || 0
|
||||||
// } else {
|
this.status = res.obj.status
|
||||||
// this.isShow = false
|
console.log('🚀 ~ getStatus ~ this.personnelType:', this.personnelType)
|
||||||
// }
|
console.log('🚀 ~ getStatus ~ this.status:', this.status)
|
||||||
// }
|
}
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
console.log('🚀 ~ getStatus ~ err:', err)
|
console.log('🚀 ~ getStatus ~ err:', err)
|
||||||
|
|
@ -141,6 +183,42 @@ export default {
|
||||||
console.log('🚀 ~ getapplogininfo ~ err:', err)
|
console.log('🚀 ~ getapplogininfo ~ err:', err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 个人信息
|
||||||
|
handleUserInfo() {
|
||||||
|
const params = {
|
||||||
|
name: this.userInfo.phyName,
|
||||||
|
idcard: this.userInfo.idcard,
|
||||||
|
age: this.userInfo.age,
|
||||||
|
sex: this.userInfo.sex == '0' ? '男' : '女',
|
||||||
|
phone: this.userInfo.telepNumber,
|
||||||
|
departName: this.userInfo.departName
|
||||||
|
}
|
||||||
|
console.log('🚀 ~ handleUserInfo ~ params:', params)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/HealthExaminationApp/index/userInfo?params=' + JSON.stringify(params)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 消息通知
|
||||||
|
handleMsg() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/HealthExaminationApp/index/message'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 退出登录
|
||||||
|
handleLogout() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '确定退出登录吗?',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.removeStorageSync('tjToken')
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -157,6 +235,12 @@ export default {
|
||||||
margin-top: 130px;
|
margin-top: 130px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.avatar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 20px 10px;
|
margin: 20px 10px;
|
||||||
|
|
@ -189,4 +273,22 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user {
|
||||||
|
margin: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 10px 0;
|
||||||
|
div {
|
||||||
|
margin-left: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<div class="cont-list" v-for="(item, index) in msgList" :key="index">
|
||||||
|
<div class="list-type">{{ item.ifCareerAppointText }}</div>
|
||||||
|
<div class="center-cont">
|
||||||
|
<div class="title">
|
||||||
|
{{ item.mealName }}
|
||||||
|
<span class="title-tip">{{ item.ifCancelText }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="item.ifCancelText == '已取消'">您好,您于{{ item.cancelTime }}取消了位于{{ item.hospitalName }}的体检,特此通知。</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
msgList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getMessageList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取消息列表
|
||||||
|
getMessageList() {
|
||||||
|
uni.request({
|
||||||
|
url: config.tjBaseUrl + '/app/getmessage',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
token: uni.getStorageSync('tjToken')
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
|
token: this.token
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
res = res.data
|
||||||
|
console.log('🚀 ~ getMessageList ~ res:', res)
|
||||||
|
if (res.res === 1) {
|
||||||
|
this.msgList = res.obj
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
console.log('🚀 ~ getMessageList ~ err:', err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
.cont-list {
|
||||||
|
margin: 10px 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.list-type {
|
||||||
|
padding: 10px;
|
||||||
|
width: 20px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
background: #9bc5c6;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 5px 0 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center-cont {
|
||||||
|
padding: 0 10px;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: red;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
|
||||||
|
.title-tip {
|
||||||
|
padding: 3px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #fff;
|
||||||
|
margin-left: 10px;
|
||||||
|
background: #ff7026;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<div class="item">
|
||||||
|
<div>姓名</div>
|
||||||
|
<div>{{ userInfo.name }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div>身份证号</div>
|
||||||
|
<div>{{ userInfo.idcard }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div>年龄</div>
|
||||||
|
<div>{{ userInfo.age }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div>性别</div>
|
||||||
|
<div>{{ userInfo.sex }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div>联系方式</div>
|
||||||
|
<div>{{ userInfo.phone }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div>部门</div>
|
||||||
|
<div>{{ userInfo.departName }}</div>
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userInfo: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(opt) {
|
||||||
|
opt = JSON.parse(opt.params)
|
||||||
|
console.log('🚀 ~ onLoad ~ opt:', opt)
|
||||||
|
this.userInfo = opt
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
margin: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
height: 40px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -85,6 +85,7 @@ export default {
|
||||||
// this.allList = this.list = res.data
|
// this.allList = this.list = res.data
|
||||||
// this.waitList = res.data.filter(item => item.status === 1)
|
// this.waitList = res.data.filter(item => item.status === 1)
|
||||||
// this.alreadyList = res.data.filter(item => item.status === 2)
|
// this.alreadyList = res.data.filter(item => item.status === 2)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/personalCenter/getStudentExamList',
|
url: config.baseUrl + '/exam-student/personalCenter/getStudentExamList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,6 @@ export default {
|
||||||
examTime: 0,
|
examTime: 0,
|
||||||
random1: 0,
|
random1: 0,
|
||||||
random2: 0,
|
random2: 0,
|
||||||
hasScanned: false,
|
|
||||||
// 答题时间
|
// 答题时间
|
||||||
answerTime: 0,
|
answerTime: 0,
|
||||||
currentIndex: 0,
|
currentIndex: 0,
|
||||||
|
|
@ -220,7 +219,7 @@ export default {
|
||||||
const params = {
|
const params = {
|
||||||
examId: this.examId
|
examId: this.examId
|
||||||
}
|
}
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentExam/getExamQuestionList',
|
url: config.baseUrl + '/exam-student/studentExam/getExamQuestionList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -239,8 +238,8 @@ export default {
|
||||||
this.time = Number(data.answerTime) * 60 * 1000
|
this.time = Number(data.answerTime) * 60 * 1000
|
||||||
console.log('🚀 ~ getList ~ this.time:', this.time)
|
console.log('🚀 ~ getList ~ this.time:', this.time)
|
||||||
console.log('🚀 ~ getList ~ this.questionList:', this.questionList)
|
console.log('🚀 ~ getList ~ this.questionList:', this.questionList)
|
||||||
this.random1 = (data.answerTime/3) * 60 + Math.ceil(Math.random() * 20) + 20
|
this.random1 = (data.answerTime / 3) * 60 + Math.ceil(Math.random() * 20) + 20
|
||||||
this.random2 = (data.answerTime/2) * 60 + Math.ceil(Math.random() * 30) + 30
|
this.random2 = (data.answerTime / 2) * 60 + Math.ceil(Math.random() * 30) + 30
|
||||||
console.log('🚀 ~ getList ~ this.random1:', this.random1, this.random2)
|
console.log('🚀 ~ getList ~ this.random1:', this.random1, this.random2)
|
||||||
if (this.questionList.length > 0) {
|
if (this.questionList.length > 0) {
|
||||||
this.questionList.forEach((item, index) => {
|
this.questionList.forEach((item, index) => {
|
||||||
|
|
@ -273,14 +272,17 @@ export default {
|
||||||
this.answerTime =
|
this.answerTime =
|
||||||
this.time - (time.days * 24 * 60 * 60 + time.hours * 60 * 60 + time.minutes * 60 + time.seconds) * 1000
|
this.time - (time.days * 24 * 60 * 60 + time.hours * 60 * 60 + time.minutes * 60 + time.seconds) * 1000
|
||||||
// console.log('🚀 ~ changeCountDown ~ this.answerTime:', this.answerTime)
|
// console.log('🚀 ~ changeCountDown ~ this.answerTime:', this.answerTime)
|
||||||
if (this.answerTime > this.random1 && this.answerTime < this.random2 && !this.hasScanned) {
|
console.log('🚀 ~ changeCountDown ~ this.answerTime:',this.time, this.answerTime / 1000, this.random1, this.random2)
|
||||||
|
console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random1)
|
||||||
|
console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random2)
|
||||||
|
if (this.answerTime / 1000 == this.random1) {
|
||||||
|
console.log('🚀 ~ changeCountDown ~ 人脸识别')
|
||||||
// this.openFaceScan() // Android 人脸识别
|
// this.openFaceScan() // Android 人脸识别
|
||||||
this.openPhotograph() // IOS 拍照识别
|
this.openPhotograph() // IOS 拍照识别
|
||||||
this.hasScanned = true
|
}
|
||||||
} else if (this.answerTime > this.random2 && this.hasScanned) {
|
if (this.answerTime / 1000 == this.random2) {
|
||||||
// this.openFaceScan()
|
// this.openFaceScan()
|
||||||
this.openPhotograph()
|
this.openPhotograph()
|
||||||
this.hasScanned = false
|
|
||||||
}
|
}
|
||||||
if (this.answerTime == this.time) {
|
if (this.answerTime == this.time) {
|
||||||
// 提示: 时间结束, 自动提交
|
// 提示: 时间结束, 自动提交
|
||||||
|
|
@ -343,6 +345,7 @@ export default {
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ handleSelectOption ~ params:', params)
|
console.log('🚀 ~ handleSelectOption ~ params:', params)
|
||||||
// insertQuestionAnswerById(params)
|
// insertQuestionAnswerById(params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentExam/insertQuestionAnswerById',
|
url: config.baseUrl + '/exam-student/studentExam/insertQuestionAnswerById',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -381,6 +384,7 @@ export default {
|
||||||
answerTime: Math.ceil(this.answerTime / 60000)
|
answerTime: Math.ceil(this.answerTime / 60000)
|
||||||
}
|
}
|
||||||
// const res = await commitExamByRecordId(params)
|
// const res = await commitExamByRecordId(params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentExam/commitExamByRecordId',
|
url: config.baseUrl + '/exam-student/studentExam/commitExamByRecordId',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -494,6 +498,7 @@ export default {
|
||||||
// 发送请求
|
// 发送请求
|
||||||
getFaceRecognition(params) {
|
getFaceRecognition(params) {
|
||||||
console.log('🚀 ~ getFaceRecognition ~ params:', params)
|
console.log('🚀 ~ getFaceRecognition ~ params:', params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/personalCenter/getFaceRecognition',
|
url: config.baseUrl + '/exam-student/personalCenter/getFaceRecognition',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
@ -538,6 +543,7 @@ export default {
|
||||||
// this.screenCount--
|
// this.screenCount--
|
||||||
},
|
},
|
||||||
updStudyDurationExamPractice(params) {
|
updStudyDurationExamPractice(params) {
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/student/updStudyDurationExamPractice',
|
url: config.baseUrl + '/exam-student/student/updStudyDurationExamPractice',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,7 @@ export default {
|
||||||
}
|
}
|
||||||
// const res = await getExamRankById(params)
|
// const res = await getExamRankById(params)
|
||||||
// this.rankList = res.data
|
// this.rankList = res.data
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentExam/getExamRankById',
|
url: config.baseUrl + '/exam-student/studentExam/getExamRankById',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ export default {
|
||||||
// const res = await getExamRecordById(params)
|
// const res = await getExamRecordById(params)
|
||||||
// console.log('🚀 ~ getList ~ res:', res)
|
// console.log('🚀 ~ getList ~ res:', res)
|
||||||
// this.list = res.data
|
// this.list = res.data
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentExam/getExamRecordById',
|
url: config.baseUrl + '/exam-student/studentExam/getExamRecordById',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|
|
||||||
|
|
@ -481,6 +481,7 @@ export default {
|
||||||
}
|
}
|
||||||
// const res = await getExamRecordAnswer(params)
|
// const res = await getExamRecordAnswer(params)
|
||||||
// this.questionList = res.data.examPaperData
|
// this.questionList = res.data.examPaperData
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentExam/getExamRecordAnswer',
|
url: config.baseUrl + '/exam-student/studentExam/getExamRecordAnswer',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -99,9 +99,13 @@ export default {
|
||||||
console.log('🚀 ~ mounted ~ mounted-index:')
|
console.log('🚀 ~ mounted ~ mounted-index:')
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getMsgList()
|
this.getMsgList()
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$verificationToken()
|
||||||
|
|
||||||
|
}, 1000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getList() {
|
getList() {
|
||||||
this.taskList = []
|
this.taskList = []
|
||||||
let params = {
|
let params = {
|
||||||
userId: this.userId,
|
userId: this.userId,
|
||||||
|
|
@ -111,6 +115,7 @@ export default {
|
||||||
// console.log('🚀 ~ getList ~ res:', res)
|
// console.log('🚀 ~ getList ~ res:', res)
|
||||||
// this.taskList = res.data
|
// this.taskList = res.data
|
||||||
console.log('🚀 ~ toggleSearch ~ params:', params)
|
console.log('🚀 ~ toggleSearch ~ params:', params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/personalCenter/getStudentStudyWorkList',
|
url: config.baseUrl + '/exam-student/personalCenter/getStudentStudyWorkList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -137,6 +142,7 @@ export default {
|
||||||
}
|
}
|
||||||
// const res = await getStudentStudyWorkList(params)
|
// const res = await getStudentStudyWorkList(params)
|
||||||
// this.taskList = res.data
|
// this.taskList = res.data
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/personalCenter/getStudentStudyWorkList',
|
url: config.baseUrl + '/exam-student/personalCenter/getStudentStudyWorkList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -154,6 +160,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 获取消息列表
|
// 获取消息列表
|
||||||
getMsgList() {
|
getMsgList() {
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.bmwUrl + '/studentUsers/getNoticeList',
|
url: config.bmwUrl + '/studentUsers/getNoticeList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取消息列表
|
// 获取消息列表
|
||||||
async getMsgList() {
|
getMsgList() {
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.bmwUrl + '/studentUsers/getNoticeList',
|
url: config.bmwUrl + '/studentUsers/getNoticeList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,7 @@ export default {
|
||||||
// this.showModal = false
|
// this.showModal = false
|
||||||
// uni.navigateBack()
|
// uni.navigateBack()
|
||||||
// })
|
// })
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/student/updStudyDuration',
|
url: config.baseUrl + '/exam-student/student/updStudyDuration',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,7 @@ export default {
|
||||||
: Math.ceil((Number(this.params.studyDuration) / Number(this.params.allStudyDuration)) * 100).toFixed(2)
|
: Math.ceil((Number(this.params.studyDuration) / Number(this.params.allStudyDuration)) * 100).toFixed(2)
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ updStudyDuration ~ params:', params)
|
console.log('🚀 ~ updStudyDuration ~ params:', params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/student/updStudyDuration',
|
url: config.baseUrl + '/exam-student/student/updStudyDuration',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getStudentStudyWorkList(params) {
|
getStudentStudyWorkList(params) {
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/personalCenter/getStudentStudyWorkList',
|
url: config.baseUrl + '/exam-student/personalCenter/getStudentStudyWorkList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -243,6 +243,7 @@ export default {
|
||||||
// 获取学习项目详情
|
// 获取学习项目详情
|
||||||
async getStudyWorkAll() {
|
async getStudyWorkAll() {
|
||||||
let params = { userId: uni.getStorageSync('userId'), id: this.projId, type: '1' }
|
let params = { userId: uni.getStorageSync('userId'), id: this.projId, type: '1' }
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: config.bmwUrl + '/studyWork/StudyWorkAll',
|
url: config.bmwUrl + '/studyWork/StudyWorkAll',
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ export default {
|
||||||
: Math.ceil((Number(this.params.studyDuration) / Number(this.params.allStudyDuration)) * 100).toFixed(2)
|
: Math.ceil((Number(this.params.studyDuration) / Number(this.params.allStudyDuration)) * 100).toFixed(2)
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ updStudyDuration ~ params:', params)
|
console.log('🚀 ~ updStudyDuration ~ params:', params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/student/updStudyDuration',
|
url: config.baseUrl + '/exam-student/student/updStudyDuration',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -294,6 +294,7 @@ export default {
|
||||||
isNew: this.isNew || '',
|
isNew: this.isNew || '',
|
||||||
isMiss: this.isError ? '1' : ''
|
isMiss: this.isError ? '1' : ''
|
||||||
}
|
}
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/getPracticeItData',
|
url: config.baseUrl + '/exam-student/studentPractice/getPracticeItData',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -330,6 +331,7 @@ export default {
|
||||||
// this.questionList.push(res.data)
|
// this.questionList.push(res.data)
|
||||||
// console.log('🚀 ~ getPracticeQuestion ~ res:', res)
|
// console.log('🚀 ~ getPracticeQuestion ~ res:', res)
|
||||||
// console.log('🚀 ~ getPracticeQuestion ~ this.questionList:', this.questionList)
|
// console.log('🚀 ~ getPracticeQuestion ~ this.questionList:', this.questionList)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/getPracticeQuestion',
|
url: config.baseUrl + '/exam-student/studentPractice/getPracticeQuestion',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -409,6 +411,7 @@ export default {
|
||||||
// const res = await changeQuestion(params)
|
// const res = await changeQuestion(params)
|
||||||
// this.questionList.push(res.data)
|
// this.questionList.push(res.data)
|
||||||
// console.log('🚀 ~ handleJump ~ res:', res)
|
// console.log('🚀 ~ handleJump ~ res:', res)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/changeQuestion',
|
url: config.baseUrl + '/exam-student/studentPractice/changeQuestion',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -470,6 +473,7 @@ export default {
|
||||||
// const res = await getPracticeQuestionList(params)
|
// const res = await getPracticeQuestionList(params)
|
||||||
// console.log('🚀 ~ getPracticeQuestionList ~ res:', res)
|
// console.log('🚀 ~ getPracticeQuestionList ~ res:', res)
|
||||||
// this.questionListSelect = res.data
|
// this.questionListSelect = res.data
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/getPracticeQuestionList',
|
url: config.baseUrl + '/exam-student/studentPractice/getPracticeQuestionList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -573,6 +577,7 @@ export default {
|
||||||
console.log('🚀 ~ handleOption ~ params:', params)
|
console.log('🚀 ~ handleOption ~ params:', params)
|
||||||
// 提交答案
|
// 提交答案
|
||||||
// insertPracticeAnswerById(params)
|
// insertPracticeAnswerById(params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/insertPracticeAnswerById',
|
url: config.baseUrl + '/exam-student/studentPractice/insertPracticeAnswerById',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -656,6 +661,7 @@ export default {
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ handleOk ~ params-多选:', params)
|
console.log('🚀 ~ handleOk ~ params-多选:', params)
|
||||||
// insertPracticeAnswerById(params)
|
// insertPracticeAnswerById(params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/insertPracticeAnswerById',
|
url: config.baseUrl + '/exam-student/studentPractice/insertPracticeAnswerById',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -728,6 +734,7 @@ export default {
|
||||||
practiceDuration: time
|
practiceDuration: time
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ handleClose ~ params:', params)
|
console.log('🚀 ~ handleClose ~ params:', params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/savePracticeDuration',
|
url: config.baseUrl + '/exam-student/studentPractice/savePracticeDuration',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -745,6 +752,7 @@ export default {
|
||||||
// updateRemoveRecordData({
|
// updateRemoveRecordData({
|
||||||
// practiceId: this.practiceId
|
// practiceId: this.practiceId
|
||||||
// })
|
// })
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/updateRemoveRecordData',
|
url: config.baseUrl + '/exam-student/studentPractice/updateRemoveRecordData',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -766,6 +774,7 @@ export default {
|
||||||
studyId: this.studyId
|
studyId: this.studyId
|
||||||
}
|
}
|
||||||
// updStudyDurationExamPractice(params)
|
// updStudyDurationExamPractice(params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/student/updStudyDurationExamPractice',
|
url: config.baseUrl + '/exam-student/student/updStudyDurationExamPractice',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -804,6 +813,7 @@ export default {
|
||||||
practiceId: this.practiceId,
|
practiceId: this.practiceId,
|
||||||
isMiss: this.isError ? 1 : ''
|
isMiss: this.isError ? 1 : ''
|
||||||
}
|
}
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/getPracticeQuestionList',
|
url: config.baseUrl + '/exam-student/studentPractice/getPracticeQuestionList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ export default {
|
||||||
// this.waitList = res.data.filter(item => item.alreadyNum === 0)
|
// this.waitList = res.data.filter(item => item.alreadyNum === 0)
|
||||||
// this.alreadyList = res.data.filter(item => item.alreadyNum > 0)
|
// this.alreadyList = res.data.filter(item => item.alreadyNum > 0)
|
||||||
// console.log('🚀 ~ getList ~ res:', res)
|
// console.log('🚀 ~ getList ~ res:', res)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/personalCenter/getStudentPracticeList',
|
url: config.baseUrl + '/exam-student/personalCenter/getStudentPracticeList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,7 @@ export default {
|
||||||
const params = {
|
const params = {
|
||||||
id: this.practiceId
|
id: this.practiceId
|
||||||
}
|
}
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/studentPractice/getPracticeQuestionRate',
|
url: config.baseUrl + '/exam-student/studentPractice/getPracticeQuestionRate',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@ export default {
|
||||||
img: this.url
|
img: this.url
|
||||||
}
|
}
|
||||||
params = JSON.stringify(params)
|
params = JSON.stringify(params)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/personalCenter/uploadFaceRecognition',
|
url: config.baseUrl + '/exam-student/personalCenter/uploadFaceRecognition',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 获取消息列表
|
// 获取消息列表
|
||||||
getMsgList() {
|
getMsgList() {
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.bmwUrl + '/users/getMsgInform',
|
url: config.bmwUrl + '/users/getMsgInform',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|
@ -85,6 +86,7 @@ export default {
|
||||||
markRead(item) {
|
markRead(item) {
|
||||||
const ids = [item.id]
|
const ids = [item.id]
|
||||||
console.log('🚀 ~ markRead ~ ids:', ids)
|
console.log('🚀 ~ markRead ~ ids:', ids)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.bmwUrl + '/users/markAsRead',
|
url: config.bmwUrl + '/users/markAsRead',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -102,6 +104,7 @@ export default {
|
||||||
deleteMsg(item) {
|
deleteMsg(item) {
|
||||||
const ids = [item.id]
|
const ids = [item.id]
|
||||||
console.log('🚀 ~ deleteMsg ~ ids:', ids)
|
console.log('🚀 ~ deleteMsg ~ ids:', ids)
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.bmwUrl + '/users/batchDelete',
|
url: config.bmwUrl + '/users/batchDelete',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ export default {
|
||||||
// 获取自学-学时-证书
|
// 获取自学-学时-证书
|
||||||
getLearnStats() {
|
getLearnStats() {
|
||||||
console.log('🚀 ~ getLearnStats ~ this.token:',uni.getStorageSync('access_token'))
|
console.log('🚀 ~ getLearnStats ~ this.token:',uni.getStorageSync('access_token'))
|
||||||
|
this.$verificationToken()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + '/exam-student/personalCenter/getStudyAndCer',
|
url: config.baseUrl + '/exam-student/personalCenter/getStudyAndCer',
|
||||||
// url: 'http://192.168.0.137:2900' + '/exam-student/personalCenter/getStudyAndCer',
|
// url: 'http://192.168.0.137:2900' + '/exam-student/personalCenter/getStudyAndCer',
|
||||||
|
|
|
||||||
|
|
@ -197,8 +197,10 @@
|
||||||
jwtToken: uni.getStorageSync('App-Token')
|
jwtToken: uni.getStorageSync('App-Token')
|
||||||
}
|
}
|
||||||
const tjparams = {
|
const tjparams = {
|
||||||
username: '17681010134', // 15912575796
|
// username: '17681010134', // 15912575796
|
||||||
password: 'YNsbd@123456'
|
// password: 'YNsbd@123456'
|
||||||
|
telephone: uni.getStorageSync('userPhone'),
|
||||||
|
jwtToken: uni.getStorageSync('App-Token')
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ gotoYy ~ tjparams:', tjparams)
|
console.log('🚀 ~ gotoYy ~ tjparams:', tjparams)
|
||||||
if (name == '考试培训移动端') {
|
if (name == '考试培训移动端') {
|
||||||
|
|
@ -252,9 +254,7 @@
|
||||||
console.log('🚀 ~ gotoYy ~ res:', res.data.token)
|
console.log('🚀 ~ gotoYy ~ res:', res.data.token)
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
uni.removeStorageSync('tjToken')
|
uni.removeStorageSync('tjToken')
|
||||||
uni.removeStorageSync('tjPhone')
|
|
||||||
uni.setStorageSync('tjToken', res.data.token)
|
uni.setStorageSync('tjToken', res.data.token)
|
||||||
uni.setStorageSync('tjPhone', tjparams.username)
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/HealthExaminationApp/index/index'
|
url: '/pages/HealthExaminationApp/index/index'
|
||||||
|
|
@ -262,7 +262,7 @@
|
||||||
}, 500)
|
}, 500)
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.data.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@
|
||||||
// globalConfig: getApp().globalData.config,
|
// globalConfig: getApp().globalData.config,
|
||||||
selectTab: 1,
|
selectTab: 1,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
phone: '18700000001', // 18955734761 18700000001
|
phone: '18700000002', // 18955734761 18700000001
|
||||||
pd: 'YNsbd@123456',//YNsbd@123456
|
pd: 'YNsbd@123456',//YNsbd@123456
|
||||||
},
|
},
|
||||||
loginForm0: {
|
loginForm0: {
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
|
|
@ -14,9 +14,6 @@ const request = config => {
|
||||||
config.header = config.header || {}
|
config.header = config.header || {}
|
||||||
if (getToken() && !isToken) {
|
if (getToken() && !isToken) {
|
||||||
config.header['Authorization'] = 'Bearer ' + getToken()
|
config.header['Authorization'] = 'Bearer ' + getToken()
|
||||||
} else {
|
|
||||||
// 没有token - 去登录
|
|
||||||
uni.reLaunch({ url: '/pages/login' })
|
|
||||||
}
|
}
|
||||||
// get请求映射params参数
|
// get请求映射params参数
|
||||||
if (config.params) {
|
if (config.params) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue