杨磊
2024-06-12 6883273d129818daf945e9e6a36fc3a287a90b49
src/pages/changePassword/changePassword.vue
@@ -30,21 +30,24 @@
            justify-content: space-between;
            margin-bottom: 0.47rem;
            align-items: center;
            padding-top: 0.6rem;
          "
        >
          <!-- <view  style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">用户注册</view> -->
          <view class="LoginBg"></view>
          <view
            @click="BacktoLogin"
            style="
              cursor: pointer;
              font-size: 0.14rem;
              color: #244a7b;
              font-weight: normal;
              position: absolute;
              left: 0.1rem;
              top: 0.1rem;
            "
          >
            返回
            < 返回
          </view>
        </view>
        <el-form
@@ -264,12 +267,8 @@
    this.getElementWidth();
  },
  methods: {
    // 返回登录
    BacktoLogin() {
      // uni.redirectTo({
      //    url: '/pages/Login/Login'
      // })
      uni.navigateBack();
      this.$router.go(-1);
    },
    getElementWidth() {
      this.$nextTick(() => {
@@ -278,26 +277,25 @@
      });
    },
    // 忘记密码
    async Login2(formName) {
    Login2(formName) {
      let Obj = {
        username: this.amendDataPass.loginID,
        password: encryptAES(this.amendDataPass.rawPass),
        newPassword: encryptAES(this.amendDataPass.newPass)
      };
      this.$refs[formName].validate(async (valid) => {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          // alert('submit!成功');
          getchangePassword(Obj).then((res) => {
            if (res.success == true) {
              this.$message.success('修改成功');
              uni.navigateBack();
              uni.navigateTo({
                url: "/pages/Login/Login"
              });
            } else {
              this.$message.error(res.errorText);
            }
          });
          // uni.redirectTo({ encryptAES
          //    url: '/pages/Login/Login'
          // })
        } else {
          console.log("error submit!!失败");
          return false;