DESKTOP-CVS3R96\我恁爹
2022-11-15 d8f6c671a613b841566c8d7b1f36eb2bb9640ea9
src/page/newUser/index.vue
@@ -28,7 +28,7 @@
      </div>
      <div class="center_card">
        <div class="keyon">
          <span>{{ '总资产' }}</span>
          <span>{{ $t('hj49') }}</span>
        </div>
        <div class="num_price" v-if="userInfo.length == 0">
          ¥0
@@ -47,29 +47,33 @@
            }}22
          </p>
          <p v-else-if="!this.$store.state.settingForm.indexDisplay && !this.$store.state.settingForm.futuresDisplay"
            class="account">¥&nbsp;&nbsp;{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt).toFixed(2) }}</p>
            class="account">¥&nbsp;&nbsp;{{ $store.state.hide ? '****' :
                Number($store.state.userInfo.userAmt).toFixed(2)
            }}</p>
        </div>
        <div class="yk es">
          <div>
            <span>{{ '冻结保证金' }}</span>
            <span>{{ $t('hj55') }}</span>
          </div>
          <div>
            <span>{{ '盈亏' }}</span>
            <span>{{ $t('hj141') }}</span>
          </div>
          <div>
            <span>{{ '可用余额(¥)' }}</span>
            <span>{{ $t('hj48') }}</span>
          </div>
        </div>
        <div class="yk as">
          <div>
            <span class="orenge">¥ {{ userInfo.length != 0 ? $store.state.userInfo.allFreezAmt + $store.state.userInfo.djzj : 0}}</span>
            <span class="orenge">¥ {{ userInfo.length != 0 ? $store.state.userInfo.allFreezAmt +
                $store.state.userInfo.djzj : 0
            }}</span>
          </div>
          <div v-if="userInfo.length == 0">
            <span v-if="!selectUserFlag">
              <span>{{ '¥ 0' }}</span>
            </span>
            <span v-else >
            <span v-else>
              <span>{{ '¥ 0' }}</span>
            </span>
          </div>
@@ -87,7 +91,7 @@
                }}</span>
            </span>
          </div>
          <div v-if="userInfo.length == 0">
            <span class="bzz" v-if="!selectUserFlag">{{ '¥ 0' }}</span>
            <span class="bzz" v-else>{{ '¥ 0' }}</span>
@@ -96,10 +100,10 @@
            <span class="bzz" v-if="!selectUserFlag">{{ '¥ ' + $store.state.userInfo.userIndexAmt }}</span>
            <span class="bzz" v-else>{{ '¥ ' + $store.state.userInfo.userAmt }}</span>
          </div>
        </div>
        <div class="btns" @click="handleZh()" :class="selectUserFlag ? '' : 'active'">
          <span>{{ selectUserFlag ? '切换指数账户' : '切换沪深账户' }}</span>
          <span>{{ selectUserFlag ? $t('hj142') : $t('hj143') }}</span>
        </div>
      </div>
      <div class="jy" @click="goToSettings()">
@@ -108,7 +112,7 @@
            <img src="../../assets/img/xiugaimima.png" alt />
          </div>
          <div class="r_title">
            <span>{{ '修改密码' }}</span>
            <span>{{ $t('hj144') }}</span>
          </div>
        </div>
        <div class="right_gos">
@@ -121,7 +125,7 @@
            <img src="../../assets/img/huazhuan2.png" alt />
          </div>
          <div class="r_title">
            <span>{{ '资金划转' }}</span>
            <span>{{ $t('hj145') }}</span>
          </div>
        </div>
        <div class="right_gos">
@@ -134,7 +138,7 @@
            <img src="../../assets/img/shiming.png" alt />
          </div>
          <div class="r_title">
            <span>{{ '实名认证' }}</span>
            <span>{{ $t('hj146') }}</span>
          </div>
        </div>
        <div class="right_gos">
@@ -147,7 +151,7 @@
            <img src="../../assets/img/shiming.png" alt />
          </div>
          <div class="r_title">
            <span>{{ '绑定银行卡' }}</span>
            <span>{{ $t('hj147') }}</span>
          </div>
        </div>
        <div class="right_gos">
@@ -160,7 +164,7 @@
            <img src="../../assets/img/out2.png" alt />
          </div>
          <div class="r_title">
            <span>{{ '退出登录' }}</span>
            <span>{{ $t('hj148') }}</span>
          </div>
        </div>
        <div class="right_gos">
