123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <!doctype html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <meta name="format-detection"content="telephone=no">
- <title>index</title>
- <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
- <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
- <link rel="stylesheet" href="../../css/projeck.css">
- <style media="screen">
- body,html{
- margin: 0;
- background: #fff;
- }
- </style>
- </head>
- <body>
- <div class="api_layout">
- <header class="header-login">
- <img class="backBtn" src="../../image/btn_back.png" alt="" tapmode onclick="backIndex()">
- <p class="api_text">个人资料</p>
- </header>
- <div class="api_nav">
- <div class="header-nav scroller nav-haohuo" id="navScroll">
- <ul class="header-nav-items flex-wrap">
- <li class="active flex-con" tapmode="active" onclick="randomSwitchBtn(this)">
- 基本信息
- </li>
- <li class="flex-con" tapmode="active" onclick="randomSwitchBtn(this)">
- 初始学历
- </li>
- <li class="flex-con" tapmode="active" onclick="randomSwitchBtn(this)">
- 最高学历
- </li>
- </ul>
- </div>
- </div>
- </div>
- </body>
- </html>
- <script type="text/javascript" src="../../script/api.js"></script>
- <script type="text/javascript">
- apiready = function () {
- $api.fixStatusBar($api.dom('header') );
- api.parseTapmode();
- var info = $api.getStorage('data'),
- token = JSON.parse(info).data.access_token;
- funIniGroup(token);
- keybackFun();
- }
- var eHeaderLis;
- function funIniGroup(token){
- eHeaderLis = $api.domAll('.header-nav-items li'),
- frames = [];
- for (var i = 0,len = eHeaderLis.length; i < len; i++) {
- frames.push( {
- name: 'personal_frame'+i,
- url: 'personal_frame'+i+'.html',
- bgColor : '#f2f2f2',
- bounces:true,
- pageParam:{
- data:token
- },
- } )
- }
- api.openFrameGroup({
- name: 'group',
- scrollEnabled: true,
- rect: {
- x: 0,
- y: $api.dom('header').offsetHeight+$api.dom('.api_nav').offsetHeight,
- w: api.winWidth,
- h: $api.winHeight
- },
- preload:0,
- index: 0,
- frames: frames
- }, function (ret, err) {
- menuSelected(ret.index);
- });
- };
- function menuSelected(index) {
- for (var i = 0; i < eHeaderLis.length; i++) {
- if(index == i ){
- $api.addCls(eHeaderLis[i], 'active');
- }else {
- $api.removeCls(eHeaderLis[i], 'active');
- }
- }
- }
- function randomSwitchBtn( tag ) {
- if( tag == $api.dom('.header-nav-items li.active') )return;
- var eFootLis = $api.domAll('.header-nav-items li');
- index = 0;
- for (var i = 0,len = eFootLis.length; i < len; i++) {
- if( tag == eFootLis[i] ){
- index = i;
- }else{
- $api.removeCls(eFootLis[i], 'active');
- }
- }
- $api.addCls( eFootLis[index], 'active');
- api.setFrameGroupIndex({
- name: 'group',
- index: index
- });
- }
- function backIndex() {
- api.sendEvent({
- name: 'userInfo'
- });
- api.closeWin();
- }
- // 监听物理返回键
- function keybackFun() {
- api.addEventListener({
- name: 'keyback'
- }, function(ret, err){
- api.sendEvent({
- name: 'userInfo'
- });
- api.closeWin();
- });
- }
- </script>
|