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