shish vor 6 Jahren
Ursprung
Commit
f065b9899b
1 geänderte Dateien mit 13 neuen und 1 gelöschten Zeilen
  1. 13 1
      app/client/controllers/UserController.php

+ 13 - 1
app/client/controllers/UserController.php

@@ -159,13 +159,25 @@ class UserController extends BaseController
 		util::ok('注册成功');
 	}
 	
+	public function html_out($str)
+	{
+		if (function_exists('htmlspecialchars_decode')) {
+			$str = htmlspecialchars_decode($str);
+		} else {
+			$str = html_entity_decode($str);
+		}
+		$str = stripslashes($str);
+		return $str;
+	}
+	
 	//用户基本信息和资产 shish 2019.12.19
 	public function actionMyProfile()
 	{
 
 		$user = UserService::getUserInfo($this->userId);
 
-		$content = '<a data-miniprogram-appid="wxe4675bab299a52f7" data-miniprogram-path="pages/page/login/index?roleId=2" href="http://www.qq.com">中装建材大师</a>';
+		$content = '&lt;p&gt;&lt;a data-miniprogram-appid=&quot;wx3a163add860e0a86&quot; data-miniprogram-path=&quot;pages/case/casedetail?mainId=184&amp;owner_user_id=19&quot; href=&quot;&quot;&gt;&lt;img src=&quot;https://www.meijiabang.com/0.gif&quot; alt=&quot;&quot; data-width=&quot;null&quot; data-ratio=&quot;NaN&quot;&gt;&lt;/a&gt;&lt;/p&gt;';
+		$content = $this->html_out($content);
 		wxUtil::sendMsg($content, $this->merchant, $user['openId']);