You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
40 lines
1.3 KiB
if (Config.modulename == 'admin' && Config.controllername == 'index' && Config.actionname == 'index') {
|
|
require.config({
|
|
paths: {
|
|
'text': "../addons/shopro/libs/require-text",
|
|
'SaChat': '../addons/shopro/chat/index',
|
|
},
|
|
shim: {},
|
|
});
|
|
require(['jquery', 'text!../addons/shopro/chat/index.html', 'SaChat'], function ($, SaChatTemplate, SaChat) {
|
|
|
|
Fast.api.ajax({
|
|
url: 'shopro/chat/index/init',
|
|
loading: false,
|
|
type: 'GET'
|
|
}, function (ret, res) {
|
|
console.log(res, 'res')
|
|
|
|
$("body").append(`<div id="SaChatTemplateContainer"></div>
|
|
<div id="SaChatWrap"><sa-chat></sa-chat></div>`);
|
|
|
|
$("#SaChatTemplateContainer").append(SaChatTemplate);
|
|
|
|
const { createApp } = Vue
|
|
const app = createApp({})
|
|
|
|
app.use(ElementPlus)
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
app.component(key, component)
|
|
}
|
|
|
|
app.component('sa-chat', SaChat)
|
|
app.mount(`#SaChatWrap`)
|
|
return false;
|
|
}, function (ret, res) {
|
|
if (res.msg == '') {
|
|
return false;
|
|
}
|
|
})
|
|
});
|
|
} |