Browse Source

修改路由base,接口文档改为地址

dujingxian 4 years ago
parent
commit
e1c0af228c
2 changed files with 15 additions and 194 deletions
  1. 14 193
      src/pages/subPages/interfaceDoc.vue
  2. 1 1
      src/router/index.js

+ 14 - 193
src/pages/subPages/interfaceDoc.vue

@@ -1,170 +1,8 @@
 <template>
 <template>
   <div class="interfaceDoc">
   <div class="interfaceDoc">
     <el-card>
     <el-card>
-      <h1 style="font-size: 18px;">接 口 规 范</h1>
-      <h4>验签规则:</h4>
-      <p>
-        签名(sign字段)生成方式:将所有参数名按照ASCII自然排序,并拼接成key1=value&key2=value----,末尾加上“&key=密钥”,
-        然后进行MD5生成sign。如果字段值为空,拼接的时候需要去掉,并对各个字段的值做URL编码。
-      </p>
-      <p>验签方式同上</p>
-      <p>提交格式:使用POST提交form表单格式,提交的字段里面不要带key。</p>
-      <p>服务器返回数据:json格式</p>
-      <p>异步回调方式:POST表单请求异步地址</p><br/>
-      <h4>网关地址:</h4>
-      <p>网关地址: https://www.xyzshops.cn/mobile/index.php</p><br/>
-      <h4>可充值商品列表信息:</h4>
-        <pre>
-          描述:获取平台各种类型的充值卡支持的充值面额。
-          请求参数:
-              act : refill 固定填为refill
-              op :  固定为goods
-              mchid : 组织机构号(商户号)
-              sign : 签名(不参与签名的字段,参考签名方法)
-          返回:
-              {
-                "code":200,
-                "message":"成功",
-                "datas":{
-                    "sinopec":[
-                      100,
-                      200,
-                      500,
-                      1000,
-                      2000
-                    ],
-                    "chinamobile":[
-                      50,
-                      100,
-                      200
-                    ],
-                    "chinaunicom":[
-                      50,
-                      100,
-                      200
-                    ],
-                    "chinatelecom":[
-                      50,
-                      100,
-                      200
-                    ]
-                }
-              }
-        </pre>
-      <h4>充值接口:</h4>
-      <pre>
-        充值油卡和话费统一接口。
-        请求参数:
-            act: refill 固定填为refill
-            op: add  固定为add
-            mchid: 组织机构号(商户号)
-            cardno: 卡号
-            amount: 充值金额(固定金额,如100,200,500,1000等,详细请查看后台)
-            order_sn: 商户自己可唯一标记订单的序列号。
-            notifyurl: 异步通知地址
-            card_name:持卡人姓名(中石油需要填写,其余的不需要)
-            idcard: 持卡人身份证(中石油需要填写,其余的不需要)
-            sign: 签名(不参与签名的字段,参考签名方法)
-        返回参数:
-            code: 200代表成功,非200代表失败
-            message: code非200时,返回出错信息.
-      </pre>
-      <h4>充值成功后异步通知:</h4>
-      <pre>
-        充值油卡和话费统一接口。
-        请求异步地址的参数:
-            mchid: 组织机构号(商户号)
-            order_sn: 商户自己可唯一标记订单的序列号。
-            amount: 充值金额(固定金额,如100,200,500,1000等,详细请查看后台)
-            cardno: 卡号
-            trade_no: 平台唯一交易号,和提交的成功时返回对应。
-            card_name:持卡人姓名(中石油需要填写,其余的不需要)
-            idcard: 持卡人身份证(中石油需要填写,其余的不需要)
-            official_sn: 官方流水号
-            message: 失败原因
-            state:SUCCESS表示充值成功,CANCEL表示充值失败订单取消.
-            sign: 签名(不参与签名的字段,参考签名方法)
-        确认接受异步通知返回:
-            直接返回大写:SUCCESS
-            如未返回SUCCESS,则2,4,5,16,32……秒间隔通知,每种时间重复5次,累积通知80次后,取消通知。
-      </pre>
-      <h4>交易查询接口:</h4>
-      <pre>
-        通过商户自己的订单号查询订单状态。
-        请求参数:
-            act: refill 固定填为refill
-            op: query
-            mchid: 组织机构号(商户号)
-            order_sn: 商户订单序列号
-            sign: 签名(不参与签名的字段,参考签名方法)
-
-        返回参数:
-            code: 200代表成功,非200代表失败
-            message: code非200时,返回出错信息.
-            datas: 数组格式,里面包含交易信息。
-        示例:
-            {
-              "code":200,
-              "message":"成功",
-              "datas" : {
-                  "mchid":"1",
-                  "trade_no" :"230660948104151671",
-                  "order_sn" :"13281476",
-                  "card_no" :"1000111100020445281",
-                  "card_type" :"2",
-                  "refill_amount":"100.00",
-                  "order_amount":"97.80",
-                  "order_time" :"1607604106",
-                  "success_time" :0,
-                  "order_state" :"20"
-              }
-            }
-        其中:
-            card_type:
-                1, PetroChina
-                2, Sinopec
-                4, ChinaMobile
-                5, ChinaUnicom
-                6, ChinaTelecom
-            refill_amount: 充值金额
-            order_amount: 扣款金额
-            order_time: 下单时间
-            success_time: 确认是否成功时间,运营商回调时间。
-            order_state:
-                0,订单已经取消,充值失败会取消订单。
-                10,新订单
-                20,已经支付
-                30,正在处理
-                40,充值成功
-      </pre>
-      <h4>获取余额接口:</h4>
-      <pre>
-        获取商户余额接口。
-        请求参数:
-            act: refill 固定填为refill
-            op: balance  固定为balance
-            mchid: 组织机构号(商户号)
-            sign: 签名(不参与签名的字段,参考签名方法)
-        返回参数:
-            code: 200代表成功,非200代表失败
-            message: code非200时,返回出错信息
-            datas: 返回数据
-            balance:datas下数据,代表商户余额
-      </pre>
-      <h4>错误码说明:</h4>
-      <pre>
-        200:成功
-        201:参数验证错误,详情请看message。
-        202:找不到合适的通道
-        203:余额不足
-        204:充值失败
-        205:客户订单号重复或者为空
-        206:平台不支持该卡充值
-        207:今日充值额度已达上限
-
-        10021:商户未设置秘钥或签名错误
-        0:商户信息验证失败,详情请看message。
-      </pre>
+      <h1 style="font-size: 18px;">文档地址:</h1>
+      <a href="https://www.showdoc.com.cn/refill" target="_blank">https://www.showdoc.com.cn/refill</a>
     </el-card>
     </el-card>
   </div>
   </div>
 </template>
 </template>
