| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- if (Config.modulename == 'admin' && Config.controllername == 'index' && Config.actionname == 'index') {
- require.config({
- paths: {
- 'fastchat': '../addons/fastchat/js/fastchat'
- },
- shim: {
- 'fastchat': {
- deps: ['css!../addons/fastchat/css/fastchat.css'],
- exports: 'FastChat'
- }
- }
- });
- require(['fastchat'], function (FastChat) {
- FastChat.initialize(document.domain, 'admin');
- });
- } else {
- if (window.parent.Config && window.parent.Config.modulename == 'admin') {
- window.FastChat = window.parent.FastChat;
- // 一键添加会话窗口
- $(document).on('click', '.fastchat_user', function (e) {
- FastChat.forecast_add_session(e);
- });
- } else {
- require.config({
- paths: {
- 'fastchat': '../addons/fastchat/js/fastchat'
- },
- shim: {
- 'fastchat': {
- deps: ['css!../addons/fastchat/css/fastchat.css'],
- exports: 'FastChat'
- }
- }
- });
- require(['fastchat'], function (FastChat) {
- FastChat.initialize(document.domain, window.parent.Config.modulename);
- });
- }
- }
|