链接跳转携带参数
This commit is contained in:
parent
a36712fb37
commit
0fee0f0979
|
|
@ -6,7 +6,9 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { isExternal } from '@/utils/validate'
|
import { isExternal } from '@/utils/validate'
|
||||||
|
import { getToken } from '@/utils/auth'
|
||||||
|
import { encryptCBC, decryptCBC } from '@/utils/aescbc';
|
||||||
|
import { decryptWithSM4,encryptWithSM4,hashWithSM3AndSalt } from '@/utils/sm'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
to: {
|
to: {
|
||||||
|
|
@ -28,8 +30,13 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
linkProps(to) {
|
linkProps(to) {
|
||||||
if (this.isExternal) {
|
if (this.isExternal) {
|
||||||
|
console.log(to)
|
||||||
|
console.log(this.$store.getters.phonenumber)
|
||||||
|
console.log(hashWithSM3AndSalt(this.$store.getters.phonenumber));
|
||||||
|
console.log(encryptWithSM4(this.$store.getters.phonenumber+"|"+hashWithSM3AndSalt(this.$store.getters.phonenumber)))
|
||||||
return {
|
return {
|
||||||
href: to,
|
href: to + ( getToken() ? '?token='+ getToken():'')+('&phonenumber='+encryptWithSM4(this.$store.getters.phonenumber+"|"+hashWithSM3AndSalt(this.$store.getters.phonenumber))),
|
||||||
|
// href: to,
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
rel: 'noopener'
|
rel: 'noopener'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue