Commit ec03e53f9ccb590a959880577f48cbe1370717e1

Authored by 杨泽宇
1 parent 459617dd

delete console

.gitignore
1 node_modules 1 node_modules
  2 +dist
2 \ No newline at end of file 3 \ No newline at end of file
dist/audio.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html>
  3 +
  4 +<head>
  5 + <meta charset="utf-8">
  6 + <meta name="viewport" content="width=device-width,initial-scale=1.0">
  7 + <title>CNLive Audio Panel</title>
  8 + <meta http-equiv="Expires" CONTENT="0">
  9 + <meta http-equiv="Cache-Control" CONTENT="no-cache">
  10 + <meta http-equiv="Pragma" CONTENT="no-cache">
  11 + <link rel="shortcut icon" href="/cms.ico" />
  12 + <link rel="bookmark" href="/cms.ico" />
  13 + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-plus@1.1.0-beta.12/theme-chalk/index.css">
  14 +</head>
  15 +
  16 +<body id="body">
  17 + <div id="audio" class="page-container" style="padding: 20px;">
  18 + <el-card>
  19 + <template #header>
  20 + <div class="card-header">
  21 + <!-- <h3>歌曲征集</h3> -->
  22 + <span style="font-size: 24px; font-weight: Semibold; color: #666666;">歌曲征集</span>
  23 + <span style="font-size: 14px; color: #999999;"> / 带*号为必填项</span>
  24 + </div>
  25 + </template>
  26 + <div>
  27 + <el-form ref="form" :model="form" label-width="120px" :rules="rules" style="display: flex; flex-wrap: wrap;">
  28 + <el-form-item label="类型" style="width: 100%" prop="channelId">
  29 + <el-radio-group v-model="form.channelId" @change="handleChange">
  30 + <el-radio :label="1278">成品</el-radio>
  31 + <el-radio :label="1279">词</el-radio>
  32 + <el-radio :label="1280">曲</el-radio>
  33 + <el-radio :label="1281">其他</el-radio>
  34 + </el-radio-group>
  35 + </el-form-item>
  36 + <el-form-item label="歌曲名字" style="width: 50%" prop="songName">
  37 + <el-input v-model.trim="form.songName" :maxlength="100" :minlength="1" placeholder="请输入歌曲名字"></el-input>
  38 + </el-form-item>
  39 + <el-form-item label="作词" style="width: 50%" prop="lyricist">
  40 + <el-input v-model.trim="form.lyricist" :maxlength="15" placeholder="请输入作词人名字"></el-input>
  41 + </el-form-item>
  42 + <el-form-item label="作曲" style="width: 50%" prop="songwriter">
  43 + <el-input v-model.trim="form.songwriter" :maxlength="15" placeholder="请输入作曲人名字"></el-input>
  44 + </el-form-item>
  45 + <el-form-item label="编曲" style="width: 50%" prop="redact">
  46 + <el-input v-model.trim="form.redact" :maxlength="15" placeholder="请输入编曲人名字"></el-input>
  47 + </el-form-item>
  48 + <el-form-item label="混音" style="width: 50%" prop="mixing">
  49 + <el-input v-model.trim="form.mixing" :maxlength="15" placeholder="请输入混音人名字"></el-input>
  50 + </el-form-item>
  51 + <el-form-item label="歌词" style="width: 100%" prop="lyric">
  52 + <el-input v-model="form.lyric" maxlength="2500" show-word-limit type="textarea" :rows="10" placeholder="请输入歌词"></el-input>
  53 + </el-form-item>
  54 + <el-form-item label="手机号码" style="width: 50%" prop="phone">
  55 + <el-input v-model.trim="form.phone" :maxlength="11" placeholder="请输入手机号码"></el-input>
  56 + </el-form-item>
  57 + <!-- <el-form-item label="音频ID" style="width: 50%" prop="audioId">
  58 + <el-input v-model.trim="form.audioId" disabled :maxlength="50"></el-input>
  59 + </el-form-item> -->
  60 + <el-form-item label="联系人姓名" style="width: 50%" prop="name">
  61 + <el-input v-model.trim="form.name" :maxlength="50" placeholder="请输入联系人姓名"></el-input>
  62 + </el-form-item>
  63 + <el-form-item label="音频" style="width: 100%" prop="audioFile">
  64 + <el-upload class="upload-demo" :action="uploadUrl" :auto-upload="false" :file-list="fileList" accept=".mp3"
  65 + @change="getMp3" :on-exceed="exceed" :before-remove="handleRemove" :disabled="btnDisabled" :show-file-list="false">
  66 + <el-button size="small" type="primary" :disabled="btnDisabled">点击上传</el-button>
  67 + <span style="color: red; margin-left: 10px;">{{msgText}}</span>
  68 + </el-upload>
  69 + </el-form-item>
  70 + <el-divider></el-divider>
  71 + <el-form-item style="width: 50%; text-align: left;">
  72 + <span style="color: #4A90E2; font-size: 20px" v-if="percent > 0 && percent < 100">已上传{{Math.ceil(percent)}}%,请耐心等待……</span>
  73 + <span style="color: #4A90E2; font-size: 20px" v-if="percent == 100">上传完成</span>
  74 + </el-form-item>
  75 + <el-form-item style="width: 50%; text-align: right;">
  76 + <el-button @click="reset" v-if="form.channelId == 1279">取消</el-button>
  77 + <el-button @click="reset" v-else :disabled="!form.audioId">取消</el-button>
  78 + <el-button type="danger" @click="submit" v-if="form.channelId == 1279">确定上传</el-button>
  79 + <el-button type="danger" @click="submit" v-else :disabled="!form.audioId">确定上传</el-button>
  80 + </el-form-item>
  81 + </el-form>
  82 + </div>
  83 + </el-card>
  84 + </div>
  85 + <script src="https://cdn.jsdelivr.net/npm/vue@3.2.11/dist/vue.global.js"></script>
  86 + <script src="https://cdn.jsdelivr.net/npm/element-plus"></script>
  87 + <script src="https://cdn.jsdelivr.net/npm/axios@0.17.1/dist/axios.min.js"></script>
  88 + <script src="https://cdn.jsdelivr.net/npm/qiniu-js@2.5.5/dist/qiniu.min.js"></script>
  89 +<script src="/main.19cffcf.js"></script></body>
  90 +
  91 +</html>
