Commit e43f4dd2 by 梁建民

init

parent aa9561ea
{
"name": "ichunt3.0_h5",
"name": "spa",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
......@@ -751,7 +751,6 @@
"version": "7.2.0",
"resolved": "http://registry.npm.taobao.org/@babel/runtime/download/@babel/runtime-7.2.0.tgz",
"integrity": "sha1-sD5C7t31iY4AZG5MhA+ge6jcrX8=",
"dev": true,
"requires": {
"regenerator-runtime": "^0.12.0"
}
......@@ -838,6 +837,11 @@
"integrity": "sha1-SP2YwVYf5xi2FzPa7Ub/EVtJbhg=",
"dev": true
},
"@vant/icons": {
"version": "1.0.7",
"resolved": "http://registry.npm.taobao.org/@vant/icons/download/@vant/icons-1.0.7.tgz",
"integrity": "sha1-bi5Vg9Qa5GsXLJGFV5104pQdEGk="
},
"@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.0.0-beta.2",
"resolved": "http://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.0.0-beta.2.tgz",
......@@ -1647,6 +1651,15 @@
"integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=",
"dev": true
},
"axios": {
"version": "0.18.0",
"resolved": "http://registry.npm.taobao.org/axios/download/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "http://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz",
......@@ -2058,13 +2071,13 @@
}
},
"browserslist": {
"version": "4.4.1",
"resolved": "http://registry.npm.taobao.org/browserslist/download/browserslist-4.4.1.tgz",
"integrity": "sha1-QugolUtrKaelPjUid75ClHimkGI=",
"version": "4.4.0",
"resolved": "http://registry.npm.taobao.org/browserslist/download/browserslist-4.4.0.tgz",
"integrity": "sha1-cFDRQSy/xSdKumCe1eUDWcoaX98=",
"dev": true,
"requires": {
"caniuse-lite": "^1.0.30000929",
"electron-to-chromium": "^1.3.103",
"caniuse-lite": "^1.0.30000928",
"electron-to-chromium": "^1.3.100",
"node-releases": "^1.1.3"
}
},
......@@ -3784,9 +3797,9 @@
"dev": true
},
"events": {
"version": "3.0.0",
"resolved": "http://registry.npm.taobao.org/events/download/events-3.0.0.tgz",
"integrity": "sha1-mgoN+vYok9krh1uPJpjKQRSXPog=",
"version": "1.1.1",
"resolved": "http://registry.npm.taobao.org/events/download/events-1.1.1.tgz",
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
"dev": true
},
"eventsource": {
......@@ -4191,7 +4204,6 @@
"version": "1.6.1",
"resolved": "http://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.6.1.tgz",
"integrity": "sha1-UUlzxEtXVzaLrYvd/lL4HwFclMs=",
"dev": true,
"requires": {
"debug": "=3.1.0"
},
......@@ -4200,7 +4212,6 @@
"version": "3.1.0",
"resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz",
"integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
"dev": true,
"requires": {
"ms": "2.0.0"
}
......@@ -4208,8 +4219,7 @@
"ms": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
......@@ -5229,8 +5239,7 @@
"is-buffer": {
"version": "1.1.6",
"resolved": "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz",
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=",
"dev": true
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4="
},
"is-builtin-module": {
"version": "1.0.0",
......@@ -6423,9 +6432,9 @@
}
},
"node-libs-browser": {
"version": "2.2.0",
"resolved": "http://registry.npm.taobao.org/node-libs-browser/download/node-libs-browser-2.2.0.tgz",
"integrity": "sha1-xy9g2dRt4IqUDe27JfP/ovm7qnc=",
"version": "2.1.0",
"resolved": "http://registry.npm.taobao.org/node-libs-browser/download/node-libs-browser-2.1.0.tgz",
"integrity": "sha1-X5QmPUBPbkR2fXJpAf/wVHjWAN8=",
"dev": true,
"requires": {
"assert": "^1.1.1",
......@@ -6435,7 +6444,7 @@
"constants-browserify": "^1.0.0",
"crypto-browserify": "^3.11.0",
"domain-browser": "^1.1.1",
"events": "^3.0.0",
"events": "^1.0.0",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
"path-browserify": "0.0.0",
......@@ -6449,7 +6458,7 @@
"timers-browserify": "^2.0.4",
"tty-browserify": "0.0.0",
"url": "^0.11.0",
"util": "^0.11.0",
"util": "^0.10.3",
"vm-browserify": "0.0.4"
},
"dependencies": {
......@@ -6980,17 +6989,16 @@
}
},
"parse-asn1": {
"version": "5.1.3",
"resolved": "http://registry.npm.taobao.org/parse-asn1/download/parse-asn1-5.1.3.tgz",
"integrity": "sha1-FgDGzAcnNl1ouX86p4k55zWnUgQ=",
"version": "5.1.1",
"resolved": "http://registry.npm.taobao.org/parse-asn1/download/parse-asn1-5.1.1.tgz",
"integrity": "sha1-9r8pOBgzK9DatU77Fgh3JHRebKg=",
"dev": true,
"requires": {
"asn1.js": "^4.0.0",
"browserify-aes": "^1.0.0",
"create-hash": "^1.1.0",
"evp_bytestokey": "^1.0.0",
"pbkdf2": "^3.0.3",
"safe-buffer": "^5.1.1"
"pbkdf2": "^3.0.3"
}
},
"parse-json": {
......@@ -8039,8 +8047,7 @@
"regenerator-runtime": {
"version": "0.12.1",
"resolved": "http://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.12.1.tgz",
"integrity": "sha1-+hpxVEdkwDb4xJsToIsllMn4oN4=",
"dev": true
"integrity": "sha1-+hpxVEdkwDb4xJsToIsllMn4oN4="
},
"regenerator-transform": {
"version": "0.13.3",
......@@ -9933,9 +9940,9 @@
"dev": true
},
"util": {
"version": "0.11.1",
"resolved": "http://registry.npm.taobao.org/util/download/util-0.11.1.tgz",
"integrity": "sha1-MjZzNyDsZLsn9uJvQhqqLhtYjWE=",
"version": "0.10.4",
"resolved": "http://registry.npm.taobao.org/util/download/util-0.10.4.tgz",
"integrity": "sha1-OqASW/5mikZy3liFfTrOJ+y3aQE=",
"dev": true,
"requires": {
"inherits": "2.0.3"
......@@ -9985,6 +9992,16 @@
"spdx-expression-parse": "^3.0.0"
}
},
"vant": {
"version": "1.5.2",
"resolved": "http://registry.npm.taobao.org/vant/download/vant-1.5.2.tgz",
"integrity": "sha1-dT/S06PRYqlCbAyGJjzIs6yc3bg=",
"requires": {
"@babel/runtime": "^7.1.5",
"@vant/icons": "1.0.7",
"vue-lazyload": "1.2.3"
}
},
"vary": {
"version": "1.1.2",
"resolved": "http://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz",
......@@ -10028,6 +10045,11 @@
"integrity": "sha1-stPZVAKoEWAjgHg+pPVm64dVaaI=",
"dev": true
},
"vue-lazyload": {
"version": "1.2.3",
"resolved": "http://registry.npm.taobao.org/vue-lazyload/download/vue-lazyload-1.2.3.tgz",
"integrity": "sha1-kB+ewVx+bKeHgaK65KNDaGve2yw="
},
"vue-loader": {
"version": "15.5.1",
"resolved": "http://registry.npm.taobao.org/vue-loader/download/vue-loader-15.5.1.tgz",
......@@ -10073,9 +10095,9 @@
"dev": true
},
"vuex": {
"version": "3.1.0",
"resolved": "http://registry.npm.taobao.org/vuex/download/vuex-3.1.0.tgz",
"integrity": "sha1-Y0uBUVzwz+l2vR/+lgF1XlH4Q7k="
"version": "3.0.1",
"resolved": "http://registry.npm.taobao.org/vuex/download/vuex-3.0.1.tgz",
"integrity": "sha1-52E1Lr4K9TfUu3Vam53Evj3379I="
},
"watchpack": {
"version": "1.6.0",
......
......@@ -7,6 +7,8 @@
"build": "vue-cli-service build"
},
"dependencies": {
"axios": "^0.18.0",
"vant": "^1.5.2",
"vue": "^2.5.21",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
......
No preview for this file type
!function(a,b){function c(){var b=f.getBoundingClientRect().width;b/i>540&&(b=540*i);var c=b/10;f.style.fontSize=c+"px",k.rem=a.rem=c}var d,e=a.document,f=e.documentElement,g=e.querySelector('meta[name="viewport"]'),h=e.querySelector('meta[name="flexible"]'),i=0,j=0,k=b.flexible||(b.flexible={});if(g){var l=g.getAttribute("content").match(/initial\-scale=([\d\.]+)/);l&&(j=parseFloat(l[1]),i=parseInt(1/j))}else if(h){var m=h.getAttribute("content");if(m){var n=m.match(/initial\-dpr=([\d\.]+)/),o=m.match(/maximum\-dpr=([\d\.]+)/);n&&(i=parseFloat(n[1]),j=parseFloat((1/i).toFixed(2))),o&&(i=parseFloat(o[1]),j=parseFloat((1/i).toFixed(2)))}}if(!i&&!j){var p=(a.navigator.appVersion.match(/android/gi),a.navigator.appVersion.match(/iphone/gi)),q=a.devicePixelRatio;i=p?q>=3&&(!i||i>=3)?3:q>=2&&(!i||i>=2)?2:1:1,j=1/i}if(f.setAttribute("data-dpr",i),!g){if(g=e.createElement("meta"),g.setAttribute("name","viewport"),g.setAttribute("content","initial-scale="+j+", maximum-scale="+j+", minimum-scale="+j+", user-scalable=no"),f.firstElementChild){f.firstElementChild.appendChild(g)}else{var r=e.createElement("div");r.appendChild(g),e.write(r.innerHTML)}}a.addEventListener("resize",function(){clearTimeout(d),d=setTimeout(c,300)},!1),a.addEventListener("pageshow",function(a){a.persisted&&(clearTimeout(d),d=setTimeout(c,300))},!1),"complete"===e.readyState?e.body.style.fontSize=12*i+"px":e.addEventListener("DOMContentLoaded",function(){e.body.style.fontSize=12*i+"px"},!1),c(),k.dpr=a.dpr=i,k.refreshRem=c,k.rem2px=function(a){var b=parseFloat(a)*this.rem;return "string"==typeof a&&a.match(/rem$/)&&(b+="px"),b},k.px2rem=function(a){var b=parseFloat(a)/this.rem;return "string"==typeof a&&a.match(/px$/)&&(b+="rem"),b}}(window,window.lib||(window.lib={}));
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<title></title>
<meta name="author" content="www.dolabank.com">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta name="full-screen" content="yes">
<meta name="browsermode" content="application">
<meta name="x5-fullscreen" content="true">
<meta name="x5-page-mode" content="app">
<meta name="description" content="猎芯网,快速成长的专业电子元器件商城,贸泽(MOUSER)全系产品、e络盟(element14)树莓派系列产品授权经销商,已获得多轮风险投资。为客户提供电子元器件现货,IC采购,进口报关,电子元器件寄售,供应链金融等一站式电子元器件采购服务。">
<meta name="keywords" content="猎芯网,电子元器件采购,电子元器件商城,电子元器件现货,IC采购网,电子元器件寄售,电子元件,元器件商城,元器件采购,电子商城,">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>ichunt3.0_h5</title>
</head>
<body>
<noscript>
<strong>We're sorry but ichunt3.0_h5 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js" type="text/javascript" charset="utf-8"></script>
<script src="<%= BASE_URL %>flexible.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<noscript>
<strong>网站出现了一点小问题,正在修复中.......</strong>
</noscript>
<div id="app"></div>
</body>
</html>
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
<div id="app">
<keep-alive exclude="">
<router-view class="router-view"></router-view>
</keep-alive>
</div>
<router-view/>
</div>
</template>
<style lang="scss">
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
#nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
<script>
export default {
name: 'app'
}
}
</style>
</script>
\ No newline at end of file
import axios from 'axios'
/**
* www.ichunt.com 正式环境
* sz.ichunt.com 测试环境
* t.ichunt.com 预发布环境
* www.liexin.com 本地回家
*/
var urlApi;
switch (window.location.hostname) {
case "www.ichunt.com":
urlApi = 'https://api.ichunt.com/';
break;
case "www.liexin.com":
urlApi = 'http://api.liexin.com/';
break;
case "sz.ichunt.com":
urlApi = 'https://szapi.ichunt.com/';
break;
case "t.ichunt.com":
urlApi = 'https://api.ichunt.com/';
break;
default:
urlApi = 'https://api.ichunt.com/';
}
export const productionUrlApi = urlApi;
export const apis = {
/**
* 商城数据获取
*/
getPointPrize: productionUrlApi + 'point/getPointPrize'
}
export const services = {
getPointPrize(Codekey, params) {
return axios.get(apis.getPointPrize, {
params: {
data: params
}
})
}
}
html {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
html * {
outline: 0;
-webkit-text-size-adjust: none !important;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}
html, body {
font-family: sans-serif;
}
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, menu, nav, section {
margin: 0;
padding: 0;
}
button, input, select, textarea {
font-size: 100%;
border: none;
-webkit-appearance: none;
}
input[type=button], input[type=file], input[type=submit] {
cursor: pointer;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
ol, ul, dl {
list-style: none;
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%;
font-weight: 500;
}
em, b, i {
font-style: normal;
}
a {
text-decoration: none;
}
img {
border: none;
}
.clr {
*zoom: 1;
clear: both;
}
.clr:after {
content: ".";
clear: both;
height: 0;
visibility: hidden;
display: block;
}
.fl {
float: left;
_display: inline;
}
.fr {
float: right;
_display: inline;
}
.va-t {
vertical-align: top;
}
.va-m {
vertical-align: middle;
}
.va-b {
vertical-align: bottom;
}
.i-hide {
display: none;
}
.i-show {
display: block;
}
.lineBlock {
display: inline-block;
*display: inline;
zoom: 1;
letter-spacing: normal;
word-spacing: normal;
}
.lbBox {
font-size: 0 !important;
*word-spacing: -1px !important;
}
.boxsiz {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html, body {
width: 100%;
height: 100%;
}
body {
overflow-x: hidden;
}
.emptys {
margin-left: -1px;
width: 1px;
height: 100%;
font-size: 0;
vertical-align: middle;
}
@media (min-width: 750px) {
html {
background: #666;
}
body {
max-width: 480px;
margin: 0 auto;
background: #fff;
}
}
@mixin dispFlex {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
@mixin boxFlex {
-webkit-box-flex: 1;
-moz-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
}
html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
html * { outline: 0; -webkit-text-size-adjust: none !important; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important; }
html, body { font-family: sans-serif; }
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, menu, nav, section { margin: 0; padding: 0; }
button, input, select, textarea { font-size: 100%; border: none; -webkit-appearance: none; }
input[type=button], input[type=file], input[type=submit] { cursor: pointer; }
table { border-collapse: collapse; border-spacing: 0; }
ol, ul, dl { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: 500; }
em, b, i { font-style: normal; }
a { text-decoration: none; }
img { border: none; }
.clr { *zoom: 1; clear: both; }
.clr:after { content: "."; clear: both; height: 0; visibility: hidden; display: block; }
.fl { float: left; _display: inline; }
.fr { float: right; _display: inline; }
.va-t { vertical-align: top; }
.va-m { vertical-align: middle; }
.va-b { vertical-align: bottom; }
.i-hide { display: none; }
.i-show { display: block; }
.lineBlock { display: inline-block; *display: inline; zoom: 1; letter-spacing: normal; word-spacing: normal; }
.lbBox { font-size: 0 !important; *word-spacing: -1px !important; }
.boxsiz { -webkit-box-sizing: border-box; box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body { overflow-x: hidden; }
.emptys { margin-left: -1px; width: 1px; height: 100%; font-size: 0; vertical-align: middle; }
@media (min-width: 750px) { html { background: #666; }
body { max-width: 480px; margin: 0 auto; background: #fff; } }
/*# sourceMappingURL=index.min.css.map */
{
"version": 3,
"mappings": "AAAA,IAAK,GACH,wBAAwB,EAAE,IAAI,EAC9B,oBAAoB,EAAE,IAAI;;AAG5B,MAAO,GACL,OAAO,EAAE,CAAC,EACV,wBAAwB,EAAE,eAAe,EACzC,2BAA2B,EAAE,2BAA2B;;AAG1D,UAAW,GACT,WAAW,EAAE,UAAU;;AAGzB,iOAAkO,GAChO,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,CAAC;;AAGZ,+BAAgC,GAC9B,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,IAAI,EACZ,kBAAkB,EAAE,IAAI;;AAG1B,wDAAyD,GACvD,MAAM,EAAE,OAAO;;AAGjB,KAAM,GACJ,eAAe,EAAE,QAAQ,EACzB,cAAc,EAAE,CAAC;;AAGnB,UAAW,GACT,UAAU,EAAE,IAAI;;AAGlB,sBAAuB,GACrB,SAAS,EAAE,IAAI,EACf,WAAW,EAAE,GAAG;;AAGlB,QAAS,GACP,UAAU,EAAE,MAAM;;AAGpB,CAAE,GACA,eAAe,EAAE,IAAI;;AAGvB,GAAI,GACF,MAAM,EAAE,IAAI;;AAGd,IAAK,GACH,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,IAAI;;AAGb,UAAW,GACT,OAAO,EAAE,GAAG,EACZ,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,KAAK;;AAGhB,GAAI,GACF,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,MAAM;;AAGlB,GAAI,GACF,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,MAAM;;AAGlB,KAAM,GACJ,cAAc,EAAE,GAAG;;AAGrB,KAAM,GACJ,cAAc,EAAE,MAAM;;AAGxB,KAAM,GACJ,cAAc,EAAE,MAAM;;AAGxB,OAAQ,GACN,OAAO,EAAE,IAAI;;AAGf,OAAQ,GACN,OAAO,EAAE,KAAK;;AAGhB,UAAW,GACT,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,CAAC,EACP,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM;;AAGtB,MAAO,GACL,SAAS,EAAE,YAAY,EACvB,aAAa,EAAE,eAAe;;AAGhC,OAAQ,GACN,kBAAkB,EAAE,UAAU,EAC9B,UAAU,EAAE,UAAU;;AAGxB,UAAW,GACT,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI;;AAGd,IAAK,GACH,UAAU,EAAE,MAAM;;AAGpB,OAAQ,GACN,WAAW,EAAE,IAAI,EACjB,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,CAAC,EACZ,cAAc,EAAE,MAAM;;AAGxB,yBAA0B,GACxB,IAAK,GACH,UAAU,EAAE,IAAI;EAElB,IAAK,GACH,SAAS,EAAE,KAAK,EAChB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,IAAI",
"sources": ["base.scss"],
"names": [],
"file": "index.min.css"
}
\ No newline at end of file
@charset "utf-8";
@import "base";
$imgUrlDev: '../img/';
$imgUrl: '../../images/app/';
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
<div class="hello">
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
export default {
bind(el, binding) {
el.addEventListener('click', function () {
function fn() {
let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
let speed = scrollTop / 12;
requestAnimationFrame(function () {
if (scrollTop > 0) {
document.documentElement.scrollTop = scrollTop - speed;
document.body.scrollTop = scrollTop - speed;
fn();
}
})
}
fn();
}, false);
}
}
\ No newline at end of file
import Vue from 'vue'
import BackTopDirective from './backTop'
export default {
install (Vue) {
Vue.directive('backTop', BackTopDirective);
}
}
import Util from '../util/index'
/**
* 格式化日期
* @param value
* @returns {string}
*/
export const dateTimeFormate = (value) => {
var date = new Date();
date.setTime(value * 1000);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
var d = date.getDate();
d = d < 10 ? ('0' + d) : d;
var h = date.getHours();
h = h < 10 ? ('0' + h) : h;
var minute = date.getMinutes();
var second = date.getSeconds();
minute = minute < 10 ? ('0' + minute) : minute;
second = second < 10 ? ('0' + second) : second;
return y + '-' + m + '-' + d + ' ';
}
import {dateTimeFormate} from './formate';
export default {
dateTimeFormate
};
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import {router} from './router';
import store from './store/store'
import filters from './filters'
Vue.config.productionTip = false
//css全局加载
import 'vant/lib/index.css';
import '@/assets/css/index.min.css'
//过滤器遍历
Object.keys(filters).forEach(key => Vue.filter(key, filters[key]));
Vue.config.productionTip = false;
new Vue({
router,
......
import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
const Home = resolve => require(['@/views/home/Index'], resolve)
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: Home
},
{
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
const routes = [
{
path: '/home',
component: Home,
meta: {
title: '猎芯网'
}
]
})
},
{
path: '/',
redirect: '/home'
},
{
path: '*',
redirect: '/'
}
];
routes.forEach(route => {
route.path = route.path || '/' + (route.name || '');
});
const router = new Router({routes});
router.beforeEach((to, from, next) => {
const title = to.meta && to.meta.title;
if (title) {
document.title = title;
}
next();
});
export {
router
};
\ No newline at end of file
import axios from 'axios'
import {services as Services} from '../../api/index'
const state = {
appindex: {}
}
const mutations = {
appIndex(state, payload) {
}
}
const actions = {
appIndex({commit}, payload) {
var params = {
pf: 1,
limit: 1000
};
Services.getPointPrize(params).then(function (res) {
});
}
}
const getters = {}
export default {
state,
mutations,
actions,
getters
}
import Vue from 'vue'
import Vuex from 'vuex'
import home from './modules/home'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
home
}
})
export default {
/**
* 设置cookie
* @param name
* @param value
* @param iDay
*/
setCookie: function (name, value, iDay, type) {
var oDate = new Date();
if (type == 1) {
var expires = new Date();
expires.setTime(oDate.getTime() + 1000 * 60 * 60 * 24);
document.cookie = name + '=' + value + ';expires=' + expires.toGMTString();
} else {
oDate.setDate(oDate.getDate() + iDay);
document.cookie = name + '=' + value + ';expires=' + oDate;
}
},
/**
* 获取cookie
* @param name
* @returns {*}
*/
getCookie: function (name) {
var strCookie = document.cookie;
var arrCookie = strCookie.split("; ");
for (var i = 0; i < arrCookie.length; i++) {
var arr = arrCookie[i].split("=");
if (name == arr[0]) {
return arr[1];
}
}
return "";
},
/**
* 删除cookie
* @param name
*/
delCookie: function (name) {
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval = this.getCookie(name);
if (cval != null)
document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
}
}
<template>
<section>
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" loading-text="正在刷新">
<p class="text">刷新次数: {{ count }}</p>
<ul class="list">
<li class="boxsiz">
<img src="../../assets/images/3bd347e44233a868c99cf0fe560232be.jpg" alt="">
</li>
<li class="boxsiz">
<img src="../../assets/images/4e3ea0898b1c2c416eec8c11c5360833.jpg" alt="">
</li>
<li class="boxsiz">
<img src="../../assets/images/c0dab461920687911536621b345a0bc9.jpg" alt="">
</li>
</ul>
</van-pull-refresh>
</section>
</template>
<script>
import Vue from 'vue'
import HelloWorld from '@/components/HelloWorld.vue'
import {PullRefresh} from 'vant';
Vue.use(PullRefresh);
export default {
name: 'home',
data() {
return {
count: 0,
isLoading: false
}
},
created() {
},
methods: {
onRefresh() {
setTimeout(() => {
this.$toast('刷新成功');
this.isLoading = false;
this.count++;
}, 500);
}
},
components: {
HelloWorld
}
}
</script>
<style scoped lang="scss">
.text {
text-align: center;
color: #666;
line-height: 30px;
}
.list {
li {
padding: 15px;
width: 100%;
img {
width: 100%;
height: 250px;
margin: 10px 0 0;
background-color: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
background-size: 315px 250px;
background-position: 15px;
background-repeat: no-repeat;
box-sizing: border-box;
}
}
}
</style>
\ No newline at end of file
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'https://api.ichunt.com',
changeOrigin: true,
ws: true,
pathRewrite: {
'^/api': ''
}
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment