base64 bug & encodeURIComponent


window.btoa("jëh²H¶�%28");
// "autoskiptoclMjiu" window.atob("auto skip to corp");
// "jëh²H¶‡(" window.btoa("jëh²H¶�(");
// "autoskiptocorg==" // window.atob(encodeURIComponent("auto skip to corp"));
// VM5604:1 Uncaught DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
// at <anonymous>:1:8
// (anonymous) @ VM5604:1 encodeURIComponent("auto skip to corp");
// "auto%20skip%20to%20corp" decodeURIComponent("auto%20skip%20to%20corp")
"auto skip to corp

vue


autoSkipToDetailsByType(type = ``, id = ``) {
// let uid = this.skipUid;
let text = ``;
let hash = ``;
let title = ``;
// <view id="enterprise"/>
// <view id="enterprise/special-topics"/>
// <view id="enterprise/chain"/>
// <view id="figure/figure-topics"/>
// <view id="data/details"/>
// <view id="newsinfo/iframe"/>
switch (type) {
case "all":
text = `auto skip to all`;
title = "";
hash = `search`;
break;
case "corp":
text = `auto skip to corp`;
title = "";
hash = `enterprise/special-topics`;
break;
case "newsinfo":
text = `auto skip to newsinfo`;
title = "";
hash = `newsinfo/iframe`;
break;
case "chart":
text = `auto skip to chart`;
title = "";
hash = `enterprise/chain`;
break;
case "figure":
text = `auto skip to figure`;
title = "";
hash = `figure/figure-topics`;
break;
case "brand":
text = `auto skip to brand`;
title = "";
hash = `data/details`;
break;
default:
break;
}
if (id && id.length) {
// skip
console.log(text, id);
} else {
id = ``;
}
let url = window.location.origin;
Light.navigate(
`${url}/#/${hash}`,
{
message: window.atob(text),
id,
// id: id,
},
{
title: title,// 公司 / 资讯 / 链谱 / 人物 / 数据
replace: false,
},
);
},

base 64 bug & encodeURIComponent的更多相关文章

  1. base 64 & blob & image url

    base 64 & blob & image url base 64 image & e.clipboardData.items[1] https://codepen.io/x ...

  2. 快速掌握 Base 64 | 学 Java 密码系列

    Java 密码系列 - Java 和 JS Base 64 Base 64 不属于密码技术,仅是编码方式.但由于在 Java.JavaScript.区块链等出现的频率较高,故在本系列文章中首先分享 B ...

  3. C# base 64图片编码解码

    使用WinForm实现了图片base64编码解码的 效果图: 示例base 64编码字符串: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKD ...

  4. Base 64 编码

    原创地址:http://www.cnblogs.com/jfzhu/p/4020097.html 转载请注明出处 (一)Encoding VS. Encryption 很多人都以为编码(Encodin ...

  5. 浅谈 Data URI 与 BASE 64 编码

    前言(废话):鼓捣 Stylish 的时候发现了这么个奇怪的代码行: Data:image/gif;BASE64,R0lGODlhEAAQAKEAAEKF9NPi/AAAAAAAACH5BAEAAAI ...

  6. base 64 编解码器

    base 64 编解码 1. base64的编码都是按字符串长度,以每3个8bit的字符为一组, 2. 然后针对每组.首先获取每一个字符的ASCII编码. 3. 然后将ASCII编码转换成8bit的二 ...

  7. Base 64 & decodeURIComponent

    Base 64 & decodeURIComponent js btoa() & atob() let obj = [{"key":"q",&q ...

  8. 关于BASE 24 ,BASE 64原理以及实现程序

    关于BASE 24 ,BASE 64原理以及实现程序 来源 https://wangye.org/blog/archives/5/ 可能很多人听说过Base64编码,很少有人听说过Base24编码,B ...

  9. Base 64 & URL & blob & FileReader & createObjectURL

    Base 64 & URL & blob & FileReader & createObjectURL /** * let blob = item.getAsFile( ...

随机推荐

  1. (Shell)Shell命令整理

    目录 常用命令 1. 上传.下载 2. 删除文件和文件夹 3. 目录操作 4. 文件的操作 4.vim 为新添加的文件后缀支持语法高亮 常用命令 1. 上传.下载 上传文件:rz,然后回车弹出上传文件 ...

  2. leaving sockets open which can trigger a ResourceWarning in some # cases, and look like a memory leak in others

    # -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requ ...

  3. Vim配置及其他注意事项

    常用的一些配置 set t_ti= set t_te= "这两个比较特殊,后边说 set termencoding=utf-8 set encoding=utf-8 set fileenco ...

  4. Spark使用Java、Scala 读取mysql、json、csv数据以及写入操作

    Spark使用Java读取mysql数据和保存数据到mysql 一.pom.xml 二.spark代码 2.1 Java方式 2.2 Scala方式 三.写入数据到mysql中 四.DataFrame ...

  5. Java——定时任务调度工具

    一.什么是定时任务调度? 1.常用的定时调度工具:Timer和Quartz 二.Timer简介 1.Timer的定义以及架构 2.Timer示例 三.Timer的定时调度函数 1.schedule的四 ...

  6. AS中的协议---IGP、EGP(BGP)

    查考文档: http://www.360doc.com/content/18/0327/23/11935121_740740341.shtml 自治系统(AS)就是指在网络中处于同一个控制下的路由器和 ...

  7. Java使用反射的通用数组复制方法

    Java通用数组复制方法 在Arrays工具类中,提供了一个copyOf(T[] original, int newLength)方法,用于复制任意类型的对象数组,但是由于泛型不能作用于基本类型,所以 ...

  8. 正点原子DS100拆解全过程-硬件工程师必备

    前言: 之前一篇只针对正点原子DS100手持示波器的使用介绍文章.可作为一个电子工程师,光使用不是我们的风格哈,我们还要拆开看看电路. 开拆 外壳 首先,看下图,DS100不是使用螺母进行固定的,而是 ...

  9. B - Power Strings

    Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc&quo ...

  10. 2018-2019 ACM-ICPC, NEERC, Southern Subregional Contest, Qualification Stage(11/12)

    2018-2019 ACM-ICPC, NEERC, Southern Subregional Contest, Qualification Stage A. Coffee Break 排序之后优先队 ...