Commit febe0a92 by wuwx

修改loading显示

1 parent 01f4b519
...@@ -771,7 +771,6 @@ export default { ...@@ -771,7 +771,6 @@ export default {
handleConfirm() { handleConfirm() {
this.validateRules() this.validateRules()
this.loading = true
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
var merchantval = true var merchantval = true
var merchantErrorObj = [] var merchantErrorObj = []
...@@ -808,6 +807,7 @@ export default { ...@@ -808,6 +807,7 @@ export default {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
console.log(params) console.log(params)
this.loading = true
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
......
...@@ -544,7 +544,6 @@ export default { ...@@ -544,7 +544,6 @@ export default {
handleConfirm() { handleConfirm() {
this.validateRules() this.validateRules()
this.loading = true
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
var merchantval = true var merchantval = true
var merchantErrorObj = [] var merchantErrorObj = []
...@@ -567,6 +566,7 @@ export default { ...@@ -567,6 +566,7 @@ export default {
} else { } else {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
this.loading = true
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
......
...@@ -435,7 +435,6 @@ export default { ...@@ -435,7 +435,6 @@ export default {
handleConfirm() { handleConfirm() {
this.validateRules() this.validateRules()
this.loading = true
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
var merchantval = true var merchantval = true
var merchantErrorObj = [] var merchantErrorObj = []
...@@ -458,6 +457,7 @@ export default { ...@@ -458,6 +457,7 @@ export default {
} else { } else {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
this.loading = true
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
......
...@@ -432,7 +432,6 @@ export default { ...@@ -432,7 +432,6 @@ export default {
}, },
//创建服务 //创建服务
createService() { createService() {
this.sloading = true
let params = { let params = {
effectiveDays: '', effectiveDays: '',
useAmount: '', useAmount: '',
...@@ -494,6 +493,7 @@ export default { ...@@ -494,6 +493,7 @@ export default {
params.discountType = 7 params.discountType = 7
params.merchantId = this.merchantId params.merchantId = this.merchantId
params.merchantName = this.merchantName params.merchantName = this.merchantName
this.sloading = true
createService(params) createService(params)
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
...@@ -513,7 +513,6 @@ export default { ...@@ -513,7 +513,6 @@ export default {
}, },
//更新服务 //更新服务
updateService() { updateService() {
this.sloading = true
let param = {} let param = {}
param.anticipatedCost = this.ruleForm.anticipatedCost * 100 param.anticipatedCost = this.ruleForm.anticipatedCost * 100
param.discountType = 7 param.discountType = 7
...@@ -522,6 +521,7 @@ export default { ...@@ -522,6 +521,7 @@ export default {
param.couponId = this.$route.query.couponId param.couponId = this.$route.query.couponId
param.stock = this.ruleForm.stock param.stock = this.ruleForm.stock
param.useDescription = this.ruleForm.useDescription param.useDescription = this.ruleForm.useDescription
this.sloading = true
updateService(param) updateService(param)
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!