游戏--添加支付方式渠道配置

master
zhanglingsheng 5 years ago
parent 6d34f317a1
commit 669baefe5e

@ -299,7 +299,7 @@ class GameController extends ThinkController
exit; exit;
} }
if (!preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) { if (!preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
return $this->error("请填写正确的Bata链接"); // return $this->error("请填写正确的Bata链接");
} }
/*if($_POST['apply_status']==0&&$_POST['game_status']==1){ /*if($_POST['apply_status']==0&&$_POST['game_status']==1){
$this->error('游戏未审核不允许显示');//游戏添加完成 $this->error('游戏未审核不允许显示');//游戏添加完成
@ -316,6 +316,7 @@ class GameController extends ThinkController
$game = D(self::model_name);//M('$this->$model_name','tab_'); $game = D(self::model_name);//M('$this->$model_name','tab_');
$_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount']; $_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount'];
$_POST['detail_content'] = $content; $_POST['detail_content'] = $content;
$_POST['pay_config'] = json_encode($_POST['pay_config']);
$res = $game->update(); $res = $game->update();
$id = $res["id"]; $id = $res["id"];
$sibling = D("Game")->find($id); $sibling = D("Game")->find($id);
@ -371,6 +372,7 @@ class GameController extends ThinkController
} else { } else {
$id || $this->error('id不能为空'); $id || $this->error('id不能为空');
$data = D(self::model_name)->detailback($id); $data = D(self::model_name)->detailback($id);
$data['pay_config'] = json_decode($data['pay_config'],true);
$data || $this->error('数据不存在!'); $data || $this->error('数据不存在!');
if (!empty($data['and_dow_address'])) { if (!empty($data['and_dow_address'])) {
$data['and_dow_address'] = ltrim($data['and_dow_address'], '.'); $data['and_dow_address'] = ltrim($data['and_dow_address'], '.');

@ -490,6 +490,39 @@
<!-- <span class="notice-text" style="line-height:1.4;width:68%;">ios版游戏内的支付方式二选一默认是第三方支付。上架版选择第三方支付则为wap支付选择苹果内购则为苹果内购非上架版选择第三方支付则为wap支付选择苹果内购则为app支付。金猪支付下支付宝始终是app支付订单充值方式记录为支付宝其它皆为wap支付订单充值方式记录为金猪支付</span> --> <!-- <span class="notice-text" style="line-height:1.4;width:68%;">ios版游戏内的支付方式二选一默认是第三方支付。上架版选择第三方支付则为wap支付选择苹果内购则为苹果内购非上架版选择第三方支付则为wap支付选择苹果内购则为app支付。金猪支付下支付宝始终是app支付订单充值方式记录为支付宝其它皆为wap支付订单充值方式记录为金猪支付</span> -->
</td> </td>
</tr> </tr>
<tr>
<td class="l noticeinfo">支付宝</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[zfb]">
<option value="gf" >官方</option>
<option value="sq" >双乾</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">微信</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[wx]">
<option value="gf" selected="selected">官方</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">快捷支付</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[quick]">
<option value="sq" selected="selected">双乾</option>
</select>
</span>
</td>
</tr>
<tr> <tr>
<td class="l noticeinfo">是否开启强更</td> <td class="l noticeinfo">是否开启强更</td>
<td class="r table_radio table_radio2"> <td class="r table_radio table_radio2">

@ -663,6 +663,39 @@
<!-- <span class="notice-text" style="line-height:1.4;width:68%;">ios版游戏内的支付方式二选一默认是第三方支付。上架版选择第三方支付则为wap支付选择苹果内购则为苹果内购非上架版选择第三方支付则为wap支付选择苹果内购则为app支付。金猪支付下支付宝始终是app支付订单充值方式记录为支付宝其它皆为wap支付订单充值方式记录为金猪支付</span> --> <!-- <span class="notice-text" style="line-height:1.4;width:68%;">ios版游戏内的支付方式二选一默认是第三方支付。上架版选择第三方支付则为wap支付选择苹果内购则为苹果内购非上架版选择第三方支付则为wap支付选择苹果内购则为app支付。金猪支付下支付宝始终是app支付订单充值方式记录为支付宝其它皆为wap支付订单充值方式记录为金猪支付</span> -->
</td> </td>
</tr> </tr>
<tr>
<td class="l noticeinfo">支付宝</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[zfb]">
<option value="gf" <?php echo $data['pay_config']['zfb'] == 'gf' ? "selected" : ''; ?>>官方</option>
<option value="sq" <?php echo $data['pay_config']['zfb'] == 'sq' ? "selected" : ''; ?>>双乾</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">微信</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[wx]">
<option value="gf" selected="selected">官方</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">快捷支付</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[quick]">
<option value="sq" selected="selected">双乾</option>
</select>
</span>
</td>
</tr>
<tr> <tr>
<td class="l noticeinfo">是否开启强更</td> <td class="l noticeinfo">是否开启强更</td>
<td class="r table_radio table_radio2"> <td class="r table_radio table_radio2">

@ -912,3 +912,7 @@ ALTER TABLE `tab_game`
ADD COLUMN `beta_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Beta版状态'; ADD COLUMN `beta_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Beta版状态';
ALTER TABLE `tab_game` ALTER TABLE `tab_game`
ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接'; ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接';
-- 游戏支付方式渠道配置
ALTER TABLE `tab_game`
ADD COLUMN `pay_config` varchar(255) DEFAULT NULL COMMENT '支付渠道 wx 微信 zfb 支付宝 quick 快捷 (gf 官方 sq 双乾';
Loading…
Cancel
Save