chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{yun:}include file="$wapstyle/member/lheader.htm"{/yun}
 
 
<div class="mui-collapse-content">
<ul class="yunset_password mt15">
 
    <li><span class="yunset_password_mname">新用户名</span>
        <div class="mui-input-row">
        
         <input id="username" type="text" class="yunset_text" value="" placeholder="新用户名" />
        </div>
        </li>
        <div style=" background:#fff;padding:2px 2px 13px 15px;color:#f00">用户名要求长度{yun:}$config.sy_reg_nameminlen{/yun}-{yun:}$config.sy_reg_namemaxlen{/yun}位
                {yun:}if $config.reg_name_han=='1' || $config.reg_name_sp=='1' || $config.reg_name_num=='1' || $config.reg_name_zm=='1'{/yun}
                    ,必须包含
                    {yun:}if $config.reg_name_han=='1'{/yun}汉字 {yun:}/if{/yun}
                    {yun:}if $config.reg_name_num=='1'{/yun}数字 {yun:}/if{/yun}
                    {yun:}if $config.reg_name_zm=='1'{/yun}字母 {yun:}/if{/yun}
                    {yun:}if $config.reg_name_sp=='1'{/yun}其它字符@!#.$-_{yun:}/if{/yun}
                {yun:}/if{/yun}</div>
        <li><span class="yunset_password_mname">密码</span>
        <div class="mui-input-row">
        
            <input id="password" type="password" class="yunset_text" placeholder="请输入登录密码" />
        </div>
        </li>
       
        <div class="yunset_bth_box">
          <input type="submit" name="submit" value="提交" class="yunset_bth" onclick="Savenamepost();" style="height:45px; line-height:45px;color:#fff; text-align:center"/>
         </div>
 
    </ul>
</div>
 
<script type="text/javascript">
    function Savenamepost(){
        var username = $.trim($("#username").val());
        var pass = $.trim($("#password").val());
        
        if(username.length<2 || username.length>16){
            showToast("用户名长度应该为2-16位!",2);return false;
        }
        if(pass.length<6 || pass.length>20){
            showToast("密码长度应该为6-20位!",2);return false;
        }
        showLoading()
        
        $.post(wapurl+"/member/index.php?c=setname",{username:username,password:pass},function(data){
            hideLoading(); 
            if(data==1){
                showToast("修改成功,请重新登录!", 2,function(){
                    location.href=wapurl+"index.php?c=login"}
                );
                return false;
            }else{
                showToast(data,2);return false;
            }
        })
    }
</script>
 
</body></html>