1
PC-20250623MANY\Administrator
2025-08-09 47d2e74ddff53a4865cb98f893ec623a60d2b5fb
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;
          }
        });
    }