Commit 60642ef2 authored by wangwei's avatar wangwei

打包

parent a16135c5
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
......
<!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.163beef9b484265cd9912d12d9615a4b.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.5949077eb533e2c3b093.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.ac9ec422b18a18de9c4000a5d0125879.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.ff9d3b4df27667d0b6d1.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 diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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.
{"version":3,"sources":["webpack:///webpack/bootstrap 4a975dfe96b5a3cfb2fd"],"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","config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sB,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 4a975dfe96b5a3cfb2fd"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 169eef2a99ed260bdda0"],"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,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var 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 169eef2a99ed260bdda0"],"sourceRoot":""}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -6,7 +6,7 @@
:visible.sync="dialogObj.show"
width="800px">
<div v-loading="loading">
<el-form ref="form" :model="form" label-width="120px">
<el-form ref="form" :model="form" label-width="120px">
<el-form-item label="课程标题">
<el-input v-model="form.title"></el-input>
</el-form-item>
......@@ -154,19 +154,19 @@
case 1:
// this.$refs['form'].validate((valid) => {
// if(valid){
editLessonApi(this.id,this.form).then(res=>{
editLessonApi(this.dialogObj.id,this.form).then(res=>{
this.$message({
type: 'success',
message: '修改成功!'
});
this.$emit("reflash");
this.show = false;
this.dialogObj.show = false;
});
// }
// });
break;
case 0:
console.log(this.form)
console.log(this.form);
// this.$refs['form'].validate((valid) => {
// if(valid){
addLessonApi(this.form).then(res=>{
......@@ -212,6 +212,7 @@
item_category_ids:[],
cover:'',
};
this.imageList = [{name:res.cover,url:process.env.IMAGE_URL_HEAD + res.cover}];
this.selectedLessonList = [];
this.selectedBoxList = [];
if(res.type === 0){
......
<template>
<div>
<el-container>
<el-header height="80px">
<div class="head-top">
<el-button size="mini">
课程基本信息编辑
</el-button>
缩放:<el-input-number v-model="bigNum" size="mini" :min="30" :max="150" :step="10"></el-input-number>
<el-button size="mini" type="success" style="float: right" @click="dialogVisible = true">
编辑当前页参数
</el-button>
</div>
<div class="head-content">
<div>
{{ selectedMould[nowIndex].title }}
</div>
</div>
</el-header>
<el-container>
<el-aside width="150px">
<div class="page-list">
<div v-for="data in selectedMould" :key="data.name" @click="chooseThat(data)">
<el-card shadow="hover" class="box" :body-style="{ padding: '0px' }">
<img :src="data.imgUrl" class="image">
</el-card>
</div>
</div>
</el-aside>
<el-main>
<div v-if="selectedMould[nowIndex].key === 'look1'">
<div class="look1" :style="{backgroundImage:`url(${mouldImg.look1.bg}`,transform:`scale(${bigNum/100},${bigNum/100})`}">
<div class="bg-block">
<img :src="mouldImg.look1.reqiqiu" class="reqiqiu"/>
<img :src="mouldImg.look1.qiqiu" class="qiqiu"/>
<img :src="mouldImg.look1.feiji" class="feiji"/>
<div>
<img :src="mouldImg.look1.title1"/>
</div>
<div>
<img :src="mouldImg.look1.radio"/>
</div>
<div>
<img :src="mouldImg.look1.tadayBg"/>
</div>
<div class="title2-block">
<img :src="mouldImg.look1.title2" class="title2"/>
<img :src="mouldImg.look1.redM" class="redM"/>
<img :src="mouldImg.look1.flour" class="flour"/>
</div>
</div>
<div class="bottom-block">
<img :src="mouldImg.look1.bank"/>
<img :src="mouldImg.look1.go"/>
</div>
</div>
</div>
</el-main>
</el-container>
</el-container>
<el-dialog
title="编辑"
v-if="selectedMould[nowIndex].key === 'look1'"
:visible.sync="dialogVisible"
:modal="false"
width="30%">
<el-form label-width="80px">
<el-form-item label="音频">
<el-input></el-input>
</el-form-item>
<el-form-item label="今日目标">
<el-input type="textarea"></el-input>
</el-form-item>
<el-form-item label="陪玩指南">
<el-input type="textarea"></el-input>
</el-form-item>
<el-form-item label="停留时长">
<el-input-number></el-input-number>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import mouldImg from '../../util/mouldImgUrl'
export default {
name: "editor",
props:[
'selectedMould',
],
data(){
return {
bigNum:100,
dialogVisible:false,
nowIndex:0,
mouldImg:mouldImg
}
},
watch:{
'selectedMould':{
handler(newValue, oldValue) {
console.log(newValue)
this.pageList = newValue
},
deep: true
}
},
methods:{
chooseThat(data){
this.nowIndex = this.selectedMould.indexOf(data)
console.log(this.nowIndex)
}
}
}
</script>
<style scoped lang="less">
@import "../../util/public";
.el-container{
background: white;
.el-header{
padding: 0;
.head-top{
background: #f5f8ff;
font-size: 14px;
color: #333333;
padding: 5px;
.page-type{
display: inline-block;
padding: 0 10px;
}
}
.head-content{
padding: 10px;
}
}
.page-list{
padding: 10px 0;
.el-card{
margin: 15px 0;
img{
width: 100%;
}
}
}
}
.look1{
transform-origin:50% 0;
width: 750px;
height: 1334px;
overflow: hidden;
margin: auto;
position: relative;
&>div{
margin: auto;
text-align: center;
}
.bg-block{
width: 690px;
height: 1080px;
position: relative;
background: #FFFFFF;
box-shadow: 0 2px 3px 1px rgba(153,153,153,0.50);
border-radius: 8px;
margin: auto;
top: 150px;
.reqiqiu{
position: absolute;
left: -30px;
z-index: 1;
}
.qiqiu{
position: absolute;
z-index: 1;
left: -30px;
top: 700px
}
.feiji{
position: absolute;
z-index: 1;
right: -30px;
top: 200px;
}
.title-block{
text-align: center;
width: 560px;
margin: auto;
height: 152px;
line-height: 152px;
img{
vertical-align: middle;
}
}
.title2-block{
background: #FFFFFF;
border: 2px solid #2E2E2E;
border-radius: 8px;
margin: 0 30px;
position: relative;
top: 35px;
height: 450px;
.title2{
position: absolute;
top: -45px;
left: 20px;
}
.redM{
position: absolute;
top: -4px;
right: -4px;
}
.flour{
position: absolute;
bottom: 0;
right: 0;
}
}
}
.bottom-block{
position: absolute;
bottom: 18px;
width: 100%;
text-align: center;
img:first-child{
margin-right: 50px;
}
}
}
</style>
<template>
<el-dialog
:title="editorObj.title"
:visible.sync="editorObj.show"
:close-on-click-modal="false"
:close-on-press-escape="false"
:center="true"
:fullscreen="true">
<el-container>
<el-aside class="left-block" width="180px">
<div class="list-title">
模板列表
</div>
<div class="page-list">
<div v-for="data in mouldList" @click="addMould(data)" :key="data.name">
<el-card shadow="hover" class="box" :body-style="{ padding: '0px' }">
<img :src="data.imgUrl" class="image">
<div style="padding: 14px;">
<span>{{data.name}}</span>
<div class="bottom clearfix">
</div>
</div>
</el-card>
</div>
</div>
</el-aside>
<el-main>
<editor :selectedMould="selectedMould"/>
</el-main>
</el-container>
<el-dialog>
</el-dialog>
</el-dialog>
</template>
<script>
import addUrl from '../../assets/editor/Group 7.png'
import {MOULDLIST} from "../../util/resourceMould";
import editor from './editor'
export default {
props:[
'editorObj'
],
components:{
editor
},
data(){
return{
selectedMould:[],
addUrl:addUrl,
mouldList:MOULDLIST,
age:[0,0],
level:[0,0],
form:{}
}
},
methods:{
addMould(data){
this.selectedMould.push(data)
console.log(this.selectedMould)
}
}
}
</script>
<style scoped lang="less">
@import "../../util/public";
.el-container{
height: 900px;
overflow: auto;
.el-main{
padding: 10px;
background: #f5f8ff;
}
.left-block{
font-size: 14px;
border: 1px solid #f0f0f0;
color: #333333;
text-align: center;
.list-title{
padding: 5px;
}
.page-list{
padding: 10px 0;
background: #e8e8e8;
.box{
margin: 15px 5px;
cursor: pointer;
&:hover{
box-shadow: 0 0 20px #ff9a22;
}
img{
width: 100%;
}
}
.title{
font-size: 12px;
text-align: center;
}
&-add{
cursor: pointer;
padding: 10px 0;
font-size: 12px;
color: #CCCCCC;
}
}
}
}
</style>
<style>
.el-upload--picture-card,.el-upload-list--picture-card .el-upload-list__item{
width: 50px;
height: 50px;
line-height: 58px;
}
</style>
......@@ -2,7 +2,7 @@
<el-container>
<el-aside width="250px">
<el-menu
:default-active="index">
:default-active="index" v-loading="menuLoading">
<el-submenu v-for="data in leftList" :key="data.id" :index="data.name">
<template slot="title">
<span>{{data.name}}({{data.children | lengthNum}})
......@@ -47,6 +47,7 @@
return {
leftList:[],
index:'',
menuLoading:false,
id:''
}
},
......@@ -65,19 +66,20 @@
},
methods:{
getList(){
this.$store.commit('mainUnShow')
getCategoryApi('').then(res=>{
this.leftList = res;
if(this.id === ''){
this.id = res[0].children[0].children[0].id;
this.index = res[0].children[0].children[0].name
}
this.$store.commit('mainCanShow')
this.$store.commit('mainCanShow');
this.menuLoading = false;
})
},
upIndex(data,item){
let i = item.indexOf(data);
if(i>0){
this.menuLoading = true;
let json = {
category_up_id : data.id ,
category_down_id : item[i-1].id
......@@ -91,6 +93,7 @@
let i = item.indexOf(data);
let lth=item.length - 1;
if(i < lth){
this.menuLoading = true;
let json = {
category_up_id :item[i+1].id,
category_down_id:data.id
......
<template>
<div>
<div class="add-block">
<el-button class="add-btn">+新增课时</el-button>
<el-button class="add-btn" @click="onAdd">+新增课时</el-button>
</div>
<el-card v-for="data in list" :key="data.id" class="box-card">
<div class="id">
......@@ -39,19 +39,27 @@
<el-tag type="success" size="mini">{{data.min_age}}-{{data.max_age}}</el-tag>
</div>
</el-card>
<editor-dialog :editorObj="editorObj"/>
</div>
</template>
<script>
import {getCateListApi} from "../../service/api";
import EditorDialog from './editorDialog'
export default {
name: "list",
components:{
EditorDialog
},
props:[
'id'
],
data(){
return {
list:[]
list:[],
editorObj:{
show:false
}
}
},
created(){
......@@ -67,6 +75,13 @@
delLseeon(){
},
onAdd(){
this.editorObj = {
show:true,
category_id:this.id,
title:'新增课包'
}
}
},
watch:{
id(value){
......
<template>
<el-dialog
:title="dialogObj.title"
center
append-to-body
:visible.sync="dialogObj.show"
width="800px">
<div v-loading="loading">
<el-form ref="form" :model="form" label-width="120px">
<el-form-item label="商品名称">
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="商品类型">
<el-select v-model="form.goods_type" placeholder="请选择">
<el-option
:label="'普通商品'"
:value="1">
</el-option>
<el-option
:label="'团购商品'"
:value="2">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="课程类型">
<el-select v-model="form.course_type" placeholder="请选择" @change="changeLessonType()">
<el-option
:label="'日课'"
:value="1">
</el-option>
<el-option
:label="'月课'"
:value="0">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="课程">
<el-select v-model="form.course_id" placeholder="请选择">
<el-option
v-for="data in lessonList"
:key="data.id"
:label="data.title"
:value="data.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="观看时长">
<el-input-number v-model="form.watch_num" label="课时数"></el-input-number>
</el-form-item>
<el-form-item label="续看时长">
<el-input-number v-model="form.duration_num" label="看课天数"></el-input-number>
</el-form-item>
<el-form-item label="是否配置实物">
<el-switch
v-model="form.is_real"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="是否可以分享">
<el-switch
v-model="form.is_auth_user"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="原价">
<el-input-number v-model="form.original_price" label="原价"></el-input-number>
</el-form-item>
<el-form-item label="现价">
<el-input-number v-model="form.current_price" label="现价"></el-input-number>
</el-form-item>
<el-form-item label="商品描述">
<el-input v-model="form.goods_desc" type="textarea"></el-input>
</el-form-item>
<el-form-item label="分享内容">
<el-input v-model="form.share_desc"></el-input>
</el-form-item>
<el-form-item label="其他内容">
<el-input v-model="form.desc"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false">取 消</el-button>
<el-button type="primary" @click="sub">确 定</el-button>
</span>
</div>
</el-dialog>
</template>
<script>
import {getLessonApi,addGoodsApi,editGoodsApi,getGoodsDetailApi} from "../../service/api";
import {TEACHERTYPE} from "../../util/wordbook";
export default {
name: "dialogObj",
props:[
'dialogObj'
],
data(){
return{
loading:true,
form:{
name:'',
goods_type:0,
goods_desc:'',
course_id :'',
course_type:0,
watch_num:'',
duration_num:0,
original_price:'',
current_price:'',
is_real:0,
is_auth_user:'',
share_desc:0,
desc:''
},
lessonList:[]
}
},
methods:{
sub(){
let _json = JSON.parse(JSON.stringify(this.form));
_json.original_price = _json.original_price*100;
_json.current_price = _json.current_price*100;
switch(this.dialogObj.type){
case 1:
// this.$refs['form'].validate((valid) => {
// if(valid){
editGoodsApi(this.dialogObj.id,_json).then(res=>{
this.$message({
type: 'success',
message: '修改成功!'
});
this.$emit("reflash");
this.dialogObj.show = false;
});
// }
// });
break;
case 0:
// this.$refs['form'].validate((valid) => {
// if(valid){
addGoodsApi(_json).then(res=>{
this.$message({
type: 'success',
message: '新增成功!'
});
this.$emit("reflash");
this.dialogObj.show = false;
})
// }
// });
break
}
},
initDialog(){
switch(this.dialogObj.type){
case 0:
this.loading = false;
this.form={
name:'',
goods_type:1,
goods_desc:'',
course_id :'',
course_type:1,
watch_num:'',
duration_num:0,
original_price:'',
current_price:'',
is_real:0,
is_auth_user:0,
share_desc:0,
desc:''};
this.getLessonList();
break;
case 1:
getGoodsDetailApi(this.dialogObj.id).then(res=>{
this.loading = false;
this.form={
name:res.name,
goods_type:res.goods_type,
goods_desc:res.goods_desc,
course_id :res.course_id,
course_type:res.course_type,
watch_num:res.watch_num,
duration_num:res.duration_num,
original_price:res.original_price/100,
current_price:res.current_price/100,
is_real:res.is_real,
is_auth_user:res.is_auth_user,
share_desc:res.share_desc,
desc:res.desc
};
this.getLessonList()
});
break;
case 2:
this.title = '编辑';
this.show = this.dialogObj.show;
this.id = this.dialogObj.id;
this.type = 2;
getTeacherDetailApi(this.id).then(res=>{
this.form.name = res.name;
this.form.alias = res.alias;
this.form.qr = res.qr;
this.form.type = res.type;
this.form.status = res.status;
this.loading = false
});
break
}
},
changeLessonType(){
this.getLessonList()
},
getLessonList(){
getLessonApi({type:this.form.course_type}).then(res=>{
this.lessonList = res.list
})
}
},
watch:{
dialogObj:{
handler: function () {
this.loading = true;
this.initDialog()
},
deep: true
},
show(value){
this.$emit("changeShow",value);
}
}
}
</script>
<style scoped lang="less">
.el-col{
height: 50px;
text-align: center;
margin-bottom: 20px;
line-height: 40px;
.el-select{
width: 100%;
}
img{
width: 50px;
border-radius: 100px;
}
label{
color: #5982e6;
}
}
.dialog-footer{
display: block;
text-align: center;
}
</style>
<template>
<div class="user">
<el-form ref="searchFrom" :model="searchFrom" label-width="80px">
<el-row>
<el-col :span="4">
<el-form-item label="商品名称">
<el-input v-model="searchFrom.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-button type="primary" plain>搜索</el-button>
</el-form-item>
</el-col>
<el-col :span="4" :offset="12">
<el-form-item>
<el-button type="success" plain @click="add">添加商品</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data="userList"
style="width: 100%">
<el-table-column
prop="id"
label="商品ID">
</el-table-column>
<el-table-column
prop="name"
label="名称">
</el-table-column>
<el-table-column
label="商品类型">
<template slot-scope="scope">
{{scope.row.goods_type | goodsType}}
</template>
</el-table-column>
<el-table-column
label="现价">
<template slot-scope="scope">
{{scope.row.current_price/100}}
</template>
</el-table-column>
<el-table-column
label="课程类别">
<template slot-scope="scope">
{{scope.row.course_type | lessonType}}
</template>
</el-table-column>
<el-table-column
label="是否有实物">
<template slot-scope="scope">
{{scope.row.is_real | isOrNot}}
</template>
</el-table-column>
<el-table-column
label="状态">
<template slot-scope="scope">
{{scope.row.status | goodsStatus}}
</template>
</el-table-column>
<el-table-column
width="200"
label="操作">
<template slot-scope="scope">
<el-popover
placement="top"
width="320">
<div style="text-align: center">
<el-button size="mini" plain type="primary" @click="detail(scope.row)">
查看详情
</el-button>
<el-button v-if="scope.row.status === 1" size="mini" plain type="primary" @click="onUp(scope.row)">
上架
</el-button>
<el-button size="mini" v-if="scope.row.status === 0" plain type="primary" @click="onDown(scope.row)">
下架
</el-button>
<el-button size="mini" plain type="warning" @click="edit(scope.row)">
编辑
</el-button>
<el-button size="mini" plain type="danger" @click="onDel(scope.row)">
删除
</el-button>
</div>
<el-button slot="reference" size="mini" type="text" >操作</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<page :total="total" v-model="nowPage"/>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getUser"/>
</div>
</template>
<script>
export default {
name: "index"
import {getGoodsListApi,deleteGoodsApi,downGoodsApi,upGoodsApi} from "../../service/api";
import {ISORNOT,GOODSTYPE,LESSONTYPE,GOODSSTATUS} from "../../util/wordbook";
import page from '../framework/page'
import dialogCom from './dialog'
export default {
name: "index",
data(){
return {
searchFrom:{
name:'',
},
userList:[],
total:0,
nowPage:0,
dialogObj:{
type:0,
show:false,
title:'',
id:''
},
}
},
components:{
page,
dialogCom
},
filters:{
isOrNot(value){
return ISORNOT[value]
},
goodsType(value){
return GOODSTYPE[value]
},
lessonType(value){
return LESSONTYPE[value]
},
goodsStatus(value){
return GOODSSTATUS[value]
},
},
mounted(){
this.getUser()
},
methods:{
getUser(){
getGoodsListApi(this.searchFrom).then(res=>{
this.userList = res.list;
this.total = res.total
})
},
edit(data){
this.dialogObj={
type:1,
title:'编辑商品',
show:true,
id:data.id
}
},
add(){
this.dialogObj={
type:0,
title:'添加商品',
show:true
}
},
detail(data){
this.dialogObj.id = data.id;
this.dialogObj.type = 1;
this.dialogObj.show = true
},
onDel(data){
this.$confirm('此操作将删除该商品?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteGoodsApi(data.id).then(res=>{
this.$message({
type: 'success',
message: '删除成功!'
});
});
this.getUser()
});
},
onUp(data){
this.$confirm('此操作将上架该商品?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
upGoodsApi(data.id).then(res=>{
this.$message({
type: 'success',
message: '操作成功!'
});
});
this.getUser()
});
},
onDown(data){
this.$confirm('此操作将下架该商品?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
downGoodsApi(data.id).then(res=>{
this.$message({
type: 'success',
message: '操作成功!'
});
});
this.getUser()
});
},
changeShow(data){
this.dialogObj.show=data
}
}
}
</script>
<style scoped lang="less">
@import "../../util/public";
.user{
height: 100%;
overflow: auto;
padding: 20px;
.btn-content{
text-align: center;
}
}
</style>
......@@ -22,24 +22,39 @@
</div>
</el-header>
<el-container>
<el-aside width="200px">321</el-aside>
<el-aside width="200px">
<div class="page-list">
<el-card v-for="data in selectedMould" @click="addMould(data)" shadow="hover" class="box" :key="data.name" :body-style="{ padding: '0px' }">
<img :src="data.imgUrl" class="image">
<div style="padding: 14px;">
<span>{{data.name}}</span>
<div class="bottom clearfix">
</div>
</div>
</el-card>
</div>
</el-aside>
<el-main>123</el-main>
</el-container>
</el-container>
</template>
<script>
export default {
name: "editor",
data(){
return {
value2:''
}
export default {
name: "editor",
props:[
'selectedMould',
],
data(){
return {
value2:''
}
}
}
</script>
<style scoped lang="less">
@import "../../util/public";
.el-container{
background: white;
.el-header{
......
......@@ -127,7 +127,16 @@ const deleteGoodsUrl = `${_baseUrl}api/admin/goods`;
export const deleteGoodsApi = function (id) {
return Vue.prototype.$del(`${deleteGoodsUrl}/${id}`)
};
// 商品上架
const upGoodsUrl = `${_baseUrl}api/admin/goods/putaway/`;
export const upGoodsApi = function (id) {
return Vue.prototype.$patch(`${upGoodsUrl}/${id}`)
};
// 商品下架
const downGoodsUrl = `${_baseUrl}api/admin/goods/soldout/`;
export const downGoodsApi = function (id) {
return Vue.prototype.$patch(`${downGoodsUrl}/${id}`)
};
//查询元素、菜单分类
const getCategoryUrl = `${_baseUrl}api/admin/category/list/0`;
export const getCategoryApi = function (pid) {
......
import look1_bg from '../assets/mould/look1/bg.png'
import look1_bank from '../assets/mould/look1/bank.png'
import look1_feiji from '../assets/mould/look1/feiji.png'
import look1_flour from '../assets/mould/look1/flour.png'
import look1_go from '../assets/mould/look1/go.png'
import look1_qiqiu from '../assets/mould/look1/qiqiu.png'
import look1_radio from '../assets/mould/look1/radio.png'
import look1_rainbow from '../assets/mould/look1/rainbow.png'
import look1_redM from '../assets/mould/look1/redM.png'
import look1_reqiqiu from '../assets/mould/look1/reqiqiu.png'
import look1_tadayBg from '../assets/mould/look1/tadayBg.png'
import look1_title1 from '../assets/mould/look1/title1.png'
import look1_title2 from '../assets/mould/look1/title2.png'
import look1_xuxian from '../assets/mould/look1/xuxian.png'
import look1_yun from '../assets/mould/look1/yun.png'
export default {
look1:{
bg:look1_bg,
bank:look1_bank,
feiji:look1_feiji,
flour:look1_flour,
go:look1_go,
qiqiu:look1_qiqiu,
radio:look1_radio,
rainbow:look1_rainbow,
redM:look1_redM,
reqiqiu:look1_reqiqiu,
tadayBg:look1_tadayBg,
title1:look1_title1,
title2:look1_title2,
xuxian:look1_xuxian,
yun:look1_yun
}
}
import lookUrl from '../assets/mould/example/look.png'
import playRadioUrl from '../assets/mould/example/playRadio.png'
import playVideoUrl from '../assets/mould/example/playVideo.png'
import RefuelingUrl from '../assets/mould/example/Refueling.png'
import showBabyUrl from '../assets/mould/example/showBaby.png'
export const MOULDLIST = [
{
title:'爸妈看一看',
imgUrl:lookUrl,
name:'看一看-1',
key:'look1',
content:{
radioUrl:'',
today:'',
directory:'',
timeLang:0,
}
},{
title:'宝贝玩一玩',
imgUrl:playRadioUrl,
name:'玩-radio-1',
key:'radio1'
},{
title:'宝贝玩一玩',
imgUrl:playVideoUrl,
name:'玩-video-1',
key:'play1'
},{
title:'唱学加油包',
imgUrl:RefuelingUrl,
name:'加油包-1',
key:'refueling1'
},{
title:'爸妈秀宝贝',
imgUrl:showBabyUrl,
name:'秀宝贝-1',
key:'show1'
},
];
......@@ -12,3 +12,15 @@ export const LESSONTYPE={
'0':'月课',
'1':'日课'
};
export const GOODSTYPE = {
'1':'普通商品',
'2':'团购商品'
};
export const ISORNOT = {
'0':'否',
'1':'是'
};
export const GOODSSTATUS = {
'0':'在售',
'1':'下架'
};
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