819527061@qq.com
2024-03-12 18f648d976bfab6eef80e180babd9def32216ba9
pages/customer-page/customer-my/customer-my.vue
@@ -223,20 +223,10 @@
            return uni.getStorageSync('roleType');
         }
      },
      onShow() {
         this.init();
      },
      methods: {
         init() {
            this.getAllHuoDaiByCustomerId();
            this.getFleet();
            this.getUserEntity();
         },
         // 获取用户信息
         getUserEntity() {
            this.$reqGet('getUserEntity').then(res => {
               this.userEntity = res.data;
            });
         },
         // 获取货代列表
         getAllHuoDaiByCustomerId() {
@@ -384,51 +374,6 @@
            uni.navigateTo({
               url: `/pages/customer-page/fleet-management/fleet-management?id=${id}`
            });
         },
         updateInfo() {
            this.$reqPost('updateUser', this.userEntity, 'json').then(res => {
               uni.hideLoading()
               if (res.code == 0) {
                  uni.showToast({
                     title: '重置成功',
                     duration: 2000,
                     icon: 'success'
                  })
               } else {
                  this.$u.toast(res.msg ? res.msg : '修改失败');
               }
            }).catch(err => {
               this.$u.toast('修改失败');
            });
         },
         initPwd() {
            this.initPwdShow = true
         },
         initPwdConfirm() {
            this.initPwdShow = false
            uni.showLoading({
               title: '加载中'
            })
            this.userEntity.password = '123456'
            this.updateInfo()
         },
         initPwdCancel() {
            this.initPwdShow = false
         },
         modifyPwd() {
            this.modifyPwdShow = true
            this.passwordModified = ''
         },
         modifyPwdConfirm() {
            if (this.passwordModified.length === 0) {
               return this.$u.toast('密码不能为空')
            }
            this.modifyPwdShow = false
            this.userEntity.password = this.passwordModified
            this.updateInfo()
         },
         modifyPwdCancel() {
            this.modifyPwdShow = false
         },
         logout() {
            this.logoutShow = true;