链接跳转携带参数
This commit is contained in:
parent
a36712fb37
commit
0fee0f0979
|
|
@ -6,7 +6,9 @@
|
|||
|
||||
<script>
|
||||
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 {
|
||||
props: {
|
||||
to: {
|
||||
|
|
@ -28,8 +30,13 @@ export default {
|
|||
methods: {
|
||||
linkProps(to) {
|
||||
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 {
|
||||
href: to,
|
||||
href: to + ( getToken() ? '?token='+ getToken():'')+('&phonenumber='+encryptWithSM4(this.$store.getters.phonenumber+"|"+hashWithSM3AndSalt(this.$store.getters.phonenumber))),
|
||||
// href: to,
|
||||
target: '_blank',
|
||||
rel: 'noopener'
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue