Commit 1d45a626 by caoyanzhi

Merge branch 'bugfix/活动创建bug' into dev

# Conflicts:
#	dist/index.html
#	dist/static/js/3.5ed4ac4c84ca15ea7d59.js
#	dist/static/js/3.77e1902aa274d3d46610.js
#	dist/static/js/3.83c7b0c9ac23e5816596.js
#	dist/static/js/manifest.9762ad3567be30629c38.js
parents 186350cc 8629b68f
<<<<<<< HEAD
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title></title><link href=./static/css/app.361a06bbc6e645acd023c8bcb543cd03.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app><div class=el-loading-spinner style="width: 98%;"><svg viewBox="25 25 50 50" class=circular><circle cx=50 cy=50 r=20 fill=none class=path></circle></svg></div></div><script>(function() {
=======
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title></title><link href=./static/css/app.9c98d69f503faa873513a6ebdd8950c9.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app><div class=el-loading-spinner style="width: 98%;"><svg viewBox="25 25 50 50" class=circular><circle cx=50 cy=50 r=20 fill=none class=path></circle></svg></div></div><script>(function() {
>>>>>>> bugfix/活动创建bug
var src = '/component/static/import-component.js?timestrap=' + new Date().getTime();
var host = window.location.host;
host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'gicdev.demogic.com' : host;
document.write('<script src="//' + host + src + '"><\/script>');
})();</script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.10.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script type=text/javascript src=./static/js/manifest.588c1644be17598a31bf.js></script><script type=text/javascript src=./static/js/vendor.9544ccf6dd154a9fd130.js></script><script type=text/javascript src=./static/js/app.bbfbc6705314535a50ea.js></script></body></html>
\ No newline at end of file
<<<<<<< HEAD
})();</script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.10.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script type=text/javascript src=./static/js/manifest.588c1644be17598a31bf.js></script><script type=text/javascript src=./static/js/vendor.9544ccf6dd154a9fd130.js></script><script type=text/javascript src=./static/js/app.bbfbc6705314535a50ea.js></script></body></html>
=======
})();</script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.10.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script type=text/javascript src=./static/js/manifest.9762ad3567be30629c38.js></script><script type=text/javascript src=./static/js/vendor.9544ccf6dd154a9fd130.js></script><script type=text/javascript src=./static/js/app.7c385e40c6a1f53565e9.js></script></body></html>
>>>>>>> bugfix/活动创建bug
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,a);b.length;)b.shift()();if(a)for(d=0;d<a.length;d++)u=o(o.s=a[d]);return u};var r={},t={16:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"972fd2513f77a5907c73",1:"3d4d814fa62b6dc93c2b",2:"723c8aba5a6f697ca278",3:"5ed4ac4c84ca15ea7d59",4:"f03b954743e0ba49ef60",5:"33478b4d2e3e77d8002c",6:"78ea18443b9878f553ab",7:"cbfb1c1422fe6c812024",8:"891bbc4365b8362d5195",9:"7cc1b38988e254182ad8",10:"f82027d73a741225715e",11:"99b3a44189807b8a4b27",12:"2deb3f3fa46a025b2979",13:"c56e738cf2686e837bd8"}[e]+".js";var f=setTimeout(i,12e4);function i(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=i,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -118,6 +118,7 @@ import baseConfig from '@/components/active-config/base-config.vue';
<el-button
type="primary"
@click="submitForm('baseForm')"
:loading="loading"
>下一步</el-button>
</el-form-item>
</el-form>
......@@ -126,7 +127,6 @@ import baseConfig from '@/components/active-config/base-config.vue';
<script>
import limitInput from '@/components/limit-input.vue';
import { getRequest, postRequest } from '@/api/api';
import { _debounce } from '@/common/js/public';
// import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import timeFormat from '@/common/js/timeFormat';
......@@ -161,6 +161,7 @@ export default {
}
};
return {
loading: false,
activeInfoData: {
activityId: '',
parentGoalId: '',
......@@ -279,7 +280,7 @@ export default {
/**
* 下一步
*/
submitForm: _debounce(function(formName) {
submitForm(formName) {
const that = this;
that.$refs[formName].validate(valid => {
if (valid) {
......@@ -294,7 +295,7 @@ export default {
return false;
}
});
},500),
},
postSave() {
const that = this;
if (!that.activeInfoData.dateRange) {
......@@ -317,6 +318,7 @@ export default {
cardCoupName: that.activeInfoData.cardCoupName,
router: that.activeInfoData.router&&that.activeInfoData.router.length?JSON.stringify(that.activeInfoData.router):null
};
this.loading = true;
postRequest('/sharing-core-web/edit-activity-base-info', para)
.then(res => {
let resData = res.data;
......@@ -333,6 +335,10 @@ export default {
duration: 2500,
message: error.message
});
}).finally(() => {
setTimeout(() => {
this.loading = false;
}, 500)
});
},
/**
......
......@@ -65,6 +65,7 @@ import cardConfig from '@/components/active-config/card-config.vue';
<el-button
type="primary"
@click="submitForm('cardForm')"
:loading="loading"
>下一步</el-button>
</el-form-item>
</el-form>
......@@ -90,7 +91,6 @@ import limitInput from '@/components/limit-input.vue';
import singleUpload from '@/components/single-upload.vue';
// import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public';
import { getRequest, postRequest } from '@/api/api';
export default {
name: 'card-config',
......@@ -101,6 +101,7 @@ export default {
},
data() {
return {
loading: false,
activeInfoData: {
appletTitle: '',
playBillUrl: '',
......@@ -132,7 +133,7 @@ export default {
/**
* 下一步
*/
submitForm: _debounce(function(formName) {
submitForm(formName) {
const that = this;
that.$refs[formName].validate(valid => {
if (valid) {
......@@ -146,7 +147,7 @@ export default {
return false;
}
});
},500),
},
postSave() {
const that = this;
let para = {
......@@ -155,6 +156,7 @@ export default {
appletTitle: that.activeInfoData.appletTitle,
fileName: !!that.activeInfoData.fileName? that.activeInfoData.fileName: ''
};
this.loading = true;
postRequest('/sharing-core-web/edit-activity-applet', para)
.then(res => {
let resData = res.data;
......@@ -170,6 +172,10 @@ export default {
duration: 2500,
message: error.message
});
}).finally(() => {
setTimeout(() => {
this.loading = false;
}, 500)
});
},
/**
......
......@@ -123,6 +123,7 @@ import centerConfig from '@/components/active-config/center-config.vue';
<el-button
type="primary"
@click="submitForm('centerForm')"
:loading="loading"
>下一步</el-button>
</el-form-item>
</el-form>
......@@ -173,9 +174,6 @@ import appTemplate from '@/components/active-config/app-template.vue';
// import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import {
_debounce
} from '@/common/js/public';
import {
getRequest,
postRequest
} from '@/api/api';
......@@ -197,6 +195,7 @@ export default {
}
};
return {
loading: false,
activeInfoData: {
headUrl: '',
shareBackColor: '#1890ff',
......@@ -312,7 +311,7 @@ export default {
/**
* 下一步
*/
submitForm: _debounce(function(formName) {
submitForm(formName) {
const that = this;
that.$refs[formName].validate(valid => {
if (valid) {
......@@ -326,7 +325,7 @@ export default {
return false;
}
});
}, 500),
},
postSave() {
const that = this;
let para = {
......@@ -339,6 +338,7 @@ export default {
activityIntroduceDetail: that.activeInfoData.activityIntroduceMode == 2 ? JSON.stringify(that.activeInfoData.activityIntroduceDetail) : that.activeInfoData.activityIntroduceDetail,
activityIntroduceId: that.activeInfoData.activityIntroduceId
};
this.loading = true;
postRequest('/sharing-core-web/edit-activity-center', para)
.then(res => {
let resData = res.data;
......@@ -354,6 +354,10 @@ export default {
duration: 2500,
message: error.message
});
}).finally(() => {
setTimeout(() => {
this.loading = false;
}, 500)
});
},
/**
......
......@@ -155,6 +155,7 @@ import posterConfig from '@/components/active-config/poster-config.vue';
<el-button
type="primary"
@click="submitForm('posterForm')"
:loading="loading"
>下一步</el-button>
</el-form-item>
</el-form>
......@@ -194,7 +195,6 @@ import postUpload from '@/components/post-upload.vue';
import VueQrcode from '@chenfengyuan/vue-qrcode';
// import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public';
import { getRequest, postRequest } from '@/api/api';
export default {
name: 'poster-config',
......@@ -206,6 +206,7 @@ export default {
},
data() {
return {
loading: false,
activeInfoData: {
playBillUrl: '',
templateType: '1',
......@@ -269,7 +270,7 @@ export default {
/**
* 下一步
*/
submitForm: _debounce(function(formName) {
submitForm(formName) {
const that = this;
that.$refs[formName].validate(valid => {
......@@ -284,7 +285,7 @@ export default {
return false;
}
});
},500),
},
postSave() {
const that = this;
let para = {
......@@ -295,6 +296,7 @@ export default {
qrcodeFrontColor: that.activeInfoData.qrcodeFrontColor,
qrcodePadding: that.activeInfoData.qrcodePadding
};
this.loading = true;
postRequest('/sharing-core-web/edit-activity-share', para)
.then(res => {
let resData = res.data;
......@@ -310,6 +312,10 @@ export default {
duration: 2500,
message: error.message
});
}).finally(() => {
setTimeout(() => {
this.loading = false;
}, 500)
});
},
/**
......
......@@ -322,6 +322,7 @@ import rewardConfig from '@/components/active-config/reward-config.vue';
v-if="!$route.query.hasOwnProperty('editFlag')"
type="primary"
@click="submitForm('rewardForm')"
:loading="loading"
> {{$route.query.hasOwnProperty('activityId') ?'确认编辑':'确认新建'}}</el-button>
<el-button
v-if="$route.query.hasOwnProperty('editFlag')"
......@@ -340,7 +341,6 @@ import entryAward from '@/components/active-config/configs/entry-award.vue';
import competitionAward from '@/components/active-config/configs/competition-award.vue';
import inviteeReward from '@/components/active-config/configs/invitee-reward.vue';
import fraudControl from '@/components/active-config/configs/fraud-control.vue';
import { _debounce } from '@/common/js/public';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
......@@ -358,6 +358,7 @@ export default {
},
data() {
return {
loading: false,
basePath: [],
stepObj: {
'服务号关注': 1 ,// 1服务号关注,2活动营销页访问奖励,3会员认证奖励,4游戏参与奖励,5卡券领取奖励6,消费奖励
......@@ -1390,7 +1391,7 @@ export default {
/**
* 下一步
*/
submitForm: _debounce(function(formName) {
submitForm(formName) {
const that = this;
that.$refs[formName].validate(valid => {
if (valid) {
......@@ -1399,6 +1400,7 @@ export default {
that.$router.push(`/shareIndex`);
return false
}
this.loading = true;
if (that.activeInfoData.awardMode == 1) {
that.singleCheck(); // 判断单次
} else {
......@@ -1408,37 +1410,43 @@ export default {
return false;
}
});
}, 500),
},
async singleCheck() {
const that = this;
const flag = that.basePath.map(ele => ele.transName).includes('消费') ? await that.$refs.singleConsume.submitForm() : true;
if (flag.hasOwnProperty('flag')&& !flag.flag) {
showMsg.showmsg(flag.msg, 'warning');
this.loading = false;
return false;
}
const spot = that.activeInfoData.instantAwardFlag == 1 ? await that.$refs.singleSpot.submitForm() : true;
if (spot.hasOwnProperty('flag')&& !spot.flag) {
showMsg.showmsg(spot.msg, 'warning');
this.loading = false;
return false;
}
const entry = that.activeInfoData.passAwardFlag == 1 ? await that.$refs.singleEntry.submitForm() : true;
if (entry.hasOwnProperty('flag')&& !entry.flag) {
showMsg.showmsg(entry.msg, 'warning');
this.loading = false;
return false;
}
const competition = that.activeInfoData.competitionAwardFlag == 1 ? await that.$refs.singleCompetition.submitForm() : true;
if (competition.hasOwnProperty('flag')&& !competition.flag) {
showMsg.showmsg(competition.msg, 'warning');
this.loading = false;
return false;
}
const invitee = await that.$refs.singleInvitee.submitForm();
if (invitee.hasOwnProperty('flag')&& !invitee.flag) {
showMsg.showmsg(invitee.msg, 'warning');
this.loading = false;
return false;
}
const freeze = that.basePath.map(ele => ele.transName).includes('消费') ? await that.$refs.singleFreeze.submitForm() : true;
if (freeze.hasOwnProperty('flag')&& !freeze.flag) {
showMsg.showmsg(freeze.msg, 'warning');
this.loading = false;
return false;
}
// console.log('单次数据', that.activeInfoData);
......@@ -1626,6 +1634,7 @@ export default {
}
if (flag.hasOwnProperty('flag')&& !flag.flag) {
showMsg.showmsg(flag.msg, 'warning');
this.loading = false;
return false;
}
let spot = true;
......@@ -1640,6 +1649,7 @@ export default {
}
if (spot.hasOwnProperty('flag')&& !spot.flag) {
showMsg.showmsg(spot.msg, 'warning');
this.loading = false;
return false;
}
let entry = true;
......@@ -1653,6 +1663,7 @@ export default {
}
if (entry.hasOwnProperty('flag')&& !entry.flag) {
showMsg.showmsg(entry.msg, 'warning');
this.loading = false;
return false;
}
let competition = true;
......@@ -1666,6 +1677,7 @@ export default {
}
if (competition.hasOwnProperty('flag')&& !competition.flag) {
showMsg.showmsg(competition.msg, 'warning');
this.loading = false;
return false;
}
let invitee = true;
......@@ -1679,6 +1691,7 @@ export default {
}
if (invitee.hasOwnProperty('flag')&& !invitee.flag) {
showMsg.showmsg(invitee.msg, 'warning');
this.loading = false;
return false;
}
let freeze = true;
......@@ -1692,6 +1705,7 @@ export default {
}
if (freeze.hasOwnProperty('flag')&& !freeze.flag) {
showMsg.showmsg(freeze.msg, 'warning');
this.loading = false;
return false;
}
// true--->1; false--->0
......@@ -1759,6 +1773,10 @@ export default {
duration: 2500,
message: error.message
});
}).finally(() => {
setTimeout(() => {
this.loading = false;
}, 500)
});
},
/**
......
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