@@ -63,6 +69,7 @@
:on-success="uploadImgSuccess"
:format="['jpg', 'jpeg', 'png']"
:max-size="2048"
+ :on-exceeded-size="onExceededSize"
:before-upload="handleBeforeUpload"
multiple
type="drag"
@@ -70,7 +77,7 @@
style="width: 100%;"
>
-
+
@@ -133,6 +140,7 @@ export default {
showMini: false,
id: 0,
showMessageTypes: false,
+ imageUploading: false,
welcome: {
content: "",
params: [],
@@ -194,6 +202,9 @@ export default {
this.showStoreCheck = false;
this.welcome = store.getters.useData;
},
+ onExceededSize() {
+ console.log("失败");
+ },
getDetail(instanceId) {
let _this = this;
ActivityManager.instanceDetail(
@@ -283,6 +294,8 @@ export default {
const me = this;
let data = new FormData();
data.append("file", res);
+ console.log(data);
+ this.imageUploading = true;
axios({
method: "post",
url: "/upload",
@@ -291,6 +304,7 @@ export default {
"Content-Type": "multipart/form-data"
}
}).then(function(res) {
+ me.imageUploading = false;
if (res.data.success) {
// me.formValidate.logo = res.data.results;
me.welcome.params.push({
@@ -312,10 +326,12 @@ export default {
submit() {
let _this = this;
if (this.welcome.params.length <= 0) {
- _this.$Message.error("请添加图片/网页/小程序消息");
+ _this.$Message.error("图片/网页/小程序消息至少添加一个");
+ return false;
}
if (this.welcome.stores.length <= 0) {
_this.$Message.error("请至少选择一个店铺");
+ return false;
}
this.$refs["welcomeForm"].validate(valid => {
if (valid) {
diff --git a/src/pages/shop/IncreaseWelcomeList.vue b/src/pages/shop/IncreaseWelcomeList.vue
index 526c06d..28ece5e 100644
--- a/src/pages/shop/IncreaseWelcomeList.vue
+++ b/src/pages/shop/IncreaseWelcomeList.vue
@@ -76,15 +76,12 @@ export default {
title: "配置范围",
key: "shop",
render(h, params) {
- if (params.row.storeName == null) {
- return h("span", "店铺插入中...");
- }
return h(
"span",
- params.row.storeName +
- "等" +
+ (params.row.companyCount || 0) +
+ "家零售公司, " +
(params.row.storeCount || 0) +
- "家公司"
+ "家店铺"
);
}
},