Commit 267f67f3 by zhangheng

y

parent cf6251b4
...@@ -21,21 +21,21 @@ return array( ...@@ -21,21 +21,21 @@ return array(
'MODULE_ALLOW_LIST' => array('Home', 'Cli', 'Api', 'User'), 'MODULE_ALLOW_LIST' => array('Home', 'Cli', 'Api', 'User'),
'SHOW_PAGE_TRACE' => false, 'SHOW_PAGE_TRACE' => false,
'ERROR_PAGE' =>'/50x.html', 'ERROR_PAGE' =>'/50x.html',
'SITE_URL' => 'http://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'dencare-year.dev.izhida.cn'),
'SITE_URL' => 'http://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'moli.gnhj.izhida.cn'),
'PUBLISH_MODE' => 'production', // development,test,production 'PUBLISH_MODE' => 'production', // development,test,production
// 'UPLOAD_SITEIMG_QINIU' => array( 'UPLOAD_SITEIMG_QINIU' => array(
// 'maxSize' => 5 * 1024 * 1024,//文件大小 'maxSize' => 5 * 1024 * 1024,//文件大小
// 'rootPath' => './', 'rootPath' => './',
// 'saveName' => array('uniqid', ''), 'saveName' => array('uniqid', ''),
// 'driver' => 'Qiniu', 'driver' => 'Qiniu',
// 'driverConfig' => array( 'driverConfig' => array(
// 'accessKey' => 'ggMPohY9_87Q69nDYUMwvR7XqlLYAREH-btbJG3U', 'accessKey' => 'ggMPohY9_87Q69nDYUMwvR7XqlLYAREH-btbJG3U',
// 'secrectKey' => 'OPzIqCWVMDs7tAYjPi9Hn7JkxBj2CtHARCCEnrdd', 'secrectKey' => 'OPzIqCWVMDs7tAYjPi9Hn7JkxBj2CtHARCCEnrdd',
// 'domain' => '7xou29.media1.z0.glb.clouddn.com', 'domain' => 'media.izhida.cn',
// 'bucket' => 'zhida-stream', 'bucket' => 'media',
//// 'domain' => '7xjtzd.com2.z0.glb.qiniucdn.com', // 'domain' => '7xjtzd.com2.z0.glb.qiniucdn.com',
//// 'bucket' => 'zhida-yingxiaoyi', // 'bucket' => 'zhida-yingxiaoyi',
// ), ),
// ), ),
); );
\ No newline at end of file
<?php <?php
//return array( return array(
// 'DB_TYPE' => 'mysql', 'DB_TYPE' => 'mysql',
// 'DB_HOST' => 'localhost', 'DB_HOST' => 'localhost',
// 'DB_PORT' => '3306', 'DB_PORT' => '3306',
// 'DB_NAME' => 'dev_dencare_20170119_photo', // <--- 修改这里 'DB_NAME' => 'dev_dencare_20181221_year', // <--- 修改这里
// 'DB_USER' => 'dev', // <--- 修改这里 'DB_USER' => 'dev', // <--- 修改这里
// 'DB_PWD' => '1q2w3e', // <--- 修改这里 'DB_PWD' => '1q2w3e', // <--- 修改这里
// 'DB_PREFIX' => '', 'DB_PREFIX' => '',
// 'DB_CHARSET' => 'utf8mb4', 'DB_CHARSET' => 'utf8mb4',
//); );
//return array( //return array(
// 'DB_TYPE' => 'mysql', // 'DB_TYPE' => 'mysql',
......
...@@ -81,15 +81,11 @@ trait ControllerTrait ...@@ -81,15 +81,11 @@ trait ControllerTrait
'openid' => $openid 'openid' => $openid
); );
} else { } else {
// $user = $data['user']; // unset($data['privilege']);
unset($data['privilege']);
$user = array(); $user = array();
$user['openid'] = $data['user']['openid']; $user['openid'] = $data['user']['openid'];
$user['nickname'] = $data['user']['nickname']; $user['nickname'] = $data['user']['nickname'];
// $user['city'] = $data['user']['city'];
// $user['sex'] = $data['user']['sex'];
$user['headimgurl'] = preg_replace('@(/0)$@', '/132', $data['user']['headimgurl']); $user['headimgurl'] = preg_replace('@(/0)$@', '/132', $data['user']['headimgurl']);
$user['info'] = json_encode($data); $user['info'] = json_encode($data);
} }
...@@ -98,11 +94,11 @@ trait ControllerTrait ...@@ -98,11 +94,11 @@ trait ControllerTrait
if ($old_user) { if ($old_user) {
M('User')->token(false)->where(array('openid' => $openid))->save($user); M('User')->token(false)->where(array('openid' => $openid))->save($user);
} else { } else {
$user['created_at'] = $_SERVER['REQUEST_TIME'];
// $user['reg_ip'] = $this->getIP();
// $user['last_visit'] = time();
$user['last_ip'] = $this->getIP(); $user['created_at'] = $_SERVER['REQUEST_TIME'];
// $user['reg_ip'] = getIP();
$user['last_visit'] = time();
// $user['last_ip'] = getIP();
M('User')->token(false)->add($user); M('User')->token(false)->add($user);
} }
$_SESSION['is_wechat'] = 1; $_SESSION['is_wechat'] = 1;
......
...@@ -11,6 +11,7 @@ use Think\Log; ...@@ -11,6 +11,7 @@ use Think\Log;
class IndexController extends Controller class IndexController extends Controller
{ {
private $auth_type = OAuthHelperV3::SCOPE_BASE; private $auth_type = OAuthHelperV3::SCOPE_BASE;
// private $auth_type = OAuthHelperV3::SCOPE_USERINFO;
private $cookie_uid_key = 'mtime-laopao-v1'; private $cookie_uid_key = 'mtime-laopao-v1';
private $debug = 1; private $debug = 1;
private $today; private $today;
...@@ -41,12 +42,275 @@ class IndexController extends Controller ...@@ -41,12 +42,275 @@ class IndexController extends Controller
public function index() public function index()
{ {
$user = $this->get_user_info_from_cookie(); $user = $this->get_user_info_from_cookie();
// 如果没有获取到用户信息,引导用户授权
if (!$user) { if (!$user) {
$this->request_auth($this->get_url()); $this->request_auth($this->get_url());
return; return;
} }
$list = glob('Public/static/images/*');
foreach ($list as $key => $value) {
$list[$key] = '/' . $value;
}
// 计算统计使用的app_stat_key
$app_key = md5($this->app_stat_key);
// 将值传递给view页面
$image = json_encode($list);
$this->assign('image', $image);
// 展示页面
$this->display(); $this->display();
} }
public function get_random_prize($user)
{
$v = rand(0, 1000000) / 1000000;
$today_ratio = 1;
if ($v > $today_ratio) {
return false;
}
// if (stripos($user['openid'], 'fake_') !== false) {
// return false;
// }
// $user_prize = M('UserPrize')->where(array(
// 'tel' => $_POST['tel']
// ))->find();
// if ($user_prize) {
// return false;
// }
$now = time();
$req_type = array();
$type_list = array(1, 2, 3, 4, 5);
$from = strtotime(date('Y-m-d', $now));
$to = strtotime(date('Y-m-d', $now + 86400));
foreach ($type_list as $type) {
$c = M('prize')->where(array(
'type' => $type,
'take_time' => array(array('gt', $from), array('lt', $to)),
'is_get' => 1,
))->count();
// 1是电影票
if ($type == 1) {
if ($c >= 2) {
continue;
}
}
// 1牙膏
if ($type == 2) {
if ($c >= 2) {
continue;
}
}
// 3是手机
if ($type == 3) {
if ($c >= 1) {
continue;
}
}
// 4是吹风机
if ($type == 4) {
if ($c >= 2) {
continue;
}
}
$req_type[] = $type;
}
if (empty($req_type)) {
return false;
}
$prize = M('Prize')->where(array(
'reward_time' => array('elt', $now),
'is_get' => 0,
'user_id' => 0,
'type' => array('in', $req_type),
))->order('rand()')->limit(1)->find();
if (!$prize) {
return false;
}
$result = M('Prize')->where(array(
'id' => $prize['id'],
'is_get' => 0,
'user_id' => 0,
))->save(array(
'is_get' => 1,
'user_id' => $user['id'],
'take_time' => $now,
));
if ($result > 0) {
return $prize;
}
return false;
}
public function addInfo()
{
$user = $this->get_user_info_from_cookie();
if (!$user) {
$this->ajaxReturn(array(
'errcode' => 1,
'errmsg' => '用户信息错误',
));
return;
}
$prize = M('Prize')->where(array(
'user_id' => $user['id']
))->find();
if ($prize) {
M('Prize')->where(array(
'user_id' => $user['id']
))->save(array(
'name' => $_POST['name'],
'tel' => $_POST['tel'],
'address' => $_POST['address'],
'reward_time' => time()
));
$this->ajaxReturn(array(
'errcode' => 0,
));
} else {
$this->ajaxReturn(array(
'errcode' => 1,
'errmsg' => '用户信息错误',
));
return;
}
}
public function get_prize()
{
//判断是否中奖过
//要是中奖过了,就不能在中奖
//查看各个奖品的数量是否已经满了
//满了提示没中奖的页面
//要是没中奖,跳到再玩一次页面
//中奖名称和中奖几率
$user = $this->get_user_info_from_cookie();
if (!$user) {
$this->ajaxReturn(array(
'errcode' => 1,
'errmsg' => '用户信息错误',
));
return;
}
M('User')->where(array(
'id'=>$user['id']
))->save(array(
'photo'=>$url = $this->saveCommonImageToQiniu($_POST['photo_url'], uniqid('missfresh_dianzan__'))
));
$prizeInfo = M('Prize')->where(array(
'user_id' => $user['id']
))->find();
if ($prizeInfo) {
$this->prizeSate($prizeInfo, 1);
} else {
$prize = $this->get_random_prize($user);
if ($prize) {
$this->prizeSate($prize, 2);
} else {
$this->ajaxReturn(array(
'errcode' => 0,
'data' => array(
'prize_type' => 0,
'info_type' => 2,
)
));
}
}
}
public function prizeSate($prize, $type)
{
if (!$prize['tel']) {
if ($type == 1) {
$type_id = 2;
} else {
$type_id = 0;
}
$this->ajaxReturn(array(
'errcode' => 0,
'data' => array(
'prize_type' => 1,
'info_type' => $type_id,
'prize_id' => $prize['type']
)
));
return;
} else {
$this->ajaxReturn(array(
'errcode' => 0,
'data' => array(
'prize_type' => 1,
'info_type' => 1,
'name'=>$prize['name'],
'tel'=>$prize['tel'],
'address'=>$prize['address'],
'prize_id' => $prize['type']
)
));
return;
}
}
private function saveCommonImageToQiniu($imgData, $fileNameWithoutExt)
{
$head = substr($imgData, 0, 20);
$type = 'png';
if (stripos($head, 'data:image/jpg;') !== false || stripos($head, 'data:image/jpeg;') !== false) {
$type = 'jpg';
$imgData = substr($imgData, strlen('data:image/jpeg;base64,'));
} else {
$imgData = substr($imgData, strlen('data:image/png;base64,'));
}
$imgData = str_replace(' ', '+', $imgData);
$data = base64_decode($imgData);
if (strlen($data) == 0) {
return false;
}
$fileName = $fileNameWithoutExt . '.' . $type;
$upfile = array(
'name' => 'file',
'fileName' => $fileName,
'fileBody' => $data,
);
$config = C('UPLOAD_SITEIMG_QINIU')['driverConfig'];
$qiniu = new QiniuStorage($config);
$opt = array();
$result = $qiniu->upload($opt, $upfile);
$url = $qiniu->downlink($fileName);
return $url;
}
public function prize()
{
for ($i = 0; $i < 3; $i++) {
M('Prize')->add(array(
'content' => '电影票',
'type' => 1,
));
}
for ($i = 0; $i < 3; $i++) {
M('Prize')->add(array(
'content' => '牙膏',
'type' => 2,
));
}
for ($i = 0; $i < 3; $i++) {
M('Prize')->add(array(
'content' => '手机',
'type' => 3,
));
}
for ($i = 0; $i < 3; $i++) {
M('Prize')->add(array(
'content' => '吹风机',
'type' => 4,
));
}
}
} }
...@@ -28,7 +28,9 @@ class BaseUserController extends BackendController ...@@ -28,7 +28,9 @@ class BaseUserController extends BackendController
$item_list = [ $item_list = [
['id' => 1, 'parent_id' => 0, 'title' => '数据统计', 'url' => 'User/Report/index', 'seq' => 1, ['id' => 1, 'parent_id' => 0, 'title' => '数据统计', 'url' => 'User/Report/index', 'seq' => 1,
'default' => true, 'match_type' => 'url', 'children' => null, 'css_class' => null], 'default' => true, 'match_type' => 'url', 'children' => null, 'css_class' => null],
['id' => 2, 'parent_id' => 0, 'title' => '照片', 'url' => 'User/Check/index', 'seq' => 1, ['id' => 2, 'parent_id' => 0, 'title' => '中奖信息', 'url' => 'User/Check/index', 'seq' => 1,
'default' => false, 'match_type' => 'url', 'children' => null, 'css_class' => null],
['id' => 3, 'parent_id' => 0, 'title' => '照片', 'url' => 'User/Photo/index', 'seq' => 1,
'default' => false, 'match_type' => 'url', 'children' => null, 'css_class' => null], 'default' => false, 'match_type' => 'url', 'children' => null, 'css_class' => null],
]; ];
$tree = $this->buildTreeChildren($item_list, 0); $tree = $this->buildTreeChildren($item_list, 0);
......
...@@ -7,11 +7,11 @@ class CheckController extends BaseUserController ...@@ -7,11 +7,11 @@ class CheckController extends BaseUserController
{ {
public function index() public function index()
{ {
$count = M('Photo')->count(); $count = M('Prize')->count();
$page = new Page($count, 25); $page = new Page($count, 25);
$list = M('Photo')->order('time DESC') $list = M('Prize')->where(array(
->limit($page->firstRow . ',' . $page->listRows) "user_id"=>array('NEQ','0')
->select(); ))->select();
$this->assign('page', $page->show()); $this->assign('page', $page->show());
$this->assign('list', $list); $this->assign('list', $list);
$this->display(); $this->display();
......
...@@ -40,7 +40,7 @@ class HomeController extends Controller ...@@ -40,7 +40,7 @@ class HomeController extends Controller
// $this->display(); // $this->display();
// return; // return;
// } // }
if ($name != 'photo' || $password != 'photo') { if ($name != 'admin' || $password != '123456') {
$error = '�û�����������'; $error = '�û�����������';
$this->assign('error', $error); $this->assign('error', $error);
$this->display(); $this->display();
......
<?php
namespace User\Controller;
use Think\Page;
class PhotoController extends BaseUserController
{
public function index()
{
$count = M('User')->count();
$page = new Page($count, 25);
$list = M('User')->where(array(
"photo"=>array('NEQ','NULL')
))->select();
$this->assign('page', $page->show());
$this->assign('list', $list);
$this->display();
}
}
\ No newline at end of file
...@@ -19,12 +19,33 @@ class ReportController extends BaseUserController ...@@ -19,12 +19,33 @@ class ReportController extends BaseUserController
$channel = '__all__'; $channel = '__all__';
} }
$url = "http://api2.izhida.cn/tongjiV2/report?app_stat_key=FhDnDjEF8Zjw52Xk&app_stat_secret=NSaCXrY7iRTzXhCw"; $url = "http://api2.izhida.cn/tongjiV2/report?app_stat_key=3Hak8h55DnysDSH5&app_stat_secret=zDWAssidakFaFyjH";
$content = file_get_contents($url); $content = file_get_contents($url);
$data = json_decode($content, true); $data = json_decode($content, true);
$data_list = $data['data']; $data_list = $data['data'];
$event_meta_list = $this->get_event_meta(); $event_meta_list = $this->get_event_meta();
$count_1=M('Prize')->where(array(
'type'=>1,
'is_get'=>0
))->count();
$count_2=M('Prize')->where(array(
'type'=>2,
'is_get'=>0
))->count();
$count_3=M('Prize')->where(array(
'type'=>3,
'is_get'=>0
))->count();
$count_4=M('Prize')->where(array(
'type'=>4,
'is_get'=>0
))->count();
$this->assign('count_1',$count_1);
$this->assign('count_2',$count_2);
$this->assign('count_3',$count_3);
$this->assign('count_4',$count_4);
$this->assign('event_meta_list', $event_meta_list); $this->assign('event_meta_list', $event_meta_list);
$this->assign('data_list', $data_list[$channel]); $this->assign('data_list', $data_list[$channel]);
...@@ -37,8 +58,7 @@ class ReportController extends BaseUserController ...@@ -37,8 +58,7 @@ class ReportController extends BaseUserController
if (!$channel) { if (!$channel) {
$channel = '__all__'; $channel = '__all__';
} }
$url = "http://api2.izhida.cn/tongjiV2/report?app_stat_key=3Hak8h55DnysDSH5&app_stat_secret=zDWAssidakFaFyjH";
$url = "http://api2.izhida.cn/tongjiV2/report?app_stat_key=FhDnDjEF8Zjw52Xk&app_stat_secret=NSaCXrY7iRTzXhCw";
$content = file_get_contents($url); $content = file_get_contents($url);
$data = json_decode($content, true); $data = json_decode($content, true);
$data_list = $data['data'][$channel]; $data_list = $data['data'][$channel];
...@@ -70,18 +90,52 @@ class ReportController extends BaseUserController ...@@ -70,18 +90,52 @@ class ReportController extends BaseUserController
} }
public function export_photo() public function export_photo()
{ {
$list = M('Photo')->order('time DESC')->select(); $list = M('User')->where(array(
"photo"=>array('NEQ','NULL')
))->select();
$default_0 = function ($v) { $default_0 = function ($v) {
if (isset($v)) { if (isset($v)) {
return $v; return $v;
} }
return 0; return 0;
}; };
$columns = array( $columns = array(
array('id', 'id', $default_0), array('id', 'id', $default_0),
array('照片', 'photo_url', $default_0), array('微信名字', 'nickname', $default_0),
array('头像', 'headimgurl', $default_0),
array('图片', 'photo', $default_0),
array('时间', 'time', $default_0), );
$file_name = 'prize_' . date('Y-m-d_H:i:s');
ExcelExporter::export($file_name, $columns, $list, 'prize');
}
public function export_prize()
{
$list = M('Prize')->where(array(
"user_id"=>array('NEQ','0')
))->select();
$default_0 = function ($v) {
if (isset($v)) {
return $v;
}
return 0;
};
$columns = array(
array('id', 'id', $default_0),
array('奖品名字', 'content', $default_0),
array('微信ID', 'user_id', $default_0),
array('名字', 'name', $default_0),
array('手机号码', 'tel', $default_0),
array('地区', 'address', $default_0),
// array('填写信息时间', 'reward_time', function($v){
// return date('Y年m月d日-H:i:s', $v);
// }),
array('中奖时间', 'take_time', function($v){
return date('Y年m月d日-H:i:s', $v);
}),
); );
$file_name = 'prize_' . date('Y-m-d_H:i:s'); $file_name = 'prize_' . date('Y-m-d_H:i:s');
......
...@@ -18,22 +18,39 @@ ...@@ -18,22 +18,39 @@
<thead> <thead>
<tr> <tr>
<th width="8%">ID</th> <th width="8%">ID</th>
<th width="20%">照片</th> <th width="20%">奖品名字</th>
<th width="20%">时间</th> <th width="20%">微信ID</th>
<th width="20%">名字</th>
<th width="20%">手机号码</th>
<th width="20%">地区</th>
<th width="20%">中奖时间</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{:foreach from=$list item="item" name="list"} {:foreach from=$list item="item" name="list"}
<tr> <tr>
<td class="vertical-mid"> <td class="vertical-mid">
{:$item.id} {:$item.id}
</td> </td>
<td class="vertical-mid">
<td class="vertical-mid js-photo-size"> {:$item.content}
<img src="{:$item.photo_url}" style="width: 282px;height: 282px"> </td>
<td class="vertical-mid">
{:$item.user_id}
</td>
<td class="vertical-mid">
{:$item.name}
</td>
<td class="vertical-mid">
{:$item.tel}
</td>
<td class="vertical-mid">
{:$item.address}
</td> </td>
<td class="vertical-mid js-photo-size"> <td class="vertical-mid js-photo-size">
{:$item.time|date_format:'m-d H:i:s'} {:$item.take_time|date_format:'m-d H:i:s'}
</td> </td>
</tr> </tr>
......
{:extends file="groupuser_layout.tpl"}
{:block name=header_css append}
<style>
.photo{
height: 120px;
width: auto;
}
</style>
{:/block}
{:block name="content_title"}
{:/block}
{:block name="content_breadcrumb"}
{:/block}
{:block name="content_body"}
<div class="row" id="keyword-index-page">
<div class="col-sm-12 col-md-12">
<table class="wechat-account-table table table-striped mb30">
<thead>
<tr>
<th width="8%">ID</th>
<th width="20%">微信名字</th>
<th width="20%">头像</th>
<th width="20%">图片</th>
</tr>
</thead>
<tbody>
{:foreach from=$list item="item" name="list"}
<tr>
<td class="vertical-mid">
{:$item.id}
</td>
<td class="vertical-mid">
{:$item.nickname}
</td>
<td class="vertical-mid">
<img src="{:$item.headimgurl}" style="width: 100px;height: 100px">
</td>
<td class="vertical-mid">
<img src="{:$item.photo}" style="width: 100px;height: 100px">
</td>
</tr>
{:foreachelse}
<td colspan="7" class="text-center">暂无</td>
{:/foreach}
</tbody>
</table>
{:if $page}
<div>
<span class="pull-right single-msg-page">{:$page}</span
</div>
{:/if}
</div>
</div>
{:/block}
...@@ -8,9 +8,19 @@ ...@@ -8,9 +8,19 @@
{:block name="content_body"} {:block name="content_body"}
<div> <div>
<a class="btn btn-default" target="_blank" href="{:url controller='user/report/export_pvuv'}">导出统计数据</a> <a class="btn btn-default" target="_blank" href="{:url controller='user/report/export_pvuv'}">导出统计数据</a>
<a class="btn btn-default" target="_blank" href="{:url controller='user/report/export_photo'}">导出照片</a> <a class="btn btn-default" target="_blank" href="{:url controller='user/report/export_prize'}">导出中奖信息</a>
<a class="btn btn-default" target="_blank" href="{:url controller='user/report/export_photo'}">导出用户照片</a>
</div> </div>
<table class="table" class="table table-striped">
<tr>
<td style="width: 100px;">电影票剩余: <span style="color: red">{:$count_1}</span></td>
<td style="width: 100px">牙膏剩余: <span style="color: red">{:$count_2}</span></td>
<td style="width: 100px">手机剩余: <span style="color: red">{:$count_3}</span></td>
<td style="width: 100px">吹风机剩余: <span style="color: red">{:$count_4}</span></td>
</tr>
</table>
<br> <br>
<br> <br>
<table class="table" class="table table-striped"> <table class="table" class="table table-striped">
......
...@@ -300,11 +300,17 @@ ul, li { ...@@ -300,11 +300,17 @@ ul, li {
height: 1238px; height: 1238px;
} }
.page-x-z .b-t { .page-x-z .b-t {
display: flex;
/* justify-content: center; */
flex-wrap: wrap-reverse;
justify-content: space-around;
align-items: center;
position: absolute; position: absolute;
left: 57px; left: 57px;
top: 878px; top: 878px;
width: 526px; width: 510px;
background: white; background: white;
border-radius: 15px;
padding: 13px 10px 2px 10px; padding: 13px 10px 2px 10px;
} }
.page-x-z .b-t img { .page-x-z .b-t img {
...@@ -344,13 +350,14 @@ ul, li { ...@@ -344,13 +350,14 @@ ul, li {
position: absolute; position: absolute;
left: 63px; left: 63px;
top: 886px; top: 886px;
width: 492px; width: 510px;
height: 87px; height: 134px;
border-radius: 15px;
} }
.page-x-z .w-p img { .page-x-z .w-p img {
margin-left: 10px; margin-left: 10px;
width: 96px; width: 114px;
height: 83px; height: 134px;
} }
.page-x-z .b-y { .page-x-z .b-y {
position: absolute; position: absolute;
...@@ -969,23 +976,23 @@ ul, li { ...@@ -969,23 +976,23 @@ ul, li {
opacity: 1; opacity: 1;
} }
} }
.dialog_rule { .dialog_rule, .dialog_game_rule {
z-index: 999; z-index: 999;
background: rgba(0, 0, 0, 0.7); background: rgba(0, 0, 0, 0.7);
width: 640px; width: 640px;
} }
.dialog_rule .bj { .dialog_rule .bj, .dialog_game_rule .bj {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.dialog_rule .bj .map { .dialog_rule .bj .map, .dialog_game_rule .bj .map {
width: 461px; width: 461px;
height: 642px; height: 642px;
} }
.dialog_rule .bj .btn-close { .dialog_rule .bj .btn-close, .dialog_rule .bj .btn-close-two, .dialog_game_rule .bj .btn-close, .dialog_game_rule .bj .btn-close-two {
position: absolute; position: absolute;
top: 320px; top: 320px;
left: 472px; left: 472px;
...@@ -993,6 +1000,15 @@ ul, li { ...@@ -993,6 +1000,15 @@ ul, li {
height: 70px; height: 70px;
} }
.dialog_game_rule .map {
width: 489px !important;
height: 870px !important;
}
.dialog_game_rule .btn-close-two {
top: 211px !important;
left: 472px !important;
}
.zhou { .zhou {
z-index: 98; z-index: 98;
position: absolute; position: absolute;
...@@ -1039,3 +1055,146 @@ ul, li { ...@@ -1039,3 +1055,146 @@ ul, li {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
.page-no-prize {
position: relative;
height: 1238px;
width: 640px;
background: url("../images/no-prize.jpg") top center no-repeat;
}
.page-no-prize .btn {
display: flex;
justify-content: space-between;
position: absolute;
top: 990px;
left: 116px;
width: 422px;
height: 60px;
}
.page-no-prize .btn div {
flex: 1;
height: 60px;
}
.dialog-share {
z-index: 999;
background: rgba(0, 0, 0, 0.7);
width: 640px;
}
.dialog-share img {
position: absolute;
top: 126px;
left: 349px;
width: 252px;
height: 191px;
}
.page-prize {
position: relative;
height: 1238px;
width: 640px;
}
.page-prize .prize-map {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.page-prize .btn-info {
position: absolute;
top: 1022px;
left: 188px;
width: 271px;
height: 77px;
}
.page-info {
background: url("../images/prize-info.jpg") no-repeat center;
width: 640px;
height: 1238px;
}
.page-info .yes-prize {
position: absolute;
left: 80px;
top: 111px;
width: 496px;
height: 865px;
}
.page-info input {
position: absolute;
left: 185px;
width: 341px;
height: 49px;
font-size: 20px;
border: 0;
margin: 0;
padding: 0;
background: none;
}
.page-info .name {
top: 535px;
}
.page-info .address {
top: 649px;
}
.page-info .tel {
top: 765px;
left: 236px;
width: 299px;
}
.page-info .btn-submit {
width: 172px;
height: 90px;
position: absolute;
left: 227px;
top: 950px;
}
.page-loading {
position: relative;
height: 1238px;
}
.page-loading .ball {
width: 135px;
height: 90px;
position: absolute;
top: 443px;
left: 257px;
-webkit-animation: down 3s linear 0s infinite;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
.page-loading .loading {
width: 118px;
height: 24px;
position: absolute;
top: 546px;
left: 282px;
-webkit-animation: zoomIn 1s linear 0s infinite;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
opacity: 0;
}
.page-loading .x-h {
width: 640px;
height: 495px;
position: absolute;
top: 369px;
left: 0px;
-webkit-animation: zoomIn 3s linear 0s infinite;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
opacity: 0;
}
@-webkit-keyframes zoomIn {
0% {
opacity: 0;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
...@@ -183,13 +183,13 @@ ul, li { ...@@ -183,13 +183,13 @@ ul, li {
-webkit-animation: y_c 1s linear 0s infinite; -webkit-animation: y_c 1s linear 0s infinite;
@include animate_forwards; @include animate_forwards;
} }
.btn-next-map{ .btn-next-map {
position: absolute; position: absolute;
top:731px; top: 731px;
left: 415px; left: 415px;
width: 137px; width: 137px;
height: 224px; height: 224px;
} }
} }
.page-through { .page-through {
...@@ -269,11 +269,17 @@ ul, li { ...@@ -269,11 +269,17 @@ ul, li {
height: 1238px; height: 1238px;
.b-t { .b-t {
display: flex;
/* justify-content: center; */
flex-wrap: wrap-reverse;
justify-content: space-around;
align-items: center;
position: absolute; position: absolute;
left: 57px; left: 57px;
top: 878px; top: 878px;
width: 526px; width: 510px;
background: white; background: white;
border-radius: 15px;
padding: 13px 10px 2px 10px; padding: 13px 10px 2px 10px;
img { img {
margin-bottom: 10px; margin-bottom: 10px;
...@@ -291,6 +297,7 @@ ul, li { ...@@ -291,6 +297,7 @@ ul, li {
height: 671px; height: 671px;
} }
.w-p { .w-p {
padding: 10px 0 10px 0; padding: 10px 0 10px 0;
position: absolute; position: absolute;
top: 463px; top: 463px;
...@@ -299,10 +306,10 @@ ul, li { ...@@ -299,10 +306,10 @@ ul, li {
height: 83px; height: 83px;
background: white; background: white;
} }
.btn-x-map{ .btn-x-map {
transition: all .5s ease-in; transition: all .5s ease-in;
} }
.btn-x-map:active{ .btn-x-map:active {
-webkit-transform: scale(0.1); -webkit-transform: scale(0.1);
} }
.w-p { .w-p {
...@@ -314,12 +321,13 @@ ul, li { ...@@ -314,12 +321,13 @@ ul, li {
position: absolute; position: absolute;
left: 63px; left: 63px;
top: 886px; top: 886px;
width: 492px; width: 510px;
height: 87px; height: 134px;
border-radius: 15px;
img { img {
margin-left: 10px; margin-left: 10px;
width: 96px; width: 114px;
height: 83px; height: 134px;
} }
} }
...@@ -657,6 +665,7 @@ ul, li { ...@@ -657,6 +665,7 @@ ul, li {
animation-fill-mode: forwards animation-fill-mode: forwards
} }
} }
@-webkit-keyframes left { @-webkit-keyframes left {
from { from {
opacity: 0; opacity: 0;
...@@ -668,6 +677,7 @@ ul, li { ...@@ -668,6 +677,7 @@ ul, li {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
} }
} }
@-webkit-keyframes right { @-webkit-keyframes right {
from { from {
opacity: 0; opacity: 0;
...@@ -679,6 +689,7 @@ ul, li { ...@@ -679,6 +689,7 @@ ul, li {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
} }
} }
@-webkit-keyframes down { @-webkit-keyframes down {
from { from {
opacity: 0; opacity: 0;
...@@ -690,17 +701,19 @@ ul, li { ...@@ -690,17 +701,19 @@ ul, li {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
} }
} }
@-webkit-keyframes top { @-webkit-keyframes top {
from { from {
opacity: 0; opacity: 0;
-webkit-transform: translate(0px, 100px); -webkit-transform: translate(0px, 100px);
} }
to { to {
opacity: 1; opacity: 1;
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
} }
} }
@-webkit-keyframes height { @-webkit-keyframes height {
from { from {
height: 0px; height: 0px;
...@@ -710,6 +723,7 @@ ul, li { ...@@ -710,6 +723,7 @@ ul, li {
height: 388px; height: 388px;
} }
} }
//background:url("../images/loding.jpg") top center no-repeat; //background:url("../images/loding.jpg") top center no-repeat;
//$img: url("../images/btn_map.png"); //$img: url("../images/btn_map.png");
//@include image_bounds_by_pos("../images/page_end.jpg", 333px, 933px); //@include image_bounds_by_pos("../images/page_end.jpg", 333px, 933px);
...@@ -727,9 +741,10 @@ ul, li { ...@@ -727,9 +741,10 @@ ul, li {
-webkit-transform: translate3d(0, -10px, 0) -webkit-transform: translate3d(0, -10px, 0)
} }
} }
@-webkit-keyframes y_c { @-webkit-keyframes y_c {
0% { 0% {
opacity: 0; opacity: 0;
} }
...@@ -737,6 +752,7 @@ ul, li { ...@@ -737,6 +752,7 @@ ul, li {
opacity: 1; opacity: 1;
} }
} }
@-webkit-keyframes rotateIn { @-webkit-keyframes rotateIn {
0% { 0% {
-webkit-transform-origin: center; -webkit-transform-origin: center;
...@@ -753,22 +769,23 @@ ul, li { ...@@ -753,22 +769,23 @@ ul, li {
opacity: 1 opacity: 1
} }
} }
.dialog_rule {
z-index: 999; .dialog_rule, .dialog_game_rule {
z-index: 999;
background: rgba(0, 0, 0, 0.7); background: rgba(0, 0, 0, 0.7);
width: 640px; width: 640px;
.bj{ .bj {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
.map{ .map {
width: 461px; width: 461px;
height: 642px; height: 642px;
} }
.btn-close{ .btn-close, .btn-close-two {
position: absolute; position: absolute;
top: 320px; top: 320px;
left: 472px; left: 472px;
...@@ -777,26 +794,43 @@ z-index: 999; ...@@ -777,26 +794,43 @@ z-index: 999;
} }
} }
} }
.zhou{
.dialog_game_rule {
.map {
width: 489px !important;
height: 870px !important;
}
.btn-close-two {
top: 211px !important;
left: 472px !important;
}
}
.zhou {
z-index: 98; z-index: 98;
@include image_bounds_by_pos("../images/y.png", 605px, 20px); @include image_bounds_by_pos("../images/y.png", 605px, 20px);
} }
.c-d{
.c-d {
z-index: 97; z-index: 97;
@include image_bounds_by_pos("../images/x.png", 564px, 23px); @include image_bounds_by_pos("../images/x.png", 564px, 23px);
} }
.m-b-zhou-sate{
left: 585px!important; .m-b-zhou-sate {
top: 91px!important; left: 585px !important;
top: 91px !important;
} }
.m-b-sate{
left: 542px!important; .m-b-sate {
top: 94px!important; left: 542px !important;
top: 94px !important;
} }
.rotate-sate{
.rotate-sate {
-webkit-animation: rotate 2s infinite linear; -webkit-animation: rotate 2s infinite linear;
//-webkit-transform-origin: 46% 51%; //-webkit-transform-origin: 46% 51%;
} }
@-webkit-keyframes rotate { @-webkit-keyframes rotate {
0%, 100% { 0%, 100% {
-webkit-transform: rotate(0deg); -webkit-transform: rotate(0deg);
...@@ -808,4 +842,153 @@ z-index: 999; ...@@ -808,4 +842,153 @@ z-index: 999;
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
\ No newline at end of file
.page-no-prize {
position: relative;
height: 1238px;
width: 640px;
background: url("../images/no-prize.jpg") top center no-repeat;
.btn {
display: flex;
justify-content: space-between;
position: absolute;
top: 990px;
left: 116px;
width: 422px;
height: 60px;
div {
flex: 1;
height: 60px;
}
}
}
.dialog-share {
z-index: 999;
background: rgba(0, 0, 0, 0.7);
width: 640px;
img {
position: absolute;
top: 126px;
left: 349px;
width: 252px;
height: 191px;
}
}
.page-prize {
position: relative;
height: 1238px;
width: 640px;
.prize-map {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.btn-info {
position: absolute;
top: 1022px;
left: 188px;
width: 271px;
height: 77px;
}
}
.page-info {
background: url("../images/prize-info.jpg") no-repeat center;
width: 640px;
height: 1238px;
.yes-prize {
position: absolute;
left: 80px;
top: 111px;
width: 496px;
height: 865px;
}
input {
position: absolute;
left: 185px;
width: 341px;
height: 49px;
font-size: 20px;
border: 0;
margin: 0;
padding: 0;
background: none;
}
.name {
top: 535px;
}
.address {
top: 649px;
}
.tel {
top: 765px;
left: 236px;
width: 299px;
}
.btn-submit {
width: 172px;
height: 90px;
position: absolute;
left: 227px;
top: 950px;
}
}
.page-loading {
position: relative;
height: 1238px;
.ball {
width: 135px;
height: torem(90px);
position: absolute;
top: 443px;
left: 257px;
-webkit-animation: down 3s linear 0s infinite;
@include animate_forwards;
}
.loading {
width: 118px;
height: 24px;
position: absolute;
top: 546px;
left: 282px;
-webkit-animation: zoomIn 1s linear 0s infinite;
@include animate_forwards;
opacity: 0;
}
.x-h {
width: 640px;
height: 495px;
position: absolute;
top: 369px;
left: 0px;
-webkit-animation: zoomIn 3s linear 0s infinite;
@include animate_forwards;
opacity: 0;
}
}
@-webkit-keyframes zoomIn {
0% {
opacity: 0;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -13,20 +13,37 @@ $(document).ready(function () { ...@@ -13,20 +13,37 @@ $(document).ready(function () {
this.css('z-index', window['max_zindex']); this.css('z-index', window['max_zindex']);
this.show(); this.show();
}; };
$('.btn-next-map').on('click',function () { $('.btn-close-two').on('click',function () {
$('.page_home').hide(); $('.page_home').hide();
$('.dialog_game_rule').hide();
$('.page-through').show(); $('.page-through').show();
setTimeout(function () { setTimeout(function () {
$('.page-through').hide(); $('.page-through').hide();
$('.page-lang').show(); $('.page-lang').show();
},5000) },5000)
}); });
$('.btn-next-map').on('click',function () {
$('.dialog_game_rule').show();
});
$('.btn-share').on('click',function () {
$('.dialog-share').show();
});
$('.btn-j-x').on('click',function () {
$('.page-no-prize').hide();
$('.page-s-c').show();
});
$('.dialog-share').on('click',function () {
$('.dialog').hide();
});
$('.btn-info').on('click',function () {
});
$('.c-d').on('click',function () { $('.c-d').on('click',function () {
if($(this).hasClass('rotate-sate')){ if($(this).hasClass('rotate-sate')){
$(this).removeClass('rotate-sate') $('.c-d').removeClass('rotate-sate')
}else { }else {
$(this).addClass('rotate-sate') $('.c-d').addClass('rotate-sate')
} }
}); });
$(window).scroll(function(event){ $(window).scroll(function(event){
...@@ -172,7 +189,7 @@ $(document).ready(function () { ...@@ -172,7 +189,7 @@ $(document).ready(function () {
$('.btn-x-map').on('click', function () { $('.btn-x-map').on('click', function () {
var id = $(this).attr('data-id'); var id = $(this).attr('data-id');
var imageObj1 = new Image(); var imageObj1 = new Image();
imageObj1.src = 'Public/static/images/map-' + id + '.png'; imageObj1.src = 'Public/static/images/' + id + '.png';
imageObj1.onload = function() { imageObj1.onload = function() {
var darthVaderGroup = new Konva.Group({ var darthVaderGroup = new Konva.Group({
x: 100, x: 100,
...@@ -260,7 +277,7 @@ function mergeImage_two(url) { ...@@ -260,7 +277,7 @@ function mergeImage_two(url) {
cover_three.src = url_three; cover_three.src = url_three;
cover_four.onload = function () { cover_four.onload = function () {
console.log(1) console.log(1)
// cover_four.onload = function () { cover_three.onload = function () {
console.log(22221) console.log(22221)
var tmp = $('<canvas></canvas>')[0]; var tmp = $('<canvas></canvas>')[0];
tmp.width = 640; tmp.width = 640;
...@@ -277,7 +294,7 @@ function mergeImage_two(url) { ...@@ -277,7 +294,7 @@ function mergeImage_two(url) {
$('.page_checking').hide() $('.page_checking').hide()
}, 1000); }, 1000);
}; };
// } }
} }
window.wx && wx.ready(function () { window.wx && wx.ready(function () {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -125,15 +125,27 @@ ...@@ -125,15 +125,27 @@
<div class="b-j" id="b-j"> <div class="b-j" id="b-j">
</div> </div>
<div class="w-p x-z x-z-sate"> <div class="w-p x-z x-z-sate">
<img class="btn-x-map" data-id="1" src="Public/static/images/map-1.png"> <img class="btn-x-map" data-id="1" src="Public/static/images/mix/1.png">
<img class="btn-x-map" data-id="2" src="Public/static/images/map-2.png"> <img class="btn-x-map" data-id="2" src="Public/static/images/mix/2.png">
<img class="btn-x-map" data-id="3" src="Public/static/images/mix/3.png">
<img class="btn-x-map" data-id="4" src="Public/static/images/mix/4.png">
<img class="btn-x-map" data-id="5" src="Public/static/images/mix/5.png">
<img class="btn-x-map" data-id="6" src="Public/static/images/mix/6.png">
<img class="btn-x-map" data-id="7" src="Public/static/images/mix/7.png">
<img class="btn-x-map" data-id="8" src="Public/static/images/mix/8.png">
<img class="btn-x-map" data-id="9" src="Public/static/images/mix/9.png">
<img class="btn-x-map" data-id="10" src="Public/static/images/mix/10.png">
<img class="btn-x-map" data-id="11" src="Public/static/images/mix/11.png">
<img class="btn-x-map" data-id="12" src="Public/static/images/mix/12.png">
<img class="btn-x-map" data-id="13" src="Public/static/images/mix/13.png">
<img class="btn-x-map" data-id="14" src="Public/static/images/mix/14.png">
<img class="btn-x-map" data-id="15" src="Public/static/images/mix/15.png">
</div> </div>
<div class="b-t x-z btn-map" style="display: none"> <div class="b-t x-z btn-map" style="display: none">
<img class="btn-x-map" data-id="word1" src="Public/static/images/map-word1.png"> <img class="btn-x-map" data-id="17" src="Public/static/images/17.png">
<img class="btn-x-map" data-id="word2" src="Public/static/images/map-word2.png"> <img class="btn-x-map" data-id="18" src="Public/static/images/18.png">
<img class="btn-x-map" data-id="word3" src="Public/static/images/map-word3.png"> <img class="btn-x-map" data-id="19" src="Public/static/images/19.png">
<img class="btn-x-map" data-id="word3" src="Public/static/images/map-word4.png"> <img class="btn-x-map" data-id="20" src="Public/static/images/20.png">
</div> </div>
<div class="b-y x-z x-z-sate"> <div class="b-y x-z x-z-sate">
...@@ -163,6 +175,34 @@ ...@@ -163,6 +175,34 @@
<div class="btn-close"></div> <div class="btn-close"></div>
</div> </div>
</div> </div>
<div class="dialog dialog_game_rule" style="display: none">
<div class="bj">
<img class="map" src="Public/static/images/game-rule.png">
<div class="btn-close-two"></div>
</div>
</div>
<div class="dialog dialog-share" style="display: none">
<img src="Public/static/images/share.png">
</div>
<div class="page-no-prize" style="display: none">
<div class="btn">
<div class="btn-share"></div>
<div class="btn-j-x"></div>
</div>
</div>
<div class="page-prize" style="display: none">
<img class="prize-map" src="Public/static/images/prize-1.jpg">
<div class="btn-info"></div>
</div>
<div class="page-info" style="display: none">
<input class="name" type="text" value="" maxlength="6">
<input class="address" type="text" value="" maxlength="200">
<input class="tel" type="text" value="" maxlength="11">
<div class="btn-submit" style="display: block"></div>
</div>
</div> </div>
<div class="page_checking" style="display: none"> <div class="page_checking" style="display: none">
...@@ -184,7 +224,7 @@ ...@@ -184,7 +224,7 @@
} }
} }
</script> </script>
<script type="text/javascript" src="https://unpkg.com/konva@4.0.5/konva.min.js"></script> <script type="text/javascript" src="Public/static/js/konva.min.js"></script>
<script type="text/javascript" src="Public/static/js/swiper.min.js"></script> <script type="text/javascript" src="Public/static/js/swiper.min.js"></script>
<!--<script type="text/javascript"--> <!--<script type="text/javascript"-->
<!--src="http://api2.izhida.cn/wechat_js_config?app_id=wx4c3c856ab83a946b&v=1.2.1&api_list=all&app_stat_key=2tzKMdJxaQREJDP7"></script>--> <!--src="http://api2.izhida.cn/wechat_js_config?app_id=wx4c3c856ab83a946b&v=1.2.1&api_list=all&app_stat_key=2tzKMdJxaQREJDP7"></script>-->
......
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 sign in to comment