切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
王晓刚
5 years ago
提交
8590ef8e431f452883aa21e2c39be26b7afef79e
1 个父辈
e241adcb
1 个管道 的构建
通过
耗费 42 秒
海报
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
23 行增加
和
14 行删除
app/portal/controller/ShareController.php
public/bg2.png
public/white2.png
app/portal/controller/ShareController.php
查看文件 @
8590ef8
...
...
@@ -45,24 +45,33 @@ 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
);
}
$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"
);
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"
);
}
// }
$share_image
=
cmf_get_image_url
(
'poster/poster_'
.
$user_id
.
".png"
);
$this
->
assign
(
'share_image'
,
$share_image
);
...
...
public/bg2.png
0 → 100644
查看文件 @
8590ef8
390.1 KB
public/white2.png
0 → 100644
查看文件 @
8590ef8
11.0 KB
请
注册
或
登录
后发表评论