inface.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_W['attachurl_remote']}',
  31. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie' : {'pre': ''},
  33. 'account' : {:json_encode($_W['account'])},
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <script type="text/javascript" src="/static/js/dist/area/cascade.js"></script>
  43. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  44. <link href="/static/css/snailfish.css" rel="stylesheet">
  45. </head>
  46. <body layadmin-themealias="default">
  47. <div class="layui-fluid">
  48. <div class="layui-card">
  49. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">物流接口(快递鸟)</span></div>
  50. <div class="layui-card-body" style="padding:15px;">
  51. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  52. <div class="layui-form-item">
  53. <label class="layui-form-label">快递鸟商户ID</label>
  54. <div class="layui-input-block">
  55. <input type="text" name="parameter[kdniao_id]" class="form-control" value="{$data['kdniao_id']}" />
  56. <span class='layui-form-mid layui-word-aux'>商户ID用于获取物流信息(登录快递鸟用户管理后台-用户信息里面查看),<a class="text-primary" href="http://www.kdniao.com/reg" target="_blank">快递鸟接口申请</a></span>
  57. </div>
  58. </div>
  59. <div class="layui-form-item">
  60. <label class="layui-form-label">快递鸟API KEY</label>
  61. <div class="layui-input-block">
  62. <input type="text" name="parameter[kdniao_api_key]" class="form-control" value="{$data['kdniao_api_key']}" />
  63. <span class='layui-form-mid layui-word-aux'>API KEY秘钥(登录快递鸟用户管理后台-用户信息里面查看)</span>
  64. </div>
  65. </div>
  66. <div class="layui-form-item">
  67. <label class="layui-form-label ">是否开启</label>
  68. <div class="layui-input-block">
  69. <label class='radio-inline'>
  70. <input type='radio' title="关闭" lay-filter="kdniao_status" name='parameter[kdniao_status]' value='2' <?php if(isset($data['kdniao_status']) && $data['kdniao_status'] ==2){ ?>checked <?php } ?> />
  71. </label>
  72. <label class='radio-inline'>
  73. <input type='radio' title="开启" lay-filter="kdniao_status" name='parameter[kdniao_status]' value='1' <?php if( !isset($data['kdniao_status']) || $data['kdniao_status'] ==1 ){ ?>checked <?php } ?> />
  74. </label>
  75. <br/>
  76. <span class='layui-form-mid layui-word-aux'>开启以后快递订单支持电子面单打单服务,电子面单支持的物流公司具体详情咨询“<a class="text-primary" href="http://www.kdniao.com" target="_blank">快递鸟</a>”官方</span>
  77. </div>
  78. </div>
  79. <div class="layui-form-item" id="freebox" <?php if( !isset($data['kdniao_status']) || $data['kdniao_status'] ==1 ){ ?>style="display:block;"<?php }else{ ?> style="display:none;"<?php } ?>>
  80. <label class="layui-form-label ">是否收费</label>
  81. <div class="layui-input-block">
  82. <label class='radio-inline'>
  83. <input type='radio' title="免费" name='parameter[kdniao_freestatus]' value='0' <?php if(!isset($data['kdniao_freestatus']) || $data['kdniao_freestatus'] == 0){ ?>checked <?php } ?> />
  84. </label>
  85. <label class='radio-inline'>
  86. <input type='radio' title="收费" name='parameter[kdniao_freestatus]' value='1' <?php if( isset($data['kdniao_freestatus']) && $data['kdniao_freestatus'] ==1 ){ ?>checked <?php } ?> />
  87. </label>
  88. <br/>
  89. <span class='layui-form-mid layui-word-aux'>“收费模式”支持查询到多家快递公司物流轨迹,“免费模式”支持查询申通、中通、圆通物流轨迹具体详情咨询“<a class="text-primary" href="http://www.kdniao.com" target="_blank">快递鸟</a>”官方</span>
  90. </div>
  91. </div>
  92. <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  93. <legend style="width: auto;border: none;color: #252424;font:16px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;">电子面单中寄件人设置</legend>
  94. </fieldset>
  95. <div class="layui-form-item">
  96. <label class="layui-form-label">寄件人:</label>
  97. <div class="layui-input-block">
  98. <input type="text" name="parameter[kdn_sender_name]" class="form-control" value="{$data['kdn_sender_name']}" maxlength="30"/>
  99. <span class='layui-form-mid layui-word-aux'>寄件人必填</span>
  100. </div>
  101. </div>
  102. <div class="layui-form-item">
  103. <label class="layui-form-label">寄件人联系电话:</label>
  104. <div class="layui-input-block">
  105. <input type="text" name="parameter[kdn_sender_mobile]" class="form-control" value="{$data['kdn_sender_mobile']}" maxlength="20"/>
  106. <span class='layui-form-mid layui-word-aux'>寄件人联系电话必填</span>
  107. </div>
  108. </div>
  109. <div class="layui-form-item">
  110. <label class="layui-form-label">寄件人省市区:</label>
  111. <div class="layui-input-block">
  112. <select id="sel-provance" lay-ignore name="parameter[province_id]" onChange="selectCity();" style="width:130px;display:inline;">
  113. <option value="" selected="true">省/直辖市</option>
  114. </select>
  115. <select id="sel-city" lay-ignore name="parameter[city_id]" onChange="selectcounty(0)" style="width:135px;display:inline;">
  116. <option value="" selected="true">请选择</option>
  117. </select>
  118. <select id="sel-area" lay-ignore name="parameter[area_id]" style="width:130px;display:inline;">
  119. <option value="" selected="true">请选择</option>
  120. </select>
  121. </div>
  122. <div class="layui-input-block"><span class='layui-form-mid layui-word-aux'>寄件人省市区必填</span></div>
  123. </div>
  124. <div class="layui-form-item">
  125. <label class="layui-form-label">寄件人详细地址:</label>
  126. <div class="layui-input-block">
  127. <input type="text" name="parameter[kdn_sender_address]" class="form-control" value="{$data['kdn_sender_address']}" maxlength="100"/>
  128. <span class='layui-form-mid layui-word-aux'>寄件人详细地址必填</span>
  129. </div>
  130. </div>
  131. <div class="layui-form-item">
  132. <label class="layui-form-label">寄件人公司:</label>
  133. <div class="layui-input-block">
  134. <input type="text" name="parameter[kdn_sender_company]" class="form-control" value="{$data['kdn_sender_company']}" maxlength="30"/>
  135. <span class='layui-form-mid layui-word-aux'>寄件人公司选填</span>
  136. </div>
  137. </div>
  138. <div class="layui-form-item">
  139. <label class="layui-form-label">寄件人邮编:</label>
  140. <div class="layui-input-block">
  141. <input type="text" name="parameter[kdn_sender_postcode]" class="form-control" value="{$data['kdn_sender_postcode']}" maxlength="10"/>
  142. <span class='layui-form-mid layui-word-aux'>快递公司为:EMS(EMS)、邮政快递包裹(YZPY)、邮政国内标快(YZBK)时必填</span>
  143. </div>
  144. </div>
  145. <div class="layui-form-item">
  146. <label class="layui-input-block"> </label>
  147. <div class="layui-input-block">
  148. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  149. </div>
  150. </div>
  151. </form>
  152. </div>
  153. </div>
  154. </div>
  155. <script src="/layuiadmin/layui/layui.js"></script>
  156. <script>
  157. layui.config({
  158. base: '/layuiadmin/' //静态资源所在路径
  159. }).extend({
  160. index: 'lib/index' //主入口模块
  161. }).use('index');
  162. </script>
  163. <script>
  164. $(function(){
  165. cascdeInit("1","1","{$data['kdn_province_id']}","{$data['kdn_city_id']}","{$data['kdn_area_id']}","");
  166. });
  167. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  168. var layer = layui.layer;
  169. var $;
  170. var cur_open_div;
  171. layui.use(['jquery', 'layer','form'], function(){
  172. $ = layui.$;
  173. var form = layui.form;
  174. form.on('radio(linktype)', function(data){
  175. if (data.value == 2) {
  176. $('#typeGroup').show();
  177. } else {
  178. $('#typeGroup').hide();
  179. }
  180. });
  181. form.on('radio(kdniao_status)', function(data){
  182. if (data.value == 1) {
  183. $('#freebox').show();
  184. } else {
  185. $('#freebox').hide();
  186. }
  187. });
  188. $('#chose_link').click(function(){
  189. cur_open_div = $(this).attr('data-input');
  190. $.post("{:U('util.selecturl', array('ok' => 1))}", {}, function(shtml){
  191. layer.open({
  192. type: 1,
  193. area: '930px',
  194. content: shtml //注意,如果str是object,那么需要字符拼接。
  195. });
  196. });
  197. })
  198. //监听提交
  199. form.on('submit(formDemo)', function(data){
  200. $.ajax({
  201. url: data.form.action,
  202. type: data.form.method,
  203. data: data.field,
  204. dataType:'json',
  205. success: function (info) {
  206. if(info.status == 0)
  207. {
  208. layer.msg(info.result.msg,{icon: 1,time: 2000});
  209. }else if(info.status == 1){
  210. var go_url = location.href;
  211. if( info.result.hasOwnProperty("url") )
  212. {
  213. go_url = info.result.url;
  214. }
  215. layer.msg('操作成功',{time: 1000,
  216. end:function(){
  217. location.href = info.result.url;
  218. }
  219. });
  220. }
  221. }
  222. });
  223. return false;
  224. });
  225. })
  226. </script>
  227. </body>