Commit 1a546bab by dongjipeng

add

parent 28c49e55
File added
...@@ -23,7 +23,7 @@ axios.defaults.timeout = 50000 ...@@ -23,7 +23,7 @@ axios.defaults.timeout = 50000
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
axios.defaults.withCredentials = true axios.defaults.withCredentials = true
const DOMAIN_NAME = 'cfldpe' // 测试 const DOMAIN_NAME = 'cfldcn' // 测试
var ssoHttp = '' var ssoHttp = ''
if (process.env.NODE_ENV === 'development') { // 开发 if (process.env.NODE_ENV === 'development') { // 开发
ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/' ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/'
......
...@@ -154,8 +154,9 @@ ...@@ -154,8 +154,9 @@
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-col :sm="10"> <el-col :sm="10">
<div class="btn-warp"> <div class="btn-warp">
<el-button @click="restaurantImgDialogVisible = false" class="mr30">取 消</el-button> <el-button @click="restaurantImgDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="addNewResImg('myForm')">确 定</el-button> <el-button type="danger" @click="addNewResImg('myForm', '1')">上传并继续</el-button>
<el-button type="danger" @click="addNewResImg('myForm', '2')">确 定</el-button>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -288,7 +289,7 @@ export default { ...@@ -288,7 +289,7 @@ export default {
this.ruleForm.imgFilePath = res.data.filePath this.ruleForm.imgFilePath = res.data.filePath
this.ruleForm.resImgName = res.data.fileOriginalName this.ruleForm.resImgName = res.data.fileOriginalName
}, },
addNewResImg (myForm) { // 添加餐厅菜单 addNewResImg (myForm, type) { // 添加餐厅菜单
this.$refs[myForm].validate((valid) => { this.$refs[myForm].validate((valid) => {
if (valid) { if (valid) {
let _this = this let _this = this
...@@ -305,8 +306,12 @@ export default { ...@@ -305,8 +306,12 @@ export default {
type: 'success', type: 'success',
message: '菜单添加成功!' message: '菜单添加成功!'
}) })
_this.ruleForm.imgFilePath = ''
_this.ruleForm.resImgName = ''
if (type === '2') {
_this.$router.push({ name: 'restaurantMenus' }) _this.$router.push({ name: 'restaurantMenus' })
} }
}
}) })
} else { return false } } else { return false }
}) })
......
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