Prechádzať zdrojové kódy

支付二维码重定向

zhengjinyi 3 rokov pred
rodič
commit
540c04e313

+ 1 - 1
src/main/resources/static/js/pay/caimei-paymobile.js

@@ -152,7 +152,7 @@ var payContainer = new Vue({
                 };
             }
             // _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx91c4152b60ca91a3&redirect_uri=https://www-b.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
-            _self.payInfo.payMobileUrl = 'https://www-b.caimei365.com/wxcode.html?orderInfo='+orderInfo;
+            _self.payInfo.payMobileUrl = 'https://www-b.caimei365.com/wxcode.html?orderInfo='+encodeURIComponent(JSON.stringify(orderInfo));
             console.log(_self.payInfo.payMobileUrl);
             var qrcode = new QRCode(document.getElementById("wx_pay_container"), {
                 render: "canvas", //也可以替换为table

+ 2 - 11
src/main/resources/templates/pay/caimei-code.html

@@ -7,19 +7,11 @@
     <template th:replace="components/analysis"></template>
 </head>
 <body>
-<div class="head-wrap">
-    <div class="inner clear">
-        <div class="logo"><a href="/index.html"><img src="/img/base/index_logo.png" alt=""></a></div>
-        <div class="text">收银台</div>
-        <input type="hidden" th:value="${coreServer}" id="coreServer">
-        <input type="hidden" th:value="${agent}" id="userAgent">
-    </div>
-</div>
 <div class="pay-container weixin clear" id="payContainer" >
     <div v-if="loginLoading" class="loading" :style="{opacity: loginLoading ? '1' :'0'}">
         <img src="/img/base/loading.gif">
     </div>
-    <div class="container" :class="{active: isRequest}" v-show="isRequest">
+    <div class="container">
 
     </div>
 </div>
@@ -28,8 +20,7 @@
 <template th:replace="components/foot-link"></template>
 <script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/pay.service.js(v=${version})}"></script>
-<script charset="utf-8" type="text/javascript" th:src="@{/lib/qrcode.min.js(v=${version})}"></script>
-<script charset="utf-8" type="text/javascript" th:src="@{/js/pay/caimei-paymobile.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/pay/caimei-code.js(v=${version})}"></script>
 
 </body>
 </html>