Commit ef4d5633 authored by wangwei's avatar wangwei

编写

parent 29127b32
......@@ -5,6 +5,7 @@ const prodEnv = require('./prod.env');
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*5',
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
INVITE_URL:'"http://wechat.test.singsingenglish.com"',
});
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>singsing-new-admin</title><link href=/static/css/app.06bc028b890db250303ef0a5585ee368.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.0856e2556bbad7b42ae6.js></script><script type=text/javascript src=/static/js/app.d195398084db97713c5b.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>singsing-new-admin</title><link href=/static/css/app.210e875661123f1c02000e166ce0f9c2.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.0856e2556bbad7b42ae6.js></script><script type=text/javascript src=/static/js/app.0b57afff74ec35091c7b.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"sources":["webpack:///webpack/bootstrap 3363da3a3436765030c3"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\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// 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// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3363da3a3436765030c3"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 1d9cc2f2d8965107ce66"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\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// 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// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1d9cc2f2d8965107ce66"],"sourceRoot":""}
\ No newline at end of file
......@@ -200,7 +200,6 @@
item_category_ids:[],
cover:0,
};
this.imageList = [];
this.selectedLessonList = [];
this.selectedBoxList = [];
......
......@@ -22,6 +22,9 @@
<div class="page-list">
<div v-for="(data,index) in selectedMould" :key="index" @click="chooseThat(index)">
<el-card shadow="hover" class="box" :body-style="{ padding: '0px' }">
<div class="dialog-card">
序号:{{index}}
</div>
<img :src="data.imgUrl" class="image">
</el-card>
</div>
......@@ -68,17 +71,23 @@
</div>
</div>
<div v-if="selectedMould[nowIndex] && selectedMould[nowIndex].key === 'radio1'">
<div class="look1 radio1" :style="{backgroundImage:`url(${mouldImg.radio1.bg}`,transform:`scale(${bigNum/100},${bigNum/100})`}">
<div class="look1 radio1" :style="{backgroundImage:`url(${selectedMould[nowIndex].content.titleType === 0 ? mouldImg.radio1.bg:mouldImg.radio1.moerduoBg}`,transform:`scale(${bigNum/100},${bigNum/100})`}">
<div class="bg-block" :style="{backgroundImage:`url(${mouldImg.radio1.contentBg}`}">
<img :src="mouldImg.radio1.tabVideo" class="tab-video-img" v-if="selectedMould[nowIndex].content.tabVideo.type"/>
<div>
<img :src="mouldImg.radio1.title"/>
<img :src="mouldImg.radio1.title" v-if="selectedMould[nowIndex].content.titleType === 0"/>
<img :src="mouldImg.radio1.moerduo" v-if="selectedMould[nowIndex].content.titleType === 1"/>
</div>
<div>
<img :src="mouldImg.radio1.CD"/>
</div>
<div class="name-block">
<div class="name">{{selectedMould[nowIndex].content.title}}</div>
<div class="ahtor">{{selectedMould[nowIndex].content.name}}</div>
<div class="name">
<span v-if="selectedMould[nowIndex].content.radio[0]">{{selectedMould[nowIndex].content.radio[0].title}}</span>
</div>
<div class="ahtor">
<span v-if="selectedMould[nowIndex].content.radio[0]">{{selectedMould[nowIndex].content.radio[0].lable}}</span>
</div>
</div>
<div class="play-block">
<img :src="mouldImg.radio1.loading"/>
......@@ -90,17 +99,22 @@
<img :src="mouldImg.radio1.next"/>
</div>
</div>
<div class="title2-block">
<img :src="mouldImg.radio1.title2" class="title2"/>
<img :src="mouldImg.radio1.redM" class="redM"/>
<img :src="mouldImg.radio1.flour" class="flour"/>
<div class="directory-text">
</div>
</div>
<div class="bottom-block">
<div class="bottom-block" v-if="selectedMould[nowIndex].content.buttonType === 0">
<img :src="mouldImg.radio1.backLookBtn"/>
<img :src="mouldImg.radio1.showBtn"/>
</div>
<div class="bottom-block" v-if="selectedMould[nowIndex].content.buttonType === 1">
<img :src="mouldImg.radio1.backPlayBtn"/>
<img :src="mouldImg.radio1.finishBtn"/>
</div>
<div class="bottom-block" v-if="selectedMould[nowIndex].content.buttonType === 2">
<img :src="mouldImg.radio1.backLookBtn"/>
<img :src="mouldImg.radio1.finishBtn"/>
</div>
<div class="bottom-block" v-if="selectedMould[nowIndex].content.buttonType === 3">
<img :src="mouldImg.radio1.backPlayBtn"/>
<img :src="mouldImg.radio1.nextBtn"/>
</div>
</div>
</div>
<div v-if="selectedMould[nowIndex] && selectedMould[nowIndex].key === 'play1'">
......@@ -147,6 +161,20 @@
</div>
</div>
</div>
<div v-if="selectedMould[nowIndex] && selectedMould[nowIndex].key === 'refueling1'">
<div class="look1 refueling1" :style="{backgroundImage:`url(${mouldImg.refueling1.bg}`,transform:`scale(${bigNum/100},${bigNum/100})`}">
<div class="bg-block">
<img :src="mouldImg.refueling1.title">
<div class="content-img">
<img :src="mouldImg.refueling1.radio" class="radio-icon">
</div>
</div>
<div class="bottom-block">
<img :src="mouldImg.refueling1.backBtn"/>
<img :src="mouldImg.refueling1.next"/>
</div>
</div>
</div>
</el-main>
</el-container>
</el-container>
......@@ -155,40 +183,151 @@
:visible.sync="dialogVisible"
:modal="false"
width="30%">
<el-form label-width="80px" v-if="selectedMould[nowIndex] && selectedMould[this.nowIndex].key === 'look1'">
<el-form label-width="100px" v-if="selectedMould[nowIndex] && selectedMould[this.nowIndex].key === 'look1'">
<el-form-item label="音频">
<el-input v-model="selectedMould[nowIndex].content.radioUrl"></el-input>
<el-upload
class="upload-demo"
action="/api/public/upload"
multiple
:limit="1"
:on-exceed="handleExceed"
:on-success="uploadSuccess"
:file-list="selectedMould[nowIndex].content.radioUrl">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="今日目标">
<el-input type="textarea" v-model="selectedMould[nowIndex].content.today"></el-input>
<el-input type="textarea" v-model="selectedMould[nowIndex].content.today" placeholder="今日目标换行输入<br>"></el-input>
</el-form-item>
<el-form-item label="陪玩指南">
<el-input type="textarea" v-model="selectedMould[nowIndex].content.directory"></el-input>
<el-input type="textarea" v-model="selectedMould[nowIndex].content.directory" placeholder="陪玩指南换行输入<br>"></el-input>
</el-form-item>
<el-form-item label="下一页序号">
<el-select v-model="selectedMould[nowIndex].content.nextIndex" placeholder="请选择">
<el-option
v-for="(item,index) in selectedMould"
:key="index"
:label="index"
:value="index">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="停留时长">
<el-input-number v-model="selectedMould[nowIndex].content.timeLang"></el-input-number>
</el-form-item>
</el-form>
<el-form label-width="80px" v-if="selectedMould[nowIndex] && selectedMould[this.nowIndex].key === 'radio1'">
<el-form label-width="100px" v-if="selectedMould[nowIndex] && selectedMould[this.nowIndex].key === 'radio1'">
<el-form-item label="音频">
<el-input v-model="selectedMould[nowIndex].content.radioUrl"></el-input>
<el-upload
class="upload-demo"
action="/api/public/upload"
multiple
:on-exceed="handleExceed"
:on-success="uploadSuccessRadio1"
:file-list="selectedMould[nowIndex].content.radio">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<div v-for="(data,index) in selectedMould[nowIndex].content.radio">
<el-form-item label="音频名字">
<el-input v-model="data.title" placeholder="请输入音频显示标题"></el-input>
</el-form-item>
<el-form-item label="音频作者">
<el-input v-model="data.lable" placeholder="请输入音频来源作者"></el-input>
</el-form-item>
</div>
<el-form-item label="上一步序号">
<el-select v-model="selectedMould[nowIndex].content.lastIndex" placeholder="请选择">
<el-option
v-for="(item,index) in selectedMould"
:key="index"
:label="index"
:value="index">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="音频名字">
<el-input type="textarea" v-model="selectedMould[nowIndex].content.title"></el-input>
<el-form-item label="下一步序号">
<el-select v-model="selectedMould[nowIndex].content.nextIndex" placeholder="请选择">
<el-option
v-for="(item,index) in selectedMould"
:key="index"
:label="index"
:value="index">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="音频作者">
<el-input type="textarea" v-model="selectedMould[nowIndex].content.name"></el-input>
<el-form-item label="标题类型">
<el-select v-model="selectedMould[nowIndex].content.titleType" placeholder="请选择">
<el-option
:value="0"
label="宝贝玩一玩">
</el-option>
<el-option
:value="1"
label="磨耳朵">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="按钮组">
<el-select v-model="selectedMould[nowIndex].content.buttonType" placeholder="请选择">
<el-option
:value="0"
label="返回看一看 + 爸妈秀宝贝">
</el-option>
<el-option
:value="1"
label="返回玩一玩 + 完成今日学习">
</el-option>
<el-option
:value="2"
label="上一页 + 完成今日学习">
</el-option>
<el-option
:value="3"
label="返回玩一玩 + 下一页">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="视频切换">
<el-switch v-model="selectedMould[nowIndex].content.tabVideo.type">
</el-switch>
</el-form-item>
<el-form-item label="视频目标" v-if="selectedMould[nowIndex].content.tabVideo.type">
<el-select v-model="selectedMould[nowIndex].content.tabVideo.index" placeholder="请选择">
<el-option
v-for="(item,index) in selectedMould"
:key="index"
:label="index"
:value="index">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="停留时长">
<el-input-number v-model="selectedMould[nowIndex].content.timeLang"></el-input-number>
</el-form-item>
</el-form>
<el-form label-width="100px" v-if="selectedMould[nowIndex] && selectedMould[this.nowIndex].key === 'play1'">
<el-form-item label="音频">
<el-upload
class="upload-demo"
action="/api/public/upload"
:http-request="uploadFile"
multiple
:on-exceed="handleExceed"
:on-success="uploadSuccessRadio1"
:file-list="selectedMould[nowIndex].content.radio">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
import mouldImg from '../../util/mouldImgUrl'
import {uploadFileApi} from "../../service/api";
export default {
name: "editor",
props:[
......@@ -199,15 +338,28 @@
bigNum:100,
dialogVisible:false,
nowIndex:0,
mouldImg:mouldImg
mouldImg:mouldImg,
}
},
methods:{
setOpen(){
this.dialogVisible = true;
},
uploadFile(a){
uploadFileApi(a.file).then(res=>{
})
},
chooseThat(data){
this.nowIndex = data;
},
handleExceed(){
this.$message.error('超出文件限制个数');
},
uploadSuccess(a){
this.selectedMould[this.nowIndex].content.radioUrl.push({name:a.data.url,url:process.env.IMAGE_URL_HEAD + a.data.url})
},
uploadSuccessRadio1(a){
this.selectedMould[this.nowIndex].content.radio.push({name:a.data.url,url:process.env.IMAGE_URL_HEAD + a.data.url,title:'',lable:''})
}
},
watch:{
......@@ -246,12 +398,34 @@
padding: 10px 0;
.el-card{
margin: 15px 0;
position: relative;
.dialog-card{
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
text-align: center;
padding: 20px;
background: rgba(0,0,0,0.3);
color: white;
font-size: 18px;
}
img{
width: 100%;
}
}
}
}
.plus-radio{
text-align: center;
margin: 10px;
padding: 5px;
border-radius: 8px;
font-size: 20px;
cursor: pointer;
border: 3px dashed #cccccc;
}
.look1{
transform-origin:50% 0;
width: 750px;
......@@ -302,6 +476,11 @@
box-shadow: none;
background-repeat: no-repeat;
background-size: 100% 100%;
.tab-video-img{
position: absolute;
bottom: 30px;
right: 30px;
}
.name-block{
margin-top: 40px;
font-family: PingFang-SC-Regular;
......@@ -345,8 +524,26 @@
&.show1{
&>img{
position: absolute;
z-index: 2;
&.haiou{
bottom: 350px;
left: 70px;
}
&.riji{
top: 210px;
left: 0;
}
&.yeziyou{
bottom: 0;
right: 0;
}
&.yezizuo{
bottom: 0;
left: 0;
}
&.zhaopianqiang{
bottom: 370px;
right: 80px;
}
}
.bg-block{
......@@ -362,8 +559,8 @@
}
.textarea{
background: #FDFDFD;
height: 400px;
width: 600px;
height: 352px;
width: 626px;
margin: auto;
box-shadow: inset 1px 1px 3px 1px rgba(142,142,142,0.50);
border-radius: 8px;
......@@ -393,7 +590,24 @@
}
}
.sub-block{
margin-top: 50px;
position: absolute;
width: 100%;
text-align: center;
bottom: 160px;
}
}
&.refueling1{
.content-img{
position: relative;
height: 832px;
background: #333;
margin: 20px;
border-radius: 8px;
.radio-icon{
position: absolute;
right: 20px;
top: 20px;
}
}
}
&>div{
......
......@@ -59,6 +59,12 @@
methods:{
addMould(data){
this.selectedMould.push(JSON.parse(JSON.stringify(data)))
},
initPage(){
switch (this.editorObj.type) {
case 0:
this.selectedMould=[]
}
}
}
}
......
......@@ -58,7 +58,11 @@
return {
list:[],
editorObj:{
show:false
show:false,// 显示开关
category_id:0,// 分类id
type:0,//0 新增 1 修改
title:'',// 标题
id:''// 课程id
}
}
},
......@@ -78,6 +82,7 @@
this.editorObj = {
show:true,
category_id:this.id,
type:0,
title:'新增课包'
}
}
......
import Vue from 'vue';
import {post,fetch,patch,put,del} from './index'
import {post,fetch,patch,put,del,upload} from './index'
const _baseUrl=process.env.API_URL;
Vue.prototype.$post=post;
Vue.prototype.$fetch=fetch;
Vue.prototype.$patch=patch;
Vue.prototype.$put=put;
Vue.prototype.$del=del;
Vue.prototype.$upload = upload;
//登录
const loginURL = `${_baseUrl}api/admin/login`;
......@@ -253,3 +254,8 @@ export const getMediaListApi = function (json) {
};
// 获取商品列表
// const getGoodsListUrl = `${_baseUrl}api/admin/goods/list`;
// 文件上传
const uploadFileUrl = `${_baseUrl}api/public/upload/zone`;
export const uploadFileApi = function (data) {
return Vue.prototype.$upload(uploadFileUrl,data)
};
......@@ -13,9 +13,11 @@ axios.interceptors.request.use(
// 获取token
const token = Cookie.get('cc_token');
// 设置参数格式
config.headers = {
'Content-Type':'application/json',
};
if(!config.headers['Content-Type']){
config.headers = {
'Content-Type':'application/json',
};
}
// 添加token到headers
if(token){
config.headers.token = token
......@@ -58,12 +60,61 @@ axios.interceptors.response.use(
/**
* 封装get方法
* 封装upload方法
* @param url
* @param params
* @returns {Promise}
*/
export function upload(url,data) {
return new Promise((resolve,reject) => {
//开启分片
let size = parseInt(Number(data.size)/Number(process.env.MAX_FILESIZE) +1);
let y = 0;
let fun = function(){
let formData = new FormData();
let file = data.slice(y*process.env.MAX_FILESIZE,(y+1)*process.env.MAX_FILESIZE)
console.log(data)
formData.append('chunk', y);
formData.append('file_name', data.name);
formData.append('count', size);
formData.append('file', file);
axios.post(url,formData,{ headers: {
'Content-Type': 'multipart/form-data'
},timeout:60000})
.then(response => {
if(response.data.code === 200){
y++;
if(y<size){
fun()
}else{
resolve(response.data.data);
}
}else{
Message.error(response.data.msg)
}
})
.catch(err => {
reject(err);
let message = '请求失败!请检查网络';
if(err.response)message=err.response.data.message;
MessageBox({
title:'错误!',
message:message,
type:'error',
})
})
};
fun()
})
}
/**
* 封装get方法
* @param url
* @param params
* @returns {Promise}
*/
export function fetch(url,params={}){
return new Promise((resolve,reject) => {
axios.get(url,{
......
......@@ -22,6 +22,9 @@ import radio1_near from '../assets/mould/radio1/near.png'
import radio1_next from '../assets/mould/radio1/next.png'
import radio1_play from '../assets/mould/radio1/play.png'
import radio1_showBtn from '../assets/mould/radio1/showBtn.png'
import radio_moerduo from '../assets/mould/radio1/moerduo.png'
import radio_moerduoBg from '../assets/mould/radio1/moerduobg.png'
import radio_tabVideo from '../assets/mould/radio1/tabVideo.png'
import playTitle from '../assets/mould/radio1/title.png'
import play1_bg from '../assets/mould/video/bg.png'
import play1_back from '../assets/mould/video/back.png'
......@@ -43,6 +46,13 @@ import show1_yezizuo from '../assets/mould/show1/yezizuo.png'
import show1_zhaopianqiang from '../assets/mould/show1/zhaopianqiang.png'
import show1_zhuangshi from '../assets/mould/show1/zhuangshi.png'
import show1_title from '../assets/mould/show1/title.png'
import refueling1_bg from '../assets/mould/refueling1/bg.png'
import refueling1_backBtn from '../assets/mould/refueling1/backBtn.png'
import refueling1_finish from '../assets/mould/refueling1/finish.png'
import refueling1_next from '../assets/mould/refueling1/next.png'
import refueling1_radio from '../assets/mould/refueling1/radio.png'
import refueling1_title from '../assets/mould/refueling1/title.png'
export default {
look1:{
bg:look1_bg,
......@@ -71,7 +81,13 @@ export default {
next:radio1_next,
play:radio1_play,
showBtn:radio1_showBtn,
title:playTitle
title:playTitle,
moerduo:radio_moerduo,
moerduoBg:radio_moerduoBg,
finishBtn:refueling1_finish,
nextBtn:refueling1_next,
backPlayBtn:refueling1_backBtn,
tabVideo: radio_tabVideo
},
play1:{
bg:play1_bg,
......@@ -96,5 +112,13 @@ export default {
zhaopianqiang: show1_zhaopianqiang,
zhuangshi: show1_zhuangshi,
title:show1_title
},
refueling1:{
bg:refueling1_bg,
backBtn:refueling1_backBtn,
finish: refueling1_finish,
next: refueling1_next,
radio: refueling1_radio,
title: refueling1_title,
}
}
......@@ -11,9 +11,10 @@ export const MOULDLIST = [
name:'看一看-1',
key:'look1',
content:{
radioUrl:'',
radioUrl:[],
today:'',
directory:'',
nextIndex:'',
timeLang:0,
}
},{
......@@ -23,19 +24,32 @@ export const MOULDLIST = [
key:'radio1',
content:{
radio:[
{
radioUrl:'',
name:'',
title:'',
}
],
timeLang: 0
nextIndex:'',
lastIndex:'',
buttonType:0,
titleType:0,
tabVideo:{
type:false,
index:''
},
}
},{
title:'宝贝玩一玩',
imgUrl:playVideoUrl,
name:'玩-video-1',
key:'play1'
key:'play1',
content:{
videoUrl:'',
banner:"",
nextIndex:'',
lastIndex:'',
tabRadio:{
type:false,
index:''
}
}
},{
title:'唱学加油包',
imgUrl:RefuelingUrl,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment