我可能无法解释dojo函数的头结构,但这是我正在寻找的这里是我现有的函数
createClient: function () {
var clientWizardData = this.getNewClientWizardData(),
clientSummaryFormData = clientWizardData.clientSummaryFormData,
subscribedProducts = clientSubscriptionFormData.products,
createClientRequest;
createClientRequest = {
"subscriptionMode": clientSubscriptionFormData.mode,
"products": subscribedProducts,
"subscriptionType": clientSubscriptionFormData.subscriptionType,
"subscriptionStartDate": formatters.toVPDateBoundedJSON(clientSubscriptionFormData.subscriptionFromDate, true),
"clientFinalised": clientSummaryFormData.isClientFinalise
};
},
我想把if条件放在createClientRequest
函数中
条件是这样的
if(toggleableFeatures.has(globals.toggleableFeatures.INCLUDE_EXCLUDE_ALIASES_ALTERNATIVE_SPELLING)){
"aliases": clientSubscriptionFormData.aliases,
"alternativeSpelling": clientSubscriptionFormData.alternativeSpelling,
"excludeLowQualityAkas": clientSubscriptionFormData.excludeLowQualityAkas,
"includeNativeAkas": clientSubscriptionFormData.includeNativeAkas
}else{
"excludeLowQualityAkas": clientSubscriptionFormData.excludeLowQualityAkas,
"includeNativeAkas": clientSubscriptionFormData.includeNativeAkas
}
有人能帮我一下语法吗,直接输入if else不起作用,我必须创建任何函数然后调用它吗?
1条答案
按热度按时间anauzrmj1#
像这样试试