lxf
2025-04-23 92dd4aaaa7fb67c4d65df18e0e69cbc6775575d3
src/page/kline/index.vue
@@ -9,7 +9,10 @@
            </div>
            <div class="right_title">
              <div class="t_t" style="white-space: nowrap">
                <span>{{ singDetails.name }}({{ singDetails.gid }})</span>
                <span v-if="singDetails.gid"
                  >{{ singDetails.name }}({{ singDetails.gid }})</span
                >
                <span v-else>{{ singDetails.name }}</span>
              </div>
              <div class="b_t">
                <span>{{ singDetails.spell }}</span>
@@ -110,7 +113,7 @@
              </div>
            </div>
          </div>
          <div class="right_ets">
          <div class="right_ets" v-if="kLineDetails.type != 'HJ'">
            <div class="tops">
              <div class="lefts topes">
                <span class="titles">{{ $t("hj72") }}</span>
@@ -414,7 +417,7 @@
      <!-- <div class="border_bottom"></div> -->
    </div>
    <div class="btns">
      <div class="lefts">
      <div class="lefts" v-if="kLineDetails.type != 'HJ'">
        <div class="left_ca" @click="option()">
          <img
            src="../../assets/img/meishoucang.png"
@@ -436,7 +439,11 @@
            <span>₹{{ singDetails.nowPrice  }}</span>
          </div>
        </div>
        <div class="sell_btn" @click="goBuy(1)">
        <div
          class="sell_btn"
          @click="goBuy(1)"
          v-if="kLineDetails.type != 'HJ'"
        >
          <div class="top_sell">
            <span>{{ $t("hj85") }}</span>
          </div>
@@ -471,11 +478,11 @@
      newsdetailList: [],
      bayType: "",
      timer: null,
      key:0,
      key: 0
    };
  },
  components: {
    Kline,
    Kline
  },
  created() {
@@ -502,7 +509,7 @@
  // },
  methods: {
    async getHknews() {
      await api.queryIndexNews().then((res) => {
      await api.queryIndexNews().then(res => {
        if (res.status === 0) {
          this.newsdetailList = res.data.data;
        }
@@ -524,13 +531,13 @@
          this.optionBtn = false;
          this.$message({
            message: this.$t("hj97"),
            type: "success",
            type: "success"
          });
        } else {
          this.optionBtn = false;
          this.$message({
            message: data.msg,
            type: "warning",
            type: "warning"
          });
        }
      } else {
@@ -540,12 +547,12 @@
          this.optionBtn = false;
          this.$message({
            message: this.$t("hj96"),
            type: "success",
            type: "success"
          });
        } else {
          this.$message({
            message: data.msg,
            type: "warning",
            type: "warning"
          });
          this.optionBtn = false;
        }
@@ -569,7 +576,7 @@
    },
    async getOpation() {
      let opts = {
        code: this.$route.query.code,
        code: this.$route.query.code
      };
      let data = await api.isOption(opts);
      if (data.status === 0) {
@@ -581,10 +588,10 @@
    },
    async getSingDetails() {
      let opts = {
        code: this.kLineDetails.code,
        stockType: this.kLineDetails.type,
        code: this.kLineDetails.code || this.kLineDetails.name,
        stockType: this.kLineDetails.type
      };
      await api.getSingleStock(opts).then((res) => {
      await api.getSingleStock(opts).then(res => {
        if (res.status === 0) {
          this.singDetails = res.data.stock;
          this.bayType = res.data.stock.type;
@@ -595,8 +602,9 @@
            this.jianjie = res.data.indexintroduction;
          }
          const obj = {
            pid: res.data.stock.code,
            type: res.data.stock.type,
            pid: res.data.stock.code || "8888",
            type: res.data.stock.type || this.kLineDetails.type,
            name: res.data.stock.name || this.kLineDetails.name
          };
          window.localStorage.setItem("kLine", JSON.stringify(obj));
          // console.log(this.singDetails)
@@ -614,9 +622,9 @@
    async getSingDetailUs() {
      let opts = {
        code: this.kLineDetails.code,
        stockType: this.kLineDetails.type,
        stockType: this.kLineDetails.type
      };
      await api.getUsDetail(opts).then((res) => {
      await api.getUsDetail(opts).then(res => {
        // console.log(res,1111123);
        // var that = this
        // if(!res){
@@ -660,8 +668,8 @@
      this.$router.push({
        path: "/newPage",
        query: {
          listid: item.id,
        },
          listid: item.id
        }
      });
    },
    goBuy(index) {
@@ -678,14 +686,14 @@
          spell: this.singDetails.spell,
          if_us: this.kLineDetails.if_us,
          bayType: this.bayType,
          gid: this.singDetails.gid,
        },
          gid: this.singDetails.gid
        }
      });
      if (navigator.vibrate) {
        // 支持
        navigator.vibrate([55]);
      }
    },
    }
  },
  filters: {
    getName(spell) {
@@ -747,8 +755,8 @@
        .replace(/年|月/g, "-")
        .replace(/日/g, " ");
      return beijingDatetime; // 2017-03-31 16:02:06
    },
  },
    }
  }
};
</script>