deit_info.html
3.3 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!doctype html>
<html lang="en" style="font-size: 100px">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="//at.alicdn.com/t/font_724267_hizrwxnkr3j.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/style.css">
<!--<script type="text/javascript" src="__TMPL__/public/assets/js/fontsize.js"></script>-->
<script type="text/javascript" src="__TMPL__/public/assets/js/base.js"></script>
<title>修改个人资料</title>
</head>
<body>
<div class="container">
<div class="deit_top">
修改个人信息
</div>
<div class="re_item deit_infoitem">
<div class="item myinfo_item">
<div class="item_name">姓名</div>
<div class="item_input"><input type="text" value="{$list.name}" placeholder="请填写姓名" class="name"></div>
</div>
<div class="item myinfo_item">
<div class="item_name">手机号</div>
<div class="item_input" style="color: #B2B2B2;"><input type="text" value="{$list.tel}" class="tel" readonly style="color: #B2B2B2;"></div>
</div>
<div class="item myinfo_item">
<div class="item_name">微信</div>
<div class="item_input"><input type="text" value="{$list.wx}" placeholder="请输入您的微信号" class="wx"></div>
</div>
<div class="item myinfo_item">
<div class="item_name">钱包地址</div>
<div class="item_input" ><input type="text" value="{$list.wallet}" readonly class="play" style="color: #B2B2B2;"></div>
</div>
</div>
<div class="re_btn myinfo_btn btn_yes">完成</div>
<div class="re_btn myinfo_btn btn_return">返回</div>
<div id="toast" style="display: none;">
<div class="weui-mask_transparent"></div>
<div class="weui-toast">
<i class="weui-icon-success-no-circle weui-icon_toast"></i>
<p class="weui-toast__content">已完成</p>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/common.js" type="text/javascript" charset="utf-8"></script>
</body>
<script>
$('.btn_yes').click(function () {
var name = $(".name").val();
var wx = $(".wx").val();
var user_id = "{$Think.session.user_id}";
$.ajax({
type: "POST",
url: "{:url('Index/changeUser')}",
data: {
"name": name,
"wx": wx,
"id": user_id,
},
success: function (data) {
console.log(data)
if (data.code == 1) {
alert(data.msg);
location.href = "{:url('Index/user')}";
}
else {
alert(data.msg);
}
},
error: function () {
alert("网络错误");
}
})
})
$('.btn_return').click(function () {
var url ="{:url('Index/user')}";
location.href = url;
})
</script>
</html>