From f36e617e9e534a4b05f2029724d678bbd6c655b3 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期三, 22 十二月 2021 11:38:54 +0800 Subject: [PATCH] refactor: separate api/consultant.ts into serveral services --- PAMapp/pages/accountSetting/index.vue | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PAMapp/pages/accountSetting/index.vue b/PAMapp/pages/accountSetting/index.vue index e1c8058..33ecd55 100644 --- a/PAMapp/pages/accountSetting/index.vue +++ b/PAMapp/pages/accountSetting/index.vue @@ -70,8 +70,9 @@ <script lang="ts"> import { Vue,Component } from 'vue-property-decorator' -import { getUserAccountSetting, updateAccountSetting } from '~/shared/api/consultant'; import { UserSetting } from '~/shared/models/account.model'; + +import accountSettingService from '~/shared/services/account-setting.service'; @Component export default class AccountSetting extends Vue { @@ -139,7 +140,7 @@ phone: this.phoneValue, email: this.emailValue } - updateAccountSetting(editSettingInfo).then((res: any) => { + accountSettingService.updateAccountSetting(editSettingInfo).then((res: any) => { console.log('updateRes:', res); this.resetSettingForm(); }); @@ -153,7 +154,7 @@ } mounted(){ - getUserAccountSetting().then((userInfo: UserSetting)=>{ + accountSettingService.getUserAccountSetting().then((userInfo: UserSetting)=>{ this._userSetting = { name: userInfo.name || '', phone: userInfo.phone || '', -- Gitblit v1.8.0