This commit is contained in:
parent
c4dec49f28
commit
6c6432e21c
|
|
@ -160,9 +160,10 @@ export default {
|
|||
methods: {
|
||||
// 获取医院列表 app/gethospital
|
||||
getHospitalList() {
|
||||
const cry = new Crypoto()
|
||||
const params = {
|
||||
token: this.token,
|
||||
idcard: this.idcard
|
||||
idcard: cry.encrypt(this.idcard)
|
||||
}
|
||||
console.log('🚀 ~ getHospitalList ~ params:', params)
|
||||
uni.request({
|
||||
|
|
@ -178,7 +179,6 @@ export default {
|
|||
console.log('🚀 ~ getHospitalList ~ res:', res)
|
||||
if (res.res == 1) {
|
||||
this.hospitalList = res.obj
|
||||
// this.hospitalInfo = res.obj[0]
|
||||
// this.columns 双层数组, 将医院列表push到columns中
|
||||
this.columns.push(this.hospitalList)
|
||||
console.log('🚀 ~ getHospitalList ~ this.hospitalList:', this.hospitalList)
|
||||
|
|
@ -191,9 +191,10 @@ export default {
|
|||
},
|
||||
// 获取检查类型
|
||||
getCheckType() {
|
||||
const cry = new Crypoto()
|
||||
const params = {
|
||||
token: this.token,
|
||||
idcard: this.idcard
|
||||
idcard: cry.encrypt(this.idcard)
|
||||
}
|
||||
console.log('🚀 ~ getCheckType ~ params:', params)
|
||||
uni.request({
|
||||
|
|
@ -329,11 +330,10 @@ export default {
|
|||
const params = {
|
||||
hospitalId: this.hospitalInfo.id,
|
||||
setMealId: this.setMealId,
|
||||
// checkId: '1',
|
||||
phyAppontTime: this.healthTime,
|
||||
setMealType: '2',
|
||||
combName: this.checkTypeContent,
|
||||
token: this.token
|
||||
// token: this.token
|
||||
}
|
||||
console.log('🚀 ~ handleSave ~ params:', params)
|
||||
console.log('🚀 ~ handleSave ~ params:', cry.encrypt(JSON.stringify(params)))
|
||||
|
|
@ -341,8 +341,8 @@ export default {
|
|||
uni.request({
|
||||
url: config.tjBaseUrl + '/app/phyappoint',
|
||||
method: 'post',
|
||||
// data: { encryptedData: params, token: this.token },
|
||||
data: params,
|
||||
data: { encryptedData: cry.encrypt(JSON.stringify(params)), token: this.token },
|
||||
// data: params,
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
token: this.token
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
|
||||
<script>
|
||||
import config from '@/config'
|
||||
import { decryptCBC } from '@/utils/aescbc'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -174,9 +175,13 @@ export default {
|
|||
},
|
||||
success: res => {
|
||||
res = res.data
|
||||
console.log('🚀 ~ getapplogininfo ~ res:', res)
|
||||
console.log('🚀 ~ getAppLoginInfo ~ res:', res)
|
||||
if (res.res === 1) {
|
||||
this.userInfo = res.obj[0]
|
||||
this.userInfo.phyName = decryptCBC(this.userInfo.phyName)
|
||||
this.userInfo.idcard = decryptCBC(this.userInfo.idcard)
|
||||
this.userInfo.telepNumber = decryptCBC(this.userInfo.telepNumber)
|
||||
console.log('🚀 ~ getAppLoginInfo ~ this.userInfo:', this.userInfo)
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@ export default {
|
|||
getHospitalList() {
|
||||
const params = {
|
||||
token: this.token,
|
||||
idcard: this.idcard
|
||||
}
|
||||
console.log('🚀 ~ getHospitalList ~ params:', params)
|
||||
uni.request({
|
||||
|
|
@ -134,8 +133,7 @@ export default {
|
|||
// 获取检查类型
|
||||
getCheckType() {
|
||||
const params = {
|
||||
token: this.token,
|
||||
idcard: this.idcard
|
||||
token: this.token
|
||||
}
|
||||
console.log('🚀 ~ getCheckType ~ params:', params)
|
||||
uni.request({
|
||||
|
|
@ -240,7 +238,7 @@ export default {
|
|||
phyAppontTime: this.healthTime,
|
||||
setMealType: '3',
|
||||
combName: this.checkType,
|
||||
token: this.token
|
||||
// token: this.token
|
||||
}
|
||||
console.log('🚀 ~ handleSave ~ params:', params)
|
||||
console.log('🚀 ~ handleSave ~ params:', cry.encrypt(JSON.stringify(params)))
|
||||
|
|
@ -248,8 +246,8 @@ export default {
|
|||
uni.request({
|
||||
url: config.tjBaseUrl + '/app/phyappoint',
|
||||
method: 'post',
|
||||
// data: { encryptedData: params, token: this.token },
|
||||
data: params,
|
||||
data: { encryptedData: cry.encrypt(JSON.stringify(params)), token: this.token },
|
||||
// data: params,
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
token: this.token
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
|
||||
<script>
|
||||
import config from '@/config'
|
||||
import Crypoto from '@/utils/aescbc'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -142,9 +143,10 @@ export default {
|
|||
},
|
||||
// 操作-删除 cancelpoint
|
||||
handleDelete(item) {
|
||||
const cry = new Crypoto()
|
||||
console.log('🚀 ~ handleDelete ~ item:', item)
|
||||
const params = {
|
||||
cancelId: item.id,
|
||||
cancelId: cry.encrypt(item.id),
|
||||
mealType: item.setMealType,
|
||||
token: this.token
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
|
||||
<script>
|
||||
import config from '@/config'
|
||||
import Crypoto from '@/utils/aescbc'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -108,10 +109,11 @@ export default {
|
|||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
const cry = new Crypoto()
|
||||
const params = {
|
||||
name: this.keyword,
|
||||
name: cry.encrypt(this.keyword),
|
||||
data: this.year,
|
||||
type: this.typeValue,
|
||||
type: cry.encrypt(this.typeValue),
|
||||
token: this.token
|
||||
}
|
||||
console.log('🚀 ~ getList ~ params:', params)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="explain">*进入考试后,计时结束将自动交卷,退出后将会继续计时</div>
|
||||
<div class="explain">*进入考试后,计时结束将自动交卷,退出后将会继续计时,考试期间请勿登录其他设备,否则成绩作废</div>
|
||||
|
||||
<!-- 底部固定按钮 -->
|
||||
<div class="bottom-btn">
|
||||
|
|
|
|||
|
|
@ -279,12 +279,10 @@ export default {
|
|||
console.log('🚀 ~ changeCountDown ~ 人脸识别')
|
||||
// this.openFaceScan() // Android 人脸识别
|
||||
this.openPhotograph() // IOS 拍照识别
|
||||
}
|
||||
if (this.answerTime / 1000 == this.random2) {
|
||||
} else if (this.answerTime / 1000 == this.random2) {
|
||||
// this.openFaceScan()
|
||||
this.openPhotograph()
|
||||
}
|
||||
if (this.answerTime == this.time) {
|
||||
} else if (this.answerTime == this.time) {
|
||||
// 提示: 时间结束, 自动提交
|
||||
this.$refs.uToast.show({
|
||||
message: '考试时间结束, 系统将自动提交',
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@
|
|||
<script>
|
||||
import TabbarConfig from '@/totalTabbar.js'
|
||||
import config from '@/config'
|
||||
import Crypoto from '@/utils/aescbc'
|
||||
|
||||
import {
|
||||
getDayNoticeAnnoByUserId,
|
||||
|
|
@ -192,6 +193,7 @@
|
|||
})
|
||||
},
|
||||
gotoYy(name) {
|
||||
const cry = new Crypoto()
|
||||
const params = {
|
||||
username: uni.getStorageSync('userPhone'),
|
||||
jwtToken: uni.getStorageSync('App-Token')
|
||||
|
|
@ -199,7 +201,7 @@
|
|||
const tjparams = {
|
||||
// username: '17681010134', // 15912575796
|
||||
// password: 'YNsbd@123456'
|
||||
telephone: uni.getStorageSync('userPhone'),
|
||||
telephone: cry.encrypt(uni.getStorageSync('userPhone')),
|
||||
jwtToken: uni.getStorageSync('App-Token')
|
||||
}
|
||||
console.log('🚀 ~ gotoYy ~ tjparams:', tjparams)
|
||||
|
|
@ -243,7 +245,7 @@
|
|||
})
|
||||
} else if( name == '健康体检移动端') {
|
||||
uni.request({
|
||||
url: config.tjBaseUrl + '/login',
|
||||
url: config.tjBaseUrl + '/app/loginNoPassword',
|
||||
method: 'POST',
|
||||
data: tjparams,
|
||||
header: {
|
||||
|
|
@ -251,10 +253,12 @@
|
|||
},
|
||||
success: res => {
|
||||
console.log('🚀 ~ gotoYy ~ res:', res,)
|
||||
console.log('🚀 ~ gotoYy ~ res:', res.data.token)
|
||||
console.log('🚀 ~ gotoYy ~ res:', res.data.obj)
|
||||
if (res.statusCode == 200) {
|
||||
uni.removeStorageSync('tjToken')
|
||||
uni.setStorageSync('tjToken', res.data.token)
|
||||
uni.removeStorageSync('tjPhone')
|
||||
uni.setStorageSync('tjToken', res.data.obj)
|
||||
uni.setStorageSync('tjPhone', tjparams.telephone)
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/HealthExaminationApp/index/index'
|
||||
|
|
|
|||
|
|
@ -33,3 +33,22 @@ export default class Crypoto {
|
|||
|
||||
decrypt
|
||||
}
|
||||
|
||||
const jie_mi=true;
|
||||
|
||||
/**
|
||||
* 解密
|
||||
* @param word
|
||||
* @returns {*}
|
||||
*/
|
||||
export const decryptCBC = function(word) {
|
||||
if(!jie_mi){
|
||||
return word;
|
||||
}
|
||||
const encrypted = CryptoJS.AES.decrypt(word, CryptoJS.enc.Utf8.parse('zhgd@bonus@zhgd@bonus@1234567890'), {
|
||||
iv: CryptoJS.enc.Utf8.parse('1234567812345678'),
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
})
|
||||
return encrypted.toString(CryptoJS.enc.Utf8)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue