Commit 201bd586 by 梁建民

init

parents
Showing with 1033 additions and 0 deletions
.DS_Store
node_modules
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
# ichunt3.0_h5
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Run your tests
```
npm run test
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
['@vue/app', {
polyfills: [
'es6.promise',
'es6.symbol'
]
}]
]
}
\ No newline at end of file
This diff could not be displayed because it is too large.
{
"name": "ichunt3.0_h5",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"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"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.3.0",
"@vue/cli-service": "^3.3.0",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1",
"vue-template-compiler": "^2.5.21"
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
No preview for this file type
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<title></title>
<meta name="author" content="www.ichunt.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">
<link rel="stylesheet" href="<%= BASE_URL %>static/iconfont.css">
<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 %>static/flexible.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<noscript>
<strong>网站出现了一点小问题,正在修复中.......</strong>
</noscript>
<div id="app"></div>
<script type="text/javascript">
//百度统计
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?0c48775abb60d7d7aeb4343bca7a239b";
document.getElementsByTagName('head')[0].appendChild(hm);
})();
//腾讯统计
var host_v = window.location.host;
if (host_v == "m.ichunt.com") {
if (isMiniProgram) {
var _mtac = {};
(function () {
var mta = document.createElement("script");
mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "500626053");
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(mta, s);
})();
} else {
var _mtac = {"performanceMonitor": 1, "senseQuery": 1};
(function () {
var mta = document.createElement("script");
mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "500482933");
mta.setAttribute("cid", "500485800");
document.getElementsByTagName('head')[0].appendChild(mta);
})();
}
}
</script>
<script type="text/javascript">
//神策统计
var host_v = window.location.host;
var __PUBLIC__;
switch (window.location.hostname) {
case "www.ichunt.com":
__PUBLIC__ = 'https://static.ichunt.com/dist';
break;
case "www.liexin.com":
__PUBLIC__ = 'http://res.liexin.com/dist';
break;
case "sz.ichunt.com":
__PUBLIC__ = 'https://szm.ichunt.com/v3/dist';
break;
case "t.ichunt.com":
__PUBLIC__ = 'https://t.ichunt.com/v3/dist';
break;
default:
__PUBLIC__ = 'http://res.liexin.com/dist';
}
function getCookie(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 "";
}
if (host_v == "m.ichunt.com" || host_v == "sc.ichunt.com") {
(function (para) {
var p = para.sdk_url, n = para.name, w = window, d = document, s = 'script', x = null, y = null;
if (typeof (w['sensorsDataAnalytic201505']) !== 'undefined') {
return false;
}
w['sensorsDataAnalytic201505'] = n;
w[n] = w[n] || function (a) {
return function () {
(w[n]._q = w[n]._q || []).push([a, arguments]);
}
};
var ifs = ['track', 'quick', 'register', 'registerPage', 'registerOnce', 'trackSignup', 'trackAbtest', 'setProfile', 'setOnceProfile', 'appendProfile', 'incrementProfile', 'deleteProfile', 'unsetProfile', 'identify', 'login', 'logout', 'trackLink', 'clearAllRegister', 'getAppStatus'];
for (var i = 0; i < ifs.length; i++) {
w[n][ifs[i]] = w[n].call(null, ifs[i]);
}
if (!w[n]._t) {
x = d.createElement(s), y = d.getElementsByTagName(s)[0];
x.async = 1;
x.src = p;
x.setAttribute('charset', 'UTF-8');
y.parentNode.insertBefore(x, y);
w[n].para = para;
}
})({
sdk_url: __PUBLIC__ + '/res/m/js/global/sensorsdata.min.js',
heatmap_url: __PUBLIC__ + '/res/m/js/global/heatmap.min.js',
name: 'sensors',
server_url: 'http://shence.ichunt.com:8106/sa?project=production',
heatmap: {}
});
//以异步加载 SDK 为例,神策 SDK 初始化完成,此时调用设置公共属性的方法,来保证之后的事件都有这两个属性。
sensors.registerPage({
current_url: location.href,
referrer: document.referrer,
platformType: '2', //H5
is_login: (getCookie("Yo4teW_uid") ? true : false),
user_rank: '0'
});
sensors.quick('autoTrack');
} else {
(function (para) {
var p = para.sdk_url, n = para.name, w = window, d = document, s = 'script', x = null, y = null;
if (typeof (w['sensorsDataAnalytic201505']) !== 'undefined') {
return false;
}
w['sensorsDataAnalytic201505'] = n;
w[n] = w[n] || function (a) {
return function () {
(w[n]._q = w[n]._q || []).push([a, arguments]);
}
};
var ifs = ['track', 'quick', 'register', 'registerPage', 'registerOnce', 'trackSignup', 'trackAbtest', 'setProfile', 'setOnceProfile', 'appendProfile', 'incrementProfile', 'deleteProfile', 'unsetProfile', 'identify', 'login', 'logout', 'trackLink', 'clearAllRegister', 'getAppStatus'];
for (var i = 0; i < ifs.length; i++) {
w[n][ifs[i]] = w[n].call(null, ifs[i]);
}
if (!w[n]._t) {
x = d.createElement(s), y = d.getElementsByTagName(s)[0];
x.async = 1;
x.src = p;
x.setAttribute('charset', 'UTF-8');
y.parentNode.insertBefore(x, y);
w[n].para = para;
}
})({
sdk_url: __PUBLIC__ + '/res/m/js/global/sensorsdata.min.js',
heatmap_url: __PUBLIC__ + '__PUBLIC__/res/m/js/global/heatmap.min.js',
name: 'sensors',
server_url: 'http://shence.ichunt.com:8106/sa',
heatmap: {}
});
//以异步加载 SDK 为例,神策 SDK 初始化完成,此时调用设置公共属性的方法,来保证之后的事件都有这两个属性。
sensors.registerPage({
current_url: location.href,
referrer: document.referrer,
platformType: '2', //H5
is_login: (getCookie("Yo4teW_uid") ? true : false),
user_rank: '0'
});
sensors.quick('autoTrack');
}
</script>
</body>
</html>
!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
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
<template>
<div id="app">
<keep-alive exclude="">
<router-view class="router-view"></router-view>
</keep-alive>
</div>
</template>
<script>
export default {
name: 'app'
}
</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 = '/api/';
}
export const productionUrlApi = urlApi;
export const apis = {
/**
* 首页
*/
index: productionUrlApi + 'index',
/**
* 获取购物车数量
*/
cartCount: productionUrlApi + 'cart/count'
}
export const services = {
index(params) {
return axios.get(apis.index, {
params: {
data: params
}
})
},
cartCount(params) {
return axios.get(apis.cartCount, {
params: {
data: params
}
})
}
}
{
"version": 3,
"mappings": "AAAA,UAOC,GANC,WAAW,EAAE,UAAU,EACvB,GAAG,EAAE,2CAA2C;EAAE,QAAQ;AAC1D,GAAG,EAAE,umUAG6D;EAAE,cAAc;AAGpF,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,qBAAqB,EAClC,UAAU,EAAE,MAAM,EAClB,sBAAsB,EAAE,WAAW,EACnC,uBAAuB,EAAE,SAAS;;AAGpC,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;;AA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I,EACnB,gBAAgB,EAAE,IAAI,EACtB,SAAS,EAAE,eAAe,EAC1B,gBAAgB,EAAE,IAAI;AAExB,oBAAE,GACA,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,IAAI,EACf,UAAU,EAAE,MAAM;AAEpB,yBAAO,GACL,UAAU,EAAE,oDAAoD,EAChE,eAAe,EAAE,KAAK;AAExB,yBAAO,GACL,UAAU,EAAE,oDAAoD,EAChE,eAAe,EAAE,KAAK;AAExB,yBAAO,GACL,UAAU,EAAE,oDAAoD,EAChE,eAAe,EAAE,KAAK;AAExB,yBAAO,GACL,UAAU,EAAE,oDAAoD,EAChE,eAAe,EAAE,KAAK;AAExB,yBAAO,GACL,UAAU,EAAE,oDAAoD,EAChE,eAAe,EAAE,KAAK;AAExB,oBAAE,GACA,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,IAAI,EACf,KAAK,EAAE,OAAO;AAIhB,uBAAC,GACC,KAAK,EAAE,OAAO;AAEhB,4BAAO,GACL,UAAU,EAAE,sDAAsD,EAClE,eAAe,EAAE,KAAK;AAExB,4BAAO,GACL,UAAU,EAAE,sDAAsD,EAClE,eAAe,EAAE,KAAK;AAExB,4BAAO,GACL,UAAU,EAAE,sDAAsD,EAClE,eAAe,EAAE,KAAK;AAExB,4BAAO,GACL,UAAU,EAAE,sDAAsD,EAClE,eAAe,EAAE,KAAK;AAExB,4BAAO,GACL,UAAU,EAAE,sDAAsD,EAClE,eAAe,EAAE,KAAK;AAExB,uBAAE,GACA,KAAK,EAAE,OAAO",
"sources": ["base.scss","global.scss"],
"names": [],
"file": "global.min.css"
}
\ No newline at end of file
@charset "utf-8";
@import "base";
$imgUrlDev: '../img/';
$imgUrl: '../images/';
#app {
height: 100%;
}
.navigator {
order: 1;
width: 100%;
height: 2rem;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 2019;
ul {
@include dispFlex();
height: 100%;
background-color: #ffffff;
box-shadow: 0rem 0rem 0.12rem 0rem rgba(196, 196, 196, 0.87);
justify-content: center;
align-items: center;
li {
position: relative;
@include boxFlex();
text-align: center;
a {
display: block;
.cart {
position: absolute;
left: 50%;
top: -8px;
margin-left: -2px;
color: #fff;
font-size: 12px;
font-weight: 500;
text-align: center;
padding: 0 3px;
min-width: 16px;
line-height: 14px;
border: 1px solid #fff;
border-radius: 16px;
background-color: #f44;
transform: translateX(50%);
transform-origin: 100%;
}
i {
width: 26px;
height: 26px;
display: block;
margin: 0 auto;
color: #d5d5d5;
font-size: 25px;
text-align: center;
}
.ico-1 {
background: url("#{$imgUrl}home/i1.png") no-repeat center center;
background-size: cover;
}
.ico-2 {
background: url("#{$imgUrl}home/i2.png") no-repeat center center;
background-size: cover;
}
.ico-3 {
background: url("#{$imgUrl}home/i3.png") no-repeat center center;
background-size: cover;
}
.ico-4 {
background: url("#{$imgUrl}home/i4.png") no-repeat center center;
background-size: cover;
}
.ico-5 {
background: url("#{$imgUrl}home/i5.png") no-repeat center center;
background-size: cover;
}
p {
margin-top: 0.133rem;
font-size: 10px;
color: #adadad;
}
}
&.curr {
i{
color: #57a1f4;
}
.ico-1 {
background: url("#{$imgUrl}home/i1_s.png") no-repeat center center;
background-size: cover;
}
.ico-2 {
background: url("#{$imgUrl}home/i2_s.png") no-repeat center center;
background-size: cover;
}
.ico-3 {
background: url("#{$imgUrl}home/i3_s.png") no-repeat center center;
background-size: cover;
}
.ico-4 {
background: url("#{$imgUrl}home/i4_s.png") no-repeat center center;
background-size: cover;
}
.ico-5 {
background: url("#{$imgUrl}home/i5_s.png") no-repeat center center;
background-size: cover;
}
p {
color: #4e8eee;
}
}
}
}
}
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
<template>
<div class="hello">
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<style scoped lang="scss">
</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/store'
import filters from './filters'
//css全局加载
import 'vant/lib/index.css';
import '@/assets/css/global.min.css'
//过滤器遍历
Object.keys(filters).forEach(key => Vue.filter(key, filters[key]));
Vue.config.productionTip = false;
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
import Vue from 'vue'
import Router from 'vue-router'
const Home = resolve => require(['@/views/home/Index'], resolve)
Vue.use(Router)
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 Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
},
mutations: {
},
actions: {
}
})
import Vue from 'vue'
import axios from 'axios'
import {services as Services} from '../../api/index'
import {Toast} from 'vant';
Vue.use(Toast);
const state = {
cartCount: ''
}
const mutations = {
cartCount(state, payload) {
state.cartCount = payload.data == 0 ? '' : payload.data;
}
}
const actions = {
cartCount({commit}, payload) {
Services.cartCount().then(function (res) {
let data = res.data;
if (data.err_code == 0) {
commit({
type: 'cartCount',
data: data.data
});
}
}).catch(function (err) {
Toast({
message: '网络出现问题,请重试',
duration: 1500
});
});
}
}
const getters = {}
export default {
state,
mutations,
actions,
getters
}
import axios from 'axios'
import {services as Services} from '../../api/index'
const state = {
index: {}
}
const mutations = {
index(state, payload) {
state.index = payload.data;
}
}
const actions = {
index({commit}, payload) {
Services.index().then(function (res) {
let data = res.data;
if (data.err_code == 0) {
commit({
type: 'index',
data: data.data
});
}
}).catch(function (err) {
Toast({
message: '网络出现问题,请重试',
duration: 1500
});
});
}
}
const getters = {}
export default {
state,
mutations,
actions,
getters
}
import Vue from 'vue'
import Vuex from 'vuex'
import home from './modules/home'
import common from './modules/common'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
home,
common
}
})
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>
<div class="navigator">
<ul class="boxsiz">
<li class="curr">
<a href="/v3?ptag=index-bottomnav">
<i class="iconfont icon-shouye"></i>
<p>首页</p>
</a>
</li>
<li>
<a href="/v3/lxshop?ptag=index-bottomnav">
<i class="iconfont icon-ziying"></i>
<p>自营商城</p>
</a>
</li>
<li>
<a href="/v3/xianhuo?ptag=index-bottomnav">
<i class="iconfont icon-lianying"></i>
<p>联营商城</p>
</a>
</li>
<li>
<a href="/v3/joincart?ptag=index-bottomnav">
<i class="iconfont icon-gouwuche1"></i>
<p>购物车</p>
<span class="cart boxsiz">{{cartCount>99 ?'99+': cartCount}}</span>
</a>
</li>
<li>
<a href="/v3/user?ptag=index-bottomnav">
<i class="iconfont icon-huiyuanzhongxin1"></i>
<p>会员中心</p>
</a>
</li>
</ul>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: 'navigator',
computed: mapState({
cartCount: state => state.common.cartCount
}),
created() {
/*this.$store.dispatch({
type: 'cartCount'
})*/
}
}
</script>
\ No newline at end of file
<template>
<van-swipe :autoplay="3000000" indicator-color="#ffffff" :loop="false">
<template v-if="slidedata">
<van-swipe-item v-for="(item, index) in slidedata" :key="index">
<img :src="item.images" class="slide-pic">
</van-swipe-item>
</template>
<template v-else>
<van-swipe-item>
<img src="../../assets/images/home/banner.png" class="slide-pic">
</van-swipe-item>
</template>
</van-swipe>
</template>
<script>
import Vue from 'vue';
import {Swipe, SwipeItem} from 'vant';
Vue.use(Swipe).use(SwipeItem);
export default {
name: 'slide',
props: {
slidedata: Array
}
}
</script>
<style lang="scss">
.slide-pic {
width: 100%;
height: 100%;
}
.van-swipe {
&__indicators {
left: auto;
right: 0.773rem;
bottom: 0.92rem;
}
&__indicator {
width: 5px;
height: 5px;
opacity: 1;
transition: all 0.2s ease;
}
&__indicator--active {
width: 13px;
height: 5px;
background-color: #ffffff;
border-radius: 10px;
}
}
</style>
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
<!DOCTYPE HTML><html lang=zh-CN><head><title></title><meta name=author content=www.ichunt.com><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,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=/favicon.ico><link rel=stylesheet href=/static/iconfont.css><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js charset=utf-8></script><script src=/static/flexible.min.js charset=utf-8></script><link href=/css/chunk-738481bd.a278fd5a.css rel=prefetch><link href=/js/chunk-738481bd.0aa7259d.js rel=prefetch><link href=/css/app.49eecd25.css rel=preload as=style><link href=/css/chunk-vendors.ec7d33f1.css rel=preload as=style><link href=/js/app.6f6d4d1c.js rel=preload as=script><link href=/js/chunk-vendors.46886506.js rel=preload as=script><link href=/css/chunk-vendors.ec7d33f1.css rel=stylesheet><link href=/css/app.49eecd25.css rel=stylesheet></head><body><noscript><strong>网站出现了一点小问题,正在修复中.......</strong></noscript><div id=app></div><script>//百度统计
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?0c48775abb60d7d7aeb4343bca7a239b";
document.getElementsByTagName('head')[0].appendChild(hm);
})();
//腾讯统计
var host_v = window.location.host;
if (host_v == "m.ichunt.com") {
if (isMiniProgram) {
var _mtac = {};
(function () {
var mta = document.createElement("script");
mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "500626053");
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(mta, s);
})();
} else {
var _mtac = {"performanceMonitor": 1, "senseQuery": 1};
(function () {
var mta = document.createElement("script");
mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "500482933");
mta.setAttribute("cid", "500485800");
document.getElementsByTagName('head')[0].appendChild(mta);
})();
}
}</script><script>//神策统计
var host_v = window.location.host;
var __PUBLIC__;
switch (window.location.hostname) {
case "www.ichunt.com":
__PUBLIC__ = 'https://static.ichunt.com/dist';
break;
case "www.liexin.com":
__PUBLIC__ = 'http://res.liexin.com/dist';
break;
case "sz.ichunt.com":
__PUBLIC__ = 'https://szm.ichunt.com/v3/dist';
break;
case "t.ichunt.com":
__PUBLIC__ = 'https://t.ichunt.com/v3/dist';
break;
default:
__PUBLIC__ = 'http://res.liexin.com/dist';
}
function getCookie(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 "";
}
if (host_v == "m.ichunt.com" || host_v == "sc.ichunt.com") {
(function (para) {
var p = para.sdk_url, n = para.name, w = window, d = document, s = 'script', x = null, y = null;
if (typeof (w['sensorsDataAnalytic201505']) !== 'undefined') {
return false;
}
w['sensorsDataAnalytic201505'] = n;
w[n] = w[n] || function (a) {
return function () {
(w[n]._q = w[n]._q || []).push([a, arguments]);
}
};
var ifs = ['track', 'quick', 'register', 'registerPage', 'registerOnce', 'trackSignup', 'trackAbtest', 'setProfile', 'setOnceProfile', 'appendProfile', 'incrementProfile', 'deleteProfile', 'unsetProfile', 'identify', 'login', 'logout', 'trackLink', 'clearAllRegister', 'getAppStatus'];
for (var i = 0; i < ifs.length; i++) {
w[n][ifs[i]] = w[n].call(null, ifs[i]);
}
if (!w[n]._t) {
x = d.createElement(s), y = d.getElementsByTagName(s)[0];
x.async = 1;
x.src = p;
x.setAttribute('charset', 'UTF-8');
y.parentNode.insertBefore(x, y);
w[n].para = para;
}
})({
sdk_url: __PUBLIC__ + '/res/m/js/global/sensorsdata.min.js',
heatmap_url: __PUBLIC__ + '/res/m/js/global/heatmap.min.js',
name: 'sensors',
server_url: 'http://shence.ichunt.com:8106/sa?project=production',
heatmap: {}
});
//以异步加载 SDK 为例,神策 SDK 初始化完成,此时调用设置公共属性的方法,来保证之后的事件都有这两个属性。
sensors.registerPage({
current_url: location.href,
referrer: document.referrer,
platformType: '2', //H5
is_login: (getCookie("Yo4teW_uid") ? true : false),
user_rank: '0'
});
sensors.quick('autoTrack');
} else {
(function (para) {
var p = para.sdk_url, n = para.name, w = window, d = document, s = 'script', x = null, y = null;
if (typeof (w['sensorsDataAnalytic201505']) !== 'undefined') {
return false;
}
w['sensorsDataAnalytic201505'] = n;
w[n] = w[n] || function (a) {
return function () {
(w[n]._q = w[n]._q || []).push([a, arguments]);
}
};
var ifs = ['track', 'quick', 'register', 'registerPage', 'registerOnce', 'trackSignup', 'trackAbtest', 'setProfile', 'setOnceProfile', 'appendProfile', 'incrementProfile', 'deleteProfile', 'unsetProfile', 'identify', 'login', 'logout', 'trackLink', 'clearAllRegister', 'getAppStatus'];
for (var i = 0; i < ifs.length; i++) {
w[n][ifs[i]] = w[n].call(null, ifs[i]);
}
if (!w[n]._t) {
x = d.createElement(s), y = d.getElementsByTagName(s)[0];
x.async = 1;
x.src = p;
x.setAttribute('charset', 'UTF-8');
y.parentNode.insertBefore(x, y);
w[n].para = para;
}
})({
sdk_url: __PUBLIC__ + '/res/m/js/global/sensorsdata.min.js',
heatmap_url: __PUBLIC__ + '__PUBLIC__/res/m/js/global/heatmap.min.js',
name: 'sensors',
server_url: 'http://shence.ichunt.com:8106/sa',
heatmap: {}
});
//以异步加载 SDK 为例,神策 SDK 初始化完成,此时调用设置公共属性的方法,来保证之后的事件都有这两个属性。
sensors.registerPage({
current_url: location.href,
referrer: document.referrer,
platformType: '2', //H5
is_login: (getCookie("Yo4teW_uid") ? true : false),
user_rank: '0'
});
sensors.quick('autoTrack');
}</script><script src=/js/chunk-vendors.46886506.js></script><script src=/js/app.6f6d4d1c.js></script></body></html>
\ No newline at end of file
(function(t){function e(e){for(var r,a,i=e[0],u=e[1],s=e[2],p=0,l=[];p<i.length;p++)a=i[p],o[a]&&l.push(o[a][0]),o[a]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);f&&f(e);while(l.length)l.shift()();return c.push.apply(c,s||[]),n()}function n(){for(var t,e=0;e<c.length;e++){for(var n=c[e],r=!0,a=1;a<n.length;a++){var i=n[a];0!==o[i]&&(r=!1)}r&&(c.splice(e--,1),t=u(u.s=n[0]))}return t}var r={},a={app:0},o={app:0},c=[];function i(t){return u.p+"js/"+({}[t]||t)+"."+{"chunk-738481bd":"0aa7259d"}[t]+".js"}function u(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,u),n.l=!0,n.exports}u.e=function(t){var e=[],n={"chunk-738481bd":1};a[t]?e.push(a[t]):0!==a[t]&&n[t]&&e.push(a[t]=new Promise(function(e,n){for(var r="css/"+({}[t]||t)+"."+{"chunk-738481bd":"a278fd5a"}[t]+".css",o=u.p+r,c=document.getElementsByTagName("link"),i=0;i<c.length;i++){var s=c[i],p=s.getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(p===r||p===o))return e()}var l=document.getElementsByTagName("style");for(i=0;i<l.length;i++){s=l[i],p=s.getAttribute("data-href");if(p===r||p===o)return e()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=e,f.onerror=function(e){var r=e&&e.target&&e.target.src||o,c=new Error("Loading CSS chunk "+t+" failed.\n("+r+")");c.request=r,delete a[t],f.parentNode.removeChild(f),n(c)},f.href=o;var d=document.getElementsByTagName("head")[0];d.appendChild(f)}).then(function(){a[t]=0}));var r=o[t];if(0!==r)if(r)e.push(r[2]);else{var c=new Promise(function(e,n){r=o[t]=[e,n]});e.push(r[2]=c);var s,p=document.createElement("script");p.charset="utf-8",p.timeout=120,u.nc&&p.setAttribute("nonce",u.nc),p.src=i(t),s=function(e){p.onerror=p.onload=null,clearTimeout(l);var n=o[t];if(0!==n){if(n){var r=e&&("load"===e.type?"missing":e.type),a=e&&e.target&&e.target.src,c=new Error("Loading chunk "+t+" failed.\n("+r+": "+a+")");c.type=r,c.request=a,n[1](c)}o[t]=void 0}};var l=setTimeout(function(){s({type:"timeout",target:p})},12e4);p.onerror=p.onload=s,document.head.appendChild(p)}return Promise.all(e)},u.m=t,u.c=r,u.d=function(t,e,n){u.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},u.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},u.t=function(t,e){if(1&e&&(t=u(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(u.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)u.d(n,r,function(e){return t[e]}.bind(null,r));return n},u.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return u.d(e,"a",e),e},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},u.p="/",u.oe=function(t){throw console.error(t),t};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],p=s.push.bind(s);s.push=e,s=s.slice();for(var l=0;l<s.length;l++)e(s[l]);var f=p;c.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("56d7")},"56d7":function(t,e,n){"use strict";n.r(e);var r=n("e862"),a=n.n(r),o=(n("3c1b"),n("bc97"),n("c912"),n("1cc5")),c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("keep-alive",{attrs:{exclude:""}},[n("router-view",{staticClass:"router-view"})],1)],1)},i=[],u={name:"app"},s=u,p=n("25c1"),l=Object(p["a"])(s,c,i,!1,null,null,null);l.options.__file="App.vue";var f=l.exports,d=(n("d85c"),n("081a")),h=function(t){return n.e("chunk-738481bd").then(function(){var e=[n("9553")];t.apply(null,e)}.bind(this)).catch(n.oe)};o["a"].use(d["a"]);var m=[{path:"/home",component:h,meta:{title:"猎芯网"}},{path:"/",redirect:"/home"},{path:"*",redirect:"/"}];m.forEach(function(t){t.path=t.path||"/"+(t.name||"")});var v=new d["a"]({routes:m});v.beforeEach(function(t,e,n){var r=t.meta&&t.meta.title;r&&(document.title=r),n()});var g,b=n("52c1"),w=n("7f43"),y=n.n(w);switch(window.location.hostname){case"www.ichunt.com":g="https://api.ichunt.com/";break;case"www.liexin.com":g="http://api.liexin.com/";break;case"sz.ichunt.com":g="https://szapi.ichunt.com/";break;case"t.ichunt.com":g="https://api.ichunt.com/";break;default:g="/api/"}var P=g,k={getPointPrize:P+"point/getPointPrize",cartCount:P+"cart/count"},x={getPointPrize:function(t){return y.a.get(k.getPointPrize,{params:{data:t}})},cartCount:function(t){return y.a.get(k.cartCount,{params:{data:t}})}},C={appindex:{}},j={appIndex:function(t,e){}},E={appIndex:function(t,e){t.commit}},O={},_={state:C,mutations:j,actions:E,getters:O},T=n("02a4");o["a"].use(T["d"]);var S={cartCount:""},z={cartCount:function(t,e){t.cartCount=0==e.data?"":e.data}},M={cartCount:function(t,e){var n=t.commit;x.cartCount().then(function(t){var e=t.data;0==e.err_code&&n({type:"cartCount",data:e.data})}).catch(function(t){Object(T["d"])({message:"网络出现问题,请重试",duration:1500})})}},A={},N={state:S,mutations:z,actions:M,getters:A};o["a"].use(b["a"]);var B=new b["a"].Store({modules:{home:_,common:N}}),q=(n("af3c"),function(t){var e=new Date;e.setTime(1e3*t);var n=e.getFullYear(),r=e.getMonth()+1;r=r<10?"0"+r:r;var a=e.getDate();a=a<10?"0"+a:a;var o=e.getHours();o=o<10?"0"+o:o;var c=e.getMinutes(),i=e.getSeconds();return c=c<10?"0"+c:c,i=i<10?"0"+i:i,n+"-"+r+"-"+a+" "}),D={dateTimeFormate:q};n("093c"),n("bfd9");a()(D).forEach(function(t){return o["a"].filter(t,D[t])}),o["a"].config.productionTip=!1,new o["a"]({router:v,store:B,render:function(t){return t(f)}}).$mount("#app")},bfd9:function(t,e,n){}});
//# sourceMappingURL=app.6f6d4d1c.js.map
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
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