0 \ No newline at end of file 92 \ No newline at end of file
dist/main.19cffcf.js 0 → 100644
  1 +/******/ (function(modules) { // webpackBootstrap
  2 +/******/ // The module cache
  3 +/******/ var installedModules = {};
  4 +/******/
  5 +/******/ // The require function
  6 +/******/ function __webpack_require__(moduleId) {
  7 +/******/
  8 +/******/ // Check if module is in cache
  9 +/******/ if(installedModules[moduleId]) {
  10 +/******/ return installedModules[moduleId].exports;
  11 +/******/ }
  12 +/******/ // Create a new module (and put it into the cache)
  13 +/******/ var module = installedModules[moduleId] = {
  14 +/******/ i: moduleId,
  15 +/******/ l: false,
  16 +/******/ exports: {}
  17 +/******/ };
  18 +/******/
  19 +/******/ // Execute the module function
  20 +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21 +/******/
  22 +/******/ // Flag the module as loaded
  23 +/******/ module.l = true;
  24 +/******/
  25 +/******/ // Return the exports of the module
  26 +/******/ return module.exports;
  27 +/******/ }
  28 +/******/
  29 +/******/
  30 +/******/ // expose the modules object (__webpack_modules__)
  31 +/******/ __webpack_require__.m = modules;
  32 +/******/
  33 +/******/ // expose the module cache
  34 +/******/ __webpack_require__.c = installedModules;
  35 +/******/
  36 +/******/ // define getter function for harmony exports
  37 +/******/ __webpack_require__.d = function(exports, name, getter) {
  38 +/******/ if(!__webpack_require__.o(exports, name)) {
  39 +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  40 +/******/ }
  41 +/******/ };
  42 +/******/
  43 +/******/ // define __esModule on exports
  44 +/******/ __webpack_require__.r = function(exports) {
  45 +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  46 +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  47 +/******/ }
  48 +/******/ Object.defineProperty(exports, '__esModule', { value: true });
  49 +/******/ };
  50 +/******/
  51 +/******/ // create a fake namespace object
  52 +/******/ // mode & 1: value is a module id, require it
  53 +/******/ // mode & 2: merge all properties of value into the ns
  54 +/******/ // mode & 4: return value when already ns object
  55 +/******/ // mode & 8|1: behave like require
  56 +/******/ __webpack_require__.t = function(value, mode) {
  57 +/******/ if(mode & 1) value = __webpack_require__(value);
  58 +/******/ if(mode & 8) return value;
  59 +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  60 +/******/ var ns = Object.create(null);
  61 +/******/ __webpack_require__.r(ns);
  62 +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  63 +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  64 +/******/ return ns;
  65 +/******/ };
  66 +/******/
  67 +/******/ // getDefaultExport function for compatibility with non-harmony modules
  68 +/******/ __webpack_require__.n = function(module) {
  69 +/******/ var getter = module && module.__esModule ?
  70 +/******/ function getDefault() { return module['default']; } :
  71 +/******/ function getModuleExports() { return module; };
  72 +/******/ __webpack_require__.d(getter, 'a', getter);
  73 +/******/ return getter;
  74 +/******/ };
  75 +/******/
  76 +/******/ // Object.prototype.hasOwnProperty.call
  77 +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  78 +/******/
  79 +/******/ // __webpack_public_path__
  80 +/******/ __webpack_require__.p = "/";
  81 +/******/
  82 +/******/
  83 +/******/ // Load entry module and return exports
  84 +/******/ return __webpack_require__(__webpack_require__.s = "./src/js/audios.js");
  85 +/******/ })
  86 +/************************************************************************/
  87 +/******/ ({
  88 +
  89 +/***/ "./src/js/audios.js":
  90 +/*!**************************!*\
  91 + !*** ./src/js/audios.js ***!
  92 + \**************************/
  93 +/*! no exports provided */
  94 +/***/ (function(module, __webpack_exports__, __webpack_require__) {
  95 +
  96 +"use strict";
  97 +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./config */ \"./src/js/config.js\");\n\r\n// Init Vue\r\nconst Audio = {\r\n created() {\r\n _config__WEBPACK_IMPORTED_MODULE_0__[\"request\"]({\r\n url: _config__WEBPACK_IMPORTED_MODULE_0__[\"urls\"].base + _config__WEBPACK_IMPORTED_MODULE_0__[\"urls\"].token + \"?spId=802\",\r\n method: \"get\"\r\n }).then(res => {\r\n this.token = res.data;\r\n });\r\n },\r\n data() {\r\n return {\r\n form: {\r\n songName: null,\r\n lyricist: null,\r\n songwriter: null,\r\n channelId: 1278,\r\n redact: null,\r\n lyric: null,\r\n mixing: null,\r\n audioId: null,\r\n audioFile: null\r\n },\r\n rules: {\r\n songName: [{ required: true, trigger: \"change\", message: \"请填写歌曲名字\" }],\r\n name: [{ required: true, trigger: \"change\", message: \"请填写联系人姓名\" }],\r\n phone: [\r\n {\r\n required: true,\r\n trigger: \"change\",\r\n message: \"请填写格式正确的手机号码\",\r\n validator: _config__WEBPACK_IMPORTED_MODULE_0__[\"validatePhone\"]\r\n }\r\n ],\r\n audioFile: [{ required: true, trigger: \"change\", message: \"请上传音频\" }],\r\n channelId: [{ required: true, trigger: \"change\", message: \"请选择作品类型\" }],\r\n audioId: [{ required: true, trigger: \"change\", message: \"请上传音频文件以获取音频ID\" }]\r\n },\r\n\r\n uploadUrl: \"\",\r\n fileList: [],\r\n token: \"\",\r\n btnDisabled: false,\r\n msgText: \"只能上传一个mp3/flac/wav/ogg格式的音频文件,且不超过500mb。上传过程中请勿刷新页面。\",\r\n percent: 0,\r\n curFile: ''\r\n };\r\n },\r\n methods: {\r\n // 作品类型为【词】的时候可以不上传文件\r\n handleChange(data) {\r\n if(data == 1279) {\r\n this.rules.audioFile[0].required = false\r\n this.rules.audioId[0].required = false\r\n } else {\r\n this.rules.audioFile[0].required = true\r\n this.rules.audioId[0].required = true\r\n }\r\n },\r\n exceed(e, d) {\r\n this.$message.error('只能上传一个文件')\r\n },\r\n reset() {\r\n console.log('reset')\r\n for (let i in this.form) {\r\n this.form[i] = null\r\n }\r\n this.form['channelId'] = 1278\r\n this.percent = 0\r\n this.btnDisabled = false\r\n },\r\n handleRemove(file, list) {\r\n if(this.percent < 100) {\r\n this.$message({\r\n type: 'error',\r\n duration: 5000,\r\n message: '上传中的文件不可被删除'\r\n })\r\n return false\r\n } else {\r\n this.form.audioId = null\r\n this.percent = 0\r\n }\r\n },\r\n initMd5(fileObj) {\r\n return new Promise((resolve, reject) => {\r\n const fileName = fileObj.name.split(\".\")[0];\r\n const fileType = fileObj.name.split(\".\")[1];\r\n const fileSize = fileObj.size;\r\n const fileModifyDate = fileObj.lastModifiedDate;\r\n const md5Str = _config__WEBPACK_IMPORTED_MODULE_0__[\"initVideoMd5\"](\r\n [fileType, fileSize, fileModifyDate || fileName].join(\"_\")\r\n ).toLowerCase();\r\n if (md5Str) {\r\n resolve(md5Str);\r\n } else {\r\n reject(\"校验失败\");\r\n }\r\n });\r\n },\r\n submit() {\r\n this.$refs.form.validate(v => {\r\n if (v) {\r\n this.form.lyric = this.form.lyric.trim()\r\n _config__WEBPACK_IMPORTED_MODULE_0__[\"request\"]({\r\n url: 'http://cmstest.cnlive.com:8768/contentApi/audioSave',\r\n method: 'post',\r\n params: this.form,\r\n withCredentials: true,\r\n headers: {\r\n \"X-Requested-With\": \"XMLHttpRequest\",\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n \"content-type\": \"application/json;charset=UTF-8\"\r\n }\r\n }).then(res => {\r\n if(res.data) {\r\n setTimeout(() => {\r\n window.location.replace(\"./success.html\");\r\n }, 1000)\r\n } else {\r\n setTimeout(() => {\r\n window.location.replace(\"./failed.html\");\r\n }, 1000)\r\n }\r\n }).catch(error => {\r\n console.log(error)\r\n })\r\n } else {\r\n this.$message.error(\"请补全表单内容\");\r\n }\r\n });\r\n },\r\n getTxt(e) {\r\n this.form.txtFile = e.raw;\r\n let file = e.raw;\r\n (reader = new FileReader()), (that = this);\r\n reader.onload = function(evt) {\r\n var data = evt.target.result;\r\n console.log(data);\r\n console.log(String.fromCharCode.apply(null, new Uint16Array(data)));\r\n };\r\n reader.readAsArrayBuffer(file);\r\n },\r\n getMp3(file) {\r\n // this.msgText = '音频已开始上传,上传过程中请勿刷新页面。'\r\n this.btnDisabled = true\r\n this.form.audioFile = file\r\n const fileName = file.raw.name.split(\".\");\r\n fileName.splice(fileName.length - 1, 1);\r\n this.curFile = file.name\r\n this.form.audioId = null\r\n const that = this;\r\n const fileBaseObj = {\r\n videoName: fileName.join(\".\"),\r\n md5: null\r\n };\r\n const fileSaveObj = {\r\n videoId: null,\r\n\r\n multipleCategory: 100005,\r\n tag: \"test\",\r\n synopsis: \"test\",\r\n mmsType: 0,\r\n videoType: 11003,\r\n videoType: 0,\r\n masterId: 10505921\r\n };\r\n const fileInitObj = {\r\n gfmt: file.raw.name\r\n .split(\".\")\r\n .reverse()\r\n .shift(),\r\n fileSize: file.raw.size,\r\n videoType: 11003,\r\n ptpwVal: 0,\r\n archiveStatus: 0,\r\n multipleCategory: 100005,\r\n uploadLine: 2,\r\n masterId: 10505921\r\n };\r\n const fileWholeObj = {\r\n file: file.raw,\r\n uploadStatus: \"ready\",\r\n proCount: 0,\r\n fileKey: null,\r\n observable: null,\r\n subscription: null\r\n };\r\n\r\n if (this.token == null) {\r\n this.$message({\r\n type: \"error\",\r\n message: \"获取七牛token失败,请联系管理员\"\r\n });\r\n return false;\r\n }\r\n\r\n const observer = {\r\n next(res) {\r\n if (res.total.percent >= 99) {\r\n that.percent = 99\r\n } else {\r\n that.percent = Math.ceil(res.total.percent)\r\n }\r\n },\r\n error(err) {\r\n console.log(err);\r\n },\r\n complete(res) {\r\n _config__WEBPACK_IMPORTED_MODULE_0__[\"request\"]({\r\n url: _config__WEBPACK_IMPORTED_MODULE_0__[\"urls\"].base + _config__WEBPACK_IMPORTED_MODULE_0__[\"urls\"].save,\r\n method: \"get\",\r\n params: {\r\n hash: res.hash,\r\n key: res.key,\r\n vid: fileSaveObj.videoId\r\n }\r\n })\r\n .then(res => {\r\n console.log(res);\r\n })\r\n .catch(error => {\r\n return _config__WEBPACK_IMPORTED_MODULE_0__[\"request\"]({\r\n url: _config__WEBPACK_IMPORTED_MODULE_0__[\"urls\"].onlineUrl + _config__WEBPACK_IMPORTED_MODULE_0__[\"urls\"].transcode,\r\n params: {...fileBaseObj, ...fileSaveObj},\r\n method: \"get\"\r\n });\r\n })\r\n .then(data => {\r\n that.form.audioId = data.data.data.obj\r\n // that.msgText = '音频上传成功'\r\n that.btnDisabled = false\r\n that.percent = 100\r\n }).catch(error => {\r\n console.log(error)\r\n })\r\n }\r\n };\r\n\r\n Promise.all([\r\n _config__WEBPACK_IMPORTED_MODULE_0__[\"validateVideoSize\"](fileInitObj.fileSize),\r\n _config__WEBPACK_IMPORTED_MODULE_0__[\"validateVideoFormat\"](fileInitObj.gfmt),\r\n _config__WEBPACK_IMPORTED_MODULE_0__[\"validateNameLength\"](fileBaseObj.videoName)\r\n ])\r\n .then(check => {\r\n return this.initMd5(file.raw);\r\n })\r\n .then(n => {\r\n fileBaseObj.md5 = n;\r\n return _config__WEBPACK_IMPORTED_MODULE_0__[\"request\"]({\r\n url: _config__WEBPACK_IMPORTED_MODULE_0__[\"urls\"].onlineUrl + _config__WEBPACK_IMPORTED_MODULE_0__[\"urls\"].initFileOnline,\r\n method: \"get\",\r\n params: {...fileBaseObj, ...fileInitObj}\r\n });\r\n })\r\n .then(res => {\r\n if (res && res.data) {\r\n fileSaveObj.videoId = res.data.data.obj.vid;\r\n fileWholeObj.fileKey = res.data.data.obj.originPath;\r\n _config__WEBPACK_IMPORTED_MODULE_0__[\"putExtra\"].params[\"x:name\"] = fileWholeObj.fileKey;\r\n fileWholeObj.observable = qiniu.upload(\r\n file.raw,\r\n fileWholeObj.fileKey,\r\n this.token,\r\n _config__WEBPACK_IMPORTED_MODULE_0__[\"putExtra\"],\r\n _config__WEBPACK_IMPORTED_MODULE_0__[\"cdnConfig\"]\r\n );\r\n fileWholeObj.subscription = fileWholeObj.observable.subscribe(\r\n observer\r\n );\r\n } else {\r\n this.$message({\r\n type: \"error\",\r\n duration: 0,\r\n message: \"未知错误,请联系管理员。\"\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n this.$message({\r\n type: \"error\",\r\n message: error,\r\n duration: 0\r\n });\r\n });\r\n }\r\n }\r\n};\r\n\r\nVue.createApp(Audio)\r\n .use(ElementPlus)\r\n .mount(\"#audio\");\r\n\n\n//# sourceURL=webpack:///./src/js/audios.js?");
  98 +
  99 +/***/ }),
  100 +
  101 +/***/ "./src/js/config.js":
  102 +/*!**************************!*\
  103 + !*** ./src/js/config.js ***!
  104 + \**************************/
  105 +/*! exports provided: initVideoMd5, validateName, validatePhone, validateVideoFormat, validateNameLength, validateVideoSize, request, putExtra, cdnConfig, basicConfig, urls */
  106 +/***/ (function(module, __webpack_exports__, __webpack_require__) {
  107 +
  108 +"use strict";
  109 +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initVideoMd5\", function() { return initVideoMd5; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validateName\", function() { return validateName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validatePhone\", function() { return validatePhone; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validateVideoFormat\", function() { return validateVideoFormat; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validateNameLength\", function() { return validateNameLength; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"validateVideoSize\", function() { return validateVideoSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"request\", function() { return request; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"putExtra\", function() { return putExtra; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cdnConfig\", function() { return cdnConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"basicConfig\", function() { return basicConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"urls\", function() { return urls; });\nconst basicConfig = {\r\n baseUrl: \"http://cmstest.cnlive.com/cms\",\r\n}\r\n\r\nconst urls = {\r\n base: \"http://test.mam.innerapi.cnlive.com/v1/inner/\",\r\n onlineUrl: 'https://api.cnlive.com/open/api2/vod_epg/material/',\r\n token: \"material/getQNToken\",\r\n save: \"material/saveQNComplete\",\r\n initFileOnline: 'uploadFileInit?appId=802_k8ho7qks68',\r\n transcode: \"pendingTranscodeTask?appId=802_k8ho7qks68\",\r\n};\r\n\r\nconst cdnConfig = {\r\n useCdnDomain: true,\r\n disableStatisticsReport: true,\r\n retryCount: 6,\r\n region: qiniu.region.z1\r\n}\r\n\r\nconst putExtra = {\r\n fname: \"\",\r\n params: {},\r\n mimeType: null\r\n};\r\n\r\n\r\n\r\n// Rewrite Request Method\r\n// const baseUrl = \"http://cmstest.cnlive.com/cms\";\r\nconst request = axios.create({\r\n timeout: 10000\r\n});\r\n\r\n// QiNiu Configs\r\n// const cdnConfig = {\r\n// useCdnDomain: true,\r\n// disableStatisticsReport: true,\r\n// retryCount: 6,\r\n// region: qiniu.region.z1\r\n// };\r\n// const putExtra = {\r\n// fname: \"\",\r\n// params: {},\r\n// mimeType: null\r\n// };\r\n// const urls = {\r\n// base: \"http://test.mam.innerapi.cnlive.com/v1/inner/\",\r\n// onlineUrl: 'https://api.cnlive.com/open/api2/vod_epg/material/',\r\n// token: \"material/getQNToken\",\r\n// save: \"material/saveQNComplete\",\r\n// initFileOnline: 'uploadFileInit?appId=802_k8ho7qks68',\r\n// transcode: \"pendingTranscodeTask?appId=802_k8ho7qks68\",\r\n// };\r\n\r\n// File And Form Validate\r\nconst validateVideoSize = function(curSize) {\r\n const sizeLimitation = 1024 * 1024 * 500; // 500M\r\n return new Promise((resolve, reject) => {\r\n if (parseInt(curSize) <= sizeLimitation) {\r\n resolve(\"没超尺寸\");\r\n } else {\r\n reject(\"文件过大\");\r\n }\r\n });\r\n};\r\n\r\nconst validateNameLength = function(name) {\r\n return new Promise((resolve, reject) => {\r\n if (name.length < 1 || name.length > 100) {\r\n reject(\"文件名称最小长度为2,上限长度为100!\");\r\n } else {\r\n resolve(\"名字可以\");\r\n }\r\n });\r\n};\r\n\r\nconst validateVideoFormat = function(curFormat) {\r\n // const formats = [\r\n // \"mp3\",\r\n // \"wma\",\r\n // \"m4a\",\r\n // \"flac\",\r\n // \"aac\",\r\n // \"ape\",\r\n // \"wav\",\r\n // \"wv\",\r\n // \"dts\",\r\n // \"ac3\",\r\n // \"mmf\",\r\n // \"amr\",\r\n // \"m4r\",\r\n // \"ogg\",\r\n // \"mp2\"\r\n // ];\r\n const formats = [\r\n \"mp3\",\r\n \"flac\",\r\n \"wav\",\r\n \"ogg\"\r\n ];\r\n return new Promise((resolve, reject) => {\r\n if (formats.includes(curFormat)) {\r\n resolve(\"格式可以\");\r\n } else {\r\n reject(\"文件格式不允许\");\r\n }\r\n });\r\n};\r\n\r\nconst validatePhone = (rules, value, callback) => {\r\n const reg = /^1(3|4|5|6|7|8|9)\\d{9}$/;\r\n if (reg.test(value)) {\r\n callback();\r\n } else {\r\n callback(new Error(\"请填写格式正确的手机号码\"));\r\n }\r\n};\r\n\r\nconst validateName = (rules, value, callback) => {\r\n if (value.length < 1) {\r\n callback(new Error(\"请填写歌曲名称\"));\r\n } else if (value.length > 100) {\r\n callback(new Error(\"歌曲名称长度应在1~100之间(含)\"));\r\n } else {\r\n callback();\r\n }\r\n};\r\n\r\nconst initVideoMd5 = function(e) {\r\n function i(e) {\r\n var i = (e >>> 0).toString(16);\r\n return \"00000000\".substr(0, 8 - i.length) + i;\r\n }\r\n\r\n function t(e) {\r\n for (var i = [], t = 0; t < e.length; t++) i = i.concat(c(e[t]));\r\n return i;\r\n }\r\n\r\n function r(e) {\r\n for (var i = [], t = 0; t < 8; t++) i.push(255 & e), (e >>>= 8);\r\n return i;\r\n }\r\n\r\n function l(e, i) {\r\n return ((e << i) & 4294967295) | (e >>> (32 - i));\r\n }\r\n\r\n function n(e, i, t) {\r\n return (e & i) | (~e & t);\r\n }\r\n\r\n function o(e, i, t) {\r\n return (t & e) | (~t & i);\r\n }\r\n\r\n function a(e, i, t) {\r\n return e ^ i ^ t;\r\n }\r\n\r\n function p(e, i, t) {\r\n return i ^ (e | ~t);\r\n }\r\n\r\n function f(e, i) {\r\n return (e[i + 3] << 24) | (e[i + 2] << 16) | (e[i + 1] << 8) | e[i];\r\n }\r\n\r\n function c(e) {\r\n for (var i = [], t = 0; t < e.length; t++)\r\n if (e.charCodeAt(t) <= 127) i.push(e.charCodeAt(t));\r\n else\r\n for (\r\n var r = encodeURIComponent(e.charAt(t))\r\n .substr(1)\r\n .split(\"%\"),\r\n l = 0;\r\n l < r.length;\r\n l++\r\n )\r\n i.push(parseInt(r[l], 16));\r\n return i;\r\n }\r\n\r\n function s() {\r\n for (var e = \"\", t = 0, r = 0, l = 3; l >= 0; l--)\r\n (r = arguments[l]),\r\n (t = 255 & r),\r\n (r >>>= 8),\r\n (t <<= 8),\r\n (t |= 255 & r),\r\n (r >>>= 8),\r\n (t <<= 8),\r\n (t |= 255 & r),\r\n (r >>>= 8),\r\n (t <<= 8),\r\n (t |= r),\r\n (e += i(t));\r\n return e;\r\n }\r\n\r\n function u(e) {\r\n for (var i = new Array(e.length), t = 0; t < e.length; t++) i[t] = e[t];\r\n return i;\r\n }\r\n\r\n function F(e, i) {\r\n return 4294967295 & (e + i);\r\n }\r\n\r\n function d() {\r\n function e(e, i, t, r) {\r\n var n = b;\r\n (b = h), (h = y), (y = F(y, l(F(g, F(e, F(i, t))), r))), (g = n);\r\n }\r\n\r\n var i = m.length;\r\n m.push(128);\r\n var t = m.length % 64;\r\n if (t > 56) {\r\n for (var c = 0; 64 - t > c; c++) m.push(0);\r\n t = m.length % 64;\r\n }\r\n for (c = 0; 56 - t > c; c++) m.push(0);\r\n m = m.concat(r(8 * i));\r\n var u = 1732584193;\r\n var d = 4023233417;\r\n var v = 2562383102;\r\n var O = 271733878;\r\n var g = 0;\r\n var y = 0;\r\n var h = 0;\r\n var b = 0;\r\n for (c = 0; c < m.length / 64; c++) {\r\n (g = u), (y = d), (h = v), (b = O);\r\n var A = 64 * c;\r\n e(n(y, h, b), 3614090360, f(m, A), 7),\r\n e(n(y, h, b), 3905402710, f(m, A + 4), 12),\r\n e(n(y, h, b), 606105819, f(m, A + 8), 17),\r\n e(n(y, h, b), 3250441966, f(m, A + 12), 22),\r\n e(n(y, h, b), 4118548399, f(m, A + 16), 7),\r\n e(n(y, h, b), 1200080426, f(m, A + 20), 12),\r\n e(n(y, h, b), 2821735955, f(m, A + 24), 17),\r\n e(n(y, h, b), 4249261313, f(m, A + 28), 22),\r\n e(n(y, h, b), 1770035416, f(m, A + 32), 7),\r\n e(n(y, h, b), 2336552879, f(m, A + 36), 12),\r\n e(n(y, h, b), 4294925233, f(m, A + 40), 17),\r\n e(n(y, h, b), 2304563134, f(m, A + 44), 22),\r\n e(n(y, h, b), 1804603682, f(m, A + 48), 7),\r\n e(n(y, h, b), 4254626195, f(m, A + 52), 12),\r\n e(n(y, h, b), 2792965006, f(m, A + 56), 17),\r\n e(n(y, h, b), 1236535329, f(m, A + 60), 22),\r\n e(o(y, h, b), 4129170786, f(m, A + 4), 5),\r\n e(o(y, h, b), 3225465664, f(m, A + 24), 9),\r\n e(o(y, h, b), 643717713, f(m, A + 44), 14),\r\n e(o(y, h, b), 3921069994, f(m, A), 20),\r\n e(o(y, h, b), 3593408605, f(m, A + 20), 5),\r\n e(o(y, h, b), 38016083, f(m, A + 40), 9),\r\n e(o(y, h, b), 3634488961, f(m, A + 60), 14),\r\n e(o(y, h, b), 3889429448, f(m, A + 16), 20),\r\n e(o(y, h, b), 568446438, f(m, A + 36), 5),\r\n e(o(y, h, b), 3275163606, f(m, A + 56), 9),\r\n e(o(y, h, b), 4107603335, f(m, A + 12), 14),\r\n e(o(y, h, b), 1163531501, f(m, A + 32), 20),\r\n e(o(y, h, b), 2850285829, f(m, A + 52), 5),\r\n e(o(y, h, b), 4243563512, f(m, A + 8), 9),\r\n e(o(y, h, b), 1735328473, f(m, A + 28), 14),\r\n e(o(y, h, b), 2368359562, f(m, A + 48), 20),\r\n e(a(y, h, b), 4294588738, f(m, A + 20), 4),\r\n e(a(y, h, b), 2272392833, f(m, A + 32), 11),\r\n e(a(y, h, b), 1839030562, f(m, A + 44), 16),\r\n e(a(y, h, b), 4259657740, f(m, A + 56), 23),\r\n e(a(y, h, b), 2763975236, f(m, A + 4), 4),\r\n e(a(y, h, b), 1272893353, f(m, A + 16), 11),\r\n e(a(y, h, b), 4139469664, f(m, A + 28), 16),\r\n e(a(y, h, b), 3200236656, f(m, A + 40), 23),\r\n e(a(y, h, b), 681279174, f(m, A + 52), 4),\r\n e(a(y, h, b), 3936430074, f(m, A), 11),\r\n e(a(y, h, b), 3572445317, f(m, A + 12), 16),\r\n e(a(y, h, b), 76029189, f(m, A + 24), 23),\r\n e(a(y, h, b), 3654602809, f(m, A + 36), 4),\r\n e(a(y, h, b), 3873151461, f(m, A + 48), 11),\r\n e(a(y, h, b), 530742520, f(m, A + 60), 16),\r\n e(a(y, h, b), 3299628645, f(m, A + 8), 23),\r\n e(p(y, h, b), 4096336452, f(m, A), 6),\r\n e(p(y, h, b), 1126891415, f(m, A + 28), 10),\r\n e(p(y, h, b), 2878612391, f(m, A + 56), 15),\r\n e(p(y, h, b), 4237533241, f(m, A + 20), 21),\r\n e(p(y, h, b), 1700485571, f(m, A + 48), 6),\r\n e(p(y, h, b), 2399980690, f(m, A + 12), 10),\r\n e(p(y, h, b), 4293915773, f(m, A + 40), 15),\r\n e(p(y, h, b), 2240044497, f(m, A + 4), 21),\r\n e(p(y, h, b), 1873313359, f(m, A + 32), 6),\r\n e(p(y, h, b), 4264355552, f(m, A + 60), 10),\r\n e(p(y, h, b), 2734768916, f(m, A + 24), 15),\r\n e(p(y, h, b), 1309151649, f(m, A + 52), 21),\r\n e(p(y, h, b), 4149444226, f(m, A + 16), 6),\r\n e(p(y, h, b), 3174756917, f(m, A + 44), 10),\r\n e(p(y, h, b), 718787259, f(m, A + 8), 15),\r\n e(p(y, h, b), 3951481745, f(m, A + 36), 21),\r\n (u = F(u, g)),\r\n (d = F(d, y)),\r\n (v = F(v, h)),\r\n (O = F(O, b));\r\n }\r\n return s(O, v, d, u).toUpperCase();\r\n }\r\n\r\n var m = null;\r\n var v = null;\r\n return (\r\n typeof e == \"string\"\r\n ? (m = c(e))\r\n : e.constructor == Array\r\n ? e.length === 0\r\n ? (m = e)\r\n : typeof e[0] == \"string\"\r\n ? (m = t(e))\r\n : typeof e[0] == \"number\"\r\n ? (m = e)\r\n : (v = typeof e[0])\r\n : typeof ArrayBuffer != \"undefined\"\r\n ? e instanceof ArrayBuffer\r\n ? (m = u(new Uint8Array(e)))\r\n : e instanceof Uint8Array || e instanceof Int8Array\r\n ? (m = u(e))\r\n : e instanceof Uint32Array ||\r\n e instanceof Int32Array ||\r\n e instanceof Uint16Array ||\r\n e instanceof Int16Array ||\r\n e instanceof Float32Array ||\r\n e instanceof Float64Array\r\n ? (m = u(new Uint8Array(e.buffer)))\r\n : (v = typeof e)\r\n : (v = typeof e),\r\n v && alert(\"MD5 type mismatch, cannot process \" + v),\r\n d()\r\n );\r\n};\r\n\r\n\r\n\r\n\n\n//# sourceURL=webpack:///./src/js/config.js?");
  110 +
  111 +/***/ })
  112 +
  113 +/******/ });
0 \ No newline at end of file 114 \ No newline at end of file
src/js/audios.js
@@ -198,8 +198,6 @@ const Audio = { @@ -198,8 +198,6 @@ const Audio = {
198 198
199 const observer = { 199 const observer = {
200 next(res) { 200 next(res) {
201 - console.log('progress')  
202 - console.log(res.total.percent)  
203 if (res.total.percent >= 99) { 201 if (res.total.percent >= 99) {
204 that.percent = 99 202 that.percent = 99
205 } else { 203 } else {