qinyan 1 year ago
parent
commit
9f222d50d0

+ 35 - 23
src/pages/index/index.vue

@@ -11,23 +11,26 @@
             ></image>
             <view class="card_suffix" @click.stop="">
               <view class="card-num-view">
-                <image class="icon_view" src="/static/browse.svg"></image>
+                <image class="icon_view" src="/static/icons/browse.svg"></image>
                 <text>{{ item.views }} </text>
               </view>
             </view>
           </view>
 
-          <view class="card-bottm flex items-center">
-            <view class="card-bottm-main">
+          <view class="card-bottom flex items-center">
+            <view class="card-bottom-main">
               <view class="flex-1">
                 <text class="card-title">{{ item.title }}</text>
               </view>
               <text class="card_time">{{ formatTime(item.updateTime) }}</text>
             </view>
-            <view class="card_data_text" @click="goDataPage(item)">
-              <image class="icon_data" src="/static/data-view.svg"></image>
+            <view class="card-bottom-icon" @click="goDataPage(item)">
+              <image class="icon" src="/static/icons/data-view.svg"></image>
             </view>
-            <view>
+            <view class="card-bottom-icon" @click="copyLink(item)">
+              <image class="icon" src="/static/icons/link.svg"></image>
+            </view>
+            <view class="card-bottom-icon">
               <button
                 :data-record="item"
                 open-type="share"
@@ -135,6 +138,18 @@ export default {
         url: "/pages/index/data?id=" + data._id,
       });
     },
+    copyLink(record) {
+      const url = `https://show.3dqueen.cloud/share.html?id=${record._id}`;
+      uni.setClipboardData({
+        data: url,
+        success: function () {
+          uni.showToast({
+            title: "链接已复制",
+            icon: "success",
+          });
+        },
+      });
+    },
   },
 };
 </script>
@@ -167,18 +182,7 @@ export default {
   align-items: center;
   justify-content: center;
 }
-.card_data_text {
-  display: inline-block;
-  margin-right: 30rpx;
-  border-radius: 4rpx;
-  padding: 2rpx 10rpx;
-}
-.icon_data {
-  width: 36rpx;
-  height: 36rpx;
-  padding: 10rpx;
-  line-height: 1;
-}
+
 .card-num-view {
   display: inline-flex;
   align-items: center;
@@ -197,13 +201,13 @@ export default {
   color: #fff;
   margin-right: 6rpx;
 }
-.card-bottm {
+.card-bottom {
   padding: 14rpx 20rpx;
 }
-.card-bottm-main {
+.card-bottom-main {
   flex: 1;
   overflow: hidden;
-  margin-right: 50rpx;
+  margin-right: 20rpx;
 }
 
 .card-title {
@@ -221,11 +225,19 @@ export default {
   font-size: 24rpx;
   color: #999;
 }
+.card-bottom-icon {
+  margin-left: 20rpx;
+}
+.icon {
+  width: 36rpx;
+  height: 36rpx;
+  padding: 10rpx;
+  line-height: 1;
+}
 .card-share-view {
-  /* margin-right: 20rpx; */
   padding: 10rpx;
   color: #41969c !important;
-  font-size: 36upx !important;
+  font-size: 36rpx !important;
   font-family: texticons;
   line-height: 1 !important;
 }

+ 0 - 1
src/static/data-view.svg

@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1689243442086" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7832" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M85.312 938.688H1024V1024H0V0h85.312v938.688zM256 341.312h85.312V768H256V341.312zM512 128h85.312v640H512V128z m256 213.312h85.312V768H768V341.312z" fill="#41969c" p-id="7833"></path></svg>

+ 1 - 2
src/static/browse.svg → src/static/icons/browse.svg

@@ -1,6 +1,5 @@
 <?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1689242050283"
-    class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="892"
+<svg t="1689242050283" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="892"
     xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64">
     <path
         d="M512 836.266667C230.4 836.266667 74.666667 533.333333 68.266667 520.533333c-4.266667-8.533333-4.266667-19.2 0-29.866666 6.4-12.8 164.266667-315.733333 443.733333-315.733334 281.6 0 437.333333 305.066667 443.733333 317.866667 4.266667 8.533333 4.266667 19.2 0 29.866667-6.4 10.666667-162.133333 313.6-443.733333 313.6zM132.266667 505.6c34.133333 57.6 170.666667 266.666667 379.733333 266.666667s345.6-209.066667 379.733333-266.666667c-34.133333-57.6-170.666667-266.666667-379.733333-266.666667S166.4 448 132.266667 505.6z"

+ 7 - 0
src/static/icons/data-view.svg

@@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="no"?>
+<svg t="1689243442086" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7832"
+    xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64">
+    <path
+        d="M85.312 938.688H1024V1024H0V0h85.312v938.688zM256 341.312h85.312V768H256V341.312zM512 128h85.312v640H512V128z m256 213.312h85.312V768H768V341.312z"
+        fill="#41969c" p-id="7833"></path>
+</svg>

+ 7 - 0
src/static/icons/link.svg

@@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="no"?>
+<svg t="1689576376867" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="922"
+    xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64">
+    <path
+        d="M579.14 662.226c-55.51 0-111.019-21.132-153.283-63.397-11.479-11.478-11.479-30.139 0-41.617 11.478-11.479 30.138-11.479 41.617 0 61.572 61.572 161.701 61.572 223.274 0L904.78 343.18c61.572-61.573 61.572-161.701 0-223.274-61.573-61.572-161.702-61.572-223.274 0L500.909 300.503c-11.478 11.479-30.139 11.479-41.617 0-11.479-11.479-11.479-30.139 0-41.617L639.889 78.289c84.53-84.53 222.037-84.53 306.508 0 84.47 84.53 84.53 222.037 0 306.508L732.365 598.83c-42.265 42.265-97.774 63.397-153.284 63.397h0.06z m-353.188 353.189c-55.51 0-111.019-21.133-153.283-63.398-84.53-84.53-84.53-222.037 0-306.508L286.7 431.477c84.53-84.53 222.037-84.53 306.508 0 11.479 11.479 11.479 30.139 0 41.617-11.479 11.479-30.139 11.479-41.617 0-61.573-61.572-161.702-61.572-223.274 0L114.286 687.126c-61.573 61.573-61.573 161.702 0 223.274 61.572 61.572 161.701 61.572 223.274 0l180.596-180.597c11.48-11.478 30.14-11.478 41.618 0 11.478 11.479 11.478 30.139 0 41.617L379.177 952.017c-42.265 42.265-97.774 63.398-153.284 63.398h0.06z"
+        fill="#41969c" p-id="923"></path>
+</svg>