Skip to content

Instantly share code, notes, and snippets.

View WinfredZhuwenfeng's full-sized avatar
🎯
Focusing

WinfredZhu WinfredZhuwenfeng

🎯
Focusing
View GitHub Profile
/**
* Module dependencies.
*/
var browserSync = require('browser-sync').create()
var proxy = require('http-proxy-middleware') // require('http-proxy-middleware');
/**
* Configure proxy middleware
*/
// 这里配置当以 /api 请求的时候,转发到 http://127.0.0.1:5000
@WinfredZhuwenfeng
WinfredZhuwenfeng / gist:eef79b018d076b694818a9a63490d7f5
Created April 2, 2018 03:33
封装cookie的添加,删除,查询方法
CookieUtil={
addCookie:function(key,value,options){
var str=key+"="+escape(value);
if(options.expires){
var curr=new Date(); //options.expires的单位是小时
curr.setTime(curr.getTime()+options.expires*3600*1000);
options.expires=curr.toGMTString();
}
for(var k in options){ //有可能指定了cookie的path,cookie的domain
str+=";"+k+"="+options[k];
@themes: "."; // 路径提取
@import "@{themes}/px2rem"; // 导入换算 less
@import "@{themes}/variable"; // 导入变量 less
/*------------- S reset css 重置默认的一些样式 浏览器子自带的 目的是保持各种终端显示一致 -----------------*/
@charset "utf-8";
html {
background: #fff;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
//设计图 750px 使用flexible,插件系统认为整个屏幕就是 10 rem,所以 1rem 就对应75px;
//px = >rem 要除以 75
//基准值 设计图 / 10
@remBase:75;
//举个小例子
// 高度量出来 80px = > height: 80*@rem;
//这里 round 是一个函数可以对小数进行保留,这里就是保留6位小数的意思
@rem:round(1/ @remBase, 6) * 1rem;
@WinfredZhuwenfeng
WinfredZhuwenfeng / Windows cache path
Created January 6, 2018 17:28
Windows cache path
C:\Users\Winfred Zhu\AppData\Local\Temp