常规方法将base64转成字符串

//解码
function b64Decode (str) {
    return decodeURIComponent(atob(str));
}

解决转码之后中文乱码现象

// 解码
function getDecode(str){
    return decodeURIComponent(atob(str).split('').map(function (c) {
         return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
    }).join(''));
}