收藏
回答

点金计划手机无法加载商家小票界面???很急

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="referrer" content="origin">
  <meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
  <title>支付完成</title>
  <script type="text/javascript" charset="UTF-8" src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js">
  </script>
  <script type="text/javascript" src="https://cdn.bootcss.com/vConsole/3.3.0/vconsole.min.js"></script>
  <script type="text/javascript" src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>

  <style>
    body {


      font-family: PingFang SC, "Helvetica Neue", Arial, sans-serif;
    }

    .order_box {


      text-align: center;
    }

    .order_box .bussiness_avt img {


      width: 68px;
      height: 68px;
      border-radius: 100%;
      border: 1px solid #E0E0E0;
    }

    .b_name {


      font-size: 14px;
      font-weight: 500;
      color: #333333;
      margin-top: 6px;
    }

    .col_box {


      margin-top: 35px;
    }

    .col_box .col {


      display: -webkit-box;
      display: -ms-flexbox;
      display: -webkit-flex;
      display: flex;
      -webkit-box-align: center;
      -ms-flex-align: center;
      -webkit-align-items: center;
      align-items: center;
      -webkit-box-pack: justify;
      -ms-flex-pack: justify;
      -webkit-justify-content: space-between;
      justify-content: space-between;
      font-size: 14px;
      color: #333;
      margin-bottom: 14px;
    }

    .col .ct.price {


      color: #E61515
    }

    .btns {


      display: -webkit-box;
      display: -ms-flexbox;
      display: -webkit-flex;
      display: flex;
      -webkit-box-pack: justify;
      -ms-flex-pack: justify;
      -webkit-justify-content: space-between;
      justify-content: space-between;
      margin-top: 31px;
    }

    .btns .btn {


      width: 147px;
      height: 35px;
      line-height: 35px;
      font-size: 14px;
      border-radius: 39px;
      border: 1px solid #CD2314;
      box-sizing: border-box;
      color: #CD2314;
    }

    .btns .btn.detail {


      background: linear-gradient(270deg, #D51010 0%, #EF4D2D 100%);
      color: #fff;
    }
  </style>
</head>

<body>
<div class="order_box">
  <div class="btns">
    <div id="toOrder" class="btn home">已完成</div>
  </div>
</div>

<script>
  //初始化小票
  var initData = {
    action: 'onIframeReady',
    displayStyle: 'SHOW_CUSTOM_PAGE'
  }
  var initPostData = JSON.stringify(initData)
  parent.postMessage(initPostData, 'https://payapp.weixin.qq.com')



  //注册点击事件(去详情)
  document.getElementById("toOrder").onclick = function () {
    var mchData = {
      action: 'jumpOut',
      jumpOutUrl: "https:www.baidu.com?id=123123" //跳转的页面
    }
    var postData = JSON.stringify(mchData)
    parent.postMessage(postData, 'https://payapp.weixin.qq.com')
  }




</script>
</body>

</html>


回答关注问题邀请回答
收藏

2 个回答

  • C君
    C君
    2020-10-31

    地址建议这样写

    https://www.baidu.com/?id=123123

    2020-10-31
    有用
    回复
  • 微信支付技术助手8
    微信支付技术助手8
    2020-10-15

    商家小票时出现“无法获取订单信息”页面

    请按照以下几点检查:

    1,已打开特约商户的商家小票及点金计划开关

    2,商家小票页面需调用父页面“onIframeReady事件”的jsapi,具体请查看商家小票开发指引

    3,从加载商家小票到调用JSAPI之间的用时不可超过3s

    4,调试时,扫描二维码的微信号和支付该笔测试订单的微信号需为同一个

    5,确保访问的商家小票在调试手机的微信上能正常打开

    6,检查商家小票请求的Response Headers中X-Frame-Options是否允许payapp.weixin.qq.com访问

    2020-10-15
    有用
    回复
登录 后发表内容
问题标签