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/
相關文章
相關標籤/搜索