人人商城

express.html 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. {template '_header'}
  2. <div class="page-heading">
  3. <h2>物流信息接口</h2>
  4. </div>
  5. <div class="alert alert-info">
  6. <p>提示:内置物流接口可能不稳定,您可申请/购买快递100正式接口(根据需求)</p>
  7. <p>类型:商城内置接口(可能不稳定); 免费接口(需要申请,相对稳定); 企业接口(收费,稳定性高)</p>
  8. </div>
  9. <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data">
  10. <div class="form-group">
  11. <label class="col-sm-2 control-label">接口类型</label>
  12. <div class="col-sm-9 col-xs-12">
  13. {ifp 'sysset.express.edit'}
  14. <label class="radio-inline"><input type="radio" class="toggle" data-show="" data-hide="type" name="isopen" value="0" {if empty($data['isopen'])}checked="checked"{/if} /> 商城内置接口</label>
  15. <label class="radio-inline"><input type="radio" class="toggle" data-show="type1" data-hide="type" name="isopen" value="1" {if $data['isopen']==1}checked="checked"{/if} /> 免费接口</label>
  16. <label class="radio-inline"><input type="radio" class="toggle" data-show="type2" data-hide="type" name="isopen" value="2" {if $data['isopen']==2}checked="checked"{/if} /> 企业接口</label>
  17. {else}
  18. <div class='form-control-static'>{php echo empty($data['isopen'])?"默认免费接口":"正式接口"}</div>
  19. {/if}
  20. </div>
  21. </div>
  22. <div class="form-group type type1 type2" {if empty($data['isopen'])}style="display: none"{/if}>
  23. <label class="col-sm-2 control-label" style="padding-top: 0;">授权密匙<br>(Key)</label>
  24. <div class="col-sm-9 col-xs-12">
  25. {ifp 'sysset.express.edit'}
  26. <input type="text" name="apikey" class="form-control" value="{$data['apikey']}"/>
  27. {else}
  28. <div class='form-control-static'>{$data['apikey']}</div>
  29. {/if}
  30. </div>
  31. </div>
  32. <div class="form-group type type2" {if $data['isopen']<2}style="display: none"{/if}>
  33. <label class="col-sm-2 control-label" style="padding-top: 0;">公司编号<br>(Customer)</label>
  34. <div class="col-sm-9 col-xs-12">
  35. {ifp 'sysset.express.edit'}
  36. <input type="text" name="customer" class="form-control" value="{$data['customer']}"/>
  37. {else}
  38. <div class='form-control-static'>{$data['customer']}</div>
  39. {/if}
  40. </div>
  41. </div>
  42. <div class="form-group type type1 type2" {if empty($data['isopen'])}style="display: none"{/if}>
  43. <label class="col-sm-2 control-label">数据缓存时间</label>
  44. <div class="col-sm-9 col-xs-12">
  45. {ifp 'sysset.express.edit'}
  46. <div class="input-group">
  47. <input type="text" name="cache" class="form-control" value="{php echo intval($data['cache'])}"/>
  48. <span class="input-group-addon">分钟</span>
  49. </div>
  50. {else}
  51. <div class='form-control-static'>{php echo intval($data['cache'])}分钟</div>
  52. {/if}
  53. <div class="help-block">正式接口可能存在次数限制问题, 设置缓存时间后在指定时间内只读取缓存并不调用接口(数据可能会延迟)</div>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label class="col-sm-2 control-label"></label>
  58. <div class="col-sm-9 col-xs-12">
  59. {ifp 'sysset.express.edit'}
  60. <input type="submit" value="提交" class="btn btn-primary"/>
  61. {/if}
  62. </div>
  63. </div>
  64. </form>
  65. <script type="text/javascript">
  66. $(".toggle").unbind('click').click(function () {
  67. var hide = $(this).data('hide');
  68. var show = $(this).data('show');
  69. if(hide){
  70. $("."+hide).hide();
  71. }
  72. if(show){
  73. $("."+show).show();
  74. }
  75. });
  76. </script>
  77. {template '_footer'}