人人商城

bond.html 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. {php define('MUI', true);}
  2. {template 'common/header'}
  3. {if $do == 'mobile'}
  4. {if $op == 'index'}
  5. <div class="mui-content mc-tel-bonded">
  6. <div class="mui-text-center">
  7. <img src="{$_W['siteroot']}app/resource/images/bonded-tel.png">
  8. <div class="mui-b">你的手机号:{$profile['mobile']}</div>
  9. </div>
  10. <div class="mui-content-padded">
  11. <a class="mui-btn mui-btn-success mui-btn-block" href="{php echo url('mc/bond/mobile', array('op' => 'mobilechange'))}">更换手机号</a>
  12. </div>
  13. </div>
  14. {/if}
  15. {if $op == 'mobilechange'}
  16. <div class="mui-content">
  17. <div class="sendcode">
  18. <div class="mui-content-padded mui-text-muted">请输入手机号,以收取验证码</div>
  19. <div class="mui-input-group mui-mt15">
  20. <div class="mui-input-row">
  21. <label class="mui-label-icon"><i class="fa fa-user"></i></label>
  22. <input name="mobile" type="text" class="js-mobile-val" value="" placeholder="手机号"/>
  23. </div>
  24. </div>
  25. <div class="mui-content-padded mui-text-center">
  26. <button class="mui-btn mui-btn-success mui-btn-block js-check-mobile" uniacid="{$_W['uniacid']}">获取验证码</button>
  27. </div>
  28. </div>
  29. <div style="display:none;" class="codeverify">
  30. <div class="mui-content-padded mui-text-muted">您的手机号<span class="mui-text-success js-code"></span>会收到一条含有6位数字验证码的短息</div>
  31. <div class="mui-input-group mui-mt15">
  32. <div class="mui-input-row">
  33. <label class="mui-label-icon"><i class="fa fa-key"></i></label>
  34. <input name="code" type="text" placeholder="验证码"/>
  35. </div>
  36. {if !empty($reregister)}
  37. <div class="mui-input-row">
  38. <label class="mui-label-icon"><i class="fa fa-lock"></i></label>
  39. <input type="password" value="" name="password" placeholder="请输入您的新密码"/>
  40. </div>
  41. <div class="mui-input-row">
  42. <label class="mui-label-icon"><i class="fa fa-lock"></i></label>
  43. <input type="password" value="" name="repassword" placeholder="请再次输入您的新密码"/>
  44. </div>
  45. {/if}
  46. </div>
  47. <div class="mui-content-padded mui-text-center">
  48. <button class="mui-btn mui-btn-success mui-btn-block js-bond">确认</button>
  49. <div class="mui-mt15 mui-text-center">
  50. <span class="mui-text-muted js-timer">
  51. </span>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <script>
  57. $(function(){
  58. $(document).on('input propertychange', '.js-mobile-val', function(){
  59. var mobile_value = $(this).val();
  60. if (mobile_value.length == '11') {
  61. $.post("{php echo url('auth/login/mobile_exist')}", {'mobile' : mobile_value}, function(data) {
  62. data = $.parseJSON(data);
  63. if (data.message.errno == '1') {
  64. $('.js-check-mobile').removeClass('send-code');
  65. util.toast('手机号已被绑定', '', 'error');
  66. return;
  67. } else if (data.message.errno == '2'){
  68. $('.js-check-mobile').addClass('send-code');
  69. }
  70. });
  71. } else {
  72. $('.js-check-mobile').removeClass('send-code');
  73. }
  74. });
  75. $(document).on('click', '.send-code', function(){
  76. var username = $('input[name=mobile]').val();
  77. var oldmobile = '{$_W['member']['mobile']}';
  78. if (username == oldmobile) {
  79. util.toast('无法更改为当前手机号', '', 'error');
  80. return;
  81. }
  82. $('.js-code').text(username);
  83. option = {
  84. 'btnElement' : $('.send-code'),
  85. 'showElement' : $('.js-timer'),
  86. 'btnTips' : '<a class="send-code">重新获取验证码</a>',
  87. 'successCallback' : function(ret, message){
  88. if (ret == '0') {
  89. util.toast(message);
  90. $('.sendcode').hide();
  91. $('.codeverify').show();
  92. } else {
  93. util.toast(message);
  94. $('.sendcode').show();
  95. $('.codeverify').hide();
  96. return;
  97. }
  98. }
  99. };
  100. util.sendCode(username, option);
  101. });
  102. $('.js-bond').click(function() {
  103. var code = $('.codeverify input[name="code"]').val();
  104. var mobile = $('.sendcode input[name="mobile"]').val();
  105. var password = $('.codeverify input[name="password"]').val();
  106. var repassword = $('.codeverify input[name="repassword"]').val();
  107. if (!code) {
  108. util.toast('请填写验证码', '', 'error');
  109. return;
  110. }
  111. if (!mobile) {
  112. util.toast('请填写手机号', '', 'error');
  113. return;
  114. }
  115. if(!/^1[3|4|5|7|8][0-9]{9}$/.test(mobile)) {
  116. util.toast('手机格式错误', '', 'error');
  117. return;
  118. }
  119. {if !empty($reregister)}
  120. if (!password || !repassword) {
  121. util.toast('请填写密码', '', 'error');
  122. return;
  123. }
  124. if (password !== repassword) {
  125. util.toast('密码不一致', '', 'error');
  126. return;
  127. }
  128. {/if}
  129. $.post('{php echo url("mc/bond/mobile")}', {'code' : code, 'mobile' : mobile, 'password' : password, 'repassword' : repassword}, function(data) {
  130. data = $.parseJSON(data);
  131. if (data.message.errno == '-1') {
  132. util.toast(data.message.message, '', 'error');
  133. } else if (data.message.errno == '0') {
  134. util.toast(data.message.message, data.redirect, 'success');
  135. }
  136. })
  137. })
  138. });
  139. </script>
  140. {/if}
  141. {/if}
  142. {if $do == 'settings'}
  143. <div class="mui-content">
  144. <ul class="mui-table-view mui-table-view-chevron">
  145. {if empty($profile_hide)}
  146. <li class="mui-table-view-cell">
  147. <a href="{php echo url('mc/profile') . 'wxref=mp.weixin.qq.com#wechat_redirect'}" class="mui-navigate-right">个人资料</a>
  148. </li>
  149. {/if}
  150. <li class="mui-table-view-cell">
  151. <a href="{php echo url('mc/profile/address') . 'wxref=mp.weixin.qq.com#wechat_redirect'}" class="mui-navigate-right">
  152. 收货地址
  153. <span class="mui-pull-right">管理</span>
  154. </a>
  155. </li>
  156. <li class="mui-table-view-cell">
  157. <a href="{php echo url('mc/bond/pay_password') . 'wxref=mp.weixin.qq.com#wechat_redirect'}" class="mui-navigate-right">
  158. 支付密码
  159. <span class="mui-pull-right">设置</span>
  160. </a>
  161. </li>
  162. </ul>
  163. <ul class="mui-table-view mui-table-view-chevron">
  164. {if !empty($reregister)}
  165. <li class="mui-table-view-cell">
  166. <a href="{php echo url('mc/bond/binding_account', array('type' => '1'))}" class="mui-navigate-right">
  167. 完善账号
  168. </a>
  169. </li>
  170. {else}
  171. {if $item !== 'mobile'}
  172. <li class="mui-table-view-cell">
  173. <a href="{php echo url('mc/bond/email')}" class="mui-navigate-right">
  174. 邮箱
  175. <span class="mui-pull-right"><span class="mui-mr10">{if !empty($reregister)}请绑定邮箱{else}{$_W['member']['email']}{/if}</span></span>
  176. </a>
  177. </li>
  178. {/if}
  179. {if $item !== 'email'}
  180. <li class="mui-table-view-cell">
  181. {if empty($_W['member']['mobile'])}
  182. <a href="{php echo url('mc/bond/mobile', array('op' =>'mobilechange'))}" class="mui-navigate-right">
  183. {else}
  184. <a href="{php echo url('mc/bond/mobile', array('op' =>'index'))}" class="mui-navigate-right">
  185. {/if}
  186. 手机号
  187. <span class="mui-pull-right"><span class="mui-mr10">{if empty($_W['member']['mobile'])}请绑定手机号{else}{$_W['member']['mobile']}{/if}</span></span>
  188. </a>
  189. </li>
  190. {/if}
  191. {if empty($reregister) && $ltype != 'code'}
  192. <li class="mui-table-view-cell">
  193. <a href="{php echo url('mc/bond/password') . 'wxref=mp.weixin.qq.com#wechat_redirect'}" class="mui-navigate-right">密码设置</a>
  194. </li>
  195. {/if}
  196. {/if}
  197. </ul>
  198. <ul class="mui-table-view mui-table-view-chevron">
  199. {if !empty($_W['setting']['copyright']['companyprofile'])}
  200. <li class="mui-table-view-cell">
  201. <a href="{php echo url('mc/bond/aboutus') . 'wxref=mp.weixin.qq.com#wechat_redirect'}" class="mui-navigate-right">关于我们</a>
  202. </li>
  203. {/if}
  204. <li class="mui-table-view-cell">
  205. <a href="tel:{$ucpage['params'][0]['params']['contact']}" class="mui-navigate-right" id='contact-us'>联系我们</a>
  206. </li>
  207. </ul>
  208. <div class="mui-content-padded">
  209. <a href="{php echo url('mc/home/login_out');}" class="mui-btn mui-btn-block mui-btn-outlined mui-btn-danger">退出登录</a>
  210. </div>
  211. </div>
  212. {/if}
  213. {if $do == 'aboutus'}
  214. <div class="mui-content mc-about-us">
  215. <div class="mui-text-center logo"><img src="{if tomedia('headimg_'.$_W['acid'].'.jpg')}{php echo tomedia('headimg_'.$_W['acid'].'.jpg');}{else}resource/images/MicroEngine.ico{/if}" class="mui-img-circle"/></div>
  216. <div class="mui-content-padded desc">
  217. {$_W['setting']['copyright']['companyprofile']}
  218. </div>
  219. </div>
  220. {/if}
  221. {if $do == 'email'}
  222. <form class="tab-content clearfix js-ajax-form {if $_W['container'] !== 'wechat'}profile-form{/if}" action="{url 'mc/bond/email'}" method="post" enctype="multipart/form-data">
  223. <div class="mui-content mc-email">
  224. <div class="mui-control-content mui-active" id="email">
  225. <div class="tips mui-content-padded">
  226. 您可以使用邮箱作为登录账号,绑定成功后暂不支持修改。
  227. </div>
  228. <div class="mui-input-group mui-mt15">
  229. {if empty($reregister) && !empty($_W['member']['email'])}
  230. <div class="mui-input-row">
  231. <label>邮箱</label>
  232. <input type="text" name="email" value="{$_W['member']['email']}" disabled />
  233. </div>
  234. {else}
  235. <div class="mui-input-row">
  236. <label>邮箱</label>
  237. <input type="text" name="email" value="" placeholder="请输入邮箱" />
  238. </div>
  239. {/if}
  240. </div>
  241. </div>
  242. <div class="mui-content-padded">
  243. {if !empty($reregister) || (empty($reregister) && empty($_W['member']['email']))}
  244. <input type="hidden" name="token" value="{$_W['token']}">
  245. <input type="hidden" id="type" name="type" value="{$type}" />
  246. <button class="mui-btn mui-btn-success mui-btn-block" type="submit" name="submit" value="立刻绑定">立即绑定</button>
  247. {else}
  248. <a class="mui-btn mui-btn-block" href="javascript:history.back(-1);">返回</a>
  249. {/if}
  250. </div>
  251. </div>
  252. </form>
  253. {/if}
  254. {if $do == 'password'}
  255. <form class="tab-content clearfix js-ajax-form {if $_W['container'] !== 'wechat'}profile-form{/if}" action="{url 'mc/bond/password'}" method="post" enctype="multipart/form-data">
  256. <div class="mui-content">
  257. <div class="mui-content-padded mui-text-muted">请设置密码</div>
  258. <div class="mui-input-group mui-mt15">
  259. {if empty($reregister) && !empty($profile['password'])}
  260. <div class="mui-input-row">
  261. <label>旧密码</label>
  262. <input type="password" value="" name="oldpassword" placeholder="请输入您的旧密码"/>
  263. </div>
  264. {/if}
  265. <div class="mui-input-row">
  266. <label>新密码</label>
  267. <input type="password" value="" name="password" placeholder="请输入您的新密码"/>
  268. </div>
  269. <div class="mui-input-row">
  270. <label class="mui-ellipsis">重复新密码</label>
  271. <input type="password" value="" name="repassword" placeholder="请再次输入您的新密码"/>
  272. </div>
  273. </div>
  274. <div class="mui-content-padded">
  275. <input type="hidden" name="token" value="{$_W['token']}">
  276. <button class="mui-btn mui-btn-success mui-btn-block" type="submit" name="submit" value="确定">确定</button>
  277. </div>
  278. </div>
  279. </form>
  280. {/if}
  281. {if $do == 'credits'}
  282. {if $_GPC['type'] == 'record'}
  283. <header class="mui-bar mui-bar-nav">
  284. {if $_W['container'] !== 'wechat'}
  285. <div class="mui-row fixed-bar">
  286. <div class="mui-col-xs-4">
  287. <button class="mui-btn mui-btn-link mui-btn-nav mui-pull-left mui-action-back">
  288. <span class="mui-icon mui-icon-left-nav"></span>
  289. 返回
  290. </button>
  291. </div>
  292. <div class="mui-col-xs-4 mui-text-center">{if !empty($title)}{$title}{elseif !empty($_W['page']['title'])}{$_W['page']['title']}{/if}</div>
  293. <div class="mui-col-xs-4 mui-text-right">
  294. <a href="#consume-date">
  295. <span>{if $_GPC['period'] <= 0}{php echo date('Y.m', strtotime($_GPC['period'] . 'month'))}{else}查看全部{/if}</span>
  296. <span class="fa fa-angle-down mui-text-muted"></span>
  297. </a>
  298. </div>
  299. </div>
  300. {else}
  301. <div class="mui-row fixed-bar">
  302. <div class="mui-col-xs-6"></div>
  303. <div class="mui-col-xs-6 mui-text-right">
  304. <a href="#consume-date">
  305. <span>{if $_GPC['period'] <= 0}{php echo date('Y.m', strtotime($_GPC['period'] . 'month'))}{else}查看全部{/if}</span>
  306. <span class="fa fa-angle-down mui-text-muted"></span>
  307. </a>
  308. </div>
  309. </div>
  310. {/if}
  311. </header>
  312. <div id="consume-date" class="mui-popover mui-popover-top">
  313. <ul class="mui-table-view">
  314. <li class="mui-table-view-cell">
  315. <a href="{php echo url('mc/bond/credits', array('credittype' => $_GPC['credittype'], 'type' => 'record', 'period' => '1'))}">查看全部</a>
  316. </li>
  317. <li class="mui-table-view-cell">
  318. <a href="{php echo url('mc/bond/credits', array('credittype' => $_GPC['credittype'], 'type' => 'record', 'period' => '0'))}">{php echo date('Y.m', strtotime('today'))}</a>
  319. </li>
  320. <li class="mui-table-view-cell">
  321. <a href="{php echo url('mc/bond/credits', array('credittype' => $_GPC['credittype'], 'type' => 'record', 'period' => '-1'))}">{php echo date('Y.m', strtotime('-1month'))}</a>
  322. </li>
  323. <li class="mui-table-view-cell">
  324. <a href="{php echo url('mc/bond/credits', array('credittype' => $_GPC['credittype'], 'type' => 'record', 'period' => '-2'))}">{php echo date('Y.m', strtotime('-2month'))}</a>
  325. </li>
  326. </ul>
  327. </div>
  328. <div class="mui-content">
  329. <div class="mui-table mui-table-inline mui-pa10">
  330. <div class="mui-table-cell">
  331. <div class="mui-text-muted ">充值</div>{$income}{if $_GPC['credittype'] == 'credit2'}元{else}积分{/if}
  332. </div>
  333. <div class="mui-table-cell">
  334. <div class="mui-text-muted">消费</div>{$pay}{if $_GPC['credittype'] == 'credit2'}元{else}积分{/if}
  335. </div>
  336. </div>
  337. <div class="credits-display">
  338. <ul class="mui-table-view mui-credits">
  339. {loop $data $row}
  340. <li class="mui-table-view-cell">
  341. <a href="{php echo murl('mc/bond/credits', array('type' => recorddetail, 'id' => $row['id'], 'credittype' => $_GPC['credittype']), true)}">
  342. <div class="mui-row">
  343. <div class="mui-col-xs-6 mui-ellipsis-2">
  344. {$row['remark']}
  345. </div>
  346. <div class="mui-col-xs-6 mui-text-right">
  347. <span class="mui-big {if $_GPC['credittype'] == 'credit2'}mui-rmb{/if}" style="color:{php echo $row['color']}">
  348. <span class="money" style="color:{php echo $row['color']}">{$row['num']}</span>
  349. </span>
  350. <span class="mui-block mui-text-muted mui-small">{$row['createtime']}</span>
  351. </div>
  352. </div>
  353. </a>
  354. </li>
  355. {/loop}
  356. </ul>
  357. </div>
  358. </div>
  359. {/if}
  360. {if $_GPC['type'] == 'recorddetail'}
  361. <div class="mui-bg-white mc-record-detail">
  362. <div class="mui-bb1 mui-row sum">
  363. <div class="mui-col-xs-6 mui-text-muted">
  364. 付款金额
  365. </div>
  366. <div class="mui-col-xs-6 mui-text-right">
  367. <span class="mui-big {if $_GPC['credittype'] == 'credit2'}mui-rmb{/if}" style="color:{php echo $row['color']}">
  368. <span class="money" style="color:{php echo $row['color']}">{$data['num']}</span>
  369. </span>
  370. </div>
  371. </div>
  372. <div class="detail-info">
  373. <div class="mui-row">
  374. <div class="mui-col-xs-6 mui-text-muted">
  375. 操作人
  376. </div>
  377. <div class="mui-col-xs-6 mui-text-right mui-ellipsis">
  378. {if $data['username']}{$data['username']}{else}本人{/if}
  379. </div>
  380. </div>
  381. <div class="mui-row">
  382. <div class="mui-col-xs-6 mui-text-muted">
  383. 数量
  384. </div>
  385. <div class="mui-col-xs-6 mui-text-right mui-ellipsis">
  386. {$data['num']}
  387. </div>
  388. </div>
  389. <div class="mui-row">
  390. <div class="mui-col-xs-6 mui-text-muted">
  391. 当前状态
  392. </div>
  393. <div class="mui-col-xs-6 mui-text-right mui-ellipsis">
  394. 交易成功
  395. </div>
  396. </div>
  397. <div class="mui-row">
  398. <div class="mui-col-xs-6 mui-text-muted">
  399. 时间
  400. </div>
  401. <div class="mui-col-xs-6 mui-text-right mui-ellipsis">
  402. {php echo date('Y-m-d H:i:s', $data['createtime'])}
  403. </div>
  404. </div>
  405. <div class="mui-row">
  406. <div class="mui-col-xs-6 mui-text-muted">
  407. 备注
  408. </div>
  409. <div class="mui-col-xs-6 mui-text-right">
  410. {$data['remark']}
  411. </div>
  412. </div>
  413. </div>
  414. </div>
  415. {/if}
  416. <script>
  417. require(['mui.pullrefresh'], function(mui) {
  418. mui.init();
  419. mui.ready(function() {
  420. var page = 2;
  421. var pagetotal = {$pagenums} + 1;
  422. if (page < pagetotal) {
  423. //循环初始化所有下拉刷新,上拉加载。
  424. mui.each(document.querySelectorAll('.credits-display'), function(index, pullRefreshEl) {
  425. mui(pullRefreshEl).pullToRefresh({
  426. up: {
  427. callback: function() {
  428. var self = this;
  429. setTimeout(function() {
  430. $('.mui-pull-bottom-tips').hide();
  431. var ul = self.element.querySelector('.mui-credits');
  432. ul.appendChild(createFragment(ul, index, 5));
  433. if (pagetotal <= page) {
  434. $('.mui-pull-bottom-tips').hide();
  435. self.endPullUpToRefresh(true);
  436. } else {
  437. self.endPullUpToRefresh(false);
  438. }
  439. }, 1000);
  440. }
  441. }
  442. });
  443. });
  444. var createFragment = function(ul, index, count, reverse) {
  445. var length = ul.querySelectorAll('li').length;
  446. var fragment = document.createDocumentFragment();
  447. var li;
  448. var url = "{php echo url('mc/bond/credits', array('credittype' => $_GPC['credittype'], 'type' => $_GPC['type'], 'period' => $_GPC['period']), true)}";
  449. mui.post(url, {'page' : page}, function(data){
  450. data = $.parseJSON(data);
  451. if (data.state == 'error') {
  452. return false;
  453. }
  454. for (var i in data) {
  455. var href = "{php echo url('mc/bond/credits', array('type' => 'recorddetail', 'credittype' => $_GPC['credittype']),true)}";
  456. li = document.createElement('li');
  457. li.className = 'mui-table-view-cell';
  458. li.innerHTML = '<a href="' + href + '&id=' + data[i].id + '" ><div class="mui-row"><div class="mui-col-xs-6 mui-ellipsis-2">' + data[i].remark + '</div><div class="mui-col-xs-6 mui-text-right"><span class="mui-big mui-rmb" style="color:' + data[i].color + '"><span class="money" style="color:' + data[i].color + '">' + data[i].num + '</span></span><span class="mui-block mui-text-muted mui-small">' + data[i].createtime + '</span></div></div></a>';
  459. ul.appendChild(li, ul.firstChild);
  460. }
  461. $('.mui-pull-bottom-tips').show();
  462. });
  463. page++;
  464. return fragment;
  465. };
  466. }
  467. });
  468. });
  469. </script>
  470. {/if}
  471. {if $do == 'binding_account'}
  472. <form class="tab-content clearfix js-ajax-form {if $_W['container'] !== 'wechat'}profile-form{/if}" action="{url 'mc/bond/binding_account'}" method="post" enctype="multipart/form-data">
  473. <div class="mui-content mc-email">
  474. <div class="mui-control-content mui-active" id="email">
  475. <div class="tips mui-content-padded">
  476. 您可以使用邮箱或手机作为登录账号。
  477. </div>
  478. <div class="mui-input-group mui-mt15">
  479. {if $type == '1'}
  480. <div class="mui-input-row">
  481. <label>账号</label>
  482. <input type="text" name="username" value="" placeholder="请输入{if $item == 'email'}邮箱{elseif $item == 'mobile'}手机号{else}邮箱或手机号{/if}" />
  483. </div>
  484. {else}
  485. <div class="mui-input-row">
  486. <label>已有邮箱</label>
  487. <input type="text" name="username" value="" placeholder="请输入已有邮箱" />
  488. </div>
  489. {/if}
  490. <div class="mui-input-row">
  491. <label>登录密码</label>
  492. <input type="password" name="password" value="" placeholder="请输入{if $type != '1'}已有邮箱{/if}登录密码"/>
  493. </div>
  494. </div>
  495. </div>
  496. <div class="mui-content-padded">
  497. <div class="mui-text-center mui-mt15 mui-mb10">
  498. {if !empty($reregister) || (empty($reregister) && empty($_W['member']['email']))}
  499. {if $_GPC['type'] == 1}
  500. <a href="{php echo url('mc/bond/binding_account', array('type' => '0'))}">绑定已有账号</a>
  501. {else}
  502. <a href="{php echo url('mc/bond/binding_account', array('type' => '1'))}">绑定新账号</a>
  503. {/if}
  504. {/if}
  505. </div>
  506. {if !empty($reregister) || (empty($reregister) && empty($_W['member']['email']))}
  507. <input type="hidden" name="token" value="{$_W['token']}">
  508. <input type="hidden" id="type" name="type" value="{$type}" />
  509. <button class="mui-btn mui-btn-success mui-btn-block" type="submit" name="submit" value="立刻绑定">立即绑定</button>
  510. {else}
  511. <a class="mui-btn mui-btn-block" href="javascript:history.back(-1);">返回</a>
  512. {/if}
  513. </div>
  514. </div>
  515. </form>
  516. {/if}
  517. {if $do == 'pay_password'}
  518. <form class="tab-content clearfix js-ajax-form {if $_W['container'] !== 'wechat'}profile-form{/if}" action="{url 'mc/bond/pay_password'}" method="post" enctype="multipart/form-data">
  519. <div class="mui-content mc-email">
  520. <div class="mui-control-content mui-active">
  521. <div class="mui-input-group mui-mt15">
  522. <div class="mui-input-row">
  523. <label>开启支付密码</label>
  524. <input type="checkbox" name="pay_password_open" onclick="change()" {if !empty($pay_password)}checked{/if}/>
  525. </div>
  526. </div>
  527. <div class="mui-input-group mui-mt15" id="pay_password">
  528. <div class="mui-input-row">
  529. <label>支付密码</label>
  530. <input type="password" name="pay_password" value="" placeholder="请输入密码" />
  531. </div>
  532. <div class="mui-input-row">
  533. <label>确认支付密码</label>
  534. <input type="password" name="repeat_pay_password" value="" placeholder="请确认密码"/>
  535. </div>
  536. </div>
  537. </div>
  538. <div class="mui-content-padded">
  539. <button class="mui-btn mui-btn-block" type="submit">确定</button>
  540. </div>
  541. </div>
  542. </form>
  543. <script>
  544. $('#pay_password').hide();
  545. var change = function() {
  546. open = $('[name="pay_password_open"]').prop('checked');
  547. if (open === true) {
  548. $('#pay_password').show();
  549. } else {
  550. $('#pay_password').hide();
  551. }
  552. };
  553. </script>
  554. {/if}
  555. {template 'common/footer'}