You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
3.8 KiB

2 years ago
{{define "/chat/userinfo.shtml"}}
<!DOCTYPE html>
<html>
<head>
{{template "/chat/head.shtml"}}
</head>
<body>
<div v-show="win=='userinfo'">
<header class="mui-bar mui-bar-nav">
<a class="mui-icon mui-icon-left-nav mui-pull-left" @click="goBack()"></a>
<h1 class="mui-title">修改资料</h1>
</header>
<div class="mui-content createcom" id="pageapp">
<ul class="mui-table-view mui-table-view-chevron">
<li class="mui-table-view-cell mui-media">
<a class="">
<input style="width: 100%;height: 48px;position: absolute;opacity:0;"
onchange="uploadUserInfo(this)" accept="image/png,image/jpeg" type="file"
class="mui-input-clear mui-input" placeholder="请输入群名称">
<div class="profile">
<div>更换头像</div>
<div class="mui-media-body">
<img id="icon" :src="info.icon || '/asset/images/avatar0.png'"
style="border-radius:50%;" class="mui-media-object mui-pull-right head-img">
<p class="mui-ellipsis">点击上传头像</p>
</div>
</div>
</a>
</li>
</ul>
<div class="mui-input-group">
<div class="mui-input-row">
<label>昵称</label>
<input v-model="info.name" id='name' type="text" class="mui-input-clear mui-input"
placeholder="请输入用户昵称">
</div>
</div>
<div class="mui-content-padded">
<button @click="updateUserInfo" id='reg'
class="mui-btn mui-btn-block mui-btn-primary btn-confirm">确认</button>
</div>
</div>
</div>
</body>
</html>
<script>
// function uploadthis(dom){
// var data = new FormData();
// for(let file of dom.files){
// data.append('file',file);
// }
// let xhr = new XMLHttpRequest();
// xhr.onreadystatechange = function(){
// if(xhr.readyState == 4 && xhr.status==200){
// var res = JSON.parse(xhr.responseText);
// if(res.code!=0){
// mui.toast(res.msg)
// }else{
// app.com.icon = res.data;
// mui.toast("上传成功")
// }
// }
// };
// xhr.open('POST','/attach/upload');
// xhr.send(data)
// }
// var app=new Vue(
// {
// el:"#pageapp",
// data:{
// com:{
// name:"",
// cate:0,
// memo:"",
// icon:"/asset/images/community.png",
// ownerid:0
// },
// },
// created:function(){
// this.com.ownerid=userId();
// },
// methods:{
// createcommunity:function(){
// if(!this.com.name){
// mui.toast("请填写名称")
// return
// }
// post("contact/createcommunity",this.com,function(res){
// if(res.code==0){
// mui.toast("创建成功");
// }else{
// mui.toast(res.msg);
// }
// })
// },
// }
// }
// )
</script>
{{end}}