diff --git a/src/pages/shop/IncreaseWelcomeEdit.vue b/src/pages/shop/IncreaseWelcomeEdit.vue index 9fde391..531cf9b 100644 --- a/src/pages/shop/IncreaseWelcomeEdit.vue +++ b/src/pages/shop/IncreaseWelcomeEdit.vue @@ -2,178 +2,228 @@
-
- - + + + - +
- 标题 {{ index + 1 }} + 标题 {{ index + 1 }} - + - APPID {{ index + 1 }} + APPID {{ index + 1 }} - + - URI {{ index + 1 }} + URI {{ index + 1 }} - + - MediaId{{ index + 1 }} + MediaId{{ index + 1 }} - +
- 标题 {{ index + 1 }} + 标题 {{ index + 1 }} - + - URL {{ index + 1 }} + URL {{ index + 1 }} - +
- {{ item.name }}{{ index + 1 }} + {{ item.name }}{{ index + 1 }} - +
- +
- - + + - {{ welcome.stores[0].name }}等{{ welcome.stores.length }}家店铺 - + {{ welcome.stores[0].name }}等{{ welcome.stores.length }}家店铺 + - +
- + - - + +
- +
- + - +
- -
- - + + + + - - + +
- - + +
- -
- - + + + + - - + + - - + + - +
请上传图片 - +
- - + +
- +
@@ -192,7 +242,7 @@ const validateUrl = (rule, value, callback) => { } }; export default { - data() { + data () { return { showStoreCheck: false, showWeb: false, @@ -238,7 +288,7 @@ export default { }, watch: { welcome: { - handler() { + handler () { store.commit("SET_useData", { ...store.getters.useData, ...this.welcome @@ -248,7 +298,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); @@ -260,29 +310,17 @@ export default { selectStoreStep }, methods: { - webFilter() { - return ( - this._.filter(this.welcome.params, item => item.type == 2).length < 1 - ); - }, - imageFilter() { - return ( - this._.filter(this.welcome.params, item => item.type == 1).length < 1 - ); - }, - miniFilter() { - return ( - this._.filter(this.welcome.params, item => item.type == 3).length < 1 - ); + paramFilter () { + return this.welcome.params.length < 1; }, - doShow() { + doShow () { this.showStoreCheck = false; this.welcome = store.getters.useData; }, - onExceededSize() { + onExceededSize () { console.log("失败"); }, - getDetail(instanceId) { + getDetail (instanceId) { let _this = this; ActivityManager.instanceDetail( { @@ -297,7 +335,7 @@ export default { } ); }, - showStores() { + showStores () { console.log({ ...store.getters.useData, ...this.welcome }); store.commit("SET_useData", { ...this.welcome, @@ -305,16 +343,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: "", @@ -324,10 +362,10 @@ export default { key: "" }; }, - cancelMini() { + cancelMini () { this.showMini = false; }, - okWeb() { + okWeb () { let _this = this; this.$refs["webForm"].validate(valid => { if (valid) { @@ -347,7 +385,7 @@ export default { } }); }, - okMini() { + okMini () { let _this = this; this.$refs["miniForm"].validate(valid => { if (valid) { @@ -367,11 +405,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); @@ -385,7 +423,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; @@ -396,7 +434,7 @@ export default { }); return false; }, - handleBeforeUpload(res) { + handleBeforeUpload (res) { const me = this; let data = new FormData(); data.append("file", res); @@ -410,7 +448,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; @@ -430,7 +468,7 @@ export default { }); return false; }, - submit() { + submit () { let _this = this; _this.loading = true; if (this.welcome.stores.length <= 0) {