切换导航条
此项目
正在载入...
登录
景龙
/
feipin
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
景龙
6 years ago
提交
8eed5c42cef762bf5a74fe0cbecb27c543ed99c2
1 个父辈
4ce4d9b7
1 个管道 的构建
通过
耗费 10 秒
修改集中域名
变更
5
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
11 行增加
和
6 行删除
application/admin/controller/Ajax.php
application/admin/library/traits/Backend.php
application/admin/model/User.php
application/api/controller/Person.php
application/extra/site.php
application/admin/controller/Ajax.php
查看文件 @
8eed5c4
...
...
@@ -9,6 +9,7 @@ use think\Cache;
use
think\Config
;
use
think\Db
;
use
think\Lang
;
use
app\admin\model\User
;
/**
* Ajax异步请求接口
...
...
@@ -105,7 +106,7 @@ class Ajax extends Backend
$imagewidth
=
isset
(
$imgInfo
[
0
])
?
$imgInfo
[
0
]
:
$imagewidth
;
$imageheight
=
isset
(
$imgInfo
[
1
])
?
$imgInfo
[
1
]
:
$imageheight
;
}
$url
=
'http://feipin.w.brotop.cn'
.
$uploadDir
.
$splInfo
->
getSaveName
();
$url
=
User
::
DOMAIN
.
$uploadDir
.
$splInfo
->
getSaveName
();
$params
=
array
(
'admin_id'
=>
(
int
)
$this
->
auth
->
id
,
'user_id'
=>
0
,
...
...
application/admin/library/traits/Backend.php
查看文件 @
8eed5c4
...
...
@@ -2,6 +2,7 @@
namespace
app\admin\library\traits
;
use
app\admin\model\User
;
trait
Backend
{
...
...
@@ -73,7 +74,7 @@ trait Backend
{
if
(
$this
->
request
->
isPost
())
{
$params
=
$this
->
request
->
post
(
"row/a"
);
$host
=
'http://feipin.w.brotop.cn'
;
$host
=
User
::
DOMAIN
;
if
(
isset
(
$params
[
'image'
])
&&
!
empty
(
$params
[
'image'
])){
$params
[
'image'
]
=
$host
.
$params
[
'image'
];
}
...
...
@@ -130,7 +131,7 @@ trait Backend
if
(
$this
->
request
->
isPost
())
{
$params
=
$this
->
request
->
post
(
"row/a"
);
if
(
$params
)
{
$host
=
'http://feipin.w.brotop.cn'
;
$host
=
User
::
DOMAIN
;
if
(
isset
(
$params
[
'image'
])
&&
!
empty
(
$params
[
'image'
])){
if
(
strpos
(
$params
[
'image'
],
$host
)
!==
false
){
//true
...
...
application/admin/model/User.php
查看文件 @
8eed5c4
...
...
@@ -15,6 +15,9 @@ class User extends Model
// 定义时间戳字段名
protected
$createTime
=
'createtime'
;
protected
$updateTime
=
'updatetime'
;
//设置域名
CONST
DOMAIN
=
'http://feipin.w.brotop.cn'
;
// 追加属性
protected
$append
=
[
'prevtime_text'
,
...
...
application/api/controller/Person.php
查看文件 @
8eed5c4
...
...
@@ -148,7 +148,7 @@ class Person extends Api
$this
->
error
(
'最多上传9张图片'
);
}
$date
=
date
(
'Ymd'
,
time
());
$host
=
config
(
'site.hostUrl'
)
;
$host
=
\app\admin\model\User
::
DOMAIN
;
$images
=
''
;
foreach
(
$files
as
$file
){
//移动到框架应用根目录/public/uploads/ 目录下
...
...
application/extra/site.php
查看文件 @
8eed5c4
...
...
@@ -62,8 +62,8 @@ return array (
//设置积分规则(分享购买,分享卖废品)
//'share_purchase' => 150,
//'share_sell' => 50,
//域名
'hostUrl'
=>
'http://feipin.w.brotop.cn'
,
// //域名
// 'hostUrl' => 'http://feipin.w.brotop.cn',
//验证规则
'user_id'
=>
[
'rule'
=>
[
...
...
请
注册
或
登录
后发表评论