Explorar o código

增加分享此店

shish hai 4 meses
pai
achega
81607b1797
Modificáronse 1 ficheiros con 107 adicións e 428 borrados
  1. 107 428
      hdApp/src/admin/home/workbench.vue

+ 107 - 428
hdApp/src/admin/home/workbench.vue

@@ -90,22 +90,25 @@
                     </view>
                     <view class="box_4 flex-col"></view>
                     <view class="box_9">
-                      <view class="tag_2" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})"> <text>挂账变动记录</text> </view>
+                      <view class="tag_2" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})"> <text>挂账变动</text> </view>
                       <view class="tag_2" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})"> <text>结账记录</text> </view>
-                      <view class="tag_2" style="position:relative;" @click="pageTo({url:'/pagesPurchase/shopping?ghsId='+ghsInfo.id+'&ghsName='+ghsInfo.name})"> 
-                        <text>买花记录</text> 
-                        
-                        <!-- 买花记录提示 -->
-                        <view class="inline-bought-tooltip-box" v-if="showBoughtTooltip && index === 0" @click.stop="closeBoughtTooltip">
-                          <view class="bought-tooltip-content">
-                            买花记录 请在这里查看
-                            <text class="close-tooltip-icon">×</text>
-                          </view>
-                          <view class="bought-tooltip-arrow"></view>
-                        </view>
+                      <view class="tag_2 tag_2--bought" @click.stop="pageTo({url:'/pagesPurchase/shopping?ghsId='+ghsInfo.id+'&ghsName='+ghsInfo.name})">
+                        <text>购买记录</text> 
+                      </view>
+                      <view class="tag_2" @click.stop="callUp(ghsInfo)" style="color:#09C567;border-color:#09C567;font-weight:bold;"> <text>联系我们</text> </view>
+                      <view class="tag_2 tag_2--share" style="color:#09C567;border-color:#09C567;font-weight:bold;position:relative;">
+                        <button open-type="share" :data-ghs="ghsInfo" style="position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;z-index:10;"></button>
+                        <text>分享此店</text>
+                      </view>
 
+                      <!-- 买花记录提示 -->
+                      <view class="inline-bought-tooltip-box" v-if="showBoughtTooltip && index === 0" @click.stop="closeBoughtTooltip">
+                        <view class="bought-tooltip-content">
+                          重要!购买记录请在这里查看,不在底部的订单里
+                          <text class="close-tooltip-icon">×</text>
+                        </view>
+                        <view class="bought-tooltip-arrow"></view>
                       </view>
-                      <view class="tag_2" @click.stop="callUp(ghsInfo)" style="color:green;font-weight:bold;"> <text>联系我们</text> </view>
                     </view>
                     <view class="box_6 flex-row" @click="settleAccounts(ghsInfo)" v-if="Number(ghsInfo.debtAmount)>0">
                       <view class="show_clear_area flex-row justify-between">
@@ -145,7 +148,9 @@
                     <block v-else>
                       <view class="button_6 flex-col" @click="fillCg(ghsInfo)"><text class="text_13">购买</text></view>
                     </block>
-                    <text style="position:absolute;left:677upx;top:17upx;color:#CCCCCC;" @click.stop="getMore(ghsInfo)">更多</text>
+                    <view class="more-btn" @click.stop="getMore(ghsInfo)">
+                      <text class="more-icon">⋯</text>
+                    </view>
                   </view>
               </view>
             </template>
