切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
王晓刚
5 years ago
提交
4cdf62d2ca44743adb89f12c5cf51f12ea0dd9a3
1 个父辈
8905e399
1 个管道 的构建
通过
耗费 0 秒
海报
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
14 行增加
和
23 行删除
app/portal/controller/ShareController.php
app/portal/controller/ShareController.php
查看文件 @
4cdf62d
...
...
@@ -45,33 +45,24 @@ class ShareController extends WeChatBaseController
if
(
!
file_exists
(
$savePath
)){
$prcode_url
=
$this
->
code_img
(
$my_user
[
'id'
],
$my_user
[
'status'
]);
}
//保存头像
$avatar
=
$this
->
getImage
(
$user
[
'avatar'
],
'avatar_'
.
$user
[
'id'
]);
if
(
$avatar
[
'code'
]
==
1
){
$this
->
error
(
$avatar
[
'msg'
]);
}
$savePath
=
'./upload/poster'
;
if
(
!
file_exists
(
$savePath
)){
mkdir
(
$savePath
,
0777
,
true
);
}
if
(
$user
[
'status'
]
==
3
){
//老师
$image
=
\think\Image
::
open
(
ROOT_PATH
.
"public/white2.png"
);
$image
->
water
(
ROOT_PATH
.
"public/upload/qrcode/code_img"
.
$user_id
.
$my_user
[
'status'
]
.
".png"
,[
195
,
725
],
100
)
->
water
(
ROOT_PATH
.
"public/bg2.png"
,
\think\Image
::
WATER_CENTER
,
100
)
->
save
(
'./upload/poster/poster_'
.
$user_id
.
".png"
);
}
else
{
//业务员
//保存头像
$avatar
=
$this
->
getImage
(
$user
[
'avatar'
],
'avatar_'
.
$user
[
'id'
]);
if
(
$avatar
[
'code'
]
==
1
){
$this
->
error
(
$avatar
[
'msg'
]);
}
$image
=
\think\Image
::
open
(
ROOT_PATH
.
"public/upload/avatar/avatar_"
.
$user_id
.
".jpeg"
);
$image
->
thumb
(
173
,
173
,
\think\Image
::
THUMB_FIXED
)
->
save
(
'./upload/avatar/avatar_'
.
$user_id
.
".png"
);
$image
=
\think\Image
::
open
(
ROOT_PATH
.
"public/upload/qrcode/code_img"
.
$user_id
.
$my_user
[
'status'
]
.
".png"
);
$image
->
thumb
(
360
,
360
,
\think\Image
::
THUMB_FIXED
)
->
save
(
'./upload/qrcode/code_img'
.
$user_id
.
$my_user
[
'status'
]
.
".png"
);
$image
=
\think\Image
::
open
(
ROOT_PATH
.
"public/white.png"
);
$image
->
water
(
ROOT_PATH
.
"public/upload/qrcode/code_img"
.
$user_id
.
$my_user
[
'status'
]
.
".png"
,[
195
,
725
],
100
)
->
water
(
ROOT_PATH
.
"public/upload/avatar/avatar_"
.
$user_id
.
".png"
,[
289
,
478
],
100
)
->
water
(
ROOT_PATH
.
"public/bg.png"
,
\think\Image
::
WATER_CENTER
,
100
)
->
save
(
'./upload/poster/poster_'
.
$user_id
.
".png"
);
}
$image
=
\think\Image
::
open
(
ROOT_PATH
.
"public/upload/avatar/avatar_"
.
$user_id
.
".jpeg"
);
$image
->
thumb
(
173
,
173
,
\think\Image
::
THUMB_FIXED
)
->
save
(
'./upload/avatar/avatar_'
.
$user_id
.
".png"
);
$image
=
\think\Image
::
open
(
ROOT_PATH
.
"public/upload/qrcode/code_img"
.
$user_id
.
$my_user
[
'status'
]
.
".png"
);
$image
->
thumb
(
360
,
360
,
\think\Image
::
THUMB_FIXED
)
->
save
(
'./upload/qrcode/code_img'
.
$user_id
.
$my_user
[
'status'
]
.
".png"
);
$image
=
\think\Image
::
open
(
ROOT_PATH
.
"public/white.png"
);
$image
->
water
(
ROOT_PATH
.
"public/upload/qrcode/code_img"
.
$user_id
.
$my_user
[
'status'
]
.
".png"
,[
195
,
725
],
100
)
->
water
(
ROOT_PATH
.
"public/upload/avatar/avatar_"
.
$user_id
.
".png"
,[
289
,
478
],
100
)
->
water
(
ROOT_PATH
.
"public/bg.png"
,
\think\Image
::
WATER_CENTER
,
100
)
->
save
(
'./upload/poster/poster_'
.
$user_id
.
".png"
);
// }
$share_image
=
cmf_get_image_url
(
'poster/poster_'
.
$user_id
.
".png"
);
$this
->
assign
(
'share_image'
,
$share_image
);
...
...
请
注册
或
登录
后发表评论