Commit e01a6297 by crushh

update: dist

parent 87c8be27
......@@ -1192,7 +1192,9 @@ export default {
this.getCardDetail();
});
} else {
console.log(this.$route.meta.refresh)
this.$tips({ type: 'success', message: '新建卡券成功' });
this.$route.meta.refresh=true;
this.$router.push('/card/list');
}
} else {
......@@ -1558,6 +1560,9 @@ export default {
if (this.isAdd) {
this.$refs.storeCard.init();
}
if(this.isAdd||this.isCopy){
this.$route.meta.refresh=false;
}
},
created() {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券库', path: '/card/list' }, { name: '卡券详情', path: '' }]); // eslint-disable-line
......
......@@ -76,14 +76,12 @@ export default {
},
beforeRouteEnter(to, from, next) {
const {
meta: { type, path }
meta: { type, path, refresh }
} = from;
console.log(to);
console.log(from);
if (path !== to.meta.path) {
to.meta.refresh = true;
} else {
if (type === 'add') {
if ((type === 'add' || type === 'copy') && refresh) {
to.meta.refresh = true;
} else {
to.meta.refresh = false;
......@@ -94,7 +92,6 @@ export default {
activated() {
console.log('activated');
window.scrollTo(0, 0);
console.log(this.$route);
if (this.$route.meta.refresh) {
this.listParams = {
shelfId: '',
......@@ -106,8 +103,6 @@ export default {
showSelfFlag: '',
effectiveFlag: 0 // 1有效 0全部
};
} else {
// this.$route.meta.refresh = false;
}
this.getTableList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券库', path: '' }]); // eslint-disable-line
......@@ -141,7 +136,6 @@ export default {
return v;
}) || [];
this.total = res.result.totalCount;
console.log('getTableList');
} catch (err) {
if (err) {
console.log(err);
......
......@@ -31,8 +31,7 @@
</div>
<div class="card-d">
<p class="card-d-title ellipsis">
<span :style="`background:${data.cardColor}`">{{ data.cardType | dct }}</span
>{{ data.cardName }}
{{ data.cardName }}
</p>
<p class="card-d-time" v-if="data.cardEffectiveMode == 0">{{ time }}</p>
<p class="card-d-time ellipsis" v-if="data.cardEffectiveMode == 1">领取后{{ (data.startDay === 0 ? '当' : '第' + data.startDay) + '天,有效天数' + data.limitDay }}</p>
......@@ -69,12 +68,6 @@
<script>
import { formatDateTimeByType } from '@/utils/index';
const _cardType = {
0: { label: '抵金券', value: 0 },
1: { label: '折扣券', value: 1 },
2: { label: '兑换券', value: 2 }
// 3: { label: '其他券', value: 3 },
};
export default {
name: 'SendPreview',
......@@ -127,11 +120,6 @@ export default {
this.$emit('update:visible', false);
}
},
filters: {
dct(val) {
return _cardType[val].label || '--';
}
},
computed: {
time() {
const time = this.data.dateTime;
......
......@@ -326,7 +326,7 @@ export default {
async listTemplateVariables() {
this.loading = true;
try {
let res = await listTemplateVariables();
let res = await listTemplateVariables().finally(() => (this.loading = false));
if (res.errorCode === 0) {
const result = res.result;
this.options = Object.keys(result).map(v => ({ label: result[v], value: v }));
......@@ -361,10 +361,12 @@ export default {
},
// 获取商户卡券自动领取配置
getCardManualSetting() {
getCardManualSetting().then(res => {
this.couponAutoGetFlag = res.result.couponAutoGetFlag || 0;
this.couponAutoGetStock = res.result.couponAutoGetStock;
});
getCardManualSetting()
.then(res => {
this.couponAutoGetFlag = res.result.couponAutoGetFlag || 0;
this.couponAutoGetStock = res.result.couponAutoGetStock;
})
.finally(() => (this.loading = false));
},
// 获取ecm信息
async getEcmInfo(isResetTemplate = false) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment