Browse Source

小程序跳转

anderx 4 years ago
parent
commit
40b3ba37e0

+ 4 - 0
src/main/java/com/goafanti/common/utils/WeChatUtils.java

@@ -22,6 +22,8 @@ public class WeChatUtils {
 	private String appId;
 	@Value(value = "${wx.appSecret}")
 	private String appSecret;
+	@Value(value = "${wx.state}")
+	private String wxState;
 	@Autowired
 	private RedisUtil redisUtil;
 	
@@ -47,6 +49,8 @@ public class WeChatUtils {
 		String url=send_url.replace("ACCESS_TOKEN", accessToken);
 		map.put("access_token", accessToken);
 		map.put("touser", openid);
+		map.put("page", "/pages/egressDetails/index?id=");
+		map.put("miniprogram_state", wxState);
 		if (type==1) {
 			map.put("template_id", sptz);
 			map.put("data",getData(type,date, aname,remarks));

+ 8 - 6
src/main/resources/props/config_local.properties

@@ -1,11 +1,11 @@
 dev.name=local
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#本地
+#本地
 #jdbc.url=jdbc\:mysql://localhost:3306/aft20210528?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.username=root
 #jdbc.password=123456
-#测试
+#测试
 jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 jdbc.username=root
 jdbc.password=aftdev
@@ -56,23 +56,25 @@ session.validate.timespan=18000000
 
 app.name=AFT
 template.cacheable=false
-#最大领取客户
+#最大领取客户
 user.receive.max=10
 user.private.max=1000
-#客户提醒剩余天数
+#客户提醒剩余天数
 user_remind_days=15
 
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
-#连接开发
+#连接开发
 #static.host=//172.16.0.253/1.1.74
 #avatar.host=//172.16.0.253
 
 wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7
+#developer为开发版;trial为体验版;formal为正式版;
+wx.state=trial
 
 
-
+•
 avatar.host=//static.jishutao.com
 static.host=//static.jishutao.com/1.1.75
 

+ 3 - 1
src/main/resources/props/config_test.properties

@@ -57,7 +57,7 @@ template.cacheable=false
 
 user.receive.max=10
 user.private.max=1000
-#客户释放提醒
+#客户释放提醒
 user_remind_days=15
 
 static.host=//static.jishutao.com/1.1.75
@@ -67,6 +67,8 @@ avatar.upload.host=//static.jishutao.com/upload
 
 wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7
+#developer为开发版;trial为体验版;formal为正式版;
+wx.state=trial
 
 upload.path=/data/static/public/upload
 upload.private.path=/data/static/private/upload