Micro-channel public number of pit development of (a)

There is a saying that micro-channel mobile browser == end IE6. Share pit encountered in the development

1. No. achieve their public pay, can not pay to come in from other public number.

Since their public numbers can be paid, then the problem is most likely url jump over the number of public appear.
Right: htt P: //3w.yijia.com/wechat/pay/? id = 1
error: htt P: //3w.yijia.com/wechat/pay? id = 1 parameter (that is, before the question mark) to / at the end, because this is the required number of public pay configurations.

2. The micro-channel api upload pictures, small differences in the Apple and Android systems. Problem Description: To upload multiple images. In a successful upload Android phones; Apple phones there can only upload successfully last.

Solution: Apple uses a recursive function to upload.


3.iframe if there is an input box, a pop-up soft keyboard in the Apple phone will result not fit width

Code:

        $(window).resize(function () { 
            $('iframe').css("width",$(window).width());
        });

And increase the property in the iframe

<iframe frameborder=0 scrolling="no"></iframe> 


4. Absolute positioning elements are top-up keyboard.

Solution: HTTPS: //segmentfault.com/a/11 ...
If you use some time plug-in, select the plug address is bounced from the bottom but also absolute positioning. But also the design input. Proposal to change the pop-up from the middle of the screen.

5. Audio does not play automatically

 //一般情况下,这样就可以自动播放了,但是一些奇葩iPhone机不可以
 document.getElementById('car_audio').play();
//必须在微信Weixin JSAPI的WeixinJSBridgeReady才能生效
document.addEventListener("WeixinJSBridgeReady", function () {
    document.getElementById('audio').play();
    document.getElementById('video').play();
}, false); 

6.vue2.0 route (REACT not know) The history mode is not recognized in the two-dimensional code in IOS

This is my clothes, could not find a solution, then switch to hash routing.

7. When the read-only input box readonly = "readonly" in the IOS, the cursor appears click throw.

$('input[readonly]').on('focus', function() {
            $(this).trigger('blur');
});


8. The micro-channel cache.

Manual cleaning http://debugx5.qq.com phone finally pulled open, on the 4 election.
This article provides the code only php, js self-discovery. Considering that js is only performed after css loading is complete. So should dynamically generate a random number or timestamp js right place. For instance, your css is on the label inside the head. But your css do not want to be cached, to generate some dynamic information behind url, then it would have followed the introduction of the following js code in the css.

<link rel="stylesheet" href="/modules/wechatmp/statics/css/1111.css?v=<?php echo time(); ?> " />
<script class='math' src="/modules/wechatmp/statics/js/11111.js?ver=<?php echo time(); ?> "></script>

9. Share Link does not support micro-channel

Share micro-channel interface does not support hash pass.

Time to share with the url hash circle of friends, jump information does not include hash information. E.g:

view/guide/home.php#share/service/detail/

Only get:

view/guide/home.php

Recommendation: Do not share time with hash information. If you must take additional information, can be converted:

view/guide/home.php?share/service/detail/。

In doing single-page application, if you want to share dynamic data of the current page, it is necessary to splice parameters behind url. Parameter passing between pages using the route, and requests a get.

Guess you like

Origin www.cnblogs.com/jlfw/p/12207861.html