const axios = require('axios')const md5 = require('md5')let str = { from: '', to: 'en', yd: 'https://openapi.youdao.com/api', appKey: '4ac7903d8a0aa4fc', q: '你好', salt: new Date().getTime(), key: 'dsBDw9WHoYtSeW3B0WdSaAHIsexwlzz6', }let strs = str.appKey + str.q + str.salt + str.keylet sign = md5(strs)console.log(sign)let url = `${str.yd}?q=${str.q}&from=${str.from}&to=${str.to}&appKey=${str.appKey}&salt=${str.salt}&sign=${sign}`axios.post(encodeURI(url)).then(function(a) { console.log(a.data)})复制代码