|  | @@ -104,12 +104,12 @@ class Pay
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          if ($active_state) {
 | 
	
		
			
				|  |  |                              # 增加本数
 | 
	
		
			
				|  |  | -                            Dever::load('act/lib/num')->submit($order['product_id'], $uid, $buy['num']);
 | 
	
		
			
				|  |  | +                            Dever::load('act/lib/num')->submit($order['product_id'], $order['uid'], $buy['num']);
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  # 积分
 | 
	
		
			
				|  |  | -                Dever::score($uid, 'buy_journal', '购买小刊', '', $score, $num);
 | 
	
		
			
				|  |  | +                Dever::score($order['uid'], 'buy_journal', '购买小刊', '', $score, $num);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  # 发消息
 | 
	
		
			
				|  |  |                  $journal['id'] = $order['product_id'];
 | 
	
	
		
			
				|  | @@ -122,10 +122,10 @@ class Pay
 | 
	
		
			
				|  |  |                  //$journal = Dever::db('journal/info')->one($order['product_id']);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  if (Dever::project('message')) {
 | 
	
		
			
				|  |  | -                    Dever::load('message/lib/data')->push(-1, $uid, '购买提醒', '购买成功,您获得了 '.$journal['name'].' 的阅读资格!', 11, $order['cate_id'], 1, Dever::load('act/lib/note')->push(4, $journal['id'], $journal['name']));
 | 
	
		
			
				|  |  | +                    Dever::load('message/lib/data')->push(-1, $order['uid'], '购买提醒', '购买成功,您获得了 '.$journal['name'].' 的阅读资格!', 11, $order['cate_id'], 1, Dever::load('act/lib/note')->push(4, $journal['id'], $journal['name']));
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                $user = Dever::db('passport/user')->one($uid);
 | 
	
		
			
				|  |  | +                $user = Dever::db('passport/user')->one($order['uid']);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  # 发短信
 | 
	
		
			
				|  |  |                  if (isset($user['mobile']) && $user['mobile'] && Dever::project('sms') && $order['cate_id'] == 1) {
 | 
	
	
		
			
				|  | @@ -135,19 +135,19 @@ class Pay
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  # 发模板消息
 | 
	
		
			
				|  |  | -                $wechat = Dever::db('passport/wechat')->one(array('uid' => $uid, 'type' => 1, 'system_id' => $order['cate_id']));
 | 
	
		
			
				|  |  | +                $wechat = Dever::db('passport/wechat')->one(array('uid' => $order['uid'], 'type' => 1, 'system_id' => $order['cate_id']));
 | 
	
		
			
				|  |  |                  if ($wechat && Dever::project('wechat_applet')) {
 | 
	
		
			
				|  |  |                      $send['key'] = 'buy_journal';
 | 
	
		
			
				|  |  |                      $send['project_id'] = $order['cate_id'];
 | 
	
		
			
				|  |  |                      $send['touser'] = $wechat['openid'];
 | 
	
		
			
				|  |  | -                    $send['page'] = Dever::config('base')->applet_index . '?scene=' . Dever::login($uid) . ',' . '4,' . $order['product_id'];
 | 
	
		
			
				|  |  | +                    $send['page'] = Dever::config('base')->applet_index . '?scene=' . $order['uid'] . ',' . '4,' . $order['product_id'];
 | 
	
		
			
				|  |  |                      $send['data'] = array
 | 
	
		
			
				|  |  |                      (
 | 
	
		
			
				|  |  |                          'keyword1' => array('value' => date('Y年m月d日 H:i', $order['cdate'])),
 | 
	
		
			
				|  |  |                          'keyword2' => array('value' => '购买成功,您获得了 '.$journal['name'].' 的阅读资格!'),
 | 
	
		
			
				|  |  |                      );
 | 
	
		
			
				|  |  |                      $send['data'] = json_encode($send['data']);
 | 
	
		
			
				|  |  | -                    $send['form_id'] = Dever::load('act/lib/form')->get($uid, 2, $order['cate_id']);
 | 
	
		
			
				|  |  | +                    $send['form_id'] = Dever::load('act/lib/form')->get($order['uid'], 2, $order['cate_id']);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                      if ($send['form_id']) {
 | 
	
		
			
				|  |  |                          Dever::load('wechat_applet/msg.send', $send);
 |