切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
王晓刚
6 years ago
提交
9bb44933fd1657c6386a21da5ee7b8e675993afc
1 个父辈
e7ab741d
1 个管道 的构建
通过
耗费 0 秒
服务器配置
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
12 行增加
和
12 行删除
app/portal/controller/ShareController.php
app/portal/controller/ShareController.php
查看文件 @
9bb4493
...
...
@@ -39,12 +39,12 @@ class ShareController extends WeChatBaseController
//判断有没有生成过
// if(!file_exists('./upload/poster/poster_'.$user_id.".png")){
$url
=
$this
->
get_url
(
$my_user
[
'id'
],
$my_user
[
'status'
]);
$webPath
=
'qrcode/code_img'
.
$user_id
.
'.png'
;
$webPath
=
'qrcode/code_img'
.
$user_id
.
$my_user
[
'status'
]
.
'.png'
;
$savePath
=
'./upload/'
.
$webPath
;
//生成带参二维码
//
if(!file_exists($savePath)){
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
){
...
...
@@ -56,10 +56,10 @@ class ShareController extends WeChatBaseController
}
$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
.
".png"
);
$image
->
thumb
(
360
,
360
,
\think\Image
::
THUMB_FIXED
)
->
save
(
'./upload/qrcode/code_img'
.
$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
.
".png"
,[
195
,
725
],
100
)
$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"
);
...
...
@@ -95,7 +95,7 @@ class ShareController extends WeChatBaseController
$this
->
error
(
'无权限'
,
''
,
''
,
''
);
}
$url
=
$this
->
get_url
(
$my_user
[
'id'
],
$my_user
[
'status'
]);
$webPath
=
'qrcode/code_img'
.
$user_id
.
'.png'
;
$webPath
=
'qrcode/code_img'
.
$user_id
.
$my_user
[
'status'
]
.
'.png'
;
$savePath
=
'./upload/'
.
$webPath
;
//生成带参二维码
if
(
!
file_exists
(
$savePath
)){
...
...
@@ -112,10 +112,10 @@ class ShareController extends WeChatBaseController
}
$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
.
".png"
);
$image
->
thumb
(
360
,
360
,
\think\Image
::
THUMB_FIXED
)
->
save
(
'./upload/qrcode/code_img'
.
$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
.
".png"
,[
195
,
725
],
100
)
$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"
);
...
...
@@ -196,8 +196,8 @@ class ShareController extends WeChatBaseController
$code_img
=
$this
->
code_img1
(
$my_user_id
,
$status
);
$code
=
file_get_contents
(
$code_img
);
$user_id
=
Db
::
name
(
'my_user'
)
->
where
(
'id'
,
$my_user_id
)
->
value
(
'uid'
);
file_put_contents
(
ROOT_PATH
.
"public/upload/qrcode/code_img
$user_id
.png"
,
$code
);
return
$savePath
.
"code_img
$user_id
.png"
;
file_put_contents
(
ROOT_PATH
.
"public/upload/qrcode/code_img
$user_id$status
.png"
,
$code
);
return
$savePath
.
"code_img
$user_id$status
.png"
;
}
/**
...
...
请
注册
或
登录
后发表评论