funme / coding

loving && coding && living
0 stars 0 forks source link

wechat h5 #22

Open funme opened 5 years ago

funme commented 5 years ago

VUE开发微信H5页面总结 - 掘金

funme commented 5 years ago

qq9694526/vue-wxh5: Vue+微信网页开发最佳实践 最简单的移动端适配方案(rem+vw) | 勇PAN高峰的博客 移动端适配总结 - 掘金

funme commented 5 years ago

可爱的rem - 掘金

(function(){
    var fontSizeMatchDeviceWidth = function(){
        var deviceWidth = document.documentElement.clientWidth || window.screen.width || 320,
            devicePixelRatio = window.devicePixelRatio || 1,
            fontSize = (Math.ceil(deviceWidth * 16 / 320)),
            scale = 1 / devicePixelRatio; // 默认的缩放

        document.documentElement.style.fontSize = fontSize + 'px';
        document.querySelector('meta[name="viewport"]').setAttribute('content','width=device-width,initial-scale='+'scale'+',maximum-scale='+scale+',minimum-scale='+scale+',user-scalable=no,viewport-fit=cover'); // 增加viewport-fit=cover适配iphone x
    };

    (function(){
        var ua = navigator.userAgent;
        if(/android/i.test(ua) || /ipad|itouch|iphone/i.test(ua)|| /tianqi/i.test(ua)){
            fontSizeMatchDeviceWidth();
        } else { // pc端优雅降级
            document.documentElement.style.fontSize = '24px';
        }
    })();
})();
funme commented 5 years ago

微信公众平台-错误代码

funme commented 5 years ago

Vant - 轻量、可靠的移动端 Vue 组件库 组件 | Element lunlunshiwo/ChooseCity: 一个城市选择组件 V-Calendar

funme commented 5 years ago

SET – Redis Lodash Documentation Socket.IO — Client API | Socket.IO Socket.IO — Emit cheatsheet | Socket.IO

funme commented 5 years ago

前端定位组件 | 腾讯位置服务

funme commented 5 years ago

staven630/vue-cli3-config: vue-cli3配置vue.config.js持续更新

funme commented 5 years ago

co-wechat-api Documentation sigoden/wechatpay: 微信支付 SDK,支持刷卡支付、公众号支付、扫码支付、APP支付、H5支付,以及优惠券,红包,企业付款,微信代扣

funme commented 5 years ago
import tap from "lodash/tap";
import has from "lodash/has";
const times = {};

export const ioIsNew = ({ action, meta: { time } }) => {
  const key = `${action}_${time}`;
  return tap(!has(times, key), isNew => {
    !isNew && clearTimeout(times[key]);
    times[key] = setTimeout(() => {
      delete times[key];
    }, 10000);
  });
};
funme commented 5 years ago
funme commented 5 years ago