dever 6 years ago
parent
commit
250501aa0c
3 changed files with 5 additions and 6 deletions
  1. 4 5
      applet/src/Msg.php
  2. 1 0
      main/database/project.php
  3. 0 1
      main/lib/Core.php

+ 4 - 5
applet/src/Msg.php

@@ -109,13 +109,12 @@ class Msg
 				Dever::setInput('project_id', $info['project_id']);
 				Dever::setInput('page', $info['page']);
 				$data = json_decode(base64_decode($info['content']), true);
-				print_r($data);die;
 				if ($data) {
 					$send = array();
 					foreach ($data as $k => $v) {
 						$send[$v['key']] = $v['value'];
 					}
-					$send = json_encode($send);
+					$send = json_encode($send, JSON_UNESCAPED_UNICODE);
 					Dever::setInput('data', $send);
 				}
 
@@ -140,7 +139,7 @@ class Msg
 			if ($list) {
 				Dever::import('queue');
 				foreach ($list as $k => $v) {
-					if (is_numeric($v['form_id'])) {
+					if (is_numeric($v['form_id']) && $v['openid'] == 'oIZ895adCNPtwyPX47Uv8ne8_xcM') {
 						$param = array();
 						$param['key'] = $key;
 						$param['project_id'] = $project_id;
@@ -167,7 +166,7 @@ class Msg
 		//如果是异步发送,每发送10次,休息3秒
 		$time = 3;
 		$num = 0;
-		$state = true;//同步发送
+		$sync = true;//同步发送
 		while ($state == true) {
 			$data = Dever::pop();
 			if ($data) {
@@ -175,7 +174,7 @@ class Msg
 				$state = true;
 				$this->sendOne($data['key'], $data['project_id'], $data['touser'], $data['page'], $data['data'], $data['form_id'], $data['emphasis_keyword'], $state);
 
-				if ($state == false && $num == 10) {
+				if ($sync == false && $num == 10) {
 					$num = 0;
 					sleep($time);
 				}

+ 1 - 0
main/database/project.php

@@ -8,6 +8,7 @@ $type = array
 	4 => '小游戏',
 	5 => '第三方平台',
 	6 => '开发者',
+	7 => '有赞',
 );
 
 return array

+ 0 - 1
main/lib/Core.php

@@ -56,7 +56,6 @@ class Core
 	public function call_api()
 	{
 		$send = json_decode(base64_decode(Dever::input('param')), true);
-		
 		$result = callAction($send);
 		if (isset($result)) {
 			print_r($result);