Bladeren bron

12/20 训练详情bug修复 & 报告页面

Foystor 3 jaren geleden
bovenliggende
commit
bcfb0b5ce6

+ 5 - 7
src/pages/report/index.vue

@@ -501,7 +501,7 @@
 
         <!-- 占比 -->
         <cover-view class="flex justify-center radar_explain_view grid padding-lg" v-if="radar_indication_type==2">
-          <cover-view class="text-black text-bold">高专注力占比</cover-view>
+          <cover-view class="text-black text-bold">高专注指数</cover-view>
           <cover-view class="text_explain_center">
             <cover-view class="text_explain_wrap">大于65分的高专注值在本次训练中的占比,高专注比越高越好</cover-view>
           </cover-view>
@@ -636,14 +636,11 @@ function initRadarChart(canvas, width, height) {
   radar_charts.setOption(option);
 
   // 添加点击事件
-  radar_charts.on('click', function(params){
-
-    $this.is_explainShow = true
-    
+  radar_charts.on('click', function(params){    
     if(params.name.indexOf("专注力平均值") != -1) {
       $this.radar_indication_type = 1
 
-    } else if (params.name.indexOf("高专注力占比") != -1) {
+    } else if (params.name.indexOf("高专注指数") != -1) {
       $this.radar_indication_type = 2
 
     } else if (params.name.indexOf("专注唤醒效率") != -1) {
@@ -654,8 +651,9 @@ function initRadarChart(canvas, width, height) {
 
     } else {
       $this.radar_indication_type = 5
-
     }
+
+    $this.is_explainShow = true
   })
 
   return radar_charts; // 返回 chart 后可以自动绑定触摸操作

+ 2 - 2
src/pages/user_center/confirmPay/index.vue

@@ -29,10 +29,10 @@
             <br>
         </view>
        
-        <view v-if="data.coupon.length == 0 & data.discount * 10 !== 10" class="padding-tb">
+        <!-- <view v-if="data.coupon.length == 0 & data.discount * 10 !== 10" class="padding-tb">
           <text class="text-lg text-red" style="font-weight: bold;">{{data.represent}}&emsp;{{ data.discount * 10 }}折</text>
           <br>
-        </view>
+        </view> -->
         <view v-if="data.goods_id < 4" class="padding-tb">
            <label class="radio" @click='radiocon'>
                 <!-- <checkbox  :checked="data.check" id="radios"></checkbox> -->

+ 47 - 3
src/pages/user_center/recharge/index.vue

@@ -117,7 +117,7 @@
         <div class="buy_button">
           <button
             class="cu-btn lg bg-orange text-center margin yellowButt"
-            @click="to_confirm(item)"
+            @click="to_confirm_vip(item)"
           >购买{{item.goods_name}}</button>
         </div>
       </view>
@@ -220,7 +220,7 @@
         <div class="buy_button">
           <button
             class="cu-btn lg bg-orange text-center margin yellowButt"
-            @click="to_confirm(item)"
+            @click="to_confirm_time(item)"
           >购买{{
             item.goods_name
             }}
@@ -284,8 +284,52 @@ export default {
   },
   watch: {},
   methods: {
+    to_confirm_vip($item) {
+      console.log("data", $item);
+      //实付
+      if ($item.coupon.type == 3) {
+        $item["total_price"] =
+          Math.round($item.price * $item.coupon.discount * 100) / 100;
+      } else if ($item.coupon.type == 2) {
+        $item["total_price"] =
+          Math.round(($item.price - $item.coupon.reduce) * 100) / 100;
+      } else if ($item.coupon.type == 4) {
+        $item["total_price"] =
+          Math.round(($item.price - $item.coupon.random) * 100) / 100;
+      } else {
+        $item["total_price"] =
+          Math.round($item.price * $item.discount * 100) / 100;
+      }
+      //减多少
+      if ($item.coupon.type == 3) {
+        $item["reduce"] =
+          Math.round(
+            ($item.price - $item.price * $item.coupon.discount) * 100
+          ) / 100;
+      } else if ($item.coupon.type == 2) {
+        $item["reduce"] = $item.coupon.reduce;
+      } else if ($item.coupon.type == 4) {
+        $item["reduce"] = $item.coupon.random;
+      }
+      // $item["total_price"] = ($item.price * $item.discount).toFixed(2);
+      if ($item.goods_id == 1) {
+        $item["add_price"] = 20;
+        $item["add_month"] = "一";
+      } else if ($item.goods_id == 2) {
+        $item["add_price"] = 30;
+        $item["add_month"] = "三";
+      } else if ($item.goods_id == 3) {
+        $item["add_price"] = 30;
+        $item["add_month"] = "三";
+      }
+      $this.selection_card = $item;
+      var data = JSON.stringify($item);
+      mpvue.navigateTo({
+        url: "/pages/user_center/confirmPay/main?data=" + data,
+      });
+    },
     //确认订单
-    to_confirm($item) {
+    to_confirm_time($item) {
       // 判断家庭VIP是否过期
       check_vip().then((res) => {
         console.log("vip", res);

+ 1 - 1
src/utils/index.js

@@ -663,7 +663,7 @@ export function getRadarChartOption($params) {
           max: 100
         },
         {
-          name: "高专注力占比",
+          name: "高专注指数",
           max: 100
         },
         {