String sendUrl = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + accessToken;
WxSmsVO wxMssVo = new WxSmsVO();
wxMssVo.setTouser(openId);
if(borrowFlag) {
wxMssVo.setPage("pages/index/index?key=bookmine");
} else {
wxMssVo.setPage("pages/index/index?key=bookmine&index=1");
}
wxMssVo.setTemplate_id(templateId);
Map<String, WxSmsTemplateDataVO> data = new HashMap<>();
for (int i = 0; i < templateKey.length; i++) {
WxSmsTemplateDataVO keyword = new WxSmsTemplateDataVO();
keyword.setValue(keywords[i]);
data.put(templateKey[i], keyword);
}
wxMssVo.setData(data);
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> responseEntity = restTemplate.postForEntity(sendUrl, wxMssVo, String.class);
String result = responseEntity.getBody();
正式版后端,前端都已发布。 但是只能跳转到首页,不能跳转到指定页面, 有人知道为啥不?