Bläddra i källkod

加密解密修改

yxb
不甘寂寞 2 år sedan
förälder
incheckning
e3466dd11d

+ 4
- 1
applyCard/choice-product.vue Visa fil

showLoading: true, showLoading: true,
}; };
request(etcQueryProduct, options).then((res) => { request(etcQueryProduct, options).then((res) => {
console.log(res.bizContent);
const data = stringToJson(res.bizContent); const data = stringToJson(res.bizContent);
state.dataArray = data;
console.log(data);
console.log(typeof(data));
state.dataArray = data??[];
}); });
}); });

+ 1
- 1
applyCard/components/layout-numberplate-color.vue Visa fil

<!-- 车牌颜色选择组件 --> <!-- 车牌颜色选择组件 -->
<template> <template>
<view class="numberplates"> <view class="numberplates">
<view class="numberplate" v-for="(item,index) in state.numberplateColorList" @click="checkNumberplateColor(item)">
<view class="numberplate" v-for="(item,index) in state.numberplateColorList" @click="checkNumberplateColor(item)" :key="index">
<image :src="`${fileURL}/image/issueActivation/${item.src}.png`" class="numberplate-bg"></image> <image :src="`${fileURL}/image/issueActivation/${item.src}.png`" class="numberplate-bg"></image>
<view class="numberplate-name" :style="`color:${item.color}`">{{numberplate}}</view> <view class="numberplate-name" :style="`color:${item.color}`">{{numberplate}}</view>
<image :src="`${fileURL}image/issueActivation/${item.checkSrc}.png`" class="numberplate-icon-check" <image :src="`${fileURL}image/issueActivation/${item.checkSrc}.png`" class="numberplate-icon-check"

+ 3
- 2
applyCard/essential-information.vue Visa fil

const state = reactive({ const state = reactive({
data: { data: {
vehiclePlate: undefined, //车牌号 vehiclePlate: undefined, //车牌号
vehiclePlateNumber: "贵A1234", //车牌号
vehiclePlateNumber: "贵A12345", //车牌号
vehiclePlateColor: 0, //车盘颜色 vehiclePlateColor: 0, //车盘颜色
type: "0", //车牌类型 type: "0", //车牌类型
userType: "1", userType: "1",
}; };
request(searchOrder, options).then((res) => { request(searchOrder, options).then((res) => {
const data = stringToJson(res.bizContent); const data = stringToJson(res.bizContent);
console.log(data);
orderStepGoActon(data); orderStepGoActon(data);
}); });
}; };
}; };
request(addressQuery, options).then((res) => { request(addressQuery, options).then((res) => {
const data = stringToJson(res.bizContent); const data = stringToJson(res.bizContent);
state.addressArray = data.data;
state.addressArray = data.data??[];
}); });
} }



+ 124
- 0
pages/index/components/flow-path-list.vue Visa fil

<!-- 办理流程 -->
<template>
<view :class="['as-layout-horizontal', index as any === 0?'active':'', 'logistics-gray']" style="overflow: visible" v-for="(item,index) in options" :key="index">
<view class="logistics-layout">
<view class="logistics-layout-top">
<view class="title">
{{(item as ItemType).title}}
</view>
<!-- <view class="more" v-if="(item as ItemType).right" @click="emit('more')">
<span class="label">详细信息</span>
<image class="arror" :src="`${$imgUrl}common/arror-right-green.png`"></image>
</view> -->
</view>
<view class="desc">
{{(item as ItemType).desc}}
</view>
</view>
</view>
</template>

<script setup lang="ts">
import { PropType } from "vue";
interface ItemType{
title:string,
desc:string,
right?:boolean,
}
const emit = defineEmits(['more'])
const props = defineProps({
//数据列表
options:{
type:Array as PropType<ItemType[]>,
default: () => ([])
},
})
</script>

<style lang="scss" scoped>
.as-layout-horizontal{
border-left: 2px solid #00B38B;
padding-bottom: 45rpx;
margin-top: 10rpx;
position: relative;
&::after{
content: '';
left: -8rpx;
top: -10rpx;
position: absolute;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
border: 2rpx solid #00B38B;
box-sizing: border-box;
}
&:last-child{
border-left: none;
padding-bottom: 0px;
&::after{
left: -4.5rpx;
}
}
.logistics-layout{
padding-left: 35rpx;
&-top{
width: 100%;
display: flex;
margin-top: -20rpx;
align-items: center;
.more{
display: flex;
align-items: center;
.label{
font-size: 24rpx;
color: #00B38B;
}
.arror{
width: 30rpx;
height: 30rpx;
}
}
}
.title{
font-size: 28rpx;
color: #0D0F26;
flex: 1;
font-weight: bold;
}
.desc{
font-size: 24rpx;
margin-top: 20rpx;
margin-bottom: 20rpx;
color: #666666;
line-height: 25px;
}
}
}
.logistics-gray{
border-color: #DCDCDC;
&::after{
background-color: #DCDCDC;
border: none;
}
}
.active{
position: relative;
&::after{
content: '';
position: absolute;
width: 12rpx;
height: 12rpx;
left:-8rpx;
border-radius: 50%;
background-color: #00B38B;
}
}
</style>

