收藏
回答

unescape

picPath: function (path, is_hfs) {

    if (typeof path != 'undefined' && path != '') {

        path = unescape(path);

        if (is_hfs) {

            let arr = path.split('/');

            if (is_hfs == 1) {

                arr[arr.length - 1] = 'sl_' + arr.pop();

            } else if (is_hfs == 2) {

                arr[arr.length - 1] = 'ssl_' + arr.pop();

            }

        path = arr.join('/');

        }

    }

    return path;

},

在页面中使用

<image src="{{filter.picPath(item.pic)}}"></image>

报错

Uncaught ReferenceError: unescape is not defined

(anonymous)


怎么使用unescape


回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容