@@ -176,41 +14,24 @@ export default {
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
+.interfaceDoc {
+  position: absolute;
+  left: 30%;
+  top: 30%;
+}
 .el-card {
 .el-card {
-  padding: 0 5%;
+  padding: 0 20px;/*no */
+  width: 500px;/*no */
 }
 }
 h1 {
 h1 {
   text-align: center;
   text-align: center;
   font-family: "Microsoft YaHei";
   font-family: "Microsoft YaHei";
-  margin-bottom: 20px;
-}
-h4 {
-  line-height: 36px; /*no */
-  font-size: 16px; /*no */
-  font-family: "Microsoft YaHei";
+  margin-bottom: 20px;/*no */
+  display: inline-block;
+  margin-right: 20px;/*no */
 }
 }
-h6 {
-  line-height: 32px; /*no */
-  font-family: "Microsoft YaHei";
-}
-p {
-  text-indent: 2em;
-  line-height: 32px; /*no */
-  font-size: 16px; /*no */
-  font-family: "Microsoft YaHei";
-}
-pre {
-  line-height: 32px; /*no */
-  font-size: 16px; /*no */
-  font-family: "Microsoft YaHei";
-  white-space: pre-wrap;       /* css-3 */
-  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
-  white-space: -pre-wrap;      /* Opera 4-6 */
-  white-space: -o-pre-wrap;    /* Opera 7 */
-  word-wrap: break-word;       /* Internet Explorer 5.5+ */
-  overflow: auto;
-  word-break: break-all;
-  word-wrap: break-word;
+a {
+  color: rgb(64, 158, 255);;
 }
 }
 </style>
 </style>
 <style>
 <style>

+ 1 - 1
src/router/index.js

@@ -170,7 +170,7 @@ Vue.use(VueRouter)
 const router = new VueRouter({
 const router = new VueRouter({
   routes,
   routes,
   mode: 'hash',
   mode: 'hash',
-  base: '/merchant'
+  base: '/mchsrv'
 })
 })
 /* 判断PC或移动端 */
 /* 判断PC或移动端 */
 function IsPC() {
 function IsPC() {