{"version":3,"sources":["lr.js"],"sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 20);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\n/**\r\n * 随机取数据\r\n * @param {*} a \r\n */\r\nfunction shuffle(a) {\r\n return a.concat().sort(function(a, b) {\r\n return Math.random() - 0.5;\r\n });\r\n }\r\n\r\n/**\r\n * 判断是否为数组\r\n * @param {*} arg \r\n */\r\nfunction isArray(arg) {\r\n return Object.prototype.toString.call(arg) === '[object Array]';\r\n}\r\n\r\n/**\r\n * 随机去数组中任意一条数据\r\n * @param {*} data \r\n */\r\nfunction randomData(data){\r\n if(isArray(data)){\r\n var len = data.length;\r\n var index = Math.floor(Math.random()*len);\r\n console.log(index)\r\n return data[index]\r\n }\r\n return [];\r\n}\r\n\r\n\r\n function problem(options){\r\n //callback,isRandom,pType,\r\n var defaultOptions = {\r\n id:\"problem_wrap\",//题目dom id\r\n DATA:problem_data,//题目数据\r\n isRandom:false,//是否随机\r\n len:20,//随机题目数量\r\n pType:'', //题目类型\r\n callback:null//回调\r\n }\r\n\r\n this.options = $.extend({},defaultOptions,options);\r\n console.log(this.options)\r\n if(typeof this.options.DATA == undefined || !this.options.DATA.length){\r\n return false\r\n }\r\n\r\n var html = '
' + option.content + '
';\r\n }else{\r\n if(option.score >= option.targetScore){\r\n html+='你的得分:'+option.score+'分 目标分数:'+option.targetScore+'分
';\r\n }else{\r\n html+='你的得分:'+option.score+'分 目标分数:'+option.targetScore+'分
';\r\n }\r\n }\r\n if(that.pType === 'myd'){\r\n html += '' + option.content + '
';\r\n// }else{\r\n// if(option.score >= option.targetScore){\r\n// html+='你的得分:'+option.score+'分 目标分数:'+option.targetScore+'分
';\r\n// }else{\r\n// html+='你的得分:'+option.score+'分 目标分数:'+option.targetScore+'分
';\r\n// }\r\n// }\r\n// if(that.pType === 'myd'){\r\n// html += '