From c7f79abded9ad2e29f297da4a04a641b96b61c5e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 12 十月 2019 09:51:22 +0800 Subject: [PATCH] add-datamanage --- src/utils/utils.js | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/utils/utils.js b/src/utils/utils.js index a126695..b3d01e5 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -33,20 +33,6 @@ * @description 鎷兼帴鎼滅储鏉′欢 * @param {Array} searches 鎼滅储鏉′欢 * @return {String} searchText 鎷兼帴缁撴灉 - * ---杩囨护鏉′欢锛堟湭浣跨敤锛�--- - * greaterorequal: ' >= ' - * lessorequal: ' <= ' - * like: ' LIKE ' - * less: ' < ' - * greater: ' > ' - * equal: ' = ' - * notlike: ' notlike ' - * in: ' in ' - * notin: ' notin ' - * leftlike/startwith - * rightlike/endwith - * rightnotlike/endnotwith - * leftnotlike/startnotwith */ static jointsearchkey (searches) { if (!searches || searches.length === 0) return '' @@ -75,4 +61,20 @@ }) return searchText } + + /** + * @description 鑾峰彇鍥剧墖鐪熷疄璺緞 + * @return {String} url 鍥剧墖璺緞 + */ + static getrealurl (url) { + if (!url) return '' + let baseurl = '' + if (process.env.NODE_ENV === 'production') { + baseurl = document.location.origin + '/' + } else { + baseurl = 'http://qingqiumarket.cn/MKWMS/' + } + let realurl = url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url + return realurl + } } \ No newline at end of file -- Gitblit v1.8.0