This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\Winfred Zhu\AppData\Local\Temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//设计图 750px 使用flexible,插件系统认为整个屏幕就是 10 rem,所以 1rem 就对应75px; | |
//px = >rem 要除以 75 | |
//基准值 设计图 / 10 | |
@remBase:75; | |
//举个小例子 | |
// 高度量出来 80px = > height: 80*@rem; | |
//这里 round 是一个函数可以对小数进行保留,这里就是保留6位小数的意思 | |
@rem:round(1/ @remBase, 6) * 1rem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |