123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <template>
- <view class="content">
- <view class="updatePassword-wrap">
- <view class="username item">
- <text>旧密码:</text>
- <uni-easyinput :inputBorder="false" v-model="oldPassword"
- class="input"
- type="text"
- placeholder="请输入旧密码" />
- </view>
- <view class="password item">
- <text>新密码:</text>
- <uni-easyinput v-model="password"
- :inputBorder="false"
- class="input"
- type="text" placeholder="请输入新密码">
- </uni-easyinput>
- </view>
- <button type="primary" @click="submit" class="submit-BT">提交</button>
- </view>
- </view>
- </template>
- <script>
- import {getDetailByIdApi,updateDoctor} from '@/api/doctor';
- export default {
- data() {
- return {
- oldPassword: "",
- password: "",
- }
- },
- methods: {
- submit() {
- let oldPassword = (this.oldPassword).trim();
- let password = (this.password).trim();
- if (oldPassword.length < 1) {
- uni.showToast({
- title: '请填写旧密码',
- icon: "error"
- })
- return;
- }
- if (password.length < 1) {
- uni.showToast({
- title: '请填写新密码',
- icon: "error"
- })
- return;
- }
- uni.showToast({
- title:'修改成功',
- complete() {
- uni.reLaunch({
- url:'/pages/login/index'
- })
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .content {
- .head {
- font-size: 50upx;
- text-align: center;
- padding: 40upx 0;
- letter-spacing: 2upx;
- }
- .updatePassword-wrap {
- margin: 100upx auto 0;
- box-sizing: border-box;
- padding: 20upx 30upx;
- border-radius: 8upx;
- .item {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- height: 90upx;
- font-size: 32upx;
- line-height: 90upx;
- background-color: #fff;
- border-radius: 50upx;
- padding: 0 20upx;
- .input{
- width: 520upx;
- border: none;
- }
- &.password {
- margin-top: 40upx;
- }
- }
- .tip {
- text-align: right;
- padding: 18upx 0;
- font-size: 28upx;
- }
- .submit-BT {
- border-radius: 16upx;
- margin-top: 100upx;
- background-color: var(--sysblue);
- }
- }
- }
- </style>
|