|
|
@@ -238,5 +238,91 @@ Ext.define('saas.view.main.MainController', {
|
|
|
});
|
|
|
win.show();
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ shareCompany:function(){
|
|
|
+ //打开分享窗口
|
|
|
+ var win = Ext.create('Ext.window.Window', {
|
|
|
+ cls:'x-window-dbfind',
|
|
|
+ height: 385,
|
|
|
+ width: 350,
|
|
|
+ modal:true,
|
|
|
+ title: '分享企业',
|
|
|
+ bodyPadding: 10,
|
|
|
+ constrain: true,
|
|
|
+ closable: true,
|
|
|
+ layout: 'fit',
|
|
|
+ items:[{
|
|
|
+ plain:true,
|
|
|
+ xtype:'tabpanel',
|
|
|
+ cls:'x-tab-shareTab',
|
|
|
+ items:[{
|
|
|
+ title:'二维码分享',
|
|
|
+ xtype:'panel',
|
|
|
+ layout: {
|
|
|
+ type: 'vbox',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ items:[{
|
|
|
+ width:180,
|
|
|
+ height:180,
|
|
|
+ xtype: 'image',
|
|
|
+ margin:'35 0 0 0',
|
|
|
+ padding:'5',
|
|
|
+ style:'border: 1px solid #000;',
|
|
|
+ src:'resources/images/default/basePhoto.png',
|
|
|
+ //src: (serverOptions.basePath.https?serverOptions.basePath.https:serverOptions.basePath) + '/api/file/download?path='+signet,
|
|
|
+ name:'QRcode',
|
|
|
+ listeners:{
|
|
|
+ afterrender:function(f){
|
|
|
+ var serverOptions = Ext.manifest.server;
|
|
|
+ var delay = 15;//天
|
|
|
+ var basePath = serverOptions.basePath.https?serverOptions.basePath.https:serverOptions.basePath;
|
|
|
+ f.setSrc('/api/commons/share/qrcode?basePath='+basePath)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ xtype:'displayfield',
|
|
|
+ value:'扫描二维码分享至微信/QQ'
|
|
|
+ }]
|
|
|
+ },{
|
|
|
+ title:'链接分享',
|
|
|
+ xtype:'panel',
|
|
|
+ layout: {
|
|
|
+ type: 'vbox',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ items:[{
|
|
|
+ margin:'60 0 0 0',
|
|
|
+ xtype:'displayfield',
|
|
|
+ value:'复制以下链接分享给好友'
|
|
|
+ },{
|
|
|
+ xtype:'textfield',
|
|
|
+ width:200,
|
|
|
+ value:'https://www.usoftchina.com?admin=false&_noc=0'
|
|
|
+ },{
|
|
|
+ margin:'10 0 0 0',
|
|
|
+ width:110,
|
|
|
+ xtype:'button',
|
|
|
+ text:'复 制',
|
|
|
+ handler:function(b){
|
|
|
+ var text = b.ownerCt.items.items[1].value;
|
|
|
+ var target = Ext.DomHelper.append(document.body, {
|
|
|
+ tag: 'textarea',
|
|
|
+ style: 'opacity: 0;position: absolute;top: -10000px;right: 0;',
|
|
|
+ html: text
|
|
|
+ });
|
|
|
+ target.focus();
|
|
|
+ target.select();
|
|
|
+ document.execCommand('Copy');
|
|
|
+ target.blur();
|
|
|
+ document.body.removeChild(target);
|
|
|
+ saas.util.BaseUtil.showSuccessToast('复制链接成功');
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ }]
|
|
|
+ }]
|
|
|
+ });
|
|
|
+ win.show();
|
|
|
}
|
|
|
});
|