es6使用过程中的心得
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了es6使用过程中的心得相关的知识,希望对你有一定的参考价值。
//定义一个变量 platform_id
const platform_id = $(‘#platform_id‘).val()
async.send(‘/‘+platform_id+‘/password-back‘, res, function(data) { // 这里黄色部分也可以写成 `/${plamform_id}/password-back`
const {
message,
status,
} = data
if(status === 1) {
window.location.href = `/${platform_id}/sign?url=1` //跳转到该链接
}
})
可以看看10个最佳es6特性: https://blog.fundebug.com/2017/08/21/10-best-es6-feature/
以上是关于es6使用过程中的心得的主要内容,如果未能解决你的问题,请参考以下文章