dever 6 年之前
父節點
當前提交
9f65df8f59
共有 2 個文件被更改,包括 10 次插入1 次删除
  1. 1 0
      code/database/info.php
  2. 9 1
      main/src/Journal.php

+ 1 - 0
code/database/info.php

@@ -6,6 +6,7 @@ $type = array
 	1 => '未领取',
 	2 => '已领取',
 	3 => '已使用',
+	4 => '已作废',
 );
 
 $product = Dever::load('journal/api.data');

+ 9 - 1
main/src/Journal.php

@@ -255,7 +255,7 @@ class Journal extends Core
 
             $subscribeInfo = Dever::load('act/lib/subscribe')->getInfo($info['id'], $uid, 4);
             if (isset($subscribeInfo['source']) && $subscribeInfo['source'] == 2) {
-                $this->setButton('code', 1, '兑换码阅读');
+                //$this->setButton('code', 1, '兑换码阅读');
             }
 
             if (checkVersion()->journal_buy == 2) {
@@ -735,6 +735,10 @@ class Journal extends Core
                 Dever::alert('兑换码已被使用');
             }
 
+            if ($info['type'] == 4) {
+                Dever::alert('兑换码已作废');
+            }
+
             if ($info['type'] == 2 && $this->data['uid'] != $info['uid']) {
                 //Dever::alert('兑换码已被领取');
             }
@@ -789,6 +793,10 @@ class Journal extends Core
                 Dever::alert('兑换码已被使用');
             }
 
+            if ($info['type'] == 4) {
+                Dever::alert('兑换码已作废');
+            }
+
             if ($info['type'] == 2 && $this->data['uid'] != $info['uid']) {
                 //Dever::alert('兑换码已被领取');
             }