Commit 391eafab by liuhailong

Merge branch 'master' of http://132.232.91.252:9999/ice/xiaozhan

parents 086fbf11 239a1184
......@@ -38,7 +38,7 @@ input{
<li><a>提现配置</a></li>
<li><a>推送配置</a></li>
<li><a>支付配置</a></li>
<li><a>游戏配置</a></li>
<!-- <li><a>游戏配置</a></li>-->
<li><a>分销配置</a></li>
<li><a>统计配置</a></li>
<li><a>视频配置</a></li>
......@@ -249,6 +249,7 @@ input{
<input type="text" name="post[chatserver]" value="{$config['chatserver']}"> 格式:http://域名(:端口) 或者 http://IP(:端口)
</div>
</div>
<!--
<div class="control-group">
<label class="control-label">禁言时长</label>
<div class="controls">
......@@ -261,6 +262,7 @@ input{
<input type="text" name="post[kick_time]" value="{$config['kick_time']}">秒 直播间踢出时长
</div>
</div>
-->
<div class="control-group">
<label class="control-label">模式选择</label>
<div class="controls" id="sdk">
......@@ -500,7 +502,7 @@ input{
<div class="control-group">
<label class="control-label">提现比例</label>
<div class="controls">
<input type="text" name="post[cash_rate]" value="{$config['cash_rate']}"> 提现一元人民币需要的票数
<input type="text" name="post[cash_rate]" value="{$config['cash_rate']}"> 提现一元人民币需要的积分
</div>
</div>
<div class="control-group">
......
......@@ -7,19 +7,19 @@ class Api_Charge extends PhalApi_Api {
'getAliOrder' => array(
'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'),
'changeid' => array('name' => 'changeid', 'type' => 'int', 'require' => true, 'desc' => '充值规则ID'),
'coin' => array('name' => 'coin', 'type' => 'string', 'require' => true, 'desc' => '萌豆'),
'coin' => array('name' => 'coin', 'type' => 'string', 'require' => true, 'desc' => '钻石'),
'money' => array('name' => 'money', 'type' => 'string', 'require' => true, 'desc' => '充值金额'),
),
'getWxOrder' => array(
'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'),
'changeid' => array('name' => 'changeid', 'type' => 'string', 'require' => true, 'desc' => '充值规则ID'),
'coin' => array('name' => 'coin', 'type' => 'string', 'require' => true, 'desc' => '萌豆'),
'coin' => array('name' => 'coin', 'type' => 'string', 'require' => true, 'desc' => '钻石'),
'money' => array('name' => 'money', 'type' => 'string', 'require' => true, 'desc' => '充值金额'),
),
'getIosOrder' => array(
'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'),
'changeid' => array('name' => 'changeid', 'type' => 'string', 'require' => true, 'desc' => '充值规则ID'),
'coin' => array('name' => 'coin', 'type' => 'string', 'require' => true, 'desc' => '萌豆'),
'coin' => array('name' => 'coin', 'type' => 'string', 'require' => true, 'desc' => '钻石'),
'money' => array('name' => 'money', 'type' => 'string', 'require' => true, 'desc' => '充值金额'),
),
);
......
......@@ -153,6 +153,10 @@ class Api_Home extends PhalApi_Api {
$info['guide']=$guide_info;
// 福利袋
$welfare = DI()->notorm->welfare_rate->select('rate')->where('id=1')->fetchOne();
$info['welfare_price'] = $welfare['rate'];
$rs['info'][0] = $info;
return $rs;
......
......@@ -222,15 +222,15 @@ class Api_Live extends PhalApi_Api {
protected function getbaiming($uid)
{
$domain=new Domain_Home();
$res=$domain->wealth('day');
$i = 0;
$res=$domain->star('day');
$i = 99;
foreach ($res as $key => $r){
if ($r['uid'] == $uid) {
$i = $key + 1;
$i = $key;
break;
}
}
return $i;
return $i + 1;
}
/**
......
......@@ -10,7 +10,7 @@ class Api_Red extends PhalApi_Api {
'stream' => array('name' => 'stream', 'type' => 'string', 'require' => true, 'desc' => '流名'),
'type' => array('name' => 'type', 'type' => 'int', 'require' => true, 'desc' => '红包类型,0普通,1手气'),
'type_grant' => array('name' => 'type_grant', 'type' => 'int', 'require' => true, 'desc' => '发放类型,0立即 1延迟'),
'coin' => array('name' => 'coin', 'type' => 'int', 'require' => true, 'desc' => '萌豆'),
'coin' => array('name' => 'coin', 'type' => 'int', 'require' => true, 'desc' => '钻石'),
'nums' => array('name' => 'nums', 'type' => 'int', 'require' => true, 'desc' => '数量'),
'des' => array('name' => 'des', 'type' => 'string', 'default'=>'恭喜发财,大吉大利', 'desc' => '描述'),
),
......
......@@ -940,15 +940,9 @@ class Api_User extends PhalApi_Api {
return $rs;
}
if(!$accountid){
$rs['code'] = 1001;
$rs['msg'] = '请选择提现账号';
return $rs;
}
if(!$cashvote){
if($cashvote <= 0){
$rs['code'] = 1002;
$rs['msg'] = '请输入有效的提现票数';
$rs['msg'] = '请输入有效的提现金额';
return $rs;
}
......
......@@ -308,7 +308,7 @@ class Model_Live extends PhalApi_Model_NotORM {
if($islive['type']==1){
$rs['type_msg']=md5($islive['type_val']);
}else if($islive['type']==2){
$rs['type_msg']='本房间为收费房间,需支付'.$islive['type_val'].'萌豆';
$rs['type_msg']='本房间为收费房间,需支付'.$islive['type_val'].'钻石';
$rs['type_val']=$islive['type_val'];
$isexist=DI()->notorm->users_coinrecord
->select('id')
......@@ -321,7 +321,7 @@ class Model_Live extends PhalApi_Model_NotORM {
}
}else if($islive['type']==3){
$rs['type_val']=$islive['type_val'];
$rs['type_msg']='本房间为计时房间,每分钟需支付'.$islive['type_val'].'萌豆';
$rs['type_msg']='本房间为计时房间,每分钟需支付'.$islive['type_val'].'钻石';
}
return $rs;
......@@ -524,8 +524,8 @@ class Model_Live extends PhalApi_Model_NotORM {
}
$welfare = DI()->notorm->welfare_rate->select('rate')->where('id=1')->fetchOne();
$giftinfo = [
'type' => 0,
'mark' => 0,
'type' => 1,
'mark' => 4,
'giftname' => '福利袋',
'gifticon' => 'http://qiniu.huad.leacho.cn/20190723/5d367483cb9ac.png',
'needcoin' => $welfare['rate'],
......@@ -864,6 +864,27 @@ class Model_Live extends PhalApi_Model_NotORM {
"addtime"=>$addtime
);
DI()->notorm->users_coinrecord->insert($insert);
$luckcoin2 = (int)($luckcoin*0.05 * 100);
$luckcoin3 = $luckcoin2 / 100;
if ($luckcoin3 > 0) {
DI()->notorm->users
->where('id = ?', $liveuid)
->update( array('votes' => new NotORM_Literal("votes + {$luckcoin3}"),'votestotal' => new NotORM_Literal("votestotal + {$luckcoin3}") ));
$insert=array(
"type"=>'income',
"action"=>'luckgift',
"uid"=>$liveuid,
"touid"=>$liveuid,
"giftid"=>$giftid,
"giftcount"=>$lucktimes,
"totalcoin"=>$luckcoin,
"showid"=>$showid,
"mark"=>$giftinfo['mark'],
"addtime"=>$addtime
);
DI()->notorm->users_coinrecord->insert($insert);
}
break;
}
}
......
......@@ -157,12 +157,10 @@ class Model_User extends PhalApi_Model_NotORM
/* 提现 */
public function setCash($data)
{
$nowtime = time();
$uid = $data['uid'];
$accountid = $data['accountid'];
$cashvote = $data['cashvote'];
$money = $data['cashvote'];
$config = getConfigPri();
$cash_start = $config['cash_start'];
......@@ -195,7 +193,7 @@ class Model_User extends PhalApi_Model_NotORM
}
/* 钱包信息 */
$accountinfo = DI()->notorm->cmf_users_info_auth->select("*")->where('uid=? and status=?', $uid, 1)->andWhere()->fetchOne();
$accountinfo = DI()->notorm->users_info_auth->where("uid={$uid} and status=1")->fetchOne();
if (!$accountinfo) {
return 1007;
}
......@@ -206,7 +204,7 @@ class Model_User extends PhalApi_Model_NotORM
$cash_min = $config['cash_min'];
//提现钱数
$money = floor($cashvote / $cash_rate);
// $money = floor($cashvote / $cash_rate);
if ($money < $cash_min) {
return 1004;
......@@ -221,16 +219,16 @@ class Model_User extends PhalApi_Model_NotORM
$name = $account = $account_bank = '';
if ($accountid == 1) {
if ($accountid == 0) {
$account = $accountinfo['account'];
$name = $accountinfo['username'];
}
//
// if ($accountid == 2) {
// return 1007;
// }
if ($accountid == 2) {
return 1007;
}
if ($accountid == 3) {
if ($accountid == 1) {
$name = $accountinfo['name'];
$account = $accountinfo['bank_card'];
$account_bank = $accountinfo['bank_province'] . $accountinfo['bank_city'];
......
......@@ -7,9 +7,9 @@ namespace Admin\Controller;
use Common\Controller\AdminbaseController;
class CashController extends AdminbaseController {
var $type=array(
'1'=>'支付宝',
'0'=>'支付宝',
'2'=>'微信',
'3'=>'银行卡',
'1'=>'银行卡',
);
function index(){
......
......@@ -64,7 +64,6 @@
}, 'json');
},
add: function (id) {
layer.msg("申请错误!");
$.ajax({
url: '/index.php?g=Appapi&m=Family&a=member_add',
dataType: "json",
......
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