351 lines
12 KiB
JavaScript
Executable File
351 lines
12 KiB
JavaScript
Executable File
// ============================================
|
||
// 反编译后的可读版本
|
||
// 原文件: index.8bc32d98.js
|
||
// 文件: Webpack H5应用主入口
|
||
// 大小: 281KB
|
||
// ============================================
|
||
|
||
// ==================== Webpack Bootstrap ====================
|
||
(function(modules) {
|
||
|
||
/**
|
||
* Webpack模块加载器
|
||
* @param {Array} chunkData - [chunkIds, moreModules, executeModules]
|
||
*/
|
||
function webpackJsonpCallback(chunkData) {
|
||
var chunkIds = chunkData[0];
|
||
var moreModules = chunkData[1];
|
||
var executeModules = chunkData[2];
|
||
|
||
var moduleId, chunkId, resolves = [];
|
||
|
||
// 标记所有chunk为已加载
|
||
for (var i = 0; i < chunkIds.length; i++) {
|
||
chunkId = chunkIds[i];
|
||
if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) &&
|
||
installedChunks[chunkId]) {
|
||
resolves.push(installedChunks[chunkId][0]);
|
||
}
|
||
installedChunks[chunkId] = 0;
|
||
}
|
||
|
||
// 添加新模块到modules对象
|
||
for (moduleId in moreModules) {
|
||
if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
|
||
modules[moduleId] = moreModules[moduleId];
|
||
}
|
||
}
|
||
|
||
// 执行父chunk回调
|
||
if (parentJsonpFunction) {
|
||
parentJsonpFunction(chunkData);
|
||
}
|
||
|
||
// 解析所有promise
|
||
while (resolves.length) {
|
||
resolves.shift()();
|
||
}
|
||
|
||
// 添加入口模块到延迟列表
|
||
return deferredModules.push.apply(deferredModules, executeModules || []),
|
||
checkDeferredModules();
|
||
}
|
||
|
||
/**
|
||
* 检查延迟模块
|
||
*/
|
||
function checkDeferredModules() {
|
||
var result;
|
||
for (var i = 0; i < deferredModules.length; i++) {
|
||
var deferredModule = deferredModules[i];
|
||
var fulfilled = true;
|
||
|
||
for (var j = 1; j < deferredModule.length; j++) {
|
||
var depId = deferredModule[j];
|
||
if (0 !== installedChunks[depId]) {
|
||
fulfilled = false;
|
||
}
|
||
}
|
||
|
||
if (fulfilled) {
|
||
deferredModules.splice(i--, 1);
|
||
result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
|
||
// 模块缓存
|
||
var installedModules = {};
|
||
|
||
// Chunk加载状态
|
||
// 0 = 已加载, Promise = 加载中, undefined = 未加载
|
||
var installedChunks = {
|
||
index: 0
|
||
};
|
||
|
||
// 延迟模块
|
||
var deferredModules = [];
|
||
|
||
/**
|
||
* Webpack require函数
|
||
* @param {string} moduleId - 模块ID
|
||
*/
|
||
function __webpack_require__(moduleId) {
|
||
// 检查缓存
|
||
if (installedModules[moduleId]) {
|
||
return installedModules[moduleId].exports;
|
||
}
|
||
|
||
// 创建新模块并放入缓存
|
||
var module = installedModules[moduleId] = {
|
||
i: moduleId,
|
||
l: false,
|
||
exports: {}
|
||
};
|
||
|
||
// 执行模块函数
|
||
modules[moduleId].call(
|
||
module.exports,
|
||
module,
|
||
module.exports,
|
||
__webpack_require__
|
||
);
|
||
|
||
// 标记模块为已加载
|
||
module.l = true;
|
||
|
||
// 返回模块导出
|
||
return module.exports;
|
||
}
|
||
|
||
/**
|
||
* 异步加载chunk
|
||
* @param {string} chunkId - Chunk ID
|
||
*/
|
||
__webpack_require__.e = function requireEnsure(chunkId) {
|
||
var promises = [];
|
||
var installedChunkData = installedChunks[chunkId];
|
||
|
||
if (0 !== installedChunkData) {
|
||
if (installedChunkData) {
|
||
promises.push(installedChunkData[2]);
|
||
} else {
|
||
// 创建Promise
|
||
var promise = new Promise(function(resolve, reject) {
|
||
installedChunkData = installedChunks[chunkId] = [resolve, reject];
|
||
});
|
||
promises.push(installedChunkData[2] = promise);
|
||
|
||
// 开始加载chunk
|
||
var script = document.createElement('script');
|
||
var onScriptComplete;
|
||
|
||
script.charset = 'utf-8';
|
||
script.timeout = 120;
|
||
|
||
if (__webpack_require__.nc) {
|
||
script.setAttribute("nonce", __webpack_require__.nc);
|
||
}
|
||
|
||
script.src = jsonpScriptSrc(chunkId);
|
||
|
||
// 创建错误处理
|
||
var error = new Error();
|
||
onScriptComplete = function(event) {
|
||
// 避免内存泄漏
|
||
script.onerror = script.onload = null;
|
||
clearTimeout(timeout);
|
||
|
||
var chunk = installedChunks[chunkId];
|
||
if (0 !== chunk) {
|
||
if (chunk) {
|
||
var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
||
var realSrc = event && event.target && event.target.src;
|
||
error.message = 'Loading chunk ' + chunkId + ' failed.\n(' +
|
||
errorType + ': ' + realSrc + ')';
|
||
error.name = 'ChunkLoadError';
|
||
error.type = errorType;
|
||
error.request = realSrc;
|
||
chunk[1](error);
|
||
}
|
||
installedChunks[chunkId] = undefined;
|
||
}
|
||
};
|
||
|
||
var timeout = setTimeout(function() {
|
||
onScriptComplete({ type: 'timeout', target: script });
|
||
}, 120000);
|
||
|
||
script.onerror = script.onload = onScriptComplete;
|
||
document.head.appendChild(script);
|
||
}
|
||
}
|
||
|
||
return Promise.all(promises);
|
||
};
|
||
|
||
/**
|
||
* 获取chunk的script src
|
||
*/
|
||
function jsonpScriptSrc(chunkId) {
|
||
// Chunk名称映射
|
||
var chunkMap = {
|
||
"pages-index-index~pages-personal-index~pages-rushing-detail~pages-rushing-index~pages-sub-pages-addr~7968e06c":
|
||
"pages-index-index~pages-personal-index~pages-rushing-detail~pages-rushing-index~pages-sub-pages-addr~7968e06c",
|
||
"pages-index-index~pages-sub-pages-search-index":
|
||
"pages-index-index~pages-sub-pages-search-index",
|
||
"pages-index-index": "pages-index-index",
|
||
"pages-sub-pages-search-index": "pages-sub-pages-search-index",
|
||
"pages-personal-index": "pages-personal-index",
|
||
"pages-rushing-detail~pages-rushing-index": "pages-rushing-detail~pages-rushing-index",
|
||
"pages-rushing-index": "pages-rushing-index",
|
||
"pages-rushing-detail~pages-sub-pages-balance-index~pages-sub-pages-coupon-index~pages-sub-pages-my-f~58831170":
|
||
"pages-rushing-detail~pages-sub-pages-balance-index~pages-sub-pages-coupon-index~pages-sub-pages-my-f~58831170",
|
||
"pages-rushing-detail~pages-sub-pages-balance-index~pages-sub-pages-coupon-index~pages-sub-pages-priz~0d2429df":
|
||
"pages-rushing-detail~pages-sub-pages-balance-index~pages-sub-pages-coupon-index~pages-sub-pages-priz~0d2429df",
|
||
"pages-rushing-detail": "pages-rushing-detail",
|
||
"pages-sub-pages-rushing-order-detail~pages-sub-pages-rushing-order-index":
|
||
"pages-sub-pages-rushing-order-detail~pages-sub-pages-rushing-order-index",
|
||
"pages-sub-pages-rushing-order-index": "pages-sub-pages-rushing-order-index",
|
||
"pages-sub-pages-my-fans-index": "pages-sub-pages-my-fans-index",
|
||
"pages-sub-pages-shop-order-index": "pages-sub-pages-shop-order-index",
|
||
"pages-sub-pages-address-detail~pages-sub-pages-login-change-pwd~pages-sub-pages-login-index~pages-su~3512e57f":
|
||
"pages-sub-pages-address-detail~pages-sub-pages-login-change-pwd~pages-sub-pages-login-index~pages-su~3512e57f",
|
||
"pages-sub-pages-address-detail": "pages-sub-pages-address-detail",
|
||
"pages-sub-pages-login-change-pwd~pages-sub-pages-login-register~pages-sub-pages-login-reset-account":
|
||
"pages-sub-pages-login-change-pwd~pages-sub-pages-login-register~pages-sub-pages-login-reset-account",
|
||
"pages-sub-pages-login-change-pwd": "pages-sub-pages-login-change-pwd",
|
||
"pages-sub-pages-login-register": "pages-sub-pages-login-register",
|
||
"pages-sub-pages-login-reset-account": "pages-sub-pages-login-reset-account",
|
||
"pages-sub-pages-login-index": "pages-sub-pages-login-index",
|
||
"pages-sub-pages-my-payee-yl-detail": "pages-sub-pages-my-payee-yl-detail",
|
||
"pages-sub-pages-my-payee-zfb-detail": "pages-sub-pages-my-payee-zfb-detail",
|
||
"pages-sub-pages-address-index": "pages-sub-pages-address-index",
|
||
"pages-sub-pages-rushing-order-detail": "pages-sub-pages-rushing-order-detail",
|
||
"pages-sub-pages-setting-index": "pages-sub-pages-setting-index",
|
||
"pages-sub-pages-user-info-index": "pages-sub-pages-user-info-index",
|
||
"pages-sub-pages-balance-index": "pages-sub-pages-balance-index",
|
||
"pages-sub-pages-coupon-index": "pages-sub-pages-coupon-index",
|
||
"pages-sub-pages-prize-index": "pages-sub-pages-prize-index",
|
||
"pages-sub-pages-promote-prize-index": "pages-sub-pages-promote-prize-index",
|
||
"pages-sub-pages-withdraw-list": "pages-sub-pages-withdraw-list",
|
||
"pages-sub-pages-withdraw-index": "pages-sub-pages-withdraw-index",
|
||
"pages-sub-pages-agreement-contract~pages-sub-pages-agreement-contract1~pages-sub-pages-agreement-index":
|
||
"pages-sub-pages-agreement-contract~pages-sub-pages-agreement-contract1~pages-sub-pages-agreement-index",
|
||
"pages-sub-pages-agreement-contract": "pages-sub-pages-agreement-contract",
|
||
"pages-sub-pages-agreement-contract1": "pages-sub-pages-agreement-contract1",
|
||
"pages-sub-pages-agreement-index": "pages-sub-pages-agreement-index",
|
||
"pages-sub-pages-agreement-my-contract": "pages-sub-pages-agreement-my-contract",
|
||
"pages-sub-pages-good-good-detail": "pages-sub-pages-good-good-detail",
|
||
"pages-sub-pages-invite-index": "pages-sub-pages-invite-index",
|
||
"pages-sub-pages-my-payee-index": "pages-sub-pages-my-payee-index",
|
||
"pages-sub-pages-setting-404": "pages-sub-pages-setting-404",
|
||
"pages-sub-pages-webview-index": "pages-sub-pages-webview-index",
|
||
"pages-sub-pages-webview-sign": "pages-sub-pages-webview-sign",
|
||
"pages-sub-pages-webview-sign-preview": "pages-sub-pages-webview-sign-preview"
|
||
};
|
||
|
||
// Hash映射(实际从构建中生成)
|
||
var hashMap = {
|
||
// 这里是各chunk对应的hash值
|
||
// 实际内容从原文件中提取
|
||
};
|
||
|
||
return __webpack_require__.p + "static/js/" +
|
||
(chunkMap[chunkId] || chunkId) + "." +
|
||
(hashMap[chunkId] || "未知") + ".js";
|
||
}
|
||
|
||
// 公共路径
|
||
__webpack_require__.p = "/";
|
||
|
||
// 错误处理函数
|
||
__webpack_require__.oe = function(err) {
|
||
console.error(err);
|
||
throw err;
|
||
};
|
||
|
||
// jsonp数组
|
||
var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
|
||
var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
|
||
jsonpArray.push = webpackJsonpCallback;
|
||
jsonpArray = jsonpArray.slice();
|
||
for (var i = 0; i < jsonpArray.length; i++) {
|
||
webpackJsonpCallback(jsonpArray[i]);
|
||
}
|
||
var parentJsonpFunction = oldJsonpFunction;
|
||
|
||
// 运行延迟模块
|
||
checkDeferredModules();
|
||
|
||
})({
|
||
// ==================== 应用模块 ====================
|
||
// 以下是实际的应用模块代码
|
||
// 由于篇幅限制,仅列出主要模块结构
|
||
|
||
// ... 模块定义在这里 ...
|
||
// 详见 CORE-FILES-ANALYSIS.md
|
||
});
|
||
|
||
|
||
// ==================== 主要模块说明 ====================
|
||
|
||
/**
|
||
* 模块 9cc7: 应用主入口
|
||
* - 初始化Vue应用
|
||
* - 挂载路由
|
||
* - 注册全局插件
|
||
* - 启动应用
|
||
*/
|
||
|
||
/**
|
||
* 模块 ec29: 路由配置
|
||
* - 创建路由实例
|
||
* - 定义所有页面路由(34个)
|
||
* - 配置路由守卫
|
||
* - 错误处理
|
||
*/
|
||
|
||
/**
|
||
* 模块 cf50: API管理
|
||
* - 所有后端接口定义
|
||
* - 请求拦截器
|
||
* - 响应处理
|
||
*/
|
||
|
||
/**
|
||
* 模块 b454: Vuex Store
|
||
* - 状态管理
|
||
* - Actions/Mutations/Getters
|
||
* - 持久化存储
|
||
*/
|
||
|
||
/**
|
||
* 模块 b2e4: 全局插件
|
||
* - 工具函数注册
|
||
* - Mixins注册
|
||
* - 过滤器注册
|
||
*/
|
||
|
||
/**
|
||
* 模块 8118: 工具函数
|
||
* - 图片处理
|
||
* - 扫码
|
||
* - 电话/复制
|
||
* - 数值计算
|
||
*/
|
||
|
||
/**
|
||
* 模块 b8d2: uni-app配置
|
||
* - 应用信息
|
||
* - TabBar配置
|
||
* - 页面配置
|
||
* - 全局样式
|
||
*/
|
||
|
||
// ==================== 结束 ====================
|
||
|
||
|
||
|