111
jhzh
2025-02-11 9f96348fb4f2d0442303aafefb5e9ca39ea85663
src/page/newUser/index.vue
@@ -14,7 +14,7 @@
              {{ userInfo.realName }}
            </div>
            <div class="top_box_top" style="margin-top: 2px">
              ID:{{ userInfo.id }}
              ID:{{ userInfo.phone }}
            </div>
          </div>
        </div>
@@ -27,42 +27,31 @@
      <div class="content-box">
        <van-row class="van-row-box">
          <van-col span="24">
          <van-col span="20">
            <div class="content-all">
              <span>{{ $t("賬戶總資產") }}(USD)</span>
              <span>{{ $t("賬戶總資產") }}({{ $USD }})</span>
              <i @click="xy = !xy" class="iconfont xy">&#xe8c7;</i>
            </div>
            <div class="number-all">
              <showHide :text="asstesAll" :flg="xy" />
            </div>
          </van-col>
          <van-col span="4" style="display: flex; justify-content: flex-end">
            <van-icon
              @click="$router.push('/rechargelist')"
              name="orders-o"
              size="20"
            />
          </van-col>
        </van-row>
        <van-row style="margin-top: 18px">
          <div
            class="van-col van-col--12"
            style="margin-top: 10px"
            v-for="item in listAsstes"
            :key="item.accectType"
          >
            <div class="content-title DINPro">
              {{ item.title3 }}
              ({{ item.symbolCode }})
            </div>
            <div>
              <div class="DINPro" style="font-size: 18px">
                <showHide :text="item.availableBalance" :flg="xy" />
              </div>
            </div>
          </div>
        </van-row>
        <van-row style="margin-top: 16px">
          <van-col span="8" style="display: flex; justify-content: center">
            <van-button
              @click="$router.push('/recharge')"
              class="btn-two"
              type="primary"
              >{{ $t("hj172") }}</van-button
            >
            <!-- @click="$router.push('/recharge')" -->
            <!-- @click="kefu" -->
            <van-button @click="kefu" class="btn-two" type="primary">
              {{ $t("hj172") }}
            </van-button>
          </van-col>
          <van-col span="8" style="display: flex; justify-content: center">
            <van-button
@@ -72,16 +61,50 @@
              >{{ $t("提款") }}</van-button
            >
          </van-col>
          <!-- transferIndex -->
          <!-- <van-col span="8" style="display: flex; justify-content: center">
          <van-col span="8" style="display: flex; justify-content: center">
            <van-button
              @click="$router.push('/transferIndex')"
              @click="leverShow = true"
              class="btn-two"
              type="default"
              >{{ $t("hj245") }}</van-button
            >
          </van-col> -->
              {{ $t("申请杠杠") }}
            </van-button>
          </van-col>
        </van-row>
        <van-dialog
          v-model="leverShow"
          :title="$t('申请杠杠')"
          show-cancel-button
          :cancelButtonText="$t('取消')"
          :confirmButtonText="$t('确认')"
          @confirm="confirmLever"
        >
          <van-radio-group v-model="radio">
            <van-cell-group>
              <van-cell title="1X" clickable @click="radio = '1'">
                <template #right-icon>
                  <van-radio name="1" />
                </template>
              </van-cell>
              <van-cell title="2X" clickable @click="radio = '2'">
                <template #right-icon>
                  <van-radio name="2" />
                </template>
              </van-cell>
              <van-cell title="5X" clickable @click="radio = '5'">
                <template #right-icon>
                  <van-radio name="5" />
                </template>
              </van-cell>
              <van-cell title="10X" clickable @click="radio = '10'">
                <template #right-icon>
                  <van-radio name="10" />
                </template>
              </van-cell>
            </van-cell-group>
          </van-radio-group>
        </van-dialog>
      </div>
      <div class="content-list-box">
        <div class="divider div-shrink"></div>
@@ -105,11 +128,12 @@
                </div>
                <div class="li-USDT">
                  <div class="DINPro">
                    {{ item.symbol }} {{ item.availableBalance || "0.00" }}
                    {{ item.symbol }}
                    {{ item.availableBalance | _toLocaleString }}
                  </div>
                  <div class="DINPro">
                  <!-- <div class="DINPro">
                    ≈ $ {{ item.availableBalanceUSD || "0.00" }}
                  </div>
                  </div> -->
                </div>
              </li>
              <li>
