Commit 3ed5153b379b0de30b496f47739f67de571cb857
1 parent
160d2146
小程序提交去掉表取字符
Showing
3 changed files
with
13 additions
and
2 deletions
app.js
| ... | ... | @@ -595,6 +595,17 @@ App({ |
| 595 | 595 | this.globalData.room_goods_id=null; //关闭要把物流清空 |
| 596 | 596 | this.globalData.config2=null; //清除config2的缓存 |
| 597 | 597 | this.globalData.config=null; //清除config的缓存 |
| 598 | + }, | |
| 599 | + | |
| 600 | + clear_word:function (word) { | |
| 601 | + | |
| 602 | + var str=word; | |
| 603 | + let reg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac\r\n])|(\s)/g , | |
| 604 | + indexArr = reg.exec(str); | |
| 605 | + if(str.match(reg)) { | |
| 606 | + str = str.replace(reg, ''); | |
| 607 | + } | |
| 608 | + return str; | |
| 598 | 609 | } |
| 599 | 610 | |
| 600 | 611 | ... | ... |
pages/getphone/getphone.js
utils/auth.js
| ... | ... | @@ -51,7 +51,7 @@ module.exports = { |
| 51 | 51 | data: { |
| 52 | 52 | js_code: e, |
| 53 | 53 | store_id: a.globalData.setting.stoid, |
| 54 | - nickname:a.globalData.getu.nickName, | |
| 54 | + nickname: a.clear_word(a.globalData.getu.nickName) | |
| 55 | 55 | }, |
| 56 | 56 | success: function (e) { |
| 57 | 57 | console.log("openidandkey"); | ... | ... |