recharge_game.blade.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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. </form>
  47. <table class="table table-bordered">
  48. <thead>
  49. <tr>
  50. <th >{{ __('auto.游戏包名') }}</th>
  51. <th >{{ __('auto.渠道号') }}</th>
  52. <th >{{ __('auto.审核中') }}</th>
  53. <th width="10%">{{ __('auto.展示开放游戏') }}</th>
  54. <th >{{ __('auto.开放咖啡渠道') }}</th>
  55. {{-- <th >{{ __('auto.开放游戏配置修改') }}</th>--}}
  56. <th width="6%" >{{ __('auto.咖啡渠道修改') }}</th>
  57. <th width="6%">{{ __('auto.免审茶叶渠道修改') }}</th>
  58. <th width="6%">{{ __('auto.分享链接') }}</th>
  59. <th >{{ __('auto.备注') }}</th>
  60. <th >APPKEY</th>
  61. <th >{{ __('auto.上个控最小携带') }}</th>
  62. <th >{{ __('auto.个控分数') }}</th>
  63. <th >{{ __('auto.个控概率') }}</th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. @foreach($list['list'] as $k=>$v)
  68. <tr>
  69. <td>{{$v->PackageName}}</td>
  70. <td >{{$v->Channel}}</td>
  71. <td onclick="review(this,{{$v->ID}})">{{$v->InReview}}</td>
  72. <td onclick="OpenGamesFunc({{$v->Channel}},'{{$v->PackageName}}')">{{$v->KindName}}</td>
  73. <td>{{$v->rechargeName}}</td>
  74. {{-- <td>--}}
  75. {{-- <button class="btn-sm btn-gradient-dark"--}}
  76. {{-- onclick="OpenGamesFunc({{$v->Channel}},'{{$v->PackageName}}')">--}}
  77. {{-- {{ __('auto.修改') }}--}}
  78. {{-- </button>--}}
  79. {{-- </td>--}}
  80. <td>
  81. <a class="btn-sm btn-gradient-dark layer-dialog"
  82. href="/admin/channel/pay_methods/{{$v->Channel}}">
  83. {{ __('auto.修改') }}
  84. </a>
  85. </td>
  86. <td>
  87. <a class="layer-dialog btn-sm btn-gradient-dark"
  88. href="/admin/channel/withdrawal_config/{{$v->Channel}}">{{ __('auto.修改') }}</a>
  89. </td>
  90. <td style="vertical-align: top">
  91. <a class="btn btn-sm btn-gradient-dark layer-dialog"
  92. href="/admin/channel/share_config/{{$v->ID}}">{{ __('auto.修改') }}</a>
  93. </td>
  94. <td contentEditable="true"
  95. onblur="remarks(this,{{$v->ID}})" style="vertical-align: top">{{$v->Remarks}}</td>
  96. <td onclick="makekey(this,{{$v->ID}})"
  97. style="vertical-align: top">{{$v->AppKey}}</td>
  98. <td contentEditable="true"
  99. onblur="minScore(this,{{$v->ID}})" style="vertical-align: top">{{$v->MinScore}}</td>
  100. <td contentEditable="true"
  101. onblur="contrlScore(this,{{$v->ID}})" style="vertical-align: top">{{$v->ContrlScore}}</td>
  102. <td contentEditable="true"
  103. onblur="rateN(this,{{$v->ID}})" style="vertical-align: top">{{$v->Rate}}</td>
  104. </tr>
  105. @endforeach
  106. </tbody>
  107. </table>
  108. <div class="box-footer clearfix" id="pages">
  109. {{ __('auto.总共') }} <b>{{ $list['list']->appends([
  110. 'list'=>$list['list'],
  111. 'ChannelPackageName'=>$list['ChannelPackageName']
  112. ])->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list['list']->lastPage() }}</b>{{ __('auto.页') }}
  113. {!! $list['list']->links() !!}
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <script>
  122. // 开放游戏默认配置
  123. function addNewPlatform() {
  124. layer.open({
  125. type: 2,
  126. title: '{{ __('auto.添加新的渠道') }}',
  127. shadeClose: true,
  128. shade: 0.8,
  129. area: ['50%', '50%'],
  130. content: '/admin/channel/channel_new'
  131. });
  132. }
  133. // 开放游戏默认配置
  134. function defaultOpenGamesFunc() {
  135. layer.open({
  136. type: 2,
  137. title: '{{ __('auto.开放游戏默认配置') }}',
  138. shadeClose: true,
  139. shade: 0.8,
  140. area: ['70%', '70%'],
  141. content: '/admin/channel/default_open_games'
  142. });
  143. }
  144. // 开放游戏配置修改
  145. function OpenGamesFunc(id, ChannelPackageName) {
  146. layer.open({
  147. type: 2,
  148. title: '{{ __('auto.开放游戏配置修改') }}',
  149. shadeClose: true,
  150. shade: 0.8,
  151. area: ['70%', '70%'],
  152. content: '/admin/channel/open_games/' + id + '?ChannelPackageName=' + ChannelPackageName
  153. });
  154. }
  155. // 咖啡配置修改
  156. function OpenRechargeFunc(id, ChannelPackageName) {
  157. layer.open({
  158. type: 2,
  159. title: '{{ __('auto.咖啡配置修改') }}',
  160. shadeClose: true,
  161. shade: 0.8,
  162. area: ['70%', '70%'],
  163. content: '/admin/channel/open_recharge/' + id + '?ChannelPackageName=' + ChannelPackageName
  164. });
  165. }
  166. function pasteboard(str)
  167. {
  168. if (navigator.clipboard) {
  169. // clipboard api 复制
  170. navigator.clipboard.writeText(str);
  171. }else {
  172. var save = function (e) {
  173. e.clipboardData.setData('text/plain', str);
  174. e.preventDefault();
  175. }
  176. document.addEventListener('copy', save);
  177. document.execCommand('copy');
  178. document.removeEventListener('copy', save);
  179. }
  180. }
  181. function makekey(obj,id){
  182. let appkey= $(obj).html();
  183. if(!appkey){
  184. myRequest("/admin/channel/appkey/" + id, "post", {}, function (res) {
  185. $(obj).html(res.data)
  186. });
  187. }else{
  188. layer.open({
  189. type: 2,
  190. title: '{{ __('auto.修改app配置') }}',
  191. shadeClose: true,
  192. shade: 0.8,
  193. area: ['50%', '80%'],
  194. content: '/admin/channel/app_key_set/'+id
  195. });
  196. //pasteboard(appkey)
  197. //layer.msg("COPY SUCCESS")
  198. }
  199. }
  200. function review(obj,id){
  201. let status= parseInt($(obj).html())?0:1;
  202. myConfirm("{{ __('auto.操作不可逆,是否继续') }}"+(status?"{{ __('auto.打开') }}":"{{ __('auto.关闭') }}")+"{{ __('auto.审核') }}?", function () {
  203. myRequest("/admin/channel/review/" + id, "post", {status}, function (res) {
  204. $(obj).html(res.data)
  205. layer.msg("{{ __('auto.修改审核状态为:') }}"+res.data)
  206. });
  207. })
  208. }
  209. function remarks(obj,id) {
  210. remark = $(obj).html();
  211. myRequest("/admin/channel/remarks/" + id, "post", {remark}, function (res) {
  212. layer.msg(res.msg)
  213. setTimeout(function () {
  214. // window.location.reload();
  215. }, 1500)
  216. });
  217. }
  218. function minScore(obj,id) {
  219. MinScore = $(obj).html();
  220. myRequest("/admin/channel/minScore/" + id, "post", {MinScore}, function (res) {
  221. layer.msg(res.msg)
  222. setTimeout(function () {
  223. // window.location.reload();
  224. }, 1500)
  225. });
  226. }
  227. function contrlScore(obj,id) {
  228. ContrlScore = $(obj).html();
  229. myRequest("/admin/channel/contrlScore/" + id, "post", {ContrlScore}, function (res) {
  230. layer.msg(res.msg)
  231. setTimeout(function () {
  232. // window.location.reload();
  233. }, 1500)
  234. });
  235. }
  236. function rateN(obj,id) {
  237. Rate = $(obj).html();
  238. myRequest("/admin/channel/rateN/" + id, "post", {Rate}, function (res) {
  239. layer.msg(res.msg)
  240. setTimeout(function () {
  241. // window.location.reload();
  242. }, 1500)
  243. });
  244. }
  245. // 分享URL
  246. function ShareUrl(obj,id) {
  247. ShareUrl = $(obj).html();
  248. myRequest("/admin/channel/shareUrl/" + id, "post", {ShareUrl}, function (res) {
  249. layer.msg(res.msg)
  250. setTimeout(function () {
  251. // window.location.reload();
  252. }, 1500)
  253. });
  254. }
  255. function switch_control(id, ChannelIndex, AndroidVersion, type) {
  256. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  257. myRequest("/admin/channel/switch/" + id, "post", {ChannelIndex, AndroidVersion, type}, function (res) {
  258. layer.msg(res.msg)
  259. setTimeout(function () {
  260. window.location.reload();
  261. }, 2000)
  262. });
  263. });
  264. }
  265. function update(ChannelType, ChannelIndex, AndroidVersion, ChannelName) {
  266. layer.open({
  267. type: 2,
  268. title: '{{ __('auto.添加备注') }}',
  269. shadeClose: true,
  270. shade: 0.8,
  271. area: ['50%', '50%'],
  272. content: '/admin/channel/update/' + ChannelType + '?ChannelIndex=' + ChannelIndex + '&ChannelName=' + ChannelName + '&AndroidVersion=' + AndroidVersion
  273. });
  274. }
  275. </script>
  276. @endsection