system.blade.php 143 KB

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