12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <template>
- <view>
- <view class="con">
- <view class="flex item">
- <view>用户名:</view>
- <input v-model="person.name" />
- </view>
- <view class="flex item">
- <view>性别:</view>
- <input v-model="person.name" />
- </view>
- <view class="flex item">
- <view>年龄:</view>
- <input v-model="person.name" />
- </view>
- <view class="flex item">
- <view>手机号:</view>
- <input v-model="person.phone" />
- </view>
- <view class="flex item">
- <view>互助组:</view>
- <input v-model="person.name" />
- </view>
- <view class="flex item">
- <view>角色:</view>
- <input v-model="person.name" />
- </view>
- <view class="flex item" style="border: none;">
- <view>地址:</view>
- <input v-model="person.name" />
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- person: {}
- }
- },
- onLoad() {
- this.getSelfInfo()
- },
- methods: {
- // 查看个人信息
- getSelfInfo() {
- this.http.request({
- url: '/sp-admin/app/AppUser/getSelfInfo',
- success: res => {
- this.person = res.data.data
- }
- });
- },
- // 修改个人信息
- updateUser(){
- this.http.request({
- url: '/sp-admin/app/AppUser/update',
- success: res => {
- uni.showModal({
- content: '修改成功',
- showCancel: false
- }),
- this.getSelfInfo()
- }
- });
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: $pg;
- }
-
- .con{
- background-color: #fff;
- margin: 20px;
- padding: 10px;
- border-radius: 10px;
- border: 1px #fff solid;
- }
- .item{
- height: 50px;
- display: flex;
- align-items: center;
- border-bottom: 1px #dcdcdc solid;
- }
- </style>
|