公众号里面发送消息,这个模板之前都好好的,怎么突然报这个错误?而且这个错误在开发文档上都没有。。。。。求大神相助啊
错误信息:
“errcode”:40165,“errmsg”:"invalid weapp pagepath hint:
发送信息的代码
WxTemplateSendDto wxTemplateSendDto = new WxTemplateSendDto();
PcCarInfo carInfo = pcCarInfoService.selectByPrimaryKey(washOrder.getCarId());
String color = “#173177”;
wxTemplateSendDto.addData(“first”, “您有新的订单,请及时处理”, color);
wxTemplateSendDto.addData(“keyword1”, carInfo.getLicensePlate(), color);
wxTemplateSendDto.addData(“keyword2”, washOrder.getAreaDetailName(), color);
String tcsj = DateUtil.dateToString(new Date(), DateUtil.formdatetime4);//
wxTemplateSendDto.addData(“keyword4”, tcsj, color);
wxTemplateSendDto.addData(“remark”, “暂无”, color);
wxTemplateSendDto.setTemplate_id(MSG_TEMPLATE_ID.AREA_DETAIL_ID);
wxTemplateSendDto.setTopcolor(color);
wxTemplateSendDto.setTouser(washerOpenId);
WxMiniprogramDto miniprogram = new WxMiniprogramDto();
miniprogram.setAppid(XcxConfig.getConfig().getXcyWasherAppid());
String pagepath = “/pioneer-washer/orderPage.do”;//小程序地址
miniprogram.setPagepath(pagepath);
wxTemplateSendDto.setMiniprogram(miniprogram);
wxClient.templateSend(wxTemplateSendDto, accessTokenCache.getAccessToken(WxConstant.access_token));
public JsonObject templateSend(WxTemplateSendDto wxTemplateSendDto, String access_token) {
String url = String.format(WxConstant.TEMPLATE_SEND, access_token);
JsonObject jo = GsonUtil.fromJson(HttpClientUtil.post(url, GsonUtil.toJson(wxTemplateSendDto), “UTF-8”),
JsonObject.class);
return jo;
}
public class WxTemplateSendDto {
private String touser;
private String template_id;
private String url;
private String topcolor;
private WxMiniprogramDto miniprogram;
private Map<String, WxTemplateSendSubDto> data = new HashMap<String, WxTemplateSendSubDto>();
public String getTouser() {
return touser;
}
public void setTouser(String touser) {
this.touser = touser;
}
public String getTemplate_id() {
return template_id;
}
public void setTemplate_id(String template_id) {
this.template_id = template_id;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTopcolor() {
return topcolor;
}
public void setTopcolor(String topcolor) {
this.topcolor = topcolor;
}
public Map<String, WxTemplateSendSubDto> getData() {
return data;
}
public void addData(String key, String value, String color) {
WxTemplateSendSubDto sub = new WxTemplateSendSubDto(value, color);
data.put(key, sub);
}
public WxMiniprogramDto getMiniprogram() {
return miniprogram;
}
public void setMiniprogram(WxMiniprogramDto miniprogram) {
this.miniprogram = miniprogram;
}
}