system.blade.php 170 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794
  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"> 支付宝国际 </a>
  48. </li>
  49. <li>
  50. <a href="#tab_10" data-toggle="tab"> 支付宝当面付 </a>
  51. </li>
  52. <li id="li_tab_geetest" class="tab_captcha" style="display:none;">
  53. <a href="#tab_geetest" data-toggle="tab"> Geetest 极验 </a>
  54. </li>
  55. <li id="li_tab_googleCaptcha" class="tab_captcha" style="display:none;">
  56. <a href="#tab_googleCaptcha" data-toggle="tab"> Google reCAPTCHA </a>
  57. </li>
  58. </ul>
  59. </div>
  60. <div class="portlet-body">
  61. <div class="tab-content">
  62. <div class="tab-pane active" id="tab_1">
  63. <form action="#" method="post" class="form-horizontal">
  64. <div class="portlet-body">
  65. <div class="form-group">
  66. <div class="col-md-6 col-sm-6 col-xs-12">
  67. <label for="website_name" class="col-md-3 control-label">网站名称</label>
  68. <div class="col-md-9">
  69. <div class="input-group">
  70. <input class="form-control" type="text" name="website_name" value="{{$website_name}}" id="website_name" />
  71. <span class="input-group-btn">
  72. <button class="btn btn-success" type="button" onclick="setWebsiteName()">修改</button>
  73. </span>
  74. </div>
  75. <span class="help-block"> 发邮件时展示 </span>
  76. </div>
  77. </div>
  78. <div class="col-md-6 col-sm-6 col-xs-12">
  79. <label for="website_url" class="col-md-3 control-label">网站地址</label>
  80. <div class="col-md-9">
  81. <div class="input-group">
  82. <input class="form-control" type="text" name="website_url" value="{{$website_url}}" id="website_url" />
  83. <span class="input-group-btn">
  84. <button class="btn btn-success" type="button" onclick="setWebsiteUrl()">修改</button>
  85. </span>
  86. </div>
  87. <span class="help-block"> 生成重置密码、在线支付必备,示例:https://www.ssrpanel.com </span>
  88. </div>
  89. </div>
  90. </div>
  91. <div class="form-group">
  92. <div class="col-md-6 col-sm-6 col-xs-12">
  93. <label for="is_register" class="col-md-3 control-label">用户注册</label>
  94. <div class="col-md-9">
  95. <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="关闭">
  96. <span class="help-block"> 关闭后无法注册 </span>
  97. </div>
  98. </div>
  99. <div class="col-md-6 col-sm-6 col-xs-12">
  100. <label for="is_invite_register" class="col-md-3 control-label">邀请注册</label>
  101. <div class="col-md-9">
  102. <select id="is_invite_register" class="form-control select2" name="is_invite_register">
  103. <option value="0" @if($is_invite_register == '0') selected @endif>关闭</option>
  104. <option value="1" @if($is_invite_register == '1') selected @endif>可选</option>
  105. <option value="2" @if($is_invite_register == '2') selected @endif>必须</option>
  106. </select>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="form-group">
  111. <div class="col-md-6 col-sm-6 col-xs-12">
  112. <label for="is_active_register" class="col-md-3 control-label">激活账号</label>
  113. <div class="col-md-9">
  114. <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="关闭">
  115. <span class="help-block"> 启用后用户需要通过邮件来激活账号 </span>
  116. </div>
  117. </div>
  118. <div class="col-md-6 col-sm-6 col-xs-12">
  119. <label for="is_reset_password" class="col-md-3 control-label">重置密码</label>
  120. <div class="col-md-9">
  121. <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="关闭">
  122. <span class="help-block"> 启用后用户可以通过邮件重置密码 </span>
  123. </div>
  124. </div>
  125. </div>
  126. <div class="form-group">
  127. <div class="col-md-6 col-sm-6 col-xs-12">
  128. <label for="is_captcha" class="col-md-3 control-label">验证码</label>
  129. <div class="col-md-9">
  130. <select id="is_captcha" class="form-control select2" name="is_captcha">
  131. <option value="0" @if($is_captcha == '0') selected @endif>关闭</option>
  132. <option value="1" @if($is_captcha == '1') selected @endif>普通验证码</option>
  133. <option value="2" @if($is_captcha == '2') selected @endif>Geetest 极验</option>
  134. <option value="3" @if($is_captcha == '3') selected @endif>Google reCAPTCHA</option>
  135. </select>
  136. <span class="help-block"> 启用后登录、注册需要输入验证码 </span>
  137. </div>
  138. </div>
  139. <div class="col-md-6 col-sm-6 col-xs-12">
  140. <label for="is_free_code" class="col-md-3 control-label">免费邀请码</label>
  141. <div class="col-md-9">
  142. <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="关闭">
  143. <span class="help-block"> 关闭后免费邀请码不可见 </span>
  144. </div>
  145. </div>
  146. </div>
  147. <div class="form-group">
  148. <div class="col-md-6 col-sm-6 col-xs-12">
  149. <label for="is_forbid_china" class="col-md-3 control-label">阻止大陆访问</label>
  150. <div class="col-md-9">
  151. <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="关闭">
  152. <span class="help-block"> 开启后大陆IP禁止访问 </span>
  153. </div>
  154. </div>
  155. <div class="col-md-6 col-sm-6 col-xs-12">
  156. <label for="is_forbid_oversea" class="col-md-3 control-label">阻止海外访问</label>
  157. <div class="col-md-9">
  158. <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="关闭">
  159. <span class="help-block"> 开启后海外IP(含港澳台)禁止访问 </span>
  160. </div>
  161. </div>
  162. </div>
  163. <div class="form-group">
  164. <div class="col-md-6 col-sm-6 col-xs-12">
  165. <label for="is_forbid_robot" class="col-md-3 control-label">阻止机器人访问</label>
  166. <div class="col-md-9">
  167. <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="关闭">
  168. <span class="help-block"> 如果是机器人、爬虫、代理访问网站则会抛出404错误 </span>
  169. </div>
  170. </div>
  171. <div class="col-md-6 col-sm-6 col-xs-12">
  172. <label for="is_verify_register" class="col-md-3 control-label">注册校验验证码</label>
  173. <div class="col-md-9">
  174. <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="关闭">
  175. <span class="help-block"> 注册时需要先通过邮件获取验证码方可注册,‘激活账号’失效 </span>
  176. </div>
  177. </div>
  178. </div>
  179. <div class="form-group">
  180. <div class="col-md-6 col-sm-6 col-xs-12">
  181. <label for="website_security_code" class="col-md-3 control-label">网站安全码</label>
  182. <div class="col-md-9">
  183. <div class="input-group">
  184. <input class="form-control" type="text" name="website_security_code" value="{{$website_security_code}}" id="website_security_code" />
  185. <span class="input-group-btn">
  186. <button class="btn btn-default" type="button" onclick="makeWebsiteSecurityCode()">生成</button>
  187. <button class="btn btn-success" type="button" onclick="setWebsiteSecurityCode()">修改</button>
  188. </span>
  189. </div>
  190. <span class="help-block"> 非空时必须通过 <a href="/login?securityCode=" target="_blank">安全入口</a> 加上安全码才可访问 </span>
  191. </div>
  192. </div>
  193. <div class="col-md-6 col-sm-6 col-xs-12"></div>
  194. </div>
  195. </div>
  196. </form>
  197. </div>
  198. <div class="tab-pane" id="tab_2">
  199. <form action="#" method="post" class="form-horizontal">
  200. <div class="portlet-body">
  201. <div class="form-group">
  202. <div class="col-md-6 col-sm-6 col-xs-12">
  203. <label for="is_rand_port" class="col-md-3 control-label">随机端口</label>
  204. <div class="col-md-9">
  205. <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="关闭">
  206. <span class="help-block"> 注册、添加用户时随机生成端口 </span>
  207. </div>
  208. </div>
  209. <div class="col-md-6 col-sm-6 col-xs-12">
  210. <label class="col-md-3 control-label">端口范围</label>
  211. <div class="col-md-9">
  212. <div class="input-group input-large input-daterange">
  213. <input type="text" class="form-control" name="min_port" value="{{$min_port}}" id="min_port">
  214. <span class="input-group-addon"> ~ </span>
  215. <input type="text" class="form-control" name="max_port" value="{{$max_port}}" id="max_port">
  216. </div>
  217. <span class="help-block"> 端口范围:1000 - 65535 </span>
  218. </div>
  219. </div>
  220. </div>
  221. <div class="form-group">
  222. <div class="col-md-6 col-sm-6 col-xs-12">
  223. <label for="is_namesilo" class="col-md-3 control-label">Namesilo</label>
  224. <div class="col-md-9">
  225. <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="关闭">
  226. <span class="help-block"> 添加、编辑节点的绑定域名时自动更新域名DNS记录值为节点IP(<a href="https://www.namesilo.com/account_api.php?rid=326ec20pa" target="_blank">创建API KEY</a>) </span>
  227. </div>
  228. </div>
  229. <div class="col-md-6 col-sm-6 col-xs-12">
  230. <label for="namesilo_key" class="col-md-3 control-label">Namesilo API KEY</label>
  231. <div class="col-md-9">
  232. <div class="input-group">
  233. <input class="form-control" type="text" name="namesilo_key" value="{{$namesilo_key}}" id="namesilo_key" placeholder="填入Namesilo上申请的API KEY" />
  234. <span class="input-group-btn">
  235. <button class="btn btn-success" type="button" onclick="setNamesiloKey()">修改</button>
  236. </span>
  237. </div>
  238. <span class="help-block"> 域名必须是<a href="https://www.namesilo.com/?rid=326ec20pa" target="_blank">www.namesilo.com</a>上购买的 </span>
  239. </div>
  240. </div>
  241. </div>
  242. <!--
  243. <div class="form-group">
  244. <label for="is_user_rand_port" class="col-md-2 control-label">自定义端口</label>
  245. <div class="col-md-6 col-sm-6 col-xs-12">
  246. <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="关闭">
  247. <span class="help-block"> 用户可以自定义端口 </span>
  248. </div>
  249. </div>
  250. -->
  251. <div class="form-group">
  252. <div class="col-md-6 col-sm-6 col-xs-12">
  253. <label for="default_days" class="col-md-3 control-label">初始有效期</label>
  254. <div class="col-md-9">
  255. <div class="input-group">
  256. <input class="form-control" type="text" name="default_days" value="{{$default_days}}" id="default_days" />
  257. <span class="input-group-addon">天</span>
  258. <span class="input-group-btn">
  259. <button class="btn btn-success" type="button" onclick="setDefaultDays()">修改</button>
  260. </span>
  261. </div>
  262. <span class="help-block"> 用户注册时默认账户有效期,为0即当天到期 </span>
  263. </div>
  264. </div>
  265. <div class="col-md-6 col-sm-6 col-xs-12">
  266. <label for="default_traffic" class="col-md-3 control-label">初始流量</label>
  267. <div class="col-md-9">
  268. <div class="input-group">
  269. <input class="form-control" type="text" name="default_traffic" value="{{$default_traffic}}" id="default_traffic" />
  270. <span class="input-group-addon">MiB</span>
  271. <span class="input-group-btn">
  272. <button class="btn btn-success" type="button" onclick="setDefaultTraffic()">修改</button>
  273. </span>
  274. </div>
  275. <span class="help-block"> 用户注册时默认可用流量 </span>
  276. </div>
  277. </div>
  278. </div>
  279. <div class="form-group">
  280. <div class="col-md-6 col-sm-6 col-xs-12">
  281. <label for="invite_num" class="col-md-3 control-label">可生成邀请码数</label>
  282. <div class="col-md-9">
  283. <div class="input-group">
  284. <input class="form-control" type="text" name="invite_num" value="{{$invite_num}}" id="invite_num" />
  285. <span class="input-group-btn">
  286. <button class="btn btn-success" type="button" onclick="setInviteNum()">修改</button>
  287. </span>
  288. </div>
  289. <span class="help-block"> 用户可以生成的邀请码数 </span>
  290. </div>
  291. </div>
  292. <div class="col-md-6 col-sm-6 col-xs-12">
  293. <label for="reset_password_times" class="col-md-3 control-label">重置密码次数</label>
  294. <div class="col-md-9">
  295. <div class="input-group">
  296. <input class="form-control" type="text" name="reset_password_times" value="{{$reset_password_times}}" id="reset_password_times" />
  297. <span class="input-group-btn">
  298. <button class="btn btn-success" type="button" onclick="setResetPasswordTimes()">修改</button>
  299. </span>
  300. </div>
  301. <span class="help-block"> 24小时内可以通过邮件重置密码次数 </span>
  302. </div>
  303. </div>
  304. </div>
  305. <div class="form-group">
  306. <div class="col-md-6 col-sm-6 col-xs-12">
  307. <label for="active_times" class="col-md-3 control-label">激活账号次数</label>
  308. <div class="col-md-9">
  309. <div class="input-group">
  310. <input class="form-control" type="text" name="active_times" value="{{$active_times}}" id="active_times" />
  311. <span class="input-group-btn">
  312. <button class="btn btn-success" type="button" onclick="setActiveTimes()">修改</button>
  313. </span>
  314. </div>
  315. <span class="help-block"> 24小时内可以通过邮件激活账号次数 </span>
  316. </div>
  317. </div>
  318. <div class="col-md-6 col-sm-6 col-xs-12">
  319. <label for="register_ip_limit" class="col-md-3 control-label">同IP注册限制</label>
  320. <div class="col-md-9">
  321. <div class="input-group">
  322. <input class="form-control" type="text" name="register_ip_limit" value="{{$register_ip_limit}}" id="register_ip_limit" />
  323. <span class="input-group-btn">
  324. <button class="btn btn-success" type="button" onclick="setRegisterIpLimit()">修改</button>
  325. </span>
  326. </div>
  327. <span class="help-block"> 同IP在24小时内允许注册数量,为0时不限制 </span>
  328. </div>
  329. </div>
  330. </div>
  331. <div class="form-group">
  332. <div class="col-md-6 col-sm-6 col-xs-12">
  333. <label for="initial_labels_for_user" class="col-md-3 control-label">用户初始标签</label>
  334. <div class="col-md-9">
  335. <select id="initial_labels_for_user" class="form-control select2-multiple" name="initial_labels_for_user" multiple="multiple">
  336. @foreach($label_list as $label)
  337. <option value="{{$label->id}}" @if(in_array($label->id, explode(',', $initial_labels_for_user))) selected @endif>{{$label->name}}</option>
  338. @endforeach
  339. </select>
  340. <span class="help-block"> 注册用户时的初始标签,标签用于关联节点 </span>
  341. </div>
  342. </div>
  343. <div class="col-md-6 col-sm-6 col-xs-12">
  344. <label for="goods_purchase_limit_strategy" class="col-md-3 control-label">商品限购</label>
  345. <div class="col-md-9">
  346. <select id="goods_purchase_limit_strategy" class="form-control select2" name="goods_purchase_limit_strategy">
  347. <option value="none" @if($goods_purchase_limit_strategy == 'none') selected @endif>不限制</option>
  348. <option value="package" @if($goods_purchase_limit_strategy == 'package') selected @endif>仅限套餐</option>
  349. <option value="free" @if($goods_purchase_limit_strategy == 'free') selected @endif>仅限免费商品</option>
  350. <option value="package&free" @if($goods_purchase_limit_strategy == 'package&free') selected @endif>限套餐和免费商品</option>
  351. <option value="all" @if($goods_purchase_limit_strategy == 'all') selected @endif>限全部商品</option>
  352. </select>
  353. <span class="help-block"> 是否限制用户重复购买商品,限制后用户不可重复购买已购买的、尚在有效期的商品 </span>
  354. </div>
  355. </div>
  356. </div>
  357. <div class="form-group">
  358. <div class="col-md-6 col-sm-6 col-xs-12">
  359. <label for="subscribe_domain" class="col-md-3 control-label">节点订阅地址</label>
  360. <div class="col-md-9">
  361. <div class="input-group">
  362. <input class="form-control" type="text" name="subscribe_domain" value="{{$subscribe_domain}}" id="subscribe_domain" />
  363. <span class="input-group-btn">
  364. <button class="btn btn-success" type="button" onclick="setSubscribeDomain()">修改</button>
  365. </span>
  366. </div>
  367. <span class="help-block"> (推荐)防止面板域名被DNS投毒后无法正常订阅,需带http://或https:// </span>
  368. </div>
  369. </div>
  370. <div class="col-md-6 col-sm-6 col-xs-12">
  371. <label for="subscribe_max" class="col-md-3 control-label">订阅节点数</label>
  372. <div class="col-md-9">
  373. <div class="input-group">
  374. <input class="form-control" type="text" name="subscribe_max" value="{{$subscribe_max}}" id="subscribe_max" />
  375. <span class="input-group-btn">
  376. <button class="btn btn-success" type="button" onclick="setSubscribeMax()">修改</button>
  377. </span>
  378. </div>
  379. <span class="help-block"> 客户端订阅时取得几个节点,为0时返回全部节点 </span>
  380. </div>
  381. </div>
  382. </div>
  383. <div class="form-group">
  384. <div class="col-md-6 col-sm-6 col-xs-12">
  385. <label for="user_invite_days" class="col-md-3 control-label">邀请码有效期(用户)</label>
  386. <div class="col-md-9">
  387. <div class="input-group">
  388. <input class="form-control" type="text" name="user_invite_days" value="{{$user_invite_days}}" id="user_invite_days" />
  389. <span class="input-group-addon">天</span>
  390. <span class="input-group-btn">
  391. <button class="btn btn-success" type="button" onclick="setUserInviteDays()">修改</button>
  392. </span>
  393. </div>
  394. <span class="help-block"> 用户自行生成邀请的有效期 </span>
  395. </div>
  396. </div>
  397. <div class="col-md-6 col-sm-6 col-xs-12">
  398. <label for="admin_invite_days" class="col-md-3 control-label">邀请码有效期(管理员)</label>
  399. <div class="col-md-9">
  400. <div class="input-group">
  401. <input class="form-control" type="text" name="admin_invite_days" value="{{$admin_invite_days}}" id="admin_invite_days" />
  402. <span class="input-group-addon">天</span>
  403. <span class="input-group-btn">
  404. <button class="btn btn-success" type="button" onclick="setAdminInviteDays()">修改</button>
  405. </span>
  406. </div>
  407. <span class="help-block"> 管理员生成邀请码的有效期 </span>
  408. </div>
  409. </div>
  410. </div>
  411. <div class="form-group">
  412. <div class="col-md-6 col-sm-6 col-xs-12">
  413. <label for="mix_subscribe" class="col-md-3 control-label">混合订阅</label>
  414. <div class="col-md-9">
  415. <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="关闭">
  416. <span class="help-block"> 启用后,订阅信息中将包含V2Ray节点信息(仅支持Shadowrocket、Quantumult、v2rayN) </span>
  417. </div>
  418. </div>
  419. <div class="col-md-6 col-sm-6 col-xs-12">
  420. <label for="rand_subscribe" class="col-md-3 control-label">随机订阅</label>
  421. <div class="col-md-9">
  422. <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="关闭">
  423. <span class="help-block"> 启用后,订阅时将随机返回节点信息,否则按节点排序返回 </span>
  424. </div>
  425. </div>
  426. </div>
  427. <div class="form-group">
  428. <div class="col-md-6 col-sm-6 col-xs-12">
  429. <label for="is_custom_subscribe" class="col-md-3 control-label">高级订阅</label>
  430. <div class="col-md-9">
  431. <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="关闭">
  432. <span class="help-block"> 启用后,订阅信息顶部将显示过期时间、剩余流量 </span>
  433. </div>
  434. </div>
  435. <div class="col-md-6 col-sm-6 col-xs-12"></div>
  436. </div>
  437. </div>
  438. </form>
  439. </div>
  440. <div class="tab-pane" id="tab_3">
  441. <form action="#" method="post" class="form-horizontal">
  442. <div class="portlet-body">
  443. <div class="form-group">
  444. <div class="col-md-6 col-sm-6 col-xs-12">
  445. <label for="is_checkin" class="col-md-3 control-label">签到加流量</label>
  446. <div class="col-md-9">
  447. <input type="checkbox" class="make-switch" @if($is_checkin) checked @endif id="is_checkin" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  448. <span class="help-block"> 登录时将根据流量范围随机得到流量 </span>
  449. </div>
  450. </div>
  451. <div class="col-md-6 col-sm-6 col-xs-12">
  452. <label for="traffic_limit_time" class="col-md-3 control-label">时间间隔</label>
  453. <div class="col-md-9">
  454. <div class="input-group">
  455. <input class="form-control" type="text" name="traffic_limit_time" value="{{$traffic_limit_time}}" id="traffic_limit_time" />
  456. <span class="input-group-addon">分钟</span>
  457. <span class="input-group-btn">
  458. <button class="btn btn-success" type="button" onclick="setTrafficLimitTime()">修改</button>
  459. </span>
  460. </div>
  461. <span class="help-block"> 间隔多久才可以再次签到 </span>
  462. </div>
  463. </div>
  464. </div>
  465. <div class="form-group">
  466. <div class="col-md-6 col-sm-6 col-xs-12">
  467. <label class="col-md-3 control-label">流量范围</label>
  468. <div class="col-md-9">
  469. <div class="input-group input-large input-daterange">
  470. <input type="text" class="form-control" name="min_rand_traffic" value="{{$min_rand_traffic}}" id="min_rand_traffic">
  471. <span class="input-group-addon"> ~ </span>
  472. <input type="text" class="form-control" name="max_rand_traffic" value="{{$max_rand_traffic}}" id="max_rand_traffic">
  473. </div>
  474. <span class="help-block"> 单位:M </span>
  475. </div>
  476. </div>
  477. <div class="col-md-6 col-sm-6 col-xs-12">
  478. </div>
  479. </div>
  480. </div>
  481. </form>
  482. </div>
  483. <div class="tab-pane" id="tab_4">
  484. <form action="#" method="post" class="form-horizontal">
  485. <div class="portlet-body">
  486. <div class="form-group">
  487. <div class="col-md-6 col-sm-6 col-xs-12">
  488. <label for="referral_status" class="col-md-3 control-label">本功能</label>
  489. <div class="col-md-9">
  490. <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="关闭">
  491. <span class="help-block"> 关闭后用户不可见,但是不影响其正常邀请返利 </span>
  492. </div>
  493. </div>
  494. <div class="col-md-6 col-sm-6 col-xs-12">
  495. <label for="referral_traffic" class="col-md-3 control-label">注册送流量</label>
  496. <div class="col-md-9">
  497. <div class="input-group">
  498. <input class="form-control" type="text" name="referral_gift_traffic" value="{{$referral_traffic}}" id="referral_traffic" />
  499. <span class="input-group-addon">MiB</span>
  500. <span class="input-group-btn">
  501. <button class="btn btn-success" type="button" onclick="setReferralTraffic()">修改</button>
  502. </span>
  503. </div>
  504. <span class="help-block"> 根据推广链接、邀请码注册则赠送相应的流量 </span>
  505. </div>
  506. </div>
  507. </div>
  508. <div class="form-group">
  509. <div class="col-md-6 col-sm-6 col-xs-12">
  510. <label for="referral_percent" class="col-md-3 control-label">返利比例</label>
  511. <div class="col-md-9">
  512. <div class="input-group">
  513. <input class="form-control" type="text" name="referral_percent" value="{{$referral_percent * 100}}" id="referral_percent" />
  514. <span class="input-group-addon">%</span>
  515. <span class="input-group-btn">
  516. <button class="btn btn-success" type="button" onclick="setReferralPercent()">修改</button>
  517. </span>
  518. </div>
  519. <span class="help-block"> 根据推广链接注册的账号每笔消费推广人可以分成的比例 </span>
  520. </div>
  521. </div>
  522. <div class="col-md-6 col-sm-6 col-xs-12">
  523. <label for="referral_money" class="col-md-3 control-label">提现限制</label>
  524. <div class="col-md-9">
  525. <div class="input-group">
  526. <input class="form-control" type="text" name="referral_money" value="{{$referral_money}}" id="referral_money" />
  527. <span class="input-group-addon">元</span>
  528. <span class="input-group-btn">
  529. <button class="btn btn-success" type="button" onclick="setReferralMoney()">修改</button>
  530. </span>
  531. </div>
  532. <span class="help-block"> 满多少元才可以申请提现 </span>
  533. </div>
  534. </div>
  535. </div>
  536. </div>
  537. </form>
  538. </div>
  539. <div class="tab-pane" id="tab_5">
  540. <form action="#" method="post" class="form-horizontal">
  541. <div class="portlet-body">
  542. <div class="form-group">
  543. <div class="col-md-6 col-sm-6 col-xs-12">
  544. <label for="expire_warning" class="col-md-3 control-label">用户过期警告</label>
  545. <div class="col-md-9">
  546. <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="关闭">
  547. <span class="help-block"> 启用后账号距到期还剩阈值设置的值时自动发邮件提醒用户 </span>
  548. </div>
  549. </div>
  550. <div class="col-md-6 col-sm-6 col-xs-12">
  551. <label for="expire_days" class="col-md-3 control-label">过期警告阈值</label>
  552. <div class="col-md-9">
  553. <div class="input-group">
  554. <input class="form-control" type="text" name="expire_days" value="{{$expire_days}}" id="expire_days" />
  555. <span class="input-group-addon">天</span>
  556. <span class="input-group-btn">
  557. <button class="btn btn-success" type="button" onclick="setExpireDays()">修改</button>
  558. </span>
  559. </div>
  560. <span class="help-block"> 账号距离过期还差多少天时发警告邮件 </span>
  561. </div>
  562. </div>
  563. </div>
  564. <div class="form-group">
  565. <div class="col-md-6 col-sm-6 col-xs-12">
  566. <label for="traffic_warning" class="col-md-3 control-label">用户流量警告</label>
  567. <div class="col-md-9">
  568. <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="关闭">
  569. <span class="help-block"> 启用后账号已使用流量超过警告阈值时自动发邮件提醒用户 </span>
  570. </div>
  571. </div>
  572. <div class="col-md-6 col-sm-6 col-xs-12">
  573. <label for="traffic_warning_percent" class="col-md-3 control-label">流量警告阈值</label>
  574. <div class="col-md-9">
  575. <div class="input-group">
  576. <input class="form-control" type="text" name="traffic_warning_percent" value="{{$traffic_warning_percent}}" id="traffic_warning_percent" />
  577. <span class="input-group-addon">%</span>
  578. <span class="input-group-btn">
  579. <button class="btn btn-success" type="button" onclick="setTrafficWarningPercent()">修改</button>
  580. </span>
  581. </div>
  582. <span class="help-block"> 建议设置在70%~90% </span>
  583. </div>
  584. </div>
  585. </div>
  586. <div class="form-group">
  587. <div class="col-md-6 col-sm-6 col-xs-12">
  588. <label for="is_node_crash_warning" class="col-md-3 control-label">节点离线提醒</label>
  589. <div class="col-md-9">
  590. <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="关闭">
  591. <span class="help-block"> 启用后如果节点离线则通过ServerChan推送提醒 </span>
  592. </div>
  593. </div>
  594. <div class="col-md-6 col-sm-6 col-xs-12">
  595. <label for="crash_warning_email" class="col-md-3 control-label">管理员收信地址</label>
  596. <div class="col-md-9">
  597. <div class="input-group">
  598. <input class="form-control" type="text" name="crash_warning_email" value="{{$crash_warning_email}}" id="crash_warning_email" placeholder="[email protected]" />
  599. <span class="input-group-btn">
  600. <button class="btn btn-success" type="button" onclick="setCrashWarningEmail()">修改</button>
  601. </span>
  602. </div>
  603. <span class="help-block"> 填写此值则节点离线、用户回复工单都会自动提醒 </span>
  604. </div>
  605. </div>
  606. </div>
  607. <div class="form-group">
  608. <div class="col-md-6 col-sm-6 col-xs-12">
  609. <label for="is_tcp_check" class="col-md-3 control-label">TCP阻断检测</label>
  610. <div class="col-md-9">
  611. <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="关闭">
  612. <span class="help-block"> 每30~60分钟内随机检测节点是否被TCP阻断并提醒 </span>
  613. </div>
  614. </div>
  615. <div class="col-md-6 col-sm-6 col-xs-12">
  616. <label for="tcp_check_warning_times" class="col-md-3 control-label">阻断检测提醒</label>
  617. <div class="col-md-9">
  618. <div class="input-group">
  619. <input class="form-control" type="text" name="tcp_check_warning_times" value="{{$tcp_check_warning_times}}" id="tcp_check_warning_times" placeholder="" />
  620. <span class="input-group-addon">次</span>
  621. <span class="input-group-btn">
  622. <button class="btn btn-success" type="button" onclick="setTcpCheckWarningTimes()">修改</button>
  623. </span>
  624. </div>
  625. <span class="help-block"> 提醒几次后自动下线节点,为0时不限制,不超过12 </span>
  626. </div>
  627. </div>
  628. </div>
  629. <div class="form-group">
  630. <div class="col-md-6 col-sm-6 col-xs-12">
  631. <label for="is_server_chan" class="col-md-3 control-label">ServerChan</label>
  632. <div class="col-md-9">
  633. <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="关闭">
  634. <span class="help-block"> 推送节点离线提醒、用户流量异常警告、节点使用报告(<a href="http://sc.ftqq.com" target="_blank">绑定微信</a>) </span>
  635. </div>
  636. </div>
  637. <div class="col-md-6 col-sm-6 col-xs-12">
  638. <label for="server_chan_key" class="col-md-3 control-label">SCKEY</label>
  639. <div class="col-md-9">
  640. <div class="input-group">
  641. <input class="form-control" type="text" name="server_chan_key" value="{{$server_chan_key}}" id="server_chan_key" placeholder="请到ServerChan申请" />
  642. <span class="input-group-btn">
  643. <button class="btn btn-success" type="button" onclick="setServerChanKey()">修改</button>
  644. </span>
  645. </div>
  646. <span class="help-block"> 启用ServerChan,请务必填入本值(<a href="http://sc.ftqq.com" target="_blank">申请SCKEY</a>) </span>
  647. </div>
  648. </div>
  649. </div>
  650. </div>
  651. </form>
  652. </div>
  653. <div class="tab-pane" id="tab_6">
  654. <form action="#" method="post" class="form-horizontal">
  655. <div class="portlet-body">
  656. <div class="form-group">
  657. <div class="col-md-6 col-sm-6 col-xs-12">
  658. <label for="is_clear_log" class="col-md-3 control-label">自动清除日志</label>
  659. <div class="col-md-9">
  660. <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="关闭">
  661. <span class="help-block"> (推荐)启用后自动清除无用日志 </span>
  662. </div>
  663. </div>
  664. <div class="col-md-6 col-sm-6 col-xs-12">
  665. <label for="reset_traffic" class="col-md-3 control-label">流量自动重置</label>
  666. <div class="col-md-9">
  667. <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="关闭">
  668. <span class="help-block"> 用户会按其购买套餐的日期自动重置可用流量 </span>
  669. </div>
  670. </div>
  671. </div>
  672. <div class="form-group">
  673. <div class="col-md-6 col-sm-6 col-xs-12">
  674. <label for="is_subscribe_ban" class="col-md-3 control-label">订阅异常自动封禁</label>
  675. <div class="col-md-9">
  676. <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="关闭">
  677. <span class="help-block"> 启用后用户订阅链接请求超过设定阈值则自动封禁 </span>
  678. </div>
  679. </div>
  680. <div class="col-md-6 col-sm-6 col-xs-12">
  681. <label for="subscribe_ban_times" class="col-md-3 control-label">订阅请求阈值</label>
  682. <div class="col-md-9">
  683. <div class="input-group">
  684. <input class="form-control" type="text" name="subscribe_ban_times" value="{{$subscribe_ban_times}}" id="subscribe_ban_times" />
  685. <span class="input-group-btn">
  686. <button class="btn btn-success" type="button" onclick="setSubscribeBanTimes()">修改</button>
  687. </span>
  688. </div>
  689. <span class="help-block"> 24小时内订阅链接请求次数限制 </span>
  690. </div>
  691. </div>
  692. </div>
  693. <div class="form-group">
  694. <div class="col-md-6 col-sm-6 col-xs-12">
  695. <label for="is_traffic_ban" class="col-md-3 control-label">异常自动封号</label>
  696. <div class="col-md-9">
  697. <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="关闭">
  698. <span class="help-block"> 1小时内流量超过异常阈值则自动封号(仅禁用代理) </span>
  699. </div>
  700. </div>
  701. <div class="col-md-6 col-sm-6 col-xs-12">
  702. <label for="traffic_ban_value" class="col-md-3 control-label">流量异常阈值</label>
  703. <div class="col-md-9">
  704. <div class="input-group">
  705. <input class="form-control" type="text" name="traffic_ban_value" value="{{$traffic_ban_value}}" id="traffic_ban_value" />
  706. <span class="input-group-addon">GiB</span>
  707. <span class="input-group-btn">
  708. <button class="btn btn-success" type="button" onclick="setTrafficBanValue()">修改</button>
  709. </span>
  710. </div>
  711. <span class="help-block"> 1小时内超过该值,则触发自动封号 </span>
  712. </div>
  713. </div>
  714. </div>
  715. <div class="form-group">
  716. <div class="col-md-6 col-sm-6 col-xs-12">
  717. <label for="traffic_ban_time" class="col-md-3 control-label">封号时长</label>
  718. <div class="col-md-9">
  719. <div class="input-group">
  720. <input class="form-control" type="text" name="traffic_ban_time" value="{{$traffic_ban_time}}" id="traffic_ban_time" />
  721. <span class="input-group-addon">分钟</span>
  722. <span class="input-group-btn">
  723. <button class="btn btn-success" type="button" onclick="setTrafficBanTime()">修改</button>
  724. </span>
  725. </div>
  726. <span class="help-block"> 触发流量异常导致用户被封禁的时长,到期后自动解封 </span>
  727. </div>
  728. </div>
  729. <div class="col-md-6 col-sm-6 col-xs-12">
  730. <label for="auto_release_port" class="col-md-3 control-label">端口自动释放</label>
  731. <div class="col-md-9">
  732. <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="关闭">
  733. <span class="help-block"> 被封禁和过期一个月的用户端口自动释放 </span>
  734. </div>
  735. </div>
  736. </div>
  737. <div class="form-group">
  738. <div class="col-md-6 col-sm-6 col-xs-12">
  739. <label for="is_ban_status" class="col-md-3 control-label">过期自动封禁</label>
  740. <div class="col-md-9">
  741. <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="仅封禁代理">
  742. <span class="help-block"> (慎重)封禁整个账号会重置账号的所有数据且会导致用户无法登录 </span>
  743. </div>
  744. </div>
  745. <div class="col-md-6 col-sm-6 col-xs-12">
  746. <label for="node_daily_report" class="col-md-3 control-label">节点使用报告</label>
  747. <div class="col-md-9">
  748. <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="关闭">
  749. <span class="help-block"> 每天早上9点推送昨天节点的使用情况 </span>
  750. </div>
  751. </div>
  752. </div>
  753. </div>
  754. </form>
  755. </div>
  756. <div class="tab-pane" id="tab_7">
  757. <form action="{{url('admin/setExtend')}}" method="post" enctype="multipart/form-data" class="form-horizontal" role="form" id="setExtend">
  758. {{csrf_field()}}
  759. <div class="form-group">
  760. <div class="col-md-6 col-sm-6 col-xs-12">
  761. <label class="control-label col-md-2 col-xs-4">首页LOGO</label>
  762. <div class="col-md-8 col-xs-8">
  763. <div class="fileinput fileinput-new" data-provides="fileinput">
  764. <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
  765. @if ($website_home_logo)
  766. <img src="{{$website_home_logo}}" alt="" />
  767. @else
  768. <img src="/assets/images/noimage.png" alt="" />
  769. @endif
  770. </div>
  771. <span class="help-block"> 推荐尺寸:300 X 90,透明背景 </span>
  772. <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;"> </div>
  773. <div>
  774. <span class="btn default btn-file">
  775. <span class="fileinput-new"> 选择 </span>
  776. <span class="fileinput-exists"> 更换 </span>
  777. <input type="file" name="website_home_logo" id="website_home_logo">
  778. </span>
  779. <a href="javascript:;" class="btn red fileinput-exists" data-dismiss="fileinput"> 移除 </a>
  780. </div>
  781. </div>
  782. </div>
  783. </div>
  784. <div class="col-md-6 col-sm-6 col-xs-12">
  785. <label class="control-label col-md-2 col-xs-4">站内LOGO</label>
  786. <div class="col-md-8 col-xs-8">
  787. <div class="fileinput fileinput-new" data-provides="fileinput">
  788. <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
  789. @if ($website_logo)
  790. <img src="{{$website_logo}}" alt="" />
  791. @else
  792. <img src="/assets/images/noimage.png" alt="" />
  793. @endif
  794. </div>
  795. <span class="help-block"> 推荐尺寸:150 X 30,透明背景 </span>
  796. <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;"> </div>
  797. <div>
  798. <span class="btn default btn-file">
  799. <span class="fileinput-new"> 选择 </span>
  800. <span class="fileinput-exists"> 更换 </span>
  801. <input type="file" name="website_logo" id="website_logo">
  802. </span>
  803. <a href="javascript:;" class="btn red fileinput-exists" data-dismiss="fileinput"> 移除 </a>
  804. </div>
  805. </div>
  806. </div>
  807. </div>
  808. </div>
  809. <div class="form-group">
  810. <div class="col-md-6 col-sm-6 col-xs-12">
  811. <label for="website_analytics" class=" control-label col-md-2 col-xs-4">统计代码</label>
  812. <div class="col-md-8 col-xs-6">
  813. <textarea class="form-control" rows="10" name="website_analytics" id="website_analytics">{{$website_analytics}}</textarea>
  814. </div>
  815. </div>
  816. <div class="col-md-6 col-sm-6 col-xs-12">
  817. <label for="website_customer_service" class=" control-label col-md-2 col-xs-4">客服代码</label>
  818. <div class="col-md-8 col-xs-6">
  819. <textarea class="form-control" rows="10" name="website_customer_service" id="website_customer_service">{{$website_customer_service}}</textarea>
  820. </div>
  821. </div>
  822. </div>
  823. <div class="form-group">
  824. <div class="col-md-offset-2 col-md-10">
  825. <button type="submit" class="btn blue">提交</button>
  826. </div>
  827. </div>
  828. </form>
  829. </div>
  830. <div class="tab-pane" id="tab_8">
  831. <form action="#" method="post" class="form-horizontal">
  832. <div class="portlet-body">
  833. <div class="form-group">
  834. <div class="col-md-12">
  835. <div class="alert alert-info" style="text-align: center;">
  836. 请在<a href="https://console.youzanyun.com/login" target="_blank" style="color: red;"> 有赞云 </a>设置应用的推送网址为:{{$website_url . '/api/yzy'}}
  837. </div>
  838. </div>
  839. </div>
  840. <div class="form-group">
  841. <div class="col-md-6 col-sm-6 col-xs-12">
  842. <label for="is_youzan" class="col-md-3 control-label">本功能</label>
  843. <div class="col-md-9">
  844. <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="关闭">
  845. <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>
  846. </div>
  847. </div>
  848. <div class="col-md-6 col-sm-6 col-xs-12">
  849. <label for="kdt_id" class="col-md-3 control-label">kdt_id</label>
  850. <div class="col-md-9">
  851. <div class="input-group">
  852. <input class="form-control" type="text" name="kdt_id" value="{{$kdt_id}}" id="kdt_id" />
  853. <span class="input-group-btn">
  854. <button class="btn btn-success" type="button" onclick="setKdtId()">修改</button>
  855. </span>
  856. </div>
  857. <span class="help-block"> 即:授权店铺id </span>
  858. </div>
  859. </div>
  860. </div>
  861. <div class="form-group">
  862. <div class="col-md-6 col-sm-6 col-xs-12">
  863. <label for="youzan_client_id" class="col-md-3 control-label">client_id</label>
  864. <div class="col-md-9">
  865. <div class="input-group">
  866. <input class="form-control" type="text" name="youzan_client_id" value="{{$youzan_client_id}}" id="youzan_client_id" />
  867. <span class="input-group-btn">
  868. <button class="btn btn-success" type="button" onclick="setYouzanClientId()">修改</button>
  869. </span>
  870. </div>
  871. </div>
  872. </div>
  873. <div class="col-md-6 col-sm-6 col-xs-12">
  874. <label for="youzan_client_secret" class="col-md-3 control-label">client_secret</label>
  875. <div class="col-md-9">
  876. <div class="input-group">
  877. <input class="form-control" type="text" name="youzan_client_secret" value="{{$youzan_client_secret}}" id="youzan_client_secret" />
  878. <span class="input-group-btn">
  879. <button class="btn btn-success" type="button" onclick="setYouzanClientSecret()">修改</button>
  880. </span>
  881. </div>
  882. </div>
  883. </div>
  884. </div>
  885. </div>
  886. </form>
  887. </div>
  888. <div class="tab-pane" id="tab_9">
  889. <form action="#" method="post" class="form-horizontal">
  890. <div class="portlet-body">
  891. <div class="form-group">
  892. <div class="col-md-6 col-sm-6 col-xs-12">
  893. <label for="is_alipay" class="col-md-3 control-label">本功能</label>
  894. <div class="col-md-9">
  895. <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="关闭">
  896. <span class="help-block"> 请先到 <a href="https://global.alipay.com/" target="_blank">AliPay国际</a> 申请partner和key </span>
  897. </div>
  898. </div>
  899. <div class="col-md-6 col-sm-6 col-xs-12">
  900. <label for="alipay_currency" class="col-md-3 control-label">结算币种</label>
  901. <div class="col-md-9">
  902. <select id="alipay_currency" class="form-control select2" name="alipay_currency">
  903. <option value="USD" @if($alipay_currency == 'USD') selected @endif>美元</option>
  904. <option value="HKD" @if($alipay_currency == 'HKD') selected @endif>港币</option>
  905. <option value="JPY" @if($alipay_currency == 'JPY') selected @endif>日元</option>
  906. <option value="EUR" @if($alipay_currency == 'EUR') selected @endif>欧元</option>
  907. </select>
  908. </div>
  909. </div>
  910. </div>
  911. <div class="form-group">
  912. <div class="col-md-6 col-sm-6 col-xs-12">
  913. <label for="alipay_sign_type" class="col-md-3 control-label">加密方式</label>
  914. <div class="col-md-9">
  915. <select id="alipay_sign_type" class="form-control select2" name="alipay_sign_type">
  916. <option value="MD5" @if($alipay_sign_type == 'MD5') selected @endif>MD5</option>
  917. <option value="RSA" @if($alipay_sign_type == 'RSA') selected @endif>RSA</option>
  918. </select>
  919. </div>
  920. </div>
  921. <div class="col-md-6 col-sm-6 col-xs-12">
  922. <label for="alipay_transport" class="col-md-3 control-label">启用SSL验证</label>
  923. <div class="col-md-9">
  924. <select id="alipay_transport" class="form-control select2" name="alipay_transport">
  925. <option value="http" @if($alipay_transport == 'http') selected @endif>否</option>
  926. <option value="https" @if($alipay_transport == 'https') selected @endif>是</option>
  927. </select>
  928. <span class="help-block"> HTTPS站点需启用 </span>
  929. </div>
  930. </div>
  931. </div>
  932. <div class="form-group">
  933. <div class="col-md-6 col-sm-6 col-xs-12">
  934. <label for="alipay_partner" class="col-md-3 control-label">partner</label>
  935. <div class="col-md-9">
  936. <div class="input-group">
  937. <input class="form-control" type="text" name="alipay_partner" value="{{$alipay_partner}}" id="alipay_partner" />
  938. <span class="input-group-btn">
  939. <button class="btn btn-success" type="button" onclick="setAlipayPartner()">修改</button>
  940. </span>
  941. </div>
  942. </div>
  943. </div>
  944. <div class="col-md-6 col-sm-6 col-xs-12">
  945. <label for="alipay_key" class="col-md-3 control-label">key</label>
  946. <div class="col-md-9">
  947. <div class="input-group">
  948. <input class="form-control" type="password" name="alipay_key" value="{{$alipay_key}}" id="alipay_key" />
  949. <span class="input-group-btn">
  950. <button class="btn btn-success" type="button" onclick="setAlipayKey()">修改</button>
  951. </span>
  952. </div>
  953. </div>
  954. </div>
  955. </div>
  956. <div class="form-group">
  957. <div class="col-md-6 col-sm-6 col-xs-12">
  958. <label for="alipay_private_key" class="col-md-3 control-label">RSA私钥</label>
  959. <div class="col-md-9">
  960. <div class="input-group">
  961. <input class="form-control" type="password" name="alipay_private_key" value="{{$alipay_private_key}}" id="alipay_private_key" />
  962. <span class="input-group-btn">
  963. <button class="btn btn-success" type="button" onclick="setAlipayPrivateKey()">修改</button>
  964. </span>
  965. </div>
  966. </div>
  967. </div>
  968. <div class="col-md-6 col-sm-6 col-xs-12">
  969. <label for="alipay_public_key" class="col-md-3 control-label">RSA公钥</label>
  970. <div class="col-md-9">
  971. <div class="input-group">
  972. <input class="form-control" type="password" name="alipay_public_key" value="{{$alipay_public_key}}" id="alipay_public_key" />
  973. <span class="input-group-btn">
  974. <button class="btn btn-success" type="button" onclick="setAlipayPublicKey()">修改</button>
  975. </span>
  976. </div>
  977. </div>
  978. </div>
  979. </div>
  980. </div>
  981. </form>
  982. </div>
  983. <div class="tab-pane" id="tab_10">
  984. <form action="#" method="post" class="form-horizontal">
  985. <div class="portlet-body">
  986. <div class="form-group">
  987. <div class="col-md-6 col-sm-6 col-xs-12">
  988. <label for="is_f2fpay"
  989. class="col-md-3 control-label">本功能</label>
  990. <div class="col-md-9">
  991. <input type="checkbox" class="make-switch" @if($is_f2fpay) checked @endif id="is_f2fpay" data-on-color="success" data-off-color="danger" data-on-text="启用" data-off-text="关闭">
  992. <span class="help-block"> 本功能需要 <a href="https://open.alipay.com/platform/home.htm" target="_blank">蚂蚁金服开放平台</a> 申请权限及应用 </span>
  993. </div>
  994. </div>
  995. <div class="col-md-6 col-sm-6 col-xs-12">
  996. <label for="alipay_partner" class="col-md-3 control-label">应用ID</label>
  997. <div class="col-md-9">
  998. <div class="input-group">
  999. <input class="form-control" type="text" name="f2fpay_app_id" value="{{$f2fpay_app_id}}" id="f2fpay_app_id"/>
  1000. <span class="input-group-btn">
  1001. <button class="btn btn-success" type="button" onclick="setF2fpayAppId()">修改</button>
  1002. </span>
  1003. </div>
  1004. <span class="help-block"> 即:APPID </span>
  1005. </div>
  1006. </div>
  1007. </div>
  1008. <div class="form-group">
  1009. <div class="col-md-6 col-sm-6 col-xs-12">
  1010. <label for="alipay_private_key"
  1011. class="col-md-3 control-label">RSA私钥</label>
  1012. <div class="col-md-9">
  1013. <div class="input-group">
  1014. <input class="form-control" type="text" name="f2fpay_private_key" value="{{$f2fpay_private_key}}" id="f2fpay_private_key"/>
  1015. <span class="input-group-btn">
  1016. <button class="btn btn-success" type="button" onclick="setF2fpayPrivateKey()">修改</button>
  1017. </span>
  1018. </div>
  1019. <span class="help-block"> 即:rsa_private_key,不包括首尾格式 </span>
  1020. </div>
  1021. </div>
  1022. <div class="col-md-6 col-sm-6 col-xs-12">
  1023. <label for="alipay_public_key"
  1024. class="col-md-3 control-label">支付宝公钥</label>
  1025. <div class="col-md-9">
  1026. <div class="input-group">
  1027. <input class="form-control" type="text" name="f2fpay_public_key" value="{{$f2fpay_public_key}}" id="f2fpay_public_key"/>
  1028. <span class="input-group-btn">
  1029. <button class="btn btn-success" type="button" onclick="setF2fpayPublicKey()">修改</button>
  1030. </span>
  1031. </div>
  1032. <span class="help-block"> 注意不是RSA公钥 </span>
  1033. </div>
  1034. </div>
  1035. </div>
  1036. <div class="form-group">
  1037. <div class="col-md-6 col-sm-6 col-xs-12">
  1038. <label for="f2fpay_subject_name"
  1039. class="col-md-3 control-label">自定义商品名称</label>
  1040. <div class="col-md-9">
  1041. <div class="input-group">
  1042. <input class="form-control" type="text" name="f2fpay_subject_name" value="{{$f2fpay_subject_name}}" id="f2fpay_subject_name"/>
  1043. <span class="input-group-btn">
  1044. <button class="btn btn-success" type="button" onclick="setF2fpaySubjectName()">修改</button>
  1045. </span>
  1046. </div>
  1047. <span class="help-block"> 用于在用户支付宝客户端显示 </span>
  1048. </div>
  1049. </div>
  1050. </div>
  1051. </div>
  1052. </form>
  1053. </div>
  1054. <div class="tab-pane" id="tab_geetest">
  1055. <form action="#" method="post" class="form-horizontal">
  1056. <div class="portlet-body">
  1057. <div class="form-group">
  1058. <div class="col-md-6 col-sm-6 col-xs-12">
  1059. <label for="alipay_private_key"
  1060. class="col-md-3 control-label">ID</label>
  1061. <div class="col-md-9">
  1062. <div class="input-group">
  1063. <input class="form-control" type="text" name="geetest_id" value="{{$geetest_id}}" id="geetest_id"/>
  1064. <span class="input-group-btn">
  1065. <button class="btn btn-success" type="button" onclick="setGeetestId()">修改</button>
  1066. </span>
  1067. </div>
  1068. <span class="help-block"> 本功能需要 <a href="https://auth.geetest.com/login/" target="_blank">极验后台</a> 申请权限及应用 </span>
  1069. </div>
  1070. </div>
  1071. <div class="col-md-6 col-sm-6 col-xs-12">
  1072. <label for="alipay_public_key"
  1073. class="col-md-3 control-label">KEY</label>
  1074. <div class="col-md-9">
  1075. <div class="input-group">
  1076. <input class="form-control" type="text" name="geetest_key" value="{{$geetest_key}}" id="geetest_key"/>
  1077. <span class="input-group-btn">
  1078. <button class="btn btn-success" type="button" onclick="setGeetestKey()">修改</button>
  1079. </span>
  1080. </div>
  1081. </div>
  1082. </div>
  1083. </div>
  1084. </div>
  1085. </form>
  1086. </div>
  1087. <div class="tab-pane" id="tab_googleCaptcha">
  1088. <form action="#" method="post" class="form-horizontal">
  1089. <div class="portlet-body">
  1090. <div class="form-group">
  1091. <div class="col-md-6 col-sm-6 col-xs-12">
  1092. <label for="alipay_private_key"
  1093. class="col-md-3 control-label">网站密钥</label>
  1094. <div class="col-md-9">
  1095. <div class="input-group">
  1096. <input class="form-control" type="text" name="google_captcha_sitekey" value="{{$google_captcha_sitekey}}" id="google_captcha_sitekey"/>
  1097. <span class="input-group-btn">
  1098. <button class="btn btn-success" type="button" onclick="setGoogleCaptchaId()">修改</button>
  1099. </span>
  1100. </div>
  1101. <span class="help-block"> 本功能需要 <a href="https://www.google.com/recaptcha/admin" target="_blank">Google reCAPTCHA后台</a> 申请权限及应用 (申请需科学上网,日常验证不用) </span>
  1102. </div>
  1103. </div>
  1104. <div class="col-md-6 col-sm-6 col-xs-12">
  1105. <label for="alipay_public_key"
  1106. class="col-md-3 control-label">密钥</label>
  1107. <div class="col-md-9">
  1108. <div class="input-group">
  1109. <input class="form-control" type="text" name="google_captcha_secret" value="{{$google_captcha_secret}}" id="google_captcha_secret"/>
  1110. <span class="input-group-btn">
  1111. <button class="btn btn-success" type="button" onclick="setGoogleCaptchaKey()">修改</button>
  1112. </span>
  1113. </div>
  1114. </div>
  1115. </div>
  1116. </div>
  1117. </div>
  1118. </form>
  1119. </div>
  1120. </div>
  1121. </div>
  1122. </div>
  1123. </div>
  1124. </div>
  1125. </div>
  1126. <!-- END PROFILE CONTENT -->
  1127. </div>
  1128. </div>
  1129. <!-- END PAGE BASE CONTENT -->
  1130. </div>
  1131. <!-- END CONTENT BODY -->
  1132. @endsection
  1133. @section('script')
  1134. <script src="/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
  1135. <script src="/assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js" type="text/javascript"></script>
  1136. <script src="/assets/global/plugins/select2/js/select2.full.min.js" type="text/javascript"></script>
  1137. <script type="text/javascript">
  1138. // 注册的默认标签
  1139. $('#initial_labels_for_user').select2({
  1140. theme: 'bootstrap',
  1141. allowClear: true,
  1142. width: '100%'
  1143. }).change(function () {
  1144. var initial_labels_for_user = $(this).val() ? $(this).val().join(',') : '';
  1145. console.log(initial_labels_for_user);
  1146. $.post("{{url('admin/setConfig')}}", {
  1147. _token: '{{csrf_token()}}',
  1148. name: 'initial_labels_for_user',
  1149. value: initial_labels_for_user
  1150. }, function (ret) {
  1151. layer.msg(ret.message, {time: 1000}, function () {
  1152. if (ret.status == 'fail') {
  1153. window.location.reload();
  1154. }
  1155. });
  1156. });
  1157. });
  1158. // 启用、禁用随机端口
  1159. $('#is_rand_port').on({
  1160. 'switchChange.bootstrapSwitch': function (event, state) {
  1161. var is_rand_port = state ? 1 : 0;
  1162. $.post("{{url('admin/setConfig')}}", {
  1163. _token: '{{csrf_token()}}',
  1164. name: 'is_rand_port',
  1165. value: is_rand_port
  1166. }, 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_forbid_china').on({
  1177. 'switchChange.bootstrapSwitch': function (event, state) {
  1178. var is_forbid_china = state ? 1 : 0;
  1179. $.post("{{url('admin/setConfig')}}", {
  1180. _token: '{{csrf_token()}}',
  1181. name: 'is_forbid_china',
  1182. value: is_forbid_china
  1183. }, function (ret) {
  1184. layer.msg(ret.message, {time: 1000}, function () {
  1185. if (ret.status == 'fail') {
  1186. window.location.reload();
  1187. }
  1188. });
  1189. });
  1190. }
  1191. });
  1192. // 启用、禁用屏蔽海外访问
  1193. $('#is_forbid_oversea').on({
  1194. 'switchChange.bootstrapSwitch': function (event, state) {
  1195. var is_forbid_oversea = state ? 1 : 0;
  1196. $.post("{{url('admin/setConfig')}}", {
  1197. _token: '{{csrf_token()}}',
  1198. name: 'is_forbid_oversea',
  1199. value: is_forbid_oversea
  1200. }, function (ret) {
  1201. layer.msg(ret.message, {time: 1000}, function () {
  1202. if (ret.status == 'fail') {
  1203. window.location.reload();
  1204. }
  1205. });
  1206. });
  1207. }
  1208. });
  1209. // 启用、禁用机器人访问
  1210. $('#is_forbid_robot').on({
  1211. 'switchChange.bootstrapSwitch': function (event, state) {
  1212. var is_forbid_robot = state ? 1 : 0;
  1213. $.post("{{url('admin/setConfig')}}", {
  1214. _token: '{{csrf_token()}}',
  1215. name: 'is_forbid_robot',
  1216. value: is_forbid_robot
  1217. }, function (ret) {
  1218. layer.msg(ret.message, {time: 1000}, function () {
  1219. if (ret.status == 'fail') {
  1220. window.location.reload();
  1221. }
  1222. });
  1223. });
  1224. }
  1225. });
  1226. // 启用、禁用注册校验验证码
  1227. $('#is_verify_register').on({
  1228. 'switchChange.bootstrapSwitch': function (event, state) {
  1229. var is_verify_register = state ? 1 : 0;
  1230. $.post("{{url('admin/setConfig')}}", {
  1231. _token: '{{csrf_token()}}',
  1232. name: 'is_verify_register',
  1233. value: is_verify_register
  1234. }, function (ret) {
  1235. layer.msg(ret.message, {time: 1000}, function () {
  1236. if (ret.status == 'fail') {
  1237. window.location.reload();
  1238. }
  1239. });
  1240. });
  1241. }
  1242. });
  1243. // 启用、禁用自定义端口
  1244. $('#is_user_rand_port').on({
  1245. 'switchChange.bootstrapSwitch': function (event, state) {
  1246. var is_user_rand_port = state ? 1 : 0;
  1247. $.post("{{url('admin/setConfig')}}", {
  1248. _token: '{{csrf_token()}}',
  1249. name: 'is_user_rand_port',
  1250. value: is_user_rand_port
  1251. }, function (ret) {
  1252. layer.msg(ret.message, {time: 1000}, function () {
  1253. if (ret.status == 'fail') {
  1254. window.location.reload();
  1255. }
  1256. });
  1257. });
  1258. }
  1259. });
  1260. // 启用、禁用登录加积分
  1261. $('#is_checkin').on({
  1262. 'switchChange.bootstrapSwitch': function (event, state) {
  1263. var is_checkin = state ? 1 : 0;
  1264. $.post("{{url('admin/setConfig')}}", {
  1265. _token: '{{csrf_token()}}',
  1266. name: 'is_checkin',
  1267. value: is_checkin
  1268. }, function (ret) {
  1269. layer.msg(ret.message, {time: 1000}, function () {
  1270. if (ret.status == 'fail') {
  1271. window.location.reload();
  1272. }
  1273. });
  1274. });
  1275. }
  1276. });
  1277. // 启用、禁用注册
  1278. $('#is_register').on({
  1279. 'switchChange.bootstrapSwitch': function (event, state) {
  1280. var is_register = state ? 1 : 0;
  1281. $.post("{{url('admin/setConfig')}}", {
  1282. _token: '{{csrf_token()}}',
  1283. name: 'is_register',
  1284. value: is_register
  1285. }, function (ret) {
  1286. layer.msg(ret.message, {time: 1000}, function () {
  1287. if (ret.status == 'fail') {
  1288. window.location.reload();
  1289. }
  1290. });
  1291. });
  1292. }
  1293. });
  1294. // 启用、可选、禁用邀请注册
  1295. $('#is_invite_register').change(function () {
  1296. var is_invite_register = $(this).val();
  1297. $.post("{{url('admin/setConfig')}}", {
  1298. _token: '{{csrf_token()}}',
  1299. name: 'is_invite_register',
  1300. value: is_invite_register
  1301. }, function (ret) {
  1302. layer.msg(ret.message, {time: 1000}, function () {
  1303. if (ret.status == 'fail') {
  1304. window.location.reload();
  1305. }
  1306. });
  1307. });
  1308. });
  1309. // 启用、禁用用户重置密码
  1310. $('#is_reset_password').on({
  1311. 'switchChange.bootstrapSwitch': function (event, state) {
  1312. var is_reset_password = state ? 1 : 0;
  1313. $.post("{{url('admin/setConfig')}}", {
  1314. _token: '{{csrf_token()}}',
  1315. name: 'is_reset_password',
  1316. value: is_reset_password
  1317. }, function (ret) {
  1318. layer.msg(ret.message, {time: 1000}, function () {
  1319. if (ret.status == 'fail') {
  1320. window.location.reload();
  1321. }
  1322. });
  1323. });
  1324. }
  1325. });
  1326. // 启用、禁用验证码
  1327. $('#is_captcha').change(function () {
  1328. var is_captcha = $(this).val();
  1329. toggleCaptchaTab(is_captcha);
  1330. $.post("{{url('admin/setConfig')}}", {
  1331. _token: '{{csrf_token()}}',
  1332. name: 'is_captcha',
  1333. value: is_captcha
  1334. }, function (ret) {
  1335. layer.msg(ret.message, {time: 1000}, function () {
  1336. if (ret.status == 'fail') {
  1337. window.location.reload();
  1338. }
  1339. });
  1340. });
  1341. });
  1342. // 启用、禁用免费邀请码
  1343. $('#is_free_code').on({
  1344. 'switchChange.bootstrapSwitch': function (event, state) {
  1345. var is_free_code = state ? 1 : 0;
  1346. $.post("{{url('admin/setConfig')}}", {
  1347. _token: '{{csrf_token()}}',
  1348. name: 'is_free_code',
  1349. value: is_free_code
  1350. }, function (ret) {
  1351. layer.msg(ret.message, {time: 1000}, function () {
  1352. if (ret.status == 'fail') {
  1353. window.location.reload();
  1354. }
  1355. });
  1356. });
  1357. }
  1358. });
  1359. // 启用、禁用用户激活用户
  1360. $('#is_active_register').on({
  1361. 'switchChange.bootstrapSwitch': function (event, state) {
  1362. var is_active_register = state ? 1 : 0;
  1363. $.post("{{url('admin/setConfig')}}", {
  1364. _token: '{{csrf_token()}}',
  1365. name: 'is_active_register',
  1366. value: is_active_register
  1367. }, function (ret) {
  1368. layer.msg(ret.message, {time: 1000}, function () {
  1369. if (ret.status == 'fail') {
  1370. window.location.reload();
  1371. }
  1372. });
  1373. });
  1374. }
  1375. });
  1376. // 启用、禁用用户到期自动邮件提醒
  1377. $('#expire_warning').on({
  1378. 'switchChange.bootstrapSwitch': function (event, state) {
  1379. var expire_warning = state ? 1 : 0;
  1380. $.post("{{url('admin/setConfig')}}", {
  1381. _token: '{{csrf_token()}}',
  1382. name: 'expire_warning',
  1383. value: expire_warning
  1384. }, function (ret) {
  1385. layer.msg(ret.message, {time: 1000}, function () {
  1386. if (ret.status == 'fail') {
  1387. window.location.reload();
  1388. }
  1389. });
  1390. });
  1391. }
  1392. });
  1393. // 启用、禁用节点离线发件提醒管理员
  1394. $('#is_node_crash_warning').on({
  1395. 'switchChange.bootstrapSwitch': function (event, state) {
  1396. var is_node_crash_warning = state ? 1 : 0;
  1397. $.post("{{url('admin/setConfig')}}", {
  1398. _token: '{{csrf_token()}}',
  1399. name: 'is_node_crash_warning',
  1400. value: is_node_crash_warning
  1401. }, function (ret) {
  1402. layer.msg(ret.message, {time: 1000}, function () {
  1403. if (ret.status == 'fail') {
  1404. window.location.reload();
  1405. }
  1406. });
  1407. });
  1408. }
  1409. });
  1410. // 启用、禁用节点离线发ServerChan微信消息提醒
  1411. $('#is_server_chan').on({
  1412. 'switchChange.bootstrapSwitch': function (event, state) {
  1413. var is_server_chan = state ? 1 : 0;
  1414. $.post("{{url('admin/setConfig')}}", {
  1415. _token: '{{csrf_token()}}',
  1416. name: 'is_server_chan',
  1417. value: is_server_chan
  1418. }, function (ret) {
  1419. layer.msg(ret.message, {time: 1000}, function () {
  1420. if (ret.status == 'fail') {
  1421. window.location.reload();
  1422. }
  1423. });
  1424. });
  1425. }
  1426. });
  1427. // 启用、禁用Namesilo
  1428. $('#is_namesilo').on({
  1429. 'switchChange.bootstrapSwitch': function (event, state) {
  1430. var is_namesilo = state ? 1 : 0;
  1431. $.post("{{url('admin/setConfig')}}", {
  1432. _token: '{{csrf_token()}}',
  1433. name: 'is_namesilo',
  1434. value: is_namesilo
  1435. }, function (ret) {
  1436. layer.msg(ret.message, {time: 1000}, function () {
  1437. if (ret.status == 'fail') {
  1438. window.location.reload();
  1439. }
  1440. });
  1441. });
  1442. }
  1443. });
  1444. // 启用、禁用混合订阅
  1445. $('#mix_subscribe').on({
  1446. 'switchChange.bootstrapSwitch': function (event, state) {
  1447. var mix_subscribe = state ? 1 : 0;
  1448. $.post("{{url('admin/setConfig')}}", {
  1449. _token: '{{csrf_token()}}',
  1450. name: 'mix_subscribe',
  1451. value: mix_subscribe
  1452. }, function (ret) {
  1453. layer.msg(ret.message, {time: 1000}, function () {
  1454. if (ret.status == 'fail') {
  1455. window.location.reload();
  1456. }
  1457. });
  1458. });
  1459. }
  1460. });
  1461. // 启用、禁用随机订阅
  1462. $('#rand_subscribe').on({
  1463. 'switchChange.bootstrapSwitch': function (event, state) {
  1464. var rand_subscribe = state ? 1 : 0;
  1465. $.post("{{url('admin/setConfig')}}", {
  1466. _token: '{{csrf_token()}}',
  1467. name: 'rand_subscribe',
  1468. value: rand_subscribe
  1469. }, function (ret) {
  1470. layer.msg(ret.message, {time: 1000}, function () {
  1471. if (ret.status == 'fail') {
  1472. window.location.reload();
  1473. }
  1474. });
  1475. });
  1476. }
  1477. });
  1478. // 启用、禁用自定义订阅
  1479. $('#is_custom_subscribe').on({
  1480. 'switchChange.bootstrapSwitch': function (event, state) {
  1481. var is_custom_subscribe = state ? 1 : 0;
  1482. $.post("{{url('admin/setConfig')}}", {
  1483. _token: '{{csrf_token()}}',
  1484. name: 'is_custom_subscribe',
  1485. value: is_custom_subscribe
  1486. }, function (ret) {
  1487. layer.msg(ret.message, {time: 1000}, function () {
  1488. if (ret.status == 'fail') {
  1489. window.location.reload();
  1490. }
  1491. });
  1492. });
  1493. }
  1494. });
  1495. // 启用、禁用TCP阻断探测
  1496. $('#is_tcp_check').on({
  1497. 'switchChange.bootstrapSwitch': function (event, state) {
  1498. var is_tcp_check = state ? 1 : 0;
  1499. $.post("{{url('admin/setConfig')}}", {
  1500. _token: '{{csrf_token()}}',
  1501. name: 'is_tcp_check',
  1502. value: is_tcp_check
  1503. }, function (ret) {
  1504. layer.msg(ret.message, {time: 1000}, function () {
  1505. if (ret.status == 'fail') {
  1506. window.location.reload();
  1507. }
  1508. });
  1509. });
  1510. }
  1511. });
  1512. // 启用、禁用订阅异常自动封禁
  1513. $('#is_subscribe_ban').on({
  1514. 'switchChange.bootstrapSwitch': function (event, state) {
  1515. var is_subscribe_ban = state ? 1 : 0;
  1516. $.post("{{url('admin/setConfig')}}", {
  1517. _token: '{{csrf_token()}}',
  1518. name: 'is_subscribe_ban',
  1519. value: is_subscribe_ban
  1520. }, function (ret) {
  1521. layer.msg(ret.message, {time: 1000}, function () {
  1522. if (ret.status == 'fail') {
  1523. window.location.reload();
  1524. }
  1525. });
  1526. });
  1527. }
  1528. });
  1529. // 启用、禁用退关返利用户可见与否
  1530. $('#referral_status').on({
  1531. 'switchChange.bootstrapSwitch': function (event, state) {
  1532. var referral_status = state ? 1 : 0;
  1533. $.post("{{url('admin/setConfig')}}", {
  1534. _token: '{{csrf_token()}}',
  1535. name: 'referral_status',
  1536. value: referral_status
  1537. }, function (ret) {
  1538. layer.msg(ret.message, {time: 1000}, function () {
  1539. if (ret.status == 'fail') {
  1540. window.location.reload();
  1541. }
  1542. });
  1543. });
  1544. }
  1545. });
  1546. // 启用、禁用随机端口
  1547. $('#traffic_warning').on({
  1548. 'switchChange.bootstrapSwitch': function (event, state) {
  1549. var traffic_warning = state ? 1 : 0;
  1550. $.post("{{url('admin/setConfig')}}", {
  1551. _token: '{{csrf_token()}}',
  1552. name: 'traffic_warning',
  1553. value: traffic_warning
  1554. }, function (ret) {
  1555. layer.msg(ret.message, {time: 1000}, function () {
  1556. if (ret.status == 'fail') {
  1557. window.location.reload();
  1558. }
  1559. });
  1560. });
  1561. }
  1562. });
  1563. // 启用、禁用随机端口
  1564. $('#is_clear_log').on({
  1565. 'switchChange.bootstrapSwitch': function (event, state) {
  1566. var is_clear_log = state ? 1 : 0;
  1567. $.post("{{url('admin/setConfig')}}", {
  1568. _token: '{{csrf_token()}}',
  1569. name: 'is_clear_log',
  1570. value: is_clear_log
  1571. }, function (ret) {
  1572. layer.msg(ret.message, {time: 1000}, function () {
  1573. if (ret.status == 'fail') {
  1574. window.location.reload();
  1575. }
  1576. });
  1577. });
  1578. }
  1579. });
  1580. // 启用、禁用流量自动重置
  1581. $('#reset_traffic').on({
  1582. 'switchChange.bootstrapSwitch': function (event, state) {
  1583. var reset_traffic = state ? 1 : 0;
  1584. $.post("{{url('admin/setConfig')}}", {
  1585. _token: '{{csrf_token()}}',
  1586. name: 'reset_traffic',
  1587. value: reset_traffic
  1588. }, function (ret) {
  1589. layer.msg(ret.message, {time: 1000}, function () {
  1590. if (ret.status == 'fail') {
  1591. window.location.reload();
  1592. }
  1593. });
  1594. });
  1595. }
  1596. });
  1597. // 启用、禁用流量异常自动封号
  1598. $('#is_traffic_ban').on({
  1599. 'switchChange.bootstrapSwitch': function (event, state) {
  1600. var is_traffic_ban = state ? 1 : 0;
  1601. $.post("{{url('admin/setConfig')}}", {
  1602. _token: '{{csrf_token()}}',
  1603. name: 'is_traffic_ban',
  1604. value: is_traffic_ban
  1605. }, function (ret) {
  1606. layer.msg(ret.message, {time: 1000}, function () {
  1607. if (ret.status == 'fail') {
  1608. window.location.reload();
  1609. }
  1610. });
  1611. });
  1612. }
  1613. });
  1614. // 启用、禁用端口自动释放
  1615. $('#auto_release_port').on({
  1616. 'switchChange.bootstrapSwitch': function (event, state) {
  1617. var auto_release_port = state ? 1 : 0;
  1618. $.post("{{url('admin/setConfig')}}", {
  1619. _token: '{{csrf_token()}}',
  1620. name: 'auto_release_port',
  1621. value: auto_release_port
  1622. }, function (ret) {
  1623. layer.msg(ret.message, {time: 1000}, function () {
  1624. if (ret.status == 'fail') {
  1625. window.location.reload();
  1626. }
  1627. });
  1628. });
  1629. }
  1630. });
  1631. // 启用、禁用节点使用报告
  1632. $('#node_daily_report').on({
  1633. 'switchChange.bootstrapSwitch': function (event, state) {
  1634. var node_daily_report = state ? 1 : 0;
  1635. $.post("{{url('admin/setConfig')}}", {
  1636. _token: '{{csrf_token()}}',
  1637. name: 'node_daily_report',
  1638. value: node_daily_report
  1639. }, 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. // 过期封禁是否禁止账号
  1649. $('#is_ban_status').on({
  1650. 'switchChange.bootstrapSwitch': function (event, state) {
  1651. var is_ban_status = state ? 1 : 0;
  1652. $.post("{{url('admin/setConfig')}}", {
  1653. _token: '{{csrf_token()}}',
  1654. name: 'is_ban_status',
  1655. value: is_ban_status
  1656. }, function (ret) {
  1657. layer.msg(ret.message, {time: 1000}, function () {
  1658. if (ret.status == 'fail') {
  1659. window.location.reload();
  1660. }
  1661. });
  1662. });
  1663. }
  1664. });
  1665. // 启用、禁用有赞云
  1666. $('#is_youzan').on({
  1667. 'switchChange.bootstrapSwitch': function (event, state) {
  1668. var is_youzan = state ? 1 : 0;
  1669. $.post("{{url('admin/setConfig')}}", {
  1670. _token: '{{csrf_token()}}',
  1671. name: 'is_youzan',
  1672. value: is_youzan
  1673. }, function (ret) {
  1674. layer.msg(ret.message, {time: 1000}, function () {
  1675. if (ret.status == 'fail') {
  1676. window.location.reload();
  1677. }
  1678. });
  1679. });
  1680. }
  1681. });
  1682. // 启用、禁用支付宝国际
  1683. $('#is_alipay').on({
  1684. 'switchChange.bootstrapSwitch': function (event, state) {
  1685. var is_alipay = state ? 1 : 0;
  1686. $.post("{{url('admin/setConfig')}}", {
  1687. _token: '{{csrf_token()}}',
  1688. name: 'is_alipay',
  1689. value: is_alipay
  1690. }, function (ret) {
  1691. layer.msg(ret.message, {time: 1000}, function () {
  1692. if (ret.status == 'fail') {
  1693. window.location.reload();
  1694. }
  1695. });
  1696. });
  1697. }
  1698. });
  1699. // 启用、禁用支付宝当面付
  1700. $('#is_f2fpay').on({
  1701. 'switchChange.bootstrapSwitch': function (event, state) {
  1702. var is_f2fpay = state ? 1 : 0;
  1703. $.post("{{url('admin/setConfig')}}", {
  1704. _token: '{{csrf_token()}}',
  1705. name: 'is_f2fpay',
  1706. value: is_f2fpay
  1707. }, function (ret) {
  1708. layer.msg(ret.message, {time: 1000}, function () {
  1709. if (ret.status == 'fail') {
  1710. window.location.reload();
  1711. }
  1712. });
  1713. });
  1714. }
  1715. });
  1716. // 流量异常阈值
  1717. function setTrafficBanValue() {
  1718. var traffic_ban_value = $("#traffic_ban_value").val();
  1719. if (traffic_ban_value < 1) {
  1720. layer.msg('不能小于1', {time: 1000});
  1721. return;
  1722. }
  1723. $.post("{{url('admin/setConfig')}}", {
  1724. _token: '{{csrf_token()}}',
  1725. name: 'traffic_ban_value',
  1726. value: traffic_ban_value
  1727. }, function (ret) {
  1728. layer.msg(ret.message, {time: 1000}, function () {
  1729. if (ret.status == 'fail') {
  1730. window.location.reload();
  1731. }
  1732. });
  1733. });
  1734. }
  1735. // 设置用户封号时长
  1736. function setTrafficBanTime() {
  1737. var traffic_ban_time = $("#traffic_ban_time").val();
  1738. if (traffic_ban_time < 0) {
  1739. layer.msg('不能小于0', {time: 1000});
  1740. return;
  1741. }
  1742. $.post("{{url('admin/setConfig')}}", {
  1743. _token: '{{csrf_token()}}',
  1744. name: 'traffic_ban_time',
  1745. value: traffic_ban_time
  1746. }, 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 setCrashWarningEmail() {
  1756. var crash_warning_email = $("#crash_warning_email").val();
  1757. $.post("{{url('admin/setConfig')}}", {
  1758. _token: '{{csrf_token()}}',
  1759. name: 'crash_warning_email',
  1760. value: crash_warning_email
  1761. }, function (ret) {
  1762. layer.msg(ret.message, {time: 1000}, function () {
  1763. if (ret.status == 'fail') {
  1764. window.location.reload();
  1765. }
  1766. });
  1767. });
  1768. }
  1769. // 设置ServerChan的SCKEY
  1770. function setServerChanKey() {
  1771. var server_chan_key = $("#server_chan_key").val();
  1772. $.post("{{url('admin/setConfig')}}", {
  1773. _token: '{{csrf_token()}}',
  1774. name: 'server_chan_key',
  1775. value: server_chan_key
  1776. }, function (ret) {
  1777. layer.msg(ret.message, {time: 1000}, function () {
  1778. if (ret.status == 'fail') {
  1779. window.location.reload();
  1780. }
  1781. });
  1782. });
  1783. }
  1784. // 设置Namesilo API KEY
  1785. function setNamesiloKey() {
  1786. var namesilo_key = $("#namesilo_key").val();
  1787. $.post("{{url('admin/setConfig')}}", {
  1788. _token: '{{csrf_token()}}',
  1789. name: 'namesilo_key',
  1790. value: namesilo_key
  1791. }, function (ret) {
  1792. layer.msg(ret.message, {time: 1000}, function () {
  1793. if (ret.status == 'fail') {
  1794. window.location.reload();
  1795. }
  1796. });
  1797. });
  1798. }
  1799. // 设置TCP阻断检测提醒次数
  1800. function setTcpCheckWarningTimes() {
  1801. var tcp_check_warning_times = $("#tcp_check_warning_times").val();
  1802. if (tcp_check_warning_times < 0 || tcp_check_warning_times > 12) {
  1803. layer.msg('只能在0-12之间', {time: 1000});
  1804. return;
  1805. }
  1806. $.post("{{url('admin/setConfig')}}", {
  1807. _token: '{{csrf_token()}}',
  1808. name: 'tcp_check_warning_times',
  1809. value: tcp_check_warning_times
  1810. }, function (ret) {
  1811. layer.msg(ret.message, {time: 1000}, function () {
  1812. if (ret.status == 'fail') {
  1813. window.location.reload();
  1814. }
  1815. });
  1816. });
  1817. }
  1818. // 设置订阅封禁阈值
  1819. function setSubscribeBanTimes() {
  1820. var subscribe_ban_times = $("#subscribe_ban_times").val();
  1821. if (subscribe_ban_times < 0) {
  1822. layer.msg('不能小于0', {time: 1000});
  1823. return;
  1824. }
  1825. $.post("{{url('admin/setConfig')}}", {
  1826. _token: '{{csrf_token()}}',
  1827. name: 'subscribe_ban_times',
  1828. value: subscribe_ban_times
  1829. }, function (ret) {
  1830. layer.msg(ret.message, {time: 1000}, function () {
  1831. if (ret.status == 'fail') {
  1832. window.location.reload();
  1833. }
  1834. });
  1835. });
  1836. }
  1837. // 设置有赞云的kdt_id
  1838. function setKdtId() {
  1839. var kdt_id = $("#kdt_id").val();
  1840. $.post("{{url('admin/setConfig')}}", {
  1841. _token: '{{csrf_token()}}',
  1842. name: 'kdt_id',
  1843. value: kdt_id
  1844. }, function (ret) {
  1845. layer.msg(ret.message, {time: 1000}, function () {
  1846. if (ret.status == 'fail') {
  1847. window.location.reload();
  1848. }
  1849. });
  1850. });
  1851. }
  1852. // 设置有赞云的client_id
  1853. function setYouzanClientId() {
  1854. var youzan_client_id = $("#youzan_client_id").val();
  1855. $.post("{{url('admin/setConfig')}}", {
  1856. _token: '{{csrf_token()}}',
  1857. name: 'youzan_client_id',
  1858. value: youzan_client_id
  1859. }, function (ret) {
  1860. layer.msg(ret.message, {time: 1000}, function () {
  1861. if (ret.status == 'fail') {
  1862. window.location.reload();
  1863. }
  1864. });
  1865. });
  1866. }
  1867. // 设置有赞云的client_secret
  1868. function setYouzanClientSecret() {
  1869. var youzan_client_secret = $("#youzan_client_secret").val();
  1870. $.post("{{url('admin/setConfig')}}", {
  1871. _token: '{{csrf_token()}}',
  1872. name: 'youzan_client_secret',
  1873. value: youzan_client_secret
  1874. }, function (ret) {
  1875. layer.msg(ret.message, {time: 1000}, function () {
  1876. if (ret.status == 'fail') {
  1877. window.location.reload();
  1878. }
  1879. });
  1880. });
  1881. }
  1882. // 设置alipay加密方式
  1883. $('#alipay_sign_type').change(function () {
  1884. var alipay_sign_type = $(this).val();
  1885. $.post("{{url('admin/setConfig')}}", {
  1886. _token: '{{csrf_token()}}',
  1887. name: 'alipay_sign_type',
  1888. value: alipay_sign_type
  1889. }, function (ret) {
  1890. layer.msg(ret.message, {time: 1000}, function () {
  1891. if (ret.status == 'fail') {
  1892. window.location.reload();
  1893. }
  1894. });
  1895. });
  1896. });
  1897. // 设置alipay是否启用SSL验证
  1898. $('#alipay_transport').change(function () {
  1899. var alipay_transport = $(this).val();
  1900. $.post("{{url('admin/setConfig')}}", {
  1901. _token: '{{csrf_token()}}',
  1902. name: 'alipay_transport',
  1903. value: alipay_transport
  1904. }, function (ret) {
  1905. layer.msg(ret.message, {time: 1000}, function () {
  1906. if (ret.status == 'fail') {
  1907. window.location.reload();
  1908. }
  1909. });
  1910. });
  1911. });
  1912. //设置alipay的partner
  1913. function setAlipayPartner() {
  1914. var alipay_partner = $("#alipay_partner").val();
  1915. $.post("{{url('admin/setConfig')}}", {
  1916. _token: '{{csrf_token()}}',
  1917. name: 'alipay_partner',
  1918. value: alipay_partner
  1919. }, function (ret) {
  1920. layer.msg(ret.message, {time: 1000}, function () {
  1921. if (ret.status == 'fail') {
  1922. window.location.reload();
  1923. }
  1924. });
  1925. });
  1926. }
  1927. //设置alipay的key
  1928. function setAlipayKey() {
  1929. var alipay_key = $("#alipay_key").val();
  1930. $.post("{{url('admin/setConfig')}}", {
  1931. _token: '{{csrf_token()}}',
  1932. name: 'alipay_key',
  1933. value: alipay_key
  1934. }, function (ret) {
  1935. layer.msg(ret.message, {time: 1000}, function () {
  1936. if (ret.status == 'fail') {
  1937. window.location.reload();
  1938. }
  1939. });
  1940. });
  1941. }
  1942. //设置alipay的私钥
  1943. function setAlipayPrivateKey() {
  1944. var alipay_private_key = $("#alipay_private_key").val();
  1945. $.post("{{url('admin/setConfig')}}", {
  1946. _token: '{{csrf_token()}}',
  1947. name: 'alipay_private_key',
  1948. value: alipay_private_key
  1949. }, function (ret) {
  1950. layer.msg(ret.message, {time: 1000}, function () {
  1951. if (ret.status == 'fail') {
  1952. window.location.reload();
  1953. }
  1954. });
  1955. });
  1956. }
  1957. //设置alipay的公钥
  1958. function setAlipayPublicKey() {
  1959. var alipay_public_key = $("#alipay_public_key").val();
  1960. $.post("{{url('admin/setConfig')}}", {
  1961. _token: '{{csrf_token()}}',
  1962. name: 'alipay_public_key',
  1963. value: alipay_public_key
  1964. }, function (ret) {
  1965. layer.msg(ret.message, {time: 1000}, function () {
  1966. if (ret.status == 'fail') {
  1967. window.location.reload();
  1968. }
  1969. });
  1970. });
  1971. }
  1972. // 设置alipay结算币种
  1973. $('#alipay_currency').change(function () {
  1974. var alipay_currency = $(this).val();
  1975. $.post("{{url('admin/setConfig')}}", {
  1976. _token: '{{csrf_token()}}',
  1977. name: 'alipay_currency',
  1978. value: alipay_currency
  1979. }, function (ret) {
  1980. layer.msg(ret.message, {time: 1000}, function () {
  1981. if (ret.status == 'fail') {
  1982. window.location.reload();
  1983. }
  1984. });
  1985. });
  1986. });
  1987. // 设置f2fpay的应用id
  1988. function setF2fpayAppId() {
  1989. var f2fpay_app_id = $("#f2fpay_app_id").val();
  1990. $.post("{{url('admin/setConfig')}}", {
  1991. _token: '{{csrf_token()}}',
  1992. name: 'f2fpay_app_id',
  1993. value: f2fpay_app_id
  1994. }, function (ret) {
  1995. layer.msg(ret.message, {time: 1000}, function () {
  1996. if (ret.status == 'fail') {
  1997. window.location.reload();
  1998. }
  1999. });
  2000. });
  2001. }
  2002. // 设置f2fpay的私钥
  2003. function setF2fpayPrivateKey() {
  2004. var f2fpay_private_key = $("#f2fpay_private_key").val();
  2005. $.post("{{url('admin/setConfig')}}", {
  2006. _token: '{{csrf_token()}}',
  2007. name: 'f2fpay_private_key',
  2008. value: f2fpay_private_key
  2009. }, function (ret) {
  2010. layer.msg(ret.message, {time: 1000}, function () {
  2011. if (ret.status == 'fail') {
  2012. window.location.reload();
  2013. }
  2014. });
  2015. });
  2016. }
  2017. // 设置f2fpay的公钥
  2018. function setF2fpayPublicKey() {
  2019. var f2fpay_public_key = $("#f2fpay_public_key").val();
  2020. $.post("{{url('admin/setConfig')}}", {
  2021. _token: '{{csrf_token()}}',
  2022. name: 'f2fpay_public_key',
  2023. value: f2fpay_public_key
  2024. }, function (ret) {
  2025. layer.msg(ret.message, {time: 1000}, function () {
  2026. if (ret.status == 'fail') {
  2027. window.location.reload();
  2028. }
  2029. });
  2030. });
  2031. }
  2032. // 自动去除公钥和私钥中的空格和换行
  2033. $("#alipay_public_key,#alipay_private_key,#f2fpay_public_key,#f2fpay_private_key").on('input', function () {
  2034. $(this).val($(this).val().replace(/(\s+)/g, ''));
  2035. });
  2036. // 设置f2fpay的商品名称
  2037. function setF2fpaySubjectName() {
  2038. var f2fpay_subject_name = $("#f2fpay_subject_name").val();
  2039. $.post("{{url('admin/setConfig')}}", {
  2040. _token: '{{csrf_token()}}',
  2041. name: 'f2fpay_subject_name',
  2042. value: f2fpay_subject_name
  2043. }, function (ret) {
  2044. layer.msg(ret.message, {time: 1000}, function () {
  2045. if (ret.status == 'fail') {
  2046. window.location.reload();
  2047. }
  2048. });
  2049. });
  2050. }
  2051. // 设置极验的Id
  2052. function setGeetestId() {
  2053. var geetest_id = $("#geetest_id").val();
  2054. $.post("{{url('admin/setConfig')}}", {
  2055. _token: '{{csrf_token()}}',
  2056. name: 'geetest_id',
  2057. value: geetest_id
  2058. }, function (ret) {
  2059. layer.msg(ret.message, {time: 1000}, function () {
  2060. if (ret.status == 'fail') {
  2061. window.location.reload();
  2062. }
  2063. });
  2064. });
  2065. }
  2066. // 设置极验的Key
  2067. function setGeetestKey() {
  2068. var geetest_key = $("#geetest_key").val();
  2069. $.post("{{url('admin/setConfig')}}", {
  2070. _token: '{{csrf_token()}}',
  2071. name: 'geetest_key',
  2072. value: geetest_key
  2073. }, function (ret) {
  2074. layer.msg(ret.message, {time: 1000}, function () {
  2075. if (ret.status == 'fail') {
  2076. window.location.reload();
  2077. }
  2078. });
  2079. });
  2080. }
  2081. // 设置Google reCAPTCHA的Id
  2082. function setGoogleCaptchaId() {
  2083. var google_captcha_sitekey = $("#google_captcha_sitekey").val();
  2084. $.post("{{url('admin/setConfig')}}", {
  2085. _token: '{{csrf_token()}}',
  2086. name: 'google_captcha_sitekey',
  2087. value: google_captcha_sitekey
  2088. }, function (ret) {
  2089. layer.msg(ret.message, {time: 1000}, function () {
  2090. if (ret.status == 'fail') {
  2091. window.location.reload();
  2092. }
  2093. });
  2094. });
  2095. }
  2096. // 设置Google reCAPTCHA的Key
  2097. function setGoogleCaptchaKey() {
  2098. var google_captcha_secret = $("#google_captcha_secret").val();
  2099. $.post("{{url('admin/setConfig')}}", {
  2100. _token: '{{csrf_token()}}',
  2101. name: 'google_captcha_secret',
  2102. value: google_captcha_secret
  2103. }, function (ret) {
  2104. layer.msg(ret.message, {time: 1000}, function () {
  2105. if (ret.status == 'fail') {
  2106. window.location.reload();
  2107. }
  2108. });
  2109. });
  2110. }
  2111. // 隐藏未选择的验证码Tab
  2112. function toggleCaptchaTab(captcha){
  2113. var is_captcha = captcha ? parseInt(captcha) : {{\App\Components\Helpers::systemConfig()['is_captcha']}};
  2114. switch (is_captcha) {
  2115. case 2:
  2116. $('.tab_captcha').hide().parent().find('#li_tab_geetest').show();
  2117. break;
  2118. case 3:
  2119. $('.tab_captcha').hide().parent().find('#li_tab_googleCaptcha').show();
  2120. break;
  2121. default:
  2122. $('.tab_captcha').hide();
  2123. break;
  2124. }
  2125. };
  2126. toggleCaptchaTab();
  2127. // 设置最小积分
  2128. $("#min_rand_traffic").change(function () {
  2129. var min_rand_traffic = $(this).val();
  2130. var max_rand_traffic = $("#max_rand_traffic").val();
  2131. if (parseInt(min_rand_traffic) < 0) {
  2132. layer.msg('最小积分值不能小于0', {time: 1000});
  2133. return;
  2134. }
  2135. if (parseInt(min_rand_traffic) >= parseInt(max_rand_traffic)) {
  2136. layer.msg('最小积分值必须小于最大积分值', {time: 1000});
  2137. return;
  2138. }
  2139. $.post("{{url('admin/setConfig')}}", {
  2140. _token: '{{csrf_token()}}',
  2141. name: 'min_rand_traffic',
  2142. value: min_rand_traffic
  2143. }, function (ret) {
  2144. layer.msg(ret.message, {time: 1000}, function () {
  2145. if (ret.status == 'fail') {
  2146. window.location.reload();
  2147. }
  2148. });
  2149. });
  2150. });
  2151. // 设置最大积分
  2152. $("#max_rand_traffic").change(function () {
  2153. var min_rand_traffic = $("#min_rand_traffic").val();
  2154. var max_rand_traffic = $(this).val();
  2155. if (parseInt(max_rand_traffic) > 99999) {
  2156. layer.msg('最大积分值不能大于99999', {time: 1000});
  2157. return;
  2158. }
  2159. if (parseInt(min_rand_traffic) >= parseInt(max_rand_traffic)) {
  2160. layer.msg('最大积分值必须大于最小积分值', {time: 1000});
  2161. return;
  2162. }
  2163. $.post("{{url('admin/setConfig')}}", {
  2164. _token: '{{csrf_token()}}',
  2165. name: 'max_rand_traffic',
  2166. value: max_rand_traffic
  2167. }, function (ret) {
  2168. layer.msg(ret.message, {time: 1000}, function () {
  2169. if (ret.status == 'fail') {
  2170. window.location.reload();
  2171. }
  2172. });
  2173. });
  2174. });
  2175. // 设置最小端口
  2176. $("#min_port").change(function () {
  2177. var min_port = $(this).val();
  2178. var max_port = $("#max_port").val();
  2179. // 最大端口必须大于最小端口
  2180. if (parseInt(max_port) <= parseInt(min_port)) {
  2181. layer.msg('必须小于最大端口', {time: 1000});
  2182. return;
  2183. }
  2184. if (parseInt(min_port) < 1000) {
  2185. layer.msg('最小端口不能小于1000', {time: 1000});
  2186. return;
  2187. }
  2188. $.post("{{url('admin/setConfig')}}", {
  2189. _token: '{{csrf_token()}}',
  2190. name: 'min_port',
  2191. value: min_port
  2192. }, function (ret) {
  2193. layer.msg(ret.message, {time: 1000}, function () {
  2194. if (ret.status == 'fail') {
  2195. window.location.reload();
  2196. }
  2197. });
  2198. });
  2199. });
  2200. // 设置最大端口
  2201. $("#max_port").change(function () {
  2202. var min_port = $("#min_port").val();
  2203. var max_port = $(this).val();
  2204. // 最大端口必须大于最小端口
  2205. if (parseInt(max_port) <= parseInt(min_port)) {
  2206. layer.msg('必须大于最小端口', {time: 1000});
  2207. return;
  2208. }
  2209. if (parseInt(max_port) > 65535) {
  2210. layer.msg('最大端口不能大于65535', {time: 1000});
  2211. return;
  2212. }
  2213. $.post("{{url('admin/setConfig')}}", {
  2214. _token: '{{csrf_token()}}',
  2215. name: 'max_port',
  2216. value: max_port
  2217. }, function (ret) {
  2218. layer.msg(ret.message, {time: 1000}, function () {
  2219. if (ret.status == 'fail') {
  2220. window.location.reload();
  2221. }
  2222. });
  2223. });
  2224. });
  2225. $("#goods_purchase_limit_strategy").change(function () {
  2226. var strategy = $(this).val();
  2227. $.post("{{url('admin/setConfig')}}", {
  2228. _token: '{{csrf_token()}}',
  2229. name: 'goods_purchase_limit_strategy',
  2230. value: strategy
  2231. }, function (ret) {
  2232. layer.msg(ret.message, {time: 1000}, function () {
  2233. if (ret.status == 'fail') {
  2234. window.location.reload();
  2235. }
  2236. });
  2237. });
  2238. });
  2239. // 设置注册时默认有效期
  2240. function setDefaultDays() {
  2241. var default_days = parseInt($("#default_days").val());
  2242. if (default_days < 0) {
  2243. layer.msg('不能小于0', {time: 1000});
  2244. return;
  2245. }
  2246. $.post("{{url('admin/setConfig')}}", {
  2247. _token: '{{csrf_token()}}',
  2248. name: 'default_days',
  2249. value: default_days
  2250. }, function (ret) {
  2251. layer.msg(ret.message, {time: 1000}, function () {
  2252. if (ret.status == 'fail') {
  2253. window.location.reload();
  2254. }
  2255. });
  2256. });
  2257. }
  2258. // 设置注册时默认流量
  2259. function setDefaultTraffic() {
  2260. var default_traffic = parseInt($("#default_traffic").val());
  2261. if (default_traffic < 0) {
  2262. layer.msg('不能小于0', {time: 1000});
  2263. return;
  2264. }
  2265. $.post("{{url('admin/setConfig')}}", {
  2266. _token: '{{csrf_token()}}',
  2267. name: 'default_traffic',
  2268. value: default_traffic
  2269. }, function (ret) {
  2270. layer.msg(ret.message, {time: 1000}, function () {
  2271. if (ret.status == 'fail') {
  2272. window.location.reload();
  2273. }
  2274. });
  2275. });
  2276. }
  2277. // 设置可生成邀请码数量
  2278. function setInviteNum() {
  2279. var invite_num = parseInt($("#invite_num").val());
  2280. if (invite_num < 0) {
  2281. layer.msg('不能小于0', {time: 1000});
  2282. return;
  2283. }
  2284. $.post("{{url('admin/setConfig')}}", {
  2285. _token: '{{csrf_token()}}',
  2286. name: 'invite_num',
  2287. value: invite_num
  2288. }, function (ret) {
  2289. layer.msg(ret.message, {time: 1000}, function () {
  2290. if (ret.status == 'fail') {
  2291. window.location.reload();
  2292. }
  2293. });
  2294. });
  2295. }
  2296. // 设置重置密码次数
  2297. function setResetPasswordTimes() {
  2298. var reset_password_times = $("#reset_password_times").val();
  2299. if (reset_password_times < 0) {
  2300. layer.msg('不能小于0', {time: 1000});
  2301. return;
  2302. }
  2303. $.post("{{url('admin/setConfig')}}", {
  2304. _token: '{{csrf_token()}}',
  2305. name: 'reset_password_times',
  2306. value: reset_password_times
  2307. }, function (ret) {
  2308. layer.msg(ret.message, {time: 1000}, function () {
  2309. if (ret.status == 'fail') {
  2310. window.location.reload();
  2311. }
  2312. });
  2313. });
  2314. }
  2315. // 设置激活用户次数
  2316. function setActiveTimes() {
  2317. var active_times = parseInt($("#active_times").val());
  2318. if (active_times < 0) {
  2319. layer.msg('不能小于0', {time: 1000});
  2320. return;
  2321. }
  2322. $.post("{{url('admin/setConfig')}}", {
  2323. _token: '{{csrf_token()}}',
  2324. name: 'active_times',
  2325. value: active_times
  2326. }, function (ret) {
  2327. layer.msg(ret.message, {time: 1000}, function () {
  2328. if (ret.status == 'fail') {
  2329. window.location.reload();
  2330. }
  2331. });
  2332. });
  2333. }
  2334. // 设置节点订阅地址
  2335. function setSubscribeDomain() {
  2336. var subscribe_domain = $("#subscribe_domain").val();
  2337. $.post("{{url('admin/setConfig')}}", {
  2338. _token: '{{csrf_token()}}',
  2339. name: 'subscribe_domain',
  2340. value: subscribe_domain
  2341. }, function (ret) {
  2342. layer.msg(ret.message, {time: 1000}, function () {
  2343. if (ret.status == 'fail') {
  2344. window.location.reload();
  2345. }
  2346. });
  2347. });
  2348. }
  2349. // 设置节点订阅随机展示节点数
  2350. function setRegisterIpLimit() {
  2351. var register_ip_limit = parseInt($("#register_ip_limit").val());
  2352. if (register_ip_limit < 0) {
  2353. layer.msg('不能小于0', {time: 1000});
  2354. return;
  2355. }
  2356. $.post("{{url('admin/setConfig')}}", {
  2357. _token: '{{csrf_token()}}',
  2358. name: 'register_ip_limit',
  2359. value: register_ip_limit
  2360. }, function (ret) {
  2361. layer.msg(ret.message, {time: 1000}, function () {
  2362. if (ret.status == 'fail') {
  2363. window.location.reload();
  2364. }
  2365. });
  2366. });
  2367. }
  2368. // 设置节点订阅随机展示节点数
  2369. function setSubscribeMax() {
  2370. var subscribe_max = parseInt($("#subscribe_max").val());
  2371. if (subscribe_max < 0) {
  2372. layer.msg('不能小于0', {time: 1000});
  2373. return;
  2374. }
  2375. $.post("{{url('admin/setConfig')}}", {
  2376. _token: '{{csrf_token()}}',
  2377. name: 'subscribe_max',
  2378. value: subscribe_max
  2379. }, function (ret) {
  2380. layer.msg(ret.message, {time: 1000}, function () {
  2381. if (ret.status == 'fail') {
  2382. window.location.reload();
  2383. }
  2384. });
  2385. });
  2386. }
  2387. // 设置用户生成邀请码有效期
  2388. function setUserInviteDays() {
  2389. var user_invite_days = parseInt($("#user_invite_days").val());
  2390. if (user_invite_days <= 0) {
  2391. layer.msg('必须大于0', {time: 1000});
  2392. return;
  2393. }
  2394. $.post("{{url('admin/setConfig')}}", {
  2395. _token: '{{csrf_token()}}',
  2396. name: 'user_invite_days',
  2397. value: user_invite_days
  2398. }, function (ret) {
  2399. layer.msg(ret.message, {time: 1000}, function () {
  2400. if (ret.status == 'fail') {
  2401. window.location.reload();
  2402. }
  2403. });
  2404. });
  2405. }
  2406. // 设置管理员生成邀请码有效期
  2407. function setAdminInviteDays() {
  2408. var admin_invite_days = parseInt($("#admin_invite_days").val());
  2409. if (admin_invite_days <= 0) {
  2410. layer.msg('必须大于0', {time: 1000});
  2411. return;
  2412. }
  2413. $.post("{{url('admin/setConfig')}}", {
  2414. _token: '{{csrf_token()}}',
  2415. name: 'admin_invite_days',
  2416. value: admin_invite_days
  2417. }, function (ret) {
  2418. layer.msg(ret.message, {time: 1000}, function () {
  2419. if (ret.status == 'fail') {
  2420. window.location.reload();
  2421. }
  2422. });
  2423. });
  2424. }
  2425. // 设置流量警告阈值
  2426. function setTrafficWarningPercent() {
  2427. var traffic_warning_percent = $("#traffic_warning_percent").val();
  2428. if (traffic_warning_percent < 0) {
  2429. layer.msg('不能小于0', {time: 1000});
  2430. return;
  2431. }
  2432. $.post("{{url('admin/setConfig')}}", {
  2433. _token: '{{csrf_token()}}',
  2434. name: 'traffic_warning_percent',
  2435. value: traffic_warning_percent
  2436. }, function (ret) {
  2437. layer.msg(ret.message, {time: 1000}, function () {
  2438. if (ret.status == 'fail') {
  2439. window.location.reload();
  2440. }
  2441. });
  2442. });
  2443. }
  2444. // 设置用户过期提醒阈值
  2445. function setExpireDays() {
  2446. var expire_days = parseInt($("#expire_days").val());
  2447. if (expire_days < 0) {
  2448. layer.msg('不能小于0', {time: 1000});
  2449. return;
  2450. }
  2451. $.post("{{url('admin/setConfig')}}", {
  2452. _token: '{{csrf_token()}}',
  2453. name: 'expire_days',
  2454. value: expire_days
  2455. }, function (ret) {
  2456. layer.msg(ret.message, {time: 1000}, function () {
  2457. if (ret.status == 'fail') {
  2458. window.location.reload();
  2459. }
  2460. });
  2461. });
  2462. }
  2463. // 设置网站名称
  2464. function setWebsiteName() {
  2465. var website_name = $("#website_name").val();
  2466. $.post("{{url('admin/setConfig')}}", {
  2467. _token: '{{csrf_token()}}',
  2468. name: 'website_name',
  2469. value: website_name
  2470. }, function (ret) {
  2471. layer.msg(ret.message, {time: 1000}, function () {
  2472. if (ret.status == 'fail') {
  2473. window.location.reload();
  2474. }
  2475. });
  2476. });
  2477. }
  2478. // 设置网站地址
  2479. function setWebsiteUrl() {
  2480. var website_url = $("#website_url").val();
  2481. $.post("{{url('admin/setConfig')}}", {
  2482. _token: '{{csrf_token()}}',
  2483. name: 'website_url',
  2484. value: website_url
  2485. }, function (ret) {
  2486. layer.msg(ret.message, {time: 1000}, function () {
  2487. if (ret.status == 'fail') {
  2488. window.location.reload();
  2489. }
  2490. });
  2491. });
  2492. }
  2493. // 生成网站安全码
  2494. function makeWebsiteSecurityCode() {
  2495. $.get("{{url('makeSecurityCode')}}", function(ret) {
  2496. $("#website_security_code").val(ret);
  2497. });
  2498. }
  2499. // 设置网站安全码
  2500. function setWebsiteSecurityCode() {
  2501. var website_security_code = $("#website_security_code").val();
  2502. $.post("{{url('admin/setConfig')}}", {
  2503. _token: '{{csrf_token()}}',
  2504. name: 'website_security_code',
  2505. value: website_security_code
  2506. }, function (ret) {
  2507. layer.msg(ret.message, {time: 1000}, function () {
  2508. if (ret.status == 'fail') {
  2509. window.location.reload();
  2510. }
  2511. });
  2512. });
  2513. }
  2514. // 登录加积分的时间间隔
  2515. function setTrafficLimitTime() {
  2516. var traffic_limit_time = parseInt($("#traffic_limit_time").val());
  2517. if (traffic_limit_time < 0) {
  2518. layer.msg('不能小于0', {time: 1000});
  2519. return;
  2520. }
  2521. $.post("{{url('admin/setConfig')}}", {
  2522. _token: '{{csrf_token()}}',
  2523. name: 'traffic_limit_time',
  2524. value: traffic_limit_time
  2525. }, function (ret) {
  2526. layer.msg(ret.message, {time: 1000}, function () {
  2527. if (ret.status == 'fail') {
  2528. window.location.reload();
  2529. }
  2530. });
  2531. });
  2532. }
  2533. // 设置根据推广链接注册送流量
  2534. function setReferralTraffic() {
  2535. var referral_traffic = parseInt($("#referral_traffic").val());
  2536. if (referral_traffic < 0) {
  2537. layer.msg('不能小于0', {time: 1000});
  2538. return;
  2539. }
  2540. $.post("{{url('admin/setConfig')}}", {
  2541. _token: '{{csrf_token()}}',
  2542. name: 'referral_traffic',
  2543. value: referral_traffic
  2544. }, function (ret) {
  2545. layer.msg(ret.message, {time: 1000}, function () {
  2546. if (ret.status == 'fail') {
  2547. window.location.reload();
  2548. }
  2549. });
  2550. });
  2551. }
  2552. // 设置根据推广链接注册人每产生一笔消费,则推广人可以获得的返利比例
  2553. function setReferralPercent() {
  2554. var referral_percent = $("#referral_percent").val();
  2555. if (referral_percent < 0) {
  2556. layer.msg('不能小于0', {time: 1000});
  2557. return;
  2558. }
  2559. if (referral_percent > 100) {
  2560. layer.msg('不能大于100', {time: 1000});
  2561. return;
  2562. }
  2563. $.post("{{url('admin/setConfig')}}", {
  2564. _token: '{{csrf_token()}}',
  2565. name: 'referral_percent',
  2566. value: referral_percent
  2567. }, function (ret) {
  2568. layer.msg(ret.message, {time: 1000}, function () {
  2569. if (ret.status == 'fail') {
  2570. window.location.reload();
  2571. }
  2572. });
  2573. });
  2574. }
  2575. // 设置返利满多少元才可以提现
  2576. function setReferralMoney() {
  2577. var referral_money = $("#referral_money").val();
  2578. if (referral_money < 0) {
  2579. layer.msg('不能小于0', {time: 1000});
  2580. return;
  2581. }
  2582. $.post("{{url('admin/setConfig')}}", {
  2583. _token: '{{csrf_token()}}',
  2584. name: 'referral_money',
  2585. value: referral_money
  2586. }, function (ret) {
  2587. layer.msg(ret.message, {time: 1000}, function () {
  2588. if (ret.status == 'fail') {
  2589. window.location.reload();
  2590. }
  2591. });
  2592. });
  2593. }
  2594. </script>
  2595. @endsection