diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php
index 6e358417b..37f290871 100644
--- a/Application/Admin/Controller/PromoteGameRatioController.class.php
+++ b/Application/Admin/Controller/PromoteGameRatioController.class.php
@@ -20,18 +20,15 @@ class PromoteGameRatioController extends ThinkController
public function lists()
{
$params = I('get.');
- $promoteAccount = $params['promote_account'] ?? '';
+ $promoteId = $params['promote_id'] ?? 0;
$gameId = $params['game_id'] ?? 0;
$status = $params['status'] ?? '';
$page = $params['p'] ? intval($params['p']) : 1;
$row = $params['row'] ? intval($params['row']) : 10;
$map['_string'] = '1 = 1';
- if ($promoteAccount) {
- $promoteMap['account'] = trim($promoteAccount);
- $promoteId = M('promote', 'tab_')->where($promoteMap)->getField('id');
- $promoteId = $promoteId ?? 0;
- $map['promote_id'] = $promoteId;
+ if ($promoteId) {
+ $map['promote_id'] = intval($promoteId);
}
if ($gameId) {
$map['game_id'] = intval($gameId);
@@ -73,11 +70,10 @@ class PromoteGameRatioController extends ThinkController
$thisReviewer = $promoteGameRatio['reviewer_id'] ? getPromoteAccount($promoteGameRatio['reviewer_id']) : '待确认';
if ($promoteGameRatio['ratio'] > 0) {
$thisBeninTime = date('Y/m/d', $promoteGameRatio['begin_time']);
- $thisEndTime = date('Y/m/d', $promoteGameRatio['end_time']);
} else {
$thisBeninTime = date('Y/m/d', $this->getPromoteApplyCreateTime($thisPromoteId, $thisGameId));
- $thisEndTime = '永久';
}
+ $thisEndTime = $promoteGameRatio['end_time'] ? date('Y/m/d', $promoteGameRatio['end_time']) : '永久';
$validDate = $thisBeninTime . ' - ' . $thisEndTime;
if ($issetPromote) {
$thisPromoteAccount = $promotes[$thisPromoteId]['account'];
@@ -117,10 +113,36 @@ class PromoteGameRatioController extends ThinkController
$this->assign('count', $count);
$this->assign('gameList', getAllGameList());
$this->assign('promoteList', getPromoteByLevel(1));
+ $this->assign('statusList', self::$statusList);
$this->meta_title = '公会分成管理';
$this->display();
}
+ public function applyRatio()
+ {
+ if ($_POST) {
+
+ } else {
+ $params = I('get.');
+ $id = $params['id'] ?? 0;
+ $id = intval($id);
+ if ($id) {
+ $field = 'promote_id, game_id, ratio, begin_time, end_time, remark';
+ $map['id'] = $id;
+ $promoteGameRatio = D(self::MODEL_NAME)->field($field)->where($map)->find();
+ if (empty($promoteGameRatio)) {
+ $this->error('数据异常');
+ }
+ $this->assign('record', $promoteGameRatio);
+ }
+
+ $this->assign('gameList', getAllGameList());
+ $this->assign('promoteList', getPromoteByLevel(1));
+ $this->meta_title = '游戏分成比例申请';
+ $this->display();
+ }
+ }
+
private function getPromoteApplyCreateTime($promoteId, $gameId)
{
$map['promote_id'] = $promoteId;
diff --git a/Application/Admin/View/PromoteGameRatio/applyRatio.html b/Application/Admin/View/PromoteGameRatio/applyRatio.html
new file mode 100644
index 000000000..776077526
--- /dev/null
+++ b/Application/Admin/View/PromoteGameRatio/applyRatio.html
@@ -0,0 +1,171 @@
+{$meta_title}
+
+