Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

raojiaolong@163.com 2 lat temu
rodzic
commit
21ed20d910
1 zmienionych plików z 8 dodań i 3 usunięć
  1. 8 3
      mhotel/src/com/happy/common/http/Message2.java

+ 8 - 3
mhotel/src/com/happy/common/http/Message2.java

@@ -18,7 +18,7 @@ public class Message2 {
      * **/
     public static String send(String openid,String order_num,
                               String h_type,String live_end,
-                              String user_name,String hotel_name)
+                              String user_name,String hotel_name,String id)
             throws Exception {
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("grant_type", "client_credential");
@@ -37,7 +37,7 @@ public class Message2 {
         mp_template_msg.setUrl("index");
         JSONObject jsonObject1 = new JSONObject();
         jsonObject1.put("appid","wx2fc3f45732fae5d3");
-        jsonObject1.put("pagepath","pages/index/index");
+        jsonObject1.put("pagepath","/pages/push/push?id="+id);
         mp_template_msg.setMiniprogram(jsonObject1);
         // 订单号
         JSONObject character_string1_ = new JSONObject();
@@ -76,5 +76,10 @@ public class Message2 {
         return HttpsClient.sendJson("https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token="+token, message);
     }
 
-
+    public static void main(String[] args) throws Exception {
+        String msg = send("oz3gK5m2JQORvn9ruKoT33TSA7Wk","2308082018488183",
+                "小三房","2023-08-08~2023-08-08",
+                "xieli测试数据","aaaa","1111");
+        System.out.println(msg);
+    }
 }