Bläddra i källkod

修复学分和市场计算问题

赵启卫 2 år sedan
förälder
incheckning
d9067e0fa2
2 ändrade filer med 11 tillägg och 7 borttagningar
  1. 10 6
      application/wap/controller/My.php
  2. 1 1
      application/wap/view/first/my/history.html

+ 10 - 6
application/wap/controller/My.php

xqd xqd xqd
@@ -522,9 +522,10 @@ class My extends AuthController
                 $item['money'] = (float)$item['money'];
                 $item['image'] = get_oss_process($item['image'], 0);
                 $item['count'] = 0;
-                $specialSourceId = SpecialSource::alias('ss')->where('ss.special_id', $item['id'])
+                $specialSourceId = SpecialSource::alias('ss')
+                    ->where('ss.special_id', $item['id'])
                     ->field('ss.*, sw.viewing_time, sw.percentage')
-                    ->join('specialWatch sw', 'ss.special_id = sw.special_id', 'left')
+                    ->join('specialWatch sw', 'ss.special_id = sw.special_id and sw.uid = ' . $this->uid, 'left')
                     ->select();
                 if ($specialSourceId) $item['count'] = count($specialSourceId);
                 foreach ($specialSourceId as $v) {
@@ -539,8 +540,10 @@ class My extends AuthController
                     $join1 = [
                         ['ExaminationRecord er', 'er.test_id = r.relation_id and er.uid = ' . $this->uid, 'left'],
                     ];
-                    $examlist = Relation::alias('r')->where('r.relationship_id', $item['id'])->where('r.relationship', 2)
-                    ->field('r.relation_id as test_id, er.score')->join($join1)->select();
+                    $examlist = Relation::alias('r')
+                        ->where('r.relationship_id', $item['id'])
+                        ->where('r.relationship', 2)
+                        ->field('r.relation_id as test_id, er.score')->join($join1)->select();
                     if ($examlist) {
                         foreach ($examlist as $v) {
                             if ($v['score'] < 60) {
@@ -569,9 +572,10 @@ class My extends AuthController
                 $item['image'] = get_oss_process($item['image'], 0);
                 $item['count'] = 0;
                 $item['shichang'] = 0;
-                $specialSourceId = SpecialSource::alias('ss')->where('ss.special_id', $item['id'])
+                $specialSourceId = SpecialSource::alias('ss')
+                    ->where('ss.special_id', $item['id'])
                     ->field('ss.*, sw.viewing_time, sw.percentage')
-                    ->join('specialWatch sw', 'ss.special_id = sw.special_id', 'left')
+                    ->join('specialWatch sw', 'ss.special_id = sw.special_id and sw.uid = ' . $this->uid, 'left')
                     ->select();
                 if ($specialSourceId) $item['count'] = count($specialSourceId);
                 foreach ($specialSourceId as $v) {

+ 1 - 1
application/wap/view/first/my/history.html

xqd
@@ -371,7 +371,7 @@
                             for (let i in that.activityList) {
                                 console.log(that.activityList[i].shichang);
                                 if (that.activityList[i].shichang){
-                                    that.shichang += parseInt(that.activityList[i].shichang / 60);
+                                    that.shichang += parseInt(that.activityList[i].shichang / 60000);
                                 }
                             }
                             that.$set(this, 'activityList', that.activityList);