config.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. </head>
  45. <body layadmin-themealias="default">
  46. <div class="layui-fluid">
  47. <div class="layui-card">
  48. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">邀新有礼</span></div>
  49. <div class="layui-card-body" style="padding:15px;">
  50. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  51. <div class="layui-form-item">
  52. <label class="layui-form-label">邀新有礼</label>
  53. <div class="layui-input-block">
  54. <label class='radio-inline'>
  55. <input type='radio' name='is_invite_open_status' value='1' <?php if( isset($data['is_invite_open_status']) && $data['is_invite_open_status'] == 1){ ?>checked<?php } ?> title="开启" />
  56. </label>
  57. <label class='radio-inline'>
  58. <input type='radio' name='is_invite_open_status' value='0' <?php if( !isset($data['is_invite_open_status']) || $data['is_invite_open_status'] == 0){ ?>checked<?php } ?> title="关闭" />
  59. </label>
  60. <span class="layui-form-mid layui-word-aux"></span>
  61. </div>
  62. </div>
  63. <div class="layui-form-item">
  64. <label class="layui-form-label">邀请者奖励</label>
  65. <div class="layui-input-block">
  66. <label class='radio-inline'>
  67. <input type='radio' name='inviter_reward_type' lay-filter="inviter_reward_type" value='1' <?php if( isset($data['inviter_reward_type']) && $data['inviter_reward_type'] == 1){ ?>checked<?php } ?> title="送优惠券" />
  68. </label>
  69. <label class='radio-inline'>
  70. <input type='radio' name='inviter_reward_type' lay-filter="inviter_reward_type" value='2' <?php if( isset($data['inviter_reward_type']) && $data['inviter_reward_type'] == 2){ ?>checked<?php } ?> title="送积分" />
  71. </label>
  72. <label class='radio-inline'>
  73. <input type='radio' name='inviter_reward_type' lay-filter="inviter_reward_type" value='0' <?php if( !isset($data['inviter_reward_type']) || $data['inviter_reward_type'] == 0){ ?>checked<?php } ?> title="送优惠券和积分" />
  74. </label>
  75. <span class="help-block layui-word-aux">邀请成功以后,会员收到的奖励</span>
  76. </div>
  77. </div>
  78. <div class="layui-form-item" id="inviter_reward_type_1"
  79. <?php if( !isset($data['inviter_reward_type']) || (isset($data['inviter_reward_type']) && $data['inviter_reward_type'] == 1 || $data['inviter_reward_type'] == 0) ){ ?>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="layui-form-label" style="width:100px;">选择优惠券</label>
  83. <div class="layui-input-block" style="margin-left: 100px;width: 600px;">
  84. <select name="inviter_reward_couponid">
  85. <option value="">请选择</option>
  86. <?php foreach($coupon_list as $k=>$v){ ?>
  87. <option value="{$v['id']}"
  88. <?php if($data['inviter_reward_couponid'] == $v['id']){ ?>
  89. selected="selected"
  90. <?php } ?>
  91. >{$v['voucher_title']}({$v['remain_count']})
  92. </option>
  93. <?php } ?>
  94. </select>
  95. <span class="help-block layui-word-aux">选择赠送的优惠券(优惠券如果限制领取数量,用户邀请成功赠送优惠券的奖励也会受到限制)</span>
  96. </div>
  97. </div>
  98. </div>
  99. <div class="layui-form-item" id="inviter_reward_type_2"
  100. <?php if( !isset($data['inviter_reward_type']) || (isset($data['inviter_reward_type']) && $data['inviter_reward_type'] == 2 || $data['inviter_reward_type'] == 0) ){ ?>style="display:block;"<?php }else{ ?>style="display:none;"<?php } ?>
  101. >
  102. <label class="layui-form-label"></label>
  103. <div class="layui-input-block" style="width: 300px;">
  104. <label class="layui-form-label" style="width:100px;">赠送</label>
  105. <div class="input-group" style="width: 200px;">
  106. <input class="form-control" name="inviter_reward_point" type="text" placeholder="" value="{$data['inviter_reward_point']}" maxlength="10">
  107. <div class="input-group-addon">积分</div>
  108. </div>
  109. <span class="help-block" style="padding-left: 100px;color: #999;">设置赠送的积分数量</span>
  110. </div>
  111. </div>
  112. <div class="layui-form-item">
  113. <label class="layui-form-label">被邀请者奖励</label>
  114. <div class="layui-input-block">
  115. <label class='radio-inline'>
  116. <input type='radio' name='invitees_reward_type' lay-filter="invitees_reward_type" value='1' <?php if( isset($data['invitees_reward_type']) && $data['invitees_reward_type'] == 1){ ?>checked<?php } ?> title="新人注册(授权登录)即奖励" />
  117. </label>
  118. <label class='radio-inline'>
  119. <input type='radio' name='invitees_reward_type' lay-filter="invitees_reward_type" value='2' <?php if( isset($data['invitees_reward_type']) && $data['invitees_reward_type'] == 2){ ?>checked<?php } ?> title="新人注册(授权登录)并且下单奖励" />
  120. </label>
  121. <label class='radio-inline'>
  122. <input type='radio' name='invitees_reward_type' lay-filter="invitees_reward_type" value='0' <?php if( !isset($data['invitees_reward_type']) || $data['invitees_reward_type'] == 0){ ?>checked<?php } ?> title="新人注册(授权登录)和下单分别奖励" />
  123. </label>
  124. <span class="help-block layui-word-aux">被邀请成功以后,被邀请人收到的奖励</span>
  125. </div>
  126. </div>
  127. <div class="layui-form-item" id="invitees_reward_type_1"
  128. <?php if( !isset($data['invitees_reward_type']) || (isset($data['invitees_reward_type']) && $data['invitees_reward_type'] == 1 || $data['invitees_reward_type'] == 0) ){ ?>style="display:block;"<?php }else{ ?>style="display:none;"<?php } ?>
  129. >
  130. <label class="layui-form-label"></label>
  131. <div class="layui-input-block">
  132. <h5 style="font-weight:bold;">新人注册(授权登录)</h5>
  133. <div class="layui-input-block" style="margin: 20px 0 20px 10px;">
  134. <label class='radio-inline'>
  135. <input type='radio' name='invitees_register_reward_type' lay-filter="invitees_register_reward_type" value='1' <?php if( isset($data['invitees_register_reward_type']) && $data['invitees_register_reward_type'] == 1){ ?>checked<?php } ?> title="送优惠券" />
  136. </label>
  137. <label class='radio-inline'>
  138. <input type='radio' name='invitees_register_reward_type' lay-filter="invitees_register_reward_type" value='2' <?php if( isset($data['invitees_register_reward_type']) && $data['invitees_register_reward_type'] == 2){ ?>checked<?php } ?> title="送积分" />
  139. </label>
  140. <label class='radio-inline'>
  141. <input type='radio' name='invitees_register_reward_type' lay-filter="invitees_register_reward_type" value='0' <?php if( !isset($data['invitees_register_reward_type']) || $data['invitees_register_reward_type'] == 0){ ?>checked<?php } ?> title="送优惠券和积分" />
  142. </label>
  143. </div>
  144. <div class="layui-input-block" id="invitees_register_reward_type_1" style="margin-left: 10px;
  145. <?php if( !isset($data['invitees_register_reward_type']) || (isset($data['invitees_register_reward_type']) && $data['invitees_register_reward_type'] == 1 || $data['invitees_register_reward_type'] == 0) ){ ?>display:block;<?php }else{ ?>display:none;<?php } ?>
  146. ">
  147. <label class="layui-form-label" style="width:100px;">选择优惠券</label>
  148. <div class="layui-input-block" style="margin-left: 100px;width: 600px;">
  149. <select name="invitees_register_reward_couponid">
  150. <option value="">请选择</option>
  151. <?php foreach($coupon_list as $k=>$v){ ?>
  152. <option value="{$v['id']}"
  153. <?php if($data['invitees_register_reward_couponid'] == $v['id']){ ?>
  154. selected="selected"
  155. <?php } ?>
  156. >{$v['voucher_title']}({$v['remain_count']})
  157. </option>
  158. <?php } ?>
  159. </select>
  160. <span class="layui-form-mid layui-word-aux">选择赠送的优惠券(优惠券如果限制领取数量,用户邀请成功赠送优惠券的奖励也会受到限制)</span>
  161. </div>
  162. </div>
  163. <div class="layui-input-block" id="invitees_register_reward_type_2" style="width: 300px;margin-left: 10px;
  164. <?php if( !isset($data['invitees_register_reward_type']) || (isset($data['invitees_register_reward_type']) && $data['invitees_register_reward_type'] == 2 || $data['invitees_register_reward_type'] == 0) ){ ?>display:block;<?php }else{ ?>display:none;<?php } ?>
  165. ">
  166. <label class="layui-form-label" style="width:100px;">赠送</label>
  167. <div class="input-group" style="width: 200px;">
  168. <input class="form-control" name="invitees_register_reward_point" type="text" placeholder="" value="{$data['invitees_register_reward_point']}" maxlength="10">
  169. <div class="input-group-addon">积分</div>
  170. </div>
  171. <span class="layui-form-mid layui-word-aux" style="padding-left: 100px;">设置赠送的积分数量</span>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="layui-form-item" id="invitees_reward_type_2"
  176. <?php if( !isset($data['invitees_reward_type']) || (isset($data['invitees_reward_type']) && $data['invitees_reward_type'] == 2 || $data['invitees_reward_type'] == 0) ){ ?>style="display:block;"<?php }else{ ?>style="display:none;"<?php } ?>
  177. >
  178. <label class="layui-form-label"></label>
  179. <div class="layui-input-block">
  180. <h5 style="font-weight:bold;">下单完成</h5>
  181. <div class="layui-input-block" style="margin: 20px 0 20px 10px;">
  182. <label class='radio-inline'>
  183. <input type='radio' name='invitees_order_reward_type' lay-filter="invitees_order_reward_type" value='1' <?php if( isset($data['invitees_order_reward_type']) && $data['invitees_order_reward_type'] == 1){ ?>checked<?php } ?> title="送优惠券" />
  184. </label>
  185. <label class='radio-inline'>
  186. <input type='radio' name='invitees_order_reward_type' lay-filter="invitees_order_reward_type" value='2' <?php if( isset($data['invitees_order_reward_type']) && $data['invitees_order_reward_type'] == 2){ ?>checked<?php } ?> title="送积分" />
  187. </label>
  188. <label class='radio-inline'>
  189. <input type='radio' name='invitees_order_reward_type' lay-filter="invitees_order_reward_type" value='0' <?php if( !isset($data['invitees_order_reward_type']) || $data['invitees_order_reward_type'] == 0){ ?>checked<?php } ?> title="送优惠券和积分" />
  190. </label>
  191. </div>
  192. <div class="layui-input-block" id="invitees_order_reward_type_1" style="margin-left: 10px;
  193. <?php if( !isset($data['invitees_order_reward_type']) || (isset($data['invitees_order_reward_type']) && $data['invitees_order_reward_type'] == 1 || $data['invitees_order_reward_type'] == 0) ){ ?>display:block;<?php }else{ ?>display:none;<?php } ?>
  194. ">
  195. <label class="layui-form-label" style="width:100px;">选择优惠券</label>
  196. <div class="layui-input-block" style="margin-left: 100px;width: 600px;">
  197. <select name="invitees_order_reward_couponid">
  198. <option value="">请选择</option>
  199. <?php foreach($coupon_list as $k=>$v){ ?>
  200. <option value="{$v['id']}"
  201. <?php if($data['invitees_order_reward_couponid'] == $v['id']){ ?>
  202. selected="selected"
  203. <?php } ?>
  204. >{$v['voucher_title']}({$v['remain_count']})
  205. </option>
  206. <?php } ?>
  207. </select>
  208. <span class="layui-form-mid layui-word-aux">选择赠送的优惠券(优惠券如果限制领取数量,用户邀请成功赠送优惠券的奖励也会受到限制)</span>
  209. </div>
  210. </div>
  211. <div class="layui-input-block" id="invitees_order_reward_type_2" style="width: 300px;margin-left: 10px;
  212. <?php if( !isset($data['invitees_order_reward_type']) || (isset($data['invitees_order_reward_type']) && $data['invitees_order_reward_type'] == 2 || $data['invitees_order_reward_type'] == 0) ){ ?>display:block;<?php }else{ ?>display:none;<?php } ?>
  213. ">
  214. <label class="layui-form-label" style="width:100px;">赠送</label>
  215. <div class="input-group" style="width: 200px;">
  216. <input class="form-control" name="invitees_order_reward_point" type="text" placeholder="" value="{$data['invitees_order_reward_point']}" maxlength="10">
  217. <div class="input-group-addon">积分</div>
  218. </div>
  219. <span class="layui-form-mid layui-word-aux" style="padding-left: 100px;">设置赠送的积分数量</span>
  220. </div>
  221. </div>
  222. </div>
  223. <div class="layui-form-item">
  224. <label class="layui-form-label">活动奖励</label>
  225. <div class="layui-input-block">
  226. <label class='radio-inline'>
  227. <input type='radio' name='invite_activity_reward_type' value='0' <?php if( !isset($data['invite_activity_reward_type']) || $data['invite_activity_reward_type'] == 0){ ?>checked<?php } ?> title="下单支付完成获得奖励" />
  228. </label>
  229. <label class='radio-inline'>
  230. <input type='radio' name='invite_activity_reward_type' value='1' <?php if( isset($data['invite_activity_reward_type']) && $data['invite_activity_reward_type'] == 1){ ?>checked<?php } ?> title="订单售后期结束获得奖励" />
  231. </label>
  232. <span class="layui-form-mid layui-word-aux">此处设置仅对“被邀请者奖励”里面的“登录且下单奖励”和“登录和下单分别奖励”有效,下单支付完成获得奖励指用户订单支付完成即为邀请成功,订单售后期结束获得奖励指用户订单售后期结束以后才为邀请成功。</span>
  233. </div>
  234. </div>
  235. <div class="layui-form-item">
  236. <label class="layui-form-label">邀请人数</label>
  237. <div class="layui-input-block">
  238. <input type="checkbox" name="is_open_invitation_limit" lay-skin="primary" title="开启邀请人数限制" <?php if( isset($data['is_open_invitation_limit']) && $data['is_open_invitation_limit'] == 1){ ?>checked<?php } ?> value="1">
  239. <div class="input-group" style="width: 200px;">
  240. <div class="input-group-addon">限制</div>
  241. <input class="form-control" name="invitation_limit_person" type="text" placeholder="" value="{$data['invitation_limit_person']}" maxlength="10">
  242. <div class="input-group-addon">人</div>
  243. </div>
  244. <span class="layui-form-mid layui-word-aux">设置邀请人员的数量,根据是否获得“被邀请者奖励”判断邀请人数是否达到上限</span>
  245. </div>
  246. </div>
  247. <div class="layui-form-item">
  248. <label class="layui-form-label">邀新有礼活动顶部背景图</label>
  249. <div class="layui-input-block">
  250. {:tpl_form_field_image2('invite_activity_topback_img', $data['invite_activity_topback_img'])}
  251. <span class='layui-form-mid layui-word-aux'>活动页面顶部背景图</span>
  252. </div>
  253. </div>
  254. <div class="layui-form-item">
  255. <label class="layui-form-label">活动打开页面顶部背景图</label>
  256. <div class="layui-input-block">
  257. {:tpl_form_field_image2('invite_activity_open_topback_img', $data['invite_activity_open_topback_img'])}
  258. <span class='layui-form-mid layui-word-aux'>此处为邀请人发送活动给被邀请人,被邀请人打开活动顶部背景图</span>
  259. </div>
  260. </div>
  261. <div class="layui-form-item">
  262. <label class="layui-form-label">活动积分/优惠券使用规则</label>
  263. <div class="layui-input-block">
  264. {:tpl_ueditor('invite_activity_use_rules',$data['invite_activity_use_rules'],array('height'=>'300'))}
  265. <span class='layui-form-mid layui-word-aux'>此处为邀请人发送活动给被邀请人,被邀请人打开以后,最下方的使用说明</span>
  266. </div>
  267. </div>
  268. <div class="layui-form-item">
  269. <label class="layui-form-label">分享标题</label>
  270. <div class="layui-input-block">
  271. <input class="form-control" name="invite_share_title" type="text" placeholder="请输入" value="{$data['invite_share_title']}">
  272. <span class='layui-form-mid layui-word-aux'></span>
  273. </div>
  274. </div>
  275. <div class="layui-form-item">
  276. <label class="layui-form-label">分享图片</label>
  277. <div class="layui-input-block">
  278. {:tpl_form_field_image2('invite_share_img', $data['invite_share_img'])}
  279. <span class='layui-form-mid layui-word-aux'>邀新有礼分享图片</span>
  280. </div>
  281. </div>
  282. <div class="layui-form-item">
  283. <label class="layui-form-label">“邀请下单”分享标题</label>
  284. <div class="layui-input-block">
  285. <input class="form-control" name="invite_order_share_title" type="text" placeholder="请输入" value="{$data['invite_order_share_title']}">
  286. <span class='layui-form-mid layui-word-aux'></span>
  287. </div>
  288. </div>
  289. <div class="layui-form-item">
  290. <label class="layui-form-label">“邀请下单”分享图片</label>
  291. <div class="layui-input-block">
  292. {:tpl_form_field_image2('invite_order_share_img', $data['invite_order_share_img'])}
  293. <span class='layui-form-mid layui-word-aux'>邀新有礼分享图片</span>
  294. </div>
  295. </div>
  296. <div class="layui-form-item">
  297. <label class="layui-form-label">活动规则</label>
  298. <div class="layui-input-block">
  299. {:tpl_ueditor('invite_activity_rules',$data['invite_activity_rules'],array('height'=>'300'))}
  300. <span class='layui-form-mid layui-word-aux'></span>
  301. </div>
  302. </div>
  303. <div class="layui-form-item">
  304. <label class="layui-form-label"> </label>
  305. <div class="layui-input-block">
  306. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  307. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  308. </div>
  309. </div>
  310. </form>
  311. </div>
  312. </div>
  313. </div>
  314. <script src="/layuiadmin/layui/layui.js"></script>
  315. <script>
  316. layui.config({
  317. base: '/layuiadmin/' //静态资源所在路径
  318. }).extend({
  319. index: 'lib/index' //主入口模块
  320. }).use('index');
  321. </script>
  322. <script>
  323. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  324. var layer = layui.layer;
  325. var $;
  326. var cur_open_div;
  327. layui.use(['jquery', 'layer','form','colorpicker'], function(){
  328. $ = layui.$;
  329. var form = layui.form;
  330. var colorpicker = layui.colorpicker;
  331. form.on('radio(inviter_reward_type)',function(data){
  332. if(data.value == 1){
  333. $('#inviter_reward_type_1').show();
  334. $('#inviter_reward_type_2').hide();
  335. }else if(data.value == 2){
  336. $('#inviter_reward_type_1').hide();
  337. $('#inviter_reward_type_2').show();
  338. }else{
  339. $('#inviter_reward_type_1').show();
  340. $('#inviter_reward_type_2').show();
  341. }
  342. });
  343. form.on('radio(invitees_reward_type)',function(data){
  344. if(data.value == 1){
  345. $('#invitees_reward_type_1').show();
  346. $('#invitees_reward_type_2').hide();
  347. }else if(data.value == 2){
  348. $('#invitees_reward_type_1').hide();
  349. $('#invitees_reward_type_2').show();
  350. }else{
  351. $('#invitees_reward_type_1').show();
  352. $('#invitees_reward_type_2').show();
  353. }
  354. });
  355. form.on('radio(invitees_register_reward_type)',function(data){
  356. if(data.value == 1){
  357. $('#invitees_register_reward_type_1').show();
  358. $('#invitees_register_reward_type_2').hide();
  359. }else if(data.value == 2){
  360. $('#invitees_register_reward_type_1').hide();
  361. $('#invitees_register_reward_type_2').show();
  362. }else{
  363. $('#invitees_register_reward_type_1').show();
  364. $('#invitees_register_reward_type_2').show();
  365. }
  366. });
  367. form.on('radio(invitees_order_reward_type)',function(data){
  368. if(data.value == 1){
  369. $('#invitees_order_reward_type_1').show();
  370. $('#invitees_order_reward_type_2').hide();
  371. }else if(data.value == 2){
  372. $('#invitees_order_reward_type_1').hide();
  373. $('#invitees_order_reward_type_2').show();
  374. }else{
  375. $('#invitees_order_reward_type_1').show();
  376. $('#invitees_order_reward_type_2').show();
  377. }
  378. });
  379. //监听提交
  380. form.on('submit(formDemo)', function(data){
  381. $.ajax({
  382. url: data.form.action,
  383. type: data.form.method,
  384. data: data.field,
  385. dataType:'json',
  386. success: function (info) {
  387. if(info.status == 0)
  388. {
  389. layer.msg(info.result.message,{icon: 1,time: 2000});
  390. }else if(info.status == 1){
  391. var go_url = location.href;
  392. if( info.result.hasOwnProperty("url") )
  393. {
  394. go_url = info.result.url;
  395. }
  396. layer.msg('操作成功',{time: 1000,
  397. end:function(){
  398. location.href = info.result.url;
  399. }
  400. });
  401. }
  402. }
  403. });
  404. return false;
  405. });
  406. })
  407. </script>
  408. </body>