Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

plugin.htm 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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">
  6. <div class="row-bar clearfix mb10">
  7. {include file="weapp/bar" /}
  8. <div class="flexigrid fr">
  9. <form id="searchForm" class="navbar-form form-inline fl" action="{:url('Weapp/plugin')}" method="get"
  10. onsubmit="layer_loading('正在处理');">
  11. {$searchform.hidden|default=''}
  12. <div class="sDiv">
  13. <div class="sDiv2 fl" style="">
  14. <select name="is_pay" class="select" style="margin:5px 5px;" onchange="$('#searchForm').submit();">
  15. <option value="">--全部--</option>
  16. <option value="1" {eq name="$Request.param.is_pay" value="1"}selected{/eq}>免费</option>
  17. <option value="2" {eq name="$Request.param.is_pay" value="2"}selected{/eq}>付费</option>
  18. <option value="3" {eq name="$Request.param.is_pay" value="3"}selected{/eq}>已购买</option>
  19. </select>
  20. </div>
  21. <div class="sDiv2 fl" style="">
  22. <input type="text" size="30" name="keywords" class="qsbox" value="{$Request.param.keywords}" placeholder="搜索相关数据...">
  23. <input type="submit" class="btn" value="搜索">
  24. <i class="iconfont e-sousuo"></i>
  25. </div>
  26. </div>
  27. </form>
  28. <div class="mDiv fl">
  29. <div class="fbutton">
  30. <a href="{:url('Weapp/create')}">
  31. <div class="add" title="插件开发者">
  32. <span>插件开发者</span>
  33. </div>
  34. </a>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="flexigrid">
  40. <div class="plug-list">
  41. {empty name="list"}
  42. <div class="bDiv" style="height: auto;">
  43. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  44. <table style="width: 100%">
  45. <tbody>
  46. <tr>
  47. <td class="no-data" align="center" axis="col0" colspan="50">
  48. <div class="no_row">
  49. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  50. </div>
  51. </td>
  52. </tr>
  53. </tbody>
  54. </table>
  55. </div>
  56. <div class="iDiv" style="display: none;"></div>
  57. </div>
  58. {else /}
  59. {foreach name="list" item="vo" key="k" }
  60. <div class="plug-item-content">
  61. <div class="plug-item-top">
  62. <div class="plug-img">
  63. <a href="https://www.eyoucms.com/plus/view.php?aid={$vo.id}" target="_blank"><img src="{$vo.litpic|get_default_pic=###}" ></a>
  64. </div>
  65. <div class="plug-text">
  66. <div class="plug-text-title">
  67. <a href="https://www.eyoucms.com/plus/view.php?aid={$vo.id}" target="_blank">{$vo.name}</a>
  68. </div>
  69. {if condition="'v'.$vo.min_version > $version"}
  70. <div class="plug-text-versions"><span class="red">当前CMS版本太低,该插件要求CMS版本 >= v{$vo.min_version},请升级系统!</span></div>
  71. {/if}
  72. <div class="plug-text-des2">
  73. {$vo.description}
  74. </div>
  75. <div class="plug-price">
  76. {empty name="$vo.meal"}
  77. {empty name="$vo.needmoney"}
  78. 免费
  79. {else /}
  80. {empty name="$vo.buy"}
  81. <em>¥</em>{$vo.needmoney/10}
  82. {else /}
  83. 已购买
  84. {/empty}
  85. {/empty}
  86. {else /}
  87. {empty name="$vo.buy"}
  88. <em>¥</em>{$vo.meal[0]['price']|default='0.00'}
  89. {else /}
  90. 已购买
  91. {/empty}
  92. {/empty}
  93. </div>
  94. </div>
  95. </div>
  96. <div class="plug-item-bottm">
  97. {eq name="'Weapp@install'|is_check_access" value="1"}
  98. {if condition="'v'.$vo.min_version > $version"}
  99. <div class="plug-status">
  100. <a class="no" title="当前CMS版本太低,该插件要求CMS版本 >= v{$vo.min_version},请升级系统!">不支持安装</a>
  101. </div>
  102. {else /}
  103. {empty name="$vo.buy"}
  104. {empty name="$vo.install"}
  105. <a href="javascript:void(0);" onclick="goPage(this);" data-id="{$vo['id']}" data-weapp_code="{$vo['weapp_code']}" data-min_version="{$vo['min_version']}" data-buy="{$vo['buy']}" data-needmoney="{$vo['needmoney']}">
  106. {empty name="$vo.needmoney"}
  107. 安装
  108. {else /}
  109. 购买
  110. {/empty}
  111. </a>
  112. {else /}
  113. <div class="plug-status">
  114. <a class="no">已安装</a>
  115. </div>
  116. {/empty}
  117. {else /}
  118. {empty name="$vo.install"}
  119. <a href="javascript:void(0);" onclick="goPage(this);" data-id="{$vo['id']}" data-weapp_code="{$vo['weapp_code']}" data-min_version="{$vo['min_version']}" data-buy="{$vo['buy']}" data-needmoney="{$vo['needmoney']}">安装</a>
  120. {else /}
  121. <div class="plug-status">
  122. <a class="no">已安装</a>
  123. </div>
  124. {/empty}
  125. {/empty}
  126. {/if}
  127. {/eq}
  128. </div>
  129. </div>
  130. {/foreach}
  131. {/empty}
  132. <div class="flexigrid">
  133. <div class="footer-oper">
  134. <div class="fbuttonr">
  135. <div class="pages">
  136. {$page}
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. <form name="form2" id="form2" method="post" action="">
  145. <input type="hidden" name="id" value=""/>
  146. <input type="hidden" name="code" value=""/>
  147. <input type="hidden" name="min_version" value=""/>
  148. <input type="hidden" name="thorough" value="1"/>
  149. </form>
  150. <form name="payForm" id="payForm" method="post" action="" target="_blank"></form>
  151. <script>
  152. $(document).ready(function () {
  153. // 表格行点击选中切换
  154. $('#flexigrid > table>tbody >tr').click(function () {
  155. $(this).toggleClass('trSelected');
  156. });
  157. // 点击刷新数据
  158. $('.fa-refresh').click(function () {
  159. location.href = location.href;
  160. });
  161. });
  162. function install(obj) {
  163. var code = $(obj).attr('data-weapp_code');
  164. var min_version = $(obj).attr('data-min_version');
  165. pay(code,min_version);
  166. }
  167. function pay(code,min_version) {
  168. layer_loading('正在处理');
  169. $.ajax({
  170. type: 'post',
  171. url: "{$service_ey}/index.php?m=api&c=Pay&a=alipayPay",
  172. data: {
  173. domain: window.location.host,
  174. code: code,
  175. url: '__SITE_URL__'+eyou_basefile+'?m=admin&c=Weapp&a=pay_success&lang='+__lang__,
  176. cms_version:"{$version}",
  177. ip:"{$ip}",
  178. n:"{$serial_number}"
  179. },
  180. dataType: 'jsonp',
  181. jsonpCallback: "callback", /*设置一个回调函数,名字随便取,和下面的函数里的名字相同就行*/
  182. success: function (res) {
  183. layer.closeAll();
  184. if (res.code == 0){
  185. layer.alert(res.msg, {icon: 2, title: false});
  186. }else if (res.code == 2){
  187. remoteInstall(code,min_version)
  188. }else if (res.code ==1){
  189. var payForm = $('#payForm');
  190. payForm.attr('action', res.payurl);
  191. payForm.submit();
  192. // window.open(res.payurl);
  193. layer.open({
  194. type: 1
  195. , btn: ['支付成功', '支付失败']
  196. , yes: function (index, layero) {
  197. remoteInstall(code,min_version);
  198. }
  199. ,btn2: function(index, layero){
  200. layer.close();
  201. // location.reload()//重新加载页面
  202. }
  203. , cancel: function () {
  204. //右上角关闭回调
  205. // return false //开启该代码可禁止点击该按钮关闭
  206. }
  207. ,shadeClose: true //点击遮罩关闭
  208. ,content: '\<\div style="padding:20px;">支付成功可下载安装该插件!\<\/div>'
  209. });
  210. }
  211. }
  212. })
  213. }
  214. function remoteInstall(code, min_version) {
  215. var form2 = $('#form2');
  216. form2.find('input[name=code]').val(code);
  217. form2.find('input[name=min_version]').val(min_version);
  218. var url = "{:url('Weapp/remoteInstall')}";
  219. form2.attr('action', url);
  220. layer_loading('正在处理');
  221. form2.submit();
  222. }
  223. function goPage(obj) {
  224. var id = $(obj).attr('data-id');
  225. var buy = $(obj).attr('data-buy');
  226. var needmoney = $(obj).attr('data-needmoney');
  227. var code = $(obj).attr('data-weapp_code');
  228. var min_version = $(obj).attr('data-min_version');
  229. if (buy == 1 ){
  230. remoteInstall(code,min_version);
  231. } else {
  232. if (needmoney == 0){
  233. remoteInstall(code,min_version);
  234. }else {
  235. window.open("https://www.eyoucms.com/plus/view.php?aid="+id);
  236. layer.open({
  237. type: 1,
  238. shade: layer_shade,
  239. title: '友情提示',
  240. btn: ['购买成功', '购买失败'],
  241. yes: function (index, layero) {
  242. layer.closeAll();
  243. remoteInstall(code, min_version);
  244. },
  245. btn2: function(index, layero){
  246. layer.close();
  247. // location.reload()//重新加载页面
  248. },
  249. cancel: function () {
  250. //右上角关闭回调
  251. // return false //开启该代码可禁止点击该按钮关闭
  252. },
  253. shadeClose: true, //点击遮罩关闭
  254. content: "<div style='padding:20px;'>购买成功可在线安装该插件!</div>"
  255. });
  256. }
  257. }
  258. }
  259. function jump() {
  260. location.reload();
  261. }
  262. </script>
  263. {include file="public/footer" /}