@@ -271,7 +276,8 @@
     onShow () {
         this.unReadMsgNum = 0; // 重置未读消息数
         
-        this.showBoughtTooltip = !uni.getStorageSync('boughtTooltipClosed');
+        const isClosed = uni.getStorageSync('boughtTooltipClosed');
+        this.showBoughtTooltip = (isClosed !== true && isClosed !== 'true' && isClosed !== '1');
       
         this.init();
     
@@ -283,13 +289,30 @@
 
     },
     onShareAppMessage(res) {
-      return { title: "花掌柜,花店管家婆", desc: "", imageUrl: "", path: "admin/home/mall" }
+      if (res.from === 'button') {
+        let ghsInfo = res.target.dataset.ghs
+        let hdShopAdminId = this.loginInfo && this.loginInfo.shopAdminId ? this.loginInfo.shopAdminId : 0
+        let ghsShopAdminId = ghsInfo.shopAdminId || 0
+        let shopId = ghsInfo.shopId || 0
+        let fromGhsId = ghsInfo.id || 0
+        let fromCg = 0
+        
+        let path = `/pagesPurchase/ghsProduct?hdShopAdminId=${hdShopAdminId}&ghsShopAdminId=${ghsShopAdminId}&shopId=${shopId}&id=0&fromGhsId=${fromGhsId}&fromCg=${fromCg}`
+        
+        return {
+          title: ghsInfo.name,
+          desc: "",
+          path: path,
+          imageUrl: ghsInfo.avatar || ghsInfo.smallAvatar || ''
+        }
+      }
+      return { title: "花掌柜,花店管家婆", desc: "", imageUrl: "", path: "admin/home/workbench" }
     },
     methods: {
       closeBoughtTooltip() {
-      this.showBoughtTooltip = false;
-      uni.setStorageSync('boughtTooltipClosed', true);
-    },
+        this.showBoughtTooltip = false;
+        uni.setStorageSync('boughtTooltipClosed', '1');
+      },
     onChooseAvatar(e){
         if(this.loginInfo && this.loginInfo.staff && this.loginInfo.staff.founder != 2){
           this.$msg('门店LOGO请老板修改')
@@ -710,296 +733,6 @@
   };
   </script>
   <style lang="scss" scoped>
-  .app-content {
-    padding-bottom: 10upx;
-  }
-  .module-com {
-    margin-bottom: 37upx;
-    background-color: #fff;
-  }
-  
-  // 功能网格部分 - 删除
-  
-  
-  // 今日概况卡片 - 圆形气泡布局
-  .today-overview-card {
-    background: linear-gradient(to right, #1ba85e 0%, #22C55E 50%, #16A34A 100%);
-    padding: 0;
-    margin: 0 0 -20upx 0;
-    overflow: visible;
-    border-radius: 0;
-    padding-bottom: 40upx;
-    
-    .bubble-header {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      padding: 20upx 24upx 24upx;
-      
-      .bubble-title {
-        font-size: 36upx;
-        font-weight: 700;
-        color: #ffffff;
-        letter-spacing: 0.5upx;
-      }
-      
-      .message-btn {
-        position: relative;
-        width: 56upx;
-        height: 56upx;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        background: rgba(255, 255, 255, 0.2);
-        border-radius: 50%;
-        
-        .msg-icon {
-          font-size: 32upx;
-          line-height: 1;
-        }
-        
-        .red-mind {
-          position: absolute;
-          top: -8upx;
-          right: -8upx;
-          width: 40upx;
-          height: 40upx;
-          line-height: 36upx;
-          font-size: 24upx;
-          font-weight: 700;
-          text-align: center;
-          color: white;
-          background-color: #ff2842;
-          border: 2upx solid #ffffff;
-          border-radius: 50%;
-          display: flex;
-          align-items: center;
-          justify-content: center;
-        }
-      }
-    }
-    
-    .stat-grid {
-      display: flex;
-      justify-content: space-around;
-      align-items: center;
-      padding: 60upx 80upx 60upx;
-      width: 100%;
-      
-      .stat-item {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        justify-content: center;
-        flex: 1;
-        
-        .stat-label {
-          font-size: 26upx;
-          color: rgba(255, 255, 255, 0.8);
-          margin-bottom: 12upx;
-        }
-        
-        .stat-value {
-          font-size: 40upx;
-          font-weight: 700;
-          color: #ffffff;
-          line-height: 1;
-        }
-      }
-    }
-  }
-  // 消息
-  .news-wrap {
-    .news-list {
-      @include disFlex(center, space-between);
-      padding: 30upx 24upx 30upx 30upx;
-      border-bottom: 1px solid $borderColor;
-      font-size: 26upx;
-      color: $fontColor2;
-      &:active {
-        background-color: $backColor;
-      }
-      & > div {
-        @include disFlex(center, flex-start);
-      }
-      .news-left {
-        .iconfont {
-          color: $mainColor;
-          margin-right: 10upx;
-        }
-        .ling {
-          font-size: 28upx;
-        }
-        span{
-          font-size:29upx;
-        }
-      }
-      .news-right {
-        font-size: 26upx;
-        color: $mainColor;
-        transform: scale(0.9);
-        @include disFlex(flex-end, flex-start);
-        .iconfont {
-          font-size: 24upx;
-          margin-left: 10upx;
-          margin-bottom: 6upx;
-        }
-      }
-    }
-  }
-  // 数据总览模块
-  .overview-module {
-    background: #ffffff;
-    border-radius: 16upx;
-    padding: 0;
-    overflow: hidden;
-    
-    .overview-header {
-      background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
-      padding: 30upx 30upx 20upx;
-      border-bottom: 1upx solid #f0f0f0;
-      
-      .overview-title {
-        font-size: 32upx;
-        font-weight: 600;
-        color: #333;
-        margin-bottom: 8upx;
-      }
-    }
-    
-    .overview-grid {
-      display: grid;
-      grid-template-columns: repeat(2, 1fr);
-      padding: 20upx;
-      gap: 16upx;
-      
-      .overview-item {
-        padding: 28upx 24upx;
-        text-align: center;
-        position: relative;
-        transition: all 0.3s ease;
-        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
-        border-radius: 14upx;
-        border: 1upx solid #f0f0f0;
-        box-shadow: 0 2upx 8upx rgba(0, 0, 0, 0.04);
-        
-        &:not(:nth-child(2n)) {
-          &::after {
-            content: '';
-            position: absolute;
-            right: 0;
-            top: 0;
-            transform: none;
-            width: 0;
-            height: 0;
-            background: transparent;
-          }
-        }
-        
-        &:nth-child(n+3) {
-          &::before {
-            content: '';
-            position: absolute;
-            left: 0;
-            right: 0;
-            top: 0;
-            height: 0;
-            background: transparent;
-          }
-        }
-        
-        &:active {
-          background: linear-gradient(135deg, #f0f8f5 0%, #e8f5f1 100%);
-          transform: translateY(-4upx);
-          box-shadow: 0 4upx 12upx rgba(0, 0, 0, 0.08);
-        }
-        
-        .item-value {
-          font-size: 40upx;
-          font-weight: 700;
-          color: #049E2C;
-          margin-bottom: 12upx;
-          line-height: 1;
-        }
-        
-        .item-label {
-          font-size: 26upx;
-          color: #666;
-          line-height: 1;
-          font-weight: 500;
-        }
-      }
-    }
-  }
-  // 新的花束花礼和绿植花材样式
-  .flower-module {
-    padding: 0;
-    
-    .flower-section {
-      padding: 24upx 20upx;
-      background: #ffffff;
-      border-bottom: 12upx solid #f5f5f5;
-      
-      &:last-child {
-        border-bottom: none;
-      }
-      
-      .section-header {
-        display: flex;
-        align-items: center;
-        justify-content: flex-start;
-        margin-bottom: 24upx;
-        padding-left: 0;
-        
-        .header-title {
-          padding: 0;
-          font-size: 32upx;
-          font-weight: 700;
-          color: #333;
-          letter-spacing: 1upx;
-        }
-      }
-      
-      .icon-grid {
-        display: grid;
-        grid-template-columns: repeat(4, 1fr);
-        gap: 16upx;
-        max-width: 100%;
-        
-        .icon-item {
-          width: 100%;
-          padding: 12upx;
-          text-align: center;
-          display: flex;
-          flex-direction: column;
-          align-items: center;
-          gap: 8upx;
-          
-          .icon-wrapper {
-            width: 100upx;
-            height: 100upx;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
-            border-radius: 20upx;
-            
-            .icon-emoji {
-              font-size: 48upx;
-              line-height: 1;
-            }
-          }
-          
-          .icon-text {
-            font-size: 25upx;
-            color: #333;
-            line-height: 1.4;
-            font-weight: 500;
-          }
-        }
-      }
-    }
-  }
   .order-page {
   .ghs_list_page {
     background-color: rgba(255, 255, 255, 1);
@@ -1111,6 +844,25 @@
         width: 750upx;
         height: auto;
         margin-bottom:35upx;
+        
+        .more-btn {
+          position: absolute;
+          top: 20upx;
+          right: 20upx;
+          width: 40upx;
+          height: 40upx;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          border-radius: 20upx;
+          background: rgba(0, 0, 0, 0.05);
+      
+          .more-icon {
+            font-size: 24upx;
+            color: #666;
+            font-weight: bold;
+          }
+        }
         .image-text_7 {
           width: 674upx;
           height: 120upx;
@@ -1160,24 +912,50 @@
           margin-top: 40upx;
         }
         .box_9 {
-          width: 100%;
-          height: 60upx;
-          margin: 23upx 0 22upx 15upx;
+          width: calc(100% - 30upx);
+          height: auto;
+          margin: 23upx 15upx 22upx 15upx;
+          display: flex;
+          flex-wrap: wrap;
+          align-items: stretch;
+          overflow: visible;
+          position: relative;
           .tag_2 {
             background-color: rgba(255, 255, 255, 1);
             border-radius: 8px;
-            height: 60upx;
-            line-height:60upx;
+            height: 80upx;
             border: 2px solid rgba(221, 221, 221, 1);
             color: rgba(51, 51, 51, 1);
-            font-size: 30upx;
-            margin:0 16upx 0 0;
-            text-align:center;
-            float:left;
-            padding-left:15upx;
-            padding-right:15upx;
-                    }
+            font-size: 28upx;
+            margin: 0 7upx 15upx 0;
+            text-align: center;
+            width: calc((100% - 28upx) / 5);
+            padding: 0 4upx;
+            box-sizing: border-box;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+
+            &:nth-child(5n) {
+              margin-right: 0;
+            }
+
+            text {
+              display: block;
+              width: 100%;
+              font-size: 28upx;
+              line-height: 1.2;
+              white-space: nowrap;
+              overflow: hidden;
+              text-overflow: ellipsis;
+            }
           }
+
+          .tag_2--share {
+            padding-left: 2upx;
+            padding-right: 2upx;
+          }
+        }
           .box_6 {
           background-color: rgb(248, 242, 242);
           width: 750upx;
@@ -1272,63 +1050,6 @@
   }
   }
   
-  /* 商城选项弹框样式 */
-  .mall-options-container {
-    width: 600upx;
-    background-color: #fff;
-    border-radius: 24upx;
-    overflow: hidden;
-    animation: popup-in 0.3s ease-out;
-    
-    .mall-options-buttons {
-      padding: 50upx 40upx 50upx;
-      display: flex;
-      flex-direction: column;
-      gap: 40upx;
-      align-items: center;
-   
-      .mall-option-btn {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        padding: 32upx 40upx;
-        background-color: #f8f9fa;
-        border-radius: 20upx;
-        transition: all 0.2s ease;
-        width: 100%;
-        
-        &:active {
-          background-color: #e9ecef;
-          transform: scale(0.98);
-        }
-        
-        .option-icon {
-          font-size: 56upx;
-          margin-right: 30upx;
-          width: 70upx;
-          text-align: center;
-        }
-        
-        .option-text {
-          font-size: 42upx;
-          color: #333;
-          font-weight: 500;
-        }
-      }
-    }
-  }
-  
-  @keyframes popup-in {
-    0% {
-      opacity: 0;
-      transform: scale(0.8) translateY(20upx);
-    }
-    100% {
-      opacity: 1;
-      transform: scale(1) translateY(0);
-    }
-  }
-  
   /* 供货商提示弹框样式 */
   .supplier-notice-popup {
     .supplier-notice-container {
@@ -1422,48 +1143,6 @@
     }
   }
   
-  // 警告提示区域样式
-  .alert-card {
-    margin: 15upx 10upx;
-    border-radius: 16upx;
-    overflow: hidden;
-    box-shadow: 0 4upx 12upx rgba(0, 0, 0, 0.08);
-    transition: all 0.3s ease;
-    border: 3upx solid;
-    
-    &:active {
-      transform: translateY(2upx);
-      box-shadow: 0 2upx 8upx rgba(0, 0, 0, 0.06);
-    }
-    
-    .alert-content {
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      padding: 30upx 18upx;
-      min-height: 100upx;
-      
-      .alert-text {
-        font-size: 36upx;
-        font-weight: 600;
-        line-height: 1.6;
-        text-align: center;
-        width: 100%;
-      }
-    }
-  }
-  
-  .alert-card-error {
-    background-color: #ff6b6b;
-    border-color: #ff6b6b;
-    .alert-content {
-      .alert-text {
-        font-size:32upx;
-        color: white;
-      }
-    }
-  }
-  
   .warning-banner {
     background-color: #ff6b6b;
     border-radius: 8upx;
@@ -1477,14 +1156,14 @@
   }
  .inline-bought-tooltip-box {
   position: absolute;
-  top: 70upx;
+  top: 86upx;
   left: 50%;
   transform: translateX(-50%);
   z-index: 10000;
   display: flex;
   flex-direction: column;
   align-items: center;
-  width: 480upx;
+  width: 565upx;
 }
 
 .bought-tooltip-content {
@@ -1492,7 +1171,7 @@
   color: #fff;
   padding: 16upx 20upx;
   border-radius: 12upx;
-  font-size: 34upx;
+  font-size: 38upx;
   display: flex;
   align-items: flex-start;
   white-space: normal;
@@ -1503,7 +1182,7 @@
 
 .close-tooltip-icon {
   margin-left: 10upx;
-  font-size: 38upx;
+  font-size: 46upx;
   color: #ccc;
   padding: 0 4upx;
   line-height: 1;
@@ -1514,10 +1193,10 @@
 .bought-tooltip-arrow {
   width: 0;
   height: 0;
-  border-left: 12upx solid transparent;
-  border-right: 12upx solid transparent;
-  border-bottom: 12upx solid #333333;
-  margin-bottom: -1upx;
+  border-left: 30upx solid transparent;
+  border-right: 30upx solid transparent;
+  border-bottom: 30upx solid #333333;
+  margin-bottom: -15upx;
   order: -1;
 }
 </style>