<?php
/**
 *------Create thems Controller------
 *------SCWPHP  Version 1.0.0------
 *------Dev Model Jions------
 *------Create Time 2017-06-08 10:07:19------
 */
namespace App\Mobile\Controller;
use Biz\Account\AccountManager;
use Biz\Money\MoneyQuery;

class Account extends BaseController {

    public function __construct()
    {
        //parent::init();
        $this->accountManager = new AccountManager();
    }


    /**
     * 修改支付密码页面
     */
    public function PayPasswordIndex()
    {
        $this->display();
    }

    /**
     * 修改支付密码
     */
    public function UpdatePayPassword()
    {
        $_POST['token'] = isset($_GET['token']) ? $_GET['token'] : '';
        $result = $this->accountManager->updatePayPassword($_POST);
        Render($result['data'], $result['status'], $result['msg']);
    }

    /**
     * 修改用户密码页面
     */
    public function AccountPasswordIndex()
    {
        $this->display();
    }

    /**
     * 修改用户密码
     */
    public function UpdateAccountPassword()
    {
        $result = $this->accountManager->savePassword($_POST);
        Render($result['data'], $result['status'], $result['msg']);
    }

    /**
     * 用户安全中心
     */
    public function SafeCenter()
    {
        $this->display();
    }
}
