system.blade.php 143 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/plugins/datatables/datatables.min.css" rel="stylesheet" type="text/css" />
  4. <link href="/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.css" rel="stylesheet" type="text/css" />
  5. <link href="/assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.css" rel="stylesheet" type="text/css" />
  6. <link href="/assets/global/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />
  7. <link href="/assets/global/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />
  8. @endsection
  9. @section('content')
  10. <!-- BEGIN CONTENT BODY -->
  11. <div class="page-content" style="padding-top:0;">
  12. <!-- BEGIN PAGE BASE CONTENT -->
  13. <div class="row">
  14. <div class="col-md-12">
  15. <!-- BEGIN PROFILE CONTENT -->
  16. <div class="profile-content">
  17. <div class="row">
  18. <div class="col-md-12">
  19. <div class="portlet light bordered">
  20. <div class="portlet-title tabbable-line">
  21. <ul class="nav nav-tabs">
  22. <li class="active">
  23. <a href="#tab_1" data-toggle="tab"> 常规设置 </a>
  24. </li>
  25. <li>
  26. <a href="#tab_2" data-toggle="tab"> 拓展设置 </a>
  27. </li>
  28. <li>
  29. <a href="#tab_3" data-toggle="tab"> 积分设置 </a>
  30. </li>
  31. <li>
  32. <a href="#tab_4" data-toggle="tab"> 推广返利设置 </a>
  33. </li>
  34. <li>
  35. <a href="#tab_5" data-toggle="tab"> 警告提醒设置 </a>
  36. </li>
  37. <li>
  38. <a href="#tab_6" data-toggle="tab"> 自动化任务 </a>
  39. </li>
  40. <li>
  41. <a href="#tab_7" data-toggle="tab"> LOGO、客服、统计设置 </a>
  42. </li>
  43. <li>
  44. <a href="#tab_8" data-toggle="tab"> 有赞云支付 </a>
  45. </li>
  46. <li>
  47. <a href="#tab_9" data-toggle="tab"> AliPay </a>
  48. </li>
  49. </ul>
  50. </div>
  51. <div class="portlet-body">
  52. <div class="tab-content">
  53. <div class="tab-pane active" id="tab_1">
  54. <form action="#" method="post" class="form-horizontal">
  55. <div class="portlet-body">
  56. <div class="form-group">
  57. <div class="col-md-6 col-sm-6 col-xs-12">
  58. <label for="website_name" class="col-md-3 control-label">网站名称</label>
  59. <div class="col-md-9">
  60. <div class="input-group">
  61. <input class="form-control" type="text" name="website_name" value="{{$website_name}}" id="website_name" />
  62. <span class="input-group-btn">
  63. <button class="btn btn-success" type="button" onclick="setWebsiteName()">修改</button>
  64. </span>
  65. </div>
  66. <span class="help-block"> 发邮件时展示 </span>
  67. </div>
  68. </div>
  69. <div class="col-md-6 col-sm-6 col-xs-12">
  70. <label for="website_url" class="col-md-3 control-label">网站地址</label>
  71. <div class="col-md-9">
  72. <div class="input-group">
  73. <input class="form-control" type="text" name="website_url" value="{{$website_url}}" id="website_url" />
  74. <span class="input-group-btn">
  75. <button class="btn btn-success" type="button" onclick="setWebsiteUrl()">修改</button>
  76. </span>
  77. </div>
  78. <span class="help-block"> 生成重置密码、有赞云支付、AliPay必备,示例:https://www.ssrpanel.com </span>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="form-group">
  83. <div class="col-md-6 col-sm-6 col-xs-12">
  84. <label for="is_register" class="col-md-3 control-label">用户注册</label>
  85. <div class="col-md-9">
  86. <input type="checkbox" class="make-switch" @if($is_register) checked @endif id="is_register" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  87. <span class="help-block"> 关闭后无法注册 </span>
  88. </div>
  89. </div>
  90. <div class="col-md-6 col-sm-6 col-xs-12">
  91. <label for="is_invite_register" class="col-md-3 control-label">邀请注册</label>
  92. <div class="col-md-9">
  93. <select id="is_invite_register" class="form-control select2" name="is_invite_register">
  94. <option value="0" @if($is_invite_register == '0') selected @endif>关闭</option>
  95. <option value="1" @if($is_invite_register == '1') selected @endif>可选</option>
  96. <option value="2" @if($is_invite_register == '2') selected @endif>必须</option>
  97. </select>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="form-group">
  102. <div class="col-md-6 col-sm-6 col-xs-12">
  103. <label for="is_active_register" class="col-md-3 control-label">激活账号</label>
  104. <div class="col-md-9">
  105. <input type="checkbox" class="make-switch" @if($is_active_register) checked @endif id="is_active_register" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  106. <span class="help-block"> 启用后用户需要通过邮件来激活账号 </span>
  107. </div>
  108. </div>
  109. <div class="col-md-6 col-sm-6 col-xs-12">
  110. <label for="is_reset_password" class="col-md-3 control-label">重置密码</label>
  111. <div class="col-md-9">
  112. <input type="checkbox" class="make-switch" @if($is_reset_password) checked @endif id="is_reset_password" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  113. <span class="help-block"> 启用后用户可以通过邮件重置密码 </span>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="form-group">
  118. <div class="col-md-6 col-sm-6 col-xs-12">
  119. <label for="is_captcha" class="col-md-3 control-label">验证码</label>
  120. <div class="col-md-9">
  121. <input type="checkbox" class="make-switch" @if($is_captcha) checked @endif id="is_captcha" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  122. <span class="help-block"> 启用后登录、注册需要输入验证码 </span>
  123. </div>
  124. </div>
  125. <div class="col-md-6 col-sm-6 col-xs-12">
  126. <label for="is_free_code" class="col-md-3 control-label">免费邀请码</label>
  127. <div class="col-md-9">
  128. <input type="checkbox" class="make-switch" @if($is_free_code) checked @endif id="is_free_code" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  129. <span class="help-block"> 关闭后免费邀请码不可见 </span>
  130. </div>
  131. </div>
  132. </div>
  133. <div class="form-group">
  134. <div class="col-md-6 col-sm-6 col-xs-12">
  135. <label for="is_forbid_china" class="col-md-3 control-label">阻止大陆访问</label>
  136. <div class="col-md-9">
  137. <input type="checkbox" class="make-switch" @if($is_forbid_china) checked @endif id="is_forbid_china" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  138. <span class="help-block"> 开启后大陆IP禁止访问 </span>
  139. </div>
  140. </div>
  141. <div class="col-md-6 col-sm-6 col-xs-12">
  142. <label for="is_forbid_oversea" class="col-md-3 control-label">阻止海外访问</label>
  143. <div class="col-md-9">
  144. <input type="checkbox" class="make-switch" @if($is_forbid_oversea) checked @endif id="is_forbid_oversea" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  145. <span class="help-block"> 开启后海外IP(含港澳台)禁止访问 </span>
  146. </div>
  147. </div>
  148. </div>
  149. <div class="form-group">
  150. <div class="col-md-6 col-sm-6 col-xs-12">
  151. <label for="is_forbid_robot" class="col-md-3 control-label">阻止机器人访问</label>
  152. <div class="col-md-9">
  153. <input type="checkbox" class="make-switch" @if($is_forbid_robot) checked @endif id="is_forbid_robot" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  154. <span class="help-block"> 如果是机器人、爬虫、代理访问网站则会抛出404错误 </span>
  155. </div>
  156. </div>
  157. <div class="col-md-6 col-sm-6 col-xs-12">
  158. <label for="is_verify_register" class="col-md-3 control-label">注册校验验证码</label>
  159. <div class="col-md-9">
  160. <input type="checkbox" class="make-switch" @if($is_verify_register) checked @endif id="is_verify_register" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  161. <span class="help-block"> 注册时需要先通过邮件获取验证码方可注册,‘激活账号’失效 </span>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. </form>
  167. </div>
  168. <div class="tab-pane" id="tab_2">
  169. <form action="#" method="post" class="form-horizontal">
  170. <div class="portlet-body">
  171. <div class="form-group">
  172. <div class="col-md-6 col-sm-6 col-xs-12">
  173. <label for="is_rand_port" class="col-md-3 control-label">随机端口</label>
  174. <div class="col-md-9">
  175. <input type="checkbox" class="make-switch" @if($is_rand_port) checked @endif id="is_rand_port" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  176. <span class="help-block"> 注册、添加用户时随机生成端口 </span>
  177. </div>
  178. </div>
  179. <div class="col-md-6 col-sm-6 col-xs-12">
  180. <label class="col-md-3 control-label">端口范围</label>
  181. <div class="col-md-9">
  182. <div class="input-group input-large input-daterange">
  183. <input type="text" class="form-control" name="min_port" value="{{$min_port}}" id="min_port">
  184. <span class="input-group-addon"> ~ </span>
  185. <input type="text" class="form-control" name="max_port" value="{{$max_port}}" id="max_port">
  186. </div>
  187. <span class="help-block"> 端口范围:1000 - 65535 </span>
  188. </div>
  189. </div>
  190. </div>
  191. <div class="form-group">
  192. <div class="col-md-6 col-sm-6 col-xs-12">
  193. <label for="is_namesilo" class="col-md-3 control-label">Namesilo</label>
  194. <div class="col-md-9">
  195. <input type="checkbox" class="make-switch" @if($is_namesilo) checked @endif id="is_namesilo" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  196. <span class="help-block"> 添加、编辑节点的绑定域名时自动更新域名DNS记录值为节点IP(<a href="https://www.namesilo.com/account_api.php?rid=326ec20pa" target="_blank">创建API KEY</a>) </span>
  197. </div>
  198. </div>
  199. <div class="col-md-6 col-sm-6 col-xs-12">
  200. <label for="namesilo_key" class="col-md-3 control-label">Namesilo API KEY</label>
  201. <div class="col-md-9">
  202. <div class="input-group">
  203. <input class="form-control" type="text" name="namesilo_key" value="{{$namesilo_key}}" id="namesilo_key" placeholder="填入Namesilo上申请的API KEY" />
  204. <span class="input-group-btn">
  205. <button class="btn btn-success" type="button" onclick="setNamesiloKey()">修改</button>
  206. </span>
  207. </div>
  208. <span class="help-block"> 域名必须是<a href="https://www.namesilo.com/?rid=326ec20pa" target="_blank">www.namesilo.com</a>上购买的 </span>
  209. </div>
  210. </div>
  211. </div>
  212. <!--
  213. <div class="form-group">
  214. <label for="is_user_rand_port" class="col-md-2 control-label">自定义端口</label>
  215. <div class="col-md-6 col-sm-6 col-xs-12">
  216. <input type="checkbox" class="make-switch" @if($is_user_rand_port) checked @endif id="is_user_rand_port" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  217. <span class="help-block"> 用户可以自定义端口 </span>
  218. </div>
  219. </div>
  220. -->
  221. <div class="form-group">
  222. <div class="col-md-6 col-sm-6 col-xs-12">
  223. <label for="default_days" class="col-md-3 control-label">初始有效期</label>
  224. <div class="col-md-9">
  225. <div class="input-group">
  226. <input class="form-control" type="text" name="default_days" value="{{$default_days}}" id="default_days" />
  227. <span class="input-group-addon">天</span>
  228. <span class="input-group-btn">
  229. <button class="btn btn-success" type="button" onclick="setDefaultDays()">修改</button>
  230. </span>
  231. </div>
  232. <span class="help-block"> 用户注册时默认账户有效期,为0即当天到期 </span>
  233. </div>
  234. </div>
  235. <div class="col-md-6 col-sm-6 col-xs-12">
  236. <label for="default_traffic" class="col-md-3 control-label">初始流量</label>
  237. <div class="col-md-9">
  238. <div class="input-group">
  239. <input class="form-control" type="text" name="default_traffic" value="{{$default_traffic}}" id="default_traffic" />
  240. <span class="input-group-addon">MiB</span>
  241. <span class="input-group-btn">
  242. <button class="btn btn-success" type="button" onclick="setDefaultTraffic()">修改</button>
  243. </span>
  244. </div>
  245. <span class="help-block"> 用户注册时默认可用流量 </span>
  246. </div>
  247. </div>
  248. </div>
  249. <div class="form-group">
  250. <div class="col-md-6 col-sm-6 col-xs-12">
  251. <label for="invite_num" class="col-md-3 control-label">可生成邀请码数</label>
  252. <div class="col-md-9">
  253. <div class="input-group">
  254. <input class="form-control" type="text" name="invite_num" value="{{$invite_num}}" id="invite_num" />
  255. <span class="input-group-btn">
  256. <button class="btn btn-success" type="button" onclick="setInviteNum()">修改</button>
  257. </span>
  258. </div>
  259. <span class="help-block"> 用户可以生成的邀请码数 </span>
  260. </div>
  261. </div>
  262. <div class="col-md-6 col-sm-6 col-xs-12">
  263. <label for="reset_password_times" class="col-md-3 control-label">重置密码次数</label>
  264. <div class="col-md-9">
  265. <div class="input-group">
  266. <input class="form-control" type="text" name="reset_password_times" value="{{$reset_password_times}}" id="reset_password_times" />
  267. <span class="input-group-btn">
  268. <button class="btn btn-success" type="button" onclick="setResetPasswordTimes()">修改</button>
  269. </span>
  270. </div>
  271. <span class="help-block"> 24小时内可以通过邮件重置密码次数 </span>
  272. </div>
  273. </div>
  274. </div>
  275. <div class="form-group">
  276. <div class="col-md-6 col-sm-6 col-xs-12">
  277. <label for="active_times" class="col-md-3 control-label">激活账号次数</label>
  278. <div class="col-md-9">
  279. <div class="input-group">
  280. <input class="form-control" type="text" name="active_times" value="{{$active_times}}" id="active_times" />
  281. <span class="input-group-btn">
  282. <button class="btn btn-success" type="button" onclick="setActiveTimes()">修改</button>
  283. </span>
  284. </div>
  285. <span class="help-block"> 24小时内可以通过邮件激活账号次数 </span>
  286. </div>
  287. </div>
  288. <div class="col-md-6 col-sm-6 col-xs-12">
  289. <label for="register_ip_limit" class="col-md-3 control-label">同IP注册限制</label>
  290. <div class="col-md-9">
  291. <div class="input-group">
  292. <input class="form-control" type="text" name="register_ip_limit" value="{{$register_ip_limit}}" id="register_ip_limit" />
  293. <span class="input-group-btn">
  294. <button class="btn btn-success" type="button" onclick="setRegisterIpLimit()">修改</button>
  295. </span>
  296. </div>
  297. <span class="help-block"> 同IP在24小时内允许注册数量,为0时不限制 </span>
  298. </div>
  299. </div>
  300. </div>
  301. <div class="form-group">
  302. <div class="col-md-6 col-sm-6 col-xs-12">
  303. <label for="initial_labels_for_user" class="col-md-3 control-label">用户初始标签</label>
  304. <div class="col-md-9">
  305. <select id="initial_labels_for_user" class="form-control select2-multiple" name="initial_labels_for_user" multiple="multiple">
  306. @foreach($label_list as $label)
  307. <option value="{{$label->id}}" @if(in_array($label->id, explode(',', $initial_labels_for_user))) selected @endif>{{$label->name}}</option>
  308. @endforeach
  309. </select>
  310. <span class="help-block"> 注册用户时的初始标签 </span>
  311. </div>
  312. </div>
  313. <div class="col-md-6 col-sm-6 col-xs-12">
  314. <label for="goods_purchase_limit_strategy" class="col-md-3 control-label">商品限购</label>
  315. <div class="col-md-9">
  316. <select id="goods_purchase_limit_strategy" class="form-control select2" name="goods_purchase_limit_strategy">
  317. <option value="none" @if($goods_purchase_limit_strategy == 'none') selected @endif>不限制</option>
  318. <option value="package" @if($goods_purchase_limit_strategy == 'package') selected @endif>仅限套餐</option>
  319. <option value="free" @if($goods_purchase_limit_strategy == 'free') selected @endif>仅限免费商品</option>
  320. <option value="package&free" @if($goods_purchase_limit_strategy == 'package&free') selected @endif>限套餐和免费商品</option>
  321. <option value="all" @if($goods_purchase_limit_strategy == 'all') selected @endif>限全部商品</option>
  322. </select>
  323. <span class="help-block"> 是否限制用户重复购买商品,限制后用户不可重复购买已购买的、尚在有效期的商品 </span>
  324. </div>
  325. </div>
  326. </div>
  327. <div class="form-group">
  328. <div class="col-md-6 col-sm-6 col-xs-12">
  329. <label for="subscribe_domain" class="col-md-3 control-label">节点订阅地址</label>
  330. <div class="col-md-9">
  331. <div class="input-group">
  332. <input class="form-control" type="text" name="subscribe_domain" value="{{$subscribe_domain}}" id="subscribe_domain" />
  333. <span class="input-group-btn">
  334. <button class="btn btn-success" type="button" onclick="setSubscribeDomain()">修改</button>
  335. </span>
  336. </div>
  337. <span class="help-block"> (推荐)防止面板域名被DNS投毒后无法正常订阅,需带http://或https:// </span>
  338. </div>
  339. </div>
  340. <div class="col-md-6 col-sm-6 col-xs-12">
  341. <label for="subscribe_max" class="col-md-3 control-label">订阅节点数</label>
  342. <div class="col-md-9">
  343. <div class="input-group">
  344. <input class="form-control" type="text" name="subscribe_max" value="{{$subscribe_max}}" id="subscribe_max" />
  345. <span class="input-group-btn">
  346. <button class="btn btn-success" type="button" onclick="setSubscribeMax()">修改</button>
  347. </span>
  348. </div>
  349. <span class="help-block"> 客户端订阅时取得几个节点 </span>
  350. </div>
  351. </div>
  352. </div>
  353. <div class="form-group">
  354. <div class="col-md-6 col-sm-6 col-xs-12">
  355. <label for="mix_subscribe" class="col-md-3 control-label">混合订阅</label>
  356. <div class="col-md-9">
  357. <input type="checkbox" class="make-switch" @if($mix_subscribe) checked @endif id="mix_subscribe" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  358. <span class="help-block"> 启用后,订阅信息中将包含V2Ray节点信息(Vmess) </span>
  359. </div>
  360. </div>
  361. <div class="col-md-6 col-sm-6 col-xs-12">
  362. <label for="rand_subscribe" class="col-md-3 control-label">随机订阅</label>
  363. <div class="col-md-9">
  364. <input type="checkbox" class="make-switch" @if($rand_subscribe) checked @endif id="rand_subscribe" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  365. <span class="help-block"> 启用后,订阅时将随机返回节点信息,否则按节点排序返回(仅支持Shadowrocket、Quantumult) </span>
  366. </div>
  367. </div>
  368. </div>
  369. <div class="form-group">
  370. <div class="col-md-6 col-sm-6 col-xs-12">
  371. <label for="is_custom_subscribe" class="col-md-3 control-label">高级订阅</label>
  372. <div class="col-md-9">
  373. <input type="checkbox" class="make-switch" @if($is_custom_subscribe) checked @endif id="is_custom_subscribe" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  374. <span class="help-block"> 启用后,订阅信息顶部将显示过期时间、剩余流量 </span>
  375. </div>
  376. </div>
  377. <div class="col-md-6 col-sm-6 col-xs-12"></div>
  378. </div>
  379. </div>
  380. </form>
  381. </div>
  382. <div class="tab-pane" id="tab_3">
  383. <form action="#" method="post" class="form-horizontal">
  384. <div class="portlet-body">
  385. <div class="form-group">
  386. <div class="col-md-6 col-sm-6 col-xs-12">
  387. <label for="login_add_score" class="col-md-3 control-label">登录加积分</label>
  388. <div class="col-md-9">
  389. <input type="checkbox" class="make-switch" @if($login_add_score) checked @endif id="login_add_score" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  390. <span class="help-block"> 登录时将根据积分范围随机得到积分 </span>
  391. </div>
  392. </div>
  393. <div class="col-md-6 col-sm-6 col-xs-12">
  394. <label for="login_add_score_range" class="col-md-3 control-label">时间间隔</label>
  395. <div class="col-md-9">
  396. <div class="input-group">
  397. <input class="form-control" type="text" name="login_add_score_range" value="{{$login_add_score_range}}" id="login_add_score_range" />
  398. <span class="input-group-addon">分钟</span>
  399. <span class="input-group-btn">
  400. <button class="btn btn-success" type="button" onclick="setLoginAddScoreRange()">修改</button>
  401. </span>
  402. </div>
  403. <span class="help-block"> 间隔多久登录才会加积分 </span>
  404. </div>
  405. </div>
  406. </div>
  407. <div class="form-group">
  408. <div class="col-md-6 col-sm-6 col-xs-12">
  409. <label class="col-md-3 control-label">积分范围</label>
  410. <div class="col-md-9">
  411. <div class="input-group input-large input-daterange">
  412. <input type="text" class="form-control" name="min_rand_score" value="{{$min_rand_score}}" id="min_rand_score">
  413. <span class="input-group-addon"> ~ </span>
  414. <input type="text" class="form-control" name="max_rand_score" value="{{$max_rand_score}}" id="max_rand_score">
  415. </div>
  416. </div>
  417. </div>
  418. <div class="col-md-6 col-sm-6 col-xs-12">
  419. </div>
  420. </div>
  421. </div>
  422. </form>
  423. </div>
  424. <div class="tab-pane" id="tab_4">
  425. <form action="#" method="post" class="form-horizontal">
  426. <div class="portlet-body">
  427. <div class="form-group">
  428. <div class="col-md-6 col-sm-6 col-xs-12">
  429. <label for="referral_status" class="col-md-3 control-label">本功能</label>
  430. <div class="col-md-9">
  431. <input type="checkbox" class="make-switch" @if($referral_status) checked @endif id="referral_status" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  432. <span class="help-block"> 关闭后用户不可见,但是不影响其正常邀请返利 </span>
  433. </div>
  434. </div>
  435. <div class="col-md-6 col-sm-6 col-xs-12">
  436. <label for="referral_traffic" class="col-md-3 control-label">注册送流量</label>
  437. <div class="col-md-9">
  438. <div class="input-group">
  439. <input class="form-control" type="text" name="referral_gift_traffic" value="{{$referral_traffic}}" id="referral_traffic" />
  440. <span class="input-group-addon">MiB</span>
  441. <span class="input-group-btn">
  442. <button class="btn btn-success" type="button" onclick="setReferralTraffic()">修改</button>
  443. </span>
  444. </div>
  445. <span class="help-block"> 根据推广链接、邀请码注册则赠送相应的流量 </span>
  446. </div>
  447. </div>
  448. </div>
  449. <div class="form-group">
  450. <div class="col-md-6 col-sm-6 col-xs-12">
  451. <label for="referral_percent" class="col-md-3 control-label">返利比例</label>
  452. <div class="col-md-9">
  453. <div class="input-group">
  454. <input class="form-control" type="text" name="referral_percent" value="{{$referral_percent * 100}}" id="referral_percent" />
  455. <span class="input-group-addon">%</span>
  456. <span class="input-group-btn">
  457. <button class="btn btn-success" type="button" onclick="setReferralPercent()">修改</button>
  458. </span>
  459. </div>
  460. <span class="help-block"> 根据推广链接注册的账号每笔消费推广人可以分成的比例 </span>
  461. </div>
  462. </div>
  463. <div class="col-md-6 col-sm-6 col-xs-12">
  464. <label for="referral_money" class="col-md-3 control-label">提现限制</label>
  465. <div class="col-md-9">
  466. <div class="input-group">
  467. <input class="form-control" type="text" name="referral_money" value="{{$referral_money}}" id="referral_money" />
  468. <span class="input-group-addon">元</span>
  469. <span class="input-group-btn">
  470. <button class="btn btn-success" type="button" onclick="setReferralMoney()">修改</button>
  471. </span>
  472. </div>
  473. <span class="help-block"> 满多少元才可以申请提现 </span>
  474. </div>
  475. </div>
  476. </div>
  477. </div>
  478. </form>
  479. </div>
  480. <div class="tab-pane" id="tab_5">
  481. <form action="#" method="post" class="form-horizontal">
  482. <div class="portlet-body">
  483. <div class="form-group">
  484. <div class="col-md-6 col-sm-6 col-xs-12">
  485. <label for="expire_warning" class="col-md-3 control-label">用户过期警告</label>
  486. <div class="col-md-9">
  487. <input type="checkbox" class="make-switch" @if($expire_warning) checked @endif id="expire_warning" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  488. <span class="help-block"> 启用后账号距到期还剩阈值设置的值时自动发邮件提醒用户 </span>
  489. </div>
  490. </div>
  491. <div class="col-md-6 col-sm-6 col-xs-12">
  492. <label for="expire_days" class="col-md-3 control-label">过期警告阈值</label>
  493. <div class="col-md-9">
  494. <div class="input-group">
  495. <input class="form-control" type="text" name="expire_days" value="{{$expire_days}}" id="expire_days" />
  496. <span class="input-group-addon">天</span>
  497. <span class="input-group-btn">
  498. <button class="btn btn-success" type="button" onclick="setExpireDays()">修改</button>
  499. </span>
  500. </div>
  501. <span class="help-block"> 账号距离过期还差多少天时发警告邮件 </span>
  502. </div>
  503. </div>
  504. </div>
  505. <div class="form-group">
  506. <div class="col-md-6 col-sm-6 col-xs-12">
  507. <label for="traffic_warning" class="col-md-3 control-label">用户流量警告</label>
  508. <div class="col-md-9">
  509. <input type="checkbox" class="make-switch" @if($traffic_warning) checked @endif id="traffic_warning" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  510. <span class="help-block"> 启用后账号已使用流量超过警告阈值时自动发邮件提醒用户 </span>
  511. </div>
  512. </div>
  513. <div class="col-md-6 col-sm-6 col-xs-12">
  514. <label for="traffic_warning_percent" class="col-md-3 control-label">流量警告阈值</label>
  515. <div class="col-md-9">
  516. <div class="input-group">
  517. <input class="form-control" type="text" name="traffic_warning_percent" value="{{$traffic_warning_percent}}" id="traffic_warning_percent" />
  518. <span class="input-group-addon">%</span>
  519. <span class="input-group-btn">
  520. <button class="btn btn-success" type="button" onclick="setTrafficWarningPercent()">修改</button>
  521. </span>
  522. </div>
  523. <span class="help-block"> 建议设置在70%~90% </span>
  524. </div>
  525. </div>
  526. </div>
  527. <div class="form-group">
  528. <div class="col-md-6 col-sm-6 col-xs-12">
  529. <label for="is_node_crash_warning" class="col-md-3 control-label">节点宕机提醒</label>
  530. <div class="col-md-9">
  531. <input type="checkbox" class="make-switch" @if($is_node_crash_warning) checked @endif id="is_node_crash_warning" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  532. <span class="help-block"> 启用后如果节点宕机则发出提醒邮件 </span>
  533. </div>
  534. </div>
  535. <div class="col-md-6 col-sm-6 col-xs-12">
  536. <label for="crash_warning_email" class="col-md-3 control-label">管理员收信地址</label>
  537. <div class="col-md-9">
  538. <div class="input-group">
  539. <input class="form-control" type="text" name="crash_warning_email" value="{{$crash_warning_email}}" id="crash_warning_email" placeholder="[email protected]" />
  540. <span class="input-group-btn">
  541. <button class="btn btn-success" type="button" onclick="setCrashWarningEmail()">修改</button>
  542. </span>
  543. </div>
  544. <span class="help-block"> 填写此值则节点宕机、用户回复工单都会自动提醒 </span>
  545. </div>
  546. </div>
  547. </div>
  548. <div class="form-group">
  549. <div class="col-md-6 col-sm-6 col-xs-12">
  550. <label for="is_tcp_check" class="col-md-3 control-label">TCP阻断检测</label>
  551. <div class="col-md-9">
  552. <input type="checkbox" class="make-switch" @if($is_tcp_check) checked @endif id="is_tcp_check" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  553. <span class="help-block"> 每30~60分钟内随机检测节点是否被TCP阻断并提醒 </span>
  554. </div>
  555. </div>
  556. <div class="col-md-6 col-sm-6 col-xs-12">
  557. <label for="tcp_check_warning_times" class="col-md-3 control-label">阻断检测提醒</label>
  558. <div class="col-md-9">
  559. <div class="input-group">
  560. <input class="form-control" type="text" name="tcp_check_warning_times" value="{{$tcp_check_warning_times}}" id="tcp_check_warning_times" placeholder="" />
  561. <span class="input-group-addon">次</span>
  562. <span class="input-group-btn">
  563. <button class="btn btn-success" type="button" onclick="setTcpCheckWarningTimes()">修改</button>
  564. </span>
  565. </div>
  566. <span class="help-block"> 提醒几次后自动下线节点,为0时不限制,不超过12 </span>
  567. </div>
  568. </div>
  569. </div>
  570. <div class="form-group">
  571. <div class="col-md-6 col-sm-6 col-xs-12">
  572. <label for="is_server_chan" class="col-md-3 control-label">ServerChan</label>
  573. <div class="col-md-9">
  574. <input type="checkbox" class="make-switch" @if($is_server_chan) checked @endif id="is_server_chan" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  575. <span class="help-block"> 推送节点宕机提醒、用户流量异常警告、节点使用报告(<a href="http://sc.ftqq.com" target="_blank">绑定微信</a>) </span>
  576. </div>
  577. </div>
  578. <div class="col-md-6 col-sm-6 col-xs-12">
  579. <label for="server_chan_key" class="col-md-3 control-label">SCKEY</label>
  580. <div class="col-md-9">
  581. <div class="input-group">
  582. <input class="form-control" type="text" name="server_chan_key" value="{{$server_chan_key}}" id="server_chan_key" placeholder="请到ServerChan申请" />
  583. <span class="input-group-btn">
  584. <button class="btn btn-success" type="button" onclick="setServerChanKey()">修改</button>
  585. </span>
  586. </div>
  587. <span class="help-block"> 启用ServerChan,请务必填入本值(<a href="http://sc.ftqq.com" target="_blank">申请SCKEY</a>) </span>
  588. </div>
  589. </div>
  590. </div>
  591. <div class="form-group">
  592. <div class="col-md-6 col-sm-6 col-xs-12">
  593. <label for="is_push_bear" class="col-md-3 control-label">PushBear</label>
  594. <div class="col-md-9">
  595. <input type="checkbox" class="make-switch" @if($is_push_bear) checked @endif id="is_push_bear" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  596. <span class="help-block"> 使用PushBear推送微信消息给用户(<a href="https://pushbear.ftqq.com/admin/#/signin" target="_blank">创建消息通道</a>) </span>
  597. </div>
  598. </div>
  599. <div class="col-md-6 col-sm-6 col-xs-12">
  600. <label for="push_bear_send_key" class="col-md-3 control-label">PushBear SendKey</label>
  601. <div class="col-md-9">
  602. <div class="input-group">
  603. <input class="form-control" type="text" name="push_bear_send_key" value="{{$push_bear_send_key}}" id="push_bear_send_key" placeholder="创建消息通道后即可获取" />
  604. <span class="input-group-btn">
  605. <button class="btn btn-success" type="button" onclick="setPushBearSendKey()">修改</button>
  606. </span>
  607. </div>
  608. <span class="help-block"> 启用PushBear,请务必填入本值 </span>
  609. </div>
  610. </div>
  611. </div>
  612. <div class="form-group">
  613. <div class="col-md-6 col-sm-6 col-xs-12">
  614. <label for="push_bear_qrcode" class="col-md-3 control-label">PushBear订阅二维码</label>
  615. <div class="col-md-9">
  616. <div class="input-group">
  617. <input class="form-control" type="text" name="push_bear_qrcode" value="{{$push_bear_qrcode}}" id="push_bear_qrcode" placeholder="填入创建好的消息通道的二维码URL" />
  618. <span class="input-group-btn">
  619. <button class="btn btn-success" type="button" onclick="setPushBearQrCode()">修改</button>
  620. </span>
  621. </div>
  622. <span class="help-block"> 创建消息通道后,在二维码上点击右键“复制图片地址”并粘贴至此处 </span>
  623. </div>
  624. </div>
  625. <div class="col-md-6 col-sm-6 col-xs-12"></div>
  626. </div>
  627. </div>
  628. </form>
  629. </div>
  630. <div class="tab-pane" id="tab_6">
  631. <form action="#" method="post" class="form-horizontal">
  632. <div class="portlet-body">
  633. <div class="form-group">
  634. <div class="col-md-6 col-sm-6 col-xs-12">
  635. <label for="is_clear_log" class="col-md-3 control-label">自动清除日志</label>
  636. <div class="col-md-9">
  637. <input type="checkbox" class="make-switch" @if($is_clear_log) checked @endif id="is_clear_log" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  638. <span class="help-block"> (推荐)启用后自动清除无用日志 </span>
  639. </div>
  640. </div>
  641. <div class="col-md-6 col-sm-6 col-xs-12">
  642. <label for="reset_traffic" class="col-md-3 control-label">流量自动重置</label>
  643. <div class="col-md-9">
  644. <input type="checkbox" class="make-switch" @if($reset_traffic) checked @endif id="reset_traffic" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  645. <span class="help-block"> 用户会按其购买套餐的日期自动重置可用流量 </span>
  646. </div>
  647. </div>
  648. </div>
  649. <div class="form-group">
  650. <div class="col-md-6 col-sm-6 col-xs-12">
  651. <label for="is_subscribe_ban" class="col-md-3 control-label">订阅异常自动封禁</label>
  652. <div class="col-md-9">
  653. <input type="checkbox" class="make-switch" @if($is_subscribe_ban) checked @endif id="is_subscribe_ban" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  654. <span class="help-block"> 启用后用户订阅链接请求超过设定阈值则自动封禁 </span>
  655. </div>
  656. </div>
  657. <div class="col-md-6 col-sm-6 col-xs-12">
  658. <label for="subscribe_ban_times" class="col-md-3 control-label">订阅请求阈值</label>
  659. <div class="col-md-9">
  660. <div class="input-group">
  661. <input class="form-control" type="text" name="subscribe_ban_times" value="{{$subscribe_ban_times}}" id="subscribe_ban_times" />
  662. <span class="input-group-btn">
  663. <button class="btn btn-success" type="button" onclick="setSubscribeBanTimes()">修改</button>
  664. </span>
  665. </div>
  666. <span class="help-block"> 24小时内订阅链接请求次数限制 </span>
  667. </div>
  668. </div>
  669. </div>
  670. <div class="form-group">
  671. <div class="col-md-6 col-sm-6 col-xs-12">
  672. <label for="is_traffic_ban" class="col-md-3 control-label">异常自动封号</label>
  673. <div class="col-md-9">
  674. <input type="checkbox" class="make-switch" @if($is_traffic_ban) checked @endif id="is_traffic_ban" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  675. <span class="help-block"> 1小时内流量超过异常阈值则自动封号(仅禁用代理) </span>
  676. </div>
  677. </div>
  678. <div class="col-md-6 col-sm-6 col-xs-12">
  679. <label for="traffic_ban_value" class="col-md-3 control-label">流量异常阈值</label>
  680. <div class="col-md-9">
  681. <div class="input-group">
  682. <input class="form-control" type="text" name="traffic_ban_value" value="{{$traffic_ban_value}}" id="traffic_ban_value" />
  683. <span class="input-group-addon">GiB</span>
  684. <span class="input-group-btn">
  685. <button class="btn btn-success" type="button" onclick="setTrafficBanValue()">修改</button>
  686. </span>
  687. </div>
  688. <span class="help-block"> 1小时内超过该值,则触发自动封号 </span>
  689. </div>
  690. </div>
  691. </div>
  692. <div class="form-group">
  693. <div class="col-md-6 col-sm-6 col-xs-12">
  694. <label for="traffic_ban_time" class="col-md-3 control-label">封号时长</label>
  695. <div class="col-md-9">
  696. <div class="input-group">
  697. <input class="form-control" type="text" name="traffic_ban_time" value="{{$traffic_ban_time}}" id="traffic_ban_time" />
  698. <span class="input-group-addon">分钟</span>
  699. <span class="input-group-btn">
  700. <button class="btn btn-success" type="button" onclick="setTrafficBanTime()">修改</button>
  701. </span>
  702. </div>
  703. <span class="help-block"> 触发流量异常导致用户被封禁的时长,到期后自动解封 </span>
  704. </div>
  705. </div>
  706. <div class="col-md-6 col-sm-6 col-xs-12">
  707. <label for="auto_release_port" class="col-md-3 control-label">端口自动释放</label>
  708. <div class="col-md-9">
  709. <input type="checkbox" class="make-switch" @if($auto_release_port) checked @endif id="auto_release_port" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  710. <span class="help-block"> 被封禁和过期一个月的用户端口自动释放 </span>
  711. </div>
  712. </div>
  713. </div>
  714. <div class="form-group">
  715. <div class="col-md-6 col-sm-6 col-xs-12">
  716. <label for="is_ban_status" class="col-md-3 control-label">过期自动封禁</label>
  717. <div class="col-md-9">
  718. <input type="checkbox" class="make-switch" @if($is_ban_status) checked @endif id="is_ban_status" data-on-color="danger" data-off-color="danger" data-on-text="封禁整个账号" data-off-text="仅封禁代理">
  719. <span class="help-block"> (慎重)封禁整个账号会重置账号的所有数据且会导致用户无法登录 </span>
  720. </div>
  721. </div>
  722. <div class="col-md-6 col-sm-6 col-xs-12">
  723. <label for="node_daily_report" class="col-md-3 control-label">节点使用报告</label>
  724. <div class="col-md-9">
  725. <input type="checkbox" class="make-switch" @if($node_daily_report) checked @endif id="node_daily_report" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  726. <span class="help-block"> 每天早上9点推送昨天节点的使用情况 </span>
  727. </div>
  728. </div>
  729. </div>
  730. </div>
  731. </form>
  732. </div>
  733. <div class="tab-pane" id="tab_7">
  734. <form action="{{url('admin/setExtend')}}" method="post" enctype="multipart/form-data" class="form-horizontal" role="form" id="setExtend">
  735. {{csrf_field()}}
  736. <div class="form-group">
  737. <div class="col-md-6 col-sm-6 col-xs-12">
  738. <label class="control-label col-md-2 col-xs-4">首页LOGO</label>
  739. <div class="col-md-8 col-xs-8">
  740. <div class="fileinput fileinput-new" data-provides="fileinput">
  741. <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
  742. @if ($website_home_logo)
  743. <img src="{{$website_home_logo}}" alt="" />
  744. @else
  745. <img src="/assets/images/noimage.png" alt="" />
  746. @endif
  747. </div>
  748. <span class="help-block"> 推荐尺寸:300 X 90,透明背景 </span>
  749. <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;"> </div>
  750. <div>
  751. <span class="btn default btn-file">
  752. <span class="fileinput-new"> 选择 </span>
  753. <span class="fileinput-exists"> 更换 </span>
  754. <input type="file" name="website_home_logo" id="website_home_logo">
  755. </span>
  756. <a href="javascript:;" class="btn red fileinput-exists" data-dismiss="fileinput"> 移除 </a>
  757. </div>
  758. </div>
  759. </div>
  760. </div>
  761. <div class="col-md-6 col-sm-6 col-xs-12">
  762. <label class="control-label col-md-2 col-xs-4">站内LOGO</label>
  763. <div class="col-md-8 col-xs-8">
  764. <div class="fileinput fileinput-new" data-provides="fileinput">
  765. <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
  766. @if ($website_logo)
  767. <img src="{{$website_logo}}" alt="" />
  768. @else
  769. <img src="/assets/images/noimage.png" alt="" />
  770. @endif
  771. </div>
  772. <span class="help-block"> 推荐尺寸:150 X 30,透明背景 </span>
  773. <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;"> </div>
  774. <div>
  775. <span class="btn default btn-file">
  776. <span class="fileinput-new"> 选择 </span>
  777. <span class="fileinput-exists"> 更换 </span>
  778. <input type="file" name="website_logo" id="website_logo">
  779. </span>
  780. <a href="javascript:;" class="btn red fileinput-exists" data-dismiss="fileinput"> 移除 </a>
  781. </div>
  782. </div>
  783. </div>
  784. </div>
  785. </div>
  786. <div class="form-group">
  787. <div class="col-md-6 col-sm-6 col-xs-12">
  788. <label for="website_analytics" class=" control-label col-md-2 col-xs-4">统计代码</label>
  789. <div class="col-md-8 col-xs-6">
  790. <textarea class="form-control" rows="10" name="website_analytics" id="website_analytics">{{$website_analytics}}</textarea>
  791. </div>
  792. </div>
  793. <div class="col-md-6 col-sm-6 col-xs-12">
  794. <label for="website_customer_service" class=" control-label col-md-2 col-xs-4">客服代码</label>
  795. <div class="col-md-8 col-xs-6">
  796. <textarea class="form-control" rows="10" name="website_customer_service" id="website_customer_service">{{$website_customer_service}}</textarea>
  797. </div>
  798. </div>
  799. </div>
  800. <div class="form-group">
  801. <div class="col-md-offset-2 col-md-10">
  802. <button type="submit" class="btn blue">提交</button>
  803. </div>
  804. </div>
  805. </form>
  806. </div>
  807. <div class="tab-pane" id="tab_8">
  808. <form action="#" method="post" class="form-horizontal">
  809. <div class="portlet-body">
  810. <div class="form-group">
  811. <div class="col-md-12">
  812. <div class="alert alert-info" style="text-align: center;">
  813. 请在<a href="https://console.youzanyun.com/login" target="_blank" style="color: red;"> 有赞云 </a>设置应用的推送网址为:{{$website_url . '/api/yzy'}}
  814. </div>
  815. </div>
  816. </div>
  817. <div class="form-group">
  818. <div class="col-md-6 col-sm-6 col-xs-12">
  819. <label for="is_youzan" class="col-md-3 control-label">本功能</label>
  820. <div class="col-md-9">
  821. <input type="checkbox" class="make-switch" @if($is_youzan) checked @endif id="is_youzan" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  822. <span class="help-block"> 请先到 <a href="https://console.youzanyun.com/dashboard">有赞云</a> 申请client_id和client_secret(<a href="https://github.com/ssrpanel/SSRPanel/wiki/%E6%9C%89%E8%B5%9E%E4%BA%91%E6%94%AF%E4%BB%98" target="_blank">申请教程</a>) </span>
  823. </div>
  824. </div>
  825. <div class="col-md-6 col-sm-6 col-xs-12">
  826. <label for="kdt_id" class="col-md-3 control-label">kdt_id</label>
  827. <div class="col-md-9">
  828. <div class="input-group">
  829. <input class="form-control" type="text" name="kdt_id" value="{{$kdt_id}}" id="kdt_id" />
  830. <span class="input-group-btn">
  831. <button class="btn btn-success" type="button" onclick="setKdtId()">修改</button>
  832. </span>
  833. </div>
  834. <span class="help-block"> 即:授权店铺id </span>
  835. </div>
  836. </div>
  837. </div>
  838. <div class="form-group">
  839. <div class="col-md-6 col-sm-6 col-xs-12">
  840. <label for="youzan_client_id" class="col-md-3 control-label">client_id</label>
  841. <div class="col-md-9">
  842. <div class="input-group">
  843. <input class="form-control" type="text" name="youzan_client_id" value="{{$youzan_client_id}}" id="youzan_client_id" />
  844. <span class="input-group-btn">
  845. <button class="btn btn-success" type="button" onclick="setYouzanClientId()">修改</button>
  846. </span>
  847. </div>
  848. </div>
  849. </div>
  850. <div class="col-md-6 col-sm-6 col-xs-12">
  851. <label for="youzan_client_secret" class="col-md-3 control-label">client_secret</label>
  852. <div class="col-md-9">
  853. <div class="input-group">
  854. <input class="form-control" type="text" name="youzan_client_secret" value="{{$youzan_client_secret}}" id="youzan_client_secret" />
  855. <span class="input-group-btn">
  856. <button class="btn btn-success" type="button" onclick="setYouzanClientSecret()">修改</button>
  857. </span>
  858. </div>
  859. </div>
  860. </div>
  861. </div>
  862. </div>
  863. </form>
  864. </div>
  865. <div class="tab-pane" id="tab_9">
  866. <form action="#" method="post" class="form-horizontal">
  867. <div class="portlet-body">
  868. <div class="form-group">
  869. <div class="col-md-6 col-sm-6 col-xs-12">
  870. <label for="is_alipay" class="col-md-3 control-label">本功能</label>
  871. <div class="col-md-9">
  872. <input type="checkbox" class="make-switch" @if($is_alipay) checked @endif id="is_alipay" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  873. <span class="help-block"> 请先到 <a href="https://global.alipay.com/" target="_blank">AliPay国际</a> 申请partner和key </span>
  874. </div>
  875. </div>
  876. <div class="col-md-6 col-sm-6 col-xs-12">
  877. <label for="alipay_currency" class="col-md-3 control-label">结算币种</label>
  878. <div class="col-md-9">
  879. <select id="alipay_currency" class="form-control select2" name="alipay_currency">
  880. <option value="USD" @if($alipay_currency == 'USD') selected @endif>美元</option>
  881. <option value="HKD" @if($alipay_currency == 'HKD') selected @endif>港币</option>
  882. <option value="JPY" @if($alipay_currency == 'JPY') selected @endif>日元</option>
  883. <option value="EUR" @if($alipay_currency == 'EUR') selected @endif>欧元</option>
  884. </select>
  885. </div>
  886. </div>
  887. </div>
  888. <div class="form-group">
  889. <div class="col-md-6 col-sm-6 col-xs-12">
  890. <label for="alipay_sign_type" class="col-md-3 control-label">加密方式</label>
  891. <div class="col-md-9">
  892. <select id="alipay_sign_type" class="form-control select2" name="alipay_sign_type">
  893. <option value="MD5" @if($alipay_sign_type == 'MD5') selected @endif>MD5</option>
  894. <option value="RSA" @if($alipay_sign_type == 'RSA') selected @endif>RSA</option>
  895. </select>
  896. </div>
  897. </div>
  898. <div class="col-md-6 col-sm-6 col-xs-12">
  899. <label for="alipay_transport" class="col-md-3 control-label">启用SSL验证</label>
  900. <div class="col-md-9">
  901. <select id="alipay_transport" class="form-control select2" name="alipay_transport">
  902. <option value="http" @if($alipay_transport == 'http') selected @endif>否</option>
  903. <option value="https" @if($alipay_transport == 'https') selected @endif>是</option>
  904. </select>
  905. <span class="help-block"> HTTPS站点需启用 </span>
  906. </div>
  907. </div>
  908. </div>
  909. <div class="form-group">
  910. <div class="col-md-6 col-sm-6 col-xs-12">
  911. <label for="alipay_partner" class="col-md-3 control-label">partner</label>
  912. <div class="col-md-9">
  913. <div class="input-group">
  914. <input class="form-control" type="text" name="alipay_partner" value="{{$alipay_partner}}" id="alipay_partner" />
  915. <span class="input-group-btn">
  916. <button class="btn btn-success" type="button" onclick="setAlipayPartner()">修改</button>
  917. </span>
  918. </div>
  919. </div>
  920. </div>
  921. <div class="col-md-6 col-sm-6 col-xs-12">
  922. <label for="alipay_key" class="col-md-3 control-label">key</label>
  923. <div class="col-md-9">
  924. <div class="input-group">
  925. <input class="form-control" type="password" name="alipay_key" value="{{$alipay_key}}" id="alipay_key" />
  926. <span class="input-group-btn">
  927. <button class="btn btn-success" type="button" onclick="setAlipayKey()">修改</button>
  928. </span>
  929. </div>
  930. </div>
  931. </div>
  932. </div>
  933. <div class="form-group">
  934. <div class="col-md-6 col-sm-6 col-xs-12">
  935. <label for="alipay_private_key" class="col-md-3 control-label">RSA私钥</label>
  936. <div class="col-md-9">
  937. <div class="input-group">
  938. <input class="form-control" type="password" name="alipay_private_key" value="{{$alipay_private_key}}" id="alipay_private_key" />
  939. <span class="input-group-btn">
  940. <button class="btn btn-success" type="button" onclick="setAlipayPrivateKey()">修改</button>
  941. </span>
  942. </div>
  943. </div>
  944. </div>
  945. <div class="col-md-6 col-sm-6 col-xs-12">
  946. <label for="alipay_public_key" class="col-md-3 control-label">RSA公钥</label>
  947. <div class="col-md-9">
  948. <div class="input-group">
  949. <input class="form-control" type="password" name="alipay_public_key" value="{{$alipay_public_key}}" id="alipay_public_key" />
  950. <span class="input-group-btn">
  951. <button class="btn btn-success" type="button" onclick="setAlipayPublicKey()">修改</button>
  952. </span>
  953. </div>
  954. </div>
  955. </div>
  956. </div>
  957. </div>
  958. </form>
  959. </div>
  960. </div>
  961. </div>
  962. </div>
  963. </div>
  964. </div>
  965. </div>
  966. <!-- END PROFILE CONTENT -->
  967. </div>
  968. </div>
  969. <!-- END PAGE BASE CONTENT -->
  970. </div>
  971. <!-- END CONTENT BODY -->
  972. @endsection
  973. @section('script')
  974. <script src="/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
  975. <script src="/assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js" type="text/javascript"></script>
  976. <script src="/assets/global/plugins/select2/js/select2.full.min.js" type="text/javascript"></script>
  977. <script type="text/javascript">
  978. // 注册的默认标签
  979. $('#initial_labels_for_user').select2({
  980. theme: 'bootstrap',
  981. placeholder: '设置后则可见相同标签的节点',
  982. allowClear: true,
  983. width:'100%'
  984. }).change(function () {
  985. var initial_labels_for_user = $(this).val() ? $(this).val().join(',') : '';
  986. console.log(initial_labels_for_user);
  987. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'initial_labels_for_user', value:initial_labels_for_user}, function (ret) {
  988. layer.msg(ret.message, {time:1000}, function() {
  989. if (ret.status == 'fail') {
  990. window.location.reload();
  991. }
  992. });
  993. });
  994. });
  995. // 启用、禁用随机端口
  996. $('#is_rand_port').on({
  997. 'switchChange.bootstrapSwitch': function(event, state) {
  998. var is_rand_port = state ? 1 : 0;
  999. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_rand_port', value:is_rand_port}, function (ret) {
  1000. layer.msg(ret.message, {time:1000}, function() {
  1001. if (ret.status == 'fail') {
  1002. window.location.reload();
  1003. }
  1004. });
  1005. });
  1006. }
  1007. });
  1008. // 启用、禁用屏蔽大陆访问
  1009. $('#is_forbid_china').on({
  1010. 'switchChange.bootstrapSwitch': function(event, state) {
  1011. var is_forbid_china = state ? 1 : 0;
  1012. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_forbid_china', value:is_forbid_china}, function (ret) {
  1013. layer.msg(ret.message, {time:1000}, function() {
  1014. if (ret.status == 'fail') {
  1015. window.location.reload();
  1016. }
  1017. });
  1018. });
  1019. }
  1020. });
  1021. // 启用、禁用屏蔽海外访问
  1022. $('#is_forbid_oversea').on({
  1023. 'switchChange.bootstrapSwitch': function(event, state) {
  1024. var is_forbid_oversea = state ? 1 : 0;
  1025. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_forbid_oversea', value:is_forbid_oversea}, function (ret) {
  1026. layer.msg(ret.message, {time:1000}, function() {
  1027. if (ret.status == 'fail') {
  1028. window.location.reload();
  1029. }
  1030. });
  1031. });
  1032. }
  1033. });
  1034. // 启用、禁用机器人访问
  1035. $('#is_forbid_robot').on({
  1036. 'switchChange.bootstrapSwitch': function(event, state) {
  1037. var is_forbid_robot = state ? 1 : 0;
  1038. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_forbid_robot', value:is_forbid_robot}, function (ret) {
  1039. layer.msg(ret.message, {time:1000}, function() {
  1040. if (ret.status == 'fail') {
  1041. window.location.reload();
  1042. }
  1043. });
  1044. });
  1045. }
  1046. });
  1047. // 启用、禁用注册校验验证码
  1048. $('#is_verify_register').on({
  1049. 'switchChange.bootstrapSwitch': function(event, state) {
  1050. var is_verify_register = state ? 1 : 0;
  1051. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_verify_register', value:is_verify_register}, function (ret) {
  1052. layer.msg(ret.message, {time:1000}, function() {
  1053. if (ret.status == 'fail') {
  1054. window.location.reload();
  1055. }
  1056. });
  1057. });
  1058. }
  1059. });
  1060. // 启用、禁用自定义端口
  1061. $('#is_user_rand_port').on({
  1062. 'switchChange.bootstrapSwitch': function(event, state) {
  1063. var is_user_rand_port = state ? 1 : 0;
  1064. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_user_rand_port', value:is_user_rand_port}, function (ret) {
  1065. layer.msg(ret.message, {time:1000}, function() {
  1066. if (ret.status == 'fail') {
  1067. window.location.reload();
  1068. }
  1069. });
  1070. });
  1071. }
  1072. });
  1073. // 启用、禁用登录加积分
  1074. $('#login_add_score').on({
  1075. 'switchChange.bootstrapSwitch': function(event, state) {
  1076. var login_add_score = state ? 1 : 0;
  1077. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'login_add_score', value:login_add_score}, function (ret) {
  1078. layer.msg(ret.message, {time:1000}, function() {
  1079. if (ret.status == 'fail') {
  1080. window.location.reload();
  1081. }
  1082. });
  1083. });
  1084. }
  1085. });
  1086. // 启用、禁用注册
  1087. $('#is_register').on({
  1088. 'switchChange.bootstrapSwitch': function(event, state) {
  1089. var is_register = state ? 1 : 0;
  1090. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_register', value:is_register}, function (ret) {
  1091. layer.msg(ret.message, {time:1000}, function() {
  1092. if (ret.status == 'fail') {
  1093. window.location.reload();
  1094. }
  1095. });
  1096. });
  1097. }
  1098. });
  1099. // 启用、可选、禁用邀请注册
  1100. $('#is_invite_register').change(function() {
  1101. var is_invite_register = $(this).val();
  1102. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_invite_register', value:is_invite_register}, function (ret) {
  1103. layer.msg(ret.message, {time:1000}, function() {
  1104. if (ret.status == 'fail') {
  1105. window.location.reload();
  1106. }
  1107. });
  1108. });
  1109. });
  1110. // 启用、禁用用户重置密码
  1111. $('#is_reset_password').on({
  1112. 'switchChange.bootstrapSwitch': function(event, state) {
  1113. var is_reset_password = state ? 1 : 0;
  1114. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_reset_password', value:is_reset_password}, function (ret) {
  1115. layer.msg(ret.message, {time:1000}, function() {
  1116. if (ret.status == 'fail') {
  1117. window.location.reload();
  1118. }
  1119. });
  1120. });
  1121. }
  1122. });
  1123. // 启用、禁用验证码
  1124. $('#is_captcha').on({
  1125. 'switchChange.bootstrapSwitch': function(event, state) {
  1126. var is_captcha = state ? 1 : 0;
  1127. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_captcha', value:is_captcha}, function (ret) {
  1128. layer.msg(ret.message, {time:1000}, function() {
  1129. if (ret.status == 'fail') {
  1130. window.location.reload();
  1131. }
  1132. });
  1133. });
  1134. }
  1135. });
  1136. // 启用、禁用免费邀请码
  1137. $('#is_free_code').on({
  1138. 'switchChange.bootstrapSwitch': function(event, state) {
  1139. var is_free_code = state ? 1 : 0;
  1140. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_free_code', value:is_free_code}, function (ret) {
  1141. layer.msg(ret.message, {time:1000}, function() {
  1142. if (ret.status == 'fail') {
  1143. window.location.reload();
  1144. }
  1145. });
  1146. });
  1147. }
  1148. });
  1149. // 启用、禁用用户激活用户
  1150. $('#is_active_register').on({
  1151. 'switchChange.bootstrapSwitch': function(event, state) {
  1152. var is_active_register = state ? 1 : 0;
  1153. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_active_register', value:is_active_register}, function (ret) {
  1154. layer.msg(ret.message, {time:1000}, function() {
  1155. if (ret.status == 'fail') {
  1156. window.location.reload();
  1157. }
  1158. });
  1159. });
  1160. }
  1161. });
  1162. // 启用、禁用用户到期自动邮件提醒
  1163. $('#expire_warning').on({
  1164. 'switchChange.bootstrapSwitch': function(event, state) {
  1165. var expire_warning = state ? 1 : 0;
  1166. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'expire_warning', value:expire_warning}, function (ret) {
  1167. layer.msg(ret.message, {time:1000}, function() {
  1168. if (ret.status == 'fail') {
  1169. window.location.reload();
  1170. }
  1171. });
  1172. });
  1173. }
  1174. });
  1175. // 启用、禁用节点宕机发件提醒管理员
  1176. $('#is_node_crash_warning').on({
  1177. 'switchChange.bootstrapSwitch': function(event, state) {
  1178. var is_node_crash_warning = state ? 1 : 0;
  1179. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_node_crash_warning', value:is_node_crash_warning}, function (ret) {
  1180. layer.msg(ret.message, {time:1000}, function() {
  1181. if (ret.status == 'fail') {
  1182. window.location.reload();
  1183. }
  1184. });
  1185. });
  1186. }
  1187. });
  1188. // 启用、禁用节点宕机发ServerChan微信消息提醒
  1189. $('#is_server_chan').on({
  1190. 'switchChange.bootstrapSwitch': function(event, state) {
  1191. var is_server_chan = state ? 1 : 0;
  1192. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_server_chan', value:is_server_chan}, function (ret) {
  1193. layer.msg(ret.message, {time:1000}, function() {
  1194. if (ret.status == 'fail') {
  1195. window.location.reload();
  1196. }
  1197. });
  1198. });
  1199. }
  1200. });
  1201. // 启用、禁用Namesilo
  1202. $('#is_namesilo').on({
  1203. 'switchChange.bootstrapSwitch': function(event, state) {
  1204. var is_namesilo = state ? 1 : 0;
  1205. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_namesilo', value:is_namesilo}, function (ret) {
  1206. layer.msg(ret.message, {time:1000}, function() {
  1207. if (ret.status == 'fail') {
  1208. window.location.reload();
  1209. }
  1210. });
  1211. });
  1212. }
  1213. });
  1214. // 启用、禁用混合订阅
  1215. $('#mix_subscribe').on({
  1216. 'switchChange.bootstrapSwitch': function(event, state) {
  1217. var mix_subscribe = state ? 1 : 0;
  1218. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'mix_subscribe', value:mix_subscribe}, function (ret) {
  1219. layer.msg(ret.message, {time:1000}, function() {
  1220. if (ret.status == 'fail') {
  1221. window.location.reload();
  1222. }
  1223. });
  1224. });
  1225. }
  1226. });
  1227. // 启用、禁用随机订阅
  1228. $('#rand_subscribe').on({
  1229. 'switchChange.bootstrapSwitch': function(event, state) {
  1230. var rand_subscribe = state ? 1 : 0;
  1231. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'rand_subscribe', value:rand_subscribe}, function (ret) {
  1232. layer.msg(ret.message, {time:1000}, function() {
  1233. if (ret.status == 'fail') {
  1234. window.location.reload();
  1235. }
  1236. });
  1237. });
  1238. }
  1239. });
  1240. // 启用、禁用自定义订阅
  1241. $('#is_custom_subscribe').on({
  1242. 'switchChange.bootstrapSwitch': function(event, state) {
  1243. var is_custom_subscribe = state ? 1 : 0;
  1244. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_custom_subscribe', value:is_custom_subscribe}, function (ret) {
  1245. layer.msg(ret.message, {time:1000}, function() {
  1246. if (ret.status == 'fail') {
  1247. window.location.reload();
  1248. }
  1249. });
  1250. });
  1251. }
  1252. });
  1253. // 启用、禁用PushBear
  1254. $('#is_push_bear').on({
  1255. 'switchChange.bootstrapSwitch': function(event, state) {
  1256. var is_push_bear = state ? 1 : 0;
  1257. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_push_bear', value:is_push_bear}, function (ret) {
  1258. layer.msg(ret.message, {time:1000}, function() {
  1259. if (ret.status == 'fail') {
  1260. window.location.reload();
  1261. }
  1262. });
  1263. });
  1264. }
  1265. });
  1266. // 启用、禁用TCP阻断探测
  1267. $('#is_tcp_check').on({
  1268. 'switchChange.bootstrapSwitch': function(event, state) {
  1269. var is_tcp_check = state ? 1 : 0;
  1270. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_tcp_check', value:is_tcp_check}, function (ret) {
  1271. layer.msg(ret.message, {time:1000}, function() {
  1272. if (ret.status == 'fail') {
  1273. window.location.reload();
  1274. }
  1275. });
  1276. });
  1277. }
  1278. });
  1279. // 启用、禁用订阅异常自动封禁
  1280. $('#is_subscribe_ban').on({
  1281. 'switchChange.bootstrapSwitch': function(event, state) {
  1282. var is_subscribe_ban = state ? 1 : 0;
  1283. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_subscribe_ban', value:is_subscribe_ban}, function (ret) {
  1284. layer.msg(ret.message, {time:1000}, function() {
  1285. if (ret.status == 'fail') {
  1286. window.location.reload();
  1287. }
  1288. });
  1289. });
  1290. }
  1291. });
  1292. // 启用、禁用退关返利用户可见与否
  1293. $('#referral_status').on({
  1294. 'switchChange.bootstrapSwitch': function(event, state) {
  1295. var referral_status = state ? 1 : 0;
  1296. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'referral_status', value:referral_status}, function (ret) {
  1297. layer.msg(ret.message, {time:1000}, function() {
  1298. if (ret.status == 'fail') {
  1299. window.location.reload();
  1300. }
  1301. });
  1302. });
  1303. }
  1304. });
  1305. // 启用、禁用随机端口
  1306. $('#traffic_warning').on({
  1307. 'switchChange.bootstrapSwitch': function(event, state) {
  1308. var traffic_warning = state ? 1 : 0;
  1309. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'traffic_warning', value:traffic_warning}, function (ret) {
  1310. layer.msg(ret.message, {time:1000}, function() {
  1311. if (ret.status == 'fail') {
  1312. window.location.reload();
  1313. }
  1314. });
  1315. });
  1316. }
  1317. });
  1318. // 启用、禁用随机端口
  1319. $('#is_clear_log').on({
  1320. 'switchChange.bootstrapSwitch': function(event, state) {
  1321. var is_clear_log = state ? 1 : 0;
  1322. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_clear_log', value:is_clear_log}, function (ret) {
  1323. layer.msg(ret.message, {time:1000}, function() {
  1324. if (ret.status == 'fail') {
  1325. window.location.reload();
  1326. }
  1327. });
  1328. });
  1329. }
  1330. });
  1331. // 启用、禁用流量自动重置
  1332. $('#reset_traffic').on({
  1333. 'switchChange.bootstrapSwitch': function(event, state) {
  1334. var reset_traffic = state ? 1 : 0;
  1335. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'reset_traffic', value:reset_traffic}, function (ret) {
  1336. layer.msg(ret.message, {time:1000}, function() {
  1337. if (ret.status == 'fail') {
  1338. window.location.reload();
  1339. }
  1340. });
  1341. });
  1342. }
  1343. });
  1344. // 启用、禁用流量异常自动封号
  1345. $('#is_traffic_ban').on({
  1346. 'switchChange.bootstrapSwitch': function(event, state) {
  1347. var is_traffic_ban = state ? 1 : 0;
  1348. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_traffic_ban', value:is_traffic_ban}, function (ret) {
  1349. layer.msg(ret.message, {time:1000}, function() {
  1350. if (ret.status == 'fail') {
  1351. window.location.reload();
  1352. }
  1353. });
  1354. });
  1355. }
  1356. });
  1357. // 启用、禁用端口自动释放
  1358. $('#auto_release_port').on({
  1359. 'switchChange.bootstrapSwitch': function(event, state) {
  1360. var auto_release_port = state ? 1 : 0;
  1361. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'auto_release_port', value:auto_release_port}, function (ret) {
  1362. layer.msg(ret.message, {time:1000}, function() {
  1363. if (ret.status == 'fail') {
  1364. window.location.reload();
  1365. }
  1366. });
  1367. });
  1368. }
  1369. });
  1370. // 启用、禁用节点使用报告
  1371. $('#node_daily_report').on({
  1372. 'switchChange.bootstrapSwitch': function(event, state) {
  1373. var node_daily_report = state ? 1 : 0;
  1374. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'node_daily_report', value:node_daily_report}, function (ret) {
  1375. layer.msg(ret.message, {time:1000}, function() {
  1376. if (ret.status == 'fail') {
  1377. window.location.reload();
  1378. }
  1379. });
  1380. });
  1381. }
  1382. });
  1383. // 过期封禁是否禁止账号
  1384. $('#is_ban_status').on({
  1385. 'switchChange.bootstrapSwitch': function(event, state) {
  1386. var is_ban_status = state ? 1 : 0;
  1387. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_ban_status', value:is_ban_status}, function (ret) {
  1388. layer.msg(ret.message, {time:1000}, function() {
  1389. if (ret.status == 'fail') {
  1390. window.location.reload();
  1391. }
  1392. });
  1393. });
  1394. }
  1395. });
  1396. // 启用、禁用有赞云
  1397. $('#is_youzan').on({
  1398. 'switchChange.bootstrapSwitch': function(event, state) {
  1399. var is_youzan = state ? 1 : 0;
  1400. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_youzan', value:is_youzan}, function (ret) {
  1401. layer.msg(ret.message, {time:1000}, function() {
  1402. if (ret.status == 'fail') {
  1403. window.location.reload();
  1404. }
  1405. });
  1406. });
  1407. }
  1408. });
  1409. // 启用、禁用alipay
  1410. $('#is_alipay').on({
  1411. 'switchChange.bootstrapSwitch': function(event, state) {
  1412. var is_alipay = state ? 1 : 0;
  1413. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'is_alipay', value:is_alipay}, function (ret) {
  1414. layer.msg(ret.message, {time:1000}, function() {
  1415. if (ret.status == 'fail') {
  1416. window.location.reload();
  1417. }
  1418. });
  1419. });
  1420. }
  1421. });
  1422. // 流量异常阈值
  1423. function setTrafficBanValue() {
  1424. var traffic_ban_value = $("#traffic_ban_value").val();
  1425. if (traffic_ban_value < 1) {
  1426. layer.msg('不能小于1', {time:1000});
  1427. return ;
  1428. }
  1429. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'traffic_ban_value', value:traffic_ban_value}, function (ret) {
  1430. layer.msg(ret.message, {time:1000}, function() {
  1431. if (ret.status == 'fail') {
  1432. window.location.reload();
  1433. }
  1434. });
  1435. });
  1436. }
  1437. // 设置用户封号时长
  1438. function setTrafficBanTime() {
  1439. var traffic_ban_time = $("#traffic_ban_time").val();
  1440. if (traffic_ban_time < 0) {
  1441. layer.msg('不能小于0', {time:1000});
  1442. return ;
  1443. }
  1444. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'traffic_ban_time', value:traffic_ban_time}, function (ret) {
  1445. layer.msg(ret.message, {time:1000}, function() {
  1446. if (ret.status == 'fail') {
  1447. window.location.reload();
  1448. }
  1449. });
  1450. });
  1451. }
  1452. // 设置节点宕机警告收件地址
  1453. function setCrashWarningEmail() {
  1454. var crash_warning_email = $("#crash_warning_email").val();
  1455. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'crash_warning_email', value:crash_warning_email}, function (ret) {
  1456. layer.msg(ret.message, {time:1000}, function() {
  1457. if (ret.status == 'fail') {
  1458. window.location.reload();
  1459. }
  1460. });
  1461. });
  1462. }
  1463. // 设置ServerChan的SCKEY
  1464. function setServerChanKey() {
  1465. var server_chan_key = $("#server_chan_key").val();
  1466. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'server_chan_key', value:server_chan_key}, function (ret) {
  1467. layer.msg(ret.message, {time:1000}, function() {
  1468. if (ret.status == 'fail') {
  1469. window.location.reload();
  1470. }
  1471. });
  1472. });
  1473. }
  1474. // 设置Namesilo API KEY
  1475. function setNamesiloKey() {
  1476. var namesilo_key = $("#namesilo_key").val();
  1477. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'namesilo_key', value:namesilo_key}, function (ret) {
  1478. layer.msg(ret.message, {time:1000}, function() {
  1479. if (ret.status == 'fail') {
  1480. window.location.reload();
  1481. }
  1482. });
  1483. });
  1484. }
  1485. // 设置PushBear的SendKey
  1486. function setPushBearSendKey() {
  1487. var push_bear_send_key = $("#push_bear_send_key").val();
  1488. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'push_bear_send_key', value:push_bear_send_key}, function (ret) {
  1489. layer.msg(ret.message, {time:1000}, function() {
  1490. if (ret.status == 'fail') {
  1491. window.location.reload();
  1492. }
  1493. });
  1494. });
  1495. }
  1496. // 设置PushBear的消息通道二维码URL
  1497. function setPushBearQrCode() {
  1498. var push_bear_qrcode = $("#push_bear_qrcode").val();
  1499. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'push_bear_qrcode', value:push_bear_qrcode}, function (ret) {
  1500. layer.msg(ret.message, {time:1000}, function() {
  1501. if (ret.status == 'fail') {
  1502. window.location.reload();
  1503. }
  1504. });
  1505. });
  1506. }
  1507. // 设置TCP阻断检测提醒次数
  1508. function setTcpCheckWarningTimes() {
  1509. var tcp_check_warning_times = $("#tcp_check_warning_times").val();
  1510. if (tcp_check_warning_times < 0 || tcp_check_warning_times > 12) {
  1511. layer.msg('只能在0-12之间', {time:1000});
  1512. return ;
  1513. }
  1514. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'tcp_check_warning_times', value:tcp_check_warning_times}, function (ret) {
  1515. layer.msg(ret.message, {time:1000}, function() {
  1516. if (ret.status == 'fail') {
  1517. window.location.reload();
  1518. }
  1519. });
  1520. });
  1521. }
  1522. // 设置订阅封禁阈值
  1523. function setSubscribeBanTimes() {
  1524. var subscribe_ban_times = $("#subscribe_ban_times").val();
  1525. if (subscribe_ban_times < 0) {
  1526. layer.msg('不能小于0', {time:1000});
  1527. return ;
  1528. }
  1529. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'subscribe_ban_times', value:subscribe_ban_times}, function (ret) {
  1530. layer.msg(ret.message, {time:1000}, function() {
  1531. if (ret.status == 'fail') {
  1532. window.location.reload();
  1533. }
  1534. });
  1535. });
  1536. }
  1537. // 设置有赞云的kdt_id
  1538. function setKdtId() {
  1539. var kdt_id = $("#kdt_id").val();
  1540. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'kdt_id', value:kdt_id}, function (ret) {
  1541. layer.msg(ret.message, {time:1000}, function() {
  1542. if (ret.status == 'fail') {
  1543. window.location.reload();
  1544. }
  1545. });
  1546. });
  1547. }
  1548. // 设置有赞云的client_id
  1549. function setYouzanClientId() {
  1550. var youzan_client_id = $("#youzan_client_id").val();
  1551. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'youzan_client_id', value:youzan_client_id}, function (ret) {
  1552. layer.msg(ret.message, {time:1000}, function() {
  1553. if (ret.status == 'fail') {
  1554. window.location.reload();
  1555. }
  1556. });
  1557. });
  1558. }
  1559. // 设置有赞云的client_secret
  1560. function setYouzanClientSecret() {
  1561. var youzan_client_secret = $("#youzan_client_secret").val();
  1562. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'youzan_client_secret', value:youzan_client_secret}, function (ret) {
  1563. layer.msg(ret.message, {time:1000}, function() {
  1564. if (ret.status == 'fail') {
  1565. window.location.reload();
  1566. }
  1567. });
  1568. });
  1569. }
  1570. // 设置alipay加密方式
  1571. $('#alipay_sign_type').change(function() {
  1572. var alipay_sign_type = $(this).val();
  1573. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'alipay_sign_type', value:alipay_sign_type}, function (ret) {
  1574. layer.msg(ret.message, {time:1000}, function() {
  1575. if (ret.status == 'fail') {
  1576. window.location.reload();
  1577. }
  1578. });
  1579. });
  1580. });
  1581. // 设置alipay是否启用SSL验证
  1582. $('#alipay_transport').change(function() {
  1583. var alipay_transport = $(this).val();
  1584. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'alipay_transport', value:alipay_transport}, function (ret) {
  1585. layer.msg(ret.message, {time:1000}, function() {
  1586. if (ret.status == 'fail') {
  1587. window.location.reload();
  1588. }
  1589. });
  1590. });
  1591. });
  1592. //设置alipay的partner
  1593. function setAlipayPartner() {
  1594. var alipay_partner = $("#alipay_partner").val();
  1595. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'alipay_partner', value:alipay_partner}, function (ret) {
  1596. layer.msg(ret.message, {time:1000}, function() {
  1597. if (ret.status == 'fail') {
  1598. window.location.reload();
  1599. }
  1600. });
  1601. });
  1602. }
  1603. //设置alipay的key
  1604. function setAlipayKey() {
  1605. var alipay_key = $("#alipay_key").val();
  1606. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'alipay_key', value:alipay_key}, function (ret) {
  1607. layer.msg(ret.message, {time:1000}, function() {
  1608. if (ret.status == 'fail') {
  1609. window.location.reload();
  1610. }
  1611. });
  1612. });
  1613. }
  1614. //设置alipay的私钥
  1615. function setAlipayPrivateKey() {
  1616. var alipay_private_key = $("#alipay_private_key").val();
  1617. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'alipay_private_key', value:alipay_private_key}, function (ret) {
  1618. layer.msg(ret.message, {time:1000}, function() {
  1619. if (ret.status == 'fail') {
  1620. window.location.reload();
  1621. }
  1622. });
  1623. });
  1624. }
  1625. //设置alipay的公钥
  1626. function setAlipayPublicKey() {
  1627. var alipay_public_key = $("#alipay_public_key").val();
  1628. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'alipay_public_key', value:alipay_public_key}, function (ret) {
  1629. layer.msg(ret.message, {time:1000}, function() {
  1630. if (ret.status == 'fail') {
  1631. window.location.reload();
  1632. }
  1633. });
  1634. });
  1635. }
  1636. // 设置alipay结算币种
  1637. $('#alipay_currency').change(function() {
  1638. var alipay_currency = $(this).val();
  1639. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'alipay_currency', value:alipay_currency}, function (ret) {
  1640. layer.msg(ret.message, {time:1000}, function() {
  1641. if (ret.status == 'fail') {
  1642. window.location.reload();
  1643. }
  1644. });
  1645. });
  1646. });
  1647. // 设置最小积分
  1648. $("#min_rand_score").change(function () {
  1649. var min_rand_score = $(this).val();
  1650. var max_rand_score = $("#max_rand_score").val();
  1651. if (parseInt(min_rand_score) < 0) {
  1652. layer.msg('最小积分值不能小于0', {time:1000});
  1653. return ;
  1654. }
  1655. if (parseInt(min_rand_score) >= parseInt(max_rand_score)) {
  1656. layer.msg('最小积分值必须小于最大积分值', {time:1000});
  1657. return ;
  1658. }
  1659. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'min_rand_score', value:min_rand_score}, function (ret) {
  1660. layer.msg(ret.message, {time:1000}, function() {
  1661. if (ret.status == 'fail') {
  1662. window.location.reload();
  1663. }
  1664. });
  1665. });
  1666. });
  1667. // 设置最大积分
  1668. $("#max_rand_score").change(function () {
  1669. var min_rand_score = $("#min_rand_score").val();
  1670. var max_rand_score = $(this).val();
  1671. if (parseInt(max_rand_score) > 99999) {
  1672. layer.msg('最大积分值不能大于99999', {time:1000});
  1673. return ;
  1674. }
  1675. if (parseInt(min_rand_score) >= parseInt(max_rand_score)) {
  1676. layer.msg('最大积分值必须大于最小积分值', {time:1000});
  1677. return ;
  1678. }
  1679. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'max_rand_score', value:max_rand_score}, function (ret) {
  1680. layer.msg(ret.message, {time:1000}, function() {
  1681. if (ret.status == 'fail') {
  1682. window.location.reload();
  1683. }
  1684. });
  1685. });
  1686. });
  1687. // 设置最小端口
  1688. $("#min_port").change(function () {
  1689. var min_port = $(this).val();
  1690. var max_port = $("#max_port").val();
  1691. // 最大端口必须大于最小端口
  1692. if (parseInt(max_port) <= parseInt(min_port)) {
  1693. layer.msg('必须小于最大端口', {time:1000});
  1694. return ;
  1695. }
  1696. if (parseInt(min_port) < 1000) {
  1697. layer.msg('最小端口不能小于1000', {time:1000});
  1698. return ;
  1699. }
  1700. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'min_port', value:min_port}, function (ret) {
  1701. layer.msg(ret.message, {time:1000}, function() {
  1702. if (ret.status == 'fail') {
  1703. window.location.reload();
  1704. }
  1705. });
  1706. });
  1707. });
  1708. // 设置最大端口
  1709. $("#max_port").change(function () {
  1710. var min_port = $("#min_port").val();
  1711. var max_port = $(this).val();
  1712. // 最大端口必须大于最小端口
  1713. if (parseInt(max_port) <= parseInt(min_port)) {
  1714. layer.msg('必须大于最小端口', {time:1000});
  1715. return ;
  1716. }
  1717. if (parseInt(max_port) > 65535) {
  1718. layer.msg('最大端口不能大于65535', {time:1000});
  1719. return ;
  1720. }
  1721. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'max_port', value:max_port}, function (ret) {
  1722. layer.msg(ret.message, {time:1000}, function() {
  1723. if (ret.status == 'fail') {
  1724. window.location.reload();
  1725. }
  1726. });
  1727. });
  1728. });
  1729. $("#goods_purchase_limit_strategy").change(function() {
  1730. var strategy = $(this).val();
  1731. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'goods_purchase_limit_strategy', value: strategy}, function (ret) {
  1732. layer.msg(ret.message, {time:1000}, function() {
  1733. if (ret.status == 'fail') {
  1734. window.location.reload();
  1735. }
  1736. });
  1737. });
  1738. });
  1739. // 设置注册时默认有效期
  1740. function setDefaultDays() {
  1741. var default_days = parseInt($("#default_days").val());
  1742. if (default_days < 0) {
  1743. layer.msg('不能小于0', {time:1000});
  1744. return ;
  1745. }
  1746. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'default_days', value:default_days}, function (ret) {
  1747. layer.msg(ret.message, {time:1000}, function() {
  1748. if (ret.status == 'fail') {
  1749. window.location.reload();
  1750. }
  1751. });
  1752. });
  1753. }
  1754. // 设置注册时默认流量
  1755. function setDefaultTraffic() {
  1756. var default_traffic = parseInt($("#default_traffic").val());
  1757. if (default_traffic < 0) {
  1758. layer.msg('不能小于0', {time:1000});
  1759. return ;
  1760. }
  1761. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'default_traffic', value:default_traffic}, function (ret) {
  1762. layer.msg(ret.message, {time:1000}, function() {
  1763. if (ret.status == 'fail') {
  1764. window.location.reload();
  1765. }
  1766. });
  1767. });
  1768. }
  1769. // 设置可生成邀请码数量
  1770. function setInviteNum() {
  1771. var invite_num = parseInt($("#invite_num").val());
  1772. if (invite_num < 0) {
  1773. layer.msg('不能小于0', {time:1000});
  1774. return ;
  1775. }
  1776. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'invite_num', value:invite_num}, function (ret) {
  1777. layer.msg(ret.message, {time:1000}, function() {
  1778. if (ret.status == 'fail') {
  1779. window.location.reload();
  1780. }
  1781. });
  1782. });
  1783. }
  1784. // 设置重置密码次数
  1785. function setResetPasswordTimes() {
  1786. var reset_password_times = $("#reset_password_times").val();
  1787. if (reset_password_times < 0) {
  1788. layer.msg('不能小于0', {time:1000});
  1789. return ;
  1790. }
  1791. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'reset_password_times', value:reset_password_times}, function (ret) {
  1792. layer.msg(ret.message, {time:1000}, function() {
  1793. if (ret.status == 'fail') {
  1794. window.location.reload();
  1795. }
  1796. });
  1797. });
  1798. }
  1799. // 设置激活用户次数
  1800. function setActiveTimes() {
  1801. var active_times = parseInt($("#active_times").val());
  1802. if (active_times < 0) {
  1803. layer.msg('不能小于0', {time:1000});
  1804. return ;
  1805. }
  1806. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'active_times', value:active_times}, function (ret) {
  1807. layer.msg(ret.message, {time:1000}, function() {
  1808. if (ret.status == 'fail') {
  1809. window.location.reload();
  1810. }
  1811. });
  1812. });
  1813. }
  1814. // 设置节点订阅地址
  1815. function setSubscribeDomain() {
  1816. var subscribe_domain = $("#subscribe_domain").val();
  1817. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'subscribe_domain', value:subscribe_domain}, function (ret) {
  1818. layer.msg(ret.message, {time:1000}, function() {
  1819. if (ret.status == 'fail') {
  1820. window.location.reload();
  1821. }
  1822. });
  1823. });
  1824. }
  1825. // 设置节点订阅随机展示节点数
  1826. function setRegisterIpLimit() {
  1827. var register_ip_limit = parseInt($("#register_ip_limit").val());
  1828. if (register_ip_limit < 0) {
  1829. layer.msg('不能小于0', {time:1000});
  1830. return ;
  1831. }
  1832. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'register_ip_limit', value:register_ip_limit}, function (ret) {
  1833. layer.msg(ret.message, {time:1000}, function() {
  1834. if (ret.status == 'fail') {
  1835. window.location.reload();
  1836. }
  1837. });
  1838. });
  1839. }
  1840. // 设置节点订阅随机展示节点数
  1841. function setSubscribeMax() {
  1842. var subscribe_max = parseInt($("#subscribe_max").val());
  1843. if (subscribe_max < 0) {
  1844. layer.msg('不能小于0', {time:1000});
  1845. return ;
  1846. }
  1847. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'subscribe_max', value:subscribe_max}, function (ret) {
  1848. layer.msg(ret.message, {time:1000}, function() {
  1849. if (ret.status == 'fail') {
  1850. window.location.reload();
  1851. }
  1852. });
  1853. });
  1854. }
  1855. // 设置流量警告阈值
  1856. function setTrafficWarningPercent() {
  1857. var traffic_warning_percent = $("#traffic_warning_percent").val();
  1858. if (traffic_warning_percent < 0) {
  1859. layer.msg('不能小于0', {time:1000});
  1860. return ;
  1861. }
  1862. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'traffic_warning_percent', value:traffic_warning_percent}, function (ret) {
  1863. layer.msg(ret.message, {time:1000}, function() {
  1864. if (ret.status == 'fail') {
  1865. window.location.reload();
  1866. }
  1867. });
  1868. });
  1869. }
  1870. // 设置用户过期提醒阈值
  1871. function setExpireDays() {
  1872. var expire_days = parseInt($("#expire_days").val());
  1873. if (expire_days < 0) {
  1874. layer.msg('不能小于0', {time:1000});
  1875. return ;
  1876. }
  1877. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'expire_days', value:expire_days}, function (ret) {
  1878. layer.msg(ret.message, {time:1000}, function() {
  1879. if (ret.status == 'fail') {
  1880. window.location.reload();
  1881. }
  1882. });
  1883. });
  1884. }
  1885. // 设置网站名称
  1886. function setWebsiteName() {
  1887. var website_name = $("#website_name").val();
  1888. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'website_name', value:website_name}, function (ret) {
  1889. layer.msg(ret.message, {time:1000}, function() {
  1890. if (ret.status == 'fail') {
  1891. window.location.reload();
  1892. }
  1893. });
  1894. });
  1895. }
  1896. // 设置网站地址
  1897. function setWebsiteUrl() {
  1898. var website_url = $("#website_url").val();
  1899. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'website_url', value:website_url}, function (ret) {
  1900. layer.msg(ret.message, {time:1000}, function() {
  1901. if (ret.status == 'fail') {
  1902. window.location.reload();
  1903. }
  1904. });
  1905. });
  1906. }
  1907. // 登录加积分的时间间隔
  1908. function setLoginAddScoreRange() {
  1909. var login_add_score_range = parseInt($("#login_add_score_range").val());
  1910. if (login_add_score_range < 0) {
  1911. layer.msg('不能小于0', {time:1000});
  1912. return ;
  1913. }
  1914. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'login_add_score_range', value:login_add_score_range}, function (ret) {
  1915. layer.msg(ret.message, {time:1000}, function() {
  1916. if (ret.status == 'fail') {
  1917. window.location.reload();
  1918. }
  1919. });
  1920. });
  1921. }
  1922. // 设置根据推广链接注册送流量
  1923. function setReferralTraffic() {
  1924. var referral_traffic = parseInt($("#referral_traffic").val());
  1925. if (referral_traffic < 0) {
  1926. layer.msg('不能小于0', {time:1000});
  1927. return ;
  1928. }
  1929. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'referral_traffic', value:referral_traffic}, function (ret) {
  1930. layer.msg(ret.message, {time:1000}, function() {
  1931. if (ret.status == 'fail') {
  1932. window.location.reload();
  1933. }
  1934. });
  1935. });
  1936. }
  1937. // 设置根据推广链接注册人每产生一笔消费,则推广人可以获得的返利比例
  1938. function setReferralPercent() {
  1939. var referral_percent = $("#referral_percent").val();
  1940. if (referral_percent < 0) {
  1941. layer.msg('不能小于0', {time:1000});
  1942. return ;
  1943. }
  1944. if (referral_percent > 100) {
  1945. layer.msg('不能大于100', {time:1000});
  1946. return ;
  1947. }
  1948. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'referral_percent', value:referral_percent}, function (ret) {
  1949. layer.msg(ret.message, {time:1000}, function() {
  1950. if (ret.status == 'fail') {
  1951. window.location.reload();
  1952. }
  1953. });
  1954. });
  1955. }
  1956. // 设置返利满多少元才可以提现
  1957. function setReferralMoney() {
  1958. var referral_money = $("#referral_money").val();
  1959. if (referral_money < 0) {
  1960. layer.msg('不能小于0', {time:1000});
  1961. return ;
  1962. }
  1963. $.post("{{url('admin/setConfig')}}", {_token:'{{csrf_token()}}', name:'referral_money', value:referral_money}, function (ret) {
  1964. layer.msg(ret.message, {time:1000}, function() {
  1965. if (ret.status == 'fail') {
  1966. window.location.reload();
  1967. }
  1968. });
  1969. });
  1970. }
  1971. </script>
  1972. @endsection