Commit 76d1cc2c by 梁建民

bug

parent e033a375
......@@ -7,12 +7,6 @@
</template>
<script>
export default {
name: 'app',
created() {
//微信授权
this.$store.dispatch({
type: 'authorization'
})
}
name: 'app'
}
</script>
\ No newline at end of file
......@@ -70,7 +70,7 @@ export const apis = {
/**
* 微信授权
*/
wxaccess: productionUrl + 'api/wxaccess',
wxaccess: productionUrl + 'api/wxaccess'
}
export const services = {
......
import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import {router} from './router';
import {router} from './router'
import store from './store/store'
import filters from './filters'
import directive from './directive'
import md5 from 'js-md5';
import Util from './util/index';
import md5 from 'js-md5'
import {services as Services} from './api/index'
import Util from './util/index'
//css全局加载
import 'vant/lib/index.css';
......@@ -33,6 +34,15 @@ if (Yo4teW_gid == null) {
Util.setCookie('Yo4teW_gid', mdStr, 1, window.cookieHostname);
}
//微信授权
var params = Util.getParams();
Services.wxaccess(params).then((res) => {
let data = res.data;
if (data.data) {
window.location.href = data.data;
}
});
new Vue({
router,
store,
......
import Vue from 'vue'
import {services as Services} from '../../api/index'
import {Toast} from 'vant';
import Util from "../../util";
import {Toast} from 'vant'
import Util from "../../util"
Vue.use(Toast);
......@@ -29,7 +29,7 @@ const mutations = {
const actions = {
cartCount({commit}, payload) {
Services.cartCount().then(function (res) {
Services.cartCount().then((res) => {
let data = res.data;
if (data.err_code == 0) {
commit({
......@@ -38,18 +38,18 @@ const actions = {
});
}
}).catch(function (err) {
console.log('网络出现问题,请重试');
});
},
loginCheck({commit}, payload) {
Services.loginCheck().then(function (res) {
Services.loginCheck().then((res) => {
let data = res.data;
commit({
type: 'loginCheck',
data: data
});
}).catch(function (err) {
console.log('网络出现问题,请重试');
});
},
customsrService({commit}, payload) {
......@@ -57,31 +57,22 @@ const actions = {
pf: window.lxpf,
searchModel: ''
}
Services.customsrService(params).then(function (res) {
Services.customsrService(params).then((res) => {
}).catch(function (err) {
console.log('网络出现问题,请重试');
});
},
getCommonParams({commit}, payload) {
var params = Util.getParams();
Services.getCommonParams(params).then(function (res) {
Services.getCommonParams(params).then((res) => {
let data = res.data;
commit({
type: 'phpParams',
data: data
});
}).catch(function (err) {
});
},
authorization({commit}, payload) {
var params = Util.getParams();
Services.wxaccess(params).then((res) => {
let data = res.data;
if (data.data) {
window.location.href = data.data;
}
console.log('网络出现问题,请重试');
});
}
}
......
import Vue from 'vue'
import {services as Services} from '../../api/index'
import {Toast} from 'vant';
import Util from '../../util/index';
import {services as Services} from '../../api/index'
import Util from '../../util/index'
Vue.use(Toast);
const state = {
index: {},
loading:true
loading: true
}
const mutations = {
......@@ -18,19 +18,19 @@ const mutations = {
const actions = {
index({commit}, payload) {
state.loading=true;
var params=Util.getParams();
Services.index(params).then(function (res) {
state.loading = true;
var params = Util.getParams();
Services.index(params).then((res) => {
let data = res.data;
state.loading = false;
if (data.err_code == 0) {
commit({
type: 'index',
data: data.data
});
state.loading=false;
}
}).catch(function (err) {
state.loading=false;
state.loading = false;
});
}
}
......
import {hex_sha1} from '../util/des';
import {hex_sha1} from '../util/des'
var qs = require('qs');
......
......@@ -286,29 +286,21 @@
},
onRefresh() {
setTimeout(() => {
this.isLoading = false;
this.$store.dispatch({
type: 'index'
})
this.isLoading = false;
}, 1000);
},
recordFn(type) {
if (type == 'login') {
try {
sensors.track('TopNavClick', {
top_nav_click: "h5-登录"
});
} catch (e) {
}
sensors.track('TopNavClick', {
top_nav_click: "h5-登录"
});
} else if (type == 'search') {
try {
sensors.track('TopNavClick', {
top_nav_click: "h5-搜索"
});
} catch (e) {
}
sensors.track('TopNavClick', {
top_nav_click: "h5-搜索"
});
}
},
jump() {
......
<!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 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=//szh5static.ichunt.com/favicon.ico><script src=get_time.php></script><script>var fwtimes = window.fwtime - (Math.floor((new Date().getTime())/1000)); //获取服务器时间差</script><link rel=stylesheet href=//szh5static.ichunt.com/static/css/iconfont.css><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js charset=utf-8></script><script src=//szh5static.ichunt.com/static/js/flexible.min.js charset=utf-8></script><script src=//szh5static.ichunt.com/static/js/shence.min.js charset=utf-8></script><link href=//szh5static.ichunt.com/css/chunk-03f01e17.897a7236.css rel=prefetch><link href=//szh5static.ichunt.com/js/chunk-03f01e17.b7173c64.js rel=prefetch><link href=//szh5static.ichunt.com/css/app.5642d040.css rel=preload as=style><link href=//szh5static.ichunt.com/css/chunk-vendors.521d5c8e.css rel=preload as=style><link href=//szh5static.ichunt.com/js/app.91a126e8.js rel=preload as=script><link href=//szh5static.ichunt.com/js/chunk-vendors.9ec4e864.js rel=preload as=script><link href=//szh5static.ichunt.com/css/chunk-vendors.521d5c8e.css rel=stylesheet><link href=//szh5static.ichunt.com/css/app.5642d040.css rel=stylesheet></head><body><noscript><strong>网站出现了一点小问题,正在修复中.......</strong></noscript><div id=app></div><script>function SetCookie(name, value, time, domain) {
<!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 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=//szh5static.ichunt.com/favicon.ico><script src=get_time.php></script><script>var fwtimes = window.fwtime - (Math.floor((new Date().getTime())/1000)); //获取服务器时间差</script><link rel=stylesheet href=//szh5static.ichunt.com/static/css/iconfont.css><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js charset=utf-8></script><script src=//szh5static.ichunt.com/static/js/flexible.min.js charset=utf-8></script><script src=//szh5static.ichunt.com/static/js/shence.min.js charset=utf-8></script><link href=//szh5static.ichunt.com/css/chunk-25d47f48.3c469a98.css rel=prefetch><link href=//szh5static.ichunt.com/js/chunk-25d47f48.9064b7e2.js rel=prefetch><link href=//szh5static.ichunt.com/css/app.5642d040.css rel=preload as=style><link href=//szh5static.ichunt.com/css/chunk-vendors.521d5c8e.css rel=preload as=style><link href=//szh5static.ichunt.com/js/app.687a15c9.js rel=preload as=script><link href=//szh5static.ichunt.com/js/chunk-vendors.9ec4e864.js rel=preload as=script><link href=//szh5static.ichunt.com/css/chunk-vendors.521d5c8e.css rel=stylesheet><link href=//szh5static.ichunt.com/css/app.5642d040.css rel=stylesheet></head><body><noscript><strong>网站出现了一点小问题,正在修复中.......</strong></noscript><div id=app></div><script>function SetCookie(name, value, time, domain) {
domain = domain ? ";domain=" + domain : "";
var Days = time;
var exp = new Date();
......@@ -224,4 +224,4 @@
user_rank: '0'
});
sensors.quick('autoTrack');
}</script><script src=//szh5static.ichunt.com/js/chunk-vendors.9ec4e864.js></script><script src=//szh5static.ichunt.com/js/app.91a126e8.js></script></body></html>
\ No newline at end of file
}</script><script src=//szh5static.ichunt.com/js/chunk-vendors.9ec4e864.js></script><script src=//szh5static.ichunt.com/js/app.687a15c9.js></script></body></html>
\ No newline at end of file
(function(t){function e(e){for(var o,r,i=e[0],u=e[1],s=e[2],f=0,l=[];f<i.length;f++)r=i[f],a[r]&&l.push(a[r][0]),a[r]=0;for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(t[o]=u[o]);m&&m(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],o=!0,r=1;r<n.length;r++){var i=n[r];0!==a[i]&&(o=!1)}o&&(c.splice(e--,1),t=u(u.s=n[0]))}return t}var o={},r={app:0},a={app:0},c=[];function i(t){return u.p+"js/"+({}[t]||t)+"."+{"chunk-03f01e17":"b7173c64"}[t]+".js"}function u(e){if(o[e])return o[e].exports;var n=o[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-03f01e17":1};r[t]?e.push(r[t]):0!==r[t]&&n[t]&&e.push(r[t]=new Promise(function(e,n){for(var o="css/"+({}[t]||t)+"."+{"chunk-03f01e17":"897a7236"}[t]+".css",a=u.p+o,c=document.getElementsByTagName("link"),i=0;i<c.length;i++){var s=c[i],f=s.getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(f===o||f===a))return e()}var l=document.getElementsByTagName("style");for(i=0;i<l.length;i++){s=l[i],f=s.getAttribute("data-href");if(f===o||f===a)return e()}var m=document.createElement("link");m.rel="stylesheet",m.type="text/css",m.onload=e,m.onerror=function(e){var o=e&&e.target&&e.target.src||a,c=new Error("Loading CSS chunk "+t+" failed.\n("+o+")");c.request=o,delete r[t],m.parentNode.removeChild(m),n(c)},m.href=a;var h=document.getElementsByTagName("head")[0];h.appendChild(m)}).then(function(){r[t]=0}));var o=a[t];if(0!==o)if(o)e.push(o[2]);else{var c=new Promise(function(e,n){o=a[t]=[e,n]});e.push(o[2]=c);var s,f=document.createElement("script");f.charset="utf-8",f.timeout=120,u.nc&&f.setAttribute("nonce",u.nc),f.src=i(t),s=function(e){f.onerror=f.onload=null,clearTimeout(l);var n=a[t];if(0!==n){if(n){var o=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src,c=new Error("Loading chunk "+t+" failed.\n("+o+": "+r+")");c.type=o,c.request=r,n[1](c)}a[t]=void 0}};var l=setTimeout(function(){s({type:"timeout",target:f})},12e4);f.onerror=f.onload=s,document.head.appendChild(f)}return Promise.all(e)},u.m=t,u.c=o,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 o in t)u.d(n,o,function(e){return t[e]}.bind(null,o));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="//szh5static.ichunt.com/",u.oe=function(t){throw console.error(t),t};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],f=s.push.bind(s);s.push=e,s=s.slice();for(var l=0;l<s.length;l++)e(s[l]);var m=f;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 o=n("0ec6"),r=n.n(o),a=(n("c764"),n("9f07"),n("0964"),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",created:function(){this.$store.dispatch({type:"authorization"})}},s=u,f=n("25c1"),l=Object(f["a"])(s,c,i,!1,null,null,null);l.options.__file="App.vue";var m=l.exports,h=n("7f43"),p=n.n(h),d=(n("0a16"),n("081a")),v=function(t){return n.e("chunk-03f01e17").then(function(){var e=[n("9553")];t.apply(null,e)}.bind(this)).catch(n.oe)};a["a"].use(d["a"]);var g=[{path:"/home",component:v,meta:{title:"猎芯网"}},{path:"/",redirect:"/home"},{path:"*",redirect:"/"}];g.forEach(function(t){t.path=t.path||"/"+(t.name||"")});var w=new d["a"]({routes:g});w.beforeEach(function(t,e,n){var o=t.meta&&t.meta.title;o&&(document.title=o),n()});var k,C,y=n("52c1");switch(window.location.hostname){case"www.ichunt.com":k="https://api.ichunt.com/";break;case"m.ichunt.com":C="https://m.ichunt.com/v3",k="https://api.ichunt.com/";break;case"sz.ichunt.com":k="https://szapi.ichunt.com/";break;case"szm.ichunt.com":k="https://szapi.ichunt.com/",C="https://szm.ichunt.com/v3/";break;case"t.ichunt.com":k="https://api.ichunt.com/";break;case"tm.ichunt.com":C="https://tm.ichunt.com/v3",k="https://api.ichunt.com/";break;case"www.liexin.com":k="http://api.liexin.com/";break;case"m.liexin.com":C="http://m.liexin.com/v3/",k="http://api.liexin.com/";break;default:k="/api/"}var b=C,x=k,T={index:b+"index",loginCheck:x+"login/check",cartCount:x+"cart/count",customsrService:x+"public/customsrservice",getCommonParams:b+"getcommonparams",wxaccess:b+"api/wxaccess"},P={index:function(t){return p.a.post(T.index,t)},loginCheck:function(t){return p.a.get(T.loginCheck,{params:{data:t}})},cartCount:function(t){return p.a.get(T.cartCount,{params:{data:t}})},customsrService:function(t){return p.a.get(T.customsrService,{params:{data:t}})},getCommonParams:function(t){return p.a.post(T.getCommonParams,t)},wxaccess:function(t){return p.a.post(T.wxaccess,t)}},_=n("6ef6"),E=(n("ac74"),n("9029"),n("ab01")),S=n.n(E),A=(n("4ddc"),0),j=8;function M(t){return N(O(Y(t),t.length*j))}function O(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var n=Array(80),o=1732584193,r=-271733879,a=-1732584194,c=271733878,i=-1009589776,u=0;u<t.length;u+=16){for(var s=o,f=r,l=a,m=c,h=i,p=0;p<80;p++){n[p]=p<16?t[u+p]:B(n[p-3]^n[p-8]^n[p-14]^n[p-16],1);var d=q(q(B(o,5),z(p,r,a,c)),q(q(i,n[p]),D(p)));i=c,c=a,a=B(r,30),r=o,o=d}o=q(o,s),r=q(r,f),a=q(a,l),c=q(c,m),i=q(i,h)}return Array(o,r,a,c,i)}function z(t,e,n,o){return t<20?e&n|~e&o:t<40?e^n^o:t<60?e&n|e&o|n&o:e^n^o}function D(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function q(t,e){var n=(65535&t)+(65535&e),o=(t>>16)+(e>>16)+(n>>16);return o<<16|65535&n}function B(t,e){return t<<e|t>>>32-e}function Y(t){for(var e=Array(),n=(1<<j)-1,o=0;o<t.length*j;o+=j)e[o>>5]|=(t.charCodeAt(o/j)&n)<<24-o%32;return e}function N(t){for(var e=A?"0123456789ABCDEF":"0123456789abcdef",n="",o=0;o<4*t.length;o++)n+=e.charAt(t[o>>2]>>8*(3-o%4)+4&15)+e.charAt(t[o>>2]>>8*(3-o%4)&15);return n}var W=n("0427"),$={setCookie:function(t,e,n,o){o=o?";domain="+o:"";var r=n,a=new Date;return a.setTime(a.getTime()+24*r*60*60*1e3),document.cookie=t+"="+encodeURIComponent(e)+";expires="+a.toGMTString()+";path=/"+o,!0},getCookie:function(t){for(var e=document.cookie,n=e.split("; "),o=0;o<n.length;o++){var r=n[o].split("=");if(t==r[0])return r[1]}return null},delCookie:function(t){var e=new Date;e.setTime(e.getTime()-1);var n=this.getCookie(t);null!=n&&(document.cookie=t+"="+n+";expires="+e.toGMTString())},getParams:function(t){var e=this.getCookie("Yo4teW_gid"),n=this.getCookie("cache_time");if(null!=n)var o=Math.floor((new Date).getTime()/1e3);else{o=Math.floor((new Date).getTime()/1e3)+window.fwtimes;this.setCookie("cache_time",window.fwtimes,1,window.cookieHostname)}var a=[],c={},i="",u="",s="",f={pf:2,qwertyuiop:o,Yo4teW_gid:e},l=S()({},f,t);r()(l).forEach(function(t,e,n){a.push(t)}),a=a.sort(),a.forEach(function(t,e,n){c[a[e]]=l[a[e]]}),r()(c).forEach(function(t,e,n){i+=t+"="+c[t]}),u=i.replace(/[^0-9a-zA-Z]/g,""),u=u.toUpperCase();for(var m=0;m<u.length;m++)"A"!=u[m]&&"B"!=u[m]&&"C"!=u[m]&&(s+=u[m]);i=M(s);var h=S()({},t,{asdfghjkl:i},{qwertyuiop:o},{pf:2});return W.stringify(h)}};a["a"].use(_["g"]);var F={index:{},loading:!0},H={index:function(t,e){t.index=e.data}},L={index:function(t,e){var n=t.commit;F.loading=!0;var o=$.getParams();P.index(o).then(function(t){var e=t.data;0==e.err_code&&(n({type:"index",data:e.data}),F.loading=!1)}).catch(function(t){F.loading=!1})}},G={},J={state:F,mutations:H,actions:L,getters:G};a["a"].use(_["g"]);var U={cartCount:"",loginCheck:!1,phpParams:{}},I={cartCount:function(t,e){t.cartCount=0==e.data?"":e.data},loginCheck:function(t,e){0==e.data.err_code?t.loginCheck=!0:t.loginCheck=!1},phpParams:function(t,e){t.phpParams=e.data.data}},R={cartCount:function(t,e){var n=t.commit;P.cartCount().then(function(t){var e=t.data;0==e.err_code&&n({type:"cartCount",data:e.data})}).catch(function(t){})},loginCheck:function(t,e){var n=t.commit;P.loginCheck().then(function(t){var e=t.data;n({type:"loginCheck",data:e})}).catch(function(t){})},customsrService:function(t,e){t.commit;var n={pf:window.lxpf,searchModel:""};P.customsrService(n).then(function(t){}).catch(function(t){})},getCommonParams:function(t,e){var n=t.commit,o=$.getParams();P.getCommonParams(o).then(function(t){var e=t.data;n({type:"phpParams",data:e})}).catch(function(t){})},authorization:function(t,e){t.commit;var n=$.getParams();P.wxaccess(n).then(function(t){var e=t.data;e.data&&(window.location.href=e.data)})}},Z={},K={state:U,mutations:I,actions:R,getters:Z};a["a"].use(y["a"]);var Q=new y["a"].Store({modules:{home:J,common:K}}),V=function(t){var e=new Date;e.setTime(1e3*t);var n=e.getFullYear(),o=e.getMonth()+1;o=o<10?"0"+o:o;var r=e.getDate();r=r<10?"0"+r:r;var a=e.getHours();a=a<10?"0"+a:a;var c=e.getMinutes(),i=e.getSeconds();return c=c<10?"0"+c:c,i=i<10?"0"+i:i,n+"-"+o+"-"+r+" "},X={dateTimeFormate:V},tt={bind:function(t,e){t.addEventListener("click",function(){document.body.scrollTop=0,document.documentElement.scrollTop=0,document.querySelector(".container-wrap").scrollTop=0},!1)}},et={install:function(t){t.directive("backTop",tt)}},nt=n("897d"),ot=n.n(nt);n("e1a5"),n("bfd9");r()(X).forEach(function(t){return a["a"].filter(t,X[t])}),a["a"].use(et),a["a"].prototype.$http=p.a,p.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded",p.a.defaults.withCredentials=!0,a["a"].config.productionTip=!1;var rt=$.getCookie("Yo4teW_gid");if(null==rt){var at=ot()("");$.setCookie("Yo4teW_gid",at,1,window.cookieHostname)}new a["a"]({router:w,store:Q,render:function(t){return t(m)}}).$mount("#app")},bfd9:function(t,e,n){}});
//# sourceMappingURL=app.91a126e8.js.map
\ 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