Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mybuy.htm 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page min-hg-c-1">
  6. <div class="row-bar clearfix mb10">
  7. {include file="weapp/bar" /}
  8. <div class="flexigrid fr">
  9. <form class="navbar-form form-inline" action="{:url('Weapp/mybuy')}" method="get" onsubmit="layer_loading('正在处理');">
  10. {$searchform.hidden|default=''}
  11. <div class="ftitle">
  12. <div class="sDiv2 fl" style="">
  13. <input type="hidden" name="install" value="{$Request.param.install|default=0}">
  14. <input type="text" size="30" name="keywords" class="qsbox" placeholder="搜索相关数据..." autocomplete="off">
  15. <input type="submit" class="btn" value="搜索">
  16. <i class="iconfont e-sousuo"></i>
  17. </div>
  18. </div>
  19. </form>
  20. </div>
  21. </div>
  22. <div class="flexigrid">
  23. <div class="plug-list">
  24. {empty name="list"}
  25. <div class="bDiv" style="height: auto;">
  26. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  27. <table style="width: 100%">
  28. <tbody>
  29. <tr>
  30. <td class="no-data" align="center" axis="col0" colspan="50">
  31. <div class="no_row">
  32. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  33. </div>
  34. </td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. <div class="iDiv" style="display: none;"></div>
  40. </div>
  41. {else /}
  42. {foreach name="list" item="vo" key="k" }
  43. <div class="plug-item-content">
  44. <div class="plug-item-top">
  45. <div class="plug-img">
  46. <a href="{:url('Weapp/execute',array('sm'=>$vo['code'],'sc'=>$vo['code'],'sa'=>'index'))}"><img src="{$vo.config.litpic|get_default_pic=###}?v={$vo.config.version}" ></a>
  47. </div>
  48. <div class="plug-text">
  49. <div class="plug-text-title">
  50. <a href="{:url('Weapp/execute',array('sm'=>$vo['code'],'sc'=>$vo['code'],'sa'=>'index'))}">{$vo.name}</a>
  51. </div>
  52. <div class="plug-text-versions">
  53. <span>版本:{$vo.config.version|default='未知'}</span>
  54. </div>
  55. <div class="plug-text-des">
  56. {$vo.config.description|default='暂无描述~'}
  57. </div>
  58. </div>
  59. </div>
  60. <div class="plug-item-bottm">
  61. {empty name="$vo.status"}
  62. {empty name="$vo.is_buy"}
  63. {eq name="'Weapp@install'|is_check_access" value="1"}
  64. <a href="javascript:void(0);" onclick="install(this);" data-id="{$vo['id']}" class="btn blue">安装</a>
  65. {/eq}
  66. <!-- {eq name="'Weapp@del'|is_check_access" value="1"}
  67. <a href="javascript:void(0);" data-url="{:url('Weapp/del')}" data-id="{$vo.id}" data-name="{$vo.name}" onClick="delfun(this);">删除</a>
  68. {/eq} -->
  69. {else /}
  70. {eq name="'Weapp@install'|is_check_access" value="1"}
  71. <a href="javascript:void(0);" onclick="remoteInstall('{$vo['code']}', '{$vo['min_version']|default=$vo['config']['min_version']}');">安装</a>
  72. {/eq}
  73. <!-- {eq name="'Weapp@del_remote'|is_check_access" value="1"}
  74. <a href="javascript:void(0);" data-url="{:url('Weapp/del_remote')}" data-id="{$vo.id}" data-name="{$vo.name}" onClick="del_remote(this);">删除</a>
  75. {/eq} -->
  76. {/empty}
  77. {else /}
  78. {eq name="'Weapp@execute'|is_check_access" value="1"}
  79. {if condition="empty($vo['config']['management']['href'])"}
  80. <a href="{:url('Weapp/execute',array('sm'=>$vo['code'],'sc'=>$vo['code'],'sa'=>'index'))}">管理</a>
  81. {else /}
  82. <a href="{$vo['config']['management']['href']}" target="{$vo['config']['management']['target']|default='_self'}">管理</a>
  83. {/if}
  84. {/eq}
  85. {eq name="'Weapp@uninstall'|is_check_access" value="1"}
  86. <a href="javascript:void(0);" onclick="uninstall(this);" data-id="{$vo['id']}" data-name="{$vo.name}">卸载</a>
  87. {/eq}
  88. <div class="plug-status">
  89. {if condition="$vo['status'] eq 1"}
  90. <span style="cursor: pointer;" class="yes" {eq name="'Weapp@disable'|is_check_access" value="1"}onClick="changeTableVal('weapp','id','{$vo.id}','status',this);"{/eq} data-value="-1" data-weapp_code="{$vo.code}" data-yestext="<i class='fa fa-check-circle'></i>已启用" data-notext="<i class='fa fa-ban'></i>已禁用"><i class="fa fa-check-circle"></i>已启用</span>
  91. {else /}
  92. <span style="cursor: pointer;" class="no" {eq name="'Weapp@disable'|is_check_access" value="1"}onClick="changeTableVal('weapp','id','{$vo.id}','status',this);"{/eq} data-value="1" data-weapp_code="{$vo.code}" data-yestext="<i class='fa fa-check-circle'></i>已启用" data-notext="<i class='fa fa-ban'></i>已禁用"><i class="fa fa-ban"></i>已禁用</span>
  93. {/if}
  94. {eq name='$vo.code' value='Diyminipro'}
  95. <script type="text/javascript">
  96. $(function(){
  97. var diymimipro_status = "{$vo['status']}";
  98. if ('1' == diymimipro_status) {
  99. $('#Diyminipro_theme_index', window.parent.document).show();
  100. } else {
  101. $('#Diyminipro_theme_index', window.parent.document).hide();
  102. }
  103. });
  104. </script>
  105. {/eq}
  106. </div>
  107. {/empty}
  108. </div>
  109. </div>
  110. {/foreach}
  111. {/empty}
  112. <div class="flexigrid">
  113. <div class="footer-oper">
  114. <div class="fbuttonr">
  115. <div class="pages">
  116. {$page}
  117. </div>
  118. </div>
  119. <div style="clear:both"></div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <form name="form2" id="form2" method="post" action="">
  126. <input type="hidden" name="id" value="" />
  127. <input type="hidden" name="code" value=""/>
  128. <input type="hidden" name="min_version" value=""/>
  129. <input type="hidden" name="thorough" value="1" />
  130. </form>
  131. <script>
  132. $(document).ready(function(){
  133. // 表格行点击选中切换
  134. $('#flexigrid > table>tbody >tr').click(function(){
  135. $(this).toggleClass('trSelected');
  136. });
  137. // 点击刷新数据
  138. $('.fa-refresh').click(function(){
  139. location.href = location.href;
  140. });
  141. });
  142. function install(obj)
  143. {
  144. var id = $(obj).attr('data-id');
  145. var form2 = $('#form2');
  146. form2.find('input[name=id]').val(id);
  147. var url = "{:url('Weapp/install')}";
  148. form2.attr('action', url);
  149. layer_loading('正在处理');
  150. form2.submit();
  151. }
  152. function uninstall(obj)
  153. {
  154. //询问框
  155. var confirm = layer.confirm('数据将不可恢复,是否卸载?', {
  156. shade: layer_shade,
  157. area: ['480px', '190px'],
  158. move: false,
  159. title: '提示',
  160. btnAlign:'r',
  161. closeBtn: 3,
  162. btn: ['确定', '取消'] ,//按钮
  163. success: function () {
  164. $(".layui-layer-content").css('text-align', 'left');
  165. }
  166. }, function(){
  167. layer.close(confirm);
  168. uninstall_true(obj);
  169. }, function(){
  170. layer.close(confirm);
  171. }
  172. );
  173. return false;
  174. }
  175. function uninstall_true(obj)
  176. {
  177. var id = $(obj).attr('data-id');
  178. layer_loading('正在处理');
  179. // 确定
  180. $.ajax({
  181. type : 'post',
  182. url : "{:url('Weapp/uninstall')}",
  183. data : {id:id, thorough:0, _ajax:1},
  184. dataType : 'json',
  185. success : function(res){
  186. layer.closeAll();
  187. if(res.code == 1){
  188. layer.msg(res.msg, {icon: 1, time: 1500}, function(){
  189. window.location.reload();
  190. });
  191. }else{
  192. layer.alert(res.msg, {icon: 2, title:false});
  193. }
  194. },
  195. error: function(e) {
  196. layer.closeAll();
  197. // 处理插件行为app_end影响到的卸载问题
  198. if (e.responseText.indexOf("\\behavior\\admin\\") >= 0 && e.responseText.indexOf("not found") >= 0) {
  199. layer.msg('卸载成功', {icon: 1, time: 1000}, function(){
  200. window.location.reload();
  201. });
  202. } else {
  203. layer.alert(e.responseText, {icon: 2, title:false});
  204. }
  205. }
  206. });
  207. }
  208. function delfun(obj){
  209. var name = $(obj).attr('data-name');
  210. layer.confirm('确认移除<font color="#ff0000">【'+name+'】</font>?', {
  211. shade: layer_shade,
  212. area: ['480px', '190px'],
  213. move: false,
  214. title: '提示',
  215. btnAlign:'r',
  216. closeBtn: 3,
  217. btn: ['确定', '取消'] ,//按钮
  218. success: function () {
  219. $(".layui-layer-content").css('text-align', 'left');
  220. }
  221. }, function(){
  222. layer_loading('正在处理');
  223. // 确定
  224. $.ajax({
  225. type : 'post',
  226. url : $(obj).attr('data-url'),
  227. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  228. dataType : 'json',
  229. success : function(data){
  230. layer.closeAll();
  231. if(data.code == 1){
  232. layer.msg(data.msg, {icon: 1});
  233. window.location.reload();
  234. }else{
  235. layer.alert(data.msg, {icon: 2, title:false}); //alert(data);
  236. }
  237. }
  238. })
  239. }, function(index){
  240. layer.close(index);
  241. });
  242. return false;
  243. }
  244. function del_remote(obj){
  245. var name = $(obj).attr('data-name');
  246. layer.confirm('确认移除<font color="#ff0000">【'+name+'】</font>?', {
  247. shade: layer_shade,
  248. area: ['480px', '190px'],
  249. move: false,
  250. title: '提示',
  251. btnAlign:'r',
  252. closeBtn: 3,
  253. btn: ['确定', '取消'] ,//按钮
  254. success: function () {
  255. $(".layui-layer-content").css('text-align', 'left');
  256. }
  257. }, function(){
  258. layer_loading('正在处理');
  259. // 确定
  260. $.ajax({
  261. type : 'post',
  262. url : $(obj).attr('data-url'),
  263. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  264. dataType : 'json',
  265. success : function(data){
  266. layer.closeAll();
  267. if(data.code == 1){
  268. layer.msg(data.msg, {icon: 1});
  269. window.location.reload();
  270. }else{
  271. layer.alert(data.msg, {icon: 2, title:false}); //alert(data);
  272. }
  273. }
  274. })
  275. }, function(index){
  276. layer.close(index);
  277. });
  278. return false;
  279. }
  280. function jump() {
  281. location.reload()
  282. }
  283. function remoteInstall(code, min_version) {
  284. var form2 = $('#form2');
  285. form2.find('input[name=code]').val(code);
  286. form2.find('input[name=min_version]').val(min_version);
  287. var url = "{:url('Weapp/remoteInstall')}";
  288. form2.attr('action', url);
  289. layer_loading('远程安装');
  290. form2.submit();
  291. }
  292. </script>
  293. {include file="public/footer" /}