Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
ba84c791
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,发现更多精彩内容 >>
提交
ba84c791
编写于
6月 18, 2021
作者:
L
luojing
提交者:
NoSubject
6月 21, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
应用市场显示及bug修复
(cherry picked from commit
64dcfccd
)
上级
d4677acb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
157 addition
and
13 deletion
+157
-13
o2web/source/x_component_AppMarketV2/ApplicationsContent.js
o2web/source/x_component_AppMarketV2/ApplicationsContent.js
+115
-4
o2web/source/x_component_AppMarketV2_Application/$Main/default/style.css
...component_AppMarketV2_Application/$Main/default/style.css
+2
-1
o2web/source/x_component_AppMarketV2_Application/Comment.js
o2web/source/x_component_AppMarketV2_Application/Comment.js
+8
-6
o2web/source/x_component_AppMarketV2_Application/Main.js
o2web/source/x_component_AppMarketV2_Application/Main.js
+32
-2
未找到文件。
o2web/source/x_component_AppMarketV2/ApplicationsContent.js
浏览文件 @
ba84c791
...
...
@@ -95,6 +95,8 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
this
.
app
=
this
.
content
.
app
;
this
.
actions
=
this
.
app
.
actions
;
this
.
container
=
this
.
content
.
container
;
this
.
collectToken
=
""
;
this
.
collectUrl
=
""
;
this
.
page
=
1
;
this
.
pageSize
=
100
;
this
.
load
();
...
...
@@ -111,9 +113,22 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
}
this
.
fireEvent
(
"
load
"
);
}.
bind
(
this
));
},
loadApplications
:
function
(){
this
.
emptyLoadContent
();
if
(
this
.
collectToken
==
""
||
this
.
collectUrl
==
""
){
//先登录collcect
this
.
actions
.
CollectAction
.
login
(
//平台封装好的方法
function
(
json
){
//服务调用成功的回调函数, json为服务传回的数据
if
(
json
.
type
&&
json
.
type
==
"
success
"
){
data
=
json
.
data
;
//为变量data赋值
this
.
collectUrl
=
data
.
collectUrl
;
this
.
collectToken
=
data
.
collectToken
;
}
}.
bind
(
this
),
null
,
false
//同步执行
);
}
this
.
actions
.
MarketAction
.
listPaging
(
this
.
page
,
this
.
pageSize
,
this
.
content
.
querydata
,
function
(
json
){
if
(
json
.
data
&&
json
.
data
.
length
){
this
.
content
.
currentcategory
[
"
name
"
]
=
this
.
content
.
querydata
.
category
==
""
||!
(
this
.
content
.
querydata
.
category
)?
this
.
app
.
lp
.
all
:
this
.
content
.
querydata
.
category
;
...
...
@@ -122,6 +137,7 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
}
this
.
fireEvent
(
"
load
"
);
}.
bind
(
this
));
this
.
loadBbsInfo
(
this
);
},
reload
:
function
(){
if
(
!
this
.
content
.
isLoading
)
{
...
...
@@ -147,9 +163,58 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
}.
bind
(
this
))
},
loadBbsInfo
:
function
(
content
){
var
json
=
null
;
debugger
;
var
commenturl
=
content
.
collectUrl
+
'
/o2_collect_assemble/jaxrs/collect/config/key/(0)?time=
'
+
(
new
Date
()).
getMilliseconds
();
debugger
;
var
res
=
new
Request
.
JSON
({
url
:
commenturl
,
headers
:
{
'
x-debugger
'
:
true
,
'
Authorization
'
:
content
.
collectToken
,
'
c-token
'
:
content
.
collectToken
},
secure
:
false
,
method
:
"
get
"
,
async
:
false
,
withCredentials
:
true
,
contentType
:
'
application/json
'
,
crossDomain
:
true
,
onSuccess
:
function
(
responseJSON
,
responseText
){
json
=
responseJSON
;
debugger
;
this
.
bbsUrlPath
=
json
.
data
.
bbsUrlPath
;
this
.
bbsUrl
=
json
.
data
.
bbsUrl
;
}.
bind
(
this
),
onFailure
:
function
(
xhr
){
o2
.
runCallback
(
callback
,
"
requestFailure
"
,
[
xhr
]);
}.
bind
(
this
),
onError
:
function
(
text
,
error
){
o2
.
runCallback
(
callback
,
"
error
"
,
[
text
,
error
]);
}.
bind
(
this
)
});
res
.
send
();
},
loadCommentsGrade
:
function
(
appdata
){
debugger
;
var
json
=
null
;
var
commenturl
=
this
.
bbsUrlPath
+
'
/x_bbs_assemble_control/jaxrs/subject/statgrade/sectionName/
'
+
encodeURI
(
this
.
app
.
lp
.
title
)
+
'
/subjectType/
'
+
encodeURI
(
appdata
.
name
)
+
'
?time=
'
+
(
new
Date
()).
getMilliseconds
();
var
res
=
new
Request
.
JSON
({
url
:
commenturl
,
headers
:
{
'
x-debugger
'
:
true
,
'
Authorization
'
:
this
.
collectToken
,
'
c-token
'
:
this
.
collectToken
},
secure
:
false
,
method
:
"
get
"
,
async
:
false
,
withCredentials
:
true
,
contentType
:
'
application/json
'
,
crossDomain
:
true
,
onSuccess
:
function
(
responseJSON
,
responseText
){
debugger
;
json
=
responseJSON
;
}.
bind
(
this
)
});
res
.
send
();
return
json
;
},
loadCertainCategory
:
function
(
categorysdiv
,
d
){
var
_self
=
this
;
var
categorydiv
=
new
Element
(
"
span
"
,{
"
text
"
:
d
,
"
class
"
:
"
o2_appmarket_appcategory
"
}).
inject
(
categorysdiv
);
categorydiv
.
store
(
"
data
"
,
d
);
if
(
_self
.
content
.
querydata
[
"
category
"
]){
...
...
@@ -203,6 +268,9 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
},
loadCertainApplication
:
function
(
appsdiv
,
d
,
i
,
rowappnum
,
rowappmargin
){
//app 排列 begin
debugger
;
var
gradeData
=
this
.
loadCommentsGrade
(
d
);
debugger
;
var
applicationdiv
=
new
Element
(
"
div
"
,{
"
class
"
:
"
o2_appmarket_application
"
}).
inject
(
appsdiv
);
if
((
i
+
1
)
%
rowappnum
!=
0
){
...
...
@@ -213,13 +281,31 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
var
applicationicon
=
new
Element
(
"
div
"
,{
"
class
"
:
"
o2_appmarket_application_icon
"
}).
inject
(
applicationdiv
);
applicationicon
.
setStyle
(
"
background-image
"
,
"
url(data:image/png;base64,
"
+
d
.
icon
+
"
)
"
);
var
applicationinfo
=
new
Element
(
"
div
"
,{
"
class
"
:
"
o2_appmarket_application_info
"
}).
inject
(
applicationdiv
);
var
applicationinfo_name
=
new
Element
(
"
div
"
,{
"
text
"
:
d
.
name
,
"
class
"
:
"
o2_appmarket_application_info_name
"
}).
inject
(
applicationinfo
);
var
applicationinfo_name
=
new
Element
(
"
div
"
,{
"
text
"
:
d
.
name
,
"
class
"
:
"
o2_appmarket_application_info_name
"
,
"
title
"
:
d
.
name
}).
inject
(
applicationinfo
);
//var applicationinfo_recommend = new Element("div",{"text":d.recommend,"class":"o2_appmarket_application_info_recommend"}).inject(applicationinfo);
//推荐指数改为显示评星
var
applicationinfo_star
=
new
Element
(
"
div
"
,{
"
class
"
:
"
o2_appmarket_application_info_recommend
"
}).
inject
(
applicationinfo
);
var
grade
=
d
.
grade
;
var
commentcount
=
0
;
var
grade
=
0
;
var
totalgrade
=
0
;
var
commentratiolist
=
gradeData
.
data
;
var
gradeList
=
[
"
0
"
,
"
0
"
,
"
0
"
,
"
0
"
,
"
0
"
];
commentratiolist
.
each
(
function
(
pergrade
){
gradeList
[
parseInt
(
pergrade
.
grade
)
-
1
]
=
pergrade
.
count
;
commentcount
+=
parseInt
(
pergrade
.
count
)
}.
bind
(
this
));
gradeList
.
each
(
function
(
pergrade
,
index
){
totalgrade
+=
parseInt
(
pergrade
)
*
(
index
+
1
)
})
if
(
commentcount
>
0
){
grade
=
this
.
numberFix
(
totalgrade
/
commentcount
,
1
)
}
var
intgrade
=
parseInt
(
grade
);
var
dotgrade
=
grade
-
intgrade
;
/*var grade = d.grade;
var intgrade = parseInt(grade);
var
dotgrade
=
grade
-
intgrade
;
var dotgrade = grade - intgrade;
*/
for
(
var
tmpnum
=
0
;
tmpnum
<
intgrade
;
tmpnum
++
){
new
Element
(
"
img
"
,{
"
src
"
:
this
.
app
.
iconPath
+
"
blackfiveangular.png
"
,
"
class
"
:
"
o2_appmarket_application_info_starpic
"
}).
inject
(
applicationinfo_star
)
}
...
...
@@ -317,6 +403,31 @@ MWF.xApplication.AppMarketV2.ApplicationsContent.Applications= new Class({
});
//if (mask) this.mask.loadNode(node);
},
numberFix
:
function
(
data
,
n
){
var
numbers
=
''
;
// 保留几位小数后面添加几个0
for
(
var
i
=
0
;
i
<
n
;
i
++
)
{
numbers
+=
'
0
'
;
}
var
s
=
1
+
numbers
;
// 如果是整数需要添加后面的0
var
spot
=
"
.
"
+
numbers
;
// Math.round四舍五入
// parseFloat() 函数可解析一个字符串,并返回一个浮点数。
var
value
=
Math
.
round
(
parseFloat
(
data
)
*
s
)
/
s
;
// 从小数点后面进行分割
var
d
=
value
.
toString
().
split
(
"
.
"
);
if
(
d
.
length
==
1
)
{
value
=
value
.
toString
();
return
value
;
}
if
(
d
.
length
>
1
)
{
if
(
d
[
1
].
length
<
n
)
{
value
=
value
.
toString
()
+
"
0
"
;
}
return
value
;
}
},
clearLoading
:
function
(){
/*
if (this.loadingAreaNode){
...
...
o2web/source/x_component_AppMarketV2_Application/$Main/default/style.css
浏览文件 @
ba84c791
...
...
@@ -428,7 +428,8 @@
font-family
:
MicrosoftYaHei
;
color
:
rgba
(
51
,
51
,
51
,
1
);
line-height
:
21px
;
padding-top
:
10px
;
overflow
:
hidden
;
}
.comment_dlg_title
{
width
:
60px
;
...
...
o2web/source/x_component_AppMarketV2_Application/Comment.js
浏览文件 @
ba84c791
...
...
@@ -63,7 +63,6 @@ MWF.xApplication.AppMarketV2.Application.Comment.ViewPage= new Class({
data
=
json
.
data
;
//为变量data赋值
this
.
app
.
collectUrl
=
data
.
collectUrl
;
this
.
app
.
collectToken
=
data
.
collectToken
;
this
.
loadBbsInfo
(
this
);
this
.
loadCommentsGrade
(
this
,
this
.
commentsGrade
.
bind
(
this
));
//this.loadCommentPower(this,this.commentsPower.bind(this));
this
.
loadCommentPower
(
this
);
...
...
@@ -72,7 +71,7 @@ MWF.xApplication.AppMarketV2.Application.Comment.ViewPage= new Class({
}.
bind
(
this
),
null
,
false
//同步执行
);
}
else
{
this
.
loadBbsInfo
(
this
);
//
this.loadBbsInfo(this);
this
.
loadCommentsGrade
(
this
,
this
.
commentsGrade
.
bind
(
this
));
//this.loadCommentPower(this,this.commentsPower.bind(this));
this
.
loadCommentPower
(
this
);
...
...
@@ -113,14 +112,15 @@ MWF.xApplication.AppMarketV2.Application.Comment.ViewPage= new Class({
res
.
send
();
},
loadCommentsGrade
:
function
(
content
,
callback
){
this
.
loadBbsInfo
(
content
);
var
json
=
null
;
var
commenturl
=
content
.
app
.
lp
.
commentp
ath
+
'
/x_bbs_assemble_control/jaxrs/subject/statgrade/sectionName/
'
+
encodeURI
(
content
.
app
.
lp
.
title
)
+
'
/subjectType/
'
+
encodeURI
(
content
.
appdata
.
name
)
+
'
?time=
'
+
(
new
Date
()).
getMilliseconds
();
var
commenturl
=
this
.
bbsUrlP
ath
+
'
/x_bbs_assemble_control/jaxrs/subject/statgrade/sectionName/
'
+
encodeURI
(
content
.
app
.
lp
.
title
)
+
'
/subjectType/
'
+
encodeURI
(
content
.
appdata
.
name
)
+
'
?time=
'
+
(
new
Date
()).
getMilliseconds
();
var
res
=
new
Request
.
JSON
({
url
:
commenturl
,
headers
:
{
'
x-debugger
'
:
true
,
'
Authorization
'
:
content
.
app
.
collectToken
,
'
c-token
'
:
content
.
app
.
collectToken
},
secure
:
false
,
method
:
"
get
"
,
async
:
tru
e
,
async
:
fals
e
,
withCredentials
:
true
,
contentType
:
'
application/json
'
,
crossDomain
:
true
,
...
...
@@ -152,7 +152,8 @@ MWF.xApplication.AppMarketV2.Application.Comment.ViewPage= new Class({
}).
inject
(
commentbuttondiv
);
commentbuttondiv
.
addEvents
({
"
click
"
:
function
(
e
){
window
.
open
(
this
.
bbsUrl
);
debugger
;
window
.
open
(
content
.
bbsUrl
);
}
})
},
...
...
@@ -382,7 +383,7 @@ MWF.xApplication.AppMarketV2.Application.Comment.ViewPage= new Class({
var
iconpersondiv
=
new
Element
(
"
div
"
,{
"
class
"
:
"
o2_appmarket_application_comment_content_left_icon
"
}).
inject
(
commentcontentleft
);
new
Element
(
"
img
"
,{
"
src
"
:
this
.
content
.
iconPath
+
"
icon_men.png
"
}).
inject
(
iconpersondiv
);
debugger
;
new
Element
(
"
div
"
,{
"
class
"
:
"
o2_appmarket_application_comment_content_left_name
"
,
"
text
"
:
percomment
.
creatorName
}).
inject
(
commentcontentleft
);
new
Element
(
"
div
"
,{
"
class
"
:
"
o2_appmarket_application_comment_content_left_name
"
,
"
text
"
:
percomment
.
creatorName
Short
}).
inject
(
commentcontentleft
);
var
commentcontentright
=
new
Element
(
"
div
"
,{
"
class
"
:
"
o2_appmarket_application_comment_content_right
"
}).
inject
(
commentcontentdiv
);
var
commentangulardiv
=
new
Element
(
"
div
"
).
inject
(
commentcontentright
);
for
(
var
tmpi
=
0
;
tmpi
<
parseInt
(
percomment
.
grade
);
tmpi
++
){
...
...
@@ -391,6 +392,7 @@ MWF.xApplication.AppMarketV2.Application.Comment.ViewPage= new Class({
for
(
var
tmpi
=
0
;
tmpi
<
5
-
parseInt
(
percomment
.
grade
);
tmpi
++
){
new
Element
(
"
img
"
,{
"
src
"
:
this
.
content
.
iconPath
+
"
whitefiveangular.png
"
,
"
class
"
:
"
o2_appmarket_application_introduce_memo_remark_inner_pic
"
}).
inject
(
commentangulardiv
)
}
var
content
=
percomment
.
content
;
var
percommentConent
=
content
.
replace
(
"
<p>
"
,
""
).
replace
(
"
</p>
"
,
""
);
new
Element
(
"
div
"
,{
"
class
"
:
"
o2_appmarket_application_comment_content_title
"
,
"
text
"
:
percomment
.
title
}).
inject
(
commentcontentright
);
...
...
o2web/source/x_component_AppMarketV2_Application/Main.js
浏览文件 @
ba84c791
...
...
@@ -84,6 +84,7 @@ MWF.xApplication.AppMarketV2.Application.Main = new Class({
this
.
initNodeSize
();
if
(
this
.
options
.
appid
){
debugger
this
.
loadBbsInfo
(
this
);
this
.
actions
.
MarketAction
.
get
(
this
.
options
.
appid
,
function
(
json
){
if
(
json
.
data
&&
json
.
data
.
icon
){
this
.
appdata
=
json
.
data
;
...
...
@@ -183,10 +184,39 @@ debugger;
if
(
callback
)
callback
();
},
loadBbsInfo
:
function
(
content
){
var
json
=
null
;
debugger
;
var
commenturl
=
content
.
collectUrl
+
'
/o2_collect_assemble/jaxrs/collect/config/key/(0)?time=
'
+
(
new
Date
()).
getMilliseconds
();
debugger
;
var
res
=
new
Request
.
JSON
({
url
:
commenturl
,
headers
:
{
'
x-debugger
'
:
true
,
'
Authorization
'
:
content
.
collectToken
,
'
c-token
'
:
content
.
collectToken
},
secure
:
false
,
method
:
"
get
"
,
async
:
false
,
withCredentials
:
true
,
contentType
:
'
application/json
'
,
crossDomain
:
true
,
onSuccess
:
function
(
responseJSON
,
responseText
){
json
=
responseJSON
;
debugger
;
this
.
bbsUrlPath
=
json
.
data
.
bbsUrlPath
;
this
.
bbsUrl
=
json
.
data
.
bbsUrl
;
}.
bind
(
this
),
onFailure
:
function
(
xhr
){
o2
.
runCallback
(
callback
,
"
requestFailure
"
,
[
xhr
]);
}.
bind
(
this
),
onError
:
function
(
text
,
error
){
o2
.
runCallback
(
callback
,
"
error
"
,
[
text
,
error
]);
}.
bind
(
this
)
});
res
.
send
();
},
loadCommentsGrade
:
function
(
appdata
){
debugger
;
var
json
=
null
;
var
commenturl
=
this
.
lp
.
commentp
ath
+
'
/x_bbs_assemble_control/jaxrs/subject/statgrade/sectionName/
'
+
encodeURI
(
this
.
lp
.
title
)
+
'
/subjectType/
'
+
encodeURI
(
appdata
.
name
)
+
'
?time=
'
+
(
new
Date
()).
getMilliseconds
();
var
commenturl
=
this
.
bbsUrlP
ath
+
'
/x_bbs_assemble_control/jaxrs/subject/statgrade/sectionName/
'
+
encodeURI
(
this
.
lp
.
title
)
+
'
/subjectType/
'
+
encodeURI
(
appdata
.
name
)
+
'
?time=
'
+
(
new
Date
()).
getMilliseconds
();
var
res
=
new
Request
.
JSON
({
url
:
commenturl
,
headers
:
{
'
x-debugger
'
:
true
,
'
Authorization
'
:
this
.
collectToken
,
'
c-token
'
:
this
.
collectToken
},
...
...
@@ -304,7 +334,7 @@ debugger;
},
recordStatus
:
function
(){
debugger
;
return
{
"
appid
"
:
this
.
options
.
appid
,
"
appname
"
:
this
.
options
.
appname
};
x
return
{
"
appid
"
:
this
.
options
.
appid
,
"
appname
"
:
this
.
options
.
appname
};
},
numberFix
:
function
(
data
,
n
){
var
numbers
=
''
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录