@@ -172,7 +176,7 @@
      <div class="setting_content">
        <div class="old_password">
          <div class="left_titles">
            <span>{{ '旧密码:' }}</span>
            <span>{{ $t('hj150') + ':' }}</span>
          </div>
          <div class="right_password_input">
            <input type="password" v-model="oldPassword" />
@@ -180,7 +184,7 @@
        </div>
        <div class="old_password">
          <div class="left_titles">
            <span>{{ '新密码:' }}</span>
            <span>{{ $t('hj151') + ':' }}</span>
          </div>
          <div class="right_password_input">
            <input type="password" v-model="newPassword" />
@@ -188,14 +192,14 @@
        </div>
        <div class="old_password">
          <div class="left_titles">
            <span>{{ '确认新密码:' }}</span>
            <span>{{ $t('hj152') + ':' }}</span>
          </div>
          <div class="right_password_input">
            <input type="password" v-model="cirNewPassword" />
          </div>
        </div>
        <div class="btn_setting" @click="changeLoginPsd()">
          <span>{{ '确认修改' }}</span>
          <span>{{ $t('hj153') }}</span>
        </div>
      </div>
    </van-popup>
@@ -207,7 +211,7 @@
import * as api from "@/axios/api";
import { Toast } from "mint-ui";
import { isNull, pwdReg } from "@/utils/utils";
import i18n from '@/locales';
import { MessageBox } from 'mint-ui'
export default {
@@ -233,9 +237,9 @@
  methods: {
    goOnline() {
      if (navigator.vibrate) {
          // 支持
          navigator.vibrate([55]);
        }
        // 支持
        navigator.vibrate([55]);
      }
      window.location.href = this.onlineService;
    },
    async getInfoSite() {
@@ -255,15 +259,15 @@
    },
    handleZh() {
      this.selectUserFlag = !this.selectUserFlag;
      if (this.userInfo.length == 0) {
        this.$store.commit('dialogVisible', true);
        return;
      }
      if (navigator.vibrate) {
          // 支持
          navigator.vibrate([55]);
        }
        // 支持
        navigator.vibrate([55]);
      }
    },
    async getUserInfo() {
      // 获取用户信息
@@ -283,14 +287,21 @@
        return;
      }
      if (navigator.vibrate) {
          // 支持
          navigator.vibrate([55]);
        }
        // 支持
        navigator.vibrate([55]);
      }
      this.$router.push("/wallet");
    },
    handleOutLoginClick() {
      // 退出登录
      this.toRegister();
      MessageBox.confirm(this.$t('hj149') + '?',this.$t('hj165'), {
        confirmButtonText: this.$t('hj161'),
        cancelButtonText: this.$t('hj106'),
      }).then(() => {
        this.toRegister();
      }).catch(() => {
      });
    },
    goToSettings() {
      if (this.userInfo.length == 0) {
@@ -346,10 +357,10 @@
        isNull(this.newPassword) ||
        isNull(this.cirNewPassword)
      ) {
        Toast("请输入新旧密码");
        Toast(this.$t('hj154'));
        this.settingDialog = false;
      } else if (!pwdReg(this.newPassword)) {
        Toast("密码为6~12位,数字、字母或符号");
        Toast(this.$t('hj19'));
        this.settingDialog = false;
      } else {
        // 修改密码
@@ -368,14 +379,14 @@
            this.settingDialog = false;
          }
        } else {
          Toast("新密码不一致");
          Toast(this.$t('hj155'));
          this.settingDialog = false;
        }
      }
      if (navigator.vibrate) {
          // 支持
          navigator.vibrate([55]);
        }
        // 支持
        navigator.vibrate([55]);
      }
    }
  }
};
@@ -383,11 +394,13 @@
<style scoped lang="less">
.green {
    color: #028f52 !important;
  color: #028f52 !important;
}
.red{
.red {
  color: #b60c0d !important;
}
.user_page {
  width: 100%;
  height: calc(100% - 1.3rem);
@@ -528,10 +541,11 @@
        }
      }
      .account{
      .account {
        font-size: 0.6rem;
        font-weight: 600;
      }
      .yk {
        width: 100%;
        height: 0.5rem;
@@ -547,7 +561,8 @@
          align-items: center;
          justify-content: center;
        }
        .orenge{
        .orenge {
          // color: rgb(216, 141, 1) !important;
        }
      }