DocumentContent.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <div class="document-content">
  3. <p class="headline">请求参数说明</p>
  4. <div class="content-box">
  5. <p class="subhead">
  6. 备注:请求头里面需要设置传输格式:Content-type:application/json
  7. </p>
  8. <div class="table-box">
  9. <table class="table">
  10. <tr>
  11. <th>参数名称</th>
  12. <th>参数说明</th>
  13. <th>备注</th>
  14. </tr>
  15. <tr v-for="item in tableList" :key="item.key">
  16. <td>{{ item.key }}</td>
  17. <td>{{ item.explain }}</td>
  18. <td :class="{ 'required-color': item.required }">
  19. <p>{{ item.required ? "*必填" : "选填" }}</p>
  20. <p>{{ item.remark }}</p>
  21. </td>
  22. </tr>
  23. </table>
  24. </div>
  25. <div class="param-explain">
  26. <p class="explain-title">请求参数信息说明:</p>
  27. <div class="explain-value">
  28. <p>{</p>
  29. <p>"sign": "de7cb2fb99756c06214fc78252d36484",</p>
  30. <p>"timestamp": "1520496753938",</p>
  31. <p>"phone": "15100000055,15100000044",</p>
  32. <p>"extend": "123",</p>
  33. <p>"appcode": "test",</p>
  34. <p>"appkey": "test",</p>
  35. <p>"msg": "你好,测试"</p>
  36. <p>}</p>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </template>
  42. <script setup>
  43. import {} from "vue";
  44. // table 数据
  45. const tableList = ref([
  46. {
  47. key: "appkey",
  48. required: true,
  49. explain: "应用key",
  50. remark: "由供应商提供",
  51. },
  52. {
  53. key: "appcode",
  54. required: true,
  55. explain: "应用代码",
  56. remark: "由供应商提供",
  57. },
  58. {
  59. key: "sign",
  60. required: true,
  61. explain: "签名验证MD5(appkey+appsecret+timestamp)",
  62. remark:
  63. "秘钥appsecret由供应商提供由应用key+秘钥+时间戳经过md5加密后的32位16进制小写字符串(拼接过程不包括+)",
  64. },
  65. {
  66. key: "uid",
  67. required: false,
  68. explain: "String",
  69. remark: "多个号码用半角英文逗号隔开,一次最多不能超过1000个",
  70. },
  71. {
  72. key: "phone",
  73. required: true,
  74. explain: "手机号码",
  75. remark: "由供应商提供",
  76. },
  77. {
  78. key: "msg",
  79. required: true,
  80. explain: "下发短信内容",
  81. remark: "短信内容长度不超过1000个字(包括1000字),每个英文或阿拉伯字符算1个字",
  82. },
  83. {
  84. key: "timestamp",
  85. required: true,
  86. explain: "时间戳",
  87. remark: "时间戳(精确到毫秒),当前时间5分钟内请求有效",
  88. },
  89. {
  90. key: "extend",
  91. required: true,
  92. explain:
  93. "扩展号,该参数是显示在接收手机上的主叫尾号,可用于上行信息匹配,若不填写则认为不进行扩展(不填写不影响发送)",
  94. remark:
  95. "可为空数字,如:001,119等通道本身主叫号加上用户自己分配扩展号的总长度不能超过20位",
  96. },
  97. ]);
  98. const param = {
  99. sign: "de7cb2fb99756c06214fc78252d36484",
  100. timestamp: "1520496753938",
  101. phone: "15100000055,15100000044",
  102. extend: "123",
  103. appcode: "test",
  104. appkey: "test",
  105. msg: "你好,测试",
  106. };
  107. </script>
  108. <style scoped lang="scss">
  109. .document-content {
  110. width: 100%;
  111. .headline {
  112. font-size: 32px;
  113. font-family: Microsoft YaHei, Microsoft YaHei-Bold;
  114. font-weight: 700;
  115. color: #1a1a1a;
  116. border-bottom: 1px solid #e6e6e6;
  117. padding-bottom: var(--size-20);
  118. }
  119. .content-box {
  120. padding-top: 30px;
  121. .subhead {
  122. font-size: var(--size-16);
  123. color: var(--color-02);
  124. }
  125. .table-box {
  126. width: 893px;
  127. padding: var(--size-20) 0;
  128. .table {
  129. width: 100%;
  130. tr th,
  131. tr td {
  132. padding: var(--size-14);
  133. }
  134. tr th {
  135. background: #ebf2fc;
  136. font-size: 16px;
  137. font-family: Microsoft YaHei, Microsoft YaHei-Bold;
  138. font-weight: 700;
  139. color: #006efe;
  140. }
  141. tr td {
  142. font-size: 14px;
  143. font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  144. font-weight: 400;
  145. text-align: left;
  146. color: #666666;
  147. line-height: 22px;
  148. }
  149. .required-color {
  150. color: var(--color-09);
  151. }
  152. }
  153. }
  154. .param-explain {
  155. padding: var(--size-10) 0 var(--size-40);
  156. .explain-title {
  157. font-size: 24px;
  158. font-family: Microsoft YaHei, Microsoft YaHei-Bold;
  159. font-weight: 700;
  160. text-align: left;
  161. color: #1a1a1a;
  162. }
  163. .explain-value {
  164. font-size: 14px;
  165. font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  166. font-weight: 400;
  167. text-align: left;
  168. color: #666666;
  169. line-height: 24px;
  170. }
  171. }
  172. }
  173. }
  174. table,
  175. th,
  176. td {
  177. border: 1px solid #e6e6e6;
  178. border-collapse: collapse; /* 移除单元格之间的间隔 */
  179. }
  180. </style>