diff --git a/src/pages/shop/IncreaseWelcomeEdit.vue b/src/pages/shop/IncreaseWelcomeEdit.vue
index 7efe419..b1e80e6 100644
--- a/src/pages/shop/IncreaseWelcomeEdit.vue
+++ b/src/pages/shop/IncreaseWelcomeEdit.vue
@@ -2,227 +2,178 @@
-
-
+
-
+
-
+
-
+
-
+
-
-
@@ -241,7 +192,7 @@ const validateUrl = (rule, value, callback) => {
}
};
export default {
- data () {
+ data() {
return {
showStoreCheck: false,
showWeb: false,
@@ -249,6 +200,7 @@ export default {
id: 0,
showMessageTypes: false,
imageUploading: false,
+ loading: false,
welcome: {
content: "",
params: [],
@@ -286,7 +238,7 @@ export default {
},
watch: {
welcome: {
- handler () {
+ handler() {
store.commit("SET_useData", {
...store.getters.useData,
...this.welcome
@@ -296,7 +248,7 @@ export default {
deep: true
}
},
- created () {
+ created() {
this.id = this.$route.query.id;
// store.commit("SET_useData", { ...store.getters.useData, ...this.welcome });
console.log(this.$route);
@@ -308,14 +260,14 @@ export default {
selectStoreStep
},
methods: {
- doShow () {
+ doShow() {
this.showStoreCheck = false;
this.welcome = store.getters.useData;
},
- onExceededSize () {
+ onExceededSize() {
console.log("失败");
},
- getDetail (instanceId) {
+ getDetail(instanceId) {
let _this = this;
ActivityManager.instanceDetail(
{
@@ -330,7 +282,7 @@ export default {
}
);
},
- showStores () {
+ showStores() {
console.log({ ...store.getters.useData, ...this.welcome });
store.commit("SET_useData", {
...this.welcome,
@@ -338,16 +290,16 @@ export default {
});
this.showStoreCheck = true;
},
- uploadImgSuccess (res, file) { },
- miniUploadImgSuccess (res, file) { },
- cancelWeb () {
+ uploadImgSuccess(res, file) {},
+ miniUploadImgSuccess(res, file) {},
+ cancelWeb() {
this.showWeb = false;
},
- doShowWeb () {
+ doShowWeb() {
this.showWeb = true;
this.webForm = { url: "", title: "" };
},
- doShowMini () {
+ doShowMini() {
this.showMini = true;
this.miniForm = {
appid: "",
@@ -357,10 +309,10 @@ export default {
key: ""
};
},
- cancelMini () {
+ cancelMini() {
this.showMini = false;
},
- okWeb () {
+ okWeb() {
let _this = this;
this.$refs["webForm"].validate(valid => {
if (valid) {
@@ -380,7 +332,7 @@ export default {
}
});
},
- okMini () {
+ okMini() {
let _this = this;
this.$refs["miniForm"].validate(valid => {
if (valid) {
@@ -400,11 +352,11 @@ export default {
}
});
},
- delActivityInput (index) {
+ delActivityInput(index) {
this.welcome.params.splice(index, 1);
this.$forceUpdate();
},
- handleBeforeUploadMini (res) {
+ handleBeforeUploadMini(res) {
const me = this;
let data = new FormData();
data.append("file", res);
@@ -418,7 +370,7 @@ export default {
headers: {
"Content-Type": "multipart/form-data"
}
- }).then(function (res) {
+ }).then(function(res) {
me.imageUploading = false;
if (res.data.success) {
// me.formValidate.logo = res.data.results;
@@ -429,7 +381,7 @@ export default {
});
return false;
},
- handleBeforeUpload (res) {
+ handleBeforeUpload(res) {
const me = this;
let data = new FormData();
data.append("file", res);
@@ -443,7 +395,7 @@ export default {
headers: {
"Content-Type": "multipart/form-data"
}
- }).then(function (res) {
+ }).then(function(res) {
me.imageUploading = false;
if (res.data.success) {
// me.formValidate.logo = res.data.results;
@@ -463,10 +415,12 @@ export default {
});
return false;
},
- submit () {
+ submit() {
let _this = this;
+ _this.loading = true;
if (this.welcome.stores.length <= 0) {
_this.$Message.error("请至少选择一个店铺");
+ _this.loading = false;
return false;
}
this.$refs["welcomeForm"].validate(valid => {
@@ -481,6 +435,7 @@ export default {
"Content-Type": "applications/json"
}
}).then(res => {
+ _this.loading = false;
_this.$router.push("/shop/increase/welcome/list");
});
}