Commit d99a3fa7 authored by 章建武's avatar 章建武

dep

parent fa3f1313
...@@ -3,10 +3,10 @@ return array( ...@@ -3,10 +3,10 @@ return array(
'DEFAULT_FILTER' => 'addslashes', 'DEFAULT_FILTER' => 'addslashes',
'IS_DEBUG_VER' => true, 'IS_DEBUG_VER' => true,
'URL_CASE_INSENSITIVE' =>false, 'URL_CASE_INSENSITIVE' =>false,
'DOMAIN' => 'http://mallapp.guoguodz.com/', 'DOMAIN' => 'http://www.test_h5.net/',
'WEI_DOMAIN' => 'https://vote.guoguodz.com/', 'WEI_DOMAIN' => 'https://vote.guoguodz.com/',
'APP_NAME' => '时尚天河', 'APP_NAME' => '时尚天河',
// 服务号授权ID和secret // 服务号授权ID和secret
'APPID' => 'wx6e539bffabd650fd', 'APPID' => 'wx6a1bc838049dc014',
'APP_SECRET' => '54f57c5d48319eeda2a37cbcefaf9644', 'APP_SECRET' => 'c18bb371c2f31461efffeb6ef94b5291',
); );
...@@ -10,20 +10,18 @@ class IndexController extends Controller ...@@ -10,20 +10,18 @@ class IndexController extends Controller
{ {
parent::__construct(); parent::__construct();
} }
public function index() public function index()
{ {
session_start(); session_start();
if (!$_SESSION["headimgurl"]) { // if (!$_SESSION["headimgurl"]) {
redirect('http://mallapp.guoguodz.com/h5_pic/appwww/index.php/WxAuthorize'); // redirect('http://mallapp.guoguodz.com/h5_pic/appwww/index.php/WxAuthorize');
return; // return;
} // }
if($_SERVER['QUERY_STRING']){ // if($_SERVER['QUERY_STRING']){
$url = '?'.$_SERVER['QUERY_STRING']; // $url = '?'.$_SERVER['QUERY_STRING'];
} // }
$link = 'http://'.$_SERVER["HTTP_HOST"].'/h5_pic/appwww/index.php'.$url; // $link = 'http://'.$_SERVER["HTTP_HOST"].'/h5_pic/appwww/index.php'.$url;
//
$this->assign('link',$link); $this->assign('link',$link);
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$nonceStr = ""; $nonceStr = "";
...@@ -59,159 +57,182 @@ class IndexController extends Controller ...@@ -59,159 +57,182 @@ class IndexController extends Controller
$string = "jsapi_ticket=".$argu['jsapi_ticket']."&noncestr=".$argu['nonceStr']."&timestamp=".$argu['timestamp']."&url=".$argu['url']; $string = "jsapi_ticket=".$argu['jsapi_ticket']."&noncestr=".$argu['nonceStr']."&timestamp=".$argu['timestamp']."&url=".$argu['url'];
$argu['signature'] = sha1(trim($string)); $argu['signature'] = sha1(trim($string));
$this->assign($argu); $this->assign($argu);
$this->display('index'); $this->display('index');
} }
//上传图片
public function upload (){ //http://www.test_h5.net/index.php/Index/get_pic.html 访问路径
//生成图片
public function get_pic (){
session_start();
$num = $_SESSION['num'] += 1;
$link = 'http://mallapp.guoguodz.com/h5_pic/appwww/'; $link = 'http://mallapp.guoguodz.com/h5_pic/appwww/';
// $link = 'www.h5_pic.net/'; $link = C('DOMAIN').STATIC_COMEON_ASSETS.'/images/zhutu.jpg';
$mo = I('post.mo'); //mo=1 点击切换生成 mo=2 自由填写
$mtxt = I('post.mtxt');
$txt1 = I('post.txt1');
$txt2 = I('post.txt2');
$txt3 = I('post.txt3');
$txt4 = I('post.txt4');
$sign_pic = I('post.sign_pic');
$pimg = I('post.pimg');
$user = I('post.user');
//主图 //主图
$pic_url = $link.$this->get_base64_img($pimg); $pic_url = $link;
// $pic_url = 'http://www.h5_pic.net/H5/pimg/1576225374.png';
//水印图
$mtxt = 'http://mallapp.guoguodz.com/h5_pic/appwww/Assets/Admin/images/m'.$mtxt.'.png';
//logo
$logo = 'http://mallapp.guoguodz.com/h5_pic/appwww/Assets/Admin/images/logo.png';
//二维码 //二维码
$qr_code = 'http://mallapp.guoguodz.com/h5_pic/appwww/Assets/Admin/images/qr_code.png'; $qr_code = 'http://mallapp.guoguodz.com/h5_pic/appwww/Assets/Admin/images/qr_code.png';
//微信名称 //用户头像
$user_str = 'Via:'.$user; $user_pic = $_SESSION["headimgurl"];
$user_pic ='http://www.test_h5.net/H5/pic/aa.jpg';
//指定要缩放到的宽度 $this->yuan_img($user_pic,$num);
$maxW = 640;
//指定要缩放到的高度
$maxH = 1048;
//mo=1 点击切换生成 mo=2 自由填写
$bg = imagecreatetruecolor($maxW, $maxH);
$background = imagecolorallocate($bg, 255, 255, 255);
imagefill($bg,0,0,$background);
$im = imagecreatefromjpeg($pic_url); $im = imagecreatefromjpeg($pic_url);
// $im = imagecreatefrompng($pic_url);
imagefilter($im,IMG_FILTER_GRAYSCALE);
$oldW = imagesx($im); $oldW = imagesx($im);
$oldH = imagesy($im); $oldH = imagesy($im);
$source_ratio = $oldW / $oldH; $bg = imagecreatetruecolor($oldW, $oldH);
$target_ratio = 1028 / 620; imagefill($bg,0,0,0);
$source_width = $oldW; imagecopyresampled($bg, $im, 0, 0, 0, 0, $oldW, $oldH, $oldW, $oldH);
$source_height = $oldH;
if ($source_ratio > $target_ratio){
// image-to-height
$newW = $source_width;
$newH = $source_width * $target_ratio;
}elseif ($source_ratio < $target_ratio){
//image-to-widht
$newW = $source_height / $target_ratio;
$newW = $newW - 30;
$newH = $source_height;
}else{
//image-size-ok
$newW = $source_width;
$newH = $source_height;
}
// //判断那个边比较长,利用较长的边求得比例
// if($oldW>$oldH){
// //求得比例
// $b = $oldW/$maxW;
// //获取缩放之后的宽高
// $newW = $oldW/$b*0.2;
// $newH = $oldH/$b*0.2;
// }else{
// //求得比例
// $b = $oldH/$maxH;
// //获取缩放之后的宽高
// $newW = $oldW/$b*0.2;
// $newH = $oldH/$b*0.2;
//
// }
imagecopyresampled($bg, $im, 10, 10, 0, 0, 620, 1028, $newW, $newH); //二维码水印
if($mo == 1){
$stamp = imagecreatefrompng($mtxt);
$code = imagecreatefrompng($qr_code); $code = imagecreatefrompng($qr_code);
$logo = imagecreatefrompng($logo); imagecopymerge($bg, $code, 5, 0, 0, 0, 130, 130, 100);
// 利用图像的宽度和水印的外边距计算位置,并且将水印复制到图像上 //用户头像水印
imagecopymerge($bg, $stamp, 0, 0, 0, 0, 640, 261, 100); $u_img = 'http://www.test_h5.net/H5/pimg/'.$num.'.png';
imagecopymerge($bg, $code, 5, 880, 0, 0, 130, 130, 100); $this->thumb($u_img,$num);
imagecopymerge($bg, $logo, 0, 930, 0, 10, 640, 180, 100);
//缩略图
$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);
$text_str = PROJECT_PATH.'appwww/msyh.ttf'; $text_str = PROJECT_PATH.'appwww/msyh.ttf';
$textcolor = imagecolorallocate($bg, 255, 255, 255); $textcolor = imagecolorallocate($bg, 255, 255, 255);
imagettftext($bg, 24, 0, 10, 298, $textcolor, $text_str, mb_convert_encoding($user_str, "utf-8")); $a = $this->get_array_rand();
// 输出图像并释放内存 $fontBox_0 = imagettfbbox(38, 0, $text_str, $a[0]);//文字水平居中实质
//header('Content-type: image/png'); $fontBox_1 = imagettfbbox(38, 0, $text_str, $a[1]);//文字水平居中实质
}else{ imagettftext($bg, 38, 0, ceil(($oldW - $fontBox_0[2]) / 7), 350, $textcolor, $text_str, mb_convert_encoding($a[0], "utf-8"));
$code = imagecreatefrompng($qr_code); imagettftext($bg, 38, 0, ceil(($oldW - $fontBox_1[2]) / 7), 420, $textcolor, $text_str, mb_convert_encoding($a[1], "utf-8"));
$logo = imagecreatefrompng($logo); // imagettftext($bg, 38, 0, 10, 180, $textcolor, $text_str, mb_convert_encoding($a[2], "utf-8"));
imagecopymerge($bg, $code, 5, 880, 0, 0, 130, 130, 100); // imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[3], "utf-8"));
imagecopymerge($bg, $logo, 0, 930, 0, 10, 640, 180, 100); // imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[4], "utf-8"));
$text_str = PROJECT_PATH.'appwww/msyh.ttf'; // imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[5], "utf-8"));
$textcolor = imagecolorallocate($bg, 255, 255, 255); // 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"));
$t1 = mb_convert_encoding($txt1, "utf-8"); // imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[8], "utf-8"));
$t2 = mb_convert_encoding($txt2, "utf-8"); // imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[9], "utf-8"));
$t3 = mb_convert_encoding($txt3, "utf-8"); // imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[10], "utf-8"));
$t4 = mb_convert_encoding($txt4, "utf-8"); // imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[11], "utf-8"));
$rectangle_color = imagecolorallocate($bg, 255, 0, 0); // imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($a[12], "utf-8"));
imagefilledrectangle($bg, 0, 135, strlen($t3)*18.5, 187, $rectangle_color);
imagefilledrectangle($bg, 0, 195, strlen($t4)*18.5, 245, $rectangle_color);
imagettftext($bg, 38, 0, 10, 66, $textcolor, $text_str, mb_convert_encoding($txt1, "utf-8"));
imagettftext($bg, 38, 0, 10, 126, $textcolor, $text_str, mb_convert_encoding($txt2, "utf-8"));
imagettftext($bg, 38, 0, 10, 180, $textcolor, $text_str, mb_convert_encoding($txt3, "utf-8"));
imagettftext($bg, 38, 0, 10, 238, $textcolor, $text_str, mb_convert_encoding($txt4, "utf-8"));
imagettftext($bg, 24, 0, 10, 288, $textcolor, $text_str, mb_convert_encoding($user_str, "utf-8"));
}
$text_c = imagecolorallocate($bg, 255, 255, 255);
imagettftext($bg, 12, 0, 10, 1030, $text_c, $text_str, mb_convert_encoding('识别二维码参与H5互动', "utf-8"));
$path = "H5/pic/"; $path = "H5/pic/";
if (!is_dir($path)){ if (!is_dir($path)){
mkdir($path,0777,true); mkdir($path,0777,true);
} }
imagepng($bg,$path.$sign_pic.'.png');
imagepng($bg,$path.$num.'.png');
imagedestroy($bg); imagedestroy($bg);
//返回处理后的水印图片 //返回处理后的水印图片
$url = 'http://mallapp.guoguodz.com/h5_pic/appwww/H5/pic/'.$sign_pic.'.png'; $url = 'http://www.test_h5.net/H5/pic/'.$num.'.png';
$data = ['url'=>$url,'msg'=>'ok']; $this->assign('url',$url);
$this->ajaxReturn($data); $this->display();
}
//圆图
public function yuan_img($user_pic,$num){
$ext = pathinfo($user_pic);
$src_img = null;
switch ($ext['extension']) {
case 'jpg':
$src_img = imagecreatefromjpeg($user_pic);
break;
case 'png':
$src_img = imagecreatefrompng($user_pic);
break;
}
$wh = getimagesize($user_pic);
$w = $wh[0];
$h = $wh[1];
$w = min($w, $h);
$h = $w;
$img = imagecreatetruecolor($w, $h);
imagesavealpha($img, true);
//拾取一个完全透明的颜色,最后一个参数127为全透明
$bg = imagecolorallocatealpha($img, 255, 255, 255, 127);
imagefill($img, 0, 0, $bg);
$r = $w / 2; //圆半径
$y_x = $r; //圆心X坐标
$y_y = $r; //圆心Y坐标
for ($x = 0; $x < $w; $x++) {
for ($y = 0; $y < $h; $y++) {
$rgbColor = imagecolorat($src_img, $x, $y);
if (((($x - $r) * ($x - $r) + ($y - $r) * ($y - $r)) < ($r * $r))) {
imagesetpixel($img, $x, $y, $rgbColor);
}
}
} }
//base64转图片
function get_base64_img($base64){
if (preg_match('/^(data:\s*image\/(\w+);base64,)/', $base64, $result)){
$type = $result[2];
$path = "H5/pimg/"; $path = "H5/pimg/";
if (!is_dir($path)){ if (!is_dir($path)){
mkdir($path,0777,true); mkdir($path,0777,true);
} }
$new_file = $path.time().".{$type}";
$data = file_put_contents($new_file, base64_decode(str_replace($result[1], '', $base64))); imagepng($img,$path.$num.'.png');
if ($data){ }
return $new_file;
}else{ //缩略图
return false; public function thumb($user_pic,$num){
$src_img = imagecreatefrompng($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_img =imagecreatetruecolor($dst_w,$dst_h);/*创建目标图像*/
imagealphablending($dst_img,false);
imagesavealpha($dst_img,true);
/*生成缩略图*/
imagecopyresampled($dst_img,$src_img,0,0,0,0,$dst_w,$dst_h,$src_w,$src_h);
/*保存图片*/
$path = "H5/pimg/";
if (!is_dir($path)){
mkdir($path,0777,true);
} }
imagepng($dst_img,$path.'thumb'.$num.'.png');
/*删除资源*/
imagedestroy($dst_img);
} }
//随机取
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");
$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_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_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;
} }
} }
<html lang="en">
<head>
<meta charset="utf-8" />
<title>...</title>
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,shrink-to-fit=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta name="msapplication-tap-highlight" content="no">
<link rel="stylesheet" type="text/css" href="__CSS__/swiper-3.3.1.min.css">
<link rel="stylesheet" type="text/css" href="__CSS__/animate.css">
<link rel="stylesheet" type="text/css" href="__CSS__/skin.css">
<script type="text/javascript">
var phoneScale = parseInt(window.screen.width)/640;
document.write('<meta name="viewport" content="width=640, minimum-scale = '+ phoneScale +', maximum-scale = '+ phoneScale +'">');
</script>
<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;*/
}
</style>
</head>
<body style="background: white">
<div style="background: white" class="loading-wrapper">
<div class="logo">
<img src='{$url}'>
</div>
</div>
<script type="text/javascript" src="__JS__/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script type="text/javascript">
var type = 1, pimg = '', mo=1, mtxt=2, user="{$wx_name}", gun=false,sign_pic = '{$signature}';
var on = '__IMGAGES__/music_on.jpg';
var off = '__IMGAGES__/music_off.jpg';
wx.config({
debug: false,
appId: '{$appId}',
timestamp: '{$timestamp}',
nonceStr: '{$nonceStr}',
signature: '{$signature}',
jsApiList: [
'onMenuShareTimeline',
'onMenuShareAppMessage',
'chooseImage',
'downloadImage',
'uploadImage',
'getLocalImgData'
]
});
wx.ready(function () {
wx.onMenuShareTimeline({
title: '时尚匠心 榜样力量', // 分享标题
desc: '2019中国创业者大会 在时代创变的前夜,等你!', // 分享描述
link: '{$link}', // 分享链接
imgUrl: 'http://mallapp.guoguodz.com/h5_pic/appwww/Assets/Admin/images/s_logo.png', // 分享图标
success: function () {
},
cancel: function () {
}
});
wx.onMenuShareAppMessage({
title: '时尚匠心 榜样力量', // 分享标题
desc: '2019中国创业者大会 在时代创变的前夜,等你!', // 分享描述
link: '{$link}', // 分享链接
imgUrl: 'http://mallapp.guoguodz.com/h5_pic/appwww/Assets/Admin/images/s_logo.png', // 分享图标
success: function () {
},
cancel: function () {
}
});
});
wx.checkJsApi({
jsApiList: [
'chooseImage',
'downloadImage',
'uploadImage'
],success:function(){
console.log("wx.checkJsApi success");
},fail: function(res){
console.log("wx.checkJsApi error");
console.log(res);
}
});
</script>
</body>
</html>
\ No newline at end of file
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>时尚匠心 榜样力量</title> <title>...</title>
<meta name="format-detection" content="telephone=no" /> <meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,shrink-to-fit=no">
<meta content="yes" name="apple-mobile-web-app-capable"> <meta content="yes" name="apple-mobile-web-app-capable">
...@@ -17,158 +17,44 @@ ...@@ -17,158 +17,44 @@
document.write('<meta name="viewport" content="width=640, minimum-scale = '+ phoneScale +', maximum-scale = '+ phoneScale +'">'); document.write('<meta name="viewport" content="width=640, minimum-scale = '+ phoneScale +', maximum-scale = '+ phoneScale +'">');
</script> </script>
<script> <style>
/**微信环境中**/ .logo{
document.addEventListener("WeixinJSBridgeReady", function () { position:absolute;
audioAutoPlay('bgmusic'); width:550px;
}, false); height:620px;
</script> left:45px;
</head> top:0;
<body> overflow:hidden;
<div class="loading-wrapper"> display: flex;
<div class="load5"><img src='http://h5.innokids.cn/haibao/images/load5.jpg'></div> justify-content: center;
<div class="load1"><img src='http://h5.innokids.cn/haibao/images/load1.png'></div> align-items: center;
<div class="load2"><img src='http://h5.innokids.cn/haibao/images/load2.png'></div> }
<div class="load3"><img src='__IMGTEXT__/page01/01-01.png'></div> .tesx{
<!--logo--> position:absolute;
<div class="load4"><img src='__IMGAGES__/logo.png'></div> left:20px;
<div class="load6"><img src='http://h5.innokids.cn/haibao/images/dong.gif'></div> top:610px;
</div> height: 80px;
width: 600px;
<div class="swiper-container swiper-container-h" id="mySwiper" style='visibility:hidden;'> background:#2f6f9f;
<div class="swiper-wrapper"> border-radius:10px;
<!--第一屏 start--> }
<div class="swiper-slide"> </style>
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p1-2"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-2.png"></div>
<div class="p1-13">{$wx_name}</div>
<div class="p1-12"><img src="{$headimg}"></div>
<div class="p1-14">
<div class="bao">
<div class="p1-3 wenzi txt"><img loadsrc="__IMGTEXT__/page02/01.png"></div>
<div class="p1-4 wenzi txt"><img loadsrc="__IMGTEXT__/page02/02.png"></div>
<div class="p1-5 wenzi txt"><img loadsrc="__IMGTEXT__/page02/03.png"></div>
<div class="p1-6 wenzi txt"><img loadsrc="__IMGTEXT__/page02/04.png"></div>
<div class="p1-7 wenzi txt"><img loadsrc="__IMGTEXT__/page02/05.png"></div>
<div class="p1-8 wenzi txt"><img loadsrc="__IMGTEXT__/page02/06.png"></div>
<div class="p1-9 wenzi txt"><img loadsrc="__IMGTEXT__/page02/07.png"></div>
<div class="p1-10 wenzi txt"><img loadsrc="__IMGTEXT__/page02/08.png"></div>
<div class="p1-11 wenzi txt"><img loadsrc="__IMGTEXT__/page02/09.png"></div>
<div class="t1-1 wenzi2 txt"><img loadsrc="__IMGTEXT__/page02/10.png"></div>
<div class="t1-2 wenzi2 txt"><img loadsrc="__IMGTEXT__/page02/11.png"></div>
<div class="t1-3 wenzi2 txt"><img loadsrc="__IMGTEXT__/page02/12.png"></div>
<div class="t1-4 wenzi2 txt"><img loadsrc="__IMGTEXT__/page02/13.png"></div>
<div class="t1-5 wenzi2 txt"><img loadsrc="__IMGTEXT__/page02/14.png"></div>
<div class="t1-6 wenzi2 txt"><img loadsrc="__IMGTEXT__/page02/15.png"></div>
<div class="t1-7 wenzi2 txt"><img loadsrc="__IMGTEXT__/page02/16.png"></div>
<div class="t1-8 wenzi2 txt"><img loadsrc="__IMGTEXT__/page02/17.png"></div>
</div>
</div>
<!--logo-->
<div class="load4"><img loadsrc='__IMGAGES__/logo.png'></div>
<div class="shang txt"><img loadsrc="http://h5.innokids.cn/haibao/images/shang.png"></div>
</div>
<div class="swiper-slide">
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p1-1 jr"><img loadsrc="__IMGAGES__/03六町目.jpg"></div>
<div class="shang txt"><img loadsrc="http://h5.innokids.cn/haibao/images/shang.png"></div>
</div>
<div class="swiper-slide">
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p1-1 jr"><img loadsrc="__IMGAGES__/05弓夫.jpg"></div>
<div class="shang txt"><img loadsrc="http://h5.innokids.cn/haibao/images/shang.png"></div>
</div>
<div class="swiper-slide">
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p1-1 jr"><img loadsrc="__IMGAGES__/07汪喜峰.jpg"></div>
<div class="shang txt"><img loadsrc="http://h5.innokids.cn/haibao/images/shang.png"></div>
</div>
<div class="swiper-slide">
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p1-1 jr"><img loadsrc="__IMGAGES__/06时尚天河.jpg"></div>
<div class="shang txt"><img loadsrc="http://h5.innokids.cn/haibao/images/shang.png"></div>
</div>
<div class="swiper-slide">
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p1-1 jr"><img loadsrc="__IMGAGES__/04时尚天河.jpg"></div>
<div class="shang txt"><img loadsrc="http://h5.innokids.cn/haibao/images/shang.png"></div>
</div>
<div class="swiper-slide">
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p1-1 jr"><img loadsrc="__IMGAGES__/08时尚天河.jpg"></div>
<div class="shang txt"><img loadsrc="http://h5.innokids.cn/haibao/images/shang.png"></div>
</div>
<div class="swiper-slide">
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p1-1 jr"><img loadsrc="__IMGAGES__/09最后.jpg"></div>
<div class="shang txt"><img loadsrc="http://h5.innokids.cn/haibao/images/shang.png"></div>
</div>
<div class="swiper-slide">
<div class="temp1">
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p6-2"><img loadsrc="http://h5.innokids.cn/haibao/images/p6-2.png"></div>
<div class="p6-3"><img id="pic" loadsrc="__IMGAGES__/p6-3a.jpg"></div>
<div class="p6-3 chuan"></div>
<div class="p6-4 nbg"><img loadsrc="http://h5.innokids.cn/haibao/images/p6-4.png"></div>
<div class="p6-5 nbg"><img loadsrc="http://h5.innokids.cn/haibao/images/p6-5.png"></div>
<div class="load4 jr4"><img loadsrc='__IMGAGES__/logo.png'></div>
</div>
<div class="temp2">
<div class="p1-1"><img loadsrc="http://h5.innokids.cn/haibao/images/p1-1.jpg"></div>
<div class="p7-1 bgimg"><img loadsrc="http://h5.innokids.cn/haibao/images/ad.jpg"></div>
<div class="p7-1"><img loadsrc="http://h5.innokids.cn/haibao/images/hai2a.png"></div>
<div class="p7-2 txt">
<input type='text' class="inp txt1" maxlength='12' value=''>
<input type='text' class="inp txt2" maxlength='12' value=''>
<input type='text' class="inp txt3" maxlength='12' value=''>
<input type='text' class="inp txt4" maxlength='12' value=''>
</div>
<div class="p7-6"><img loadsrc="__IMGAGES__/m2.png"></div>
<div class="p7-3 nbg"><img loadsrc="http://h5.innokids.cn/haibao/images/p7-3.png"></div>
<div class="p7-4 nbg"><img loadsrc="http://h5.innokids.cn/haibao/images/p7-4.png"></div>
<div class="p7-5 nbg"><img loadsrc="http://h5.innokids.cn/haibao/images/p7-5.png"></div>
<div class="p7-9 txt">
<div class="p7-91"><img loadsrc="http://h5.innokids.cn/haibao/images/deng.png"></div>
<div class="p7-92"><img loadsrc="http://h5.innokids.cn/haibao/images/loading51.gif"></div>
</div>
<div class="p7-8 txt">
<div class="p7-81"><img loadsrc="http://h5.innokids.cn/haibao/images/ad.jpg"></div>
<div class="p7-82"><img loadsrc="http://h5.innokids.cn/haibao/images/p7-8.png"></div>
<!--<div class="p7-83">-->
<!--<div class="zhezhao"></div>-->
<!--<div class="p7-831"><img loadsrc="http://h5.innokids.cn/haibao/images/fu.png"></div>-->
<!--</div>-->
</div>
</div>
<div class="temp6"> </head>
<div class="p6-12"></div> <body style="background: white">
<div class="p6-11"></div> <div style="background: white" class="loading-wrapper">
</div> <div class="logo">
</div> <img src='__IMGAGES__/s_logo.png'>
</div> </div>
<div class="swiper-pagination swiper-pagination-h"></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>
</a>
</div> </div>
<img class='txt' loadsrc="__IMGAGES__/m2.png">
<img class='txt' loadsrc="__IMGAGES__/m3.png">
<img class='txt' loadsrc="__IMGAGES__/m4.png">
<audio src="__JS__/bg.mp3" autoplay="true" preload="auto" type="audio/mpeg" loop id="bgmusic"></audio>
<div class='mc play'><img class='yinyue' loadsrc='__IMGAGES__/music_on.jpg'></div>
<!--<div class="mengban txt"><img loadsrc="./images/mengban2.png"></div>-->
<script type="text/javascript" src="__JS__/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="__JS__/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="__JS__/swiper-3.3.1.jquery.min.js"></script>
<script type="text/javascript" src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script> <script type="text/javascript" src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var type = 1, pimg = '', mo=1, mtxt=2, user="{$wx_name}", gun=false,sign_pic = '{$signature}';
var on = '__IMGAGES__/music_on.jpg';
var off = '__IMGAGES__/music_off.jpg';
wx.config({ wx.config({
debug: false, debug: false,
appId: '{$appId}', appId: '{$appId}',
...@@ -206,177 +92,10 @@ wx.ready(function () { ...@@ -206,177 +92,10 @@ wx.ready(function () {
} }
}); });
}); });
wx.checkJsApi({
jsApiList: [
'chooseImage',
'downloadImage',
'uploadImage'
],success:function(){
console.log("wx.checkJsApi success");
},fail: function(res){
console.log("wx.checkJsApi error");
console.log(res);
}
});
function tishi(p){
$(".p6-11").html(p);
$(".temp6").fadeIn();
setTimeout(function(){
$(".temp6").fadeOut();
},3500);
return false;
}
var images = {
localId: [],
serverId: []
};
function chooseimg() {
setTimeout(function(){
console.log("start chooseimg");
wx.chooseImage({
count:1,
success: function (res) {
var localIds = res.localIds;
upimg(localIds[0]);
console.log("chooseimg success");
},
fail: function(res) {
console.log(res);
},
complete: function(res){
console.log("complete")
}
});
},200);
}
function upimg(localId) {
setTimeout(function(){
wx.uploadImage({
localId: localId,
success: function (res) {
var serverId = res.serverId;
downloadimg(serverId);
},
fail: function (res) {
alert(JSON.stringify(res));
}
});
},200);
}
function downloadimg(imgid){
wx.downloadImage({
serverId: imgid, // 需要下载的图片的服务器端ID,由uploadImage接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
console.log("downloadimg success");
$(".temp3").fadeIn();
var localId = res.localId; // 返回图片下载后的本地ID
getimg(localId);
},
fail: function (res) {
alert(JSON.stringify(res));
}
});
}
function getimg(imageid){
wx.getLocalImgData({
localId: imageid, // 图片的localID
success: function (res) {
var localData = res.localData; // localData是图片的base64数据,可以用img标签显示
if (localData.indexOf('data:image') != 0) {
//判断是否有这样的头部
localData = 'data:image/jpeg;base64,' + localData
}
localData = localData.replace(/\r|\n/g, '').replace('data:image/jgp', 'data:image/jpeg')
pimg = localData;
uploadimg();
},
fail: function (res) {
alert(JSON.stringify(res));
}
});
}
function uploadimg(){
// $.post("{$apiurl}Index/upload",{'url':pimg}, function(data){
// if(data.msg == "ok"){
var nimg = new Image();
nimg.src = pimg;
nimg.onload = function(){
// pimg = data.url;
$(".chuan").fadeOut();
$(".p6-3 img").attr("src", pimg);
$(".bgimg img").attr("src", pimg);
}
// }else{
// alert(data.tishi);
// }
// },"json");
}
function createpic(){
// $.post("{$apiurl}Index/create_user",{'type':type, 'url':pimg}, function(data){
// if(data.msg == "ok"){
var nimg = new Image();
nimg.src = pimg;
nimg.onload = function(){
setTimeout(function(){
$(".p2-3 img").attr("src", pimg);
$(".temp2").fadeIn(1000);
$(".p2-3").animate({top:'205px'},4000);
$(".temp3").delay(1000).fadeOut();
},3000);
}
// }else if(data.msg == 'err2'){
// alert("您的照片可能不符合要求\n请您自拍一张试试吧!");
// $(".temp3").fadeOut();
// $(".txt").delay(500).fadeOut();
// chooseimg();
// }else{
// alert("网络堵塞了,请稍后再试!");
// }
// },"json");
}
</script>
<script type="text/javascript" src="__JS__/swiper.js"></script>
<script>
function audioAutoPlay(id){
var audio = document.getElementById(id);
var play = function(){
audio.play();
document.removeEventListener("touchstart",play, false);
};
audio.play();
document.addEventListener("touchstart",play, false);
}
//暂停播放调用
function completeFun(){
musicStar.pause();
musicStar.play();
}
</script> </script>
<script> <script>
var _mtac = {};
(function() {
var mta = document.createElement("script");
mta.src = "http://pingjs.qq.com/h5/stats.js?v2.0.4";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "500295729");
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(mta, s);
})();
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -82,7 +82,7 @@ img{display:block;width:100%;}/* pointer-events: none; */ ...@@ -82,7 +82,7 @@ img{display:block;width:100%;}/* pointer-events: none; */
.wenzi2{position:absolute; width:640px; height:auto; left:0px; top:550px;} .wenzi2{position:absolute; width:640px; height:auto; left:0px; top:550px;}
.p6-2{position:absolute; width:640px; height:auto; left:0px; top:80px;} .p6-2{position:absolute; width:640px; height:auto; left:0px; top:80px;}
.p6-3{ .logo{
position:absolute; position:absolute;
width:349px; width:349px;
height:620px; height:620px;
......
...@@ -31,7 +31,7 @@ define('SITE_PATH', PROJECT_PATH."www/"); ...@@ -31,7 +31,7 @@ define('SITE_PATH', PROJECT_PATH."www/");
define('APP_PATH', PROJECT_PATH. 'Application/'); define('APP_PATH', PROJECT_PATH. 'Application/');
// 定义资源路径 // 定义资源路径
define('STATIC_COMEON_ASSETS','h5_pic/appwww/Assets/Admin'); define('STATIC_COMEON_ASSETS','Assets/Admin');
//定义缓存存放路径 //定义缓存存放路径
define("RUNTIME_PATH", PROJECT_PATH . "runtime/"); 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