收藏
回答

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


最后一次编辑于  2018-06-26  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答

2 个回答