Commit d211da47 by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsalesProgram

parents 198c6913 bc11debd
Showing with 7 additions and 5 deletions
...@@ -55,9 +55,11 @@ Component({ ...@@ -55,9 +55,11 @@ Component({
sendMessage() { sendMessage() {
if (this.data.isTopic) { if (this.data.isTopic) {
let self = this;
console.log(self.data.userMessage)
this.triggerEvent( this.triggerEvent(
"newTextMsg", { "newTextMsg", {
type: '1' msg: self.data.userMessage
}, { }, {
bubbles: true, bubbles: true,
composed: true composed: true
...@@ -74,7 +76,7 @@ Component({ ...@@ -74,7 +76,7 @@ Component({
if (customer) { if (customer) {
wx.removeStorageSync('customer'); wx.removeStorageSync('customer');
} }
String.prototype.trim = function() { String.prototype.trim = function () {
return this.replace(/(^\s*)|(\s*$)/g, ''); return this.replace(/(^\s*)|(\s*$)/g, '');
} }
if (!this.data.userMessage.trim()) { if (!this.data.userMessage.trim()) {
...@@ -125,7 +127,7 @@ Component({ ...@@ -125,7 +127,7 @@ Component({
inputMessage: "", inputMessage: "",
}); });
}, },
sendCmd: function() { sendCmd: function () {
let me = this; let me = this;
let id = WebIM.conn.getUniqueId(); let id = WebIM.conn.getUniqueId();
let msg = new WebIM.message(msgType.CMD, id); let msg = new WebIM.message(msgType.CMD, id);
...@@ -150,13 +152,13 @@ Component({ ...@@ -150,13 +152,13 @@ Component({
to: me.data.username.your, to: me.data.username.your,
action: "template", action: "template",
ext: params, ext: params,
success: function() { success: function () {
console.log('发送模板成功') console.log('发送模板成功')
console.log(me.data.username.your) console.log(me.data.username.your)
// getApp().addChatMember(me.data.username.your) // getApp().addChatMember(me.data.username.your)
// disp.fire('em.chat.sendSuccess', id); // disp.fire('em.chat.sendSuccess', id);
}, },
fail: function() { fail: function () {
console.log('发送模板失败'); console.log('发送模板失败');
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment