1
zzzz
2024-04-24 2007ac8b95033bccbc7bc1e048e896757611e8f7
src/page/newUser/index.vue
@@ -27,50 +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="userInfo.totalAssets" :flg="xy" />
              <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--8" style="margin-top: 10px">
            <div class="content-title DINPro">{{ $t("美股總資產") }}(USD)</div>
            <div>
              <div class="DINPro" style="font-size: 18px">
                <showHide :text="userInfo.usTotalAssets" :flg="xy" />
              </div>
            </div>
          </div>
          <div class="van-col van-col--8" style="margin-top: 10px">
            <div class="content-title">{{ $t("馬股總資產") }}(USD)</div>
            <div>
              <div class="DINPro" style="font-size: 18px">
                <showHide :text="userInfo.masTotalAssets" :flg="xy" />
              </div>
            </div>
          </div>
          <div class="van-col van-col--8" style="margin-top: 10px">
            <div class="content-title">{{ $t("印股總資產") }}(USD)</div>
            <div>
              <div class="DINPro" style="font-size: 18px">
                <showHide :text="userInfo.masTotalAssets" :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
@@ -80,19 +61,50 @@
              >{{ $t("提款") }}</van-button
            >
          </van-col>
          <!-- transferIndex -->
          <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
            >
              {{ $t("申请杠杠") }}
            </van-button>
          </van-col>
          <!-- <van-col span="6" style="display: flex; justify-content: center">
            <van-button class="btn-two" type="default">資金明細</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>
@@ -110,17 +122,18 @@
            :name="item.title"
          >
            <ul class="money">
              <li>
              <li style="text-align: left">
                <div class="li-title">
                  {{ item.title1 }}({{ item.symbolCode }})
                </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>
@@ -129,9 +142,10 @@
                </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>
            </ul>
@@ -148,40 +162,29 @@
import { isNull, pwdReg } from "@/utils/utils";
import showHide from "@/components/showHide";
import Vue from "vue";
import { Notify } from "vant";
export default {
  name: "newUser",
  components: { showHide },
  data() {
    return {
      leverShow: false,
      radio: "1",
      // 显示隐藏
      xy: true,
      listAsstes: [
        {
          title: this.$t("美股資產"),
          title1: this.$t("美股可用"),
          title2: this.$t("美股冻结"),
          accectType: "US",
          symbol: "$",
          symbolCode: "USD",
        },
        {
          title: this.$t("印股資產"),
          title3: this.$t("印股總資產"),
          title1: this.$t("印股可用"),
          title2: this.$t("印股冻结"),
          accectType: "IN",
          symbol: "RM",
          symbolCode: "MYR",
        },
        {
          title: this.$t("馬股資產"),
          title1: this.$t("馬股可用"),
          title2: this.$t("馬股冻结"),
          accectType: "MAS",
          symbol: "RM",
          symbolCode: "MYR",
          symbolCode: "INR",
          symbol: "₹",
        },
      ],
      active: this.$t("美股資產"),
      active: this.$t("印股資產"),
      name: "",
      selectUserFlag: true,
      settingDialog: false,
@@ -191,6 +194,7 @@
      userInfo: [],
      onlineService: "",
      moneyList: [],
      asstesAll: "0.00",
    };
  },
  created() {
@@ -199,9 +203,23 @@
    this.getInfoSite();
  },
  methods: {
    // 申请杠杠
    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() {
      window.open(this.onlineService);
    },
    async getMoneyData() {
      let data = await api.getMoney();
      console.log(data);
      if (data.status === 0) {
        // 判断是否登录
        this.moneyList = data.data;
@@ -217,7 +235,9 @@
            }
          });
        });
        console.log(this.listAsstes);
        const arr = data.data.filter((item) => item.accectType === "ALL");
        this.asstesAll = arr[0].totalMoney;
      }
    },
    tabsChange(e) {
@@ -309,7 +329,7 @@
    },
    async getUserInfo() {
      // 获取用户信息
      let data = await api.getUserInfo();
      let data = await api.getUserInfodata();
      if (data.status === 0) {
        // 判断是否登录
        this.$store.commit("dialogVisible", false);
@@ -494,6 +514,8 @@
      color: #2d2f3c;
    }
    .li-USDT {
      min-width: 180px;
      text-align: right;
      font-style: normal;
      font-weight: 500;
      font-size: 0.37333rem;