localtown_sf_config.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php
  6. $shoname_name = D('Home/Front')->get_config_by_name('shoname');
  7. $shop_domain = D('Home/Front')->get_config_by_name('shop_domain');
  8. ?>
  9. <title><?php echo $shoname; ?></title>
  10. <link rel="shortcut icon" href="" />
  11. <meta name="renderer" content="webkit">
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  14. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  15. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  16. <!--[if lt IE 9]>
  17. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  18. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  19. <![endif]-->
  20. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  21. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  22. <script type="text/javascript">
  23. window.sysinfo = {
  24. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  25. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  26. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  27. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  28. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  29. 'siteroot': '{$_W['siteroot']}',
  30. 'siteurl': '{$_W['siteurl']}',
  31. 'attachurl': '{$_W['attachurl']}',
  32. 'attachurl_local': '{$_W['attachurl_local']}',
  33. 'attachurl_remote': '{$_W['attachurl_remote']}',
  34. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  35. 'cookie' : {'pre': ''},
  36. 'account' : {:json_encode($_W['account'])},
  37. };
  38. </script>
  39. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  40. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  41. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  42. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  43. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  44. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  45. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  46. <link href="/static/css/snailfish.css" rel="stylesheet">
  47. <style>
  48. body.dragging, body.dragging * {
  49. cursor: move !important;
  50. }
  51. .dragged {
  52. position: absolute;
  53. opacity: 0.5;
  54. z-index: 2000;
  55. border: 1px solid #ccc;
  56. border-radius: 5px;
  57. background: #fff;
  58. }
  59. #sortable li {
  60. border-top: 1px solid #c5c5c5;
  61. padding-top: 20px;
  62. }
  63. #sortable li:first-child {
  64. border: 0;
  65. }
  66. #sortable li.placeholder {
  67. position: relative;
  68. }
  69. #sortable li.placeholder:before {
  70. position: absolute;
  71. }
  72. </style>
  73. <script type="text/javascript" src="/static/js/dist/area/cascade.js"></script>
  74. <script src="https://map.qq.com/api/js?v=2.exp&key=6R4BZ-WAB3W-JITRG-OE7GY-R2753-P3BZ2" type="text/javascript" charset="utf-8"></script>
  75. </head>
  76. <body layadmin-themealias="default">
  77. <div class="layui-fluid">
  78. <div class="layui-card">
  79. <div class="layui-card-header layui-elem-quote">同城配送设置</div>
  80. <div class="layui-card-body" style="padding:15px;">
  81. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  82. <ul class="layui-tab-title">
  83. <li><a href="{:U('express/localtownconfig')}">商家配送</a></li>
  84. <li><a href="{:U('express/localtown_imdada_config')}">达达配送平台</a></li>
  85. <li class="layui-this">顺丰同城</li>
  86. <li><a href="{:U('express/localtown_mk_config')}">码科跑腿</a></li>
  87. <li><a href="{:U('express/localtown_ele_config')}">蜂鸟即配</a></li>
  88. </ul>
  89. <div class="layui-tab-content" style="height: 100%;">
  90. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  91. <div class="layui-form-item">
  92. <label class="layui-form-label">
  93. 顺丰同城对接
  94. </label>
  95. <div class="layui-input-block">
  96. <label class='radio-inline'>
  97. <input type='radio' title="开启" name='parameter[is_localtown_sf_status]' value='1' <?php if( isset($data['is_localtown_sf_status']) && $data['is_localtown_sf_status'] ==1 ){ ?> checked<?php }else{ ?> <?php } ?> />
  98. </label>
  99. <label class='radio-inline'>
  100. <input type='radio' title="关闭" name='parameter[is_localtown_sf_status]' value='0' <?php if(!isset($data['is_localtown_sf_status']) || $data['is_localtown_sf_status'] ==0){ ?> checked<?php }else{ ?> <?php } ?> />
  101. </label>
  102. <div></div>
  103. <div class="layui-form-mid layui-word-aux">开启此功能需要向顺丰同城开放平台申请,具体配送费和接口信息请咨询<a href="http://commit-openic.sf-express.com/" target="_blank" style="color:#009688;">顺丰同城开放平台</a></div>
  104. </div>
  105. </div>
  106. <div class="layui-form-item">
  107. <label class="layui-form-label">
  108. 预查询第三方配送费
  109. </label>
  110. <div class="layui-input-block">
  111. <label class='radio-inline'>
  112. <input type='radio' title="开启" name='parameter[is_sf_prequery_status]' value='1' <?php if( isset($data['is_sf_prequery_status']) && $data['is_sf_prequery_status'] ==1 ){ ?> checked<?php }else{ ?> <?php } ?> />
  113. </label>
  114. <label class='radio-inline'>
  115. <input type='radio' title="关闭" name='parameter[is_sf_prequery_status]' value='0' <?php if(!isset($data['is_sf_prequery_status']) || $data['is_sf_prequery_status'] ==0){ ?> checked<?php }else{ ?> <?php } ?> />
  116. </label>
  117. <div></div>
  118. <div class="layui-form-mid layui-word-aux">开启后,用户 “同城配送” 订单支付成功以后会提前计算此单推送 “第三方配送” 需要的配送费金额,订单配送金额以实际产生的金额为准,该功能只进行预估提示</div>
  119. </div>
  120. </div>
  121. <div class="layui-form-item">
  122. <label class="layui-form-label">开发者ID(dev_id)</label>
  123. <div class="layui-input-block">
  124. <input type="text" name="parameter[localtown_sf_dev_id]" class="form-control" value="{$data['localtown_sf_dev_id']}" placeholder="顺丰同城开发者ID">
  125. <span class="layui-form-mid layui-word-aux">ID(登录顺丰同城开放平台开发者中心-开发者信息里面查看),<a href="http://commit-openic.sf-express.com/" target="_blank" style="color:#009688;">顺丰同城开放平台</a></span>
  126. </div>
  127. </div>
  128. <div class="layui-form-item">
  129. <label class="layui-form-label">密钥(dev_key)</label>
  130. <div class="layui-input-block">
  131. <input type="text" name="parameter[localtown_sf_dev_key]" class="form-control" value="{$data['localtown_sf_dev_key']}" placeholder="顺丰同城密钥">
  132. <span class="layui-form-mid layui-word-aux">密钥(登录顺丰同城开放平台控制台-开发者信息里面查看),<a href="http://commit-openic.sf-express.com/" target="_blank" style="color:#009688;">顺丰同城开放平台</a></span>
  133. </div>
  134. </div>
  135. <div class="layui-form-item">
  136. <label class="layui-form-label">顺丰店铺ID</label>
  137. <div class="layui-input-block">
  138. <input type="text" name="parameter[localtown_sf_store_id]" class="form-control" value="{$data['localtown_sf_store_id']}" placeholder="顺丰店铺ID">
  139. <span class="layui-form-mid layui-word-aux">店铺ID(登录顺丰同城开放平台控制台-开发者信息里面查看),<a href="http://commit-openic.sf-express.com/" target="_blank" style="color:#009688;">顺丰同城开放平台</a></span>
  140. </div>
  141. </div>
  142. <div class="layui-form-item">
  143. <label class="layui-form-label">顺丰同城回调URL</label>
  144. <div class="layui-input-block">
  145. <span style="color:#009688;" class="form-control"><?php echo $shop_domain;?>delivery_notify.php</span>
  146. <span class="layui-form-mid layui-word-aux">在顺丰同城开放平台-开发者中心-开发者信息-URL处,点击修改,回调URL需填写链接,不填写则无法接收顺丰同城推送的消息</span>
  147. </div>
  148. </div>
  149. <div class="layui-form-item">
  150. <label class="layui-form-label"> </label>
  151. <div class="layui-input-block">
  152. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  153. </div>
  154. </div>
  155. </form>
  156. </div>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. <script src="/layuiadmin/layui/layui.js"></script>
  162. <script src="/static/js/jquery-sortable.js"></script>
  163. <script>
  164. layui.config({
  165. base: '/layuiadmin/' //静态资源所在路径
  166. }).extend({
  167. index: 'lib/index' //主入口模块
  168. }).use('index');
  169. </script>
  170. <script>
  171. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  172. var layer = layui.layer;
  173. var $;
  174. var cur_open_div;
  175. layui.use(['jquery', 'layer','form'], function(){
  176. $ = layui.$;
  177. var form = layui.form;
  178. //监听提交
  179. form.on('submit(formDemo)', function(data){
  180. $.ajax({
  181. url: data.form.action,
  182. type: data.form.method,
  183. data: data.field,
  184. dataType:'json',
  185. success: function (info) {
  186. if(info.status == 0)
  187. {
  188. layer.msg(info.result.message,{icon: 1,time: 2000});
  189. }else if(info.status == 1){
  190. var go_url = location.href;
  191. if( info.result.hasOwnProperty("url") )
  192. {
  193. go_url = info.result.url;
  194. }
  195. layer.msg('操作成功',{time: 1000,
  196. end:function(){
  197. location.href = info.result.url;
  198. }
  199. });
  200. }
  201. }
  202. });
  203. return false;
  204. });
  205. })
  206. </script>
  207. </body>