切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
刘朕
6 years ago
提交
5cc3b152d5ffebaa49e7c0f9cf4e52759330f937
1 个父辈
29b94443
1 个管道 的构建
通过
耗费 1 秒
页面生成图片优化
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
10 行增加
和
2 行删除
app/portal/controller/OrderSalesmanController.php
app/portal/controller/OrderSalesmanController.php
查看文件 @
5cc3b15
...
...
@@ -15,6 +15,7 @@ use app\portal\model\IndentModel;
use
cmf\controller\WeChatBaseController
;
use
think\Db
;
use
think\Image
;
use
think\Session
;
class
OrderSalesmanController
extends
WeChatBaseController
{
...
...
@@ -266,6 +267,10 @@ class OrderSalesmanController extends WeChatBaseController
$new_img->thumb
(
$width
,
$height
- intval(
$top
) * 2,5);
$new_img->thumb
(
$width
/2,(
$height
- intval(
$top
) * 2)/2);
$new_img->save
('./upload/'.
$img_url
,'jpg',100);
$session_img
= Session::get('img_url');
if(file_exists('./upload/'.
$session_img
)) {
@unlink('./upload/'.
$session_img
);
}
$this->success
('成功','',cmf_get_asset_url(
$img_url
));
}
}
...
...
@@ -289,9 +294,12 @@ class OrderSalesmanController extends WeChatBaseController
//检查是否有该文件夹,如果没有就创建,并给予最高权限
mkdir(
$new_file
, 0777,true);
}
$new_file
=
$new_file
.cmf_get_current_user_id()."
.
{
$type
}
";
$time
= time();
$new_file
=
$new_file
.cmf_get_current_user_id().
$time
."
.
{
$type
}
";
if (file_put_contents(
$new_file
, base64_decode(str_replace(
$result[1]
, '',
$base64_image_content
)))){
return
$file_path
.cmf_get_current_user_id()."
.
{
$type
}
";
$file
=
$file_path
.cmf_get_current_user_id().
$time
."
.
{
$type
}
";
Session::set('img_url',
$file
);
return
$file
;
}else{
return false;
}
...
...
请
注册
或
登录
后发表评论