提交 6847c354 编写于 作者: KK's avatar KK

设置第三方服务导航标题

上级 d113d52e
...@@ -163,4 +163,17 @@ export class DingTalkService { ...@@ -163,4 +163,17 @@ export class DingTalkService {
public close(){ public close(){
this.dd.biz.navigation.close({}); this.dd.biz.navigation.close({});
} }
/**
* 设置钉钉标题
*
* @static
* @returns {DingTalkService}
* @memberof DingTalkService
*/
public setTitle(title:string){
this.dd.biz.navigation.setTitle({
title : title,
});
}
} }
...@@ -152,4 +152,19 @@ export class ThirdPartyService { ...@@ -152,4 +152,19 @@ export class ThirdPartyService {
} }
} }
/**
* 设置钉钉标题
*
* @static
* @returns {DingTalkService}
* @memberof DingTalkService
*/
public setTitle(title:string){
if (this.isDingTalk()) {
this.dd.setTitle(title);
} else if (this.isWeChat()) {
this.weChat.setTitle(title);
}
}
} }
\ No newline at end of file
...@@ -200,4 +200,15 @@ export class WeChatService { ...@@ -200,4 +200,15 @@ export class WeChatService {
public close(){ public close(){
// 关闭 // 关闭
} }
/**
* 设置微信标题
*
* @static
* @returns {DingTalkService}
* @memberof DingTalkService
*/
public setTitle(title:string){
// 设置标题
}
} }
\ No newline at end of file
import { Route } from 'vue-router'; import { Route } from 'vue-router';
import qs from 'qs'; import qs from 'qs';
import { Util } from '@/ibiz-core/utils'; import { Util } from '@/ibiz-core/utils';
import { ThirdPartyService } from '@ibiz-core'
export class ViewTool { export class ViewTool {
/** /**
...@@ -14,6 +14,16 @@ export class ViewTool { ...@@ -14,6 +14,16 @@ export class ViewTool {
*/ */
private static readonly instance: ViewTool = new ViewTool(); private static readonly instance: ViewTool = new ViewTool();
/**
* 第三方服务
*
* @private
* @type {ViewTool}
* @memberof ViewTool
*/
private thirdPartyService:ThirdPartyService = ThirdPartyService.getInstance();
/** /**
* Creates an instance of ViewTool. * Creates an instance of ViewTool.
* 私有构造,拒绝通过 new 创建对象 * 私有构造,拒绝通过 new 创建对象
...@@ -369,4 +379,12 @@ export class ViewTool { ...@@ -369,4 +379,12 @@ export class ViewTool {
} }
} }
} }
/**
* 设置第三方服务视图标题
*/
public setViewTitleOfThirdParty(title:string) {
this.thirdPartyService.setTitle(title);
}
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册