Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
cceea19e
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cceea19e
编写于
9月 10, 2020
作者:
F
fancy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
附件支持小程序
上级
16f540db
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
320 addition
and
160 deletion
+320
-160
o2web/source/x_component_Forum/Attachment.js
o2web/source/x_component_Forum/Attachment.js
+49
-2
o2web/source/x_component_cms_Xform/Attachment.js
o2web/source/x_component_cms_Xform/Attachment.js
+18
-1
o2web/source/x_component_process_Xform/Attachment.js
o2web/source/x_component_process_Xform/Attachment.js
+26
-0
o2web/source/x_component_process_Xform/Form.js
o2web/source/x_component_process_Xform/Form.js
+101
-97
o2web/source/x_desktop/cmsdocMobile.html
o2web/source/x_desktop/cmsdocMobile.html
+15
-0
o2web/source/x_desktop/forumdocMobile.html
o2web/source/x_desktop/forumdocMobile.html
+15
-0
o2web/source/x_desktop/js/cmsDocMobile.js
o2web/source/x_desktop/js/cmsDocMobile.js
+7
-0
o2web/source/x_desktop/js/forumDocMobile.js
o2web/source/x_desktop/js/forumDocMobile.js
+68
-60
o2web/source/x_desktop/workmobilewithaction.html
o2web/source/x_desktop/workmobilewithaction.html
+21
-0
未找到文件。
o2web/source/x_component_Forum/Attachment.js
浏览文件 @
cceea19e
...
...
@@ -224,12 +224,40 @@ MWF.xApplication.Forum.Attachment = new Class({
}
this
.
fileReplaceNode
.
click
();
},
//小程序文件是否支持打开
checkMiniProgramFile
:
function
(
ext
)
{
var
exts
=
[
"
doc
"
,
"
docx
"
,
"
xls
"
,
"
xlsx
"
,
"
ppt
"
,
"
pptx
"
,
"
pdf
"
];
for
(
var
i
=
0
;
i
<
exts
.
length
;
i
++
){
if
(
ext
===
exts
[
i
]){
return
true
;
}
}
return
false
;
},
downloadAttachment
:
function
(
e
,
node
,
attachments
)
{
//if( this.app.access.isAnonymousDynamic() ){
// this.app.openLoginForm( function(){ this.app.reload() }.bind(this) )
//}else {
attachments
.
each
(
function
(
att
)
{
this
.
actions
.
getAttachmentStream
(
att
.
data
.
id
,
this
.
options
.
documentId
);
if
(
window
.
o2android
&&
window
.
o2android
.
downloadAttachment
)
{
window
.
o2android
.
downloadAttachment
(
att
.
data
.
id
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
downloadAttachment
)
{
window
.
webkit
.
messageHandlers
.
downloadAttachment
.
postMessage
({
"
id
"
:
att
.
data
.
id
,
"
site
"
:
"
bbs
"
});
}
else
if
(
window
.
wx
&&
window
.
__wxjs_environment
===
'
miniprogram
'
&&
this
.
checkMiniProgramFile
(
att
.
data
.
extension
))
{
//微信小程序
wx
.
miniProgram
.
navigateTo
({
url
:
'
../file/download?attId=
'
+
att
.
data
.
id
+
'
&type=bbs&subjectId=
'
+
this
.
options
.
documentId
});
}
else
{
if
(
layout
.
mobile
)
{
//移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
this
.
actions
.
getAttachmentUrl
(
att
.
data
.
id
,
this
.
options
.
documentId
,
function
(
url
)
{
var
xtoken
=
Cookie
.
read
(
"
x-token
"
);
window
.
location
=
o2
.
filterUrl
(
url
+
"
?x-token=
"
+
xtoken
);
});
}
else
{
this
.
actions
.
getAttachmentStream
(
att
.
data
.
id
,
this
.
options
.
documentId
);
}
}
}.
bind
(
this
));
//}
},
...
...
@@ -238,7 +266,26 @@ MWF.xApplication.Forum.Attachment = new Class({
// this.app.openLoginForm( function(){ this.app.reload() }.bind(this) )
//}else{
attachments
.
each
(
function
(
att
)
{
this
.
actions
.
getAttachmentData
(
att
.
data
.
id
,
this
.
options
.
documentId
);
if
(
window
.
o2android
&&
window
.
o2android
.
downloadAttachment
)
{
window
.
o2android
.
downloadAttachment
(
att
.
data
.
id
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
downloadAttachment
)
{
window
.
webkit
.
messageHandlers
.
downloadAttachment
.
postMessage
({
"
id
"
:
att
.
data
.
id
,
"
site
"
:
"
bbs
"
});
}
else
if
(
window
.
wx
&&
window
.
__wxjs_environment
===
'
miniprogram
'
&&
this
.
checkMiniProgramFile
(
att
.
data
.
extension
))
{
//微信小程序
wx
.
miniProgram
.
navigateTo
({
url
:
'
../file/download?attId=
'
+
att
.
data
.
id
+
'
&type=bbs&subjectId=
'
+
this
.
options
.
documentId
});
}
else
{
if
(
layout
.
mobile
)
{
//移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
this
.
actions
.
getAttachmentUrl
(
att
.
data
.
id
,
this
.
options
.
documentId
,
function
(
url
)
{
var
xtoken
=
Cookie
.
read
(
"
x-token
"
);
window
.
location
=
o2
.
filterUrl
(
url
+
"
?x-token=
"
+
xtoken
);
});
}
else
{
this
.
actions
.
getAttachmentData
(
att
.
data
.
id
,
this
.
options
.
documentId
);
}
}
}.
bind
(
this
));
//}
},
...
...
o2web/source/x_component_cms_Xform/Attachment.js
浏览文件 @
cceea19e
...
...
@@ -389,7 +389,16 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment = new Class({
// }.bind(this));
},
//小程序文件是否支持打开
checkMiniProgramFile
:
function
(
ext
)
{
var
exts
=
[
"
doc
"
,
"
docx
"
,
"
xls
"
,
"
xlsx
"
,
"
ppt
"
,
"
pptx
"
,
"
pdf
"
];
for
(
var
i
=
0
;
i
<
exts
.
length
;
i
++
){
if
(
ext
===
exts
[
i
]){
return
true
;
}
}
return
false
;
},
downloadAttachment
:
function
(
e
,
node
,
attachments
)
{
if
(
this
.
form
.
businessData
.
document
)
{
attachments
.
each
(
function
(
att
)
{
...
...
@@ -397,6 +406,10 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment = new Class({
window
.
o2android
.
downloadAttachment
(
att
.
data
.
id
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
downloadAttachment
)
{
window
.
webkit
.
messageHandlers
.
downloadAttachment
.
postMessage
({
"
id
"
:
att
.
data
.
id
,
"
site
"
:
this
.
json
.
id
});
}
else
if
(
window
.
wx
&&
window
.
__wxjs_environment
===
'
miniprogram
'
&&
this
.
checkMiniProgramFile
(
att
.
data
.
extension
))
{
//微信小程序
wx
.
miniProgram
.
navigateTo
({
url
:
'
../file/download?attId=
'
+
att
.
data
.
id
+
'
&type=cms&documentId=
'
+
this
.
form
.
businessData
.
document
.
id
});
}
else
{
if
(
layout
.
mobile
)
{
//移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
...
...
@@ -418,6 +431,10 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment = new Class({
window
.
o2android
.
downloadAttachment
(
att
.
data
.
id
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
downloadAttachment
)
{
window
.
webkit
.
messageHandlers
.
downloadAttachment
.
postMessage
({
"
id
"
:
att
.
data
.
id
,
"
site
"
:
this
.
json
.
id
});
}
else
if
(
window
.
wx
&&
window
.
__wxjs_environment
===
'
miniprogram
'
&&
this
.
checkMiniProgramFile
(
att
.
data
.
extension
))
{
//微信小程序
wx
.
miniProgram
.
navigateTo
({
url
:
'
../file/download?attId=
'
+
att
.
data
.
id
+
'
&type=cms&documentId=
'
+
this
.
form
.
businessData
.
document
.
id
});
}
else
{
if
(
layout
.
mobile
)
{
//移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
...
...
o2web/source/x_component_process_Xform/Attachment.js
浏览文件 @
cceea19e
...
...
@@ -1451,6 +1451,16 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
return
true
;
}
},
//小程序文件是否支持打开
checkMiniProgramFile
:
function
(
ext
)
{
var
exts
=
[
"
doc
"
,
"
docx
"
,
"
xls
"
,
"
xlsx
"
,
"
ppt
"
,
"
pptx
"
,
"
pdf
"
];
for
(
var
i
=
0
;
i
<
exts
.
length
;
i
++
){
if
(
ext
===
exts
[
i
]){
return
true
;
}
}
return
false
;
},
downloadAttachment
:
function
(
e
,
node
,
attachments
)
{
if
(
this
.
form
.
businessData
.
work
&&
!
this
.
form
.
businessData
.
work
.
completedTime
)
{
attachments
.
each
(
function
(
att
)
{
...
...
@@ -1459,6 +1469,10 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
window
.
o2android
.
downloadAttachment
(
att
.
data
.
id
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
downloadAttachment
)
{
window
.
webkit
.
messageHandlers
.
downloadAttachment
.
postMessage
({
"
id
"
:
att
.
data
.
id
,
"
site
"
:
this
.
json
.
id
});
}
else
if
(
window
.
wx
&&
window
.
__wxjs_environment
===
'
miniprogram
'
&&
this
.
checkMiniProgramFile
(
att
.
data
.
extension
))
{
//微信小程序
wx
.
miniProgram
.
navigateTo
({
url
:
'
../file/download?attId=
'
+
att
.
data
.
id
+
'
&type=work&work=
'
+
this
.
form
.
businessData
.
work
.
id
});
}
else
{
if
(
layout
.
mobile
)
{
//移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
...
...
@@ -1479,6 +1493,10 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
window
.
o2android
.
downloadAttachment
(
att
.
data
.
id
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
downloadAttachment
)
{
window
.
webkit
.
messageHandlers
.
downloadAttachment
.
postMessage
({
"
id
"
:
att
.
data
.
id
,
"
site
"
:
this
.
json
.
id
});
}
else
if
(
window
.
wx
&&
window
.
__wxjs_environment
===
'
miniprogram
'
&&
this
.
checkMiniProgramFile
(
att
.
data
.
extension
))
{
//微信小程序
wx
.
miniProgram
.
navigateTo
({
url
:
'
../file/download?attId=
'
+
att
.
data
.
id
+
'
&type=work&workCompleted=
'
+
this
.
form
.
businessData
.
workCompleted
.
id
});
}
else
{
if
(
layout
.
mobile
)
{
//移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
...
...
@@ -1502,6 +1520,10 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
window
.
o2android
.
downloadAttachment
(
att
.
data
.
id
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
downloadAttachment
)
{
window
.
webkit
.
messageHandlers
.
downloadAttachment
.
postMessage
({
"
id
"
:
att
.
data
.
id
,
"
site
"
:
this
.
json
.
id
});
}
else
if
(
window
.
wx
&&
window
.
__wxjs_environment
===
'
miniprogram
'
&&
this
.
checkMiniProgramFile
(
att
.
data
.
extension
))
{
//微信小程序
wx
.
miniProgram
.
navigateTo
({
url
:
'
../file/download?attId=
'
+
att
.
data
.
id
+
'
&type=work&work=
'
+
this
.
form
.
businessData
.
work
.
id
});
}
else
{
if
(
layout
.
mobile
)
{
//移动端 企业微信 钉钉 用本地打开 防止弹出自带浏览器 无权限问题
...
...
@@ -1523,6 +1545,10 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
window
.
o2android
.
downloadAttachment
(
att
.
data
.
id
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
downloadAttachment
)
{
window
.
webkit
.
messageHandlers
.
downloadAttachment
.
postMessage
({
"
id
"
:
att
.
data
.
id
,
"
site
"
:
this
.
json
.
id
});
}
else
if
(
window
.
wx
&&
window
.
__wxjs_environment
===
'
miniprogram
'
&&
this
.
checkMiniProgramFile
(
att
.
data
.
extension
))
{
//微信小程序
wx
.
miniProgram
.
navigateTo
({
url
:
'
../file/download?attId=
'
+
att
.
data
.
id
+
'
&type=work&workCompleted=
'
+
this
.
form
.
businessData
.
workCompleted
.
id
});
}
else
{
if
(
layout
.
mobile
)
{
...
...
o2web/source/x_component_process_Xform/Form.js
浏览文件 @
cceea19e
此差异已折叠。
点击以展开。
o2web/source/x_desktop/cmsdocMobile.html
浏览文件 @
cceea19e
...
...
@@ -23,6 +23,21 @@
<body
style=
"overflow: auto; margin:0px"
>
<div
id=
"layout"
style=
"overflow: auto"
></div>
<script>
//动态添加 微信的 jssdk
function
addWxJsSdk
()
{
var
script
=
document
.
createElement
(
"
script
"
);
script
.
type
=
"
text/javascript
"
;
script
.
src
=
"
http://res.wx.qq.com/open/js/jweixin-1.6.0.js
"
;
document
.
body
.
appendChild
(
script
);
}
//微信的WeixinJSBridgeReady加载完成后进行判断
if
(
!
window
.
WeixinJSBridge
||
!
WeixinJSBridge
.
invoke
)
{
document
.
addEventListener
(
'
WeixinJSBridgeReady
'
,
addWxJsSdk
,
false
);
}
else
{
addWxJsSdk
();
}
</script>
</body>
</html>
\ No newline at end of file
o2web/source/x_desktop/forumdocMobile.html
浏览文件 @
cceea19e
...
...
@@ -20,5 +20,20 @@
</head>
<body
style=
"overflow: auto; margin:0px"
>
<div
id=
"layout"
style=
"overflow: auto"
></div>
<script>
//动态添加 微信的 jssdk
function
addWxJsSdk
()
{
var
script
=
document
.
createElement
(
"
script
"
);
script
.
type
=
"
text/javascript
"
;
script
.
src
=
"
http://res.wx.qq.com/open/js/jweixin-1.6.0.js
"
;
document
.
body
.
appendChild
(
script
);
}
//微信的WeixinJSBridgeReady加载完成后进行判断
if
(
!
window
.
WeixinJSBridge
||
!
WeixinJSBridge
.
invoke
)
{
document
.
addEventListener
(
'
WeixinJSBridgeReady
'
,
addWxJsSdk
,
false
);
}
else
{
addWxJsSdk
();
}
</script>
</body>
</html>
o2web/source/x_desktop/js/cmsDocMobile.js
浏览文件 @
cceea19e
...
...
@@ -13,6 +13,13 @@ o2.addReady(function () {
MWF
.
require
(
"
MWF.xDesktop.Common
"
,
null
,
false
);
MWF
.
require
(
"
MWF.widget.Mask
"
,
null
,
false
);
//修改支持x-token
var
uri
=
new
URI
(
window
.
location
.
href
);
var
options
=
uri
.
get
(
"
data
"
);
if
(
options
[
"
x-token
"
])
{
Cookie
.
write
(
"
x-token
"
,
options
[
"
x-token
"
]);
}
layout
.
mask
=
new
MWF
.
widget
.
Mask
({
"
style
"
:
"
desktop
"
});
layout
.
mask
.
load
();
...
...
o2web/source/x_desktop/js/forumDocMobile.js
浏览文件 @
cceea19e
...
...
@@ -5,24 +5,32 @@ var locate = window.location;
layout
.
protocol
=
locate
.
protocol
;
var
href
=
locate
.
href
;
layout
.
session
=
layout
.
session
||
{};
if
(
href
.
indexOf
(
"
debugger
"
)
!=
-
1
)
layout
.
debugger
=
true
;
o2
.
addReady
(
function
()
{
o2
.
load
([
"
../o2_lib/mootools/plugin/mBox.Notice.js
"
,
"
../o2_lib/mootools/plugin/mBox.Tooltip.js
"
],
{
"
sequence
"
:
true
},
function
()
{
if
(
href
.
indexOf
(
"
debugger
"
)
!=
-
1
)
layout
.
debugger
=
true
;
o2
.
addReady
(
function
()
{
o2
.
load
([
"
../o2_lib/mootools/plugin/mBox.Notice.js
"
,
"
../o2_lib/mootools/plugin/mBox.Tooltip.js
"
],
{
"
sequence
"
:
true
},
function
()
{
//MWF.defaultPath = "../x_desktop"+MWF.defaultPath;
//修改支持x-token
var
uri
=
new
URI
(
window
.
location
.
href
);
var
options
=
uri
.
get
(
"
data
"
);
if
(
options
[
"
x-token
"
])
{
Cookie
.
write
(
"
x-token
"
,
options
[
"
x-token
"
]);
}
MWF
.
loadLP
(
"
zh-cn
"
);
MWF
.
require
(
"
MWF.widget.Mask
"
,
null
,
false
);
layout
.
mask
=
new
MWF
.
widget
.
Mask
({
"
style
"
:
"
desktop
"
});
layout
.
mask
=
new
MWF
.
widget
.
Mask
({
"
style
"
:
"
desktop
"
});
layout
.
mask
.
load
();
MWF
.
require
(
"
MWF.xDesktop.Layout
"
,
function
()
{
MWF
.
require
(
"
MWF.xDesktop.Authentication
"
,
null
,
false
);
MWF
.
require
(
"
MWF.xDesktop.Common
"
,
null
,
false
);
MWF
.
require
(
"
MWF.xAction.RestActions
"
,
null
,
false
);
MWF
.
require
(
"
MWF.xDesktop.Layout
"
,
function
()
{
MWF
.
require
(
"
MWF.xDesktop.Authentication
"
,
null
,
false
);
MWF
.
require
(
"
MWF.xDesktop.Common
"
,
null
,
false
);
MWF
.
require
(
"
MWF.xAction.RestActions
"
,
null
,
false
);
(
function
()
{
layout
.
load
=
function
()
{
if
(
this
.
isAuthentication
()){
(
function
()
{
layout
.
load
=
function
()
{
if
(
this
.
isAuthentication
())
{
//var preview = window.frameElement.retrieve("preview");
//layout.desktop = window.frameElement.ownerDocument.window.layout.desktop;
//
...
...
@@ -41,7 +49,7 @@ o2.addReady(function(){
// MWF.xDesktop.requireApp("Forum", "Actions.RestActions", null, false);
// this.action = new MWF.xApplication.Forum.Actions.RestActions();
this
.
action
=
MWF
.
Actions
.
get
(
"
x_bbs_assemble_control
"
);
MWF
.
xDesktop
.
requireApp
(
"
Forum
"
,
"
lp.
"
+
MWF
.
language
,
null
,
false
);
MWF
.
xDesktop
.
requireApp
(
"
Forum
"
,
"
lp.
"
+
MWF
.
language
,
null
,
false
);
//MWF.xDesktop.requireApp("Forum", "lp."+MWF.language, {
// "onRequestFailure": function(){
// MWF.xDesktop.requireApp("Forum", "lp.zh-cn", null, false);
...
...
@@ -60,25 +68,25 @@ o2.addReady(function(){
//});
}
};
layout
.
close
=
function
()
{
$
(
document
.
body
).
addEvent
(
"
click
"
,
function
(){
window
.
close
();
});
layout
.
close
=
function
()
{
$
(
document
.
body
).
addEvent
(
"
click
"
,
function
()
{
window
.
close
();
});
};
layout
.
_loadCss
=
function
()
{
layout
.
_loadCss
=
function
()
{
var
key
=
encodeURIComponent
(
this
.
cssPath
);
if
(
MWF
.
widget
.
css
[
key
]){
if
(
MWF
.
widget
.
css
[
key
])
{
this
.
css
=
MWF
.
widget
.
css
[
key
];
}
else
{
}
else
{
var
r
=
new
Request
.
JSON
({
url
:
this
.
cssPath
,
secure
:
false
,
async
:
false
,
method
:
"
get
"
,
noCache
:
false
,
onSuccess
:
function
(
responseJSON
,
responseText
)
{
onSuccess
:
function
(
responseJSON
,
responseText
)
{
this
.
css
=
responseJSON
;
MWF
.
widget
.
css
[
key
]
=
responseJSON
;
}.
bind
(
this
),
onError
:
function
(
text
,
error
)
{
onError
:
function
(
text
,
error
)
{
alert
(
error
+
text
);
}
});
...
...
@@ -123,48 +131,48 @@ o2.addReady(function(){
// }
//
//},
layout
.
getIds
=
function
()
{
layout
.
getIds
=
function
()
{
var
href
=
window
.
location
.
href
;
var
qStr
=
href
.
substr
(
href
.
indexOf
(
"
?
"
)
+
1
,
href
.
length
);
var
qStr
=
href
.
substr
(
href
.
indexOf
(
"
?
"
)
+
1
,
href
.
length
);
var
qDatas
=
qStr
.
split
(
"
&
"
);
var
obj
=
{};
qDatas
.
each
(
function
(
d
)
{
qDatas
.
each
(
function
(
d
)
{
var
q
=
d
.
split
(
"
=
"
);
obj
[
q
[
0
].
toLowerCase
()]
=
q
[
1
];
});
return
obj
;
};
layout
.
errorWork
=
function
()
{
layout
.
errorWork
=
function
()
{
if
(
this
.
mask
)
this
.
mask
.
hide
();
this
.
node
.
set
(
"
text
"
,
"
openError
"
);
};
layout
.
openForumDoc
=
function
()
{
MWF
.
xDesktop
.
requireApp
(
"
ForumDocument
"
,
"
Mobile
"
,
function
()
{
layout
.
openForumDoc
=
function
()
{
MWF
.
xDesktop
.
requireApp
(
"
ForumDocument
"
,
"
Mobile
"
,
function
()
{
this
.
forumDoc
=
new
MWF
.
xApplication
.
ForumDocument
.
Mobile
(
this
.
node
,
this
,
this
.
action
,
this
.
lp
,
this
.
css
,
{
id
:
this
.
options
.
id
,
viewPageNum
:
this
.
options
.
page
id
:
this
.
options
.
id
,
viewPageNum
:
this
.
options
.
page
});
this
.
forumDoc
.
load
();
if
(
this
.
mask
)
this
.
mask
.
hide
();
}.
bind
(
this
));
};
layout
.
showReply
=
function
(
id
)
{
this
.
forumDoc
.
showReply
(
id
);
layout
.
showReply
=
function
(
id
)
{
this
.
forumDoc
.
showReply
(
id
);
};
layout
.
isAuthentication
=
function
()
{
layout
.
isAuthentication
=
function
()
{
layout
.
authentication
=
new
MWF
.
xDesktop
.
Authentication
({
"
onLogin
"
:
layout
.
load
.
bind
(
layout
)
});
var
returnValue
=
true
;
this
.
authentication
.
isAuthenticated
(
function
(
json
)
{
this
.
authentication
.
isAuthenticated
(
function
(
json
)
{
this
.
user
=
json
.
data
;
layout
.
session
.
user
=
json
.
data
;
}.
bind
(
this
),
function
()
{
}.
bind
(
this
),
function
()
{
this
.
authentication
.
loadLogin
(
this
.
node
);
returnValue
=
false
;
}.
bind
(
this
));
...
...
@@ -228,27 +236,27 @@ o2.addReady(function(){
// if (callback) callback();
// }.bind(this));
//};
layout
.
confirm
=
function
(
type
,
e
,
title
,
text
,
width
,
height
,
ok
,
cancel
,
callback
,
mask
,
style
)
{
MWF
.
require
(
"
MWF.xDesktop.Dialog
"
,
function
()
{
layout
.
confirm
=
function
(
type
,
e
,
title
,
text
,
width
,
height
,
ok
,
cancel
,
callback
,
mask
,
style
)
{
MWF
.
require
(
"
MWF.xDesktop.Dialog
"
,
function
()
{
var
size
=
this
.
content
.
getSize
();
var
x
=
0
;
var
y
=
0
;
if
(
typeOf
(
e
)
==
"
element
"
)
{
if
(
typeOf
(
e
)
==
"
element
"
)
{
var
position
=
e
.
getPosition
(
this
.
content
);
x
=
position
.
x
;
y
=
position
.
y
;
}
else
{
if
(
Browser
.
name
==
"
firefox
"
)
{
}
else
{
if
(
Browser
.
name
==
"
firefox
"
)
{
x
=
parseFloat
(
e
.
event
.
clientX
);
y
=
parseFloat
(
e
.
event
.
clientY
);
}
else
{
}
else
{
x
=
parseFloat
(
e
.
event
.
x
);
y
=
parseFloat
(
e
.
event
.
y
);
}
// if (!x || !y){
if
(
e
.
target
){
if
(
e
.
target
)
{
var
position
=
e
.
target
.
getPosition
(
this
.
content
);
x
=
position
.
x
;
y
=
position
.
y
;
...
...
@@ -256,30 +264,30 @@ o2.addReady(function(){
// }
}
if
(
x
+
parseFloat
(
width
)
>
size
.
x
)
{
x
=
x
-
parseFloat
(
width
);
if
(
x
+
parseFloat
(
width
)
>
size
.
x
)
{
x
=
x
-
parseFloat
(
width
);
}
if
(
x
<
0
)
x
=
0
;
if
(
y
+
parseFloat
(
height
)
>
size
.
y
)
{
y
=
y
-
parseFloat
(
height
);
if
(
x
<
0
)
x
=
0
;
if
(
y
+
parseFloat
(
height
)
>
size
.
y
)
{
y
=
y
-
parseFloat
(
height
);
}
if
(
y
<
0
)
y
=
0
;
if
(
y
<
0
)
y
=
0
;
var
ctext
=
""
;
var
chtml
=
""
;
if
(
typeOf
(
text
).
toLowerCase
()
==
"
object
"
)
{
if
(
typeOf
(
text
).
toLowerCase
()
==
"
object
"
)
{
ctext
=
text
.
text
;
chtml
=
text
.
html
;
}
else
{
}
else
{
ctext
=
text
;
}
var
dlg
=
new
MWF
.
xDesktop
.
Dialog
({
"
title
"
:
title
,
"
style
"
:
style
||
"
flat
"
,
"
top
"
:
y
,
"
left
"
:
x
-
20
,
"
fromTop
"
:
y
,
"
fromLeft
"
:
x
-
20
,
"
left
"
:
x
-
20
,
"
fromTop
"
:
y
,
"
fromLeft
"
:
x
-
20
,
"
width
"
:
width
,
"
height
"
:
height
,
"
text
"
:
ctext
,
...
...
@@ -298,7 +306,7 @@ o2.addReady(function(){
]
});
switch
(
type
.
toLowerCase
()){
switch
(
type
.
toLowerCase
())
{
case
"
success
"
:
dlg
.
content
.
setStyle
(
"
background-image
"
,
"
url(data:image/png;base64,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)
"
);
break
;
...
...
@@ -318,16 +326,16 @@ o2.addReady(function(){
if
(
callback
)
callback
(
dlg
);
}.
bind
(
this
));
};
layout
.
notice
=
function
(
content
,
type
,
target
,
where
,
offset
)
{
if
(
!
where
)
where
=
{
"
x
"
:
"
right
"
,
"
y
"
:
"
top
"
};
layout
.
notice
=
function
(
content
,
type
,
target
,
where
,
offset
)
{
if
(
!
where
)
where
=
{
"
x
"
:
"
right
"
,
"
y
"
:
"
top
"
};
if
(
!
target
)
target
=
this
.
content
;
if
(
!
type
)
type
=
"
ok
"
;
var
noticeTarget
=
target
||
$
(
document
.
body
);
var
off
=
offset
;
if
(
!
off
){
if
(
!
off
)
{
off
=
{
x
:
10
,
y
:
where
.
y
.
toString
().
toLowerCase
()
==
"
bottom
"
?
10
:
10
y
:
where
.
y
.
toString
().
toLowerCase
()
==
"
bottom
"
?
10
:
10
};
}
...
...
@@ -336,22 +344,22 @@ o2.addReady(function(){
position
:
where
,
move
:
false
,
target
:
noticeTarget
,
delayClose
:
(
type
==
"
error
"
)
?
10000
:
5000
,
delayClose
:
(
type
==
"
error
"
)
?
10000
:
5000
,
offset
:
off
,
content
:
content
});
};
layout
.
reload
=
function
()
{
layout
.
reload
=
function
()
{
window
.
location
.
reload
();
};
layout
.
openApplication
=
function
()
{
layout
.
openApplication
=
function
()
{
};
MWF
.
getJSON
(
"
res/config/config.json
"
,
function
(
config
)
{
MWF
.
getJSON
(
"
res/config/config.json
"
,
function
(
config
)
{
layout
.
config
=
config
;
MWF
.
xDesktop
.
getServiceAddress
(
layout
.
config
,
function
(
service
,
center
)
{
MWF
.
xDesktop
.
getServiceAddress
(
layout
.
config
,
function
(
service
,
center
)
{
layout
.
serviceAddressList
=
service
;
layout
.
centerServer
=
center
;
layout
.
load
();
...
...
o2web/source/x_desktop/workmobilewithaction.html
浏览文件 @
cceea19e
...
...
@@ -35,6 +35,27 @@
style=
"height: 4em;overflow: hidden; border-top: 1px solid #dfdfdf; display: block; position: absolute; bottom: 0px; background: #ffffff; width: 100%; z-index:100;"
>
</div>
<script>
//动态添加 微信的 jssdk
function
addWxJsSdk
()
{
var
script
=
document
.
createElement
(
"
script
"
);
script
.
type
=
"
text/javascript
"
;
script
.
src
=
"
http://res.wx.qq.com/open/js/jweixin-1.6.0.js
"
;
document
.
body
.
appendChild
(
script
);
}
//判断是否是在小程序中
// function ready() {
// if (window.__wxjs_environment === 'miniprogram') { // true
// addWxJsSdk();
// }
// }
//微信的WeixinJSBridgeReady加载完成后进行判断
if
(
!
window
.
WeixinJSBridge
||
!
WeixinJSBridge
.
invoke
)
{
document
.
addEventListener
(
'
WeixinJSBridgeReady
'
,
addWxJsSdk
,
false
);
}
else
{
addWxJsSdk
();
}
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录