123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <!DOCTYPE html>
- <html lang="zh-cn">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
- <meta name="format-detection" content="telephone=no"/>
- <meta name="format-detection" content="email=no"/>
- <title>my</title>
- <link rel="stylesheet" href="../css/reset.css">
- <link rel="stylesheet" href="../css/style.css">
- <style>
- html,body{
- height: 100%;
- }
- .my{
- height: 100%;
- background-color: #f7f7f7;
- }
- .my_con li{
- height: 4.5rem;
- line-height: 4.5rem;
- color: #212121;
- font-size: 1.3rem;
- background-color: #fff;
- padding: 0 1rem;
- border-bottom: 1px solid #efefef;
- }
- .my_con li span:nth-of-type(2){
- color: #b5b5b5;
- font-size: 1.3rem;
- }
- </style>
- </head>
- <body>
- <div class="my">
- <div class="my_con">
- <ul>
- <li class="clearFix">
- <span class="left">个人资料</span><span class="right">〉</span>
- </li>
- <li class="clearFix">
- <span class="left">修改密码</span><span class="right">〉</span>
- </li>
- <li class="clearFix">
- <span class="left">注销登录</span><span class="right">〉</span>
- </li>
- </ul>
- </div>
- </div>
- <script src="../script/jquery-3.1.0.min.js"></script>
- <script type="text/javascript" src="../script/api.js"></script>
- <script>
- apiready=function () {
- $(function () {
- $(".my_con").on('click','li',function () {
- switch ($(this).index()){
- case 0:toUserData();
- break;
- case 1:changePW();
- break;
- case 2:toLogin();
- break;
- }
- })
- function toUserData() {
- api.openWin({
- name: 'userdata',
- url: './userdata.html',
- animation: {
- type: 'push',
- subType: 'from_right',
- duration: 400
- },
- delay:300
- });
- }
- function changePW() {
- api.openWin({
- name: 'changePW',
- url: './changePW.html',
- animation: {
- type: 'push',
- subType: 'from_right',
- duration: 400
- },
- delay:300
- });
- }
- function toLogin() {
- api.actionSheet({
- title: '确定要注销当前账号吗?',
- cancelTitle: '取消',
- destructiveTitle: '确认',
- style:{
- itemNormalColor:'#fff',
- fontNormalColor:'#4796ff'
- }
- }, function(ret, err) {
- var index = ret.buttonIndex;
- if(index==1){
- $api.rmStorage("user");
- $api.rmStorage("userdata");
- api.openWin({
- name: 'login',
- url: './login.html',
- animation: {
- type: 'movein',
- subType: 'from_right',
- duration: 400
- },
- delay:300
- });
- }
- });
- }
- })
- }
- </script>
- </body>
- </html>
|