切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Karson
5 years ago
提交
b06d963a4a90be8c604084de8915da495c1d687c
1 个父辈
1a81c453
新增Api和Index模块下指定URL前缀不匹配路由。
修复后台图片预览一处BUG
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
30 行增加
和
12 行删除
application/common/behavior/Common.php
application/tags.php
public/assets/js/require-backend.min.js
public/assets/js/require-upload.js
application/common/behavior/Common.php
查看文件 @
b06d963
...
...
@@ -8,6 +8,16 @@ use think\Loader;
class
Common
{
public
function
appDispatch
(
&
$dispatch
)
{
$pathinfoArr
=
explode
(
'/'
,
request
()
->
pathinfo
());
if
(
!
Config
::
get
(
'url_domain_deploy'
)
&&
$pathinfoArr
&&
in_array
(
$pathinfoArr
[
0
],
[
'index'
,
'api'
]))
{
//如果是以index或api开始的URL则关闭路由检测
\think\App
::
route
(
false
);
}
}
public
function
moduleInit
(
&
$request
)
{
// 设置mbstring字符编码
...
...
application/tags.php
查看文件 @
b06d963
...
...
@@ -15,6 +15,10 @@ return [
'app_init'
=>
[],
// 应用开始
'app_begin'
=>
[],
// 应用调度
'app_dispatch'
=>
[
'app\\common\\behavior\\Common'
,
],
// 模块初始化
'module_init'
=>
[
'app\\common\\behavior\\Common'
,
...
...
public/assets/js/require-backend.min.js
查看文件 @
b06d963
...
...
@@ -5888,7 +5888,7 @@ define('backend',['fast', 'template', 'moment'], function (Fast, Template, Momen
return
Backend
;
});
define
(
'backend-init'
,[
'backend'
],
function
(
Backend
)
{
});
//! moment.js locale configuration
...
...
@@ -6212,7 +6212,7 @@ define('upload',['jquery', 'bootstrap', 'plupload', 'template'], function ($, un
config
:
{
container
:
document
.
body
,
classname
:
'.plupload:not([initialized])'
,
previewtpl
:
'<li class="col-xs-3"><a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail"><img src="<%=fullurl%>" onerror="this.src=\''
+
Fast
.
api
.
fixurl
(
"ajax/icon"
)
+
'?suffix=
\'+\'<%=fullurl%>\'.split(\'.\').pop()
;this.onerror=null;" class="img-responsive"></a><a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a></li>'
,
previewtpl
:
'<li class="col-xs-3"><a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail"><img src="<%=fullurl%>" onerror="this.src=\''
+
Fast
.
api
.
fixurl
(
"ajax/icon"
)
+
'?suffix=
<%=suffix%>\'
;this.onerror=null;" class="img-responsive"></a><a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a></li>'
,
},
events
:
{
onInit
:
function
(
up
)
{
...
...
@@ -6511,7 +6511,9 @@ define('upload',['jquery', 'bootstrap', 'plupload', 'template'], function ($, un
if
(
!
j
)
{
return
true
;
}
var
data
=
{
url
:
j
,
fullurl
:
Fast
.
api
.
cdnurl
(
j
),
data
:
$
(
that
).
data
(),
key
:
i
,
index
:
i
,
value
:
(
json
&&
typeof
json
[
i
]
!==
'undefined'
?
json
[
i
]
:
null
)};
var
suffix
=
/
[\.]([
a-zA-Z0-9
]
+
)
$/
.
exec
(
j
);
suffix
=
suffix
?
suffix
[
1
]
:
'file'
;
var
data
=
{
url
:
j
,
fullurl
:
Fast
.
api
.
cdnurl
(
j
),
data
:
$
(
that
).
data
(),
key
:
i
,
index
:
i
,
value
:
(
json
&&
typeof
json
[
i
]
!==
'undefined'
?
json
[
i
]
:
null
),
suffix
:
suffix
};
var
html
=
tpl
?
Template
(
tpl
,
data
)
:
Template
.
render
(
Upload
.
config
.
previewtpl
,
data
);
$
(
"#"
+
preview_id
).
append
(
html
);
});
...
...
@@ -8828,7 +8830,7 @@ define('upload',['jquery', 'bootstrap', 'plupload', 'template'], function ($, un
(
new
RegExp
(
".(?:"
+
ext
+
")$"
,
"i"
)).
test
(
value
)
||
this
.
renderMsg
(
"只接受{1}后缀的文件"
,
ext
.
replace
(
/
\|
/g
,
','
));
}
},
// Default error messages
...
...
@@ -9844,7 +9846,7 @@ define("bootstrap-table-commonsearch", ["bootstrap-table"], (function (global) {
/**
* 将BootstrapTable的行使用自定义的模板来渲染
*
*
* @author: karson
* @version: v0.0.1
*
...
...
@@ -10923,7 +10925,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
},
//set position of draggedItem
setPos
:
function
(
x
,
y
)
{
setPos
:
function
(
x
,
y
)
{
//remove mouse offset so mouse cursor remains in same place on draggedItem instead of top left corner
var
top
=
y
-
this
.
offset
.
top
;
var
left
=
x
-
this
.
offset
.
left
;
...
...
@@ -10953,7 +10955,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
y
=
Math
.
max
(
0
,
y
-
cont
.
height
()
-
offset
.
top
)
+
Math
.
min
(
0
,
y
-
offset
.
top
);
x
=
Math
.
max
(
0
,
x
-
cont
.
width
()
-
offset
.
left
)
+
Math
.
min
(
0
,
x
-
offset
.
left
);
}
list
.
scroll
.
moveX
=
x
==
0
?
0
:
x
*
opts
.
scrollSpeed
/
Math
.
abs
(
x
);
list
.
scroll
.
moveY
=
y
==
0
?
0
:
y
*
opts
.
scrollSpeed
/
Math
.
abs
(
y
);
...
...
@@ -11102,7 +11104,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
else
//list.placeHolderItem.clone().removeAttr("data-placeholder") crashes in IE7 and jquery 1.5.1 (doesn't in jquery 1.4.2 or IE8)
$
(
this
.
container
).
append
(
list
.
placeHolderItem
.
removeAttr
(
"data-placeholder"
).
clone
().
attr
(
"data-droptarget"
,
true
));
list
.
placeHolderItem
.
attr
(
"data-placeholder"
,
true
);
}
});
...
...
@@ -11132,7 +11134,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
define
(
"dragsort"
,
function
(){});
/*!
/*!
* jquery.event.drag - v 2.2
* Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
* Open Source MIT License - http://threedubmedia.com/code/license
...
...
@@ -11140,7 +11142,7 @@ define("dragsort", function(){});
;(
function
(
e
){
e
.
fn
.
drag
=
function
(
k
,
g
,
j
){
var
i
=
typeof
k
==
"string"
?
k
:
""
,
h
=
e
.
isFunction
(
k
)?
k
:
e
.
isFunction
(
g
)?
g
:
null
;
if
(
i
.
indexOf
(
"drag"
)
!==
0
){
i
=
"drag"
+
i
}
j
=
(
k
==
h
?
g
:
j
)
||
{};
return
h
?
this
.
bind
(
i
,
j
,
h
):
this
.
trigger
(
i
)};
var
b
=
e
.
event
,
a
=
b
.
special
,
d
=
a
.
drag
=
{
defaults
:{
which
:
1
,
distance
:
0
,
not
:
":input"
,
handle
:
null
,
relative
:
false
,
drop
:
true
,
click
:
false
},
datakey
:
"dragdata"
,
noBubble
:
true
,
add
:
function
(
i
){
var
h
=
e
.
data
(
this
,
d
.
datakey
),
g
=
i
.
data
||
{};
h
.
related
+=
1
;
e
.
each
(
d
.
defaults
,
function
(
j
,
k
){
if
(
g
[
j
]
!==
undefined
){
h
[
j
]
=
g
[
j
]}})},
remove
:
function
(){
e
.
data
(
this
,
d
.
datakey
).
related
-=
1
},
setup
:
function
(){
if
(
e
.
data
(
this
,
d
.
datakey
)){
return
}
var
g
=
e
.
extend
({
related
:
0
},
d
.
defaults
);
e
.
data
(
this
,
d
.
datakey
,
g
);
b
.
add
(
this
,
"touchstart mousedown"
,
d
.
init
,
g
);
if
(
this
.
attachEvent
){
this
.
attachEvent
(
"ondragstart"
,
d
.
dontstart
)}},
teardown
:
function
(){
var
g
=
e
.
data
(
this
,
d
.
datakey
)
||
{};
if
(
g
.
related
){
return
}
e
.
removeData
(
this
,
d
.
datakey
);
b
.
remove
(
this
,
"touchstart mousedown"
,
d
.
init
);
d
.
textselect
(
true
);
if
(
this
.
detachEvent
){
this
.
detachEvent
(
"ondragstart"
,
d
.
dontstart
)}},
init
:
function
(
i
){
if
(
d
.
touched
){
return
}
var
g
=
i
.
data
,
h
;
if
(
i
.
which
!=
0
&&
g
.
which
>
0
&&
i
.
which
!=
g
.
which
){
return
}
if
(
e
(
i
.
target
).
is
(
g
.
not
)){
return
}
if
(
g
.
handle
&&!
e
(
i
.
target
).
closest
(
g
.
handle
,
i
.
currentTarget
).
length
){
return
}
d
.
touched
=
i
.
type
==
"touchstart"
?
this
:
null
;
g
.
propagates
=
1
;
g
.
mousedown
=
this
;
g
.
interactions
=
[
d
.
interaction
(
this
,
g
)];
g
.
target
=
i
.
target
;
g
.
pageX
=
i
.
pageX
;
g
.
pageY
=
i
.
pageY
;
g
.
dragging
=
null
;
h
=
d
.
hijack
(
i
,
"draginit"
,
g
);
if
(
!
g
.
propagates
){
return
}
h
=
d
.
flatten
(
h
);
if
(
h
&&
h
.
length
){
g
.
interactions
=
[];
e
.
each
(
h
,
function
(){
g
.
interactions
.
push
(
d
.
interaction
(
this
,
g
))})}
g
.
propagates
=
g
.
interactions
.
length
;
if
(
g
.
drop
!==
false
&&
a
.
drop
){
a
.
drop
.
handler
(
i
,
g
)}
d
.
textselect
(
false
);
if
(
d
.
touched
){
b
.
add
(
d
.
touched
,
"touchmove touchend"
,
d
.
handler
,
g
)}
else
{
b
.
add
(
document
,
"mousemove mouseup"
,
d
.
handler
,
g
)}
if
(
!
d
.
touched
||
g
.
live
){
return
false
}},
interaction
:
function
(
h
,
g
){
var
i
=
e
(
h
)[
g
.
relative
?
"position"
:
"offset"
]()
||
{
top
:
0
,
left
:
0
};
return
{
drag
:
h
,
callback
:
new
d
.
callback
(),
droppable
:[],
offset
:
i
}},
handler
:
function
(
h
){
var
g
=
h
.
data
;
switch
(
h
.
type
){
case
!
g
.
dragging
&&
"touchmove"
:
h
.
preventDefault
();
case
!
g
.
dragging
&&
"mousemove"
:
if
(
Math
.
pow
(
h
.
pageX
-
g
.
pageX
,
2
)
+
Math
.
pow
(
h
.
pageY
-
g
.
pageY
,
2
)
<
Math
.
pow
(
g
.
distance
,
2
)){
break
}
h
.
target
=
g
.
target
;
d
.
hijack
(
h
,
"dragstart"
,
g
);
if
(
g
.
propagates
){
g
.
dragging
=
true
}
case
"touchmove"
:
h
.
preventDefault
();
case
"mousemove"
:
if
(
g
.
dragging
){
d
.
hijack
(
h
,
"drag"
,
g
);
if
(
g
.
propagates
){
if
(
g
.
drop
!==
false
&&
a
.
drop
){
a
.
drop
.
handler
(
h
,
g
)}
break
}
h
.
type
=
"mouseup"
}
case
"touchend"
:
case
"mouseup"
:
default
:
if
(
d
.
touched
){
b
.
remove
(
d
.
touched
,
"touchmove touchend"
,
d
.
handler
)}
else
{
b
.
remove
(
document
,
"mousemove mouseup"
,
d
.
handler
)}
if
(
g
.
dragging
){
if
(
g
.
drop
!==
false
&&
a
.
drop
){
a
.
drop
.
handler
(
h
,
g
)}
d
.
hijack
(
h
,
"dragend"
,
g
)}
d
.
textselect
(
true
);
if
(
g
.
click
===
false
&&
g
.
dragging
){
e
.
data
(
g
.
mousedown
,
"suppress.click"
,
new
Date
().
getTime
()
+
5
)}
g
.
dragging
=
d
.
touched
=
false
;
break
}},
hijack
:
function
(
h
,
o
,
r
,
p
,
k
){
if
(
!
r
){
return
}
var
q
=
{
event
:
h
.
originalEvent
,
type
:
h
.
type
},
m
=
o
.
indexOf
(
"drop"
)?
"drag"
:
"drop"
,
t
,
l
=
p
||
0
,
j
,
g
,
s
,
n
=!
isNaN
(
p
)?
p
:
r
.
interactions
.
length
;
h
.
type
=
o
;
h
.
originalEvent
=
null
;
r
.
results
=
[];
do
{
if
(
j
=
r
.
interactions
[
l
]){
if
(
o
!==
"dragend"
&&
j
.
cancelled
){
continue
}
s
=
d
.
properties
(
h
,
r
,
j
);
j
.
results
=
[];
e
(
k
||
j
[
m
]
||
r
.
droppable
).
each
(
function
(
u
,
i
){
s
.
target
=
i
;
h
.
isPropagationStopped
=
function
(){
return
false
};
t
=
i
?
b
.
dispatch
.
call
(
i
,
h
,
s
):
null
;
if
(
t
===
false
){
if
(
m
==
"drag"
){
j
.
cancelled
=
true
;
r
.
propagates
-=
1
}
if
(
o
==
"drop"
){
j
[
m
][
u
]
=
null
}}
else
{
if
(
o
==
"dropinit"
){
j
.
droppable
.
push
(
d
.
element
(
t
)
||
i
)}}
if
(
o
==
"dragstart"
){
j
.
proxy
=
e
(
d
.
element
(
t
)
||
j
.
drag
)[
0
]}
j
.
results
.
push
(
t
);
delete
h
.
result
;
if
(
o
!==
"dropinit"
){
return
t
}});
r
.
results
[
l
]
=
d
.
flatten
(
j
.
results
);
if
(
o
==
"dropinit"
){
j
.
droppable
=
d
.
flatten
(
j
.
droppable
)}
if
(
o
==
"dragstart"
&&!
j
.
cancelled
){
s
.
update
()}}}
while
(
++
l
<
n
);
h
.
type
=
q
.
type
;
h
.
originalEvent
=
q
.
event
;
return
d
.
flatten
(
r
.
results
)},
properties
:
function
(
i
,
g
,
h
){
var
j
=
h
.
callback
;
j
.
drag
=
h
.
drag
;
j
.
proxy
=
h
.
proxy
||
h
.
drag
;
j
.
startX
=
g
.
pageX
;
j
.
startY
=
g
.
pageY
;
j
.
deltaX
=
i
.
pageX
-
g
.
pageX
;
j
.
deltaY
=
i
.
pageY
-
g
.
pageY
;
j
.
originalX
=
h
.
offset
.
left
;
j
.
originalY
=
h
.
offset
.
top
;
j
.
offsetX
=
j
.
originalX
+
j
.
deltaX
;
j
.
offsetY
=
j
.
originalY
+
j
.
deltaY
;
j
.
drop
=
d
.
flatten
((
h
.
drop
||
[]).
slice
());
j
.
available
=
d
.
flatten
((
h
.
droppable
||
[]).
slice
());
return
j
},
element
:
function
(
g
){
if
(
g
&&
(
g
.
jquery
||
g
.
nodeType
==
1
)){
return
g
}},
flatten
:
function
(
g
){
return
e
.
map
(
g
,
function
(
h
){
return
h
&&
h
.
jquery
?
e
.
makeArray
(
h
):
h
&&
h
.
length
?
d
.
flatten
(
h
):
h
})},
textselect
:
function
(
g
){
e
(
document
)[
g
?
"unbind"
:
"bind"
](
"selectstart"
,
d
.
dontstart
).
css
(
"MozUserSelect"
,
g
?
""
:
"none"
);
document
.
unselectable
=
g
?
"off"
:
"on"
},
dontstart
:
function
(){
return
false
},
callback
:
function
(){}};
d
.
callback
.
prototype
=
{
update
:
function
(){
if
(
a
.
drop
&&
this
.
available
.
length
){
e
.
each
(
this
.
available
,
function
(
g
){
a
.
drop
.
locate
(
this
,
g
)})}}};
var
f
=
b
.
dispatch
;
b
.
dispatch
=
function
(
g
){
if
(
e
.
data
(
this
,
"suppress."
+
g
.
type
)
-
new
Date
().
getTime
()
>
0
){
e
.
removeData
(
this
,
"suppress."
+
g
.
type
);
return
}
return
f
.
apply
(
this
,
arguments
)};
var
c
=
b
.
fixHooks
.
touchstart
=
b
.
fixHooks
.
touchmove
=
b
.
fixHooks
.
touchend
=
b
.
fixHooks
.
touchcancel
=
{
props
:
"clientX clientY pageX pageY screenX screenY"
.
split
(
" "
),
filter
:
function
(
h
,
i
){
if
(
i
){
var
g
=
(
i
.
touches
&&
i
.
touches
[
0
])
||
(
i
.
changedTouches
&&
i
.
changedTouches
[
0
])
||
null
;
if
(
g
){
e
.
each
(
c
.
props
,
function
(
j
,
k
){
h
[
k
]
=
g
[
k
]})}}
return
h
}};
a
.
draginit
=
a
.
dragstart
=
a
.
dragend
=
d
})(
jQuery
);
define
(
"drag"
,
function
(){});
/*!
/*!
* jquery.event.drop - v 2.2
* Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
* Open Source MIT License - http://threedubmedia.com/code/license
...
...
public/assets/js/require-upload.js
查看文件 @
b06d963
...
...
@@ -4,7 +4,7 @@ define(['jquery', 'bootstrap', 'plupload', 'template'], function ($, undefined,
config
:
{
container
:
document
.
body
,
classname
:
'.plupload:not([initialized])'
,
previewtpl
:
'<li class="col-xs-3"><a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail"><img src="<%=fullurl%>" onerror="this.src=\''
+
Fast
.
api
.
fixurl
(
"ajax/icon"
)
+
'?suffix=
\'+\'<%=fullurl%>\'.split(\'.\').pop()
;this.onerror=null;" class="img-responsive"></a><a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a></li>'
,
previewtpl
:
'<li class="col-xs-3"><a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail"><img src="<%=fullurl%>" onerror="this.src=\''
+
Fast
.
api
.
fixurl
(
"ajax/icon"
)
+
'?suffix=
<%=suffix%>\'
;this.onerror=null;" class="img-responsive"></a><a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a></li>'
,
},
events
:
{
onInit
:
function
(
up
)
{
...
...
@@ -303,7 +303,9 @@ define(['jquery', 'bootstrap', 'plupload', 'template'], function ($, undefined,
if
(
!
j
)
{
return
true
;
}
var
data
=
{
url
:
j
,
fullurl
:
Fast
.
api
.
cdnurl
(
j
),
data
:
$
(
that
).
data
(),
key
:
i
,
index
:
i
,
value
:
(
json
&&
typeof
json
[
i
]
!==
'undefined'
?
json
[
i
]
:
null
)};
var
suffix
=
/
[\.]?([
a-zA-Z0-9
]
+
)
$/
.
exec
(
j
);
suffix
=
suffix
?
suffix
[
1
]
:
'file'
;
var
data
=
{
url
:
j
,
fullurl
:
Fast
.
api
.
cdnurl
(
j
),
data
:
$
(
that
).
data
(),
key
:
i
,
index
:
i
,
value
:
(
json
&&
typeof
json
[
i
]
!==
'undefined'
?
json
[
i
]
:
null
),
suffix
:
suffix
};
var
html
=
tpl
?
Template
(
tpl
,
data
)
:
Template
.
render
(
Upload
.
config
.
previewtpl
,
data
);
$
(
"#"
+
preview_id
).
append
(
html
);
});
...
...
请
注册
或
登录
后发表评论