import axios from 'axios' let cdnpath = {} cdnpath.install = function (vue, options) { vue.prototype.$_cdndomain = function () { if (process.env.node_env === 'production') { sessionstorage.setitem('cdnpath', 'https://cdn.hhhhaaaa.com'); } else { sessionstorage.setitem('cdnpath', 'https://hhhh.aaaa.com.cn'); } }(); vue.prototype.$_cpath = function (path) { const reg = /^(http|ftp|https):\/\//; const regstatic = /^static\//; if (!path) { return '' } else { if (!reg.test(path)) { if (regstatic.test(path)) { return path } let cdndomain = sessionstorage.getitem('cdnpath'); if (cdndomain !== null) { return cdndomain + path } return path } return path } } } export default cdnpath
如对本文有疑问, 点击进行留言回复!!
selenium + ajax抓取英雄联盟全部英雄的详细信息及多线程保存全部皮肤图片到本地
网友评论