<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Md5 on Margrop Blog</title>
    <link>https://blog.margrop.net/en/tag/md5/</link>
    <description>Recent content in Md5 on Margrop Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Sat, 06 Feb 2021 09:13:39 +0800</lastBuildDate>
    <atom:link href="https://blog.margrop.net/en/tag/md5/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Swagger-UI adds project dependencies and modifies index.html</title>
      <link>https://blog.margrop.net/en/post/swagger-ui-add-md5/</link>
      <pubDate>Sat, 06 Feb 2021 09:13:39 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/swagger-ui-add-md5/</guid>
      <description>swagger-bundle packaging First enter the swagger-ui directory&#xA;npm install npm run build How to modify The url in index.html is modified to:&#xA;and add functions&#xA;url: &amp;#34;/v2/api-docs?group=&amp;#34; + getUrlParam(&amp;#34;group&amp;#34;), function getUrlParam(name) { var reg = new RegExp(&amp;#34;(^|&amp;amp;)&amp;#34; + name + &amp;#34;=([^&amp;amp;]*)(&amp;amp;|$)&amp;#34;); //构造一个含有目标参数的正则表达式对象 var r = window.location.search.substr(1).match(reg); //匹配目标参数 if (r != null) return unescape(r[2]); return &amp;#34;&amp;#34;; //返回参数值 } </description>
    </item>
    <item>
      <title>How to add MD5 verification and project dependencies in Swagger-JS</title>
      <link>https://blog.margrop.net/en/post/swagger-js-add-md5/</link>
      <pubDate>Sat, 06 Feb 2021 09:05:25 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/swagger-js-add-md5/</guid>
      <description>swagger-bundle packaging First enter the swagger-js directory&#xA;npm install npm run build How to modify Add code to the src/execute.js file:&#xA;Add code before the export function buildRequest({ method class mergeInQueryOrForm(req) statement:&#xA;package.json needs to add support for cross-platform compilation&#xA;import md5 from &amp;#39;md5&amp;#39;; //calcSn for server var req = request console.log(req.body); if (req.body) { let bodyObj = JSON.parse(req.body); bodyObj[&amp;#39;header&amp;#39;][&amp;#39;token&amp;#39;] = req[&amp;#39;headers&amp;#39;][&amp;#39;token&amp;#39;]; bodyObj[&amp;#39;header&amp;#39;][&amp;#39;snTime&amp;#39;] = (new Date()).valueOf(); let allData = Object.assign(JSON.parse(JSON.stringify(bodyObj[&amp;#39;body&amp;#39;])), { token: bodyObj[&amp;#39;header&amp;#39;][&amp;#39;token&amp;#39;], snTime: bodyObj[&amp;#39;header&amp;#39;][&amp;#39;snTime&amp;#39;] }); bodyObj[&amp;#39;header&amp;#39;][&amp;#39;sn&amp;#39;] = calcSn(allData); req.</description>
    </item>
  </channel>
</rss>
