Commit e562ee35 authored by 王's avatar

Merge branch 'development' of http://git.singsingenglish.com/new-sing/admin into development

parents c5a3dfd2 7738ab17
......@@ -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"',
});
......@@ -3,4 +3,5 @@ module.exports = {
NODE_ENV: '"production"',
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*5',
}
......@@ -6,4 +6,5 @@ module.exports = merge(prodEnv, {
NODE_ENV: '"production"',
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*5',
})
<!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.a88cda3170e79fad5b77ea9fc4558ca7.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.198829ffe3031ae877d3.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 diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
{"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 67c52e82d92fe805ed60"],"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 67c52e82d92fe805ed60"],"sourceRoot":""}
\ No newline at end of file
......@@ -200,7 +200,6 @@
item_category_ids:[],
cover:0,
};
this.imageList = [];
this.selectedLessonList = [];
this.selectedBoxList = [];
......
This diff is collapsed.
......@@ -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,6 +254,11 @@ 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)
};
// 获取菜单列表
const getMenuListUrl = `${_baseUrl}api/admin/category/list/2`;
export const getMenuListApi = function () {
......
......@@ -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