promise的链式调用一定要跑一定要return一个对象,该对象自动会包装成promise,不然下一个then语句就不能跑起来
Promise.all([
Bridge.getDeviceId(),
Bridge.getExtInfo()
]).then(vals => {
const deviceId = vals[0]
const extInfo = vals[1]
return Util.ajax({
url: '/act-core/signUp/insertSignUp',
server: 'springcloud_operate',
needBlackBox: true,
tokenKey: 'MOBILE',
data: Util.assign({}, this.signUpInfo, {
ACTIVITY_ID: Util.AID,
CITY_CODE: this.urlCityCode,
cv: Util.CV,
extInfo: JSON.stringify(extInfo),
deviceId: deviceId,
AGENT_NO: this.agentNo,
channelType: '02',
jsonFlag: 'Y',
requestMethod: 'insertSignUpInfo',
inputType: '2',
regionCode: '',
empPhone: '',
clientType: '',
})
})
}).then(() => {
Bridge.addRecord(`4060101-${Util.AID}`, `406010102-${Util.AID}`)
// Util.alert('您已成功报名了该活动,谢谢您的参与!').then(this.afterSigned) // NOTE:原积分逻辑,刘璇已删除
this.afterSigned()
}).catch(() => {
Bridge.addRecord(`4060101-${Util.AID}`, `406010103-${Util.AID}`)
})