人人商城

2_0_home.tpl.php 4.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
  2. <?php if($do == 'display') { ?>
  3. <div class="mui-content mc-we7-home">
  4. <div class="mui-banner" style="background-image:url(<?php if(!empty($ucpage['params'][0]['params']['bgImage'])) { ?>'<?php echo $ucpage['params'][0]['params']['bgImage'];?>'<?php } else { ?>'resource/images/head-bg.png'<?php } ?>); background-repeat:no-repeat;background-size:cover;">
  5. <div class="setting"><a href="<?php echo url('mc/bond/settings') . 'wxref=mp.weixin.qq.com#wechat_redirect'?>">设 置</a></div>
  6. <img src="<?php if(!empty($profile['avatar'])) { ?><?php echo tomedia($profile['avatar']);?><?php } else { ?>./resource/images/member-header.png<?php } ?>" alt="" class="mui-logo mui-img-circle" />
  7. <div class="mui-banner-info">
  8. <div class="mui-big"><?php if(!empty($profile['nickname'])) { ?><span style="color:white"><?php echo $profile['nickname'];?></span><?php } else { ?><a href="<?php echo url('mc/profile') . 'wxref=mp.weixin.qq.com#wechat_redirect'?>" style="color:red;">设置昵称</a><?php } ?></div>
  9. <div class="mui-mt5"><?php if(!empty($profile['mobile'])) { ?><span style="color:white"><?php echo $profile['mobile'];?></span><?php } else { ?><a href="<?php echo url('mc/bond/mobile', array('op' => 'mobilechange'))?>" class="mui-btn mui-btn-outlined">绑定手机</a><?php } ?></div>
  10. </div>
  11. <div class="mui-row banner-nav">
  12. <div class="mui-col-xs-6 mui-text-center">
  13. <a href="<?php echo url('mc/bond/credits', array('credittype' => 'credit2', 'type' => 'record', 'period' => '1'))?>">
  14. <span class="fa fa-rmb"></span>
  15. <?php echo $creditnames[$behavior['currency']]['title'];?>: <span class="mui-ml5 mui-big"><?php echo $credits[$behavior['currency']];?></span>
  16. </a>
  17. </div>
  18. <div class="mui-col-xs-6 mui-text-center">
  19. <a href="<?php echo url('mc/bond/credits', array('credittype' => 'credit1', 'type' => 'record', 'period' => '1'))?>">
  20. <span class="fa fa-database"></span>
  21. <?php echo $creditnames[$behavior['activity']]['title'];?>: <span class="mui-ml5 mui-big"><?php echo $credits[$behavior['activity']];?></span>
  22. </a>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="mui-table mui-table-inline mui-mt15 nav-action">
  27. <div class="mui-table-cell">
  28. <a href="<?php echo url('entry', array('m' => 'recharge', 'do' => 'pay'));?>" class="mui-block">
  29. <img src="resource/images/sum-recharge.png" alt="" />
  30. 余额充值
  31. </a>
  32. </div>
  33. <div class="mui-table-cell">
  34. <a href="javascript:;" id="scanqrcode">
  35. <img src="resource/images/scan-pay.png" alt="" />
  36. 扫码付款
  37. </a>
  38. </div>
  39. </div>
  40. <?php if(!empty($others) || !empty($groups)) { ?>
  41. <ul class="mui-table-view mui-table-view-chevron">
  42. <?php if(!empty($others)) { ?>
  43. <?php if(is_array($others)) { foreach($others as $nav) { ?>
  44. <li class="mui-table-view-cell">
  45. <a href="<?php echo $nav['url']?>" class="mui-navigate-right">
  46. <?php echo $nav['name'];?>
  47. </a>
  48. </li>
  49. <?php } } ?>
  50. <?php } ?>
  51. <?php if(is_array($groups)) { foreach($groups as $name => $navs) { ?>
  52. <?php if(is_array($navs)) { foreach($navs as $nav) { ?>
  53. <li class="mui-table-view-cell">
  54. <a href="<?php echo $nav['url']?>" class="mui-navigate-right">
  55. <?php echo $nav['name'];?>
  56. </a>
  57. </li>
  58. <?php } } ?>
  59. <?php } } ?>
  60. </ul>
  61. <?php } ?>
  62. <?php echo $ucpage['html'];?>
  63. </div>
  64. <?php } ?>
  65. <script type="text/javascript">
  66. wx.ready(function(){
  67. $('#scanqrcode').click(function(){
  68. wx.scanQRCode({
  69. needResult: 0, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
  70. scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码,默认二者都有
  71. success: function (res) {
  72. var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
  73. }
  74. });
  75. });
  76. });
  77. </script>
  78. <?php (!empty($this) && $this instanceof WeModuleSite) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>