2
0

recharge_game.blade.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <div class="main-panel">
  5. <div class="content-wrapper">
  6. <div class="page-header">
  7. <h3 class="page-title">
  8. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  9. <i class="mdi mdi-settings"></i>
  10. </span>
  11. {{ __('auto.渠道包配置咖啡和游戏') }}
  12. </h3>
  13. <nav aria-label="breadcrumb">
  14. <ol class="breadcrumb">
  15. <li class="breadcrumb-item"><a href="#">{{ __('auto.渠道管理') }}</a></li>
  16. <li class="breadcrumb-item active" aria-current="page">{{ __('auto.渠道包配置咖啡和游戏') }}</li>
  17. </ol>
  18. </nav>
  19. </div>
  20. <div class="row">
  21. <div class="col-lg-12 grid-margin stretch-card">
  22. <div class="card">
  23. <div class="card-body">
  24. <h4 class="card-title">{{ __('auto.渠道包配置咖啡和游戏') }}</h4>
  25. <form class="well form-inline margin-top-20" method="get"
  26. action='/admin/channel/recharge_game'>
  27. <span style="padding-left: 5px">{{ __('auto.游戏:') }}</span>
  28. <input type="text" name="ChannelPackageName" value="{{$list['ChannelPackageName']}}"
  29. class="form-control">&nbsp;&nbsp;
  30. <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
  31. <a href="/admin/channel/recharge_game"
  32. class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}&{{ __('auto.刷新') }}</a>&nbsp;&nbsp;
  33. <button class="btn-sm btn-gradient-dark" onclick="OpenGamesFunc(-1,'');return false;">
  34. {{ __('auto.开启游戏默认配置') }}
  35. </button>
  36. &nbsp;
  37. <a class="layer-dialog btn-sm btn-gradient-dark"
  38. href="/admin/channel/withdrawal_configall">{{ __('auto.除103修改免审茶叶渠道') }}</a>
  39. &nbsp;
  40. <a class="layer-dialog btn-sm btn-gradient-dark"
  41. href="/admin/channel/withdrawal_switch">{{ __('auto.茶叶可审核状态切换') }}</a>
  42. &nbsp;
  43. <button class="btn-sm btn-gradient-dark" onclick="addNewPlatform();return false;">
  44. {{ __('auto.添加新渠道') }}
  45. </button>
  46. &nbsp;
  47. <button class="btn-sm btn-gradient-primary" onclick="quickCreateChannel();return false;">
  48. {{ __('auto.快速创建渠道') }}
  49. </button>
  50. </form>
  51. <table class="table table-bordered">
  52. <thead>
  53. <tr>
  54. <th >{{ __('auto.游戏包名') }}</th>
  55. <th >{{ __('auto.渠道号') }}</th>
  56. <th >{{ __('auto.审核中') }}</th>
  57. <th width="10%">{{ __('auto.展示开放游戏') }}</th>
  58. <th >{{ __('auto.开放咖啡渠道') }}</th>
  59. {{-- <th >{{ __('auto.开放游戏配置修改') }}</th>--}}
  60. <th width="6%" >{{ __('auto.咖啡渠道修改') }}</th>
  61. <th width="6%">{{ __('auto.免审茶叶渠道修改') }}</th>
  62. <th width="6%">{{ __('auto.分享链接') }}</th>
  63. <th >{{ __('auto.备注') }}</th>
  64. <th >APPKEY</th>
  65. <th >{{ __('auto.上个控最小携带') }}</th>
  66. <th >{{ __('auto.个控分数') }}</th>
  67. <th >{{ __('auto.个控概率') }}</th>
  68. </tr>
  69. </thead>
  70. <tbody>
  71. @foreach($list['list'] as $k=>$v)
  72. <tr>
  73. <td>{{$v->PackageName}}</td>
  74. <td >{{$v->Channel}}</td>
  75. <td onclick="review(this,{{$v->ID}})">{{$v->InReview}}</td>
  76. <td onclick="OpenGamesFunc({{$v->Channel}},'{{$v->PackageName}}')">{{$v->KindName}}</td>
  77. <td>{{$v->rechargeName}}</td>
  78. {{-- <td>--}}
  79. {{-- <button class="btn-sm btn-gradient-dark"--}}
  80. {{-- onclick="OpenGamesFunc({{$v->Channel}},'{{$v->PackageName}}')">--}}
  81. {{-- {{ __('auto.修改') }}--}}
  82. {{-- </button>--}}
  83. {{-- </td>--}}
  84. <td>
  85. <a class="btn-sm btn-gradient-dark layer-dialog"
  86. href="/admin/channel/pay_methods/{{$v->Channel}}">
  87. {{ __('auto.修改') }}
  88. </a>
  89. </td>
  90. <td>
  91. <a class="layer-dialog btn-sm btn-gradient-dark"
  92. href="/admin/channel/withdrawal_config/{{$v->Channel}}">{{ __('auto.修改') }}</a>
  93. </td>
  94. <td style="vertical-align: top">
  95. <a class="btn btn-sm btn-gradient-dark layer-dialog"
  96. href="/admin/channel/share_config/{{$v->ID}}">{{ __('auto.修改') }}</a>
  97. </td>
  98. <td contentEditable="true"
  99. onblur="remarks(this,{{$v->ID}})" style="vertical-align: top">{{$v->Remarks}}</td>
  100. <td onclick="makekey(this,{{$v->ID}})"
  101. style="vertical-align: top">{{$v->AppKey}}</td>
  102. <td contentEditable="true"
  103. onblur="minScore(this,{{$v->ID}})" style="vertical-align: top">{{$v->MinScore}}</td>
  104. <td contentEditable="true"
  105. onblur="contrlScore(this,{{$v->ID}})" style="vertical-align: top">{{$v->ContrlScore}}</td>
  106. <td contentEditable="true"
  107. onblur="rateN(this,{{$v->ID}})" style="vertical-align: top">{{$v->Rate}}</td>
  108. </tr>
  109. @endforeach
  110. </tbody>
  111. </table>
  112. <div class="box-footer clearfix" id="pages">
  113. {{ __('auto.总共') }} <b>{{ $list['list']->appends([
  114. 'list'=>$list['list'],
  115. 'ChannelPackageName'=>$list['ChannelPackageName']
  116. ])->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list['list']->lastPage() }}</b>{{ __('auto.页') }}
  117. {!! $list['list']->links() !!}
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <script>
  126. // 开放游戏默认配置
  127. function addNewPlatform() {
  128. layer.open({
  129. type: 2,
  130. title: '{{ __('auto.添加新的渠道') }}',
  131. shadeClose: true,
  132. shade: 0.8,
  133. area: ['50%', '50%'],
  134. content: '/admin/channel/channel_new'
  135. });
  136. }
  137. // 快速创建渠道
  138. function quickCreateChannel() {
  139. layer.open({
  140. type: 2,
  141. title: '{{ __('auto.快速创建渠道') }}',
  142. shadeClose: true,
  143. shade: 0.8,
  144. area: ['60%', '70%'],
  145. content: '/admin/channel/quick_create_channel',
  146. end: function() {
  147. window.location.reload();
  148. }
  149. });
  150. }
  151. // 开放游戏默认配置
  152. function defaultOpenGamesFunc() {
  153. layer.open({
  154. type: 2,
  155. title: '{{ __('auto.开放游戏默认配置') }}',
  156. shadeClose: true,
  157. shade: 0.8,
  158. area: ['70%', '70%'],
  159. content: '/admin/channel/default_open_games'
  160. });
  161. }
  162. // 开放游戏配置修改
  163. function OpenGamesFunc(id, ChannelPackageName) {
  164. layer.open({
  165. type: 2,
  166. title: '{{ __('auto.开放游戏配置修改') }}',
  167. shadeClose: true,
  168. shade: 0.8,
  169. area: ['70%', '70%'],
  170. content: '/admin/channel/open_games/' + id + '?ChannelPackageName=' + ChannelPackageName
  171. });
  172. }
  173. // 咖啡配置修改
  174. function OpenRechargeFunc(id, ChannelPackageName) {
  175. layer.open({
  176. type: 2,
  177. title: '{{ __('auto.咖啡配置修改') }}',
  178. shadeClose: true,
  179. shade: 0.8,
  180. area: ['70%', '70%'],
  181. content: '/admin/channel/open_recharge/' + id + '?ChannelPackageName=' + ChannelPackageName
  182. });
  183. }
  184. function pasteboard(str)
  185. {
  186. if (navigator.clipboard) {
  187. // clipboard api 复制
  188. navigator.clipboard.writeText(str);
  189. }else {
  190. var save = function (e) {
  191. e.clipboardData.setData('text/plain', str);
  192. e.preventDefault();
  193. }
  194. document.addEventListener('copy', save);
  195. document.execCommand('copy');
  196. document.removeEventListener('copy', save);
  197. }
  198. }
  199. function makekey(obj,id){
  200. let appkey= $(obj).html();
  201. if(!appkey){
  202. myRequest("/admin/channel/appkey/" + id, "post", {}, function (res) {
  203. $(obj).html(res.data)
  204. });
  205. }else{
  206. layer.open({
  207. type: 2,
  208. title: '{{ __('auto.修改app配置') }}',
  209. shadeClose: true,
  210. shade: 0.8,
  211. area: ['50%', '80%'],
  212. content: '/admin/channel/app_key_set/'+id
  213. });
  214. //pasteboard(appkey)
  215. //layer.msg("COPY SUCCESS")
  216. }
  217. }
  218. function review(obj,id){
  219. let status= parseInt($(obj).html())?0:1;
  220. myConfirm("{{ __('auto.操作不可逆,是否继续') }}"+(status?"{{ __('auto.打开') }}":"{{ __('auto.关闭') }}")+"{{ __('auto.审核') }}?", function () {
  221. myRequest("/admin/channel/review/" + id, "post", {status}, function (res) {
  222. $(obj).html(res.data)
  223. layer.msg("{{ __('auto.修改审核状态为:') }}"+res.data)
  224. });
  225. })
  226. }
  227. function remarks(obj,id) {
  228. remark = $(obj).html();
  229. myRequest("/admin/channel/remarks/" + id, "post", {remark}, function (res) {
  230. layer.msg(res.msg)
  231. setTimeout(function () {
  232. // window.location.reload();
  233. }, 1500)
  234. });
  235. }
  236. function minScore(obj,id) {
  237. MinScore = $(obj).html();
  238. myRequest("/admin/channel/minScore/" + id, "post", {MinScore}, function (res) {
  239. layer.msg(res.msg)
  240. setTimeout(function () {
  241. // window.location.reload();
  242. }, 1500)
  243. });
  244. }
  245. function contrlScore(obj,id) {
  246. ContrlScore = $(obj).html();
  247. myRequest("/admin/channel/contrlScore/" + id, "post", {ContrlScore}, function (res) {
  248. layer.msg(res.msg)
  249. setTimeout(function () {
  250. // window.location.reload();
  251. }, 1500)
  252. });
  253. }
  254. function rateN(obj,id) {
  255. Rate = $(obj).html();
  256. myRequest("/admin/channel/rateN/" + id, "post", {Rate}, function (res) {
  257. layer.msg(res.msg)
  258. setTimeout(function () {
  259. // window.location.reload();
  260. }, 1500)
  261. });
  262. }
  263. // 分享URL
  264. function ShareUrl(obj,id) {
  265. ShareUrl = $(obj).html();
  266. myRequest("/admin/channel/shareUrl/" + id, "post", {ShareUrl}, function (res) {
  267. layer.msg(res.msg)
  268. setTimeout(function () {
  269. // window.location.reload();
  270. }, 1500)
  271. });
  272. }
  273. function switch_control(id, ChannelIndex, AndroidVersion, type) {
  274. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  275. myRequest("/admin/channel/switch/" + id, "post", {ChannelIndex, AndroidVersion, type}, function (res) {
  276. layer.msg(res.msg)
  277. setTimeout(function () {
  278. window.location.reload();
  279. }, 2000)
  280. });
  281. });
  282. }
  283. function update(ChannelType, ChannelIndex, AndroidVersion, ChannelName) {
  284. layer.open({
  285. type: 2,
  286. title: '{{ __('auto.添加备注') }}',
  287. shadeClose: true,
  288. shade: 0.8,
  289. area: ['50%', '50%'],
  290. content: '/admin/channel/update/' + ChannelType + '?ChannelIndex=' + ChannelIndex + '&ChannelName=' + ChannelName + '&AndroidVersion=' + AndroidVersion
  291. });
  292. }
  293. </script>
  294. @endsection