用户信息加密方法待更新

This commit is contained in:
2026-02-24 10:13:06 +08:00
parent c1a77cfd9b
commit 6fcf6e8a70
7 changed files with 107 additions and 57 deletions

View File

@@ -28,12 +28,12 @@
<view >
<view class="gk-l-i-bottom" v-html="item.content"></view>
</view>
</view>
</view>
</scroll-view>
</AppLayout>
</template>
@@ -42,6 +42,9 @@ import { inject, ref, reactive, onMounted } from "vue";
const { $api, navTo, navBack, vacanciesTo } = inject("globalFunction");
import config from "@/config.js";
import AppLayout from "@/components/AppLayout/AppLayout.vue";
import CryptoJS from 'crypto-js'
const title = ref("");
const baseUrl = config.imgBaseUrl;
const pageSize=ref(10)
@@ -49,7 +52,27 @@ const pageNum=ref(1)
const totalNum=ref(0)
// Tab 控制
const currentTab = ref("train"); // 默认显示培训公告
async function loginA(){
const form={
usertype: "2",
enterprisecode: '91310101MA1FPX1234',
enterprisename: 'tt',
contactperson: "",
contactphone: "",
idno: "",
name: ""
}
//用户信息加密方法待更新
// const key = '9zS+DFKrzxvosO82mTcPJQ=='
// const secretKey = CryptoJS.enc.Utf8.parse(key);//key 为你的秘钥
// const srcs = CryptoJS.enc.Utf8.parse(form.idno);
// // AES 加密
// const encrypted = CryptoJS.AES.encrypt(srcs, secretKey, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7}).toString()
// console.log('AES Encrypted:111', encrypted)
// form.idno=encrypted
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
console.log("resLogin",resLogin)
}
function switchTab(tabName) {
currentTab.value = tabName;
getPolicyData('refresh',currentTab)
@@ -65,6 +88,7 @@ const getBackgroundStyle = (imageName) => ({
});
onMounted(() => {
getPolicyData('refresh',currentTab);
loginA()
});
const policyList = ref([]);
function getPolicyData(type = 'add',currentTab='train') {
@@ -92,7 +116,7 @@ function getPolicyData(type = 'add',currentTab='train') {
policyList.value=resData.rows
totalNum.value=resData.total
}
});
}
if (type === 'add' && pageNum.value < maxPage) {
@@ -200,4 +224,4 @@ function goPolicyDetail(item) {
margin-top: 12rpx;
}
}
</style>
</style>