5 Комити b7dac0f407 ... 94686d965e

Аутор SHA1 Порука Датум
  xiansin 94686d965e feat: 调整UI пре 2 година
  xiansin 9d22109f17 fix: 数据概览BUG пре 2 година
  xiansin c03596e95f fix: 产品的排序和案例的排序前后端保持一致 пре 2 година
  xiansin bf67b1f87c fix: 分类或子分类存在产品不能删除 пре 2 година
  xiansin 88ca757c44 fix: 不能删除规格 пре 2 година

+ 1 - 1
mini/components/Index/Login.vue

xqd
@@ -5,7 +5,7 @@
     <swiper-box type="login" height="380rpx" />
 
     <view class="btn-box dir-top-wrap main-center cross-center">
-      <view class="static-text">登陆极创社</view>
+      <!--      <view class="static-text">登陆极创社</view>-->
       <u-button
         text="登陆"
         color="#000"

+ 1 - 1
mini/pages/case/detail.vue

xqd
@@ -56,6 +56,6 @@ image,video{
 </style>
 <style lang="scss" scoped>
 .product-detail {
-  padding: 0 8rpx;
+  padding: 0 30rpx 30rpx;
 }
 </style>

+ 6 - 7
mini/pages/case/index.vue

xqd xqd xqd
@@ -22,8 +22,8 @@
           class="cases-item main-left"
           @click="$u.route({url:`/pages/case/detail?id=${item.id}`})"
         >
-          <view class="detail dir-top-wrap">
-            <text>热销展厅排名</text>
+          <view class="detail cross-center">
+            <!--            <text>热销展厅排名</text>-->
             <view class="name"> {{ item.name }}</view>
           </view>
           <view class="cover-img">
@@ -91,7 +91,6 @@ export default {
         margin-bottom: 0;
       }
       .detail{
-        padding: 50rpx 0 20rpx 50rpx;
         font-size: 24rpx;
         color: #333333;
         background: #F2F2F2;
@@ -100,13 +99,13 @@ export default {
           color: #b4936d;
         }
         .name{
-          margin-top: 16rpx;
-          font-size: 42rpx;
+          font-size: 34rpx;
+          padding-left: 40rpx;
         }
       }
       .cover-img{
-        width: 355rpx;
-        height: 250rpx;
+        width: 410rpx;
+        height: 235rpx;
         image{
           width: 100%;
           height: 100%;

+ 1 - 1
mini/pages/forget.vue

xqd
@@ -1,7 +1,7 @@
 <template>
   <page-loading class="forget-page" :loading="loading">
     <view class="logo logo-white" />
-    <view class="static-text">本平台仅限极创会员使用,无账号的请联系下方客服电话或微信</view>
+    <view class="static-text">本平台仅限极创会员使用,无账号的请联系下方客服电话或微信</view>
     <view
       v-for="(item,index) in contacts"
       :key="index"

+ 11 - 13
mini/pages/product/detail.vue

xqd xqd xqd xqd xqd xqd
@@ -14,7 +14,7 @@
           :key="index"
           class="full-img"
           :src="item"
-          mode="aspectFill"
+          mode="widthFix"
           @click="handlePreview(detail.cases, index)"
         />
       </view>
@@ -50,9 +50,9 @@
         <u-divider />
         <!--   查看价格    -->
         <view id="price" class="price main-between cross-center">
-          <u-text :text="specsText" color="#B4936D" size="32rpx" :lines="1" />
+          <u-text :text="specsText" color="#B4936D" size="28rpx" :lines="1" />
           <view class="number">
-            <u-text :text="price" mode="price" color="#B4936D" size="36rpx" align="right" />
+            <u-text :text="price" mode="price" color="#B4936D" size="28rpx" align="right" />
           </view>
         </view>
         <!--  规格    -->
@@ -230,17 +230,15 @@ export default {
 .product-detail {
   padding: 20rpx 0rpx 120rpx;
   height: 100vh;
+  width: 690rpx;
+  margin: 0 auto;
   .cases{
-    width: 740rpx;
-    margin: 0 auto;
     .full-img{
-      width: 740rpx;
-      margin-bottom: -8rpx;
+      width: 690rpx;
+      margin-bottom: -9rpx;
     }
   }
   .file{
-    width: 710rpx;
-    margin: 0 auto;
     .header{
       padding: 20rpx 0;
       .left{
@@ -267,7 +265,7 @@ export default {
     }
   }
   .price{
-    width: 710rpx;
+    font-size: 28rpx;
     margin: 50rpx auto;
     .number{
       max-width: 320rpx;
@@ -275,7 +273,6 @@ export default {
   }
   .specs{
     padding-bottom: 80rpx;
-    width: 710rpx;
     margin: 0 auto;
     .spec-item{
       color: #333;
@@ -283,12 +280,13 @@ export default {
       .group-name{
         padding: 10rpx 20rpx 40rpx 0 ;
         text{
-          font-size: 32rpx;
-          font-weight: 600;
+          font-size: 28rpx;
+          font-weight: bold;
         }
       }
       .specs-content{
         .spec{
+          font-size: 28rpx;
           margin: 0 5rpx 10rpx;
           min-width: 130rpx;
           padding: 10rpx 30rpx;

+ 5 - 6
mini/pages/product/index.vue

xqd xqd xqd
@@ -21,7 +21,7 @@
           class="product-item main-left"
           @click="$u.route({url: `/pages/product/list?cate_id=${item.id}`})"
         >
-          <view class="detail dir-top-wrap">
+          <view class="detail cross-center">
             <!--            <text>热销品类排名</text>-->
             <view class="name"> {{ item.name }}</view>
           </view>
@@ -87,7 +87,6 @@ export default {
         margin-bottom: 0;
       }
       .detail{
-        padding: 50rpx 0 20rpx 50rpx;
         font-size: 24rpx;
         color: #333333;
         background: #F2F2F2;
@@ -96,13 +95,13 @@ export default {
           color: #b4936d;
         }
         .name{
-          margin-top: 16rpx;
-          font-size: 42rpx;
+          font-size: 34rpx;
+          padding-left: 40rpx;
         }
       }
       .cover-img{
-        width: 355rpx;
-        height: 250rpx;
+        width: 410rpx;
+        height: 235rpx;
         image{
           width: 100%;
           height: 100%;

+ 1 - 1
server/app/Admin/Controllers/DashBoardController.php

xqd
@@ -61,7 +61,7 @@ class DashBoardController extends Controller
     {
         $this->reload();
         if(request()->isMethod('post')){
-            return $this->queryData('product');
+            return $this->queryData('showroom');
         }
         static::loadJS('showroom');
         $showrooms = Showroom::all();

+ 17 - 0
server/app/Admin/Controllers/ProductCategoryController.php

xqd xqd
@@ -2,6 +2,7 @@
 
 namespace App\Admin\Controllers;
 
+use App\Models\Product;
 use App\Models\ProductCategory;
 use Dcat\Admin\Form;
 use Dcat\Admin\Grid;
@@ -10,6 +11,22 @@ use Dcat\Admin\Http\Controllers\AdminController;
 
 class ProductCategoryController extends AdminController
 {
+
+    public function destroy($id)
+    {
+        $childIds = ProductCategory::where('pid',$id)->get()->pluck('id');
+        $childIds[]= $id;
+
+        $hasEpisode = Product::whereIn('cate_id',$childIds)->count();
+        if($hasEpisode){
+            $form = new Form();
+            $response = $form->response();
+            return $response->error('当前分类或子分类存在产品,前先删除产品后再删除分类');
+        }
+
+        return $this->form()->destroy($id);
+    }
+
     /**
      * Make a grid builder.
      *

+ 6 - 0
server/app/Admin/Controllers/ProductSpecController.php

xqd
@@ -62,6 +62,12 @@ class ProductSpecController extends AdminController
         return $this->content($content)->body($this->form()->edit($id));
     }
 
+    public function destroy($productId, $id = 0)
+    {
+        parent::destroy($id);
+        return $this->form()->destroy($id);
+    }
+
     /**
      * Make a grid builder.
      *

+ 1 - 1
server/app/Http/Controllers/V1/CasesController.php

xqd
@@ -31,7 +31,7 @@ class CasesController extends Controller
                 /* @var Builder  $query*/
                 return $query->where('name','like', "%$keywords%");
             })
-            ->orderByDesc('viewer_count')
+            //->orderByDesc('viewer_count')
             ->orderByDesc('sort')
             ->limit($limit)
             ->offset($offset)

+ 1 - 1
server/app/Http/Controllers/V1/ProductController.php

xqd
@@ -64,7 +64,7 @@ class ProductController extends Controller
                 /* @var Builder  $query*/
                 return $query->whereIn('id',$ids);
             })
-            ->orderByDesc('viewer_count')
+            //->orderByDesc('viewer_count')
             ->orderByDesc('sort')
             ->limit($limit)
             ->offset($offset)