Commit d37a62fd by 肖翔宇

12.15

parent ed4cfcfb
...@@ -4,7 +4,7 @@ const prodEnv = require('./prod.env') ...@@ -4,7 +4,7 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"', NODE_ENV: '"development"',
BASE_API: '"http://192.168.10.105:9001/sharePiano"', BASE_API: '"http://192.168.0.13:9001/sharePiano"',
}) })
//http://gxgqs.com/sharePiano //http://gxgqs.com/sharePiano
//http://192.168.10.105:9001/sharePiano //http://192.168.10.105:9001/sharePiano
File added
...@@ -5,7 +5,7 @@ import 'nprogress/nprogress.css'// Progress 进度条样式 ...@@ -5,7 +5,7 @@ import 'nprogress/nprogress.css'// Progress 进度条样式
import { Message } from 'element-ui' import { Message } from 'element-ui'
import { getToken } from '@/utils/auth' // 验权 import { getToken } from '@/utils/auth' // 验权
const whiteList = ['/courseList','/courseEdit','/bargainList','/bargainEdit','/userCost','/pianoList','/pianoEdit','/code'] // 不重定向白名单 const whiteList = ['/login'] // 不重定向白名单
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
if (getToken()) { if (getToken()) {
......
...@@ -114,6 +114,7 @@ export default { ...@@ -114,6 +114,7 @@ export default {
], ],
picture: [{ required: true, message: '图片不能为空', trigger: 'blur' }], picture: [{ required: true, message: '图片不能为空', trigger: 'blur' }],
}, },
pictureName:'http://image.gxgqs.com/',
videoFlag: false, videoFlag: false,
videoUploadPercent: 0, videoUploadPercent: 0,
pickerOptions1: { pickerOptions1: {
...@@ -178,15 +179,16 @@ export default { ...@@ -178,15 +179,16 @@ export default {
this.temp.createDate=year+'-'+month+'-'+day+' '+hour+':'+minutes+':'+seconds; this.temp.createDate=year+'-'+month+'-'+day+' '+hour+':'+minutes+':'+seconds;
}, },
handleImgSuccess(response, file) { handleImgSuccess(response, file) {
this.temp.picture = file.url; this.temp.picture = response.data;
console.log(file); console.log(response);
}, },
handleImgRemove(file) { handleImgRemove(file) {
this.temp.picture = undefined this.temp.picture = undefined
}, },
beforeUpload(file) { beforeUpload(file) {
const _URL = window.URL || window.webkitURL const _URL = window.URL || window.webkitURL;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(resolve)
const img = new Image() const img = new Image()
img.src = _URL.createObjectURL(file) img.src = _URL.createObjectURL(file)
img.onload = function() { img.onload = function() {
......
...@@ -187,6 +187,7 @@ ...@@ -187,6 +187,7 @@
this.list = data; this.list = data;
this.isShowCode=false; this.isShowCode=false;
console.log(this.list); console.log(this.list);
this.refresh();
}) })
}, },
openShowBargain(data){ openShowBargain(data){
...@@ -318,12 +319,13 @@ ...@@ -318,12 +319,13 @@
}, },
refresh() { refresh() {
// 初始化查询参数 // 初始化查询参数
console.log(1)
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 10 pageSize: 10
} }
this.tableKey = this.tableKey + 1 this.tableKey = this.tableKey + 1
this.getList() this.getList();
}, },
refreshBargain(){ refreshBargain(){
this.$fetch.sysBargainStage.findAll().then(({ data }) => { this.$fetch.sysBargainStage.findAll().then(({ data }) => {
...@@ -347,7 +349,6 @@ ...@@ -347,7 +349,6 @@
this.$message.warning('请等待视频上传成功') this.$message.warning('请等待视频上传成功')
return return
} }
console.log(this.temp);
this.$refs['dataForm'].validate(valid => { this.$refs['dataForm'].validate(valid => {
if (true) { if (true) {
const tempData = Object.assign({}, this.temp) const tempData = Object.assign({}, this.temp)
...@@ -358,7 +359,6 @@ ...@@ -358,7 +359,6 @@
type: 'success' type: 'success'
}) })
this.isShowLog=false; this.isShowLog=false;
this.back();
this.refresh(); this.refresh();
}) })
} else { } else {
...@@ -368,7 +368,7 @@ ...@@ -368,7 +368,7 @@
type: 'success' type: 'success'
}) })
this.isShowLog=false; this.isShowLog=false;
this.back(); console.log(1)
this.refresh(); this.refresh();
}) })
} }
......
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
this.temp.videoAddress = undefined; this.temp.videoAddress = undefined;
}, },
handleImgSuccess(response, file) { handleImgSuccess(response, file) {
this.temp.pictureAddress = file.url; this.temp.pictureAddress = response.data;
console.log(file); console.log(file);
}, },
handleImgRemove(file) { handleImgRemove(file) {
......
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 sign in to comment