Selaa lähdekoodia

month pay week cancel

zz 5 vuotta sitten
vanhempi
commit
000972de6f

+ 2 - 2
app/Http/Controllers/Wap/Order/OrdersController.php

@@ -942,7 +942,7 @@ class OrdersController extends BaseController
         ) {
             if(!UserMonthService::isSignMonth($openid)){
                 try{
-                    if(in_array($property,['low','medium'])){
+                    if(in_array($property,['low','medium','none'])){
                         $type = 'MONTH';
                     }else{
                         $type = 'WEEK';
@@ -984,7 +984,7 @@ class OrdersController extends BaseController
                 return $ret;
             }
             if(!UserMonthService::isSignMonth($openid)){
-                if($property == 'none'){
+                if($property == 'nonenone'){
                     $attach = $this->uid %2 == 0 ? 'week-show':'week-hide';
                 }else{
                     $attach = $this->uid %2 == 0 ? 'show':'hide';

+ 14 - 7
app/Http/Controllers/Wap/Web/WelcomeController.php

@@ -2365,7 +2365,14 @@ class WelcomeController extends BaseController
         if (!$property) return '';
         $month_info = UserMonthService::getOrderAndSignStatusByUid($this->uid);
         if($month_info){
-            if(in_array('MONTH',$month_info)){
+            return [
+                'price' => '30元',
+                'text' => '30元包月 全站万本精彩小说免费看',
+                'link' => generateMonthOrderUrl($this->uid),
+                'focus_img'=>'https://cdn-novel.iycdm.com/h5/monthpay/month_order_check.png',
+                'unfocus_img'=>'https://cdn-novel.iycdm.com/h5/monthpay/month_order_1.png'
+            ];
+            /*if(in_array('MONTH',$month_info)){
                 return [
                     'price' => '30元',
                     'text' => '30元包月 全站万本精彩小说免费看',
@@ -2382,12 +2389,12 @@ class WelcomeController extends BaseController
                     'focus_img'=>'https://cdn-novel.iycdm.com/h5/monthpay/week-order-2.png',
                     'unfocus_img'=>'https://cdn-novel.iycdm.com/h5/monthpay/week-order-1.png'
                 ];
-            }
+            }*/
         }
         if (in_array($this->distribution_channel_id, explode(',', redisEnv('OPEN_ORDER_INNER_SITES')))) {
             $info = DataAnalysisSelectUserService::getByUidAndType($this->uid, 'MONTH_V2');
             if ($info) {
-                if ($info->attach == 'show') {
+                if ($info->attach == 'show' || $info->attach == 'week-show') {
                     return [
                         'price' => '30元',
                         'text' => '30元包月 全站万本精彩小说免费看',
@@ -2396,7 +2403,7 @@ class WelcomeController extends BaseController
                         'unfocus_img'=>'https://cdn-novel.iycdm.com/h5/monthpay/month_order_1.png'
                     ];
                 }
-                if ($info->attach == 'week-show') {
+                /*if ($info->attach == 'week-show') {
                     return [
                         'price' => '7元',
                         'text' => '7元包周 全站万本精彩小说免费看',
@@ -2404,7 +2411,7 @@ class WelcomeController extends BaseController
                         'focus_img'=>'https://cdn-novel.iycdm.com/h5/monthpay/week-order-2.png',
                         'unfocus_img'=>'https://cdn-novel.iycdm.com/h5/monthpay/week-order-1.png'
                     ];
-                }
+                }*/
                 return '';
             }
         }
@@ -2414,7 +2421,7 @@ class WelcomeController extends BaseController
             if (!UserMonthService::isSignMonth($openid)) {
                 $start_time = redisEnv('MONTH_TEMPLATE_COMPARE_START_TIME', 0);
                 if (!$start_time || (strtotime($this->user->created_at) < $start_time)) {
-                    if ($property == 'none') {
+                    if ($property == 'nonenone') {
                         return [
                             'price' => '7元',
                             'text' => '7元包周 全站万本精彩小说免费看',
@@ -2434,7 +2441,7 @@ class WelcomeController extends BaseController
                 }
                 $attach = $this->uid % 2 == 0 ? 'show' : 'hide';
                 if ($attach == 'hide') return '';
-                if ($property == 'none') {
+                if ($property == 'nonenone') {
                     return [
                         'price' => '7元',
                         'text' => '7元包周 全站万本精彩小说免费看',