- 全选
-
+ 全选
+
-
+
加载中...
-
-
-
+
+
+
{{ item.label.substr(0, 18) }}
-
-
+
+
@@ -38,7 +48,7 @@ import ActivityManager from "../../services/ActivityManager/ActivityManager";
import store from "../../store/index";
export default {
name: "useActivityStepThree",
- data() {
+ data () {
return {
indeterminate: false,
allSelect: false,
@@ -56,7 +66,7 @@ export default {
props: {
isModify: Boolean
},
- mounted() {
+ mounted () {
this.getShopInfo();
let _this = this;
if (store.getters.useData.stores) {
@@ -66,7 +76,7 @@ export default {
}
},
methods: {
- handleCheckAll() {
+ handleCheckAll () {
let _this = this;
if (this.indeterminate) {
this.allSelect = false;
@@ -94,13 +104,14 @@ export default {
}
});
},
- doSearch(e) {
+ doSearch (e) {
const keyword = e.target.value;
let that = this;
that.block = 50;
that.shopList = that.orginShopList;
if (keyword.length > 0) {
that.shopList = that._.filter(that.shopList, item => {
+ console.log(item.label, keyword)
return item.label.indexOf(keyword) >= 0;
});
} else {
@@ -108,7 +119,7 @@ export default {
}
this.isSelect = this._.filter(this.isSelect, item => item);
},
- onChange(data) {
+ onChange (data) {
let _this = this;
data = this._.filter(data, item => item);
if (data.length === this.shopListData.length) {
@@ -131,10 +142,10 @@ export default {
}
});
},
- loadMore() {
+ loadMore () {
this.block += 50;
},
- getShopInfo() {
+ getShopInfo () {
let that = this;
let companyIds = [];
this.companys.forEach(item => {
@@ -149,7 +160,7 @@ export default {
data.scheduleId = null;
}
that.loading = true;
- ActivityManager.getShop(data, function(data) {
+ ActivityManager.getShop(data, function (data) {
that.shopList = [];
that.shopListData = data.data.results;
if (store.getters.useData.stores.length == that.shopListData.length) {
diff --git a/src/pages/activity/useTable.vue b/src/pages/activity/useTable.vue
index b195c82..96eb9f7 100644
--- a/src/pages/activity/useTable.vue
+++ b/src/pages/activity/useTable.vue
@@ -78,6 +78,10 @@ export default {
isModify: {
type: Boolean,
default: false
+ },
+ beginStep: {
+ type: Number,
+ default: 1
}
},
watch: {
diff --git a/src/pages/shop/IncreaseWelcomeEdit.vue b/src/pages/shop/IncreaseWelcomeEdit.vue
index b5d23ee..8eae524 100644
--- a/src/pages/shop/IncreaseWelcomeEdit.vue
+++ b/src/pages/shop/IncreaseWelcomeEdit.vue
@@ -1,21 +1,336 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/pages/shop/IncreaseWelcomeList.vue b/src/pages/shop/IncreaseWelcomeList.vue
index fbb5e42..5867173 100644
--- a/src/pages/shop/IncreaseWelcomeList.vue
+++ b/src/pages/shop/IncreaseWelcomeList.vue
@@ -100,7 +100,7 @@ export default {
},
// 新增或修改
handleEdit (row) {
- this.$router.push({ path: "/shop/increase/welcome/edit", query: row.id })
+ this.$router.push({ path: "/shop/increase/welcome/edit", params: { id: row.id } })
},
// 删除
handleDelete (row) {
diff --git a/src/store/modules/activity.js b/src/store/modules/activity.js
index cac4cc5..d63db8a 100644
--- a/src/store/modules/activity.js
+++ b/src/store/modules/activity.js
@@ -1,54 +1,56 @@
-import * as types from "./mutation-type";
+import * as types from './mutation-type'
const activity = {
state: {
useData: {
- beginTime: "",
- endTime: "",
+ beginTime: '',
+ endTime: '',
id: null,
- name: "",
+ name: '',
params: [],
scheduleId: null,
+ categoryId: 0,
+ categoryCode: 'promotion',
stores: [],
company: [],
},
useModal: false,
- id: "",
+ id: '',
store: [],
},
mutations: {
[types.SET_useData](state, useData) {
- state.useData = useData;
+ state.useData = useData
},
[types.RSET_useData](state) {
state.useData = {
- beginTime: "",
- endTime: "",
+ beginTime: '',
+ endTime: '',
id: null,
- name: "",
+ name: '',
params: [],
scheduleId: null,
stores: [],
company: [],
- };
+ }
},
[types.SET_useModal](state, useModal) {
- state.useModal = useModal;
+ state.useModal = useModal
},
[types.SET_ID](state, id) {
- state.id = id;
+ state.id = id
},
},
actions: {},
getters: {
useData: (state) => {
- return state.useData;
+ return state.useData
},
useModal: (state) => {
- return state.useModal;
+ return state.useModal
},
id: (state) => {
- return state.id;
+ return state.id
},
},
-};
-export default activity;
+}
+export default activity
diff --git a/src/utils/Common.js b/src/utils/Common.js
index 4e8a214..17bb576 100644
--- a/src/utils/Common.js
+++ b/src/utils/Common.js
@@ -28,7 +28,25 @@ export function formatDate(dt) {
return year + '-' + month + '-' + day
}
+export function isURL(str_url) {
+ // 验证url
+ var strRegex =
+ '^((https|http)?://)' +
+ "?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?" + // ftp的user@
+ '(([0-9]{1,3}.){3}[0-9]{1,3}' + // IP形式的URL- 199.194.52.184
+ '|' + // 允许IP和DOMAIN(域名)
+ "([0-9a-z_!~*'()-]+.)*" + // 域名- www.
+ '([0-9a-z][0-9a-z-]{0,61})?[0-9a-z].' + // 二级域名
+ '[a-z]{2,6})' + // first level domain- .com or .museum
+ '(:[0-9]{1,4})?' + // 端口- :80
+ '((/?)|' + // a slash isn't required if there is no file name
+ "(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$"
+ var re = new RegExp(strRegex)
+ return re.test(str_url)
+}
+
export default {
goToLogin,
formatDate,
+ isURL,
}