dever преди 7 години
родител
ревизия
8061cb94ec
променени са 4 файла, в които са добавени 76 реда и са изтрити 0 реда
  1. 27 0
      main/assets/mobile/edit.html
  2. 21 0
      main/assets/mobile/js/config.js
  3. 3 0
      main/config/base.php
  4. 25 0
      main/template/mobile/user/edit.php

+ 27 - 0
main/assets/mobile/edit.html

@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+    <meta name="sudameta" content="allCIDs:34766,34979,7198,12665,257,258">
+    <title></title>
+<link href="./css/global.css?v=95681a6c" rel="stylesheet"><link href="./css/password.css?v=95681a6c" rel="stylesheet"></head>
+
+<body>
+	<header>
+        <a href="#" class="back"></a>
+        <span>登录</span>
+    </header>
+    <section class="wrapper form-padding">
+        <form action="">
+            <section class="form-item">
+                <input type="text" placeholder="请输入昵称">
+            </section>
+            <section class="form-btns">
+                <input type="submit" class="button disable" value="确定">
+            </section>
+        </form>
+    </section>
+<script type="text/javascript" src="./js/global.js?v=95681a6c"></script><script type="text/javascript" src="./js/password.js?v=95681a6c"></script></body>
+</html>

+ 21 - 0
main/assets/mobile/js/config.js

@@ -143,6 +143,8 @@ Dever.User().config =
 		,7 : '#submit'
 		//兑现
 		,8 : '#exchange',
+		//修改昵称
+		,9 : '#edit'
 	}
 
 	//登录信息
@@ -324,6 +326,25 @@ Dever.User().config =
 		}
 	}
 
+	//修改昵称
+	,9 :
+	{
+		'input' :
+		{
+			'username' : '#username'
+		}
+		//错误提示的div
+		//,'status' : '.alert'
+		//错误提示
+		,'error' : '请填写昵称'
+		,'url' : Dever.Host('task', 'user.set?json=1')
+		,'callback' : function(e, msg)
+		{
+			Dever.Out(msg);
+			location.reload();
+		}
+	}
+
 };
 
 //定义上传回调方法

+ 3 - 0
main/config/base.php

@@ -40,6 +40,9 @@ $config['template'] = array
         # 修改密码
         'user/password' => 'password',
 
+        # 修改昵称
+        'user/edit' => 'edit',
+
         # 用户小队
         'user/group' => 'team',
         # 用户邀请码

+ 25 - 0
main/template/mobile/user/edit.php

@@ -0,0 +1,25 @@
+<?php
+
+$title = '修改昵称';
+
+$view
+
+->import('inc/head')
+
+->set('title', $title)
+->set('name', 'password')
+->fetch('header span', $title)
+
+->fetch('.back@href',    '<{Dever::url("user/set", "main")}>')
+
+->fetch(array('input@id', 0), 'username')
+->fetch(array('input@name', 0), 'username')
+->fetch(array('input@dever-error', 0), '请填写昵称')
+
+->fetch('.button@class', 'button')
+->fetch('.button@type', 'button')
+->fetch('.button@id', 'edit')
+
+->import('inc/foot')
+
+->display();