Commit 230a814d authored by 章建武's avatar 章建武

dep

parent d99a3fa7
......@@ -3,7 +3,7 @@ return array(
'DEFAULT_FILTER' => 'addslashes',
'IS_DEBUG_VER' => true,
'URL_CASE_INSENSITIVE' =>false,
'DOMAIN' => 'http://www.test_h5.net/',
'DOMAIN' => 'http://mallapp.guoguodz.com/',
'WEI_DOMAIN' => 'https://vote.guoguodz.com/',
'APP_NAME' => '时尚天河',
// 服务号授权ID和secret
......
......@@ -13,15 +13,15 @@ class IndexController extends Controller
public function index()
{
session_start();
// if (!$_SESSION["headimgurl"]) {
// redirect('http://mallapp.guoguodz.com/h5_pic/appwww/index.php/WxAuthorize');
// return;
// }
// if($_SERVER['QUERY_STRING']){
// $url = '?'.$_SERVER['QUERY_STRING'];
// }
// $link = 'http://'.$_SERVER["HTTP_HOST"].'/h5_pic/appwww/index.php'.$url;
//
if (!$_SESSION["headimgurl"]) {
redirect('http://mallapp.guoguodz.com/h5_pic/appwww/index.php/WxAuthorize');
return;
}
if($_SERVER['QUERY_STRING']){
$url = '?'.$_SERVER['QUERY_STRING'];
}
$link = 'http://'.$_SERVER["HTTP_HOST"].'/h5_pic/appwww/index.php'.$url;
$this->assign('link',$link);
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$nonceStr = "";
......@@ -67,19 +67,17 @@ class IndexController extends Controller
public function get_pic (){
session_start();
$num = $_SESSION['num'] += 1;
$link = 'http://mallapp.guoguodz.com/h5_pic/appwww/';
$link = C('DOMAIN').STATIC_COMEON_ASSETS.'/images/zhutu.jpg';
//主图
$pic_url = $link;
//二维码
$qr_code = 'http://mallapp.guoguodz.com/h5_pic/appwww/Assets/Admin/images/qr_code.png';
$qr_code = 'http://mallapp.guoguodz.com/test_h5/appwww/Assets/Admin/images/qr_code.png';
// $qr_code = 'http://www.test_h5.net/Assets/Admin/images/qr_code.png';
//用户头像
$user_pic = $_SESSION["headimgurl"];
$user_pic ='http://www.test_h5.net/H5/pic/aa.jpg';
$this->yuan_img($user_pic,$num);
// $user_pic ='https://wx.qlogo.cn/mmopen/vi_32/ibkgI6UoU3u5Wl8ibzzTzVHEuwuqUpzicQhJDsB1gh9VrZLriaHzaickPjFXibaPvDpn8HsEndfHNqoJ9uXRgyKF16bw/132';
$im = imagecreatefromjpeg($pic_url);
$oldW = imagesx($im);
......@@ -90,35 +88,33 @@ class IndexController extends Controller
//二维码水印
$code = imagecreatefrompng($qr_code);
imagecopymerge($bg, $code, 5, 0, 0, 0, 130, 130, 100);
imagecopymerge($bg, $code, 1300, 2550, 0, 0, 170, 170, 100);
//用户头像水印
$u_img = 'http://www.test_h5.net/H5/pimg/'.$num.'.png';
$this->thumb($u_img,$num);
$this->thumb($user_pic,$num);
//缩略图
$thumb = 'http://www.test_h5.net/H5/pimg/'.'thumb'.$num.'.png';
$us_img = imagecreatefrompng($thumb);
imagecopymerge($bg, $us_img, 211, 20, 0, 0, 200, 200, 105);
imagecopymerge($bg, $us_img, 1140, 555, 0, 0, 270, 270, 100);
$text_str = PROJECT_PATH.'appwww/msyh.ttf';
$textcolor = imagecolorallocate($bg, 255, 255, 255);
$text_str = PROJECT_PATH.'appwww/FZY4JW.TTF';
$textcolor = imagecolorallocate($bg, 0, 0, 0);
$a = $this->get_array_rand();
$fontBox_0 = imagettfbbox(38, 0, $text_str, $a[0]);//文字水平居中实质
$fontBox_1 = imagettfbbox(38, 0, $text_str, $a[1]);//文字水平居中实质
imagettftext($bg, 38, 0, ceil(($oldW - $fontBox_0[2]) / 7), 350, $textcolor, $text_str, mb_convert_encoding($a[0], "utf-8"));
imagettftext($bg, 38, 0, ceil(($oldW - $fontBox_1[2]) / 7), 420, $textcolor, $text_str, mb_convert_encoding($a[1], "utf-8"));
// imagettftext($bg, 38, 0, 10, 180, $textcolor, $text_str, mb_convert_encoding($a[2], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[3], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[4], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[5], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[6], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[7], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[8], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[9], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[10], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[11], "utf-8"));
// imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[12], "utf-8"));
$fontBox_2 = imagettfbbox(38, 0, $text_str, $a[2]);//文字水平居中实质
$fontBox_3 = imagettfbbox(38, 0, $text_str, $a[3]);//文字水平居中实质
$fontBox_4 = imagettfbbox(38, 0, $text_str, $a[4]);//文字水平居中实质
$fontBox_5 = imagettfbbox(38, 0, $text_str, $a[5]);//文字水平居中实质
$fontBox_6 = imagettfbbox(38, 0, $text_str, $a[6]);//文字水平居中实质
$fontBox_7 = imagettfbbox(38, 0, $text_str, $a[7]);//文字水平居中实质
imagettftext($bg, 58, 0, ceil(($oldW - $fontBox_0[2]) / 5), 1300, $textcolor, $text_str, mb_convert_encoding($a[0], "utf-8"));
imagettftext($bg, 58, 0, ceil(($oldW - $fontBox_1[2]) / 5), 1700, $textcolor, $text_str, mb_convert_encoding($a[1], "utf-8"));
imagettftext($bg, 58, 0, ceil(($oldW - $fontBox_2[2]) / 5), 2000, $textcolor, $text_str, mb_convert_encoding($a[2], "utf-8"));
imagettftext($bg, 58, 0, ceil(($oldW - $fontBox_3[2]) / 5), 2300, $textcolor, $text_str, mb_convert_encoding($a[3], "utf-8"));
imagettftext($bg, 58, 0, ceil(($oldW - $fontBox_4[2]) / 1.4), 1300, $textcolor, $text_str, mb_convert_encoding($a[4], "utf-8"));
imagettftext($bg, 58, 0, ceil(($oldW - $fontBox_5[2]) / 1.5), 1550, $textcolor, $text_str, mb_convert_encoding($a[5], "utf-8"));
imagettftext($bg, 58, 0, ceil(($oldW - $fontBox_6[2]) / 1.4), 1850, $textcolor, $text_str, mb_convert_encoding($a[6], "utf-8"));
imagettftext($bg, 58, 0, ceil(($oldW - $fontBox_7[2]) / 1.4), 2200, $textcolor, $text_str, mb_convert_encoding($a[7], "utf-8"));
$path = "H5/pic/";
if (!is_dir($path)){
......@@ -179,12 +175,12 @@ class IndexController extends Controller
//缩略图
public function thumb($user_pic,$num){
$src_img = imagecreatefrompng($user_pic);/*创建源图像*/
$src_img = imagecreatefromjpeg($user_pic);/*创建源图像*/
imagesavealpha($src_img,true);
$src_w = imagesx($src_img);/*源图像宽*/
$src_h = imagesy($src_img);/*源图像高*/
$dst_w = $src_w*0.25;/*目标图像宽*/
$dst_h = $src_h*0.25;/*目标图像高*/
$dst_w = $src_w*2.0;/*目标图像宽*/
$dst_h = $src_h*2.0;/*目标图像高*/
$dst_img =imagecreatetruecolor($dst_w,$dst_h);/*创建目标图像*/
imagealphablending($dst_img,false);
......@@ -203,35 +199,30 @@ class IndexController extends Controller
//随机取
public function get_array_rand(){
$a_2019 = array("9red","9green","9blue","9yellow","9brown","9aaaa","9bbbbb","9cccccc");
$a_2020 =array("red","green","blue","yellow","brown","aaaa","bbbbb","cccccc");
$a_2019 = ["迷茫","单身","痛苦","遗憾","啤酒肚"];
$a_2019_1 = ["苦涩","劳累","九九六","脱发","贫穷"];
$a_2019_2 = ["多余的赘肉","忧愁","烦恼失意","伤心","压力",];
$a_2019_3 = ["寂寞","孤独","各种加班","不值得的人","失眠","病痛"];
$a_2020 =array("被疯狂告白","脱单","脱胖","脱贫","绩效翻倍","今年暴富","干啥啥成功","甜甜的爱情","狂吃不胖","身体棒棒","18岁的容颜","赚到一亿","加薪升职","做领导","考试不挂科","人生巅峰","被人疼爱","年会中大奖","买的起房","一觉天亮","燕窝自由","信用卡自由","有时间做饭");
$r_1=array_rand($a_2019);
$r_2=array_rand($a_2019);
$r_3=array_rand($a_2019);
$r_4=array_rand($a_2019);
$r_5=array_rand($a_2019);
$r_6=array_rand($a_2019);
$r_2=array_rand($a_2019_1);
$r_3=array_rand($a_2019_2);
$r_4=array_rand($a_2019_3);
$r_5=array_rand($a_2020);
$r_6=array_rand($a_2020);
$r_7=array_rand($a_2020);
$r_8=array_rand($a_2020);
$r_9=array_rand($a_2020);
$r_10=array_rand($a_2020);
$r_11=array_rand($a_2020);
$r_12=array_rand($a_2020);
$arr_text = [
$a_2019[$r_1],
$a_2019[$r_2],
$a_2019[$r_3],
$a_2019[$r_4],
$a_2019[$r_5],
$a_2019[$r_6],
$a_2019_1[$r_2],
$a_2019_2[$r_3],
$a_2019_3[$r_4],
$a_2020[$r_5],
$a_2020[$r_6],
$a_2020[$r_7],
$a_2020[$r_8],
$a_2020[$r_9],
$a_2020[$r_10],
$a_2020[$r_11],
$a_2020[$r_12]
];
return $arr_text;
}
......
......@@ -19,16 +19,15 @@
<style>
.logo{
/*position:absolute;*/
/*width:550px;*/
/*height:620px;*/
/*left:45px;*/
/*top:0;*/
/*overflow:hidden;*/
/*!*background-color: #c0c0c0;*!*/
/*display: flex;*/
/*justify-content: center;*/
/*align-items: center;*/
position:absolute;
width:550px;
height:auto;
left:45px;
top:30px;
overflow:hidden;
display: flex;
justify-content: center;
align-items: center;
}
</style>
......
......@@ -21,9 +21,9 @@
.logo{
position:absolute;
width:550px;
height:620px;
height:auto;
left:45px;
top:0;
top:30px;
overflow:hidden;
display: flex;
justify-content: center;
......@@ -33,10 +33,10 @@
position:absolute;
left:20px;
top:610px;
height: 80px;
width: 600px;
background:#2f6f9f;
border-radius:10px;
width:480px;
margin-left: 60px;
margin-top: 60px;
cursor: pointer;
}
</style>
......@@ -47,7 +47,7 @@
<img src='__IMGAGES__/s_logo.png'>
</div>
<a class="tesx" href="http://www.test_h5.net/index.php/Index/get_pic.html">
<p style="color: white;font-size: 30px;display: inline-block;margin-top: 20px">开始测试</p>
<img src="__IMGAGES__/test.jpg"/>
</a>
</div>
......
appwww/Assets/Admin/images/s_logo.png

8.13 KB | W: | H:

appwww/Assets/Admin/images/s_logo.png

603 KB | W: | H:

appwww/Assets/Admin/images/s_logo.png
appwww/Assets/Admin/images/s_logo.png
appwww/Assets/Admin/images/s_logo.png
appwww/Assets/Admin/images/s_logo.png
  • 2-up
  • Swipe
  • Onion skin
appwww/Assets/Admin/images/zhutu.jpg

81.4 KB | W: | H:

appwww/Assets/Admin/images/zhutu.jpg

748 KB | W: | H:

appwww/Assets/Admin/images/zhutu.jpg
appwww/Assets/Admin/images/zhutu.jpg
appwww/Assets/Admin/images/zhutu.jpg
appwww/Assets/Admin/images/zhutu.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -31,7 +31,7 @@ define('SITE_PATH', PROJECT_PATH."www/");
define('APP_PATH', PROJECT_PATH. 'Application/');
// 定义资源路径
define('STATIC_COMEON_ASSETS','Assets/Admin');
define('STATIC_COMEON_ASSETS','test_h5/appwww/Assets/Admin');
//定义缓存存放路径
define("RUNTIME_PATH", PROJECT_PATH . "runtime/");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment