 }
    },

    /**
     * 调用有道翻译
     *
     * @param query 翻译内容
     */
    async translateYoudao(query) {
      if (!this.youdao.appKey || !this.youdao.appSecret) {
        console.error('有道AppKey或AppSecret未配置');
        return [];
      }

      const curtime = Math.round(new Date().getTime() / 1000);
      const sign = this.buildSign(query, curtime);
      const url = 'https://openapi.youdao.com/api';
      const data = {
        q: query,
        appKey: this.youdao.appK