From 4e3e08705adfa1370a620f1267f59ec70ff62ba5 Mon Sep 17 00:00:00 2001 From: zhenghuang <236220500@qq.com> Date: Thu, 4 Jun 2020 13:56:12 +0800 Subject: [PATCH] 1 --- src/pages/activity/selectStoreStep.vue | 6 +- src/pages/shop/IncreaseWelcomeEdit.vue | 300 +++++++++++++++---------- src/pages/shop/IncreaseWelcomeList.vue | 33 ++- 3 files changed, 211 insertions(+), 128 deletions(-) diff --git a/src/pages/activity/selectStoreStep.vue b/src/pages/activity/selectStoreStep.vue index 01c0977..cf11fe8 100644 --- a/src/pages/activity/selectStoreStep.vue +++ b/src/pages/activity/selectStoreStep.vue @@ -2,7 +2,7 @@
@@ -69,6 +69,10 @@ export default { isModify: { type: Boolean, default: false + }, + title: { + type: String, + default: "使用活动" } }, watch: { diff --git a/src/pages/shop/IncreaseWelcomeEdit.vue b/src/pages/shop/IncreaseWelcomeEdit.vue index 4ae5617..7efe419 100644 --- a/src/pages/shop/IncreaseWelcomeEdit.vue +++ b/src/pages/shop/IncreaseWelcomeEdit.vue @@ -2,167 +2,227 @@
-
- - + + + - +
- 标题 {{ 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 }}家店铺 + - +
- + - +
- +
- + - +
- -
- - + + + + - - + +
- - + +
- -
- - + + + + - - + + - - + + - +
请上传图片 - +
- - + +
- +
@@ -181,7 +241,7 @@ const validateUrl = (rule, value, callback) => { } }; export default { - data() { + data () { return { showStoreCheck: false, showWeb: false, @@ -226,7 +286,7 @@ export default { }, watch: { welcome: { - handler() { + handler () { store.commit("SET_useData", { ...store.getters.useData, ...this.welcome @@ -236,7 +296,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); @@ -248,14 +308,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( { @@ -270,7 +330,7 @@ export default { } ); }, - showStores() { + showStores () { console.log({ ...store.getters.useData, ...this.welcome }); store.commit("SET_useData", { ...this.welcome, @@ -278,16 +338,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: "", @@ -297,10 +357,10 @@ export default { key: "" }; }, - cancelMini() { + cancelMini () { this.showMini = false; }, - okWeb() { + okWeb () { let _this = this; this.$refs["webForm"].validate(valid => { if (valid) { @@ -320,7 +380,7 @@ export default { } }); }, - okMini() { + okMini () { let _this = this; this.$refs["miniForm"].validate(valid => { if (valid) { @@ -340,11 +400,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); @@ -358,7 +418,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; @@ -369,7 +429,7 @@ export default { }); return false; }, - handleBeforeUpload(res) { + handleBeforeUpload (res) { const me = this; let data = new FormData(); data.append("file", res); @@ -383,7 +443,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; @@ -403,7 +463,7 @@ export default { }); return false; }, - submit() { + submit () { let _this = this; if (this.welcome.stores.length <= 0) { _this.$Message.error("请至少选择一个店铺"); diff --git a/src/pages/shop/IncreaseWelcomeList.vue b/src/pages/shop/IncreaseWelcomeList.vue index 7141655..ca09543 100644 --- a/src/pages/shop/IncreaseWelcomeList.vue +++ b/src/pages/shop/IncreaseWelcomeList.vue @@ -17,12 +17,16 @@ size="small"> - +