@@ -118,16 +142,70 @@
                </div>
                <div class="li-USDT">
                  <div class="DINPro">
                    {{ item.symbol }} {{ item.freezeMoney || "0.00" }}
                    {{ item.symbol }}
                    {{ item.freezeMoney | _toLocaleString }}
                  </div>
                  <div class="DINPro">≈ $ {{ item.freezeMoney || "0.00" }}</div>
                  <!-- <div class="DINPro">≈ $ {{ item.freezeMoney || "0.00" }}</div> -->
                </div>
              </li>
              <li>
                <div class="li-title">
                  {{ $t("待补金额") }}({{ item.symbolCode }})
                </div>
                <div class="li-USDT">
                  <div class="DINPro">
                    {{ item.symbol }}
                    {{ item.amountToBeCovered | _toLocaleString }}
                  </div>
                  <!-- <div class="DINPro">≈ $ {{ item.freezeMoney || "0.00" }}</div> -->
                </div>
              </li>
            </ul>
          </van-tab>
        </van-tabs>
      <!--  <div class="path" >
          <div class="path_box" v-for="(item,index) in iconlist" :key="index" @click="nato(item.path)">
            <div class="path_img">
              <img alt :src="item.icon"/>
            </div>
            <div class="path_txt">{{item.title}}</div>
          </div>
        </div> -->
      </div>
    </div>
    <Language ref="language" @onChange="onChange" />
    <van-popup v-model="settingDialog" position="bottom" :style="{ height: '40%' }">
      <div class="setting_content">
        <div class="old_password">
          <div class="left_titles">
            <span>{{ $t("hj150") + ":" }}</span>
          </div>
          <div class="right_password_input">
            <input type="password" v-model="oldPassword" />
          </div>
        </div>
        <div class="old_password">
          <div class="left_titles">
            <span>{{ $t("hj151") + ":" }}</span>
          </div>
          <div class="right_password_input">
            <input type="password" v-model="newPassword" />
          </div>
        </div>
        <div class="old_password">
          <div class="left_titles">
            <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>{{ $t("hj153") }}</span>
        </div>
      </div>
    </van-popup>
  </div>
