const qs = require('qs'); const imageUrlPrefix = 'http://192.168.2.236:82' //后台图片地址 const getUrlArgObject = (parm) => { let query = window.location.search; let args = qs.parse(query.substr(1)); return args[parm];//返回对象 } const deepClone = (arr) =>{ let newArr = []; for(let i in arr){ newArr.push(arr[i]); } return newArr; } const getModelExpStr = (str) =>{ let matchStr = str.match(/\${number_(.*})/)[0] let result = {} if(matchStr){//数字输入框 result = { type:'number', placeholder:matchStr.split('${number_')[1].split('}')[0], prefix:str.split(matchStr)[0]||'', suffix:str.split(matchStr)[1]||'' } }else if(str.match(/\${input_(.*})/)){ } return result } module.exports = { imageUrlPrefix, getUrlArgObject, deepClone, getModelExpStr }