Browse Source

修改数据

DESKTOP-USV654P\pc 1 year ago
parent
commit
81db465813

+ 2 - 2
src/main/java/com/xjrsoft/module/organization/controller/WechatController.java

@@ -65,8 +65,8 @@ public class WechatController {
 
     @GetMapping(value = "/js-config")
     @ApiOperation(value="前端jssdk页面配置需要用到的配置参数")
-    public  R getWeixinJs () throws Exception {
-        return R.ok(WeChatService.getJsConfig());
+    public  R getWeixinJs (@RequestParam(value = "url",required = true) String url) throws Exception {
+        return R.ok(WeChatService.getJsConfig(url));
     }
 
 

+ 1 - 1
src/main/java/com/xjrsoft/module/organization/service/IWeChatService.java

@@ -11,5 +11,5 @@ public interface IWeChatService {
 
     boolean updateInfo();
 
-    WeChatJsConfigDto getJsConfig() throws Exception;
+    WeChatJsConfigDto getJsConfig(String url) throws Exception;
 }

+ 2 - 2
src/main/java/com/xjrsoft/module/organization/service/impl/WeChatServiceImgl.java

@@ -187,9 +187,9 @@ public class WeChatServiceImgl implements IWeChatService {
         deptDepartlist.addAll(departmentList);
     }
 
-    public WeChatJsConfigDto getJsConfig()  throws Exception {
+    public WeChatJsConfigDto getJsConfig(String url)  throws Exception {
         WeChatJsConfigDto weChatJsConfigDto = new WeChatJsConfigDto();
-        HashMap<String, Object> resultMap = weChatUtil.SdkSign("https://zhxy.cqtlzjzx.com/app", "jsapi");
+        HashMap<String, Object> resultMap = weChatUtil.SdkSign(url, "jsapi");
         weChatJsConfigDto.setTimestamp(resultMap.get("timestamp").toString());
         weChatJsConfigDto.setUrl(resultMap.get("url").toString());
         weChatJsConfigDto.setSignature(resultMap.get("signature").toString());