xinelu-doctor-app/pages/Modifyphonenumber/Modifyphonenumber.vue
2023-10-24 17:04:23 +08:00

128 lines
2.2 KiB
Vue

<template>
<view class="app">
<view class="name">
手机号
<u-input v-model="list.personPhone" type="number" maxlength="11" placeholder="请输入手机号" />
</view>
<view class="submit" @tap="submit">提交
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
update,
} from '@/api/Modifyphonenumber/Modifyphonenumber.js'
export default {
data() {
return {
list: [],
}
},
onLoad(e) {
if (e) {
this.list = JSON.parse(e.list)
console.log(this.list)
}
},
methods: {
submit() {
// this.list.id = uni.getStorageSync("id")
update(this.list).then(res => {
console.log(res)
if(res.code==200){
this.$refs.uToast.show({
title: '修改成功',
type: 'success',
duration: '1500'
})
}else{
this.$refs.uToast.show({
title: res.msg,
type: 'error',
duration: '1500'
})
}
})
},
},
}
</script>
<style lang="scss">
.app {
height: 100vh;
background-color: #fff;
position: relative;
.submit {
width: 496rpx;
height: 61rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 20%;
background: #18CBB3;
// border-radius: 5px;
// width: 20rpx;
// height: 100rpx;
color: white;
line-height: 60rpx;
text-align: center;
border-radius: 18rpx;
font-size: 36rpx;
}
.name {
padding: 25rpx 30rpx 0 30rpx;
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
line-height: 38rpx;
::v-deep .u-input {
width: 636rpx;
height: 63rpx;
background: #F6F6F6;
margin: 12rpx auto;
border: none;
border-radius: 5rpx;
}
.select {
width: 636rpx;
height: 63rpx;
background: #F6F6F6;
margin: 12rpx auto;
border-radius: 5rpx;
display: flex;
position: relative;
text {
padding-left: 20rpx;
line-height: 63rpx;
font-size: 20rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #8E8E8E;
}
image {
width: 9rpx;
height: 17rpx;
position: absolute;
right: 40rpx;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
}
}
}
</style>