安吉星(上汽通用)旗下别克、凯迪拉克、雪弗兰API文档
安吉星 API onstar.com.cn api.shanghaionstar.com
原理为:
1. 账户密码(密码strtoupper(hash('sha256', 密码))加密)经过JWT编码后POST登陆, 返回JWT编码, JWT解码得到Token(短TOKEN)和permToken(长TOKEN),
2. TOKEN失效(1800秒)后, 用permToken去换TOKEN;
3. 获取车辆数据,以及控制车辆, Header请求头携带Authorization:Bearer {TOKEN} ;
4. 控制车辆前, 需要用PIN刷新一次Token, 其参数为PIN密码AES加密.

PHP源码:
1.根据API接口,车辆与智能家居完美对接, 互相调用数据, 触发场景; QQ:264059790

特别提醒:安吉星未按JWT规范,对POST提交的账户密码,仅仅按JWT编码,后台服务器为对该数据作出验证签名. 得到TOKEN即可查询车辆信息.
新JS源代码:
// Webpack 异步加载
webpackJsonp([33], {
0: function(n, t) {},
"2EZA": function(n, t) {},
"44/k": function(n, t) {},
CcXR: function(n, t) {},
// 工具函数模块
JQEa: function(n, t, e) {
"use strict";
e.d(t, "g", function() {
return r
}), e.d(t, "d", function() {
return o
}), e.d(t, "i", function() {
return u
}), e.d(t, "f", function() {
return c
}), e.d(t, "j", function() {
return i
}), e.d(t, "e", function() {
return a
}), e.d(t, "c", function() {
return s
}), e.d(t, "h", function() {
return f
}), e.d(t, "a", function() {
return l
}), e.d(t, "b", function() {
return d
});
var r = function(n) {
return null == n || "undefined" == n || "null" == n || void 0 === n || void 0 == n || "" == n
}, o = function(n) {
var t = document.location.href,
e = t.indexOf(n + "=");
if (-1 == e) return !1;
var r = t.slice(n.length + e + 1),
o = r.indexOf("&");
return -1 != o && (r = r.slice(0, o)), r
}, u = function(n, t) {
if (n) {
var e = new Date(n),
r = e.getFullYear(),
o = e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1,
u = e.getDate() < 10 ? "0" + e.getDate() : e.getDate(),
c = e.getHours() < 10 ? "0" + e.getHours() : e.getHours(),
i = e.getMinutes() < 10 ? "0" + e.getMinutes() : e.getMinutes(),
a = e.getSeconds() < 10 ? "0" + e.getSeconds() : e.getSeconds();
return 1 == t ? r + "-" + o + "-" + u + " " + c + ":" + i + ":" + a : r + "年" + o + "月" + u + "日 " + c + ":" + i
}
return n
}, c = function(n, t) {
"back" == t ? n.go(-1) : n.push(t)
}, i = function(n, t) {
n && ("string" != typeof t && (t = JSON.stringify(t)), window.sessionStorage.setItem(n, t))
}, a = function(n) {
if (n) return window.sessionStorage.getItem(n)
}, s = function(n) {
for (var t = n + "=", e = document.cookie.split(";"), r = 0; r < e.length; r++) {
var o = e[r].trim();
if (0 == o.indexOf(t)) return o.substring(t.length, o.length)
}
return ""
}, f = function(n) {
return !!/^[1][3,4,5,7,8][0-9]{9}$/.test(n)
}, l = function(n) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 300,
e = null;
return function() {
var r = this,
o = arguments;
clearTimeout(e), e = setTimeout(function() {
n.apply(r, o)
}, t)
}
}, d = function(n) {
return n.replace(/name="viewport"/gi, 'name="view-onstar-port"')
}
},
// 网络请求模块 Axios 封装 + 接口管理
OMjk: function(n, t, e) {
"use strict";
var r = e("mtWM"),
o = e.n(r),
u = e("7+uW"),
c = e("JQEa");
console.log(Object(c.c)("ACCESS-TOKEN"));
var i = void 0,
a = {}, s = o.a.CancelToken,
f = !1,
l = !1;
// 统一错误处理
o.a.interceptors.request.use(function(n) {
return f = -1 != n.url.indexOf("ovd"), l = -1 != n.url.indexOf("check") && -1 != location.href.indexOf("servicePsd"), a[n.url] && (a[n.url]("操作取消"), a[n.url] = i), console.log(n), n
}, function(n) {
return console.log(n), Promise.reject(n)
}), o.a.interceptors.response.use(function(n) {
return n
}, function(n) {
if (n && n.response) switch (n.response.status) {
case 400:
n.message = "错误请求";
break;
case 401:
n.message = "未授权,请重新登录";
break;
case 403:
n.message = "拒绝访问";
break;
case 404:
n.message = "请求错误,未找到该资源";
break;
case 405:
n.message = "请求方法未允许";
break;
case 408:
n.message = "请求超时";
break;
case 500:
n.message = "服务器端出错";
break;
case 501:
n.message = "网络未实现";
break;
case 502:
n.message = "网络错误";
break;
case 503:
n.message = "服务不可用";
break;
case 504:
n.message = "网络超时";
break;
case 505:
n.message = "http版本不支持该请求";
break;
default:
n.message = "连接错误" + n.response.status
} else n.message = "连接到服务器失败";
var t = "error" == n.response.data.response && null != n.response.data.responseMessage ? n.response.data.responseMessage : n.message,
e = n.response.config.url;
return n.response.errMsg = t, console.log("configurl", e), e.indexOf("lbs/postalinfo/last") < 0 && (e.indexOf("/process") > -1 || e.indexOf("commands/exestatus") > -1 ? console.log(e) : "E9001" === t ? u.
default.prototype.$messagebox({
title: "帐号已经注销",
message: "您的安吉星手机应用帐号已经注销,如需帮助,请通过车内蓝键或拨打客服电话400-820-1188与我们联系。",
confirmButtonText: "知道了",
closeOnClickModal: !1,
showCancelButton: !1
}) : e.indexOf("eInvoice/order/list") > -1 || (e.indexOf("wechat/v1/sign") > -1 ? console.log("wechat/v1/sign", "wechat/v1/sign") : e.indexOf("wechat/order") > -1 ? console.log("wechat/order", "wechat/order") : e.indexOf("/wechat/v2/ovd") > -1 ? console.log("/wechat/v2/ovd", t) : e.indexOf("/wechat/v1/getAmTickets") > -1 ? console.log("/wechat/v2/ovd", t) : u.
default.prototype.$Message({
msg: t
}, function() {
(f || l) && WeixinJSBridge.call("closeWindow")
}))), u.
default.$loading.hide(), Promise.resolve(n.response)
}), o.a.defaults.baseURL = "/api", o.a.defaults.headers = {
"Content-Type": "application/json",
"ACCESS-TOKEN": Object(c.c)("ACCESS-TOKEN")
}, o.a.defaults.timeout = 6e4;
var d = function(n, t) {
return new Promise(function(e, r) {
o()({
method: "get",
url: n,
params: t,
cancelToken: new s(function(n) {
i = n
})
}).then(function(n) {
e(n)
})
})
}, h = function(n, t) {
return new Promise(function(e, r) {
o()({
method: "post",
url: n,
data: t,
cancelToken: new s(function(n) {
i = n
})
}).then(function(n) {
e(n)
})
})
}, m = function(n, t) {
return new Promise(function(e, r) {
o()({
method: "put",
url: n,
data: t,
cancelToken: new s(function(n) {
i = n
})
}).then(function(n) {
e(n)
})
})
}, p = function(n, t) {
return new Promise(function(e, r) {
o()({
method: "delete",
url: n,
params: t,
cancelToken: new s(function(n) {
i = n
})
}).then(function(n) {
e(n)
})
})
};
e("1nuA");
e.d(t, "z", function() {
return w
}), e.d(t, "_7", function() {
return S
}), e.d(t, "A", function() {
return C
}), e.d(t, "B", function() {
return M
}), e.d(t, "_8", function() {
return T
}), e.d(t, "f", function() {
return E
}), e.d(t, "L", function() {
return P
}), e.d(t, "e", function() {
return A
}), e.d(t, "_15", function() {
return D
}), e.d(t, "d", function() {
return j
}), e.d(t, "m", function() {
return L
}), e.d(t, "Y", function() {
return U
}), e.d(t, "X", function() {
return $
}), e.d(t, "Z", function() {
return B
}), e.d(t, "k", function() {
return N
}), e.d(t, "W", function() {
return q
}), e.d(t, "l", function() {
return G
}), e.d(t, "n", function() {
return R
}), e.d(t, "J", function() {
return Y
}), e.d(t, "i", function() {
return F
}), e.d(t, "j", function() {
return W
}), e.d(t, "C", function() {
return H
}), e.d(t, "D", function() {
return z
}), e.d(t, "H", function() {
return J
}), e.d(t, "P", function() {
return K
}), e.d(t, "_12", function() {
return V
}), e.d(t, "_14", function() {
return I
}), e.d(t, "c", function() {
return X
}), e.d(t, "_13", function() {
return Z
}), e.d(t, "b", function() {
return Q
}), e.d(t, "I", function() {
return nn
}), e.d(t, "G", function() {
return tn
}), e.d(t, "K", function() {
return en
}), e.d(t, "E", function() {
return rn
}), e.d(t, "_10", function() {
return on
}), e.d(t, "_11", function() {
return un
}), e.d(t, "_9", function() {
return cn
}), e.d(t, "F", function() {
return an
}), e.d(t, "O", function() {
return sn
}), e.d(t, "_0", function() {
return fn
}), e.d(t, "V", function() {
return ln
}), e.d(t, "M", function() {
return dn
}), e.d(t, "N", function() {
return hn
}), e.d(t, "Q", function() {
return mn
}), e.d(t, "R", function() {
return pn
}), e.d(t, "_1", function() {
return gn
}), e.d(t, "_5", function() {
return vn
}), e.d(t, "_6", function() {
return wn
}), e.d(t, "_4", function() {
return bn
}), e.d(t, "_3", function() {
return _n
}), e.d(t, "h", function() {
return xn
}), e.d(t, "o", function() {
return kn
}), e.d(t, "y", function() {
return On
}), e.d(t, "_2", function() {
return yn
}), e.d(t, "q", function() {
return Sn
}), e.d(t, "s", function() {
return Cn
}), e.d(t, "S", function() {
return Mn
}), e.d(t, "p", function() {
return Tn
}), e.d(t, "U", function() {
return En
}), e.d(t, "v", function() {
return Pn
}), e.d(t, "T", function() {
return An
}), e.d(t, "r", function() {
return Dn
}), e.d(t, "t", function() {
return jn
}), e.d(t, "u", function() {
return Ln
}), e.d(t, "a", function() {
return Un
}), e.d(t, "x", function() {
return $n
}), e.d(t, "w", function() {
return Bn
}), e.d(t, "g", function() {
return qn
});
var g = "idta",
v = !1;
location.href.indexOf("www.onstar.com.cn") > -1 ? g = "www" : location.href.indexOf("wechat-test.onstar.com.cn") > -1 ? g = "wechat-test" : location.href.indexOf("idt6.onstar.com.cn") > -1 ? g = "wechat-test" : location.href.indexOf("idta.onstar.com.cn") > -1 ? g = "wechat-test" : location.href.indexOf("localhost") > -1 ? (g = "wechat-test", v = !0) : g = "wechat-test";
var w = location.protocol + "//" + g + ".onstar.com.cn/",
b = v ? "/wechat/" : w,
_ = b + "mssos/sos/wechat/v1/",
x = b + "mssos/sos/wechat/v2/",
k = b + "mssos/sos/mobileBizAggr/v1/",
O = b + "mssos/sos/salessupport/v1/",
y = b + "mssos/sos/salessupport/v2/",
S = function(n) {
return "www" === g ? g + ".onstar.com.cn" : "idt" === n ? "idt6sit.onstar.com.cn" : g + ".onstar.com.cn"
}, C = function(n) {
return h(_ + "login", n)
}, M = function(n) {
return h(_ + "logout", n)
}, T = function(n) {
return d(_ + "vehicle", n)
}, E = function(n) {
return d(_ + "check", n)
}, P = function(n) {
return h(_ + "process", n)
}, A = function(n) {
return d(_ + "chargemode", n)
}, D = function(n) {
return d(_ + "weektime", n)
}, j = function(n) {
return h(_ + "charge_profile", n)
}, L = function(n) {
return d(_ + "favorites", n)
}, U = function(n) {
return d(_ + "tbts", n)
}, $ = function(n) {
return p(_ + "tbt/" + n, "")
}, B = function(n) {
return p(_ + "tbt", "")
}, N = function(n) {
return d(_ + "dealers", n)
}, q = function(n) {
return h(_ + "tbt", n)
}, G = function(n) {
return p(_ + "favorite/" + n, "")
}, R = function(n) {
return p(_ + "favorite", "")
}, Y = function(n) {
return h(k + "packages", n)
}, F = function(n) {
return h(k + "core_product", n)
}, W = function(n) {
return h(k + "data_product", n)
}, H = function(n) {
return m(x + "order", n)
}, z = function(n) {
return d(O + "order", n)
}, J = function(n) {
return h(O + "mag/order", n)
}, K = function(n) {
return d(O + "alipay/order", n)
}, V = function(n) {
return d(O + "wechat/order?" + n)
}, I = function(n) {
return d(O + "wechat/pay_info", n)
}, X = function(n) {
return d(O + "alipay/pay_info", n)
}, Z = function(n) {
return d(y + "wechat/pay_info", n)
}, Q = function(n) {
return d(y + "alipay/pay_info", n)
}, nn = function(n) {
return h(O + "wechat/mag/pay_info", n)
}, tn = function(n) {
return h(O + "alipay/mag/pay_info", n)
}, en = function(n) {
return h(O + "pay_log", n)
}, rn = function(n) {
return d(x + "orders", n)
}, on = function(n) {
return d(_ + "vehicledata/" + n, "")
}, un = function(n) {
return d(_ + "vehicles", "")
}, cn = function(n) {
return h(_ + "vehicle/switch", n)
}, an = function(n) {
return d(x + "ovd", "")
}, sn = function(n) {
return d(_ + "resign", n)
}, fn = function(n) {
return d(_ + "tcps", n)
}, ln = function(n) {
return h(_ + "sign", n)
}, dn = function(n) {
return h(_ + "reg_subscriber", n)
}, hn = function(n) {
return h(_ + "reg_visitor", n)
}, mn = function(n) {
return h(_ + "send_sec_code", n)
}, pn = function(n) {
return h(x + "send_sec_code", n)
}, gn = function(n) {
return h(_ + "unique?" + n)
}, vn = function(n) {
return h(_ + "validate_sec_code", n)
}, wn = function(n) {
return h(_ + "validate_subscriber", n)
}, bn = function(n) {
return h(_ + "upgrade_validate", n)
}, _n = function(n) {
return h(_ + "upgrade_subscriber", n)
}, xn = function() {
return location.protocol + "//" + g + ".onstar.com.cn/mssos/sos/wechat/captcha/generate/" + Object(c.c)("ACCESS-TOKEN") + "?w=120&h=50&s=30&c=35&d=" + (new Date).getTime()
}, kn = function() {
return location.protocol + "//" + g + ".onstar.com.cn/mweb/ma80/forgetpwd/index.html"
}, On = function(n) {
return d(_ + "lbs/postalinfo/last", n)
}, yn = function(n) {
return h(_ + "lbs/postalinfo/last", n)
}, Sn = function() {
return d(_ + "banners?bannerCategory=WECHAT_CYHD_BANNER", "")
}, Cn = function(n) {
return d(_ + "destinations?" + n)
}, Mn = function(n) {
return m(_ + "setDestinations", n)
}, Tn = function(n) {
return d(_ + "vehicle/avaliableFuncs", n)
}, En = function(n) {
return h(_ + "share/config", n)
}, Pn = function(n) {
return d(_ + "vehicle/phevcharge", n)
}, An = function(n) {
return m(_ + "vehicle/phevcharge", n)
}, Dn = function(n) {
return d(_ + "vehicle/ovd/carstatus", "")
}, jn = function(n) {
return d(_ + "vehicle/commands/exestatus/" + n, "")
}, Ln = function(n) {
return h(_ + "getAmTickets")
}, Un = "ONSTAR_PID",
$n = function(n) {
return h(_ + "getUserSuite", n)
}, Bn = function(n) {
return h(k + "getSpecialVehicle/stats", n)
}, Nn = ["p2u", "Local", "warranty_extension"],
qn = function(n) {
return Nn.includes(n)
}
},
OgVB: function(n, t) {},
SzY4: function(n, t) {},
// 移动端适配
UAgs: function(n, t) {
var e, r, o, u, c;
e = document, r = window, o = e.documentElement, u = "orientationchange" in window ? "orientationchange" : "resize", c = function() {
var n = o.clientWidth;
n && (n > 750 && (n = 750), o.style.fontSize = n / 10 + "px")
}, e.addEventListener && (r.addEventListener(u, c, !1), e.addEventListener("DOMContentLoaded", c, !1))
},
"d8/S": function(n, t) {},
"i+Gj": function(n, t) {},
"q/am": function(n, t) {},
// 适配 + 路由 + 入口
w44L: function(n, t, e) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = e("Xxa5"),
o = e.n(r),
u = (e("OgVB"), e("/Lyv")),
c = e.n(u),
i = (e("2EZA"), e("W/os")),
a = e.n(i),
s = (e("CcXR"), e("fKbY")),
f = e.n(s),
l = e("7+uW"),
d = e("/ocq"),
h = {
render: function() {
var n = this.$createElement;
return (this._self._c || n)("router-view")
},
staticRenderFns: []
};
// 业务接口全集
var m = [{
path: "/",
component: e("VU/8")({
data: function() {
return {}
}
}, h, !1, function(n) {
e("i+Gj")
}, null, null).exports,
children: [{
path: "/coreService",
component: function(n) {
return e.e(1).then(function() {
return n(e("4Pl/"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "购买安吉星套餐",
buy: !0
}
}, {
path: "/dataService",
component: function(n) {
return e.e(0).then(function() {
return n(e("uam+"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "购买流量套餐"
}
}, {
path: "/carSituation",
component: function(n) {
return e.e(6).then(function() {
return n(e("ffoa"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "实时车况"
}
}, {
path: "/changeCar",
component: function(n) {
return e.e(4).then(function() {
return n(e("+8aM"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "车辆管理"
}
}, {
path: "/contactDealer",
component: function(n) {
return e.e(20).then(function() {
return n(e("taDg"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "联系经销商"
}
}, {
path: "/login",
component: function(n) {
return e.e(9).then(function() {
return n(e("aqOp"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "登录"
}
}, {
path: "/myFavorite",
component: function(n) {
return e.e(10).then(function() {
return n(e("o96c"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "我的地址簿"
}
}, {
path: "/order",
component: function(n) {
return e.e(22).then(function() {
return n(e("lJsi"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "我的订单"
}
}, {
path: "/orderDetail",
component: function(n) {
return e.e(27).then(function() {
return n(e("A8U5"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "订单详情"
}
}, {
path: "/onstarService",
component: function(n) {
return e.e(19).then(function() {
return n(e("qKLq"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "安吉星服务套餐"
}
}, {
path: "/user",
component: function(n) {
return e.e(7).then(function() {
return n(e("qi+D"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "安吉星用户注册"
}
}, {
path: "/notUser",
component: function(n) {
return e.e(8).then(function() {
return n(e("rkqc"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "非安吉星用户注册"
}
}, {
path: "/remoteControl",
component: function(n) {
return e.e(3).then(function() {
return n(e("iBtM"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "远程控制"
}
}, {
path: "/servicePsd",
component: function(n) {
return e.e(12).then(function() {
return n(e("1wGA"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "车辆位置"
}
}, {
path: "/monthlyReport",
component: function(n) {
return e.e(26).then(function() {
return n(e("Fg/V"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "车况详情"
}
}, {
path: "/chargingSet",
component: function(n) {
return e.e(14).then(function() {
return n(e("AqLD"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "充电设置"
}
}, {
path: "/departureTime",
component: function(n) {
return e.e(16).then(function() {
return n(e("QMMS"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "出发时间"
}
}, {
path: "/tcpsPage",
component: function(n) {
return e.e(25).then(function() {
return n(e("Z9kd"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "TCPS协议"
}
}, {
path: "/paymentSuccess",
component: function(n) {
return e.e(17).then(function() {
return n(e("ZYnR"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "支付成功"
}
}, {
path: "/name",
component: function(n) {
return e.e(30).then(function() {
return n(e("Th7M"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "请输入姓名"
}
}, {
path: "/searchOrder",
component: function(n) {
return e.e(29).then(function() {
return n(e("1afT"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "查询订单"
}
}, {
path: "/wechatOrder",
component: function(n) {
return e.e(31).then(function() {
return n(e("Y6X4"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "订单支付"
}
}, {
path: "/owner",
component: function(n) {
return e.e(11).then(function() {
return n(e("NSAG"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "升级车主"
}
}, {
path: "/blank",
component: function(n) {
return e.e(28).then(function() {
return n(e("+XkF"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "请求成功"
}
}, {
path: "/address",
component: function(n) {
return e.e(23).then(function() {
return n(e("EPtU"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "收货人信息"
}
}, {
path: "/oDetail",
component: function(n) {
return e.e(21).then(function() {
return n(e("6oCm"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "收件人信息"
}
}, {
path: "/orderList",
component: function(n) {
return e.e(18).then(function() {
return n(e("SxHe"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "我的订单"
}
}, {
path: "/carActivity",
component: function(n) {
return e.e(2).then(function() {
return n(e("tFBY"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "车友活动"
}
}, {
path: "/carActivityDetail",
component: function(n) {
return e.e(2).then(function() {
return n(e("wnC1"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "活动详情"
}
}, {
path: "/authPage",
component: function(n) {
return e.e(24).then(function() {
return n(e("oblj"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "登录安吉星"
}
}, {
path: "/carPosition",
component: function(n) {
return e.e(13).then(function() {
return n(e("ZsIj"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "车辆位置"
}
}, {
path: "/setDestination",
component: function(n) {
return e.e(15).then(function() {
return n(e("eSrx"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "设置家"
}
}, {
path: "/corePackage",
component: function(n) {
return e.e(1).then(function() {
return n(e("4Pl/"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "购买安吉星套餐",
buy: !0
}
}, {
path: "/dataPackage",
component: function(n) {
return e.e(0).then(function() {
return n(e("uam+"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "购买安吉星套餐"
}
}, {
path: "/shareSituation",
component: function(n) {
return e.e(5).then(function() {
return n(e("waf/"))
}.bind(null, e)).
catch (e.oe)
},
meta: {
title: "实时车况"
}
}]
}],
// 全局 loading 动画
p = (e("UAgs"), e("v5o6"), {
name: "Loading",
props: {
show: {
type: Boolean,
default: !1
}
},
data: function() {
return {}
}
}),
g = {
render: function() {
var n = this.$createElement,
t = this._self._c || n;
return this.show ? t("div", {
staticClass: "loading-container"
}, [t("div", {
staticClass: "loading-mask"
}), this._v(" "), this._m(0)]) : this._e()
},
staticRenderFns: [
function() {
var n = this.$createElement,
t = this._self._c || n;
return t("div", {
staticClass: "loading-content"
}, [t("div", {
staticClass: "loading-animate"
}), this._v(" "), t("div", {
staticClass: "loading-text font_fff fs_14"
})])
}
]
};
var v = e("VU/8")(p, g, !1, function(n) {
e("SzY4")
}, null, null).exports,
w = new(l.
default.extend(v))({
el: document.createElement("div")
}),
b = {
show: function() {
w.show = !0, document.body.appendChild(w.$el)
},
hide: function() {
w.show = !1
}
}, _ = {
install: function() {
l.
default.$loading || (l.
default.$loading = b), l.
default.mixin({
created: function() {
this.$loading = l.
default.$loading
}
})
}
}, x = e("POcy"),
k = e.n(x),
O = (e("d8/S"), e("sUu7")),
y = e("+8+3"),
S = e.n(y),
C = e("NYxO");
l.
default.use(C.a);
var M = {
changeDestType: function(n, t) {
n.destType = t
},
changeSecCode: function(n, t) {
n.secCode = t
},
changeMobileMask: function(n, t) {
n.mobileMask = t
},
changeEmailMask: function(n, t) {
n.emailMask = t
},
changeAirParams: function(n, t) {
n.airParams = Object.assign(t)
}
}, T = new C.a.Store({
state: {
destType: "S",
secCode: "",
mobileMask: "",
emailMask: "",
airParams: {}
},
mutations: M
}),
E = e("wvfG"),
P = e.n(E),
A = e("Lw6n"),
D = e.n(A);
window.location.href.indexOf("www.onstar.com") > -1 ? console.log("production environment") : new D.a;
var j = e("Av7u"),
L = e.n(j),
U = e("OMjk"),
$ = this;
//AES-CBC-Pkcs7 加密
window.encrypt = function(n) {
var t = L.a.enc.Utf8.parse("密钥"),
e = L.a.enc.Utf8.parse(n),
r = L.a.enc.Utf8.parse("密钥");
return L.a.AES.encrypt(e, t, {
iv: r,
mode: L.a.mode.CBC,
padding: L.a.pad.Pkcs7
}).toString()
}, O.a.addLocale(S.a), l.
default.use(P.a), l.
default.use(k.a), l.
default.use(_), l.
default.component(f.a.name, f.a), l.
default.component(a.a.name, a.a), l.
default.use(O.b, {
locale: "zh_CN",
events: "blur"
}), l.
default.prototype.$messagebox = c.a, l.
default.prototype.$Message = function(n, t) {
(function(n) {
var t = document.createElement("div");
t.innerHTML = n;
var e = t.childNodes.length > 0;
return t = null, e
})(n.msg) ? l.
default.prototype.$messagebox({
title: " ",
message: '<div class="bold">' + n.msg + "</div>",
confirmButtonText: "知道了",
closeOnClickModal: !1
}).then(function(n) {
t && t()
}) : l.
default.prototype.$messagebox({
title: n.msg,
message: " ",
confirmButtonText: "知道了",
closeOnClickModal: !1
}).then(function(n) {
t && t()
})
}, l.
default.use(d.a);
var B, N, q = new d.a({
routes: m
});
q.beforeEach((B = o.a.mark(function n(t, e, r) {
return o.a.wrap(function(n) {
for (;;) switch (n.prev = n.next) {
case 0:
t.meta.title && (document.title = t.meta.title), window.navigator.userAgent.toLowerCase().indexOf("micromessenger"), t.meta.buy ? Object(U.x)().then(function(n) {
try {
var t = n.data.data.userSettings.is2G3GUser;
console.log("?? ~ file: index.js:76 ~ getUserSuite ~ is2G3GUser", t), t ? (null === e.name && r("/onstarService"), c()({
title: "当前没有适合您车型的安吉星套餐,详情请咨询400-820-1188",
message: " ",
confirmButtonText: "确认",
closeOnClickModal: !1
}).then(function(n) {})) : r()
} catch (n) {
console.log("?? ~ file: index.js:77 ~ getUserSuite ~ error", n), r()
}
}).
catch (function() {
r()
}) : r();
case 3:
case "end":
return n.stop()
}
}, n, $)
}), N = function() {
var n = B.apply(this, arguments);
return new Promise(function(t, e) {
return function r(o, u) {
try {
var c = n[o](u),
i = c.value
} catch (n) {
return void e(n)
}
if (!c.done) return Promise.resolve(i).then(function(n) {
r("next", n)
}, function(n) {
r("throw", n)
});
t(i)
}("next")
})
}, function(n, t, e) {
return N.apply(this, arguments)
})), new l.
default ({
router: q,
store: T
}).$mount("#app")
}
}, ["w44L"]);
webpackJsonp([26], { "1H6C": function(t, e, n) { var r = function() { return this }() || Function("return this")(), o = r.regeneratorRuntime && Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime") >= 0, i = o && r.regeneratorRuntime; if (r.regeneratorRuntime = void 0, t.exports = n("HhN8"), o) r.regeneratorRuntime = i; else try { delete r.regeneratorRuntime } catch (t) { r.regeneratorRuntime = void 0 } }, "1Yoh": function(t, e) { /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */ t.exports = function(t) { return null != t && null != t.constructor && "function" == typeof t.constructor.isBuffer && t.constructor.isBuffer(t) } }, "1nuA": function(t, e, n) { "use strict"; e.decode = e.parse = n("kMPS"), e.encode = e.stringify = n("xaZU") }, "21It": function(t, e, n) { "use strict"; var r = n("FtD3"); t.exports = function(t, e, n) { var o = n.config.validateStatus; n.status && o && !o(n.status) ? e(r("Request failed with status code " + n.status, n.config, null, n.request, n)) : t(n) } }, "5VQ+": function(t, e, n) { "use strict"; var r = n("cGG2"); t.exports = function(t, e) { r.forEach(t, function(n, r) { r !== e && r.toUpperCase() === e.toUpperCase() && (t[e] = n, delete t[r]) }) } }, "7GwW": function(t, e, n) { "use strict"; var r = n("cGG2"), o = n("21It"), i = n("DQCr"), u = n("oJlt"), c = n("GHBc"), a = n("FtD3"); t.exports = function(t) { return new Promise(function(e, s) { var f = t.data, l = t.headers; r.isFormData(f) && delete l["Content-Type"]; var d = new XMLHttpRequest; if (t.auth) { var p = t.auth.username || "", h = t.auth.password || ""; l.Authorization = "Basic " + btoa(p + ":" + h) } if (d.open(t.method.toUpperCase(), i(t.url, t.params, t.paramsSerializer), !0), d.timeout = t.timeout, d.onreadystatechange = function() { if (d && 4 === d.readyState && (0 !== d.status || d.responseURL && 0 === d.responseURL.indexOf("file:"))) { var n = "getAllResponseHeaders" in d ? u(d.getAllResponseHeaders()) : null, r = { data: t.responseType && "text" !== t.responseType ? d.response : d.responseText, status: d.status, statusText: d.statusText, headers: n, config: t, request: d }; o(e, s, r), d = null } }, d.onerror = function() { s(a("Network Error", t, null, d)), d = null }, d.ontimeout = function() { s(a("timeout of " + t.timeout + "ms exceeded", t, "ECONNABORTED", d)), d = null }, r.isStandardBrowserEnv()) { var m = n("p1b6"), g = (t.withCredentials || c(t.url)) && t.xsrfCookieName ? m.read(t.xsrfCookieName) : void 0; g && (l[t.xsrfHeaderName] = g) } if ("setRequestHeader" in d && r.forEach(l, function(t, e) { void 0 === f && "content-type" === e.toLowerCase() ? delete l[e] : d.setRequestHeader(e, t) }), t.withCredentials && (d.withCredentials = !0), t.responseType) try { d.responseType = t.responseType } catch (e) { if ("json" !== t.responseType) throw e } "function" == typeof t.onDownloadProgress && d.addEventListener("progress", t.onDownloadProgress), "function" == typeof t.onUploadProgress && d.upload && d.upload.addEventListener("progress", t.onUploadProgress), t.cancelToken && t.cancelToken.promise.then(function(t) { d && (d.abort(), s(t), d = null) }), void 0 === f && (f = null), d.send(f) }) } }, DQCr: function(t, e, n) { "use strict"; var r = n("cGG2"); function o(t) { return encodeURIComponent(t).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]") } t.exports = function(t, e, n) { if (!e) return t; var i; if (n) i = n(e); else if (r.isURLSearchParams(e)) i = e.toString(); else { var u = []; r.forEach(e, function(t, e) { null !== t && void 0 !== t && (r.isArray(t) ? e += "[]" : t = [t], r.forEach(t, function(t) { r.isDate(t) ? t = t.toISOString() : r.isObject(t) && (t = JSON.stringify(t)), u.push(o(e) + "=" + o(t)) })) }), i = u.join("&") } return i && (t += (-1 === t.indexOf("?") ? "?" : "&") + i), t } }, "Fg/V": function(t, e, n) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var r = n("Xxa5"), o = n.n(r), i = n("OMjk"); var u = { data: function() { return { resData: {}, type: !0 } }, mounted: function() { this.getOvd() }, methods: { getOvd: function() { var t, e = this; return (t = o.a.mark(function t() { var n; return o.a.wrap(function(t) { for (;;) switch (t.prev = t.next) { case 0: return e.$loading.show(), t.next = 3, Object(i.C)(); case 3: n = t.sent, console.log(n), n && 200 === n.status ? (e.$loading.hide(), location.href = n.data) : console.log(n); case 6: case "end": return t.stop() } }, t, e) }), function() { var e = t.apply(this, arguments); return new Promise(function(t, n) { return function r(o, i) { try { var u = e[o](i), c = u.value } catch (t) { return void n(t) } if (!u.done) return Promise.resolve(c).then(function(t) { r("next", t) }, function(t) { r("throw", t) }); t(c) }("next") }) })() } } }, c = { render: function() { var t = this.$createElement; return (this._self._c || t)("div") }, staticRenderFns: [] }; var a = n("VU/8")(u, c, !1, function(t) { n("Lyyw") }, "data-v-11a2266e", null); e. default = a.exports }, FtD3: function(t, e, n) { "use strict"; var r = n("t8qj"); t.exports = function(t, e, n, o, i) { var u = new Error(t); return r(u, e, n, o, i) } }, GHBc: function(t, e, n) { "use strict"; var r = n("cGG2"); t.exports = r.isStandardBrowserEnv() ? function() { var t, e = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a"); function o(t) { var r = t; return e && (n.setAttribute("href", r), r = n.href), n.setAttribute("href", r), { href: n.href, protocol: n.protocol ? n.protocol.replace(/:$/, "") : "", host: n.host, search: n.search ? n.search.replace(/^\?/, "") : "", hash: n.hash ? n.hash.replace(/^#/, "") : "", hostname: n.hostname, port: n.port, pathname: "/" === n.pathname.charAt(0) ? n.pathname : "/" + n.pathname } } return t = o(window.location.href), function(e) { var n = r.isString(e) ? o(e) : e; return n.protocol === t.protocol && n.host === t.host } }() : function() { return !0 } }, HhN8: function(t, e) { ! function(e) { "use strict"; var n, r = Object.prototype, o = r.hasOwnProperty, i = "function" == typeof Symbol ? Symbol : {}, u = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", a = i.toStringTag || "@@toStringTag", s = "object" == typeof t, f = e.regeneratorRuntime; if (f) s && (t.exports = f); else { (f = e.regeneratorRuntime = s ? t.exports : {}).wrap = x; var l = "suspendedStart", d = "suspendedYield", p = "executing", h = "completed", m = {}, g = {}; g[u] = function() { return this }; var v = Object.getPrototypeOf, y = v && v(v(R([]))); y && y !== r && o.call(y, u) && (g = y); var w = T.prototype = O.prototype = Object.create(g); E.prototype = w.constructor = T, T.constructor = E, T[a] = E.displayName = "GeneratorFunction", f.isGeneratorFunction = function(t) { var e = "function" == typeof t && t.constructor; return !!e && (e === E || "GeneratorFunction" === (e.displayName || e.name)) }, f.mark = function(t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, T) : (t.__proto__ = T, a in t || (t[a] = "GeneratorFunction")), t.prototype = Object.create(w), t }, f.awrap = function(t) { return { __await: t } }, C(L.prototype), L.prototype[c] = function() { return this }, f.AsyncIterator = L, f.async = function(t, e, n, r) { var o = new L(x(t, e, n, r)); return f.isGeneratorFunction(e) ? o : o.next().then(function(t) { return t.done ? t.value : o.next() }) }, C(w), w[a] = "Generator", w[u] = function() { return this }, w.toString = function() { return "[object Generator]" }, f.keys = function(t) { var e = []; for (var n in t) e.push(n); return e.reverse(), function n() { for (; e.length;) { var r = e.pop(); if (r in t) return n.value = r, n.done = !1, n } return n.done = !0, n } }, f.values = R, k.prototype = { constructor: k, reset: function(t) { if (this.prev = 0, this.next = 0, this.sent = this._sent = n, this.done = !1, this.delegate = null, this.method = "next", this.arg = n, this.tryEntries.forEach(_), !t) for (var e in this) "t" === e.charAt(0) && o.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = n) }, stop: function() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval }, dispatchException: function(t) { if (this.done) throw t; var e = this; function r(r, o) { return c.type = "throw", c.arg = t, e.next = r, o && (e.method = "next", e.arg = n), !! o } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var u = this.tryEntries[i], c = u.completion; if ("root" === u.tryLoc) return r("end"); if (u.tryLoc <= this.prev) { var a = o.call(u, "catchLoc"), s = o.call(u, "finallyLoc"); if (a && s) { if (this.prev < u.catchLoc) return r(u.catchLoc, !0); if (this.prev < u.finallyLoc) return r(u.finallyLoc) } else if (a) { if (this.prev < u.catchLoc) return r(u.catchLoc, !0) } else { if (!s) throw new Error("try statement without catch or finally"); if (this.prev < u.finallyLoc) return r(u.finallyLoc) } } } }, abrupt: function(t, e) { for (var n = this.tryEntries.length - 1; n >= 0; --n) { var r = this.tryEntries[n]; if (r.tryLoc <= this.prev && o.call(r, "finallyLoc") && this.prev < r.finallyLoc) { var i = r; break } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var u = i ? i.completion : {}; return u.type = t, u.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, m) : this.complete(u) }, complete: function(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), m }, finish: function(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n.finallyLoc === t) return this.complete(n.completion, n.afterLoc), _(n), m } }, catch: function(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n.tryLoc === t) { var r = n.completion; if ("throw" === r.type) { var o = r.arg; _(n) } return o } } throw new Error("illegal catch attempt") }, delegateYield: function(t, e, r) { return this.delegate = { iterator: R(t), resultName: e, nextLoc: r }, "next" === this.method && (this.arg = n), m } } } function x(t, e, n, r) { var o = e && e.prototype instanceof O ? e : O, i = Object.create(o.prototype), u = new k(r || []); return i._invoke = function(t, e, n) { var r = l; return function(o, i) { if (r === p) throw new Error("Generator is already running"); if (r === h) { if ("throw" === o) throw i; return G() } for (n.method = o, n.arg = i;;) { var u = n.delegate; if (u) { var c = j(u, n); if (c) { if (c === m) continue; return c } } if ("next" === n.method) n.sent = n._sent = n.arg; else if ("throw" === n.method) { if (r === l) throw r = h, n.arg; n.dispatchException(n.arg) } else "return" === n.method && n.abrupt("return", n.arg); r = p; var a = b(t, e, n); if ("normal" === a.type) { if (r = n.done ? h : d, a.arg === m) continue; return { value: a.arg, done: n.done } } "throw" === a.type && (r = h, n.method = "throw", n.arg = a.arg) } } }(t, n, u), i } function b(t, e, n) { try { return { type: "normal", arg: t.call(e, n) } } catch (t) { return { type: "throw", arg: t } } } function O() {} function E() {} function T() {} function C(t) { ["next", "throw", "return"].forEach(function(e) { t[e] = function(t) { return this._invoke(e, t) } }) } function L(t) { var e; this._invoke = function(n, r) { function i() { return new Promise(function(e, i) { ! function e(n, r, i, u) { var c = b(t[n], t, r); if ("throw" !== c.type) { var a = c.arg, s = a.value; return s && "object" == typeof s && o.call(s, "__await") ? Promise.resolve(s.__await).then(function(t) { e("next", t, i, u) }, function(t) { e("throw", t, i, u) }) : Promise.resolve(s).then(function(t) { a.value = t, i(a) }, u) } u(c.arg) }(n, r, e, i) }) } return e = e ? e.then(i, i) : i() } } function j(t, e) { var r = t.iterator[e.method]; if (r === n) { if (e.delegate = null, "throw" === e.method) { if (t.iterator. return &&(e.method = "return", e.arg = n, j(t, e), "throw" === e.method)) return m; e.method = "throw", e.arg = new TypeError("The iterator does not provide a 'throw' method") } return m } var o = b(r, t.iterator, e.arg); if ("throw" === o.type) return e.method = "throw", e.arg = o.arg, e.delegate = null, m; var i = o.arg; return i ? i.done ? (e[t.resultName] = i.value, e.next = t.nextLoc, "return" !== e.method && (e.method = "next", e.arg = n), e.delegate = null, m) : i : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, m) } function S(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e) } function _(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e } function k(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(S, this), this.reset(!0) } function R(t) { if (t) { var e = t[u]; if (e) return e.call(t); if ("function" == typeof t.next) return t; if (!isNaN(t.length)) { var r = -1, i = function e() { for (; ++r < t.length;) if (o.call(t, r)) return e.value = t[r], e.done = !1, e; return e.value = n, e.done = !0, e }; return i.next = i } } return { next: G } } function G() { return { value: n, done: !0 } } }(function() { return this }() || Function("return this")()) }, "JP+z": function(t, e, n) { "use strict"; t.exports = function(t, e) { return function() { for (var n = new Array(arguments.length), r = 0; r < n.length; r++) n[r] = arguments[r]; return t.apply(e, n) } } }, JQEa: function(t, e, n) { "use strict"; n.d(e, "g", function() { return r }), n.d(e, "d", function() { return o }), n.d(e, "i", function() { return i }), n.d(e, "f", function() { return u }), n.d(e, "j", function() { return c }), n.d(e, "e", function() { return a }), n.d(e, "c", function() { return s }), n.d(e, "h", function() { return f }), n.d(e, "a", function() { return l }), n.d(e, "b", function() { return d }); var r = function(t) { return null == t || "undefined" == t || "null" == t || void 0 === t || void 0 == t || "" == t }, o = function(t) { var e = document.location.href, n = e.indexOf(t + "="); if (-1 == n) return !1; var r = e.slice(t.length + n + 1), o = r.indexOf("&"); return -1 != o && (r = r.slice(0, o)), r }, i = function(t, e) { if (t) { var n = new Date(t), r = n.getFullYear(), o = n.getMonth() + 1 < 10 ? "0" + (n.getMonth() + 1) : n.getMonth() + 1, i = n.getDate() < 10 ? "0" + n.getDate() : n.getDate(), u = n.getHours() < 10 ? "0" + n.getHours() : n.getHours(), c = n.getMinutes() < 10 ? "0" + n.getMinutes() : n.getMinutes(), a = n.getSeconds() < 10 ? "0" + n.getSeconds() : n.getSeconds(); return 1 == e ? r + "-" + o + "-" + i + " " + u + ":" + c + ":" + a : r + "年" + o + "月" + i + "日 " + u + ":" + c } return t }, u = function(t, e) { "back" == e ? t.go(-1) : t.push(e) }, c = function(t, e) { t && ("string" != typeof e && (e = JSON.stringify(e)), window.sessionStorage.setItem(t, e)) }, a = function(t) { if (t) return window.sessionStorage.getItem(t) }, s = function(t) { for (var e = t + "=", n = document.cookie.split(";"), r = 0; r < n.length; r++) { var o = n[r].trim(); if (0 == o.indexOf(e)) return o.substring(e.length, o.length) } return "" }, f = function(t) { return !!/^[1][3,4,5,7,8][0-9]{9}$/.test(t) }, l = function(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 300, n = null; return function() { var r = this, o = arguments; clearTimeout(n), n = setTimeout(function() { t.apply(r, o) }, e) } }, d = function(t) { return t.replace(/name="viewport"/gi, 'name="view-onstar-port"') } }, KCLY: function(t, e, n) { "use strict"; (function(e) { var r = n("cGG2"), o = n("5VQ+"), i = { "Content-Type": "application/x-www-form-urlencoded" }; function u(t, e) { !r.isUndefined(t) && r.isUndefined(t["Content-Type"]) && (t["Content-Type"] = e) } var c, a = { adapter: ("undefined" != typeof XMLHttpRequest ? c = n("7GwW") : void 0 !== e && (c = n("7GwW")), c), transformRequest: [function(t, e) { return o(e, "Content-Type"), r.isFormData(t) || r.isArrayBuffer(t) || r.isBuffer(t) || r.isStream(t) || r.isFile(t) || r.isBlob(t) ? t : r.isArrayBufferView(t) ? t.buffer : r.isURLSearchParams(t) ? (u(e, "application/x-www-form-urlencoded;charset=utf-8"), t.toString()) : r.isObject(t) ? (u(e, "application/json;charset=utf-8"), JSON.stringify(t)) : t }], transformResponse: [function(t) { if ("string" == typeof t) try { t = JSON.parse(t) } catch (t) {} return t }], timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, validateStatus: function(t) { return t >= 200 && t < 300 } }; a.headers = { common: { Accept: "application/json, text/plain, */*" } }, r.forEach(["delete", "get", "head"], function(t) { a.headers[t] = {} }), r.forEach(["post", "put", "patch"], function(t) { a.headers[t] = r.merge(i) }), t.exports = a }).call(e, n("W2nU")) }, Lyyw: function(t, e) {}, OMjk: function(t, e, n) { "use strict"; var r = n("mtWM"), o = n.n(r), i = n("7+uW"), u = n("JQEa"); console.log(Object(u.c)("ACCESS-TOKEN")); var c = void 0, a = {}, s = o.a.CancelToken, f = !1, l = !1; o.a.interceptors.request.use(function(t) { return f = -1 != t.url.indexOf("ovd"), l = -1 != t.url.indexOf("check") && -1 != location.href.indexOf("servicePsd"), a[t.url] && (a[t.url]("操作取消"), a[t.url] = c), console.log(t), t }, function(t) { return console.log(t), Promise.reject(t) }), o.a.interceptors.response.use(function(t) { return t }, function(t) { if (t && t.response) switch (t.response.status) { case 400: t.message = "错误请求"; break; case 401: t.message = "未授权,请重新登录"; break; case 403: t.message = "拒绝访问"; break; case 404: t.message = "请求错误,未找到该资源"; break; case 405: t.message = "请求方法未允许"; break; case 408: t.message = "请求超时"; break; case 500: t.message = "服务器端出错"; break; case 501: t.message = "网络未实现"; break; case 502: t.message = "网络错误"; break; case 503: t.message = "服务不可用"; break; case 504: t.message = "网络超时"; break; case 505: t.message = "http版本不支持该请求"; break; default: t.message = "连接错误" + t.response.status } else t.message = "连接到服务器失败"; var e = "error" == t.response.data.response && null != t.response.data.responseMessage ? t.response.data.responseMessage : t.message, n = t.response.config.url; return console.log("configurl", n), n.indexOf("lbs/postalinfo/last") < 0 && (n.indexOf("/process") > -1 || n.indexOf("commands/exestatus") > -1 ? console.log(n) : "E9001" === e ? i. default.prototype.$messagebox({ title: "帐号已经注销", message: "您的安吉星手机应用帐号已经注销,如需帮助,请通过车内蓝键或拨打客服电话400-820-1188与我们联系。", confirmButtonText: "知道了", closeOnClickModal: !1, showCancelButton: !1 }) : n.indexOf("eInvoice/order/list") > -1 || i. default.prototype.$Message({ msg: e }, function() { (f || l) && WeixinJSBridge.call("closeWindow") })), i. default.$loading.hide(), Promise.resolve(t.response) }), o.a.defaults.baseURL = "/api", o.a.defaults.headers = { "Content-Type": "application/json", "ACCESS-TOKEN": Object(u.c)("ACCESS-TOKEN") }, o.a.defaults.timeout = 6e4; var d = function(t, e) { return new Promise(function(n, r) { o()({ method: "get", url: t, params: e, cancelToken: new s(function(t) { c = t }) }).then(function(t) { n(t) }) }) }, p = function(t, e) { return new Promise(function(n, r) { o()({ method: "post", url: t, data: e, cancelToken: new s(function(t) { c = t }) }).then(function(t) { n(t) }) }) }, h = function(t, e) { return new Promise(function(n, r) { o()({ method: "put", url: t, data: e, cancelToken: new s(function(t) { c = t }) }).then(function(t) { n(t) }) }) }, m = function(t, e) { return new Promise(function(n, r) { o()({ method: "delete", url: t, params: e, cancelToken: new s(function(t) { c = t }) }).then(function(t) { n(t) }) }) }; n("1nuA"); n.d(e, "w", function() { return y }), n.d(e, "_1", function() { return C }), n.d(e, "x", function() { return L }), n.d(e, "y", function() { return j }), n.d(e, "_2", function() { return S }), n.d(e, "f", function() { return _ }), n.d(e, "F", function() { return k }), n.d(e, "e", function() { return R }), n.d(e, "_9", function() { return G }), n.d(e, "d", function() { return A }), n.d(e, "l", function() { return P }), n.d(e, "S", function() { return N }), n.d(e, "R", function() { return B }), n.d(e, "T", function() { return U }), n.d(e, "j", function() { return F }), n.d(e, "Q", function() { return I }), n.d(e, "k", function() { return D }), n.d(e, "m", function() { return q }), n.d(e, "D", function() { return M }), n.d(e, "h", function() { return H }), n.d(e, "i", function() { return W }), n.d(e, "z", function() { return J }), n.d(e, "A", function() { return V }), n.d(e, "J", function() { return K }), n.d(e, "_6", function() { return z }), n.d(e, "_8", function() { return Y }), n.d(e, "c", function() { return $ }), n.d(e, "_7", function() { return X }), n.d(e, "b", function() { return Q }), n.d(e, "E", function() { return Z }), n.d(e, "B", function() { return tt }), n.d(e, "_4", function() { return et }), n.d(e, "_5", function() { return nt }), n.d(e, "_3", function() { return rt }), n.d(e, "C", function() { return ot }), n.d(e, "I", function() { return it }), n.d(e, "U", function() { return ut }), n.d(e, "P", function() { return ct }), n.d(e, "G", function() { return at }), n.d(e, "H", function() { return st }), n.d(e, "K", function() { return ft }), n.d(e, "L", function() { return lt }), n.d(e, "V", function() { return dt }), n.d(e, "Z", function() { return pt }), n.d(e, "_0", function() { return ht }), n.d(e, "Y", function() { return mt }), n.d(e, "X", function() { return gt }), n.d(e, "g", function() { return vt }), n.d(e, "n", function() { return yt }), n.d(e, "v", function() { return wt }), n.d(e, "W", function() { return xt }), n.d(e, "p", function() { return bt }), n.d(e, "r", function() { return Ot }), n.d(e, "M", function() { return Et }), n.d(e, "o", function() { return Tt }), n.d(e, "O", function() { return Ct }), n.d(e, "t", function() { return Lt }), n.d(e, "N", function() { return jt }), n.d(e, "q", function() { return St }), n.d(e, "s", function() { return _t }), n.d(e, "u", function() { return kt }), n.d(e, "a", function() { return Rt }); var g = "idta", v = !1; location.href.indexOf("www.onstar.com.cn") > -1 ? g = "www" : location.href.indexOf("wechat-test.onstar.com.cn") > -1 ? g = "wechat-test" : location.href.indexOf("idt6.onstar.com.cn") > -1 ? g = "wechat-test" : location.href.indexOf("idta.onstar.com.cn") > -1 ? g = "wechat-test" : location.href.indexOf("localhost") > -1 ? (g = "wechat-test", v = !0) : g = "wechat-test"; var y = location.protocol + "//" + g + ".onstar.com.cn/", w = v ? "/wechat/" : y, x = w + "mssos/sos/wechat/v1/", b = w + "mssos/sos/wechat/v2/", O = w + "mssos/sos/mobileBizAggr/v1/", E = w + "mssos/sos/salessupport/v1/", T = w + "mssos/sos/salessupport/v2/", C = function(t) { return "www" === g ? g + ".onstar.com.cn" : "idt" === t ? "idt6sit.onstar.com.cn" : g + ".onstar.com.cn" }, L = function(t) { return p(x + "login", t) }, j = function(t) { return p(x + "logout", t) }, S = function(t) { return d(x + "vehicle", t) }, _ = function(t) { return d(x + "check", t) }, k = function(t) { return p(x + "process", t) }, R = function(t) { return d(x + "chargemode", t) }, G = function(t) { return d(x + "weektime", t) }, A = function(t) { return p(x + "charge_profile", t) }, P = function(t) { return d(x + "favorites", t) }, N = function(t) { return d(x + "tbts", t) }, B = function(t) { return m(x + "tbt/" + t, "") }, U = function(t) { return m(x + "tbt", "") }, F = function(t) { return d(x + "dealers", t) }, I = function(t) { return p(x + "tbt", t) }, D = function(t) { return m(x + "favorite/" + t, "") }, q = function(t) { return m(x + "favorite", "") }, M = function(t) { return p(O + "packages", t) }, H = function(t) { return p(O + "core_product", t) }, W = function(t) { return p(O + "data_product", t) }, J = function(t) { return h(b + "order", t) }, V = function(t) { return d(E + "order", t) }, K = function(t) { return d(E + "alipay/order", t) }, z = function(t) { return d(E + "wechat/order?" + t) }, Y = function(t) { return d(E + "wechat/pay_info", t) }, $ = function(t) { return d(E + "alipay/pay_info", t) }, X = function(t) { return d(T + "wechat/pay_info", t) }, Q = function(t) { return d(T + "alipay/pay_info", t) }, Z = function(t) { return p(E + "pay_log", t) }, tt = function(t) { return d(b + "orders", t) }, et = function(t) { return d(x + "vehicledata/" + t, "") }, nt = function(t) { return d(x + "vehicles", "") }, rt = function(t) { return p(x + "vehicle/switch", t) }, ot = function(t) { return d(b + "ovd", "") }, it = function(t) { return d(x + "resign", t) }, ut = function(t) { return d(x + "tcps", t) }, ct = function(t) { return p(x + "sign", t) }, at = function(t) { return p(x + "reg_subscriber", t) }, st = function(t) { return p(x + "reg_visitor", t) }, ft = function(t) { return p(x + "send_sec_code", t) }, lt = function(t) { return p(b + "send_sec_code", t) }, dt = function(t) { return p(x + "unique?" + t) }, pt = function(t) { return p(x + "validate_sec_code", t) }, ht = function(t) { return p(x + "validate_subscriber", t) }, mt = function(t) { return p(x + "upgrade_validate", t) }, gt = function(t) { return p(x + "upgrade_subscriber", t) }, vt = function() { return location.protocol + "//" + g + ".onstar.com.cn/mssos/sos/wechat/captcha/generate/" + Object(u.c)("ACCESS-TOKEN") + "?w=120&h=50&s=30&c=35&d=" + (new Date).getTime() }, yt = function() { return location.protocol + "//" + g + ".onstar.com.cn/mweb/ma80/forgetpwd/index.html" }, wt = function(t) { return d(x + "lbs/postalinfo/last", t) }, xt = function(t) { return p(x + "lbs/postalinfo/last", t) }, bt = function() { return d(x + "banners?bannerCategory=WECHAT_CYHD_BANNER", "") }, Ot = function(t) { return d(x + "destinations?" + t) }, Et = function(t) { return h(x + "setDestinations", t) }, Tt = function(t) { return d(x + "vehicle/avaliableFuncs", t) }, Ct = function(t) { return p(x + "share/config", t) }, Lt = function(t) { return d(x + "vehicle/phevcharge", t) }, jt = function(t) { return h(x + "vehicle/phevcharge", t) }, St = function(t) { return d(x + "vehicle/ovd/carstatus", "") }, _t = function(t) { return d(x + "vehicle/commands/exestatus/" + t, "") }, kt = function(t) { return d(x + "eInvoice/order/list?number=0&size=1&invoiceStatusList=") }, Rt = !1 }, TNV1: function(t, e, n) { "use strict"; var r = n("cGG2"); t.exports = function(t, e, n) { return r.forEach(n, function(n) { t = n(t, e) }), t } }, W2nU: function(t, e) { var n, r, o = t.exports = {}; function i() { throw new Error("setTimeout has not been defined") } function u() { throw new Error("clearTimeout has not been defined") } function c(t) { if (n === setTimeout) return setTimeout(t, 0); if ((n === i || !n) && setTimeout) return n = setTimeout, setTimeout(t, 0); try { return n(t, 0) } catch (e) { try { return n.call(null, t, 0) } catch (e) { return n.call(this, t, 0) } } }! function() { try { n = "function" == typeof setTimeout ? setTimeout : i } catch (t) { n = i } try { r = "function" == typeof clearTimeout ? clearTimeout : u } catch (t) { r = u } }(); var a, s = [], f = !1, l = -1; function d() { f && a && (f = !1, a.length ? s = a.concat(s) : l = -1, s.length && p()) } function p() { if (!f) { var t = c(d); f = !0; for (var e = s.length; e;) { for (a = s, s = []; ++l < e;) a && a[l].run(); l = -1, e = s.length } a = null, f = !1, function(t) { if (r === clearTimeout) return clearTimeout(t); if ((r === u || !r) && clearTimeout) return r = clearTimeout, clearTimeout(t); try { r(t) } catch (e) { try { return r.call(null, t) } catch (e) { return r.call(this, t) } } }(t) } } function h(t, e) { this.fun = t, this.array = e } function m() {} o.nextTick = function(t) { var e = new Array(arguments.length - 1); if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n]; s.push(new h(t, e)), 1 !== s.length || f || c(p) }, h.prototype.run = function() { this.fun.apply(null, this.array) }, o.title = "browser", o.browser = !0, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = m, o.addListener = m, o.once = m, o.off = m, o.removeListener = m, o.removeAllListeners = m, o.emit = m, o.prependListener = m, o.prependOnceListener = m, o.listeners = function(t) { return [] }, o.binding = function(t) { throw new Error("process.binding is not supported") }, o.cwd = function() { return "/" }, o.chdir = function(t) { throw new Error("process.chdir is not supported") }, o.umask = function() { return 0 } }, XmWM: function(t, e, n) { "use strict"; var r = n("KCLY"), o = n("cGG2"), i = n("fuGk"), u = n("xLtR"); function c(t) { this.defaults = t, this.interceptors = { request: new i, response: new i } } c.prototype.request = function(t) { "string" == typeof t && (t = o.merge({ url: arguments[0] }, arguments[1])), (t = o.merge(r, { method: "get" }, this.defaults, t)).method = t.method.toLowerCase(); var e = [u, void 0], n = Promise.resolve(t); for (this.interceptors.request.forEach(function(t) { e.unshift(t.fulfilled, t.rejected) }), this.interceptors.response.forEach(function(t) { e.push(t.fulfilled, t.rejected) }); e.length;) n = n.then(e.shift(), e.shift()); return n }, o.forEach(["delete", "get", "head", "options"], function(t) { c.prototype[t] = function(e, n) { return this.request(o.merge(n || {}, { method: t, url: e })) } }), o.forEach(["post", "put", "patch"], function(t) { c.prototype[t] = function(e, n, r) { return this.request(o.merge(r || {}, { method: t, url: e, data: n })) } }), t.exports = c }, Xxa5: function(t, e, n) { t.exports = n("1H6C") }, cGG2: function(t, e, n) { "use strict"; var r = n("JP+z"), o = n("1Yoh"), i = Object.prototype.toString; function u(t) { return "[object Array]" === i.call(t) } function c(t) { return null !== t && "object" == typeof t } function a(t) { return "[object Function]" === i.call(t) } function s(t, e) { if (null !== t && void 0 !== t) if ("object" != typeof t && (t = [t]), u(t)) for (var n = 0, r = t.length; n < r; n++) e.call(null, t[n], n, t); else for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.call(null, t[o], o, t) } t.exports = { isArray: u, isArrayBuffer: function(t) { return "[object ArrayBuffer]" === i.call(t) }, isBuffer: o, isFormData: function(t) { return "undefined" != typeof FormData && t instanceof FormData }, isArrayBufferView: function(t) { return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && t.buffer instanceof ArrayBuffer }, isString: function(t) { return "string" == typeof t }, isNumber: function(t) { return "number" == typeof t }, isObject: c, isUndefined: function(t) { return void 0 === t }, isDate: function(t) { return "[object Date]" === i.call(t) }, isFile: function(t) { return "[object File]" === i.call(t) }, isBlob: function(t) { return "[object Blob]" === i.call(t) }, isFunction: a, isStream: function(t) { return c(t) && a(t.pipe) }, isURLSearchParams: function(t) { return "undefined" != typeof URLSearchParams && t instanceof URLSearchParams }, isStandardBrowserEnv: function() { return ("undefined" == typeof navigator || "ReactNative" !== navigator.product) && "undefined" != typeof window && "undefined" != typeof document }, forEach: s, merge: function t() { var e = {}; function n(n, r) { "object" == typeof e[r] && "object" == typeof n ? e[r] = t(e[r], n) : e[r] = n } for (var r = 0, o = arguments.length; r < o; r++) s(arguments[r], n); return e }, extend: function(t, e, n) { return s(e, function(e, o) { t[o] = n && "function" == typeof e ? r(e, n) : e }), t }, trim: function(t) { return t.replace(/^\s*/, "").replace(/\s*$/, "") } } }, cWxy: function(t, e, n) { "use strict"; var r = n("dVOP"); function o(t) { if ("function" != typeof t) throw new TypeError("executor must be a function."); var e; this.promise = new Promise(function(t) { e = t }); var n = this; t(function(t) { n.reason || (n.reason = new r(t), e(n.reason)) }) } o.prototype.throwIfRequested = function() { if (this.reason) throw this.reason }, o.source = function() { var t; return { token: new o(function(e) { t = e }), cancel: t } }, t.exports = o }, dIwP: function(t, e, n) { "use strict"; t.exports = function(t) { return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t) } }, dVOP: function(t, e, n) { "use strict"; function r(t) { this.message = t } r.prototype.toString = function() { return "Cancel" + (this.message ? ": " + this.message : "") }, r.prototype.__CANCEL__ = !0, t.exports = r }, fuGk: function(t, e, n) { "use strict"; var r = n("cGG2"); function o() { this.handlers = [] } o.prototype.use = function(t, e) { return this.handlers.push({ fulfilled: t, rejected: e }), this.handlers.length - 1 }, o.prototype.eject = function(t) { this.handlers[t] && (this.handlers[t] = null) }, o.prototype.forEach = function(t) { r.forEach(this.handlers, function(e) { null !== e && t(e) }) }, t.exports = o }, kMPS: function(t, e, n) { "use strict"; function r(t, e) { return Object.prototype.hasOwnProperty.call(t, e) } t.exports = function(t, e, n, i) { e = e || "&", n = n || "="; var u = {}; if ("string" != typeof t || 0 === t.length) return u; var c = /\+/g; t = t.split(e); var a = 1e3; i && "number" == typeof i.maxKeys && (a = i.maxKeys); var s = t.length; a > 0 && s > a && (s = a); for (var f = 0; f < s; ++f) { var l, d, p, h, m = t[f].replace(c, "%20"), g = m.indexOf(n); g >= 0 ? (l = m.substr(0, g), d = m.substr(g + 1)) : (l = m, d = ""), p = decodeURIComponent(l), h = decodeURIComponent(d), r(u, p) ? o(u[p]) ? u[p].push(h) : u[p] = [u[p], h] : u[p] = h } return u }; var o = Array.isArray || function(t) { return "[object Array]" === Object.prototype.toString.call(t) } }, mtWM: function(t, e, n) { t.exports = n("tIFN") }, oJlt: function(t, e, n) { "use strict"; var r = n("cGG2"), o = ["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]; t.exports = function(t) { var e, n, i, u = {}; return t ? (r.forEach(t.split("\n"), function(t) { if (i = t.indexOf(":"), e = r.trim(t.substr(0, i)).toLowerCase(), n = r.trim(t.substr(i + 1)), e) { if (u[e] && o.indexOf(e) >= 0) return; u[e] = "set-cookie" === e ? (u[e] ? u[e] : []).concat([n]) : u[e] ? u[e] + ", " + n : n } }), u) : u } }, p1b6: function(t, e, n) { "use strict"; var r = n("cGG2"); t.exports = r.isStandardBrowserEnv() ? { write: function(t, e, n, o, i, u) { var c = []; c.push(t + "=" + encodeURIComponent(e)), r.isNumber(n) && c.push("expires=" + new Date(n).toGMTString()), r.isString(o) && c.push("path=" + o), r.isString(i) && c.push("domain=" + i), !0 === u && c.push("secure"), document.cookie = c.join("; ") }, read: function(t) { var e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)")); return e ? decodeURIComponent(e[3]) : null }, remove: function(t) { this.write(t, "", Date.now() - 864e5) } } : { write: function() {}, read: function() { return null }, remove: function() {} } }, pBtG: function(t, e, n) { "use strict"; t.exports = function(t) { return !(!t || !t.__CANCEL__) } }, pxG4: function(t, e, n) { "use strict"; t.exports = function(t) { return function(e) { return t.apply(null, e) } } }, qRfI: function(t, e, n) { "use strict"; t.exports = function(t, e) { return e ? t.replace(/\/+$/, "") + "/" + e.replace(/^\/+/, "") : t } }, t8qj: function(t, e, n) { "use strict"; t.exports = function(t, e, n, r, o) { return t.config = e, n && (t.code = n), t.request = r, t.response = o, t } }, tIFN: function(t, e, n) { "use strict"; var r = n("cGG2"), o = n("JP+z"), i = n("XmWM"), u = n("KCLY"); function c(t) { var e = new i(t), n = o(i.prototype.request, e); return r.extend(n, i.prototype, e), r.extend(n, e), n } var a = c(u); a.Axios = i, a.create = function(t) { return c(r.merge(u, t)) }, a.Cancel = n("dVOP"), a.CancelToken = n("cWxy"), a.isCancel = n("pBtG"), a.all = function(t) { return Promise.all(t) }, a.spread = n("pxG4"), t.exports = a, t.exports. default = a }, xLtR: function(t, e, n) { "use strict"; var r = n("cGG2"), o = n("TNV1"), i = n("pBtG"), u = n("KCLY"), c = n("dIwP"), a = n("qRfI"); function s(t) { t.cancelToken && t.cancelToken.throwIfRequested() } t.exports = function(t) { return s(t), t.baseURL && !c(t.url) && (t.url = a(t.baseURL, t.url)), t.headers = t.headers || {}, t.data = o(t.data, t.headers, t.transformRequest), t.headers = r.merge(t.headers.common || {}, t.headers[t.method] || {}, t.headers || {}), r.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function(e) { delete t.headers[e] }), (t.adapter || u.adapter)(t).then(function(e) { return s(t), e.data = o(e.data, e.headers, t.transformResponse), e }, function(e) { return i(e) || (s(t), e && e.response && (e.response.data = o(e.response.data, e.response.headers, t.transformResponse))), Promise.reject(e) }) } }, xaZU: function(t, e, n) { "use strict"; var r = function(t) { switch (typeof t) { case "string": return t; case "boolean": return t ? "true" : "false"; case "number": return isFinite(t) ? t : ""; default: return "" } }; t.exports = function(t, e, n, c) { return e = e || "&", n = n || "=", null === t && (t = void 0), "object" == typeof t ? i(u(t), function(u) { var c = encodeURIComponent(r(u)) + n; return o(t[u]) ? i(t[u], function(t) { return c + encodeURIComponent(r(t)) }).join(e) : c + encodeURIComponent(r(t[u])) }).join(e) : c ? encodeURIComponent(r(c)) + n + encodeURIComponent(r(t)) : "" }; var o = Array.isArray || function(t) { return "[object Array]" === Object.prototype.toString.call(t) }; function i(t, e) { if (t.map) return t.map(e); for (var n = [], r = 0; r < t.length; r++) n.push(e(t[r], r)); return n } var u = Object.keys || function(t) { var e = []; for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.push(n); return e } } });


浙公网安备 33010602011771号