pay.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. $view
  3. ->set('name', 'pay')
  4. ->import('inc/head')
  5. ->fetch('.h1', 'service/buy.info#buy')
  6. ->fetch('.richtext', 'service/buy.info#buy_desc')
  7. ->fetch('#notice', 'service/buy.info#buy_notice')
  8. ->fetch('#notices', 'service/buy.info#buy_notices')
  9. # 循环
  10. ->loop
  11. (
  12. '.code',
  13. 'service/buy.buy',
  14. array
  15. (
  16. 'p|0' => '$v.name',
  17. 'p|1' => '$v.price',
  18. 'self' => array
  19. (
  20. 'href' => 'javascript:;',
  21. 'onclick' => 'pay(\'<{$v.pay_url}>\')',
  22. ),
  23. )
  24. )
  25. # 循环
  26. ->loop
  27. (
  28. '.codes',
  29. 'service/buy.buys',
  30. array
  31. (
  32. 'p|0' => '$v.name',
  33. 'p|1' => '$v.price',
  34. 'self' => array
  35. (
  36. 'href' => 'javascript:;',
  37. 'onclick' => 'pay(\'<{$v.pay_url}>\')',
  38. ),
  39. )
  40. )
  41. ->fetch(array('script@src', 0), Dever::assets('global.js'))
  42. ->append('body', '<script src="'.Dever::assets('lib/jquery/jquery.min.js', 'script').'"></script>')
  43. ->append('body', '<script src="'.Dever::assets('dever/core.js', 'script').'"></script>')
  44. ->append('body', '<script src="'.Dever::assets('config.js').'"></script>')
  45. ->append('body', '<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>')
  46. ->display();