|
@@ -36,6 +36,8 @@
|
|
|
userMessage: "", // input 的实时值
|
|
userMessage: "", // input 的实时值
|
|
|
isIPX: false,
|
|
isIPX: false,
|
|
|
userInfo:'',
|
|
userInfo:'',
|
|
|
|
|
+ about:{},
|
|
|
|
|
+ SENSITIVE:[],//敏感词屏蔽
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -53,6 +55,7 @@
|
|
|
|
|
|
|
|
// lifetimes
|
|
// lifetimes
|
|
|
created() {
|
|
created() {
|
|
|
|
|
+ this.getConfig()
|
|
|
this.userInfo = req.getStorage('userInfo');
|
|
this.userInfo = req.getStorage('userInfo');
|
|
|
this.setData({
|
|
this.setData({
|
|
|
isIPX: getApp().globalData.isIPX,
|
|
isIPX: getApp().globalData.isIPX,
|
|
@@ -68,6 +71,23 @@
|
|
|
mounted() {},
|
|
mounted() {},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getConfig() {
|
|
|
|
|
+ var _this = this;
|
|
|
|
|
+ return new Promise((res, rej) => {
|
|
|
|
|
+ req.g(
|
|
|
|
|
+ '/api/other/config',
|
|
|
|
|
+ data => {
|
|
|
|
|
+ req.setStorage('configRes', JSON.stringify(data));
|
|
|
|
|
+ this.about = data;
|
|
|
|
|
+ if(this.about.SENSITIVE){
|
|
|
|
|
+ this.SENSITIVE = this.about.SENSITIVE.split(',')
|
|
|
|
|
+ }
|
|
|
|
|
+ res(data);
|
|
|
|
|
+ },
|
|
|
|
|
+ true
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
focus() {
|
|
focus() {
|
|
|
this.$emit("inputFocused", null, {
|
|
this.$emit("inputFocused", null, {
|
|
|
bubbles: true,
|
|
bubbles: true,
|
|
@@ -88,6 +108,15 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
bindMessage(e) {
|
|
bindMessage(e) {
|
|
|
|
|
+ this.SENSITIVE.forEach(item=>{
|
|
|
|
|
+ const reg = new RegExp(item, 'g');
|
|
|
|
|
+ let il = item.length
|
|
|
|
|
+ let s = ''
|
|
|
|
|
+ for(let i=0;i<il;i++){
|
|
|
|
|
+ s = s+'*'
|
|
|
|
|
+ }
|
|
|
|
|
+ e.detail.value = e.detail.value.replace(reg, s);
|
|
|
|
|
+ })
|
|
|
this.setData({
|
|
this.setData({
|
|
|
userMessage: e.detail.value,
|
|
userMessage: e.detail.value,
|
|
|
});
|
|
});
|