This commit is contained in:
binbin_pan 2024-09-06 17:35:31 +08:00
parent c4dec49f28
commit 6c6432e21c
9 changed files with 54 additions and 26 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -21,7 +21,7 @@
</div>
</div>
<div class="explain">*进入考试后计时结束将自动交卷退出后将会继续计时</div>
<div class="explain">*进入考试后计时结束将自动交卷退出后将会继续计时考试期间请勿登录其他设备否则成绩作废</div>
<!-- 底部固定按钮 -->
<div class="bottom-btn">

View File

@ -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: '考试时间结束, 系统将自动提交',

View File

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

View File

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