Commit 5933ad1f authored by 王's avatar

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

parents 5dee8d3c e3de2104
<!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.4c6c270d6e85f4ffc37b125459643a13.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.7b0c00ae9aa9f10c274f.js></script><script type=text/javascript src=/static/js/app.a4efeade89d291b3c063.js></script></body></html> <!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.622ed6de119df6251d7bfee44ca4cd0e.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.e0a3860cd2b9798f6aa7.js></script></body></html>
\ No newline at end of file \ 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 diff is collapsed.
{"version":3,"sources":["webpack:///webpack/bootstrap 9293f79876473d27e67b"],"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,s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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 9293f79876473d27e67b"],"sourceRoot":""} {"version":3,"sources":["webpack:///webpack/bootstrap b20f6d4b769c5f155928"],"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 b20f6d4b769c5f155928"],"sourceRoot":""}
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header"> <div slot="header">
<span>盒子类型</span> <span>盒子类型</span>
<el-button style="float: right; padding: 3px 0;" type="text">新增类型</el-button> <el-button style="float: right; padding: 3px 0;" @click="onAddType" type="text">新增类型</el-button>
</div> </div>
<el-card v-for="o in list" shadow="hover" :key="o.id" :class="{text:true,'now-card':o.id === nowId}"> <el-card v-for="o in list" shadow="hover" :key="o.id" :class="{text:true,'now-card':o.id === nowId}">
<div class="name" @click="changeCateGory(o.id)"> <div class="name" @click="changeCateGory(o.id)">
...@@ -20,17 +20,34 @@ ...@@ -20,17 +20,34 @@
</div> </div>
</el-card> </el-card>
</el-card> </el-card>
<el-dialog title="新增盒子" :visible.sync="dialogVisible" :modal="false">
<el-form label-width="100px">
<el-form-item label="名称">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="saveBoxType">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {getBoxTypeListApi} from "../../service/api"; import {getBoxTypeListApi,addBoxTypeApi} from "../../service/api";
export default { export default {
name: "boxTypeList", name: "boxTypeList",
data () { data () {
return { return {
list:[], list:[],
nowId:'', nowId:'',
form:{
name:'',
pid:0,
cover:'',
},
dialogVisible:false,
close:false close:false
} }
}, },
...@@ -48,6 +65,24 @@ ...@@ -48,6 +65,24 @@
} }
}) })
}, },
onAddType(){
this.dialogVisible=true;
this.form={
name:'',
pid:0,
cover:'',
}
},
saveBoxType(){
addBoxTypeApi(this.form).then(res=>{
this.$message({
type: 'success',
message: '添加成功!'
});
this.dialogVisible = false;
this.getBoxTypeList()
})
},
changeCateGory(id){ changeCateGory(id){
this.nowId = id; this.nowId = id;
this.$emit('changeCategoryId',id) this.$emit('changeCategoryId',id)
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
</div> </div>
</el-menu-item> </el-menu-item>
</div> </div>
<el-menu-item class="list3" index="new">
<el-button type="success" round size="mini" plain style="width: 100%" @click="addItem(item.id)">+添加</el-button>
</el-menu-item>
</el-submenu> </el-submenu>
<el-menu-item class="list3" index="new"> <el-menu-item class="list3" index="new">
<el-button type="success" round size="mini" plain style="width: 100%" @click="addSec(data.id)">+添加</el-button> <el-button type="success" round size="mini" plain style="width: 100%" @click="addSec(data.id)">+添加</el-button>
...@@ -91,6 +94,13 @@ ...@@ -91,6 +94,13 @@
methods:{ methods:{
getList(){ getList(){
getCategoryApi('').then(res=>{ getCategoryApi('').then(res=>{
res.forEach(i=>{
i.children.forEach(j=>{
if(!j.children){
j.children = []
}
})
});
this.leftList = res; this.leftList = res;
if(this.id === ''){ if(this.id === ''){
this.id = res[0].children[0].children[0].id; this.id = res[0].children[0].children[0].id;
...@@ -100,6 +110,15 @@ ...@@ -100,6 +110,15 @@
this.menuLoading = false; this.menuLoading = false;
}) })
}, },
addItem(id){
this.dialogObj={
show:true,
type:0,
pid:id,
title:'新增三级分类',
category_id:''
}
},
addFist(){ addFist(){
this.dialogObj={ this.dialogObj={
show:true, show:true,
......
...@@ -80,7 +80,9 @@ ...@@ -80,7 +80,9 @@
case 0: case 0:
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if(valid){ if(valid){
this.form.cover = this.imageList[0].name; if(this.imageList.length >0){
this.form.cover = this.imageList[0].name;
}
addSingleApi(this.form).then(()=>{ addSingleApi(this.form).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialog.show = false">取 消</el-button> <el-button @click="dialog.show = false">取 消</el-button>
<el-button type="primary" @click="sub">确 定</el-button> <el-button type="primary" @click="onSub">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -252,9 +252,9 @@ ...@@ -252,9 +252,9 @@
this.getList() this.getList()
}); });
}, },
sub(){ onSub(){
this.$refs['form'].validate((valid) => { // this.$refs['form'].validate((valid) => {
if(valid){ // if(valid){
let dia = this.dialog; let dia = this.dialog;
if(dia.dialogType === 1){ if(dia.dialogType === 1){
let json = { let json = {
...@@ -299,8 +299,8 @@ ...@@ -299,8 +299,8 @@
this.getList() this.getList()
}) })
} }
} // }
}) // })
} }
} }
} }
......
<template>
<el-dialog
:title="dialog.title"
center
append-to-body
:visible.sync="dialog.show"
width="30%">
<el-form ref="dialog.form" :model="dialog.form" label-width="80px">
<el-form-item label="用户名" v-if="dialog.dialogType === 0">
<el-input v-model="dialog.form.username"></el-input>
</el-form-item>
<el-form-item label="密码" v-if="dialog.dialogType === 0">
<el-input v-model="dialog.form.password"></el-input>
</el-form-item>
<el-form-item label="角色">
<el-input v-model="dialog.form.role_id"></el-input>
</el-form-item>
<el-form-item label="简述">
<el-input v-model="dialog.form.desc"></el-input>
</el-form-item>
<el-form-item label="状态" v-if="dialog.dialogType === 1">
<el-select v-model="dialog.form.status" placeholder="请选择">
<el-option
v-for="item in dialog.select"
:key="item.code"
:label="item.value"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialog.show = false">取 消</el-button>
<el-button type="primary" @click="sub">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
name: "adminDialog"
}
</script>
<style scoped>
</style>
...@@ -462,6 +462,11 @@ const getWithdrawListUrl = `${_baseUrl}api/admin/order/withdraw/list`; ...@@ -462,6 +462,11 @@ const getWithdrawListUrl = `${_baseUrl}api/admin/order/withdraw/list`;
export const getWithdrawListApi = function (json) { export const getWithdrawListApi = function (json) {
return Vue.prototype.$fetch(`${getWithdrawListUrl}`,json) return Vue.prototype.$fetch(`${getWithdrawListUrl}`,json)
}; };
// 新增盒子类型
const addBoxTypeUrl = `${_baseUrl}api/admin/category/add/1`;
export const addBoxTypeApi = function (json) {
return Vue.prototype.$post(addBoxTypeUrl, json)
};
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