|
@@ -260,25 +260,27 @@ class Journal_v1 extends Core
|
|
|
}
|
|
|
|
|
|
# 会员随便看
|
|
|
- $this->data['info']['vip'] = 2;
|
|
|
- $vip = Dever::load('vip/lib/member')->get($uid, $info['cate_id']);
|
|
|
- if ($vip > 0) {
|
|
|
- $this->data['info']['subscribe'] = 1;
|
|
|
- $this->data['info']['vip'] = 1;
|
|
|
- $this->setButton('read', 1);
|
|
|
- }
|
|
|
+ if ($uid > 0) {
|
|
|
+ $this->data['info']['vip'] = 2;
|
|
|
+ $vip = Dever::load('vip/lib/member')->get($uid, $info['cate_id']);
|
|
|
+ if ($vip > 0) {
|
|
|
+ $this->data['info']['subscribe'] = 1;
|
|
|
+ $this->data['info']['vip'] = 1;
|
|
|
+ $this->setButton('read', 1);
|
|
|
+ }
|
|
|
|
|
|
- # 是否在外站订阅过
|
|
|
- $user = Dever::db('passport/user')->one($uid);
|
|
|
- if ($user && $user['mobile']) {
|
|
|
- $mobileWhere['mobile'] = $user['mobile'];
|
|
|
- $mobileWhere['product_id'] = $info['id'];
|
|
|
- $mobile = Dever::db('journal/mobile')->one($mobileWhere);
|
|
|
- if ($mobile) {
|
|
|
- $this->data['info']['subscribe'] = 1;
|
|
|
- $this->setButton('read', 1);
|
|
|
- }
|
|
|
- }
|
|
|
+ # 是否在外站订阅过
|
|
|
+ $user = Dever::db('passport/user')->one($uid);
|
|
|
+ if ($user && $user['mobile']) {
|
|
|
+ $mobileWhere['mobile'] = $user['mobile'];
|
|
|
+ $mobileWhere['product_id'] = $info['id'];
|
|
|
+ $mobile = Dever::db('journal/mobile')->one($mobileWhere);
|
|
|
+ if ($mobile) {
|
|
|
+ $this->data['info']['subscribe'] = 1;
|
|
|
+ $this->setButton('read', 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if ($this->source_type == 'ios' && $this->data['info']['id'] == 26) {
|
|
|
$this->setButton('share', -1);
|
|
@@ -287,14 +289,6 @@ class Journal_v1 extends Core
|
|
|
# 小程序下的判断,ios里关闭支付
|
|
|
$applet_type = Dever::input('applet_type');
|
|
|
if ($applet_type == 2 && isset($this->data['config']['ios_pay']) && $this->data['config']['ios_pay'] == 1 && $info['buy'] == 1) {
|
|
|
- # 关闭支付
|
|
|
- if ($subscribe == 1) {
|
|
|
- $this->data['info']['subscribe'] = 1;
|
|
|
- $this->setButton('read', 1);
|
|
|
- } else {
|
|
|
- $this->setButton('read', 2);
|
|
|
- }
|
|
|
-
|
|
|
$this->setButton('buy', -1);
|
|
|
//$this->setButton('share', -1);
|
|
|
}
|