<?php
/**
* awga_hejiu模块小程序接口定义
*
* @author qq1122
* @url
*/
defined('IN_IA') or exit('Access Denied');
class awga_hejiuModuleWxapp extends WeModuleWxapp {
public function doPageTest(){
global $_GPC, $_W;
$errno = 0;
$message = '返回消息';
$data = array();
return $this->result($errno, $message, $data);
}
public function doPage_clock_reminded(){
global $_GPC, $_W;
}
public function doPage_auth_login_by_weixin(){
global $_GPC, $_W;
header('Content-Type:text/json;charset=utf-8');
$_po_data = json_decode($GLOBALS['HTTP_RAW_POST_DATA'],true);//gettype($_po_data)var_dump($w7_url_session);exit();
if (empty($_po_data)) {
$_po_data = $_GPC['__input'];
}
$_po_token = $_SERVER["HTTP_X_LITEMALL_TOKEN"];
//{"errno":0,"data":{"userInfo":{"nickName":"醒来","avatarUrl":".png","country":"China","province":"Guangdong","city":"Shenzhen","language":"zh_CN","gender":1},"uid":5152,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0aGlzIGlzIGxpdGVtYWxsIHRva2VuIiwiYXVkIjoiTUlOSUFQUCIsImlzcyI6IkxJVEVNQUxMIiwiZXhwIjoxNTcwODE3MDQxLCJ1c2VySWQiOjUxNTIsImlhdCI6MTU3MDIwNTA0MX0.fPAqjgbms54J4UkIh1_RFlUNPR6zRUbkLX644koZg1U"},"errmsg":"成功"};
$w7_url_session = $_W['siteroot']."app/index.php?i=".$_GPC['i']."&t=0&v=v".$_W['current_module']['version']."&from=wxapp&c=auth&a=session&do=openid&m=".$_W['current_module']['name']."&code=".$_po_data['code'];
//$w7_user = json_decode($this->send_post($w7_url_session,[]),true);
//echo json_encode(array("errno"=>$w7_url_session,"errmsg"=>$_po_data));exit();
$url_data_ = ihttp_get($w7_url_session);
if ($url_data_['code']==200) {
$w7_user = json_decode($url_data_['content'], true);
if ($w7_user['errno']!=0) {
echo json_encode(array("errno"=>501,"errmsg"=>$w7_user['message']));exit();
}
}else{
echo json_encode(array("errno"=>501,"errmsg"=>$url_data['status']));exit();
}
if ($w7_user['errno']==0) {
if (!$w7_user['data']['userinfo']['uid']) {
echo json_encode($w7_user);exit();
}
$app_w7_user = pdo_get('awga_hejiu_user', array('uid' => $w7_user['data']['userinfo']['uid'],'i' => $_W['uniaccount']['uniacid']));
if(empty($app_w7_user)){
//echo json_encode($w7_user['data']['userinfo']['uid']);exit();
$user_data_ = array(
'i' => $_W['uniaccount']['uniacid'],
'uid' => $w7_user['data']['userinfo']['uid'],
'nickName' => $_po_data['userInfo']['nickName'],
'avatarUrl' => $_po_data['userInfo']['avatarUrl'],
'country' => $_po_data['userInfo']['country'],
'province' => $_po_data['userInfo']['province'],
'city' => $_po_data['userInfo']['city'],
'language' => $_po_data['userInfo']['language'],
'gender' => $_po_data['userInfo']['gender'],
'openid' => $w7_user['data']['userinfo']['openid'],
'token' => $w7_user['data']['sessionid'],
'time' => $_SERVER['REQUEST_TIME']
);
$result = pdo_insert('awga_hejiu_user', $user_data_);
if (!empty($result)) {
$config_data = pdo_get('awga_hejiu_config', array('i' => $_W['uniaccount']['uniacid']));
if ($config_data['credit']) {
mc_credit_update($w7_user['data']['userinfo']['uid'],$config_data['credit_type'],$config_data['credit'],array(1=>$config_data['name']."新用户赠送",2=>$_W['current_module']['name']));//$_W['current_module']['title']
}
$app_w7_user = pdo_get('awga_hejiu_user', array('uid' => $w7_user['data']['userinfo']['uid'],'i' => $_W['uniaccount']['uniacid']));
}else{echo json_encode(array("errno"=>502,"errmsg"=>"创建用户表失败".":0002"));exit();}
}//已获取到用户信息
//登录出错:https://s.w7.cc/index.php?c=wiki&do=view&id=1&list=1986
}else{echo json_encode($w7_user);exit();}
if ($w7_user['data']['sessionid'] != $app_w7_user['token']) {
pdo_update('awga_hejiu_user',array('token' =>$w7_user['data']['sessionid']),array('uid' =>$w7_user['data']['userinfo']['uid'],'i' => $_W['uniaccount']['uniacid']));
}
$login_data = array(
"errno"=>0,
"data"=>array("userInfo"=>$app_w7_user,"uid"=>$app_w7_user['uid'],"token"=>$w7_user['data']['sessionid']),
"errmsg"=>"成功ok"
);
echo json_encode($login_data);
}
public function doPage_guess_song_index(){
global $_GPC, $_W;
header('Content-Type:text/json;charset=utf-8');
$_po_data = json_decode($GLOBALS['HTTP_RAW_POST_DATA'],true);
if (empty($_po_data)) {
$_po_data = $_GPC['__input'];
}
$_po_token = $_SERVER["HTTP_X_LITEMALL_TOKEN"];
//e={"errno":0,"data":{"score":20,"level":0,"supply":{"id":307,"uid":5132,"signIn":0,"video":0,"share":0,"lastTime":"2019-10-04"}},"errmsg":"成功"};
//e={"errno":501,"errmsg":"请登录"}
if ($_W['member']['uid']) {
$app_w7_user = pdo_get('awga_hejiu_user', array('uid' => $_W['member']['uid'],'i' => $_W['uniaccount']['uniacid']));
if (empty($app_w7_user)) {echo json_encode(array("errno"=>502,"errmsg"=>"用户不错在或已被删除".":0004"));exit();}
//签到
if ($app_w7_user['lastTime'] != date('Y-m-d',time())) {
pdo_update('awga_hejiu_user',array('signIn' =>0,'video'=>0),array('uid' =>$_W['member']['uid'],'i' => $_W['uniaccount']['uniacid']));
$app_w7_user['signIn'] = 0;
}
$config_data = pdo_get('awga_hejiu_config', array('i' => $_W['uniaccount']['uniacid']));
$app_user = array(
"score"=>(int)$_W['member'][$config_data['credit_type']],
"level"=>(int)$app_w7_user['level'],
"supply"=>array("id"=>(int)$app_w7_user['id'],"uid"=>(int)$_W['member']['uid'],"signIn"=>(int)$app_w7_user['signIn'],"video"=>(int)$app_w7_user['video'],"share"=>(int)$app_w7_user['share'],"lastTime"=>$app_w7_user['lastTime'])
);
$user_data = array(
"errno"=>0,
"data"=>$app_user,
"errmsg"=>"成功ok"
);
echo json_encode($user_data);
}else{echo json_encode(array("errno"=>501,"errmsg"=>"未登录".":0003"));}
}
public function doPage_auth_info(){
global $_GPC, $_W;
header('Content-Type:text/json;charset=utf-8');
$_po_data = json_decode($GLOBALS['HTTP_RAW_POST_DATA'],true);
if (empty($_po_data)) {
$_po_data = $_GPC['__input'];
}
$_po_token = $_SERVER["HTTP_X_LITEMALL_TOKEN"];
if ($_W['member']['uid']) {
$app_w7_user = pdo_get('awga_hejiu_user', array('uid' => $_W['member']['uid'],'i' => $_W['uniaccount']['uniacid']));
if (empty($app_w7_user)) {echo json_encode(array("errno"=>502,"errmsg"=>"用户不错在或已被删除".":0005"));exit();}
$app_user = array(
"gender"=>$app_w7_user['gender'],
"nickName"=>$app_w7_user['nickName'],
"mobile"=>"",
"avatar"=>$app_w7_user['avatarUrl']
);
$user_data = array(
"errno"=>0,
"data"=>$app_user,
"errmsg"=>"成功ok"
);
echo json_encode($user_data);
}else{echo json_encode(array("errno"=>501,"errmsg"=>"未登录".":0006"));}
}
public function doPage_guess_song_next(){
global $_GPC, $_W;
header('Content-Type:text/json;charset=utf-8');
//{"errno":0,"data":{"song":{"id":10000,"name":"芒种","singer":"音阙诗听 / 赵方婧","song":"https://linktao-music.oss-cn-beijing.aliyuncs.com/m/bujwIRoAXkOn7O5TFN3fTEY2vU
没有合适的资源?快使用搜索试试~ 我知道了~
酷炫猜歌喝酒 喝酒猜歌小游戏小程序 前端
共729个文件
png:348个
js:110个
wxss:83个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 66 浏览量
2024-03-14
10:27:33
上传
评论
收藏 8.54MB ZIP 举报
温馨提示
小游戏缺少了背景音乐没有。 其他都正常!带流量主! 有能力自己修复! 1,修复喝酒首页登录失败的问题。 2,修复排行榜遮住广告的问题。 3,增加猜歌视频广告的观看次数,并在没有视频时给出合理提示。 猜歌及结合赌酒小游戏的小程序 首先该应用支持多开,不存在单开版和多开版之分 1,可只开启猜歌,喝酒小游戏可在后台全部关闭 2,程序自带5417条猜歌数据,10000多段歌曲(包括猜歌前奏及答对后高潮的音乐) 所有MP3资源加在一起有 2G多,当然歌曲都已经存放在阿里云可直接使用 当然我们也提供所以 MP3 音乐,你可以上传到自己的服务器调用 (如果说数据就是金钱,如果说每条猜歌数据值1块钱,那么这5000多条猜歌数据就值5000多元,如果每条猜歌数据只值 0.5元,那么这些数据也值两千多元)
资源推荐
资源详情
资源评论
收起资源包目录
酷炫猜歌喝酒 喝酒猜歌小游戏小程序 前端 (729个子文件)
developer.cer 50B
developer.cer 50B
img_data.html 12KB
img_data.html 12KB
img_data2.html 12KB
img_data2.html 12KB
music_data.html 11KB
music_data.html 11KB
config_data.html 8KB
config_data.html 8KB
user_data.html 5KB
user_data.html 5KB
icon.jpg 95KB
mmexport1640241691272.jpg 88KB
bg2.jpg 35KB
bg2.jpg 35KB
icon.jpg 27KB
sharebg2.jpg 23KB
preview.jpg 5KB
preview.jpg 5KB
862F58B5BBD2F7CFE04930B258D5D510.js 21KB
0ADB0524BBD2F7CF6CBD6D23E7E5D510.js 18KB
index.js 13KB
index.js 11KB
BB620B66BBD2F7CFDD046361DA26D510.js 11KB
index.js 10KB
index.js 9KB
2C57DE97BBD2F7CF4A31B690F2E6D510.js 7KB
D1172143BBD2F7CFB7714944DB76D510.js 7KB
index.js 7KB
index.js 7KB
index.js 6KB
index.js 6KB
index.js 6KB
index.js 6KB
index.js 5KB
app.js 5KB
C233F8F7BBD2F7CFA45590F0EA46D510.js 5KB
036CD273BBD2F7CF650ABA7432F5D510.js 4KB
index.js 4KB
index.js 4KB
89EA39A2BBD2F7CFEF8C51A50F96D510.js 4KB
index.js 4KB
index.js 4KB
index.js 4KB
index.js 4KB
index.js 4KB
E4A9EA36BBD2F7CF82CF8231C006D510.js 3KB
11EA7634BBD2F7CF778C1E3316B7D510.js 3KB
240E22A0BBD2F7CF42684AA7EC97D510.js 3KB
index.js 3KB
index.js 3KB
4F48F6D2BBD2F7CF292E9ED5AE77D510.js 3KB
index.js 3KB
3E95E470BBD2F7CF58F38C778D67D510.js 3KB
index.js 3KB
index.js 3KB
E6C401C2BBD2F7CF80A269C5F657D510.js 3KB
index.js 3KB
33110D63BBD2F7CF557765645C87D510.js 2KB
index.js 2KB
index.js 2KB
02DE1DC1BBD2F7CF64B875C6FFB5D510.js 2KB
index.js 2KB
A1C5AEF0BBD2F7CFC7A3C6F72F06D510.js 2KB
index.js 2KB
3FED1DA1BBD2F7CF598B75A626A7D510.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
F2EC8851BBD2F7CF948AE0567EB6D510.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
DC680784BBD2F7CFBA0E6F831217D510.js 2KB
index.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
95CA65F6BBD2F7CFF3AC0DF1A5F6D510.js 1KB
index.js 1KB
89FB09E6BBD2F7CFEF9D61E18C36D510.js 1KB
4A774364BBD2F7CF2C112B63A076D510.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
3B5A6423BBD2F7CF5D3C0C24CC86D510.js 1KB
header.js 1KB
index.js 1KB
共 729 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
百创科技
- 粉丝: 1985
- 资源: 243
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功