Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUD-18655 前端 - H5页面,自助服务页面增加最小化按钮 #309

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/js/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var getToHost = require("@/app/common/transfer");
var eventListener = require("@/app/tools/eventListener");
var fromUserClick = false;
var Tab = require("@/common/uikit/tab");
var toolbar = require("@/common/utils");

load_html();
if(utils.isTop){
Expand Down Expand Up @@ -432,6 +433,16 @@ function renderUI(resultStatus){
// 优先第一个
if(tab.selectFirstTab()){
$("#em-kefu-webim-self").append(tab.$el);
var topBar = document.querySelector(".em-widget-header")
var minifyBtn = topBar.querySelector(".btn-min");
if (commonConfig.getConfig().minimum) {
// 增加该页面的最小化功能,同chat里面的最小化一样
utils.removeClass(minifyBtn, "hide");
// 最小化按钮
utils.on(minifyBtn, "click", function(){
getToHost.send({ event: _const.EVENTS.CLOSE });
});
}
return true;
}
return false;
Expand Down