- Android 跳转微信小程序之后点击小程序返回无法返回,请问是什么原因?
<button @click="quit" open-type="launchApp" app-parameter="wechat" binderror="launchAppError" class="xm-btn border-radius-8 dd-flex co_fff f-s-28 m-t-30" style="height:88rpx;background: #000;">返回app</button> 小程序端 api = WXAPIFactory.createWXAPI(context, Constant.WE_CHAT_APP_ID,true); api.registerApp(Constant.WE_CHAT_APP_ID); if (!api.isWXAppInstalled()) { ToastUtils.showToastLong("尚未安装微信,请安装微信后重试!"); }else { WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req(); req.userName = Constant.SMALL_PROGRAM_APP_ID; // 填小程序原始id req.path = String.format("pages/index/index?userId=%d&businessId=%d&price=%d", App.getInstance().userId,businessId,price); req.miniprogramType = WXLaunchMiniProgram.Req.MINIPROGRAM_TYPE_PREVIEW;// 可选打开 开发版,体验版和正式版 api.sendReq(req); } Android端
05-08 - Android 跳转微信小程序之后点击小程序返回我法返回,请问是什么原因?
public static void pay(Context context,int businessId,int price) { api = WXAPIFactory.createWXAPI(context, Constant.WE_CHAT_APP_ID); if (!api.isWXAppInstalled()) { Toast.makeText(context, "尚未安装微信,请安装微信后重试!", Toast.LENGTH_SHORT).show(); }else { WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req(); req.userName = Constant.SMALL_PROGRAM_APP_ID; // 填小程序原始id req.path = String.format("pages/index/index?userId=%d&businessId=%d&price=%d", App.getInstance().userId,businessId,price); req.miniprogramType = WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE;// 可选打开 开发版,体验版和正式版 api.sendReq(req); } }
03-03