From a68a710d43fa6c9214f2ede61aa42932ad2ff330 Mon Sep 17 00:00:00 2001
From: zhenghuang <236220500@qq.com>
Date: Wed, 3 Jun 2020 15:44:20 +0800
Subject: [PATCH] 1
---
src/pages/shop/IncreaseWelcomeEdit.vue | 219 +++++++++++++++----------
1 file changed, 130 insertions(+), 89 deletions(-)
diff --git a/src/pages/shop/IncreaseWelcomeEdit.vue b/src/pages/shop/IncreaseWelcomeEdit.vue
index e066f0b..0f46b9e 100644
--- a/src/pages/shop/IncreaseWelcomeEdit.vue
+++ b/src/pages/shop/IncreaseWelcomeEdit.vue
@@ -2,119 +2,160 @@
-
-
+
-
+
-
+
-
+
-
+
-
-
@@ -133,7 +174,7 @@ const validateUrl = (rule, value, callback) => {
}
};
export default {
- data() {
+ data () {
return {
showStoreCheck: false,
showWeb: false,
@@ -176,7 +217,7 @@ export default {
},
watch: {
welcome: {
- handler() {
+ handler () {
store.commit("SET_useData", {
...store.getters.useData,
...this.welcome
@@ -186,7 +227,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);
@@ -198,14 +239,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(
{
@@ -220,7 +261,7 @@ export default {
}
);
},
- showStores() {
+ showStores () {
console.log({ ...store.getters.useData, ...this.welcome });
store.commit("SET_useData", {
...this.welcome,
@@ -228,25 +269,25 @@ export default {
});
this.showStoreCheck = true;
},
- uploadImgSuccess(res, file) {},
- cancelWeb() {
+ uploadImgSuccess (res, file) { },
+ cancelWeb () {
this.showWeb = false;
},
- doShowWeb() {
+ doShowWeb () {
this.showWeb = true;
this.webForm = { url: "" };
},
- doShowMini() {
+ doShowMini () {
this.showMini = true;
this.miniForm = {
appid: "",
uri: ""
};
},
- cancelMini() {
+ cancelMini () {
this.showMini = false;
},
- okWeb() {
+ okWeb () {
let _this = this;
this.$refs["webForm"].validate(valid => {
if (valid) {
@@ -266,7 +307,7 @@ export default {
}
});
},
- okMini() {
+ okMini () {
let _this = this;
this.$refs["miniForm"].validate(valid => {
if (valid) {
@@ -286,11 +327,11 @@ export default {
}
});
},
- delActivityInput(index) {
+ delActivityInput (index) {
this.welcome.params.splice(index, 1);
this.$forceUpdate();
},
- handleBeforeUpload(res) {
+ handleBeforeUpload (res) {
const me = this;
let data = new FormData();
data.append("file", res);
@@ -303,7 +344,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;
@@ -323,12 +364,12 @@ export default {
});
return false;
},
- submit() {
+ submit () {
let _this = this;
- if (this.welcome.params.length <= 0) {
- _this.$Message.error("图片/网页/小程序消息至少添加一个");
- return false;
- }
+ // if (this.welcome.params.length <= 0) {
+ // _this.$Message.error("图片/网页/小程序消息至少添加一个");
+ // return false;
+ // }
if (this.welcome.stores.length <= 0) {
_this.$Message.error("请至少选择一个店铺");
return false;