2
PC-20250623MANY\Administrator
2025-09-15 0f6b38dfdfe93a1d630d984417af2fbb03c7e0ff
src/mixins/myMixin.js
@@ -2,8 +2,9 @@
export const myMixin = {
  data() {
    return {
      utm: 1, // US转MX汇率
      mtu: 1 // MX转US汇率
      htu: 1, // HK转US汇率
      itu: 1, // IN转US汇率
      ttu: 1 // TW转US汇率
    };
  },
  created() {
@@ -15,10 +16,18 @@
      let data = await api.getRateInfo();
      data.data &&
        data.data.forEach(item => {
          if (item.currency === "USD") {
            this.utm = item.rata;
          } else if (item.currency === "MXN") {
            this.mtu = item.rata;
          if (item.currency === "HKD" && item.conversionCurrency == "USD") {
            this.htu = item.rata;
          } else if (
            item.currency === "INR" &&
            item.conversionCurrency == "USD"
          ) {
            this.itu = item.rata;
          } else if (
            item.currency === "TWD" &&
            item.conversionCurrency == "USD"
          ) {
            this.ttu = item.rata;
          }
        });
    }