Commit 267f67f3 by zhangheng

y

parent cf6251b4
......@@ -21,21 +21,21 @@ return array(
'MODULE_ALLOW_LIST' => array('Home', 'Cli', 'Api', 'User'),
'SHOW_PAGE_TRACE' => false,
'ERROR_PAGE' =>'/50x.html',
'SITE_URL' => 'http://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'moli.gnhj.izhida.cn'),
'SITE_URL' => 'http://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'dencare-year.dev.izhida.cn'),
'PUBLISH_MODE' => 'production', // development,test,production
// 'UPLOAD_SITEIMG_QINIU' => array(
// 'maxSize' => 5 * 1024 * 1024,//文件大小
// 'rootPath' => './',
// 'saveName' => array('uniqid', ''),
// 'driver' => 'Qiniu',
// 'driverConfig' => array(
// 'accessKey' => 'ggMPohY9_87Q69nDYUMwvR7XqlLYAREH-btbJG3U',
// 'secrectKey' => 'OPzIqCWVMDs7tAYjPi9Hn7JkxBj2CtHARCCEnrdd',
// 'domain' => '7xou29.media1.z0.glb.clouddn.com',
// 'bucket' => 'zhida-stream',
//// 'domain' => '7xjtzd.com2.z0.glb.qiniucdn.com',
//// 'bucket' => 'zhida-yingxiaoyi',
// ),
// ),
'UPLOAD_SITEIMG_QINIU' => array(
'maxSize' => 5 * 1024 * 1024,//文件大小
'rootPath' => './',
'saveName' => array('uniqid', ''),
'driver' => 'Qiniu',
'driverConfig' => array(
'accessKey' => 'ggMPohY9_87Q69nDYUMwvR7XqlLYAREH-btbJG3U',
'secrectKey' => 'OPzIqCWVMDs7tAYjPi9Hn7JkxBj2CtHARCCEnrdd',
'domain' => 'media.izhida.cn',
'bucket' => 'media',
// 'domain' => '7xjtzd.com2.z0.glb.qiniucdn.com',
// 'bucket' => 'zhida-yingxiaoyi',
),
),
);
\ No newline at end of file
<?php
//return array(
// 'DB_TYPE' => 'mysql',
// 'DB_HOST' => 'localhost',
// 'DB_PORT' => '3306',
// 'DB_NAME' => 'dev_dencare_20170119_photo', // <--- 修改这里
// 'DB_USER' => 'dev', // <--- 修改这里
// 'DB_PWD' => '1q2w3e', // <--- 修改这里
// 'DB_PREFIX' => '',
// 'DB_CHARSET' => 'utf8mb4',
//);
return array(
'DB_TYPE' => 'mysql',
'DB_HOST' => 'localhost',
'DB_PORT' => '3306',
'DB_NAME' => 'dev_dencare_20181221_year', // <--- 修改这里
'DB_USER' => 'dev', // <--- 修改这里
'DB_PWD' => '1q2w3e', // <--- 修改这里
'DB_PREFIX' => '',
'DB_CHARSET' => 'utf8mb4',
);
//return array(
// 'DB_TYPE' => 'mysql',
......
......@@ -81,15 +81,11 @@ trait ControllerTrait
'openid' => $openid
);
} else {
// $user = $data['user'];
unset($data['privilege']);
// unset($data['privilege']);
$user = array();
$user['openid'] = $data['user']['openid'];
$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['info'] = json_encode($data);
}
......@@ -98,11 +94,11 @@ trait ControllerTrait
if ($old_user) {
M('User')->token(false)->where(array('openid' => $openid))->save($user);
} 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);
}
$_SESSION['is_wechat'] = 1;
......
......@@ -11,6 +11,7 @@ use Think\Log;
class IndexController extends Controller
{
private $auth_type = OAuthHelperV3::SCOPE_BASE;
// private $auth_type = OAuthHelperV3::SCOPE_USERINFO;
private $cookie_uid_key = 'mtime-laopao-v1';
private $debug = 1;
private $today;
......@@ -41,12 +42,275 @@ class IndexController extends Controller
public function index()
{
$user = $this->get_user_info_from_cookie();
// 如果没有获取到用户信息,引导用户授权
if (!$user) {
$this->request_auth($this->get_url());
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();
}
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
$item_list = [
['id' => 1, 'parent_id' => 0, 'title' => '数据统计', 'url' => 'User/Report/index', 'seq' => 1,
'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],
];
$tree = $this->buildTreeChildren($item_list, 0);
......
......@@ -7,11 +7,11 @@ class CheckController extends BaseUserController
{
public function index()
{
$count = M('Photo')->count();
$count = M('Prize')->count();
$page = new Page($count, 25);
$list = M('Photo')->order('time DESC')
->limit($page->firstRow . ',' . $page->listRows)
->select();
$list = M('Prize')->where(array(
"user_id"=>array('NEQ','0')
))->select();
$this->assign('page', $page->show());
$this->assign('list', $list);
$this->display();
......
......@@ -40,7 +40,7 @@ class HomeController extends Controller
// $this->display();
// return;
// }
if ($name != 'photo' || $password != 'photo') {
if ($name != 'admin' || $password != '123456') {
$error = '�û�����������';
$this->assign('error', $error);
$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
$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);
$data = json_decode($content, true);
$data_list = $data['data'];
$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('data_list', $data_list[$channel]);
......@@ -37,8 +58,7 @@ class ReportController extends BaseUserController
if (!$channel) {
$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);
$data = json_decode($content, true);
$data_list = $data['data'][$channel];
......@@ -70,18 +90,52 @@ class ReportController extends BaseUserController
}
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) {
if (isset($v)) {
return $v;
}
return 0;
};
$columns = array(
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');
......
......@@ -18,22 +18,39 @@
<thead>
<tr>
<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>
</thead>
<tbody>
{:foreach from=$list item="item" name="list"}
<tr>
<td class="vertical-mid">
{:$item.id}
</td>
<td class="vertical-mid js-photo-size">
<img src="{:$item.photo_url}" style="width: 282px;height: 282px">
<td class="vertical-mid">
{:$item.content}
</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 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>
</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 @@
{:block name="content_body"}
<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_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>
<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>
<table class="table" class="table table-striped">
......
......@@ -300,11 +300,17 @@ ul, li {
height: 1238px;
}
.page-x-z .b-t {
display: flex;
/* justify-content: center; */
flex-wrap: wrap-reverse;
justify-content: space-around;
align-items: center;
position: absolute;
left: 57px;
top: 878px;
width: 526px;
width: 510px;
background: white;
border-radius: 15px;
padding: 13px 10px 2px 10px;
}
.page-x-z .b-t img {
......@@ -344,13 +350,14 @@ ul, li {
position: absolute;
left: 63px;
top: 886px;
width: 492px;
height: 87px;
width: 510px;
height: 134px;
border-radius: 15px;
}
.page-x-z .w-p img {
margin-left: 10px;
width: 96px;
height: 83px;
width: 114px;
height: 134px;
}
.page-x-z .b-y {
position: absolute;
......@@ -969,23 +976,23 @@ ul, li {
opacity: 1;
}
}
.dialog_rule {
.dialog_rule, .dialog_game_rule {
z-index: 999;
background: rgba(0, 0, 0, 0.7);
width: 640px;
}
.dialog_rule .bj {
.dialog_rule .bj, .dialog_game_rule .bj {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.dialog_rule .bj .map {
.dialog_rule .bj .map, .dialog_game_rule .bj .map {
width: 461px;
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;
top: 320px;
left: 472px;
......@@ -993,6 +1000,15 @@ ul, li {
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 {
z-index: 98;
position: absolute;
......@@ -1039,3 +1055,146 @@ ul, li {
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 {
-webkit-animation: y_c 1s linear 0s infinite;
@include animate_forwards;
}
.btn-next-map{
position: absolute;
top:731px;
left: 415px;
width: 137px;
height: 224px;
}
.btn-next-map {
position: absolute;
top: 731px;
left: 415px;
width: 137px;
height: 224px;
}
}
.page-through {
......@@ -269,11 +269,17 @@ ul, li {
height: 1238px;
.b-t {
display: flex;
/* justify-content: center; */
flex-wrap: wrap-reverse;
justify-content: space-around;
align-items: center;
position: absolute;
left: 57px;
top: 878px;
width: 526px;
width: 510px;
background: white;
border-radius: 15px;
padding: 13px 10px 2px 10px;
img {
margin-bottom: 10px;
......@@ -291,6 +297,7 @@ ul, li {
height: 671px;
}
.w-p {
padding: 10px 0 10px 0;
position: absolute;
top: 463px;
......@@ -299,10 +306,10 @@ ul, li {
height: 83px;
background: white;
}
.btn-x-map{
.btn-x-map {
transition: all .5s ease-in;
}
.btn-x-map:active{
.btn-x-map:active {
-webkit-transform: scale(0.1);
}
.w-p {
......@@ -314,12 +321,13 @@ ul, li {
position: absolute;
left: 63px;
top: 886px;
width: 492px;
height: 87px;
width: 510px;
height: 134px;
border-radius: 15px;
img {
margin-left: 10px;
width: 96px;
height: 83px;
width: 114px;
height: 134px;
}
}
......@@ -657,6 +665,7 @@ ul, li {
animation-fill-mode: forwards
}
}
@-webkit-keyframes left {
from {
opacity: 0;
......@@ -668,6 +677,7 @@ ul, li {
-webkit-transform: translate(0, 0);
}
}
@-webkit-keyframes right {
from {
opacity: 0;
......@@ -679,6 +689,7 @@ ul, li {
-webkit-transform: translate(0, 0);
}
}
@-webkit-keyframes down {
from {
opacity: 0;
......@@ -690,17 +701,19 @@ ul, li {
-webkit-transform: translate(0, 0);
}
}
@-webkit-keyframes top {
from {
opacity: 0;
-webkit-transform: translate(0px, 100px);
}
to {
opacity: 1;
-webkit-transform: translate(0, 0);
}
}
from {
opacity: 0;
-webkit-transform: translate(0px, 100px);
}
to {
opacity: 1;
-webkit-transform: translate(0, 0);
}
}
@-webkit-keyframes height {
from {
height: 0px;
......@@ -710,6 +723,7 @@ ul, li {
height: 388px;
}
}
//background:url("../images/loding.jpg") top center no-repeat;
//$img: url("../images/btn_map.png");
//@include image_bounds_by_pos("../images/page_end.jpg", 333px, 933px);
......@@ -727,9 +741,10 @@ ul, li {
-webkit-transform: translate3d(0, -10px, 0)
}
}
@-webkit-keyframes y_c {
0% {
opacity: 0;
opacity: 0;
}
......@@ -737,6 +752,7 @@ ul, li {
opacity: 1;
}
}
@-webkit-keyframes rotateIn {
0% {
-webkit-transform-origin: center;
......@@ -753,22 +769,23 @@ ul, li {
opacity: 1
}
}
.dialog_rule {
z-index: 999;
.dialog_rule, .dialog_game_rule {
z-index: 999;
background: rgba(0, 0, 0, 0.7);
width: 640px;
.bj{
.bj {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
.map{
.map {
width: 461px;
height: 642px;
}
.btn-close{
.btn-close, .btn-close-two {
position: absolute;
top: 320px;
left: 472px;
......@@ -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;
@include image_bounds_by_pos("../images/y.png", 605px, 20px);
}
.c-d{
.c-d {
z-index: 97;
@include image_bounds_by_pos("../images/x.png", 564px, 23px);
}
.m-b-zhou-sate{
left: 585px!important;
top: 91px!important;
.m-b-zhou-sate {
left: 585px !important;
top: 91px !important;
}
.m-b-sate{
left: 542px!important;
top: 94px!important;
.m-b-sate {
left: 542px !important;
top: 94px !important;
}
.rotate-sate{
.rotate-sate {
-webkit-animation: rotate 2s infinite linear;
//-webkit-transform-origin: 46% 51%;
}
@-webkit-keyframes rotate {
0%, 100% {
-webkit-transform: rotate(0deg);
......@@ -808,4 +842,153 @@ z-index: 999;
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 () {
this.css('z-index', window['max_zindex']);
this.show();
};
$('.btn-next-map').on('click',function () {
$('.btn-close-two').on('click',function () {
$('.page_home').hide();
$('.dialog_game_rule').hide();
$('.page-through').show();
setTimeout(function () {
$('.page-through').hide();
$('.page-lang').show();
},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 () {
if($(this).hasClass('rotate-sate')){
$(this).removeClass('rotate-sate')
$('.c-d').removeClass('rotate-sate')
}else {
$(this).addClass('rotate-sate')
$('.c-d').addClass('rotate-sate')
}
});
$(window).scroll(function(event){
......@@ -172,7 +189,7 @@ $(document).ready(function () {
$('.btn-x-map').on('click', function () {
var id = $(this).attr('data-id');
var imageObj1 = new Image();
imageObj1.src = 'Public/static/images/map-' + id + '.png';
imageObj1.src = 'Public/static/images/' + id + '.png';
imageObj1.onload = function() {
var darthVaderGroup = new Konva.Group({
x: 100,
......@@ -260,7 +277,7 @@ function mergeImage_two(url) {
cover_three.src = url_three;
cover_four.onload = function () {
console.log(1)
// cover_four.onload = function () {
cover_three.onload = function () {
console.log(22221)
var tmp = $('<canvas></canvas>')[0];
tmp.width = 640;
......@@ -277,7 +294,7 @@ function mergeImage_two(url) {
$('.page_checking').hide()
}, 1000);
};
// }
}
}
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 @@
<div class="b-j" id="b-j">
</div>
<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="2" src="Public/static/images/map-2.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/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 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="word2" src="Public/static/images/map-word2.png">
<img class="btn-x-map" data-id="word3" src="Public/static/images/map-word3.png">
<img class="btn-x-map" data-id="word3" src="Public/static/images/map-word4.png">
<img class="btn-x-map" data-id="17" src="Public/static/images/17.png">
<img class="btn-x-map" data-id="18" src="Public/static/images/18.png">
<img class="btn-x-map" data-id="19" src="Public/static/images/19.png">
<img class="btn-x-map" data-id="20" src="Public/static/images/20.png">
</div>
<div class="b-y x-z x-z-sate">
......@@ -163,6 +175,34 @@
<div class="btn-close"></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 class="page_checking" style="display: none">
......@@ -184,7 +224,7 @@
}
}
</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="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