Преглед на файлове

没有热点的时候显示暂无热点

shaogen1995 преди 3 години
родител
ревизия
2a4a6711ef

+ 10 - 1
web/src/views/gui/compomemt/hotspot.vue

@@ -2,7 +2,8 @@
   <div class="hotspot" :class="{ full: smBtn }">
     <div class="top">热点列表</div>
     <div class="main">
-      <div class="txt">
+      <div class="txtNone" v-if="data.length===0">暂无热点</div>
+      <div class="txt" v-else>
         <span
           :class="{ active: hotInd === index }"
           @click="openHot(item, index)"
@@ -84,6 +85,14 @@ export default {
     width: 100%;
     height: calc(100% - 100px);
     background-color: rgba(255, 246, 210, 1);
+    .txtNone{
+      height: 90%;
+      color: #7e522f;
+      font-size: 24px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
     .txt {
       padding: 20px;
       height: 90%;

+ 2 - 5
web/src/views/gui/compomemt/share.vue

@@ -36,7 +36,7 @@ export default {
     //点击复制链接
     copyPcTxt() {
       // 存储传递过来的数据
-      let OrderNumber = "9999999999";
+      let OrderNumber = window.location.href;
       // 创建一个input 元素
       // createElement() 方法通过指定名称创建一个元素
       let newInput = document.createElement("input");
@@ -53,10 +53,7 @@ export default {
       // 清空输入框
       newInput.remove();
       // 下面是element的弹窗 不需要的自行删除就好
-      this.$message({
-        message: "复制成功",
-        type: "success",
-      });
+      alert("复制成功")
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 12 - 1
webM/src/views/gui/component/hotspot.vue

@@ -1,7 +1,9 @@
 <template>
   <div class="hotspot">
     <div class="main">
-      <div class="mainBox">
+      <div class="txtNone" v-if="data.length === 0">暂无热点</div>
+
+      <div class="mainBox" v-else>
         <div
           v-for="(item, index) in data"
           :key="index"
@@ -80,6 +82,15 @@ export default {
     background-color: #fff6d2;
     width: 100%;
     height: calc(100% - 60px);
+    .txtNone {
+      color: #774926;
+      width: 100%;
+      height: 100%;
+      font-size: 24px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
     .mainBox::-webkit-scrollbar {
       width: 4px;
     }

+ 2 - 5
webM/src/views/gui/component/share.vue

@@ -30,7 +30,7 @@ export default {
     //点击复制链接
     copyPcTxt() {
       // 存储传递过来的数据
-      let OrderNumber = "9999999999";
+      let OrderNumber = window.location.href;
       // 创建一个input 元素
       // createElement() 方法通过指定名称创建一个元素
       let newInput = document.createElement("input");
@@ -47,10 +47,7 @@ export default {
       // 清空输入框
       newInput.remove();
       // 下面是element的弹窗 不需要的自行删除就好
-      this.$message({
-        message: "复制成功",
-        type: "success",
-      });
+      alert('复制成功')
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)