Commit 391eafab by liuhailong

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

parents 086fbf11 239a1184
...@@ -38,48 +38,48 @@ input{ ...@@ -38,48 +38,48 @@ 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>-->
<li><a>分销配置</a></li> <li><a>分销配置</a></li>
<li><a>统计配置</a></li> <li><a>统计配置</a></li>
<li><a>视频配置</a></li> <li><a>视频配置</a></li>
</ul> </ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('Configprivate/set_post')}"> <form method="post" class="form-horizontal js-ajax-form" action="{:U('Configprivate/set_post')}">
<div class="js-tabs-content"> <div class="js-tabs-content">
<!-- 基本配置 --> <!-- 基本配置 -->
<div> <div>
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">用户列表请求间隔</label> <label class="control-label">用户列表请求间隔</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[userlist_time]" value="{$config['userlist_time']}">秒 直播间用户列表刷新间隔时间 <input type="text" name="post[userlist_time]" value="{$config['userlist_time']}">秒 直播间用户列表刷新间隔时间
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">弹幕费用</label> <label class="control-label">弹幕费用</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[barrage_fee]" value="{$config['barrage_fee']}"> 每条弹幕的价格(整数) <input type="text" name="post[barrage_fee]" value="{$config['barrage_fee']}"> 每条弹幕的价格(整数)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">注册奖励</label> <label class="control-label">注册奖励</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[reg_reward]" value="{$config['reg_reward']}"> 新用户注册奖励(整数) <input type="text" name="post[reg_reward]" value="{$config['reg_reward']}"> 新用户注册奖励(整数)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">家族控制</label> <label class="control-label">家族控制</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[family_switch]" <eq name="config['family_switch']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[family_switch]" <eq name="config['family_switch']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[family_switch]" <eq name="config['family_switch']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[family_switch]" <eq name="config['family_switch']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">家族是否开启</label> <label class="checkbox inline">家族是否开启</label>
</div> </div>
</div> </div>
</fieldset> </fieldset>
</div> </div>
<!-- 登录配置 --> <!-- 登录配置 -->
...@@ -87,7 +87,7 @@ input{ ...@@ -87,7 +87,7 @@ input{
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">登录奖励开关</label> <label class="control-label">登录奖励开关</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[bonus_switch]" <eq name="config['bonus_switch']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[bonus_switch]" <eq name="config['bonus_switch']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[bonus_switch]" <eq name="config['bonus_switch']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[bonus_switch]" <eq name="config['bonus_switch']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline"></label> <label class="checkbox inline"></label>
...@@ -95,87 +95,87 @@ input{ ...@@ -95,87 +95,87 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">PC 微信登录appid</label> <label class="control-label">PC 微信登录appid</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[login_wx_pc_appid]" value="{$config['login_wx_pc_appid']}"> PC 微信登录appid(微信开放平台网页应用 APPID) <input type="text" name="post[login_wx_pc_appid]" value="{$config['login_wx_pc_appid']}"> PC 微信登录appid(微信开放平台网页应用 APPID)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">PC 微信登录appsecret</label> <label class="control-label">PC 微信登录appsecret</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[login_wx_pc_appsecret]" value="{$config['login_wx_pc_appsecret']}"> PC 微信登录appsecret(微信开放平台网页应用 AppSecret) <input type="text" name="post[login_wx_pc_appsecret]" value="{$config['login_wx_pc_appsecret']}"> PC 微信登录appsecret(微信开放平台网页应用 AppSecret)
</div> </div>
</div> </div>
<!-- <div class="control-group"> <!-- <div class="control-group">
<label class="control-label">PC微博登陆akey</label> <label class="control-label">PC微博登陆akey</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[login_sina_pc_akey]" value="{$config['login_sina_pc_akey']}"> PC微博登陆akey <input type="text" name="post[login_sina_pc_akey]" value="{$config['login_sina_pc_akey']}"> PC微博登陆akey
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">PC新浪微博skey</label> <label class="control-label">PC新浪微博skey</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[login_sina_pc_skey]" value="{$config['login_sina_pc_skey']}"> PC新浪微博skey <input type="text" name="post[login_sina_pc_skey]" value="{$config['login_sina_pc_skey']}"> PC新浪微博skey
</div> </div>
</div> --> </div> -->
<div class="control-group"> <div class="control-group">
<label class="control-label">微信公众平台Appid</label> <label class="control-label">微信公众平台Appid</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[login_wx_appid]" value="{$config['login_wx_appid']}"> 微信公众平台Appid <input type="text" name="post[login_wx_appid]" value="{$config['login_wx_appid']}"> 微信公众平台Appid
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">微信公众平台AppSecret</label> <label class="control-label">微信公众平台AppSecret</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[login_wx_appsecret]" value="{$config['login_wx_appsecret']}"> 微信公众平台AppSecret <input type="text" name="post[login_wx_appsecret]" value="{$config['login_wx_appsecret']}"> 微信公众平台AppSecret
</div> </div>
</div> </div>
<!-- <div class="control-group"> <!-- <div class="control-group">
<label class="control-label">互亿无线APIID</label> <label class="control-label">互亿无线APIID</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ihuyi_account]" value="{$config['ihuyi_account']}"> 短信验证码 http://www.ihuyi.com/ 互亿无线后台-》验证码、短信通知-》账号及签名->APIID <input type="text" name="post[ihuyi_account]" value="{$config['ihuyi_account']}"> 短信验证码 http://www.ihuyi.com/ 互亿无线后台-》验证码、短信通知-》账号及签名->APIID
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">互亿无线key</label> <label class="control-label">互亿无线key</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ihuyi_ps]" value="{$config['ihuyi_ps']}"> 短信验证码 互亿无线后台-》验证码、短信通知-》账号及签名->APIKEY <input type="text" name="post[ihuyi_ps]" value="{$config['ihuyi_ps']}"> 短信验证码 互亿无线后台-》验证码、短信通知-》账号及签名->APIKEY
</div> </div>
</div> --> </div> -->
<div class="control-group"> <div class="control-group">
<label class="control-label">容联云ACCOUNT SID</label> <label class="control-label">容联云ACCOUNT SID</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ccp_sid]" value="{$config['ccp_sid']}"> 短信验证码 <input type="text" name="post[ccp_sid]" value="{$config['ccp_sid']}"> 短信验证码
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">容联云AUTH TOKEN</label> <label class="control-label">容联云AUTH TOKEN</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ccp_token]" value="{$config['ccp_token']}"> 短信验证码 <input type="text" name="post[ccp_token]" value="{$config['ccp_token']}"> 短信验证码
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">容联云应用APPID</label> <label class="control-label">容联云应用APPID</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ccp_appid]" value="{$config['ccp_appid']}"> 短信验证码 <input type="text" name="post[ccp_appid]" value="{$config['ccp_appid']}"> 短信验证码
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">容联云短信模板ID</label> <label class="control-label">容联云短信模板ID</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ccp_tempid]" value="{$config['ccp_tempid']}"> 短信验证码 <input type="text" name="post[ccp_tempid]" value="{$config['ccp_tempid']}"> 短信验证码
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">短信验证码开关</label> <label class="control-label">短信验证码开关</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[sendcode_switch]" <eq name="config['sendcode_switch']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[sendcode_switch]" <eq name="config['sendcode_switch']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[sendcode_switch]" <eq name="config['sendcode_switch']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[sendcode_switch]" <eq name="config['sendcode_switch']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">短信验证码开关,关闭后不再发送真实验证码,采用默认验证码123456</label> <label class="checkbox inline">短信验证码开关,关闭后不再发送真实验证码,采用默认验证码123456</label>
...@@ -183,7 +183,7 @@ input{ ...@@ -183,7 +183,7 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">短信验证码IP限制开关</label> <label class="control-label">短信验证码IP限制开关</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[iplimit_switch]" <eq name="config['iplimit_switch']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[iplimit_switch]" <eq name="config['iplimit_switch']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[iplimit_switch]" <eq name="config['iplimit_switch']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[iplimit_switch]" <eq name="config['iplimit_switch']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">短信验证码IP限制开关</label> <label class="checkbox inline">短信验证码IP限制开关</label>
...@@ -191,7 +191,7 @@ input{ ...@@ -191,7 +191,7 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">短信验证码IP限制次数</label> <label class="control-label">短信验证码IP限制次数</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[iplimit_times]" value="{$config['iplimit_times']}"> 同一IP每天可以发送验证码的最大次数 <input type="text" name="post[iplimit_times]" value="{$config['iplimit_times']}"> 同一IP每天可以发送验证码的最大次数
</div> </div>
</div> </div>
...@@ -202,7 +202,7 @@ input{ ...@@ -202,7 +202,7 @@ input{
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">认证限制</label> <label class="control-label">认证限制</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[auth_islimit]" <eq name="config['auth_islimit']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[auth_islimit]" <eq name="config['auth_islimit']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[auth_islimit]" <eq name="config['auth_islimit']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[auth_islimit]" <eq name="config['auth_islimit']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">主播开播是否需要身份认证</label> <label class="checkbox inline">主播开播是否需要身份认证</label>
...@@ -210,57 +210,59 @@ input{ ...@@ -210,57 +210,59 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">直播等级控制</label> <label class="control-label">直播等级控制</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[level_islimit]" <eq name="config['level_islimit']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[level_islimit]" <eq name="config['level_islimit']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[level_islimit]" <eq name="config['level_islimit']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[level_islimit]" <eq name="config['level_islimit']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">直播等级控制是否开启</label> <label class="checkbox inline">直播等级控制是否开启</label>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">直播限制等级</label> <label class="control-label">直播限制等级</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[level_limit]" value="{$config['level_limit']}"> 直播等级限制开启时,最低开播等级(用户等级) <input type="text" name="post[level_limit]" value="{$config['level_limit']}"> 直播等级限制开启时,最低开播等级(用户等级)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">发言等级限制</label> <label class="control-label">发言等级限制</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[speak_limit]" value="{$config['speak_limit']}"> 0表示无限制 <input type="text" name="post[speak_limit]" value="{$config['speak_limit']}"> 0表示无限制
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">弹幕等级限制</label> <label class="control-label">弹幕等级限制</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[barrage_limit]" value="{$config['barrage_limit']}"> 0表示无限制 <input type="text" name="post[barrage_limit]" value="{$config['barrage_limit']}"> 0表示无限制
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">连麦等级限制</label> <label class="control-label">连麦等级限制</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[mic_limit]" value="{$config['mic_limit']}"> 0表示无限制 <input type="text" name="post[mic_limit]" value="{$config['mic_limit']}"> 0表示无限制
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">聊天服务器带端口</label> <label class="control-label">聊天服务器带端口</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[chatserver]" value="{$config['chatserver']}"> 格式:http://域名(:端口) 或者 http://IP(:端口) <input type="text" name="post[chatserver]" value="{$config['chatserver']}"> 格式:http://域名(:端口) 或者 http://IP(:端口)
</div> </div>
</div> </div>
<!--
<div class="control-group"> <div class="control-group">
<label class="control-label">禁言时长</label> <label class="control-label">禁言时长</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[shut_time]" value="{$config['shut_time']}">秒 直播间禁言时长 <input type="text" name="post[shut_time]" value="{$config['shut_time']}">秒 直播间禁言时长
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">踢出时长</label> <label class="control-label">踢出时长</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[kick_time]" value="{$config['kick_time']}">秒 直播间踢出时长 <input type="text" name="post[kick_time]" value="{$config['kick_time']}">秒 直播间踢出时长
</div> </div>
</div> </div>
-->
<div class="control-group"> <div class="control-group">
<label class="control-label">模式选择</label> <label class="control-label">模式选择</label>
<div class="controls" id="sdk"> <div class="controls" id="sdk">
...@@ -270,7 +272,7 @@ input{ ...@@ -270,7 +272,7 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">CDN</label> <label class="control-label">CDN</label>
<div class="controls" id="cdn"> <div class="controls" id="cdn">
<label class="radio inline"><input type="radio" value="1" name="post[cdn_switch]" <if condition="$config['live_sdk'] eq 1">disabled</if> <eq name="config['cdn_switch']" value="1">checked="checked"</eq>>阿里云</label> <label class="radio inline"><input type="radio" value="1" name="post[cdn_switch]" <if condition="$config['live_sdk'] eq 1">disabled</if> <eq name="config['cdn_switch']" value="1">checked="checked"</eq>>阿里云</label>
<label class="radio inline"><input type="radio" value="2" name="post[cdn_switch]" <eq name="config['cdn_switch']" value="2">checked="checked"</eq>>腾讯云</label> <label class="radio inline"><input type="radio" value="2" name="post[cdn_switch]" <eq name="config['cdn_switch']" value="2">checked="checked"</eq>>腾讯云</label>
<label class="radio inline"><input type="radio" value="3" name="post[cdn_switch]" <if condition="$config['live_sdk'] eq 1">disabled</if> <eq name="config['cdn_switch']" value="3">checked="checked"</eq>>七牛云</label> <label class="radio inline"><input type="radio" value="3" name="post[cdn_switch]" <if condition="$config['live_sdk'] eq 1">disabled</if> <eq name="config['cdn_switch']" value="3">checked="checked"</eq>>七牛云</label>
...@@ -299,28 +301,28 @@ input{ ...@@ -299,28 +301,28 @@ input{
<input type="text" name="post[auth_length_push]" value="{$config['auth_length_push']}"> 推流鉴权有效时长(秒) <input type="text" name="post[auth_length_push]" value="{$config['auth_length_push']}"> 推流鉴权有效时长(秒)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">播流服务器地址</label> <label class="control-label">播流服务器地址</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[pull_url]" value="{$config['pull_url']}"> 格式:域名(:端口) 或者 IP(:端口) <input type="text" name="post[pull_url]" value="{$config['pull_url']}"> 格式:域名(:端口) 或者 IP(:端口)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">播流鉴权KEY</label> <label class="control-label">播流鉴权KEY</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[auth_key_pull]" value="{$config['auth_key_pull']}"> 播流鉴权KEY 留空表示不启用 <input type="text" name="post[auth_key_pull]" value="{$config['auth_key_pull']}"> 播流鉴权KEY 留空表示不启用
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">播流鉴权有效时长</label> <label class="control-label">播流鉴权有效时长</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[auth_length_pull]" value="{$config['auth_length_pull']}"> 播流鉴权有效时长(秒) <input type="text" name="post[auth_length_pull]" value="{$config['auth_length_pull']}"> 播流鉴权有效时长(秒)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">阿里云AccessKey ID</label> <label class="control-label">阿里云AccessKey ID</label>
<div class="controls"> <div class="controls">
...@@ -338,36 +340,36 @@ input{ ...@@ -338,36 +340,36 @@ input{
<div class="control-group"> <div class="control-group">
<label class="control-label">直播appid</label> <label class="control-label">直播appid</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[tx_appid]" value="{$config['tx_appid']}"> <input type="text" name="post[tx_appid]" value="{$config['tx_appid']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">直播bizid</label> <label class="control-label">直播bizid</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[tx_bizid]" value="{$config['tx_bizid']}"> <input type="text" name="post[tx_bizid]" value="{$config['tx_bizid']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">直播推流防盗链Key</label> <label class="control-label">直播推流防盗链Key</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[tx_push_key]" value="{$config['tx_push_key']}"> <input type="text" name="post[tx_push_key]" value="{$config['tx_push_key']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">直播API鉴权key</label> <label class="control-label">直播API鉴权key</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[tx_api_key]" value="{$config['tx_api_key']}"> <input type="text" name="post[tx_api_key]" value="{$config['tx_api_key']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">直播推流域名</label> <label class="control-label">直播推流域名</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[tx_push]" value="{$config['tx_push']}"> 不带 http:// ,最后无 / <input type="text" name="post[tx_push]" value="{$config['tx_push']}"> 不带 http:// ,最后无 /
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">直播播流域名</label> <label class="control-label">直播播流域名</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[tx_pull]" value="{$config['tx_pull']}"> 不带 http:// ,最后无 / <input type="text" name="post[tx_pull]" value="{$config['tx_pull']}"> 不带 http:// ,最后无 /
</div> </div>
</div> </div>
...@@ -375,31 +377,31 @@ input{ ...@@ -375,31 +377,31 @@ input{
<div id="cdn_switch_3" class="hide" <eq name="config['cdn_switch']" value="3">style="display:block;"</eq>> <div id="cdn_switch_3" class="hide" <eq name="config['cdn_switch']" value="3">style="display:block;"</eq>>
<div class="control-group"> <div class="control-group">
<label class="control-label">七牛云AccessKey</label> <label class="control-label">七牛云AccessKey</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[qn_ak]" value="{$config['qn_ak']}"> <input type="text" name="post[qn_ak]" value="{$config['qn_ak']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">七牛云SecretKey</label> <label class="control-label">七牛云SecretKey</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[qn_sk]" value="{$config['qn_sk']}"> <input type="text" name="post[qn_sk]" value="{$config['qn_sk']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">七牛云直播空间名称</label> <label class="control-label">七牛云直播空间名称</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[qn_hname]" value="{$config['qn_hname']}"> <input type="text" name="post[qn_hname]" value="{$config['qn_hname']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">七牛云推流地址</label> <label class="control-label">七牛云推流地址</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[qn_push]" value="{$config['qn_push']}"> 七牛云直播云域名管理中RTMP推流域名 <input type="text" name="post[qn_push]" value="{$config['qn_push']}"> 七牛云直播云域名管理中RTMP推流域名
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">七牛云播流地址</label> <label class="control-label">七牛云播流地址</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[qn_pull]" value="{$config['qn_pull']}"> 七牛云直播云域名管理中RTMP播流域名 <input type="text" name="post[qn_pull]" value="{$config['qn_pull']}"> 七牛云直播云域名管理中RTMP播流域名
</div> </div>
</div> </div>
...@@ -407,61 +409,61 @@ input{ ...@@ -407,61 +409,61 @@ input{
<div id="cdn_switch_4" class="hide" <eq name="config['cdn_switch']" value="4">style="display:block;"</eq>> <div id="cdn_switch_4" class="hide" <eq name="config['cdn_switch']" value="4">style="display:block;"</eq>>
<div class="control-group"> <div class="control-group">
<label class="control-label">网宿推流地址</label> <label class="control-label">网宿推流地址</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ws_push]" value="{$config['ws_push']}"> <input type="text" name="post[ws_push]" value="{$config['ws_push']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">网宿播流地址</label> <label class="control-label">网宿播流地址</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ws_pull]" value="{$config['ws_pull']}"> <input type="text" name="post[ws_pull]" value="{$config['ws_pull']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">网宿AppName</label> <label class="control-label">网宿AppName</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ws_apn]" value="{$config['ws_apn']}"> <input type="text" name="post[ws_apn]" value="{$config['ws_apn']}">
</div> </div>
</div> </div>
</div> </div>
<div id="cdn_switch_5" class="hide" <eq name="config['cdn_switch']" value="5">style="display:block;"</eq>> <div id="cdn_switch_5" class="hide" <eq name="config['cdn_switch']" value="5">style="display:block;"</eq>>
<div class="control-group"> <div class="control-group">
<label class="control-label">网易cdn Appkey</label> <label class="control-label">网易cdn Appkey</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[wy_appkey]" value="{$config['wy_appkey']}"> <input type="text" name="post[wy_appkey]" value="{$config['wy_appkey']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">网易cdn AppSecret</label> <label class="control-label">网易cdn AppSecret</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[wy_appsecret]" value="{$config['wy_appsecret']}"> <input type="text" name="post[wy_appsecret]" value="{$config['wy_appsecret']}">
</div> </div>
</div> </div>
</div> </div>
<div id="cdn_switch_6" class="hide" <eq name="config['cdn_switch']" value="6">style="display:block;"</eq>> <div id="cdn_switch_6" class="hide" <eq name="config['cdn_switch']" value="6">style="display:block;"</eq>>
<div class="control-group"> <div class="control-group">
<label class="control-label">奥点云推流地址</label> <label class="control-label">奥点云推流地址</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ady_push]" value="{$config['ady_push']}"> <input type="text" name="post[ady_push]" value="{$config['ady_push']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">奥点云播流地址</label> <label class="control-label">奥点云播流地址</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ady_pull]" value="{$config['ady_pull']}"> <input type="text" name="post[ady_pull]" value="{$config['ady_pull']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">奥点云HLS播流地址</label> <label class="control-label">奥点云HLS播流地址</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ady_hls_pull]" value="{$config['ady_hls_pull']}"> <input type="text" name="post[ady_hls_pull]" value="{$config['ady_hls_pull']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">奥点云AppName</label> <label class="control-label">奥点云AppName</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[ady_apn]" value="{$config['ady_apn']}"> <input type="text" name="post[ady_apn]" value="{$config['ady_apn']}">
</div> </div>
</div> </div>
</div> </div>
...@@ -478,9 +480,9 @@ input{ ...@@ -478,9 +480,9 @@ input{
}else{ }else{
$("#cdn label.radio input[type=radio]").removeAttr('disabled'); $("#cdn label.radio input[type=radio]").removeAttr('disabled');
} }
}) })
$("#cdn label.radio").on('click',function(){ $("#cdn label.radio").on('click',function(){
var v_d=$("input",this).attr('disabled'); var v_d=$("input",this).attr('disabled');
if(v_d=='disabled'){ if(v_d=='disabled'){
...@@ -499,26 +501,26 @@ input{ ...@@ -499,26 +501,26 @@ input{
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">提现比例</label> <label class="control-label">提现比例</label>
<div class="controls"> <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> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">提现最低额度(元)</label> <label class="control-label">提现最低额度(元)</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[cash_min]" value="{$config['cash_min']}"> 可提现的最小额度,低于该额度无法提现 <input type="text" name="post[cash_min]" value="{$config['cash_min']}"> 可提现的最小额度,低于该额度无法提现
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">每月提现期</label> <label class="control-label">每月提现期</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[cash_start]" value="{$config['cash_start']}" style="width:100px;"> - <input type="text" name="post[cash_start]" value="{$config['cash_start']}" style="width:100px;"> -
<input type="text" name="post[cash_end]" value="{$config['cash_end']}" style="width:100px;"> 每月提现期限,不在时间段无法提现 <input type="text" name="post[cash_end]" value="{$config['cash_end']}" style="width:100px;"> 每月提现期限,不在时间段无法提现
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">每月提现次数</label> <label class="control-label">每月提现次数</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[cash_max_times]" value="{$config['cash_max_times']}"> 每月可提现最大次数,0表示不限制 <input type="text" name="post[cash_max_times]" value="{$config['cash_max_times']}"> 每月可提现最大次数,0表示不限制
</div> </div>
</div> </div>
...@@ -529,7 +531,7 @@ input{ ...@@ -529,7 +531,7 @@ input{
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">极光推送模式</label> <label class="control-label">极光推送模式</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[jpush_sandbox]" <eq name="config['jpush_sandbox']" value="0">checked="checked"</eq>>开发</label> <label class="radio inline"><input type="radio" value="0" name="post[jpush_sandbox]" <eq name="config['jpush_sandbox']" value="0">checked="checked"</eq>>开发</label>
<label class="radio inline"><input type="radio" value="1" name="post[jpush_sandbox]" <eq name="config['jpush_sandbox']" value="1">checked="checked"</eq>>生产</label> <label class="radio inline"><input type="radio" value="1" name="post[jpush_sandbox]" <eq name="config['jpush_sandbox']" value="1">checked="checked"</eq>>生产</label>
<label class="checkbox inline">极光推送模式</label> <label class="checkbox inline">极光推送模式</label>
...@@ -537,13 +539,13 @@ input{ ...@@ -537,13 +539,13 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">极光推送APP_KEY</label> <label class="control-label">极光推送APP_KEY</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[jpush_key]" value="{$config['jpush_key']}"> <input type="text" name="post[jpush_key]" value="{$config['jpush_key']}">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">极光推送master_secret</label> <label class="control-label">极光推送master_secret</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[jpush_secret]" value="{$config['jpush_secret']}"> <input type="text" name="post[jpush_secret]" value="{$config['jpush_secret']}">
</div> </div>
</div> </div>
...@@ -554,7 +556,7 @@ input{ ...@@ -554,7 +556,7 @@ input{
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">支付宝APP</label> <label class="control-label">支付宝APP</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[aliapp_switch]" <eq name="config['aliapp_switch']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[aliapp_switch]" <eq name="config['aliapp_switch']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[aliapp_switch]" <eq name="config['aliapp_switch']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[aliapp_switch]" <eq name="config['aliapp_switch']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">支付宝APP支付是否开启</label> <label class="checkbox inline">支付宝APP支付是否开启</label>
...@@ -562,37 +564,37 @@ input{ ...@@ -562,37 +564,37 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">合作者身份ID</label> <label class="control-label">合作者身份ID</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[aliapp_partner]" value="{$config['aliapp_partner']}">支付宝合作者身份ID <input type="text" name="post[aliapp_partner]" value="{$config['aliapp_partner']}">支付宝合作者身份ID
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">支付宝帐号</label> <label class="control-label">支付宝帐号</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[aliapp_seller_id]" value="{$config['aliapp_seller_id']}">支付宝登录账号 <input type="text" name="post[aliapp_seller_id]" value="{$config['aliapp_seller_id']}">支付宝登录账号
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">支付宝安卓密钥</label> <label class="control-label">支付宝安卓密钥</label>
<div class="controls"> <div class="controls">
<textarea name="post[aliapp_key_android]">{$config['aliapp_key_android']}</textarea>支付宝安卓密钥pkcs8 <textarea name="post[aliapp_key_android]">{$config['aliapp_key_android']}</textarea>支付宝安卓密钥pkcs8
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">支付宝苹果密钥</label> <label class="control-label">支付宝苹果密钥</label>
<div class="controls"> <div class="controls">
<textarea name="post[aliapp_key_ios]">{$config['aliapp_key_ios']}</textarea>支付宝苹果密钥pkcs8 <textarea name="post[aliapp_key_ios]">{$config['aliapp_key_ios']}</textarea>支付宝苹果密钥pkcs8
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">支付宝校验码</label> <label class="control-label">支付宝校验码</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[aliapp_check]" value="{$config['aliapp_check']}"> 支付宝校验码(PC扫码支付)(对应为 开放平台=》mapi网关产品=》MD5密钥) <input type="text" name="post[aliapp_check]" value="{$config['aliapp_check']}"> 支付宝校验码(PC扫码支付)(对应为 开放平台=》mapi网关产品=》MD5密钥)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">苹果支付模式</label> <label class="control-label">苹果支付模式</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[ios_sandbox]" <eq name="config['ios_sandbox']" value="0">checked="checked"</eq>>沙盒</label> <label class="radio inline"><input type="radio" value="0" name="post[ios_sandbox]" <eq name="config['ios_sandbox']" value="0">checked="checked"</eq>>沙盒</label>
<label class="radio inline"><input type="radio" value="1" name="post[ios_sandbox]" <eq name="config['ios_sandbox']" value="1">checked="checked"</eq>>生产</label> <label class="radio inline"><input type="radio" value="1" name="post[ios_sandbox]" <eq name="config['ios_sandbox']" value="1">checked="checked"</eq>>生产</label>
<label class="checkbox inline">苹果支付模式</label> <label class="checkbox inline">苹果支付模式</label>
...@@ -600,7 +602,7 @@ input{ ...@@ -600,7 +602,7 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">支付宝PC</label> <label class="control-label">支付宝PC</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[aliapp_pc]" <eq name="config['aliapp_pc']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[aliapp_pc]" <eq name="config['aliapp_pc']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[aliapp_pc]" <eq name="config['aliapp_pc']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[aliapp_pc]" <eq name="config['aliapp_pc']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">支付宝PC扫码支付是否开启</label> <label class="checkbox inline">支付宝PC扫码支付是否开启</label>
...@@ -608,7 +610,7 @@ input{ ...@@ -608,7 +610,7 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">微信支付PC</label> <label class="control-label">微信支付PC</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[wx_switch_pc]" <eq name="config['wx_switch_pc']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[wx_switch_pc]" <eq name="config['wx_switch_pc']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[wx_switch_pc]" <eq name="config['wx_switch_pc']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[wx_switch_pc]" <eq name="config['wx_switch_pc']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">微信支付PC 是否开启</label> <label class="checkbox inline">微信支付PC 是否开启</label>
...@@ -616,7 +618,7 @@ input{ ...@@ -616,7 +618,7 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">微信支付</label> <label class="control-label">微信支付</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[wx_switch]" <eq name="config['wx_switch']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[wx_switch]" <eq name="config['wx_switch']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[wx_switch]" <eq name="config['wx_switch']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[wx_switch]" <eq name="config['wx_switch']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">微信支付开关</label> <label class="checkbox inline">微信支付开关</label>
...@@ -624,31 +626,31 @@ input{ ...@@ -624,31 +626,31 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">微信开放平台移动应用AppID</label> <label class="control-label">微信开放平台移动应用AppID</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[wx_appid]" value="{$config['wx_appid']}">微信开放平台移动应用AppID <input type="text" name="post[wx_appid]" value="{$config['wx_appid']}">微信开放平台移动应用AppID
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">微信开放平台移动应用appsecret</label> <label class="control-label">微信开放平台移动应用appsecret</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[wx_appsecret]" value="{$config['wx_appsecret']}">微信开放平台移动应用appsecret <input type="text" name="post[wx_appsecret]" value="{$config['wx_appsecret']}">微信开放平台移动应用appsecret
</div> </div>
</div </div
><div class="control-group"> ><div class="control-group">
<label class="control-label">微信商户号mchid</label> <label class="control-label">微信商户号mchid</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[wx_mchid]" value="{$config['wx_mchid']}">微信商户号mchid(微信开放平台移动应用 对应的微信商户 商户号mchid) <input type="text" name="post[wx_mchid]" value="{$config['wx_mchid']}">微信商户号mchid(微信开放平台移动应用 对应的微信商户 商户号mchid)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">微信密钥key</label> <label class="control-label">微信密钥key</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[wx_key]" value="{$config['wx_key']}">微信密钥key(微信开放平台移动应用 对应的微信商户 密钥key) <input type="text" name="post[wx_key]" value="{$config['wx_key']}">微信密钥key(微信开放平台移动应用 对应的微信商户 密钥key)
</div> </div>
</div> </div>
</fieldset> </fieldset>
</div> </div>
<!-- 游戏配置 --> <!-- 游戏配置 -->
<div> <div>
<div class="form-actions"> <div class="form-actions">
...@@ -663,7 +665,7 @@ input{ ...@@ -663,7 +665,7 @@ input{
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">游戏开关</label> <label class="control-label">游戏开关</label>
<div class="controls"> <div class="controls">
<php> <php>
$game1='1'; $game1='1';
$game2='2'; $game2='2';
...@@ -681,32 +683,32 @@ input{ ...@@ -681,32 +683,32 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">上庄限制</label> <label class="control-label">上庄限制</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[game_banker_limit]" value="{$config['game_banker_limit']}"> 上庄限制,上庄游戏 申请上庄的用户拥有的萌豆数的最低值 <input type="text" name="post[game_banker_limit]" value="{$config['game_banker_limit']}"> 上庄限制,上庄游戏 申请上庄的用户拥有的萌豆数的最低值
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">普通游戏赔率</label> <label class="control-label">普通游戏赔率</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[game_odds]" value="{$config['game_odds']}">% 游戏结果不进行系统干预的概率,0 表示 完全进行 系统干预,平台绝对不会赔,100 表示完全随机 <input type="text" name="post[game_odds]" value="{$config['game_odds']}">% 游戏结果不进行系统干预的概率,0 表示 完全进行 系统干预,平台绝对不会赔,100 表示完全随机
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">系统坐庄游戏赔率</label> <label class="control-label">系统坐庄游戏赔率</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[game_odds_p]" value="{$config['game_odds_p']}">% 游戏结果不进行系统干预的概率 0 表示 完全进行 系统干预,庄家绝对不会赔,100 表示完全随机 <input type="text" name="post[game_odds_p]" value="{$config['game_odds_p']}">% 游戏结果不进行系统干预的概率 0 表示 完全进行 系统干预,庄家绝对不会赔,100 表示完全随机
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">用户坐庄游戏赔率</label> <label class="control-label">用户坐庄游戏赔率</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[game_odds_u]" value="{$config['game_odds_u']}">% 游戏结果不进行系统干预的概率 0 表示 完全进行 系统干预,庄家绝对不会赔,100 表示完全随机 <input type="text" name="post[game_odds_u]" value="{$config['game_odds_u']}">% 游戏结果不进行系统干预的概率 0 表示 完全进行 系统干预,庄家绝对不会赔,100 表示完全随机
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">游戏抽水</label> <label class="control-label">游戏抽水</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[game_pump]" value="{$config['game_pump']}">% 用户获胜后,去除本金部分的抽成比例 <input type="text" name="post[game_pump]" value="{$config['game_pump']}">% 用户获胜后,去除本金部分的抽成比例
</div> </div>
</div> </div>
</fieldset> </fieldset>
...@@ -716,7 +718,7 @@ input{ ...@@ -716,7 +718,7 @@ input{
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">分销开关</label> <label class="control-label">分销开关</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[agent_switch]" <eq name="config['agent_switch']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[agent_switch]" <eq name="config['agent_switch']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[agent_switch]" <eq name="config['agent_switch']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[agent_switch]" <eq name="config['agent_switch']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline">分销开关</label> <label class="checkbox inline">分销开关</label>
...@@ -724,58 +726,58 @@ input{ ...@@ -724,58 +726,58 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">分销一级分成</label> <label class="control-label">分销一级分成</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[distribut1]" value="{$config['distribut1']}">% 分销一级分成(整数) <input type="text" name="post[distribut1]" value="{$config['distribut1']}">% 分销一级分成(整数)
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">分销二级分成</label> <label class="control-label">分销二级分成</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[distribut2]" value="{$config['distribut2']}">% 分销二级分成(整数) <input type="text" name="post[distribut2]" value="{$config['distribut2']}">% 分销二级分成(整数)
</div> </div>
</div> </div>
<!-- <div class="control-group"> <!-- <div class="control-group">
<label class="control-label">分销三级分成</label> <label class="control-label">分销三级分成</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[distribut3]" value="{$config['distribut3']}">% 分销三级分成(整数) <input type="text" name="post[distribut3]" value="{$config['distribut3']}">% 分销三级分成(整数)
</div> </div>
</div> --> </div> -->
</fieldset> </fieldset>
</div> </div>
<!-- 统计配置 --> <!-- 统计配置 -->
<div> <div>
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">友盟OpenApi-apiKey</label> <label class="control-label">友盟OpenApi-apiKey</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[um_apikey]" value="{$config['um_apikey']}"> 友盟统计OpenApi-apiKey <input type="text" name="post[um_apikey]" value="{$config['um_apikey']}"> 友盟统计OpenApi-apiKey
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">友盟OpenApi-apiSecurity</label> <label class="control-label">友盟OpenApi-apiSecurity</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[um_apisecurity]" value="{$config['um_apisecurity']}"> 友盟统计OpenApi-apiKey <input type="text" name="post[um_apisecurity]" value="{$config['um_apisecurity']}"> 友盟统计OpenApi-apiKey
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">友盟Android应用-appkey</label> <label class="control-label">友盟Android应用-appkey</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[um_appkey_android]" value="{$config['um_appkey_android']}"> 友盟Android应用-appkey <input type="text" name="post[um_appkey_android]" value="{$config['um_appkey_android']}"> 友盟Android应用-appkey
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">友盟IOS应用-appkey</label> <label class="control-label">友盟IOS应用-appkey</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[um_appkey_ios]" value="{$config['um_appkey_ios']}"> 友盟IOS应用-appkey <input type="text" name="post[um_appkey_ios]" value="{$config['um_appkey_ios']}"> 友盟IOS应用-appkey
</div> </div>
</div> </div>
</fieldset> </fieldset>
</div> </div>
<!-- 视频配置 --> <!-- 视频配置 -->
<div> <div>
<fieldset> <fieldset>
...@@ -882,53 +884,53 @@ input{ ...@@ -882,53 +884,53 @@ input{
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">视频审核开关</label> <label class="control-label">视频审核开关</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[video_audit_switch]" <eq name="config['video_audit_switch']" value="0">checked="checked"</eq>>关闭</label> <label class="radio inline"><input type="radio" value="0" name="post[video_audit_switch]" <eq name="config['video_audit_switch']" value="0">checked="checked"</eq>>关闭</label>
<label class="radio inline"><input type="radio" value="1" name="post[video_audit_switch]" <eq name="config['video_audit_switch']" value="1">checked="checked"</eq>>开启</label> <label class="radio inline"><input type="radio" value="1" name="post[video_audit_switch]" <eq name="config['video_audit_switch']" value="1">checked="checked"</eq>>开启</label>
<label class="checkbox inline"></label> <label class="checkbox inline"></label>
</div> </div>
</div> </div>
<!-- <div class="control-group"> <!-- <div class="control-group">
<label class="control-label">推荐视频显示方式</label> <label class="control-label">推荐视频显示方式</label>
<div class="controls"> <div class="controls">
<label class="radio inline"><input type="radio" value="0" name="post[video_showtype]" <eq name="config['video_showtype']" value="0">checked="checked"</eq>>随机</label> <label class="radio inline"><input type="radio" value="0" name="post[video_showtype]" <eq name="config['video_showtype']" value="0">checked="checked"</eq>>随机</label>
<label class="radio inline"><input type="radio" value="1" name="post[video_showtype]" <eq name="config['video_showtype']" value="1">checked="checked"</eq>>按曝光值</label> <label class="radio inline"><input type="radio" value="1" name="post[video_showtype]" <eq name="config['video_showtype']" value="1">checked="checked"</eq>>按曝光值</label>
<label class="checkbox inline"></label> <label class="checkbox inline"></label>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">评论权重值</label> <label class="control-label">评论权重值</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[comment_weight]" value="{$config['comment_weight']}"> 用于视频推荐 <input type="text" name="post[comment_weight]" value="{$config['comment_weight']}"> 用于视频推荐
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">点赞权重值</label> <label class="control-label">点赞权重值</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[like_weight]" value="{$config['like_weight']}"> 用于视频推荐 <input type="text" name="post[like_weight]" value="{$config['like_weight']}"> 用于视频推荐
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">分享权重值</label> <label class="control-label">分享权重值</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[share_weight]" value="{$config['share_weight']}"> 用于视频推荐 <input type="text" name="post[share_weight]" value="{$config['share_weight']}"> 用于视频推荐
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">初始曝光值</label> <label class="control-label">初始曝光值</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[show_val]" value="{$config['show_val']}" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');"> 请填写整数,用于视频推荐 <input type="text" name="post[show_val]" value="{$config['show_val']}" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');"> 请填写整数,用于视频推荐
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">每小时扣除曝光值</label> <label class="control-label">每小时扣除曝光值</label>
<div class="controls"> <div class="controls">
<input type="text" name="post[hour_minus_val]" value="{$config['hour_minus_val']}" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');"> 请填写整数,用于视频推荐 <input type="text" name="post[hour_minus_val]" value="{$config['hour_minus_val']}" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');"> 请填写整数,用于视频推荐
</div> </div>
</div> --> </div> -->
...@@ -945,8 +947,8 @@ input{ ...@@ -945,8 +947,8 @@ input{
})() })()
</script> </script>
</div> </div>
</div> </div>
<div class="form-actions"> <div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button> <button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
...@@ -955,4 +957,4 @@ input{ ...@@ -955,4 +957,4 @@ input{
</div> </div>
<script src="__PUBLIC__/js/common.js"></script> <script src="__PUBLIC__/js/common.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -7,24 +7,24 @@ class Api_Charge extends PhalApi_Api { ...@@ -7,24 +7,24 @@ class Api_Charge extends PhalApi_Api {
'getAliOrder' => array( 'getAliOrder' => array(
'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'), 'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'),
'changeid' => array('name' => 'changeid', 'type' => 'int', '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' => '充值金额'), 'money' => array('name' => 'money', 'type' => 'string', 'require' => true, 'desc' => '充值金额'),
), ),
'getWxOrder' => array( 'getWxOrder' => array(
'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'), 'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'),
'changeid' => array('name' => 'changeid', 'type' => 'string', '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' => '充值金额'), 'money' => array('name' => 'money', 'type' => 'string', 'require' => true, 'desc' => '充值金额'),
), ),
'getIosOrder' => array( 'getIosOrder' => array(
'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'), 'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'),
'changeid' => array('name' => 'changeid', 'type' => 'string', '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' => '充值金额'), 'money' => array('name' => 'money', 'type' => 'string', 'require' => true, 'desc' => '充值金额'),
), ),
); );
} }
/* 获取订单号 */ /* 获取订单号 */
protected function getOrderid($uid){ protected function getOrderid($uid){
$orderid=$uid.'_'.date('YmdHis').rand(100,999); $orderid=$uid.'_'.date('YmdHis').rand(100,999);
...@@ -35,13 +35,13 @@ class Api_Charge extends PhalApi_Api { ...@@ -35,13 +35,13 @@ class Api_Charge extends PhalApi_Api {
* 微信支付 * 微信支付
* @desc 用于 微信支付 获取订单号 * @desc 用于 微信支付 获取订单号
* @return int code 操作码,0表示成功 * @return int code 操作码,0表示成功
* @return array info * @return array info
* @return string info[0] 支付信息 * @return string info[0] 支付信息
* @return string msg 提示信息 * @return string msg 提示信息
*/ */
public function getWxOrder() { public function getWxOrder() {
$rs = array('code' => 0, 'msg' => '', 'info' => array()); $rs = array('code' => 0, 'msg' => '', 'info' => array());
$uid=$this->uid; $uid=$this->uid;
$changeid=$this->changeid; $changeid=$this->changeid;
$coin=checkNull($this->coin); $coin=checkNull($this->coin);
...@@ -49,24 +49,24 @@ class Api_Charge extends PhalApi_Api { ...@@ -49,24 +49,24 @@ class Api_Charge extends PhalApi_Api {
$orderid=$this->getOrderid($uid); $orderid=$this->getOrderid($uid);
$type=2; $type=2;
if($coin==0){ if($coin==0){
$rs['code']=1002; $rs['code']=1002;
$rs['msg']='信息错误'; $rs['msg']='信息错误';
return $rs; return $rs;
} }
$configpri = getConfigPri(); $configpri = getConfigPri();
$configpub = getConfigPub(); $configpub = getConfigPub();
//配置参数检测 //配置参数检测
if($configpri['wx_appid']== "" || $configpri['wx_mchid']== "" || $configpri['wx_key']== ""){ if($configpri['wx_appid']== "" || $configpri['wx_mchid']== "" || $configpri['wx_key']== ""){
$rs['code'] = 1002; $rs['code'] = 1002;
$rs['msg'] = '微信未配置'; $rs['msg'] = '微信未配置';
return $rs; return $rs;
} }
$orderinfo=array( $orderinfo=array(
"uid"=>$uid, "uid"=>$uid,
"touid"=>$uid, "touid"=>$uid,
...@@ -78,23 +78,23 @@ class Api_Charge extends PhalApi_Api { ...@@ -78,23 +78,23 @@ class Api_Charge extends PhalApi_Api {
"addtime"=>time() "addtime"=>time()
); );
$domain = new Domain_Charge(); $domain = new Domain_Charge();
$info = $domain->getOrderId($changeid,$orderinfo); $info = $domain->getOrderId($changeid,$orderinfo);
if($info==1003){ if($info==1003){
$rs['code']=1003; $rs['code']=1003;
$rs['msg']='订单信息有误,请重新提交'; $rs['msg']='订单信息有误,请重新提交';
return $rs; return $rs;
}else if(!$info){ }else if(!$info){
$rs['code']=1001; $rs['code']=1001;
$rs['msg']='订单生成失败'; $rs['msg']='订单生成失败';
return $rs; return $rs;
} }
$noceStr = md5(rand(100,1000).time());//获取随机字符串 $noceStr = md5(rand(100,1000).time());//获取随机字符串
$time = time(); $time = time();
$paramarr = array( $paramarr = array(
"appid" => $configpri['wx_appid'], "appid" => $configpri['wx_appid'],
"body" => "充值{$coin}虚拟币", "body" => "充值{$coin}虚拟币",
...@@ -102,7 +102,7 @@ class Api_Charge extends PhalApi_Api { ...@@ -102,7 +102,7 @@ class Api_Charge extends PhalApi_Api {
"nonce_str" => $noceStr, "nonce_str" => $noceStr,
"notify_url" => $configpub['site'].'/Appapi/pay/notify_wx', "notify_url" => $configpub['site'].'/Appapi/pay/notify_wx',
"out_trade_no"=> $orderid, "out_trade_no"=> $orderid,
"total_fee" => $money*100, "total_fee" => $money*100,
"trade_type" => "APP" "trade_type" => "APP"
); );
$sign = $this -> sign($paramarr,$configpri['wx_key']);//生成签名 $sign = $this -> sign($paramarr,$configpri['wx_key']);//生成签名
...@@ -112,10 +112,10 @@ class Api_Charge extends PhalApi_Api { ...@@ -112,10 +112,10 @@ class Api_Charge extends PhalApi_Api {
$paramXml .= "<" . $k . ">" . $v . "</" . $k . ">"; $paramXml .= "<" . $k . ">" . $v . "</" . $k . ">";
} }
$paramXml .= "</xml>"; $paramXml .= "</xml>";
$ch = curl_init (); $ch = curl_init ();
@curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 跳过证书检查 @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 跳过证书检查
@curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true); // 从证书中检查SSL加密算法是否存在 @curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true); // 从证书中检查SSL加密算法是否存在
@curl_setopt($ch, CURLOPT_URL, "https://api.mch.weixin.qq.com/pay/unifiedorder"); @curl_setopt($ch, CURLOPT_URL, "https://api.mch.weixin.qq.com/pay/unifiedorder");
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@curl_setopt($ch, CURLOPT_POST, 1); @curl_setopt($ch, CURLOPT_POST, 1);
...@@ -128,11 +128,11 @@ class Api_Charge extends PhalApi_Api { ...@@ -128,11 +128,11 @@ class Api_Charge extends PhalApi_Api {
curl_close($ch); curl_close($ch);
$result2 = $this->xmlToArray($resultXmlStr); $result2 = $this->xmlToArray($resultXmlStr);
if($result2['return_code']=='FAIL'){ if($result2['return_code']=='FAIL'){
$rs['code']=1005; $rs['code']=1005;
$rs['msg']=$result2['return_msg']; $rs['msg']=$result2['return_msg'];
return $rs; return $rs;
} }
$time2 = time(); $time2 = time();
$prepayid = $result2['prepay_id']; $prepayid = $result2['prepay_id'];
...@@ -147,11 +147,11 @@ class Api_Charge extends PhalApi_Api { ...@@ -147,11 +147,11 @@ class Api_Charge extends PhalApi_Api {
"timestamp" => $time2 "timestamp" => $time2
); );
$paramarr2["sign"] = $this -> sign($paramarr2,$configpri['wx_key']);//生成签名 $paramarr2["sign"] = $this -> sign($paramarr2,$configpri['wx_key']);//生成签名
$rs['info'][0]=$paramarr2; $rs['info'][0]=$paramarr2;
return $rs; return $rs;
} }
/** /**
* sign拼装获取 * sign拼装获取
*/ */
...@@ -163,43 +163,43 @@ class Api_Charge extends PhalApi_Api { ...@@ -163,43 +163,43 @@ class Api_Charge extends PhalApi_Api {
$sign .= "key=".$key; $sign .= "key=".$key;
$sign = strtoupper(md5($sign)); $sign = strtoupper(md5($sign));
return $sign; return $sign;
} }
/** /**
* xml转为数组 * xml转为数组
*/ */
protected function xmlToArray($xmlStr){ protected function xmlToArray($xmlStr){
$msg = array(); $msg = array();
$postStr = $xmlStr; $postStr = $xmlStr;
$msg = (array)simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA); $msg = (array)simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
return $msg; return $msg;
} }
/** /**
* 支付宝支付 * 支付宝支付
* @desc 用于支付宝支付 获取订单号 * @desc 用于支付宝支付 获取订单号
* @return int code 操作码,0表示成功 * @return int code 操作码,0表示成功
* @return array info * @return array info
* @return string info[0].orderid 订单号 * @return string info[0].orderid 订单号
* @return string msg 提示信息 * @return string msg 提示信息
*/ */
public function getAliOrder() { public function getAliOrder() {
$rs = array('code' => 0, 'msg' => '', 'info' => array()); $rs = array('code' => 0, 'msg' => '', 'info' => array());
$uid=$this->uid; $uid=$this->uid;
$changeid=$this->changeid; $changeid=$this->changeid;
$coin=checkNull($this->coin); $coin=checkNull($this->coin);
$money=checkNull($this->money); $money=checkNull($this->money);
$orderid=$this->getOrderid($uid); $orderid=$this->getOrderid($uid);
$type=1; $type=1;
if($coin==0){ if($coin==0){
$rs['code']=1002; $rs['code']=1002;
$rs['msg']='信息错误'; $rs['msg']='信息错误';
return $rs; return $rs;
} }
$orderinfo=array( $orderinfo=array(
"uid"=>$uid, "uid"=>$uid,
"touid"=>$uid, "touid"=>$uid,
...@@ -210,7 +210,7 @@ class Api_Charge extends PhalApi_Api { ...@@ -210,7 +210,7 @@ class Api_Charge extends PhalApi_Api {
"status"=>0, "status"=>0,
"addtime"=>time() "addtime"=>time()
); );
$domain = new Domain_Charge(); $domain = new Domain_Charge();
$info = $domain->getOrderId($changeid,$orderinfo); $info = $domain->getOrderId($changeid,$orderinfo);
if($info==1003){ if($info==1003){
...@@ -220,38 +220,38 @@ class Api_Charge extends PhalApi_Api { ...@@ -220,38 +220,38 @@ class Api_Charge extends PhalApi_Api {
$rs['code']=1001; $rs['code']=1001;
$rs['msg']='订单生成失败'; $rs['msg']='订单生成失败';
} }
$rs['info'][0]['orderid']=$orderid; $rs['info'][0]['orderid']=$orderid;
return $rs; return $rs;
} }
/** /**
* 苹果支付 * 苹果支付
* @desc 用于苹果支付 获取订单号 * @desc 用于苹果支付 获取订单号
* @return int code 操作码,0表示成功 * @return int code 操作码,0表示成功
* @return array info * @return array info
* @return string info[0].orderid 订单号 * @return string info[0].orderid 订单号
* @return string msg 提示信息 * @return string msg 提示信息
*/ */
public function getIosOrder() { public function getIosOrder() {
$rs = array('code' => 0, 'msg' => '', 'info' => array()); $rs = array('code' => 0, 'msg' => '', 'info' => array());
$uid=$this->uid; $uid=$this->uid;
$changeid=$this->changeid; $changeid=$this->changeid;
$coin=checkNull($this->coin); $coin=checkNull($this->coin);
$money=checkNull($this->money); $money=checkNull($this->money);
$orderid=$this->getOrderid($uid); $orderid=$this->getOrderid($uid);
$type=3; $type=3;
if($coin==0){ if($coin==0){
$rs['code']=1002; $rs['code']=1002;
$rs['msg']='信息错误'; $rs['msg']='信息错误';
return $rs; return $rs;
} }
$configpri = getConfigPri(); $configpri = getConfigPri();
$orderinfo=array( $orderinfo=array(
"uid"=>$uid, "uid"=>$uid,
"touid"=>$uid, "touid"=>$uid,
...@@ -263,7 +263,7 @@ class Api_Charge extends PhalApi_Api { ...@@ -263,7 +263,7 @@ class Api_Charge extends PhalApi_Api {
"addtime"=>time(), "addtime"=>time(),
"ambient"=>$configpri['ios_sandbox'] "ambient"=>$configpri['ios_sandbox']
); );
$domain = new Domain_Charge(); $domain = new Domain_Charge();
$info = $domain->getOrderId($changeid,$orderinfo); $info = $domain->getOrderId($changeid,$orderinfo);
if($info==1003){ if($info==1003){
...@@ -276,8 +276,8 @@ class Api_Charge extends PhalApi_Api { ...@@ -276,8 +276,8 @@ class Api_Charge extends PhalApi_Api {
$rs['info'][0]['orderid']=$orderid; $rs['info'][0]['orderid']=$orderid;
return $rs; return $rs;
} }
} }
...@@ -153,6 +153,10 @@ class Api_Home extends PhalApi_Api { ...@@ -153,6 +153,10 @@ class Api_Home extends PhalApi_Api {
$info['guide']=$guide_info; $info['guide']=$guide_info;
// 福利袋
$welfare = DI()->notorm->welfare_rate->select('rate')->where('id=1')->fetchOne();
$info['welfare_price'] = $welfare['rate'];
$rs['info'][0] = $info; $rs['info'][0] = $info;
return $rs; return $rs;
......
...@@ -219,18 +219,18 @@ class Api_Live extends PhalApi_Api { ...@@ -219,18 +219,18 @@ class Api_Live extends PhalApi_Api {
return $rs; return $rs;
} }
protected function getbaiming($uid) protected function getbaiming($uid)
{ {
$domain=new Domain_Home(); $domain=new Domain_Home();
$res=$domain->wealth('day'); $res=$domain->star('day');
$i = 0; $i = 99;
foreach ($res as $key => $r){ foreach ($res as $key => $r){
if ($r['uid'] == $uid) { if ($r['uid'] == $uid) {
$i = $key + 1; $i = $key;
break; break;
} }
} }
return $i; return $i + 1;
} }
/** /**
......
...@@ -10,11 +10,11 @@ class Api_Red extends PhalApi_Api { ...@@ -10,11 +10,11 @@ class Api_Red extends PhalApi_Api {
'stream' => array('name' => 'stream', 'type' => 'string', 'require' => true, 'desc' => '流名'), 'stream' => array('name' => 'stream', 'type' => 'string', 'require' => true, 'desc' => '流名'),
'type' => array('name' => 'type', 'type' => 'int', 'require' => true, 'desc' => '红包类型,0普通,1手气'), 'type' => array('name' => 'type', 'type' => 'int', 'require' => true, 'desc' => '红包类型,0普通,1手气'),
'type_grant' => array('name' => 'type_grant', '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' => '数量'), 'nums' => array('name' => 'nums', 'type' => 'int', 'require' => true, 'desc' => '数量'),
'des' => array('name' => 'des', 'type' => 'string', 'default'=>'恭喜发财,大吉大利', 'desc' => '描述'), 'des' => array('name' => 'des', 'type' => 'string', 'default'=>'恭喜发财,大吉大利', 'desc' => '描述'),
), ),
'getRedList' => array( 'getRedList' => array(
'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'), 'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'),
'stream' => array('name' => 'stream', 'type' => 'string', 'require' => true, 'desc' => '流名'), 'stream' => array('name' => 'stream', 'type' => 'string', 'require' => true, 'desc' => '流名'),
...@@ -40,13 +40,13 @@ class Api_Red extends PhalApi_Api { ...@@ -40,13 +40,13 @@ class Api_Red extends PhalApi_Api {
* 发送红包 * 发送红包
* @desc 用于 发送红包 * @desc 用于 发送红包
* @return int code 操作码,0表示成功 * @return int code 操作码,0表示成功
* @return array info * @return array info
* @return string info[0].redid 红包ID * @return string info[0].redid 红包ID
* @return string msg 提示信息 * @return string msg 提示信息
*/ */
public function sendRed() { public function sendRed() {
$rs = array('code' => 0, 'msg' => '发送成功', 'info' => array()); $rs = array('code' => 0, 'msg' => '发送成功', 'info' => array());
$uid=$this->uid; $uid=$this->uid;
$token=checkNull($this->token); $token=checkNull($this->token);
$stream=checkNull($this->stream); $stream=checkNull($this->stream);
...@@ -55,27 +55,27 @@ class Api_Red extends PhalApi_Api { ...@@ -55,27 +55,27 @@ class Api_Red extends PhalApi_Api {
$coin=$this->coin; $coin=$this->coin;
$nums=$this->nums; $nums=$this->nums;
$des=checkNull($this->des); $des=checkNull($this->des);
$checkToken=checkToken($uid,$token); $checkToken=checkToken($uid,$token);
if($checkToken==700){ if($checkToken==700){
$rs['code'] = $checkToken; $rs['code'] = $checkToken;
$rs['msg'] = '您的登陆状态失效,请重新登陆!'; $rs['msg'] = '您的登陆状态失效,请重新登陆!';
return $rs; return $rs;
} }
if((int)$coin==0){ if((int)$coin==0){
$rs['code']=1002; $rs['code']=1002;
$rs['msg']='请输入正确的金额'; $rs['msg']='请输入正确的金额';
return $rs; return $rs;
} }
if((int)$nums==0){ if((int)$nums==0){
$rs['code']=1003; $rs['code']=1003;
$rs['msg']='请输入正确的个数'; $rs['msg']='请输入正确的个数';
return $rs; return $rs;
} }
if($type==0){ if($type==0){
/* 平均 */ /* 平均 */
$avg=$coin ; $avg=$coin ;
...@@ -83,27 +83,27 @@ class Api_Red extends PhalApi_Api { ...@@ -83,27 +83,27 @@ class Api_Red extends PhalApi_Api {
}else{ }else{
if($nums > $coin){ if($nums > $coin){
$rs['code']=1004; $rs['code']=1004;
$rs['msg']='红包数量不能超过红包金额'; $rs['msg']='红包数量不能超过红包金额';
return $rs; return $rs;
} }
} }
if(mb_strlen($des)>20){ if(mb_strlen($des)>20){
$rs['code']=1004; $rs['code']=1004;
$rs['msg']='红包名称最多20个字'; $rs['msg']='红包名称最多20个字';
return $rs; return $rs;
} }
$stream_a=explode("_",$stream); $stream_a=explode("_",$stream);
$liveuid=$stream_a[0]; $liveuid=$stream_a[0];
$showid=$stream_a[1]; $showid=$stream_a[1];
if((int)$liveuid==0 || (int)$showid==0){ if((int)$liveuid==0 || (int)$showid==0){
$rs['code']=1007; $rs['code']=1007;
$rs['msg']='信息错误'; $rs['msg']='信息错误';
return $rs; return $rs;
} }
$nowtime=time(); $nowtime=time();
$addtime=$nowtime; $addtime=$nowtime;
$effecttime=$nowtime; $effecttime=$nowtime;
...@@ -126,16 +126,16 @@ class Api_Red extends PhalApi_Api { ...@@ -126,16 +126,16 @@ class Api_Red extends PhalApi_Api {
); );
$domain = new Domain_Red(); $domain = new Domain_Red();
$result = $domain->sendRed($data); $result = $domain->sendRed($data);
if($result['code']!=0){ if($result['code']!=0){
return $result; return $result;
} }
$redinfo=$result['info']; $redinfo=$result['info'];
$redid=$redinfo['id']; $redid=$redinfo['id'];
$key='red_list_'.$stream; $key='red_list_'.$stream;
DI()->redis->rPush($key,$redid); DI()->redis->rPush($key,$redid);
$key2='red_list_'.$stream.'_'.$redid; $key2='red_list_'.$stream.'_'.$redid;
$red_list=$this->redlist($coin,$nums,$type); $red_list=$this->redlist($coin,$nums,$type);
foreach($red_list as $k=>$v){ foreach($red_list as $k=>$v){
...@@ -143,56 +143,56 @@ class Api_Red extends PhalApi_Api { ...@@ -143,56 +143,56 @@ class Api_Red extends PhalApi_Api {
} }
$rs['info'][0]['redid']=(string)$redid; $rs['info'][0]['redid']=(string)$redid;
return $rs; return $rs;
} }
/** /**
* 获取红包列表 * 获取红包列表
* @desc 用于 获取红包列表 * @desc 用于 获取红包列表
* @return int code 操作码,0表示成功 * @return int code 操作码,0表示成功
* @return array info * @return array info
* @return string info[].id 红包ID * @return string info[].id 红包ID
* @return string info[].uid 发布者ID * @return string info[].uid 发布者ID
* @return string info[].type 红包类型 * @return string info[].type 红包类型
* @return string info[].type_grant 发放类型 * @return string info[].type_grant 发放类型
* @return string info[].second 剩余时间(秒) * @return string info[].second 剩余时间(秒)
* @return string info[].isrob 是否能抢 * @return string info[].isrob 是否能抢
* @return string msg 提示信息 * @return string msg 提示信息
*/ */
public function getRedList() { public function getRedList() {
$rs = array('code' => 0, 'msg' => '', 'info' => array()); $rs = array('code' => 0, 'msg' => '', 'info' => array());
$uid=checkNull($this->uid); $uid=checkNull($this->uid);
$sign=checkNull($this->sign); $sign=checkNull($this->sign);
$stream=checkNull($this->stream); $stream=checkNull($this->stream);
$checkdata=array( $checkdata=array(
'stream'=>$stream 'stream'=>$stream
); );
$issign=checkSign($checkdata,$sign); $issign=checkSign($checkdata,$sign);
if(!$issign){ if(!$issign){
$rs['code']=1001; $rs['code']=1001;
$rs['msg']='签名错误'; $rs['msg']='签名错误';
return $rs; return $rs;
} }
$stream_a=explode("_",$stream); $stream_a=explode("_",$stream);
$liveuid=$stream_a[0]; $liveuid=$stream_a[0];
$showid=$stream_a[1]; $showid=$stream_a[1];
if((int)$liveuid==0 || (int)$showid==0){ if((int)$liveuid==0 || (int)$showid==0){
$rs['code']=1007; $rs['code']=1007;
$rs['msg']='信息错误'; $rs['msg']='信息错误';
return $rs; return $rs;
} }
$domain = new Domain_Red(); $domain = new Domain_Red();
$result = $domain->getRedList($liveuid,$showid); $result = $domain->getRedList($liveuid,$showid);
$nowtime=time(); $nowtime=time();
foreach($result as $k=>$v){ foreach($result as $k=>$v){
$userinfo=getUserInfo($v['uid']); $userinfo=getUserInfo($v['uid']);
$v['user_nicename']=$userinfo['user_nicename']; $v['user_nicename']=$userinfo['user_nicename'];
$v['avatar']=$userinfo['avatar']; $v['avatar']=$userinfo['avatar'];
$v['avatar_thumb']=$userinfo['avatar_thumb']; $v['avatar_thumb']=$userinfo['avatar_thumb'];
...@@ -203,7 +203,7 @@ class Api_Red extends PhalApi_Api { ...@@ -203,7 +203,7 @@ class Api_Red extends PhalApi_Api {
} }
} }
$isrob='0'; $isrob='0';
$key='red_user_winning_'.$stream.'_'.$v['id']; $key='red_user_winning_'.$stream.'_'.$v['id'];
$key2='red_list_'.$stream.'_'.$v['id']; $key2='red_list_'.$stream.'_'.$v['id'];
$ifwin=DI()->redis->zScore($key,$uid); $ifwin=DI()->redis->zScore($key,$uid);
...@@ -215,75 +215,75 @@ class Api_Red extends PhalApi_Api { ...@@ -215,75 +215,75 @@ class Api_Red extends PhalApi_Api {
} }
$v['isrob']=$isrob; $v['isrob']=$isrob;
$result[$k]=$v; $result[$k]=$v;
} }
$rs['info']=$result; $rs['info']=$result;
return $rs; return $rs;
} }
/** /**
* 抢红包 * 抢红包
* @desc 用于 用户抢红包 * @desc 用于 用户抢红包
* @return int code 操作码,0表示成功 * @return int code 操作码,0表示成功
* @return array info * @return array info
* @return string info[0] * @return string info[0]
* @return string info[0].win 抢到的红包金额,0表示没抢到 * @return string info[0].win 抢到的红包金额,0表示没抢到
* @return string info[0].msg 提示信息 * @return string info[0].msg 提示信息
* @return string msg 提示信息 * @return string msg 提示信息
*/ */
public function robRed() { public function robRed() {
$rs = array('code' => 0, 'msg' => '', 'info' => array()); $rs = array('code' => 0, 'msg' => '', 'info' => array());
$uid=checkNull($this->uid); $uid=checkNull($this->uid);
$token=checkNull($this->token); $token=checkNull($this->token);
$stream=checkNull($this->stream); $stream=checkNull($this->stream);
$redid=checkNull($this->redid); $redid=checkNull($this->redid);
$sign=checkNull($this->sign); $sign=checkNull($this->sign);
$checkToken=checkToken($uid,$token); $checkToken=checkToken($uid,$token);
if($checkToken==700){ if($checkToken==700){
$rs['code'] = $checkToken; $rs['code'] = $checkToken;
$rs['msg'] = '您的登陆状态失效,请重新登陆!'; $rs['msg'] = '您的登陆状态失效,请重新登陆!';
return $rs; return $rs;
} }
$checkdata=array( $checkdata=array(
'uid'=>$uid, 'uid'=>$uid,
'redid'=>$redid, 'redid'=>$redid,
'stream'=>$stream, 'stream'=>$stream,
); );
$issign=checkSign($checkdata,$sign); $issign=checkSign($checkdata,$sign);
if(!$issign){ if(!$issign){
$rs['code']=1001; $rs['code']=1001;
$rs['msg']='签名错误'; $rs['msg']='签名错误';
return $rs; return $rs;
} }
$nowtime=time(); $nowtime=time();
$key='red_user_winning_'.$stream.'_'.$redid; $key='red_user_winning_'.$stream.'_'.$redid;
$key2='red_list_'.$stream.'_'.$redid; $key2='red_list_'.$stream.'_'.$redid;
$result=array( $result=array(
'win'=>'0', 'win'=>'0',
'msg'=>'手慢了,红包派完了', 'msg'=>'手慢了,红包派完了',
); );
$ifwin=DI()->redis->zScore($key,$uid); $ifwin=DI()->redis->zScore($key,$uid);
if($ifwin==false){ if($ifwin==false){
$ifexist=DI()->redis->exists($key2); $ifexist=DI()->redis->exists($key2);
if($ifexist){ if($ifexist){
$coin=DI()->redis->lPop($key2); $coin=DI()->redis->lPop($key2);
if($coin>0){ if($coin>0){
$stream_a=explode("_",$stream); $stream_a=explode("_",$stream);
$liveuid=$stream_a[0]; $liveuid=$stream_a[0];
$showid=$stream_a[1]; $showid=$stream_a[1];
$data=array( $data=array(
'uid'=>$uid, 'uid'=>$uid,
'redid'=>$redid, 'redid'=>$redid,
...@@ -291,39 +291,39 @@ class Api_Red extends PhalApi_Api { ...@@ -291,39 +291,39 @@ class Api_Red extends PhalApi_Api {
'showid'=>$showid, 'showid'=>$showid,
'addtime'=>$nowtime, 'addtime'=>$nowtime,
); );
$domain = new Domain_Red(); $domain = new Domain_Red();
$result2 = $domain->robRed($data); $result2 = $domain->robRed($data);
$score=$coin; $score=$coin;
DI()->redis->zAdd($key,$score,$uid); DI()->redis->zAdd($key,$score,$uid);
$result['win']=(string)$coin; $result['win']=(string)$coin;
//$result['msg']=''; //$result['msg']='';
} }
} }
}else{ }else{
$ifwin_a=explode(".",$ifwin); $ifwin_a=explode(".",$ifwin);
$time=$ifwin_a[0]; $time=$ifwin_a[0];
$coin=$ifwin_a[1]; $coin=$ifwin_a[1];
$coin=substr($coin,0,-1); $coin=substr($coin,0,-1);
$result['win']=(string)$coin; $result['win']=(string)$coin;
//$result['msg']=''; //$result['msg']='';
} }
$rs['info'][0]=$result; $rs['info'][0]=$result;
return $rs; return $rs;
} }
/** /**
* 红包领取列表 * 红包领取列表
* @desc 用于 获取红包领取列表 * @desc 用于 获取红包领取列表
* @return int code 操作码,0表示成功 * @return int code 操作码,0表示成功
* @return array info * @return array info
* @return object info[0].redinfo 红包信息 * @return object info[0].redinfo 红包信息
* @return string info[0].redinfo.coin 总金额 * @return string info[0].redinfo.coin 总金额
* @return string info[0].redinfo.nums 总数量 * @return string info[0].redinfo.nums 总数量
...@@ -335,42 +335,42 @@ class Api_Red extends PhalApi_Api { ...@@ -335,42 +335,42 @@ class Api_Red extends PhalApi_Api {
*/ */
public function getRedRobList() { public function getRedRobList() {
$rs = array('code' => 0, 'msg' => '', 'info' => array()); $rs = array('code' => 0, 'msg' => '', 'info' => array());
$uid=checkNull($this->uid); $uid=checkNull($this->uid);
$sign=checkNull($this->sign); $sign=checkNull($this->sign);
$stream=checkNull($this->stream); $stream=checkNull($this->stream);
$redid=checkNull($this->redid); $redid=checkNull($this->redid);
$checkdata=array( $checkdata=array(
'redid'=>$redid, 'redid'=>$redid,
'stream'=>$stream, 'stream'=>$stream,
); );
$issign=checkSign($checkdata,$sign); $issign=checkSign($checkdata,$sign);
if(!$issign){ if(!$issign){
$rs['code']=1001; $rs['code']=1001;
$rs['msg']='签名错误'; $rs['msg']='签名错误';
return $rs; return $rs;
} }
$stream_a=explode("_",$stream); $stream_a=explode("_",$stream);
$liveuid=$stream_a[0]; $liveuid=$stream_a[0];
$showid=$stream_a[1]; $showid=$stream_a[1];
$domain = new Domain_Red(); $domain = new Domain_Red();
$redinfo = $domain->getRedInfo($redid); $redinfo = $domain->getRedInfo($redid);
if(!$redinfo){ if(!$redinfo){
$rs['code']=1002; $rs['code']=1002;
$rs['msg']='红包不存在'; $rs['msg']='红包不存在';
return $rs; return $rs;
} }
$senduserinfo=getUserInfo($redinfo['uid']); $senduserinfo=getUserInfo($redinfo['uid']);
$redinfo['user_nicename']=$senduserinfo['user_nicename']; $redinfo['user_nicename']=$senduserinfo['user_nicename'];
$redinfo['avatar']=$senduserinfo['avatar']; $redinfo['avatar']=$senduserinfo['avatar'];
$redinfo['avatar_thumb']=$senduserinfo['avatar_thumb']; $redinfo['avatar_thumb']=$senduserinfo['avatar_thumb'];
$list=array(); $list=array();
$win=0; $win=0;
...@@ -380,11 +380,11 @@ class Api_Red extends PhalApi_Api { ...@@ -380,11 +380,11 @@ class Api_Red extends PhalApi_Api {
$coin=$v['coin']; $coin=$v['coin'];
if($v['uid']==$uid){ if($v['uid']==$uid){
$win=$coin; $win=$coin;
} }
$data=array( $data=array(
'uid'=>$userinfo['id'], 'uid'=>$userinfo['id'],
'user_nicename'=>$userinfo['user_nicename'], 'user_nicename'=>$userinfo['user_nicename'],
...@@ -393,17 +393,17 @@ class Api_Red extends PhalApi_Api { ...@@ -393,17 +393,17 @@ class Api_Red extends PhalApi_Api {
'time'=>date('H:i:s',$v['addtime']), 'time'=>date('H:i:s',$v['addtime']),
); );
$list[]=$data; $list[]=$data;
} }
$rs['info'][0]['redinfo']=$redinfo; $rs['info'][0]['redinfo']=$redinfo;
$rs['info'][0]['list']=$list; $rs['info'][0]['list']=$list;
$rs['info'][0]['win']=(string)$win; $rs['info'][0]['win']=(string)$win;
return $rs; return $rs;
} }
/** /**
* 分配红包个数 * 分配红包个数
* @param int $total * @param int $total
...@@ -416,7 +416,7 @@ class Api_Red extends PhalApi_Api { ...@@ -416,7 +416,7 @@ class Api_Red extends PhalApi_Api {
/* 平均红包 */ /* 平均红包 */
$list=$this->red_average($total,$nums); $list=$this->red_average($total,$nums);
} }
return $list; return $list;
} }
......
...@@ -940,15 +940,9 @@ class Api_User extends PhalApi_Api { ...@@ -940,15 +940,9 @@ class Api_User extends PhalApi_Api {
return $rs; return $rs;
} }
if(!$accountid){ if($cashvote <= 0){
$rs['code'] = 1001;
$rs['msg'] = '请选择提现账号';
return $rs;
}
if(!$cashvote){
$rs['code'] = 1002; $rs['code'] = 1002;
$rs['msg'] = '请输入有效的提现票数'; $rs['msg'] = '请输入有效的提现金额';
return $rs; return $rs;
} }
......
...@@ -308,7 +308,7 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -308,7 +308,7 @@ class Model_Live extends PhalApi_Model_NotORM {
if($islive['type']==1){ if($islive['type']==1){
$rs['type_msg']=md5($islive['type_val']); $rs['type_msg']=md5($islive['type_val']);
}else if($islive['type']==2){ }else if($islive['type']==2){
$rs['type_msg']='本房间为收费房间,需支付'.$islive['type_val'].'萌豆'; $rs['type_msg']='本房间为收费房间,需支付'.$islive['type_val'].'钻石';
$rs['type_val']=$islive['type_val']; $rs['type_val']=$islive['type_val'];
$isexist=DI()->notorm->users_coinrecord $isexist=DI()->notorm->users_coinrecord
->select('id') ->select('id')
...@@ -321,7 +321,7 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -321,7 +321,7 @@ class Model_Live extends PhalApi_Model_NotORM {
} }
}else if($islive['type']==3){ }else if($islive['type']==3){
$rs['type_val']=$islive['type_val']; $rs['type_val']=$islive['type_val'];
$rs['type_msg']='本房间为计时房间,每分钟需支付'.$islive['type_val'].'萌豆'; $rs['type_msg']='本房间为计时房间,每分钟需支付'.$islive['type_val'].'钻石';
} }
return $rs; return $rs;
...@@ -524,8 +524,8 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -524,8 +524,8 @@ class Model_Live extends PhalApi_Model_NotORM {
} }
$welfare = DI()->notorm->welfare_rate->select('rate')->where('id=1')->fetchOne(); $welfare = DI()->notorm->welfare_rate->select('rate')->where('id=1')->fetchOne();
$giftinfo = [ $giftinfo = [
'type' => 0, 'type' => 1,
'mark' => 0, 'mark' => 4,
'giftname' => '福利袋', 'giftname' => '福利袋',
'gifticon' => 'http://qiniu.huad.leacho.cn/20190723/5d367483cb9ac.png', 'gifticon' => 'http://qiniu.huad.leacho.cn/20190723/5d367483cb9ac.png',
'needcoin' => $welfare['rate'], 'needcoin' => $welfare['rate'],
...@@ -864,6 +864,27 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -864,6 +864,27 @@ class Model_Live extends PhalApi_Model_NotORM {
"addtime"=>$addtime "addtime"=>$addtime
); );
DI()->notorm->users_coinrecord->insert($insert); 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; break;
} }
} }
......
...@@ -157,12 +157,10 @@ class Model_User extends PhalApi_Model_NotORM ...@@ -157,12 +157,10 @@ class Model_User extends PhalApi_Model_NotORM
/* 提现 */ /* 提现 */
public function setCash($data) public function setCash($data)
{ {
$nowtime = time(); $nowtime = time();
$uid = $data['uid']; $uid = $data['uid'];
$accountid = $data['accountid']; $accountid = $data['accountid'];
$cashvote = $data['cashvote']; $money = $data['cashvote'];
$config = getConfigPri(); $config = getConfigPri();
$cash_start = $config['cash_start']; $cash_start = $config['cash_start'];
...@@ -195,7 +193,7 @@ class Model_User extends PhalApi_Model_NotORM ...@@ -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) { if (!$accountinfo) {
return 1007; return 1007;
} }
...@@ -206,7 +204,7 @@ class Model_User extends PhalApi_Model_NotORM ...@@ -206,7 +204,7 @@ class Model_User extends PhalApi_Model_NotORM
$cash_min = $config['cash_min']; $cash_min = $config['cash_min'];
//提现钱数 //提现钱数
$money = floor($cashvote / $cash_rate); // $money = floor($cashvote / $cash_rate);
if ($money < $cash_min) { if ($money < $cash_min) {
return 1004; return 1004;
...@@ -221,16 +219,16 @@ class Model_User extends PhalApi_Model_NotORM ...@@ -221,16 +219,16 @@ class Model_User extends PhalApi_Model_NotORM
$name = $account = $account_bank = ''; $name = $account = $account_bank = '';
if ($accountid == 1) { if ($accountid == 0) {
$account = $accountinfo['account']; $account = $accountinfo['account'];
$name = $accountinfo['username']; $name = $accountinfo['username'];
} }
//
// if ($accountid == 2) {
// return 1007;
// }
if ($accountid == 2) { if ($accountid == 1) {
return 1007;
}
if ($accountid == 3) {
$name = $accountinfo['name']; $name = $accountinfo['name'];
$account = $accountinfo['bank_card']; $account = $accountinfo['bank_card'];
$account_bank = $accountinfo['bank_province'] . $accountinfo['bank_city']; $account_bank = $accountinfo['bank_province'] . $accountinfo['bank_city'];
......
...@@ -7,9 +7,9 @@ namespace Admin\Controller; ...@@ -7,9 +7,9 @@ namespace Admin\Controller;
use Common\Controller\AdminbaseController; use Common\Controller\AdminbaseController;
class CashController extends AdminbaseController { class CashController extends AdminbaseController {
var $type=array( var $type=array(
'1'=>'支付宝', '0'=>'支付宝',
'2'=>'微信', '2'=>'微信',
'3'=>'银行卡', '1'=>'银行卡',
); );
function index(){ function index(){
...@@ -22,24 +22,24 @@ class CashController extends AdminbaseController { ...@@ -22,24 +22,24 @@ class CashController extends AdminbaseController {
$map['addtime']=array("gt",strtotime($_REQUEST['start_time'])); $map['addtime']=array("gt",strtotime($_REQUEST['start_time']));
$_GET['start_time']=$_REQUEST['start_time']; $_GET['start_time']=$_REQUEST['start_time'];
} }
if($_REQUEST['end_time']!=''){ if($_REQUEST['end_time']!=''){
$map['addtime']=array("lt",strtotime($_REQUEST['end_time'])); $map['addtime']=array("lt",strtotime($_REQUEST['end_time']));
$_GET['end_time']=$_REQUEST['end_time']; $_GET['end_time']=$_REQUEST['end_time'];
} }
if($_REQUEST['start_time']!='' && $_REQUEST['end_time']!='' ){ if($_REQUEST['start_time']!='' && $_REQUEST['end_time']!='' ){
$map['addtime']=array("between",array(strtotime($_REQUEST['start_time']),strtotime($_REQUEST['end_time']))); $map['addtime']=array("between",array(strtotime($_REQUEST['start_time']),strtotime($_REQUEST['end_time'])));
$_GET['start_time']=$_REQUEST['start_time']; $_GET['start_time']=$_REQUEST['start_time'];
$_GET['end_time']=$_REQUEST['end_time']; $_GET['end_time']=$_REQUEST['end_time'];
} }
if($_REQUEST['keyword']!=''){ if($_REQUEST['keyword']!=''){
$map['uid|orderno|trade_no']=array("like","%".$_REQUEST['keyword']."%"); $map['uid|orderno|trade_no']=array("like","%".$_REQUEST['keyword']."%");
$_GET['keyword']=$_REQUEST['keyword']; $_GET['keyword']=$_REQUEST['keyword'];
} }
$cashrecord=M("users_cashrecord"); $cashrecord=M("users_cashrecord");
$count=$cashrecord->where($map)->count(); $count=$cashrecord->where($map)->count();
$page = $this->page($count, 20); $page = $this->page($count, 20);
...@@ -50,17 +50,17 @@ class CashController extends AdminbaseController { ...@@ -50,17 +50,17 @@ class CashController extends AdminbaseController {
->select(); ->select();
foreach($lists as $k=>$v){ foreach($lists as $k=>$v){
$userinfo=M("users")->field("user_nicename")->where("id='$v[uid]'")->find(); $userinfo=M("users")->field("user_nicename")->where("id='$v[uid]'")->find();
$lists[$k]['userinfo']= $userinfo; $lists[$k]['userinfo']= $userinfo;
} }
$cashrecord_total = $cashrecord->where($map)->sum("money"); $cashrecord_total = $cashrecord->where($map)->sum("money");
if($_REQUEST['status']=='') if($_REQUEST['status']=='')
{ {
$success=$map; $success=$map;
$success['status']=1; $success['status']=1;
$fail=$map; $fail=$map;
$fail['status']=0; $fail['status']=0;
$cashrecord_success = $cashrecord->where($success)->sum("money"); $cashrecord_success = $cashrecord->where($success)->sum("money");
$cashrecord_fail = $cashrecord->where($fail)->sum("money"); $cashrecord_fail = $cashrecord->where($fail)->sum("money");
$cash['success']=$cashrecord_success; $cash['success']=$cashrecord_success;
$cash['fail']=$cashrecord_fail; $cash['fail']=$cashrecord_fail;
$cash['type']=0; $cash['type']=0;
...@@ -71,52 +71,52 @@ class CashController extends AdminbaseController { ...@@ -71,52 +71,52 @@ class CashController extends AdminbaseController {
$this->assign('formget', $_GET); $this->assign('formget', $_GET);
$this->assign('type', $this->type); $this->assign('type', $this->type);
$this->assign("page", $page->show('Admin')); $this->assign("page", $page->show('Admin'));
$this->display(); $this->display();
} }
function del(){ function del(){
$id=intval($_GET['id']); $id=intval($_GET['id']);
if($id){ if($id){
$result=M("users_cashrecord")->delete($id); $result=M("users_cashrecord")->delete($id);
if($result){ if($result){
$action="删除提现记录:{$id}"; $action="删除提现记录:{$id}";
setAdminLog($action); setAdminLog($action);
$this->success('删除成功'); $this->success('删除成功');
}else{ }else{
$this->error('删除失败'); $this->error('删除失败');
} }
}else{ }else{
$this->error('数据传入失败!'); $this->error('数据传入失败!');
} }
$this->display(); $this->display();
} }
function edit(){ function edit(){
$id=intval($_GET['id']); $id=intval($_GET['id']);
if($id){ if($id){
$cash=M("users_cashrecord")->find($id); $cash=M("users_cashrecord")->find($id);
$cash['userinfo']=M("users")->field("user_nicename")->where("id='$cash[uid]'")->find(); $cash['userinfo']=M("users")->field("user_nicename")->where("id='$cash[uid]'")->find();
$cash['auth']=M("users_auth")->field("*")->where("uid='$cash[uid]'")->find(); $cash['auth']=M("users_auth")->field("*")->where("uid='$cash[uid]'")->find();
$this->assign('cash', $cash); $this->assign('cash', $cash);
$this->assign('type', $this->type); $this->assign('type', $this->type);
}else{ }else{
$this->error('数据传入失败!'); $this->error('数据传入失败!');
} }
$this->display(); $this->display();
} }
function edit_post(){ function edit_post(){
if(IS_POST){ if(IS_POST){
if($_POST['status']=='0'){ if($_POST['status']=='0'){
$this->error('未修改订单状态'); $this->error('未修改订单状态');
} }
$cash=M("users_cashrecord"); $cash=M("users_cashrecord");
$cash->create(); $cash->create();
$cash->uptime=time(); $cash->uptime=time();
$result=$cash->save(); $result=$cash->save();
if($result){ if($result){
if($_POST['status']=='2'){ if($_POST['status']=='2'){
M("users")->where("id='".$_POST['uid']."'")->setInc("votes",$_POST['votes']); M("users")->where("id='".$_POST['uid']."'")->setInc("votes",$_POST['votes']);
...@@ -131,7 +131,7 @@ class CashController extends AdminbaseController { ...@@ -131,7 +131,7 @@ class CashController extends AdminbaseController {
}else{ }else{
$this->error('修改失败'); $this->error('修改失败');
} }
} }
} }
function export() function export()
{ {
...@@ -140,15 +140,15 @@ class CashController extends AdminbaseController { ...@@ -140,15 +140,15 @@ class CashController extends AdminbaseController {
} }
if($_REQUEST['start_time']!=''){ if($_REQUEST['start_time']!=''){
$map['addtime']=array("gt",strtotime($_REQUEST['start_time'])); $map['addtime']=array("gt",strtotime($_REQUEST['start_time']));
} }
if($_REQUEST['end_time']!=''){ if($_REQUEST['end_time']!=''){
$map['addtime']=array("lt",strtotime($_REQUEST['end_time'])); $map['addtime']=array("lt",strtotime($_REQUEST['end_time']));
} }
if($_REQUEST['start_time']!='' && $_REQUEST['end_time']!='' ){ if($_REQUEST['start_time']!='' && $_REQUEST['end_time']!='' ){
$map['addtime']=array("between",array(strtotime($_REQUEST['start_time']),strtotime($_REQUEST['end_time']))); $map['addtime']=array("between",array(strtotime($_REQUEST['start_time']),strtotime($_REQUEST['end_time'])));
} }
if($_REQUEST['keyword']!=''){ if($_REQUEST['keyword']!=''){
$map['uid|orderno|trade_no']=array("like","%".$_REQUEST['keyword']."%"); $map['uid|orderno|trade_no']=array("like","%".$_REQUEST['keyword']."%");
} }
$xlsName = "Excel"; $xlsName = "Excel";
$cashrecord=M("users_cashrecord"); $cashrecord=M("users_cashrecord");
...@@ -157,9 +157,9 @@ class CashController extends AdminbaseController { ...@@ -157,9 +157,9 @@ class CashController extends AdminbaseController {
{ {
$userinfo=M("users")->field("user_nicename")->where("id='$v[uid]'")->find(); $userinfo=M("users")->field("user_nicename")->where("id='$v[uid]'")->find();
$xlsData[$k]['user_nicename']= $userinfo['user_nicename']."(".$v['uid'].")"; $xlsData[$k]['user_nicename']= $userinfo['user_nicename']."(".$v['uid'].")";
$xlsData[$k]['addtime']=date("Y-m-d H:i:s",$v['addtime']); $xlsData[$k]['addtime']=date("Y-m-d H:i:s",$v['addtime']);
$xlsData[$k]['uptime']=date("Y-m-d H:i:s",$v['uptime']); $xlsData[$k]['uptime']=date("Y-m-d H:i:s",$v['uptime']);
if($v['status']=='0'){ $xlsData[$k]['status']="处理中";}else if($v['status']=='2'){$xlsData[$k]['status']="提现失败";}else{ $xlsData[$k]['status']="提现完成";} if($v['status']=='0'){ $xlsData[$k]['status']="处理中";}else if($v['status']=='2'){$xlsData[$k]['status']="提现失败";}else{ $xlsData[$k]['status']="提现完成";}
} }
$action="导出提现记录:".M("users_cashrecord")->getLastSql(); $action="导出提现记录:".M("users_cashrecord")->getLastSql();
setAdminLog($action); setAdminLog($action);
...@@ -176,5 +176,5 @@ class CashController extends AdminbaseController { ...@@ -176,5 +176,5 @@ class CashController extends AdminbaseController {
); );
exportExcel($xlsName,$xlsCell,$xlsData,$cellName); exportExcel($xlsName,$xlsCell,$xlsData,$cellName);
} }
} }
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
}, 'json'); }, 'json');
}, },
add: function (id) { add: function (id) {
layer.msg("申请错误!");
$.ajax({ $.ajax({
url: '/index.php?g=Appapi&m=Family&a=member_add', url: '/index.php?g=Appapi&m=Family&a=member_add',
dataType: "json", 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