<!doctype html>
|
<html>
|
<head>
|
<meta charset="utf-8" />
|
<title>修改昵称</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<!-- js引用 -->
|
<script src="../../js/config.js"></script>
|
<script src="../../js/h5toapp.js"></script>
|
<script src="../../js/h5to.js"></script>
|
|
<!-- 组件js引用 -->
|
<script src="../../js/mui.min.js"></script>
|
<!-- 组件标准css引用 -->
|
<link rel="stylesheet" href="../../css/mui.min.css">
|
|
<!-- css引用 -->
|
<link href="../../css/currency.css" rel="stylesheet">
|
<link href="../../css/spinkit.css" rel="stylesheet">
|
<link href="../../css/icon/iconfont.css" rel="stylesheet">
|
<!-- 界面本身css引用 -->
|
<link href="./xgnc.css" rel="stylesheet">
|
|
<style type="text/css">
|
.mui-input-row .mui-input-clear~.mui-icon-clear {
|
line-height: 27px;
|
width: 30px;
|
height: 17px;
|
top: 16px;
|
background: url(../../img/Delete%20Keyword.png) no-repeat;
|
}
|
.mui-icon-clear:before {
|
content: '';
|
/* background: url(../../img/Delete%20Keyword.png) no-repeat; */
|
}
|
</style>
|
</head>
|
|
<body>
|
<div style="background-color: #F9FAFC; height: 100vh; width: 100%; margin: 0; overflow: auto;">
|
<div id="loading" class="example">
|
<div class="sk-plane loading_location"></div>
|
</div>
|
|
<div class="mui-content">
|
<div style="margin: 16px; box-sizing: border-box;">
|
<div class="mui-card">
|
<div class="z_menu_btn_row mui-input-row" style="height: 48px;line-height: 48px;padding: 0;padding-left: 16px;" >
|
<input id="val" type="text" onchange="change(this)" class="mui-input-clear search_frame" />
|
</div>
|
</div>
|
</div>
|
<div style="width: 100%;">
|
<button class="save_button" onclick="click_row(menurows[0])" style="width: -webkit-fill-available;">保存</button>
|
</div>
|
</div>
|
</div>
|
|
<script type="text/javascript">
|
mui.init({
|
swipeBack: true //启用右滑关闭功能
|
});
|
|
var menurows = [{
|
id: "1",
|
name: "账号信息",
|
path: "",
|
_id: 2006
|
},
|
];
|
|
var personInfo = {};
|
|
// setRouteParams({userId: "1352189979509854209",params: {}});
|
|
function initPage() {
|
|
}
|
function loadData(){
|
ajaxPost('client/api/getById',{id: login_data.userId}, function(result) {
|
if (result) {
|
personInfo = result.data
|
console.info(result);
|
}
|
doLoadData();
|
hideloading("loading");
|
});
|
}
|
|
function doLoadData() {
|
document.getElementById('val').value = personInfo.clientName;
|
}
|
|
var changeData = {};
|
console.info(changeData);
|
function change(e){
|
changeData.id = login_data.userId;
|
changeData.clientName = document.getElementById('val').value;
|
}
|
|
function click_row(row) {
|
var pam = {
|
_id: row._id,
|
params: {
|
userId: login_data.id
|
}
|
};
|
|
ajaxPost('client/api/modify',changeData,function(result){
|
console.info(result);
|
})
|
app_click("route", pam, callback);
|
|
}
|
|
//3. run
|
mui.ready(function() {
|
onInitReady(function() {
|
initPage();
|
loadData();
|
});
|
})
|
</script>
|
</body>
|
</html>
|