dever 6 years ago
parent
commit
0ad7137b19
2 changed files with 10 additions and 1 deletions
  1. 4 0
      main/src/Journal.php
  2. 6 1
      service/src/Base.php

+ 4 - 0
main/src/Journal.php

@@ -557,6 +557,7 @@ class Journal extends Core
         $source_uid = $this->getSourceUid(false);
         $source_uid = $this->getSourceUid(false);
         $buy_id = Dever::input('buy_id');
         $buy_id = Dever::input('buy_id');
         $journal_id = Dever::input('journal_id');
         $journal_id = Dever::input('journal_id');
+        $cate = $this->getCate();
 
 
         if (!$buy_id) {
         if (!$buy_id) {
             Dever::alert('请传入正确的支付ID');
             Dever::alert('请传入正确的支付ID');
@@ -598,9 +599,12 @@ class Journal extends Core
             $method = 'applet';
             $method = 'applet';
             $order_data['system'] = 1;
             $order_data['system'] = 1;
             $account_id = 1;
             $account_id = 1;
+            # 根据cate_id走不同的支付id,暂时不需要
+            //$account_id = $cate['pay_id'];
         }
         }
 
 
         $order_id = $this->createOrder('JP');
         $order_id = $this->createOrder('JP');
+        $order_data['cate_id'] = $cate['id'];
         $order_data['order_id'] = $order_id;
         $order_data['order_id'] = $order_id;
         $order_data['product_id'] = $journal_id;
         $order_data['product_id'] = $journal_id;
         $order_data['buy_id'] = $buy_id;
         $order_data['buy_id'] = $buy_id;

+ 6 - 1
service/src/Base.php

@@ -12,6 +12,8 @@ class Base
         if ($p) {
         if ($p) {
             $this->config = Dever::json_decode(Dever::decode($p, $this->key));
             $this->config = Dever::json_decode(Dever::decode($p, $this->key));
         }
         }
+        # 第三方账户
+        $this->account = $this->getConfig('account', 1);
         # 小刊分类
         # 小刊分类
         $this->cate = $this->getConfig('cate', 1);
         $this->cate = $this->getConfig('cate', 1);
         # 渠道
         # 渠道
@@ -27,6 +29,9 @@ class Base
     # 创建url
     # 创建url
     public function createUrl()
     public function createUrl()
     {
     {
+        # 第三方账户
+        $this->account = Dever::input('account', 1);
+        # 分类
         $this->cate = Dever::input('cate', 1);
         $this->cate = Dever::input('cate', 1);
         # 渠道
         # 渠道
         $this->source = Dever::input('source', 1);
         $this->source = Dever::input('source', 1);
@@ -58,7 +63,7 @@ class Base
         $cate['bglogo'] = ':url('.$cate['logo'].') no-repeat;';
         $cate['bglogo'] = ':url('.$cate['logo'].') no-repeat;';
 
 
         $url = urlencode($this->url('list'));
         $url = urlencode($this->url('list'));
-        $cate['login'] = 'location.href=\'' . Dever::url('request.auth?account=1&source='.$this->source.'&refer=' . $url, 'oauth') . '\'';
+        $cate['login'] = 'location.href=\'' . Dever::url('request.auth?account='.$this->account.'&source='.$this->source.'&refer=' . $url, 'oauth') . '\'';
         return $cate;
         return $cate;
     }
     }