代码拉取完成,页面将自动刷新
同步操作将从 hm-tools/hm-tools-wxmp-adapter 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
package top.hmtools.wxmp.account.apis;
import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.io.IOUtils;
import org.junit.Test;
import top.hmtools.wxmp.account.BaseTest;
import top.hmtools.wxmp.account.enums.EQRActionName;
import top.hmtools.wxmp.account.models.ActionInfo;
import top.hmtools.wxmp.account.models.QRCodeParam;
import top.hmtools.wxmp.account.models.QRCodeResult;
import top.hmtools.wxmp.account.models.Scene;
import top.hmtools.wxmp.account.models.TicketParam;
public class IQrcodeApisTest extends BaseTest {
private IQrcodeApis qrcodeApis ;
@Test
public void testCreate() {
QRCodeParam codeParam = new QRCodeParam();
ActionInfo action_info = new ActionInfo();
Scene scene = new Scene();
scene.setScene_str("aaaabbbbcccc");
action_info.setScene(scene);
codeParam.setAction_info(action_info);
codeParam.setAction_name(EQRActionName.QR_STR_SCENE);
codeParam.setExpire_seconds(20*60*60*60L);
QRCodeResult create = this.qrcodeApis.create(codeParam);
this.printFormatedJson("创建二维码ticket", create);
}
@Test
public void testShowQrCode() throws IOException {
TicketParam ticketParam = new TicketParam();
ticketParam.setTicket("gQF78DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyaV9LNVo3VUM5UV8xVi1qWWh1YzIAAgR_BtVeAwQAjScA");
InputStream showQrCode = this.qrcodeApis.showQrCode(ticketParam);
this.printFormatedJson("通过ticket换取二维码", IOUtils.toByteArray(showQrCode));
}
@Override
public void initSub() {
this.qrcodeApis = this.wxmpSession.getMapper(IQrcodeApis.class);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。