rabin 2 years ago
parent
commit
163c9046b6
1 changed files with 7 additions and 1 deletions
  1. 7 1
      learn/active/src/Api.php

+ 7 - 1
learn/active/src/Api.php

@@ -41,6 +41,12 @@ Class Api extends Core {
 		$insert['order_num'] = $this->getOrderId();
 		$ids = Dever::db('active/order')->insert($insert);
 
+		$url = Dever::url();
+		$refer = 'https://www.churenyiliao.com/';
+		if (strstr($url, 'uat.')) {
+			$refer = 'http://guanli.uat.churenyiliao.com/';
+		}
+		$refer .= 'data/payback/payback.html';
 		if($ids){
 			$info = Dever::db('active/order')->find($ids);
 			$active = Dever::db('active/info')->find($info['active_id']);
@@ -57,7 +63,7 @@ Class Api extends Core {
 	            'product_id' => $ids,
 	            'order_id' => $info['order_num'],
 	            'h5' => 1,
-	            'refer' => Dever::input('refer', 'http://guanli.uat.churenyiliao.com/data/payback/payback.html'),
+	            'refer' => $refer,
 	        );
 
 	        $result = Dever::load('pay/api.pay', $param);