|
@@ -102,16 +102,16 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async sendEmotion(type) {
|
|
async sendEmotion(type) {
|
|
|
|
+ console.log('1');
|
|
|
|
+ console.log(this.user);
|
|
let object = { sender_name: this.user.name ? this.user.name : this.user.adminuser, dock_id: this.dock_id };
|
|
let object = { sender_name: this.user.name ? this.user.name : this.user.adminuser, dock_id: this.dock_id };
|
|
let content = '';
|
|
let content = '';
|
|
content = `<img src='${_.get(this, `${type}`)}' style="width:30px;height:30px" />`;
|
|
content = `<img src='${_.get(this, `${type}`)}' style="width:30px;height:30px" />`;
|
|
object.content = content;
|
|
object.content = content;
|
|
- if (this.user.uid) {
|
|
|
|
- object.sender_id = this.user.uid;
|
|
|
|
- object.role = this.user.role;
|
|
|
|
- let res = await this.create(object);
|
|
|
|
- this.$checkRes(res, null, res.errmsg || '发言失败');
|
|
|
|
- }
|
|
|
|
|
|
+ object.sender_id = this.user ? this.user.uid : this.user.suid;
|
|
|
|
+ object.role = this.user.role;
|
|
|
|
+ let res = await this.create(object);
|
|
|
|
+ this.$checkRes(res, null, res.errmsg || '发言失败');
|
|
},
|
|
},
|
|
isEmotion(word) {
|
|
isEmotion(word) {
|
|
return word.startsWith('<img');
|
|
return word.startsWith('<img');
|