</template>
@@ -137,11 +215,17 @@
import { isNull, pwdReg } from "@/utils/utils";
import showHide from "@/components/showHide";
import Vue from "vue";
import { Notify } from "vant";
import Language from "@/components/Language/index.vue";
export default {
  name: "newUser",
  components: { showHide },
  components: { showHide,Language },
  data() {
    return {
      pswDialog: false,
      leverShow: false,
      radio: "1",
      // 显示隐藏
      xy: true,
      listAsstes: [
@@ -166,6 +250,43 @@
      onlineService: "",
      moneyList: [],
      asstesAll: "0.00",
      iconlist:[{
        icon:require('../../assets/img/usericon.png'),
        path:'/bankCard1',
        title: this.$t("关于我们"),
      },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/banklist',
        title: this.$t("hj147"),
      },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/mm',
        title: this.$t("hj144"),
      },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/authentications',
        title: this.$t("hj146"),
      },
      // {
      //   icon:require('../../assets/img/usericon.png'),
      //   path:'/banklist',
      //   title: this.$t("ysmrz"),
      // },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/yy',
        title: this.$t("yy"),
      },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/tc',
        title: this.$t("hj148"),
      },
      ],
      language: "",
    };
  },
  created() {
@@ -174,9 +295,117 @@
    this.getInfoSite();
  },
  methods: {
    clicklang() {
      this.$refs.language.settingDialog = true;
    },
    onChange(e) {
      this.language = e;
      this.active = this.$t("印股資產")
      this.listAsstes=[
        {
          title: this.$t("印股資產"),
          title3: this.$t("印股總資產"),
          title1: this.$t("印股可用"),
          title2: this.$t("印股冻结"),
          accectType: "IN",
          symbolCode: "INR",
          symbol: "₹",
        },
      ]
      this.iconlist = [{
        icon:require('../../assets/img/usericon.png'),
        path:'/bankCard1',
        title: this.$t("关于我们"),
      },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/banklist',
        title: this.$t("hj147"),
      },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/mm',
        title: this.$t("hj144"),
      },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/authentications',
        title: 'KYC',
      },
      // {
      //   icon:require('../../assets/img/usericon.png'),
      //   path:'/banklist',
      //   title: this.$t("ysmrz"),
      // },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/yy',
        title: this.$t("yy"),
      },
      {
        icon:require('../../assets/img/usericon.png'),
        path:'/tc',
        title: this.$t("hj148"),
      },
      ]
    },
    nato(path){
      if(path=='/mm'){
        this.goToSettings()
      }else if (path=='/yy'){
        this.clicklang()
      }else if (path == '/tc'){
        this.handleOutLoginClick()
      }else{
        this.$router.push(path);
      }
    },
    async toRegister() {
      // 注销登陆
      window.localStorage.removeItem("USERTOKEN"); // 清空本地存储 USERTOKEN字段
      this.clearCookie();
      let data = await api.logout();
      if (data.status === 0) {
        // Toast(data.msg)
        this.undataToken(null);
        this.$router.push("/login");
      } else {
        Toast(data.msg);
      }
      this.$router.push("/login");
    },
    handleOutLoginClick() {
      // 退出登录
      MessageBox.confirm(this.$t("hj149"), this.$t(""), {
        confirmButtonText: this.$t("qr"),
        cancelButtonText: this.$t("hj106"),
      })
        .then(() => {
          this.toRegister();
        })
        .catch(() => {});
    },
    // 申请杠杠
    async confirmLever() {
      const res = await api.applyLever({ lever: this.radio });
      if (res.status === 0) {
        Notify({
          type: "success",
          message: this.$t("申请杠杠成功,请联系客服!"),
        });
      } else {
        Notify({ type: "warning", message: res.msg });
      }
    },
    kefu() {
      this.$store.commit("elAlertShow", {
          elAlertShow: true,
          elAlertText: this.$t("当前充值渠道已关闭请选择在线客服进行充值。")
        });
      // window.open(this.onlineService);
    },
    async getMoneyData() {
      let data = await api.getMoney();
      console.log(data);
      if (data.status === 0) {
        // 判断是否登录
        this.moneyList = data.data;
@@ -189,12 +418,13 @@
              Vue.set(items, "freezeMoneyUSD", item.freezeMoneyUSD);
              Vue.set(items, "symbol", item.symbol);
              Vue.set(items, "symbolCode", item.symbolCode);
              Vue.set(items, "amountToBeCovered", item.amountToBeCovered);
            }
          });
        });
        const arr = data.data.filter((item) => item.accectType === "ALL");
        this.asstesAll = arr[0].totalMoneyUSD;
        const arr = data.data.filter((item) => item.accectType === "IN");
        this.asstesAll = arr[0].totalMoney;
      }
    },
    tabsChange(e) {
@@ -307,17 +537,17 @@
      // }
      this.$router.push("/setting");
    },
    handleOutLoginClick() {
      // 退出登录
      MessageBox.confirm(this.$t("hj149") + "?", this.$t("hj165"), {
        confirmButtonText: this.$t("hj161"),
        cancelButtonText: this.$t("hj106"),
      })
        .then(() => {
          this.toRegister();
        })
        .catch(() => {});
    },
    // handleOutLoginClick() {
    //   // 退出登录
    //   MessageBox.confirm(this.$t(""), this.$t("hj165"), {
    //     confirmButtonText: this.$t("qr"),
    //     cancelButtonText: this.$t("hj106"),
    //   })
    //     .then(() => {
    //       this.toRegister();
    //     })
    //     .catch(() => {});
    // },
    goToSettings() {
      if (this.userInfo.length === 0) {
        this.$store.commit("dialogVisible", true);
@@ -415,6 +645,34 @@
</script>
<style scoped lang="less">
  .path_txt{
    text-align: center;
  }
  .path_img{
    img{
      width: 55px;
      height: 55px;
      margin-bottom: 10px;
    }
  }
  .path_box{
    width: 25%;
    display: flex;
    // justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-bottom: 20px;
  }
  .path{
    margin: 0 20px;
    margin-top: 20px;
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    border-radius: 12px;
    box-shadow:  2px 2px 8px 2px rgba(0, 0, 0, 0.2);
  }
/deep/ .van-button--primary {
  background-color: #0066ed;
}
@@ -469,6 +727,7 @@
      font-weight: 500;
      font-size: 0.37333rem;
      color: #2d2f3c;
      text-align: left;
    }
    .li-USDT {
      min-width: 180px;
@@ -975,4 +1234,4 @@
input[type="file"] {
  display: none !important;
}
</style>
</style>