tip.js
638 Bytes
/*
yoho客服 im: 客服提示模块
@author acgpiano
offLine() 离线状态
onLine() 在线状态
*/
class Tip {
constructor(msg) {
this.uname = msg || '';
}
offLine() {
return `<div class="leave-msg-wraper">
<span class="leave-msg">您可以选择<a href="#" id="leave-msg">留言</a>,客服会以短信形式回复您</span>
</div>`;
}
onLine() {
return `<div class="change-mm">
<span class="leave-msg">${this.msg}</span>
</div>`;
}
}
export function tip(uname) {
return new Tip(uname);
}