Parcourir la source

feat: 优化小程序

xiansin il y a 2 ans
Parent
commit
370f227cdb

+ 3 - 0
mini/pages/my/consume.vue

xqd
@@ -88,6 +88,9 @@ export default {
         } else {
           this.isMore = false
         }
+      }).catch(err => {
+        this.$hideLoading()
+        console.error('-->error', err)
       })
     }
   },

+ 3 - 0
mini/pages/my/history.vue

xqd
@@ -86,6 +86,9 @@ export default {
         } else {
           this.isMore = false
         }
+      }).catch(err => {
+        this.$hideLoading()
+        console.error('-->error', err)
       })
     }
   },

+ 15 - 17
mini/pages/my/protocol.vue

xqd xqd
@@ -1,29 +1,27 @@
 <template>
   <view class="protocol">
-    该软件的著作权和所有权由公司所有。该软件受著作权法和国际条约条款的保护。商标的使用应符合商标惯例,包括和商标所有人名称的一致。商标可以仅用于对该软件产品的识别。对于任何商标的该种使用都不会导致对该商标使用权的拥有。除上述以外,该协议不授予你该软件上的任何知识产权。
-    2. 软件的使用   你可以:
-     (1) 根据该协议条款使用该软件;
-      (2) 复制和备份;
-    (3) 不对文档作任何增加或修改以文档下载的最初形式将此软件拷贝给他人;
-    (4) 在网址上通过 email 或者其他任何物理媒体分发该软件。   你不可以:
-     (1) 对本系统进行逆向工程、反汇编、解体拆卸或任何试图发现该软件工作程序获源代码的行为;
-     (2) 未经有限公司的书面许可出售租赁该程序;
-    (3) 创造派生性产品包括含有该系统的更大的系统或另外的程序和包裹
-    (4) 将该软件和与_________没有分离授权协议的产品或山版物捆绑销售
-    (5) 使用和拷贝没有_________授权的包含在_________之中的 icons,1ogosorartwork
-     (6) 改变_________广告图案内部程序的运行,改变广告及其内容、广告出现的时间或使其他功能丧失的行为
-     (7) 使用该软件改进其他产品和服务
-     (8) 任何反相工程、反相编译和反汇编以及其他任何试图发现由该内程旗帜广告和该软件中网络共享功能所使用的协议的行为;
+    <u-parse :content="data" />
   </view>
 </template>
 
 <script>
 export default {
   data() {
-    return {}
+    return {
+      data: ''
+    }
   },
   computed: {},
-  methods: {}
+  methods: {
+    getSetting() {
+      this.$api.setting.config().then(res => {
+        this.data = res.data.protocol
+      })
+    }
+  },
+  onLoad() {
+    this.getSetting()
+  }
 }
 </script>
 
@@ -31,6 +29,6 @@ export default {
     .protocol{
       color: $info-color;
       font-size: 32rpx;
-      padding: 0 20rpx;
+      padding: 30rpx 30rpx 80rpx;
     }
 </style>

+ 3 - 0
mini/pages/my/recharge.vue

xqd
@@ -86,6 +86,9 @@ export default {
         } else {
           this.isMore = false
         }
+      }).catch(err => {
+        this.$hideLoading()
+        console.error('-->error', err)
       })
     }
   },

+ 8 - 3
server/app/Http/Controllers/V1/User/ConsumeController.php

xqd
@@ -30,9 +30,14 @@ class ConsumeController extends Controller
             ->get();
 
         foreach ($lists as $list){
-            $count = $list->detail->episode->withCount('lists')->first()->toArray();
-            $list->detail->episode->total = $count['lists_count'];
-            $list->detail->episode->status_text = $list->detail->episode->status;
+            if($list->detail && $list->detail->episodes_id){
+                $count = $list->detail->episode->withCount('lists')->first()->toArray();
+                $list->detail->episode->total = $count['lists_count'];
+                $list->detail->episode->status_text = $list->detail->episode->status;
+            }else{
+                $list->detail->episode->total = 0;
+                $list->detail->episode->status_text = -1;
+            }
         }
 
         return $this->success($lists);

+ 1 - 1
server/app/Models/EpisodesList.php

xqd
@@ -58,7 +58,7 @@ class EpisodesList extends Model
 
     public function episode()
     {
-        return $this->belongsTo(Episode::class,'episodes_id','id');
+        return $this->belongsTo(Episode::class,'episodes_id','id')->withTrashed();
     }
 
 }

+ 2 - 2
server/app/Models/UserEpisodesRecord.php

xqd
@@ -58,11 +58,11 @@ class UserEpisodesRecord extends Model
 
     public function episodes()
     {
-        return $this->belongsTo(Episode::class,'episodes_id','id');
+        return $this->belongsTo(Episode::class,'episodes_id','id')->withTrashed();
     }
 
     public function detail()
     {
-        return $this->belongsTo(EpisodesList::class,'list_id','id');
+        return $this->belongsTo(EpisodesList::class,'list_id','id')->withTrashed();
     }
 }