@@ -0,0 +1,135 @@
|
||||
<template>
|
||||
|
||||
<tabler-header type="mini" ref="heard"></tabler-header>
|
||||
<div class="page-wrapper">
|
||||
<!-- Page header -->
|
||||
<div class="page-header d-print-none">
|
||||
<div class="container-xl">
|
||||
<div class="row g-2 align-items-center">
|
||||
<div class="col">
|
||||
<h2 class="page-title">
|
||||
设置
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page body -->
|
||||
<div class="page-body">
|
||||
<div class="container-xl">
|
||||
<div class="card">
|
||||
<div class="row g-0">
|
||||
|
||||
<setting-menu></setting-menu>
|
||||
|
||||
<div class="col-12 col-md-9 d-flex flex-column">
|
||||
<div class="card-body">
|
||||
|
||||
<h2 class="mb-4">信息设置</h2>
|
||||
<!-- <h3 class="card-title">Profile Details</h3> -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
|
||||
<avatar size="xl" :url="user_info.AvatarPath"></avatar>
|
||||
</div>
|
||||
<div class="col-auto"><a class="btn" @click="showPopup">更改头像 </a></div>
|
||||
<!-- <div class="col-auto"><a href="#" class="btn btn-ghost-danger">
|
||||
删除头像
|
||||
</a></div> -->
|
||||
</div>
|
||||
<!-- <h3 class="card-title mt-4">Business Profile</h3> -->
|
||||
<div class="row g-3">
|
||||
<div class="col-md">
|
||||
<div class="form-label">名字</div>
|
||||
<input type="text" class="my_input_field" v-model="user_info.Username"
|
||||
maxlength="30">
|
||||
</div>
|
||||
|
||||
<div class="col-md">
|
||||
<div class="form-label">备注</div>
|
||||
<input type="text" class="my_input_field" v-model="user_info.FirstName"
|
||||
maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">生日</label>
|
||||
<div class="row g-2">
|
||||
<div class="col-5">
|
||||
|
||||
<uni-datetime-picker type="date" :clear-icon="false" v-model="birthdate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer bg-transparent mt-auto">
|
||||
<div class="btn-list justify-content-end">
|
||||
|
||||
<a href="#" class="btn btn-primary">
|
||||
提交
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<tabler-footer></tabler-footer>
|
||||
|
||||
<uni-popup ref="popup" type="center">
|
||||
<view class="popup-content">
|
||||
这里是弹框内容
|
||||
<button @click="closePopup">关闭</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
user_info: {
|
||||
AvatarPath: "",
|
||||
Username: "",
|
||||
FirstName: "",
|
||||
Birthdate: "",
|
||||
},
|
||||
birthdate: "",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showPopup() {
|
||||
this.$refs.popup.open();
|
||||
},
|
||||
closePopup() {
|
||||
this.$refs.popup.close();
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
if (this.$refs.heard.is_login) {
|
||||
this.user_info = this.$refs.heard.user_info
|
||||
this.birthdate = this.user_info.Birthdate.substring(0, 10)
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -140,9 +140,9 @@
|
||||
}
|
||||
|
||||
if (this.is_username_err === false && this.is_password_err === false) {
|
||||
console.log(this.post_data)
|
||||
|
||||
my_network_func.post_json("/user/login", this.post_data, (c) => {
|
||||
console.log(c)
|
||||
|
||||
if (c.statusCode == 200) {
|
||||
if (c.data.err_code == 0) {
|
||||
this.$refs.footer.alert('success', "登录成功")
|
||||
|
||||
+3
-117
@@ -1,121 +1,7 @@
|
||||
<!-- 本示例未包含完整css,获取外链css请参考上文,在hello uni-app项目中查看 -->
|
||||
<template>
|
||||
<view>
|
||||
<view class="uni-common-mt">
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">可自动聚焦的input</view>
|
||||
<input class="uni-input" focus placeholder="自动获得焦点" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">键盘右下角按钮显示为搜索</view>
|
||||
<input class="uni-input" confirm-type="search" placeholder="键盘右下角按钮显示为搜索" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">控制最大输入长度的input</view>
|
||||
<input class="uni-input" maxlength="10" placeholder="最大输入长度为10" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">实时获取输入值:{{inputValue}}</view>
|
||||
<input class="uni-input" @input="onKeyInput" placeholder="输入同步到view中" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">控制输入的input</view>
|
||||
<input class="uni-input" @input="replaceInput" v-model="changeValue" placeholder="连续的两个1会变成2" />
|
||||
</view>
|
||||
<!-- #ifndef MP-BAIDU -->
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">控制键盘的input</view>
|
||||
<input class="uni-input" ref="input1" @input="hideKeyboard" placeholder="输入123自动收起键盘" />
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">数字输入的input</view>
|
||||
<input class="uni-input" type="number" placeholder="这是一个数字输入框" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">密码输入的input</view>
|
||||
<input class="uni-input" password type="text" placeholder="这是一个密码输入框" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">带小数点的input</view>
|
||||
<input class="uni-input" type="digit" placeholder="带小数点的数字键盘" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">身份证输入的input</view>
|
||||
<input class="uni-input" type="idcard" placeholder="身份证输入键盘" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">控制占位符颜色的input</view>
|
||||
<input class="uni-input" placeholder-style="color:#F76260" placeholder="占位符字体是红色的" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title"><text class="uni-form-item__title">带清除按钮的输入框</text></view>
|
||||
<view class="uni-input-wrapper">
|
||||
<input class="uni-input" placeholder="带清除按钮的输入框" :value="inputClearValue" @input="clearInput" />
|
||||
<text class="uni-icon" v-if="showClearIcon" @click="clearIcon"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title"><text class="uni-form-item__title">可查看密码的输入框</text></view>
|
||||
<view class="uni-input-wrapper">
|
||||
<input class="uni-input" placeholder="请输入密码" :password="showPassword" />
|
||||
<text class="uni-icon" :class="[!showPassword ? 'uni-eye-active' : '']"
|
||||
@click="changePassword"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view></view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'input',
|
||||
focus: false,
|
||||
inputValue: '',
|
||||
showClearIcon: false,
|
||||
inputClearValue: '',
|
||||
changeValue: '',
|
||||
showPassword: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onKeyInput: function(event) {
|
||||
this.inputValue = event.target.value
|
||||
},
|
||||
replaceInput: function(event) {
|
||||
var value = event.target.value;
|
||||
if (value === '11') {
|
||||
this.changeValue = '2';
|
||||
}
|
||||
},
|
||||
hideKeyboard: function(event) {
|
||||
if (event.target.value === '123') {
|
||||
uni.hideKeyboard();
|
||||
}
|
||||
},
|
||||
clearInput: function(event) {
|
||||
this.inputClearValue = event.detail.value;
|
||||
if (event.detail.value.length > 0) {
|
||||
this.showClearIcon = true;
|
||||
} else {
|
||||
this.showClearIcon = false;
|
||||
}
|
||||
},
|
||||
clearIcon: function() {
|
||||
this.inputClearValue = '';
|
||||
this.showClearIcon = false;
|
||||
},
|
||||
changePassword: function() {
|
||||
this.showPassword = !this.showPassword;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user