+ 880
- 847
pages/index/index.vue
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 11
- 13
pages/service/service.vue Visa fil

</view> </view>
<view class="right"> <view class="right">
<view class="right-content"> <view class="right-content">
<view v-for="(item,index) in menu.list[tableSelectIndex].subMenus" :key='index' class="item-box"
@click="
toNext(item.link)
">
<view class="item bg-blue" :style="{ '--background': bgBlue }">
<image :src="`${$imgUrl}${item.iconPath}`" />
<block v-if="menu.list.length >0">
<view v-for="(item,index) in menu.list[tableSelectIndex].subMenus" :key='index' class="item-box" @click="toNext(item.link)">
<view class="item bg-blue" :style="{ '--background': bgBlue }">
<image :src="`${$imgUrl}${item.iconPath}`" />
</view>
<view class="text">{{item.name}}</view>
</view> </view>
<view class="text">{{item.name}}</view>
</view>
</block>
</view> </view>
</view> </view>
</view> </view>
}); });
onLoad(() => { onLoad(() => {
queryMenuConfigAction().then((val: any) => {
menu.list = val.menuList
queryMenuConfigAction().then((val : any) => {
menu.list = val.menuList??[]
}) })
}); });
var data = { var data = {
openId: getItem(StorageKeys.OpenId), openId: getItem(StorageKeys.OpenId),
systemType: '6', systemType: '6',
loginSource: '69af303ba2eb4608a099163f0d2a5dbd'
}; };
const options = { const options = {
type: 2, type: 2,
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
}); });
// msg("该功能正在开发中,敬请期待!")
} }
</script> </script>
.right .text-orange { .right .text-orange {
color: #fd8362; color: #fd8362;
} }
</style>
</style>

+ 1
- 1
stores/user.js Visa fil

console.log("option********",options); console.log("option********",options);
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const res = await request(getToken, options); const res = await request(getToken, options);
const data = stringToJson(stringToJson(res.bizContent));
const data = stringToJson(res.bizContent);
this.saveToken(data.accessToken); this.saveToken(data.accessToken);
this.saveOpenId(data.openId); this.saveOpenId(data.openId);
resolve(data); resolve(data);

+ 4
- 1
utils/network/request.js Visa fil

reject(res.data.errorMsg) reject(res.data.errorMsg)
return return
} }

let content = s4.decryptData_CBC(res, sm4Key) let content = s4.decryptData_CBC(res, sm4Key)
content.data.bizContent = JSON.stringify(content.data.bizContent)
// console.log(content);
// content.data.bizContent = JSON.stringify(content.data.bizContent)
// console.log(content.data);
resolve(content.data) resolve(content.data)
} }
options.fail = (err) => { options.fail = (err) => {

+ 4
- 3
utils/util/sm4.js Visa fil

sm4.sm4_setkey_dec(ctx, keyBytes) sm4.sm4_setkey_dec(ctx, keyBytes)
let decrypted = sm4.sm4_crypt_cbc(ctx, ivBytes, base64js.toByteArray(cipherText.data.bizContent)) let decrypted = sm4.sm4_crypt_cbc(ctx, ivBytes, base64js.toByteArray(cipherText.data.bizContent))
let bizContent = utf8ByteToUnicodeStr(decrypted) let bizContent = utf8ByteToUnicodeStr(decrypted)
let begin = bizContent.indexOf('{');
let end = bizContent.lastIndexOf('}');
cipherText.data.bizContent = bizContent.substring(begin,end+1)
// let begin = bizContent.indexOf('{');
// let end = bizContent.lastIndexOf('}');
// cipherText.data.bizContent = bizContent.substring(begin,end+1)
cipherText.data.bizContent = bizContent;
return cipherText return cipherText
} catch (e) { } catch (e) {
console.error(e) console.error(e)

Laddar…
Avbryt
Spara