From a2c19ac65da566f4825480619a7f367e81f2d8b3 Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期五, 14 十二月 2018 13:06:41 +0800 Subject: [PATCH] 手机端首页机房定位修改链接为map.html --- gx_tieta/WebRoot/mobil/app/js/common.js | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/app/js/common.js b/gx_tieta/WebRoot/mobil/app/js/common.js index 282fab5..4398eff 100644 --- a/gx_tieta/WebRoot/mobil/app/js/common.js +++ b/gx_tieta/WebRoot/mobil/app/js/common.js @@ -53,7 +53,8 @@ CheckData.prototype = { _setReg: function(reg) { if(reg) { - this.reg = new RegExp(reg); + var _reg = this._formaterReg(reg); + this.reg = new RegExp(_reg); }else { this.reg = new RegExp('.*'); } @@ -74,5 +75,10 @@ } return data; + }, + _formaterReg: function(reg) { // 妫�娴嬬壒娈婄殑瀛楃骞惰繘琛岃浆涔� + var ptn = /([\(\)\.])/g; + var str = reg.replace(ptn, '\\'+'$&'); + return str; } } \ No newline at end of file -- Gitblit v1.9.1