@@ -11,11 +11,14 @@ function t() {
|
||||
}
|
||||
|
||||
function n(a) {
|
||||
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
||||
|
||||
|
||||
var baseUrl = "https://t-jm.v0750.com/v3";
|
||||
|
||||
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
||||
// a 是否 https, 如果不是自动补全
|
||||
if (!/^https/.test(a)) {
|
||||
a = 'https://t-jm.v0750.com' + a;
|
||||
a = baseUrl + a;
|
||||
}
|
||||
|
||||
// method 默认为 GET
|
||||
@@ -27,6 +30,7 @@ function n(a) {
|
||||
|
||||
return wx.showLoading(), new Promise(function (n, c) {
|
||||
console.log("requestdevicecode", o.globalData.devicecode);
|
||||
|
||||
var i = Object.assign({}, {
|
||||
devicecode: o.globalData.devicecode
|
||||
}, o.globalData.options, t);
|
||||
@@ -36,7 +40,7 @@ function n(a) {
|
||||
header: {
|
||||
"content-type": "application/json",
|
||||
Accept: "application/json, text/plain",
|
||||
Cookie: "_miucms_session=" + wx.getStorageSync("_miucms_session"),
|
||||
Cookie: "XPHP_SESSION_ID=" + wx.getStorageSync("session"),
|
||||
token: wx.getStorageSync("session") || ""
|
||||
},
|
||||
method: method,
|
||||
@@ -91,7 +95,7 @@ function n(a) {
|
||||
}
|
||||
|
||||
function c(e, a) {
|
||||
console.log("appstart", e), o = a, n("https://t-jm.v0750.com/miniprogram", {
|
||||
console.log("appstart", e), o = a, n("/miniprogram/index", {
|
||||
code: e
|
||||
}, !0).then(function (e) {
|
||||
var o = e.data;
|
||||
@@ -102,7 +106,6 @@ function c(e, a) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
initial_url: "https://t-jm.v0750.com/miniprogram",
|
||||
login: t,
|
||||
request: n,
|
||||
pageStart: function (e) {
|
||||
@@ -119,11 +122,13 @@ module.exports = {
|
||||
c(res.code, e);
|
||||
});
|
||||
},
|
||||
baseUrl: "https://t-jm.v0750.com/",
|
||||
getDevicecode: function (e, a) {
|
||||
o = e, n("https://t-jm.v0750.com/miniprogram/identify/reload", a, !0).then(function (e) {
|
||||
o = e, n("/miniprogram/identify/reload", a, !0).then(function (e) {
|
||||
var a = e.data;
|
||||
console.log("onshow获取到的数据", a), o.globalData.devicecode = a.devicecode || o.globalData.devicecode;
|
||||
if (e.code == 200) {
|
||||
o.globalData.deviceData = a || {};
|
||||
o.globalData.devicecode = a.devicecode || '';
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user