(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["login"], {
1276: function (e, t, n) { "use strict"; var i = n("d784"), o = n("44e7"), r = n("825a"), a = n("1d80"), s = n("4840"), c = n("8aa5"), l = n("50c4"), u = n("577e"), d = n("dc4a"), h = n("14c3"), g = n("9263"), f = n("9f7f"), p = n("d039"), v = f.UNSUPPORTED_Y, w = [].push, m = Math.min, x = 4294967295, b = !p((function () { var e = /(?:)/, t = e.exec; e.exec = function () { return t.apply(this, arguments) }; var n = "ab".split(e); return 2 !== n.length || "a" !== n[0] || "b" !== n[1] })); i("split", (function (e, t, n) { var i; return i = "c" == "abbc".split(/(b)*/)[1] || 4 != "test".split(/(?:)/, -1).length || 2 != "ab".split(/(?:ab)*/).length || 4 != ".".split(/(.?)(.?)/).length || ".".split(/()()/).length > 1 || "".split(/.?/).length ? function (e, n) { var i = u(a(this)), r = void 0 === n ? x : n >>> 0; if (0 === r) return []; if (void 0 === e) return [i]; if (!o(e)) return t.call(i, e, r); var s, c, l, d = [], h = (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.unicode ? "u" : "") + (e.sticky ? "y" : ""), f = 0, p = new RegExp(e.source, h + "g"); while (s = g.call(p, i)) { if (c = p.lastIndex, c > f && (d.push(i.slice(f, s.index)), s.length > 1 && s.index < i.length && w.apply(d, s.slice(1)), l = s[0].length, f = c, d.length >= r)) break; p.lastIndex === s.index && p.lastIndex++ } return f === i.length ? !l && p.test("") || d.push("") : d.push(i.slice(f)), d.length > r ? d.slice(0, r) : d } : "0".split(void 0, 0).length ? function (e, n) { return void 0 === e && 0 === n ? [] : t.call(this, e, n) } : t, [function (t, n) { var o = a(this), r = void 0 == t ? void 0 : d(t, e); return r ? r.call(t, o, n) : i.call(u(o), t, n) }, function (e, o) { var a = r(this), d = u(e), g = n(i, a, d, o, i !== t); if (g.done) return g.value; var f = s(a, RegExp), p = a.unicode, w = (a.ignoreCase ? "i" : "") + (a.multiline ? "m" : "") + (a.unicode ? "u" : "") + (v ? "g" : "y"), b = new f(v ? "^(?:" + a.source + ")" : a, w), C = void 0 === o ? x : o >>> 0; if (0 === C) return []; if (0 === d.length) return null === h(b, d) ? [d] : []; var I = 0, y = 0, _ = []; while (y < d.length) { b.lastIndex = v ? 0 : y; var k, F = h(b, v ? d.slice(y) : d); if (null === F || (k = m(l(b.lastIndex + (v ? y : 0)), d.length)) === I) y = c(d, y, p); else { if (_.push(d.slice(I, y)), _.length === C) return _; for (var L = 1; L <= F.length - 1; L++)if (_.push(F[L]), _.length === C) return _; y = I = k } } return _.push(d.slice(I)), _ }] }), !b, v) }, "129f": function (e, t) { e.exports = Object.is || function (e, t) { return e === t ? 0 !== e || 1 / e === 1 / t : e != e && t != t } }, "841c": function (e, t, n) { "use strict"; var i = n("d784"), o = n("825a"), r = n("1d80"), a = n("129f"), s = n("577e"), c = n("dc4a"), l = n("14c3"); i("search", (function (e, t, n) { return [function (t) { var n = r(this), i = void 0 == t ? void 0 : c(t, e); return i ? i.call(t, n) : new RegExp(t)[e](s(n)) }, function (e) { var i = o(this), r = s(e), c = n(t, i, r); if (c.done) return c.value; var u = i.lastIndex; a(u, 0) || (i.lastIndex = 0); var d = l(i, r); return a(i.lastIndex, u) || (i.lastIndex = u), null === d ? -1 : d.index }] })) }, dd7b: function (e, t, n) {
"use strict"; n.r(t); var i = function () { var e = this, t = e.$createElement, n = e._self._c || t; return n("div", [e._v("登录")]) }, o = [], r = (n("ac1f"), n("466d"), n("841c"), n("1276"), n("2503")), a = n("2241"), s = {
data: function () { return { wxCode: "", state: "" } }, created: function () { var e = this; 1 == window.localStorage.getItem("isLogin") ? (window.localStorage.removeItem("isLogin"), e.WeiChatLogin()) : (window.localStorage.setItem("isLogin", 1), window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx234db80494556914&redirect_uri=https%3A%2F%2Fbhmc.yqslmall.com%2Fclock_system%2F%23%2Flogin&response_type=code&scope=snsapi_base&state=123#wechat_redirect") }, methods: {
WeiChatLogin: function () { var e = this.getUrlCode().code, t = this.getUrlCode().state; console.log("code", this.getUrlCode().code), console.log("state", this.getUrlCode().state), "undefined" !== typeof t && "undefined" !== typeof e ? (this.wxCode = e, this.state = t, this.AjaxGetWeiChat()) : (console.log("获取code或state失败"), window.localStorage.setItem("isLogin", 1), window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx234db80494556914&redirect_uri=https%3A%2F%2Fbhmc.yqslmall.com%2Fclock_system%2F%23%2Flogin&response_type=code&scope=snsapi_base&state=123#wechat_redirect") }, AjaxGetWeiChat: function () {
var e = this; Object(r["j"])({ code: e.wxCode }).then((function (t) {
1 == t.state ? (window.localStorage.removeItem("isLogin"), 1 == t.data.isbind ? (window.localStorage.setItem("token", t.data.token), window.localStorage.setItem("nick", t.data.nick), "activityPrefecture" == e.state ? e.$router.push({ path: "/activityPrefecture", query: { mobile: t.data.userData.mobile } }) : e.$router.push("/punchCard")) : a["a"].confirm({
title: "提示", message: "暂未查询到您的员工信息,请退出后在公众号发送“绑定手
机号”完成账号绑定后,在此进行打卡等操作",showCancelButton:!1}).then((function(){}))):a["a"].confirm({title:"提示",message:t.info,showCancelButton:!1}).then((function(){})).catch((function(){}))}))},getIsWxClient:function(){var e=window.navigator.userAgent.toLowerCase();return!(!e.match(/MicroMessenger/i)||"micromessenger"!==e.match(/MicroMessenger/i)[0]&&"micromessenger"!==e.match(/MicroMessenger/i))},getUrlCode:function(){var e=location.search,t={};if(-1!==e.indexOf(" ? "))for(var n=e.substr(1),i=n.split(" & "),o=0;o<i.length;o++)t[i[o].split("=")[0]]=i[o].split("= ")[1];return t}}},c=s,l=n("2877"),u=Object(l["a"])(c,i,o,!1,null,"dd219c56",null);t["default"]=u.exports}}]);
console