Kaynağa Gözat

12/16 报告五角图 & 会员vip改版

Foystor 3 yıl önce
ebeveyn
işleme
17450ed4d5

+ 2 - 2
config/dev.env.js

@@ -3,6 +3,6 @@ var prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
-  REQUEST_URI: "'https://api.shuimuai.com/'"
-  // REQUEST_URI: "'https://testapi.shuimuai.com/'"
+  // REQUEST_URI: "'https://api.shuimuai.com/'"
+  REQUEST_URI: "'https://testapi.shuimuai.com/'"
 })

+ 2 - 2
config/prod.env.js

@@ -1,5 +1,5 @@
 module.exports = {
   NODE_ENV: '"production"',
-  REQUEST_URI: "'https://api.shuimuai.com/'"
-  // REQUEST_URI:"'https://testapi.shuimuai.com/'"
+  // REQUEST_URI: "'https://api.shuimuai.com/'"
+  REQUEST_URI:"'https://testapi.shuimuai.com/'"
 }

+ 4 - 1
project.config.json

@@ -31,7 +31,10 @@
     "packNpmManually": false,
     "packNpmRelationList": [],
     "minifyWXSS": true,
-    "showES6CompileOption": false
+    "disableUseStrict": false,
+    "showES6CompileOption": false,
+    "useCompilerPlugins": false,
+    "minifyWXML": true
   },
   "miniprogramRoot": "dist/wx/",
   "compileType": "miniprogram",

+ 6 - 0
project.private.config.json

@@ -47,6 +47,12 @@
           "pathName": "pages/competition/main",
           "query": "activity_id=4",
           "scene": null
+        },
+        {
+          "name": "pages/user_center/recharge/main",
+          "pathName": "pages/user_center/recharge/main",
+          "query": "",
+          "scene": null
         }
       ]
     }

+ 14 - 10
src/components/banner.vue

@@ -71,18 +71,22 @@ export default {
     },
     getBanners() {
       getBannerList().then((res) => {
-        console.log("活动列表ID:", res);
-        let $res = res.data;
-        let $activities = $res.data;
-        let $new_act = $activities.pop();
-        // console.log("轮播图", $new_act);
+        if(res.data.code == 0){
+          console.log("活动列表ID:", res);
+          let $res = res.data;
+          let $activities = $res.data;
+          let $new_act = $activities.pop();
+          console.log("轮播图", $new_act);
 
-        $this.banners[1].src = $new_act["img"]
-          ? "https://img.shuimuai.com/" + $new_act["img"]
-          : "https://img.shuimuai.com/banner_activity_may_1.png";
+          $this.banners[1].src = $new_act["img"]
+            ? "https://img.shuimuai.com/" + $new_act["img"]
+            : "https://img.shuimuai.com/banner_activity_may_1.png";
 
-        $this.banners[1].url =
-          "/pages/competition/main?activity_id=" + $new_act["activity_id"];
+          $this.banners[1].url =
+            "/pages/competition/main?activity_id=" + $new_act["activity_id"];
+        } else {
+          $this.banners.splice(1, 1);
+        }
       });
     },
 

+ 3 - 3
src/components/device/toy/connecting.vue

@@ -157,7 +157,7 @@
             <text
               class=" cut_text"
               style="padding: 0px;"
-            >开始游戏</text>
+            >开始训练</text>
           </button>
         </van-col>
 
@@ -314,7 +314,7 @@ export default {
     //打开选择消费的选项框
     choose_pay_window() {
       if (!$this.device_bg) {
-        Toast.fail("请佩戴好脑环开始游戏");
+        Toast.fail("请佩戴好脑环开始训练");
         return false;
       }
       $this.pay_window = true;
@@ -322,7 +322,7 @@ export default {
     //选择消费的时间或者次数
     choose_pay($event) {
       if (!$this.device_bg) {
-        Toast.fail("请佩戴好脑环开始游戏");
+        Toast.fail("请佩戴好脑环开始训练");
         return false;
       }
       $this.pay_type = $event;

+ 1 - 1
src/components/index/personal.vue

@@ -16,7 +16,7 @@
                 {{ userinfo.level_name }}
 
               </button>
-              <view class="text-xs padding-left" v-if="userinfo.level != 1">有效期至 {{ userinfo['validity_time'] }}</view>
+              <view class="text-xs padding-left" v-if="userinfo.level == 11">有效期至 {{ userinfo['validity_time'] }}</view>
             </div>
           </div>
         </van-col>

+ 4 - 4
src/pages/competition/index.vue

@@ -152,7 +152,7 @@
             <van-row>
               <van-col span="8">
                 <img
-                  src="https://img.shuimuai.com/rank_ready.png"
+                  src="https://img.shuimuai.com/rank_ready_11.png"
                   alt=""
                   class="rank_card"
                   @click="changeRankAction(1)"
@@ -166,7 +166,7 @@
               </van-col>
               <van-col span="8">
                 <img
-                  src="https://img.shuimuai.com/rank_levelup.png"
+                  src="https://img.shuimuai.com/rank_levelup_11.png"
                   alt=""
                   class="rank_card"
                   @click="changeRankAction(2)"
@@ -180,7 +180,7 @@
               </van-col>
               <van-col span="8">
                 <img
-                  src="https://img.shuimuai.com/rank_champion.png"
+                  src="https://img.shuimuai.com/rank_champion_11.png"
                   alt=""
                   class="rank_card"
                   @click="changeRankAction(3)"
@@ -1011,7 +1011,7 @@ page {
   /* background: url("https://img.shuimuai.com//mp/pk/background_3%402x.png");  小乌龟 */
   /* background: url("https://img.shuimuai.com/mppkbackground_june_23_2.png"); */
   /* background: url("https://img.shuimuai.com/bg_game.png"); */
-  background: url("https://img.shuimuai.com/bg_game_2.png");
+  background: url("https://img.shuimuai.com/bg_game_11.png");
 
   background-size: 100% 100%;
   background-position: center;

+ 371 - 99
src/pages/report/index.vue

@@ -270,9 +270,116 @@
 
       <view class="divide_line"></view>
 
+      <!-- 专注力变化看板 -->
+    <view class="absorbed_change">
+      <view class="bar">
+        <view class="interfere_title_wrap">
+          <view class="line"></view>
+          <view class="title">专注力变化分析</view>
+        </view>
+      </view>
+      <!-- 看板一 干扰 -->
+      <view class="flex justify-center">
+        <view class="interfere_wrap">
+          <view class="interfere">
+            <img
+              src="http://img.shuimuai.com/program_interfere_log.png"
+              alt=""
+              class="interfere_logo"
+            >
+            <view class="interfere_text">
+              受干扰次数:
+              <title class="interfere_text_num"> {{record.interfere}}</title>
+              次
+            </view>
+          </view>
+          <!-- 表图 -->
+          <view class="interfere_echarts_wrap">
+            <view class="interfere_echarts">
+              <mpvue-echarts
+                :echarts="echarts"
+                :onInit="interfere_charts"
+                canvasId="demo-canvas-4"
+              />
+            </view>
+            <view class="interfere_echarts_bottom">
+              <text>0</text>
+              <text>2</text>
+              <text>4</text>
+              <text>6</text>
+              <text>8</text>
+              <text>10</text>
+              <text>12</text>
+              <text>14</text>
+              <text>16</text>
+              <text>18</text>
+              <text>20</text>
+            </view>
+          </view>
+          <view class="interfere_footer">
+            <title class="interfere_footer_logo"></title>专注力干扰
+          </view>
+        </view>
+      </view>  
+
+      <!-- 调整能力分析 -->
+      <view class="flex justify-center">
+        <view class="adjustment_warp">
+          <view class="adjustment_title">
+            <img
+              src="http://img.shuimuai.com/program_rise_log.png"
+              alt=""
+              class="adjustment_title_logo"
+            >
+            <text>调整能力分析</text>
+          </view>
+          <!-- 表图 -->
+          <view class="adjustment_echarts_wrap">
+            <view class="adjustment_echarts">
+              <mpvue-echarts
+                :echarts="echarts"
+                :onInit="adjustment_charts"
+                canvasId="demo-canvas-5"
+              />
+            </view>
+            <view class="adjustment_echarts_bottom">
+              <text>0</text>
+              <text>2</text>
+              <text>4</text>
+              <text>6</text>
+              <text>8</text>
+              <text>10</text>
+              <text>12</text>
+              <text>14</text>
+              <text>16</text>
+              <text>18</text>
+              <text>20</text>
+            </view>
+          </view>
+          <view class="adjustment_footer">
+            <view class="adjustment_footer_logo"></view>专注力上升
+          </view>
+        </view>
+      </view>
+
+      <!-- 爆发值和调整时间 -->
+      <view class="absorbed_change_footer">
+        <view class="footer_text">
+          最大爆发值:
+          <text class="footer_text_W">{{ record.burst }}</text>
+        </view>
+        <view class="footer_text">
+          平均调整时间:
+          <text class="footer_text_W">{{ record.burstTime}}</text>
+          s
+        </view>
+      </view>
+
+    </view>
+
 
       <!-- Aipha/Beta脑波变化曲线图 -->
-      <view class="absorbed_change">
+      <!-- <view class="absorbed_change">
         <view class="bar">
           <view class="interfere_title_wrap">
             <view class="line"></view>
@@ -324,9 +431,9 @@
             ></van-tab>
           </van-tabs>
         </view>
-      </view>
+      </view> -->
       <!-- Delta/theta脑波变化曲线图 -->
-      <view class="absorbed_change ">
+      <!-- <view class="absorbed_change ">
         <view class="bar">
           <view class="interfere_title_wrap">
             <view class="line"></view>
@@ -370,7 +477,7 @@
             ></van-tab>
           </van-tabs>
         </view>
-      </view>
+      </view> -->
     </div>
 
     <div v-if="!report_show" class="boxVer margin-top-xl">
@@ -380,6 +487,53 @@
 
     <van-toast id="van-toast"/>
 
+    <!-- 五角图解释弹窗 -->
+    <view :hidden="!is_explainShow">
+      <cover-view class="radar_explain_bg" @click="closeRadarExplain"></cover-view>
+     <!-- 平均值 -->
+      <cover-view class="radar_explain_wrap">
+        <cover-view class="flex justify-center radar_explain_view grid padding-lg" v-if="radar_indication_type==1">
+          <cover-view class="text-black text-bold">专注力平均值</cover-view>
+          <cover-view class="text_explain_center">
+            <cover-view class="text_explain_wrap">本次训练的专注力平均水平,平均值越高越好</cover-view>
+          </cover-view>
+        </cover-view>
+
+        <!-- 占比 -->
+        <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_explain_center">
+            <cover-view class="text_explain_wrap">大于65分的高专注值在本次训练中的占比,高专注比越高越好</cover-view>
+          </cover-view>
+        </cover-view>
+
+        <!-- 唤醒 -->
+        <cover-view class="flex justify-center radar_explain_view grid padding-lg" v-if="radar_indication_type==3">
+          <cover-view class="text-black text-bold">专注唤醒效率</cover-view>
+          <cover-view class="text_explain_center">
+            <cover-view class="text_explain_wrap">从训练开始到专注值达到60所需时间效率,唤醒效率越高越好</cover-view>
+          </cover-view>
+        </cover-view>
+
+        <!-- 和谐度 -->
+        <cover-view class="flex justify-center radar_explain_view grid padding-lg" v-if="radar_indication_type==4">
+          <cover-view class="text-black text-bold">整体和谐度</cover-view>
+          <cover-view class="text_explain_center">
+            <cover-view class="text_explain_wrap">在专注训练过程中对于目标压力的管理水平和情绪稳定水平,和谐度越高越好</cover-view>
+          </cover-view>
+        </cover-view>
+
+        <!-- 稳定度 -->
+        <cover-view class="flex justify-center radar_explain_view grid padding-lg" v-if="radar_indication_type==5">
+          <cover-view class="text-black text-bold">专注力稳定度</cover-view>
+          <cover-view class="text_explain_center">
+            <cover-view class="text_explain_wrap">在训练过程中,专注值的离散程度,稳定度越高代表越稳定</cover-view>
+          </cover-view>
+        </cover-view>
+
+      </cover-view>
+    </view>
+
   </div>
 </template>
 
@@ -392,6 +546,9 @@ import util, {
   getHightPieChartOption,
   getPieChartsOption,
   getRadarChartOption,
+  getInterfereChartsOption,
+  interfereAction,
+  getAdjustmentChartsOption,
   timestampToTimeS,
 } from "../../utils/index";
 import {gameDetail} from "../../requests/game";
@@ -399,11 +556,13 @@ import game_store from "../../store/game";
 import Toast from "../../../static/vant/toast/toast";
 
 var att_charts,
-  alpha_beta_charts,
-  delta_theta_charts,
+  // alpha_beta_charts,
+  // delta_theta_charts,
   hight_att_pie_charts,
   radar_charts,
   $pie_charts,
+  $interfere_echarts,
+  $adjustment_echarts,
   $this;
 
 // 大脑图表初始化
@@ -421,33 +580,33 @@ function initAttChart(canvas, width, height) {
   return att_charts; // 返回 chart 后可以自动绑定触摸操作
 }
 
-function initABChart(canvas, width, height) {
-  alpha_beta_charts = echarts.init(canvas, null, {
-    width: width,
-    height: height,
-  });
-  canvas.setChart(alpha_beta_charts);
+// function initABChart(canvas, width, height) {
+//   alpha_beta_charts = echarts.init(canvas, null, {
+//     width: width,
+//     height: height,
+//   });
+//   canvas.setChart(alpha_beta_charts);
 
-  var option = util.getABOption([0], [0]); // ECharts 配置项
+//   var option = util.getABOption([0], [0]); // ECharts 配置项
 
-  alpha_beta_charts.setOption(option);
+//   alpha_beta_charts.setOption(option);
 
-  return alpha_beta_charts; // 返回 chart 后可以自动绑定触摸操作
-}
+//   return alpha_beta_charts; // 返回 chart 后可以自动绑定触摸操作
+// }
 
-function initDTChart(canvas, width, height) {
-  delta_theta_charts = echarts.init(canvas, null, {
-    width: width,
-    height: height,
-  });
-  canvas.setChart(delta_theta_charts);
+// function initDTChart(canvas, width, height) {
+//   delta_theta_charts = echarts.init(canvas, null, {
+//     width: width,
+//     height: height,
+//   });
+//   canvas.setChart(delta_theta_charts);
 
-  var option = util.getDTOption([0], [0]); // ECharts 配置项
+//   var option = util.getDTOption([0], [0]); // ECharts 配置项
 
-  delta_theta_charts.setOption(option);
+//   delta_theta_charts.setOption(option);
 
-  return delta_theta_charts; // 返回 chart 后可以自动绑定触摸操作
-}
+//   return delta_theta_charts; // 返回 chart 后可以自动绑定触摸操作
+// }
 
 // 大脑图表初始化
 function initHightPieChart(canvas, width, height) {
@@ -476,6 +635,29 @@ function initRadarChart(canvas, width, height) {
 
   radar_charts.setOption(option);
 
+  // 添加点击事件
+  radar_charts.on('click', function(params){
+
+    $this.is_explainShow = true
+    
+    if(params.name.indexOf("专注力平均值") != -1) {
+      $this.radar_indication_type = 1
+
+    } else if (params.name.indexOf("高专注力占比") != -1) {
+      $this.radar_indication_type = 2
+
+    } else if (params.name.indexOf("专注唤醒效率") != -1) {
+      $this.radar_indication_type = 3
+
+    } else if (params.name.indexOf("整体和谐度") != -1) {
+      $this.radar_indication_type = 4
+
+    } else {
+      $this.radar_indication_type = 5
+
+    }
+  })
+
   return radar_charts; // 返回 chart 后可以自动绑定触摸操作
 }
 
@@ -493,6 +675,35 @@ function initPieChart(canvas, width, height) {
   return $pie_charts; // 返回 chart 后可以自动绑定触摸操作
 }
 
+// 干扰图表初始化 interfere_echarts
+function interfereChart(canvas, width, height) {
+  $interfere_echarts = echarts.init(canvas, null, {
+    width: width,
+    height: height,
+  });
+  canvas.setChart($interfere_echarts);
+
+  var option = getInterfereChartsOption(); // ECharts 配置项
+
+  $interfere_echarts.setOption(option);
+
+  return $interfere_echarts; // 返回 chart 后可以自动绑定触摸操作
+}
+// 调整能力表初始化 interfere_echarts
+function adjustmentCharts(canvas, width, height) {
+  $adjustment_echarts = echarts.init(canvas, null, {
+    width: width,
+    height: height,
+  });
+  canvas.setChart($adjustment_echarts);
+
+  var option = getAdjustmentChartsOption(); // ECharts 配置项
+
+  $adjustment_echarts.setOption(option);
+
+  return $adjustment_echarts; // 返回 chart 后可以自动绑定触摸操作
+}
+
 export default {
   name: "index_container",
   components: {
@@ -503,11 +714,13 @@ export default {
       // 0:未选择 1:时间 2:次数
       // 折线图 表格数据
       attCharts: initAttChart,
-      alpha_betaCharts: initABChart,
-      delta_thetaCharts: initDTChart,
+      // alpha_betaCharts: initABChart,
+      // delta_thetaCharts: initDTChart,
       hight_att_charts: initHightPieChart,
       radar_charts: initRadarChart,
       pie_charts: initPieChart,
+      interfere_charts: interfereChart,
+      adjustment_charts: adjustmentCharts,
 
       echarts,
       record: {},
@@ -522,6 +735,10 @@ export default {
       data_lines: [],
       // 是否时间太短
       report_show: true,   // 报告
+
+      // 五角图解释弹窗
+      is_explainShow: false,
+      radar_indication_type: Number,
     };
   },
   methods: {
@@ -552,12 +769,11 @@ export default {
 
             //设置雷达图
             $options = getRadarChartOption([
-              $this.record.att_average, //平均
-              $this.record.att_scope, //广度
-              $this.record.att_burst, //爆发
-              $this.record.att_interfere, //抗干扰
-              $this.record.att_start, //启动
-              $this.record.att_height, // 高专注占比
+              $this.record.average, //平均
+              $this.record.heightValue, //高专注占比
+              $this.record.awakenLast, //唤醒
+              $this.record.lineMedValue, //和谐度
+              $this.record.stableValue, //稳定度
             ]);
             radar_charts.setOption($options);
 
@@ -626,8 +842,8 @@ export default {
                 },
               };
               this.changeMin($e);
-              this.changeABMin($e);
-              this.changeDTMin($e);
+              // this.changeABMin($e);
+              // this.changeDTMin($e);
             } else {
               //处理 专注度 和  放松度的值
               $this.get_game_line(
@@ -636,15 +852,29 @@ export default {
                 $this.record.amp
               );
               // 处理 alpha beta
-              $this.get_game_ab(
-                $this.record.low_alpha,
-                $this.record.high_alpha,
-                $this.record.low_beta,
-                $this.record.high_beta
-              );
+              // $this.get_game_ab(
+              //   $this.record.low_alpha,
+              //   $this.record.high_alpha,
+              //   $this.record.low_beta,
+              //   $this.record.high_beta
+              // );
               // // 处理 delta theta
-              $this.get_game_dt($this.record.delta, $this.record.theta);
+              // $this.get_game_dt($this.record.delta, $this.record.theta);
             }
+
+            // 干扰值数据传输
+            $this.interfereData = interfereAction($res.data.interfereArr);
+            let $interfere_option = getInterfereChartsOption(
+              $this.interfereData
+            );
+            $interfere_echarts.setOption($interfere_option);
+            // 调整能力数据传输
+            $this.adjustmentData = interfereAction($res.data.burstArr);
+            let $adjustment_option = getAdjustmentChartsOption(
+              $this.adjustmentData
+            );
+            $adjustment_echarts.setOption($adjustment_option);
+
           }, 1000);
         },
         (err) => {
@@ -660,21 +890,21 @@ export default {
       );
       att_charts.setOption($option);
     },
-    get_game_ab($line_alphaL, $line_alphaH, $line_betaL, $line_betaH) {
-      let $option = {};
-      $option = util.getABOption(
-        $line_alphaL,
-        $line_alphaH,
-        $line_betaL,
-        $line_betaH
-      );
-      alpha_beta_charts.setOption($option);
-    },
-    get_game_dt($line_delta, $line_theta) {
-      let $option = {};
-      $option = util.getDTOption($line_delta, $line_theta);
-      delta_theta_charts.setOption($option);
-    },
+    // get_game_ab($line_alphaL, $line_alphaH, $line_betaL, $line_betaH) {
+    //   let $option = {};
+    //   $option = util.getABOption(
+    //     $line_alphaL,
+    //     $line_alphaH,
+    //     $line_betaL,
+    //     $line_betaH
+    //   );
+    //   alpha_beta_charts.setOption($option);
+    // },
+    // get_game_dt($line_delta, $line_theta) {
+    //   let $option = {};
+    //   $option = util.getDTOption($line_delta, $line_theta);
+    //   delta_theta_charts.setOption($option);
+    // },
     to_game_records() {
       mpvue.navigateTo({
         url: "/pages/game_record/main",
@@ -693,30 +923,34 @@ export default {
       $this.get_game_line($line_data, $med_data, $amp_data);
     },
     //  切换时间查看线 数据
-    changeABMin($e) {
-      let $index = $e.mp.detail.name;
-      // 0-2  2-4  4-6
-      // 0    1    2
-      let $start = $index * 120;
-      let $end = ($index + 1) * 120;
-      console.log($start, $end);
-      let low_alpha = $this.record.low_alpha.slice($start, $end);
-      let high_alpha = $this.record.high_alpha.slice($start, $end);
-      let low_beta = $this.record.low_beta.slice($start, $end);
-      let high_beta = $this.record.high_beta.slice($start, $end);
-      $this.get_game_ab(low_alpha, high_alpha, low_beta, high_beta);
-    },
-    //  切换时间查看线 数据
-    changeDTMin($e) {
-      let $index = $e.mp.detail.name;
-      // 0-2  2-4  4-6
-      // 0    1    2
-      let $start = $index * 120;
-      let $end = ($index + 1) * 120;
-      let delta = $this.record.delta.slice($start, $end);
-      let theta = $this.record.theta.slice($start, $end);
-      $this.get_game_dt(delta, theta);
-    },
+    // changeABMin($e) {
+    //   let $index = $e.mp.detail.name;
+    //   // 0-2  2-4  4-6
+    //   // 0    1    2
+    //   let $start = $index * 120;
+    //   let $end = ($index + 1) * 120;
+    //   console.log($start, $end);
+    //   let low_alpha = $this.record.low_alpha.slice($start, $end);
+    //   let high_alpha = $this.record.high_alpha.slice($start, $end);
+    //   let low_beta = $this.record.low_beta.slice($start, $end);
+    //   let high_beta = $this.record.high_beta.slice($start, $end);
+    //   $this.get_game_ab(low_alpha, high_alpha, low_beta, high_beta);
+    // },
+    // //  切换时间查看线 数据
+    // changeDTMin($e) {
+    //   let $index = $e.mp.detail.name;
+    //   // 0-2  2-4  4-6
+    //   // 0    1    2
+    //   let $start = $index * 120;
+    //   let $end = ($index + 1) * 120;
+    //   let delta = $this.record.delta.slice($start, $end);
+    //   let theta = $this.record.theta.slice($start, $end);
+    //   $this.get_game_dt(delta, theta);
+    // },
+    // 关闭雷达解释
+    closeRadarExplain() {
+      $this.is_explainShow = false
+    }
   },
   mounted() {
     $this.userinfo = wx.getStorageSync("userinfo");
@@ -875,7 +1109,6 @@ image.boy {
   justify-content: center;
   align-items: center;
   color: #676767;
-  z-index: 999;
   margin-top: -100px;
   margin-left: 5px;
 }
@@ -1036,6 +1269,47 @@ image.boy {
   /*box-shadow: 0px 6px 11px #dadada;*/
 }
 
+.radar_explain_bg {
+  position: fixed;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  background: rgba(0,0,0,.8);
+  z-index: 999;
+}
+
+.radar_explain_wrap {
+  width: 80%;
+  height: 150px;
+  position: fixed;
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%,-50%);
+  z-index: 999;
+}
+
+.radar_explain_view{
+  width: 100%;
+  height: 100%;
+  background-color: #fff;
+  border-radius: 10px;
+  padding:25px;
+  box-sizing: border-box;
+  overflow: initial;
+}
+
+.text_explain_center{
+	display: flex;
+  align-items: center
+}
+
+.text_explain_wrap{
+	display:block;
+	white-space: pre-wrap;
+  line-height:22px
+}
+
 /* 核销详情 */
 .sheet {
   color: #6d6d6d;
@@ -1074,7 +1348,6 @@ image.boy {
 /* 专注力干扰看板 */
 .absorbed_change {
   width: 100%;
-  /* padding: 0 7px; */
   box-sizing: border-box;
   margin-top: 18px;
 }
@@ -1121,13 +1394,13 @@ image.boy {
 
 .interfere .interfere_text .interfere_text_num {
   font-size: 18px;
-  font-weight: 900;
+  font-weight: 800;
 }
 
 /* 干扰 echarts */
 .interfere_echarts_wrap {
   width: 360px;
-  height: 193px;
+  height: 200px;
   background: #f3f3f3;
   opacity: 0.6;
   box-shadow: 0px 6px 11px #dadada;
@@ -1200,8 +1473,7 @@ image.boy {
 .adjustment_echarts_wrap {
   margin: 0 auto;
   width: 360px;
-  height: 193px;
-
+  height: 200px;
   background: #f3f3f3;
   opacity: 0.6;
   box-shadow: 0px 6px 11px #dadada;
@@ -1249,15 +1521,16 @@ image.boy {
   display: flex;
   justify-content: space-around;
   margin-top: 28px;
+  margin-bottom: 30px
 }
 
 .absorbed_change_footer .footer_text {
-  font-size: 16px;
+  font-size: 15px;
   color: #676767;
 }
 
 .footer_text_W {
-  font-size: 21px;
+  font-size: 18px;
   font-weight: 600;
 }
 
@@ -1270,13 +1543,13 @@ image.boy {
   font-size: 10px;
 }
 
-.label_up {
+/* .label_up {
   color: #9a95b7;
   font-size: 10px;
   display: flex;
   flex-wrap: wrap;
   width: 270px;
-}
+} */
 
 /*点图*/
 .dot {
@@ -1302,11 +1575,11 @@ image.boy {
 /* .dot-Alpha {
   background: #FF9107;
 } */
-.dot-Theta {
+/* .dot-Theta {
   background: #ffe838;
-}
+} */
 
-.dot-Low-Alpha {
+/* .dot-Low-Alpha {
   background: #38ff49;
 }
 
@@ -1320,15 +1593,15 @@ image.boy {
 
 .dot-High-Beta {
   background: #00ccff;
-}
+} */
 
 /* .dot-Beta {
   background: #00CCFF;
 } */
 
-.dot-Delta {
+/* .dot-Delta {
   background: #ff77b3;
-}
+} */
 
 /* 节标题  */
 .bar {
@@ -1432,7 +1705,6 @@ image.boy {
   justify-content: center;
   align-items: center;
   color: #676767;
-  z-index: 999;
   margin-top: -190px;
 }
 

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

@@ -157,6 +157,8 @@ export default {
     $this.is_add = 0
   },
   onUnload(){
+    // $this.close_success_pop();
+    // $this.close_err_pop();
     $this.isAdd = 0
     $this.add_price = 0
     $this.isReduce =0

+ 222 - 67
src/pages/user_center/recharge/index.vue

@@ -15,18 +15,19 @@
         <text class="mine_min">{{ userinfo.play_time }}</text>
       </view>
     </div>
-  
+
+  <div v-if="userinfo.level==11">
     <!--    标题-->
-    <div class="title flex padding-left align-center margin-top-xl margin-bottom-xs">
+    <div class="title flex padding-left align-center margin-top-xl margin-bottom">
       <div class="line margin-right-xs "></div>
-      <text class="titles">会员升级</text>
+      <text class="titles">家庭VIP</text>
     </div>
 
     <!--    黄金会员-->
     <div
       v-for="(item,index) in time_cards"
       :key="index"
-      class="margin-bottom-df"
+      class="margin-bottom"
     >
       <div
         class="vip"
@@ -43,7 +44,7 @@
               style="padding-top:14px;"
             >
               <view>
-                <text class="mine_min  text-white">{{ item.play_time }}</text>
+                <!-- <text class="mine_min  text-white">{{ item.play_time }}</text> -->
                 <text class="text-white">&nbsp;分钟</text>
               </view>
               <view>
@@ -65,10 +66,22 @@
                 <text class="text-white text-sm">价格</text>
               </view>
               <view class="text-center">
-                <text class="text-white mine_min_litt">{{ item.price }} <text class="text-white text-sm"></text> </text>
+                <text class="text-white mine_min_litt"><text class="text-white text-sm"></text>{{ item.price }}</text>
               </view>
               <view class="text-center">
-                <img
+                <button
+                 :class="index==0?'monthly_btn_bg': index==1?'seasonly_btn_bg':'yearly_btn_bg'"
+                  class="check_detail text-white cu-btn round"
+                  v-if="card_action_show == item.goods_id">
+                  收起详情
+                 </button>
+                 <button
+                 :class="index==0?'monthly_btn_bg': index==1?'seasonly_btn_bg':'yearly_btn_bg'"
+                  class="check_detail text-white cu-btn round"
+                  v-else>
+                  查看详情
+                 </button>
+                <!-- <img
                   src="https://img.shuimuai.com/web/btn_seedetil_1%402x.png"
                   class="check_detail"
                   alt=""
@@ -79,7 +92,7 @@
                   class="check_detail"
                   alt=""
                   v-else
-                >
+                > -->
               </view>
 
             </div>
@@ -111,15 +124,15 @@
     </div>
 
 
-    <div class="title flex padding-left align-center margin-top-lg margin-bottom-xs">
+    <div class="title flex padding-left align-center margin-top-lg margin-bottom">
       <div class="line margin-right-xs"></div>
-      <text class="titles">体验次卡</text>
+      <text class="titles">专注时间包</text>
     </div>
     <!--  体验次卡-->
     <div
       v-for="(item,index) in frequency_card"
       :key="index"
-      class="margin-bottom-df"
+      class="margin-bottom"
     >
 
       <div
@@ -137,8 +150,8 @@
               style="padding-top:14px;"
             >
               <view>
-                <text class="mine_min  text-white">{{ item.title2 }}</text>
-                <text class="text-white">&nbsp;{{ item.date }}</text>
+                <text class="mine_min" :class="index==0?'relax_text':'hard_text'">{{ item.play_time }}</text>
+                <text :class="index==0?'relax_text':'hard_text'">&nbsp;分钟</text>
               </view>
               <view>
                 <text class="text-white text-sm subGrey">{{ item.title1 }}</text>
@@ -160,18 +173,30 @@
                 <text class="text-white mine_min_litt">{{ item.price }}</text>
               </view>
                <view class="text-center">
-              <img
+                 <button
+                 :class="index==0?'relax_btn_bg':'hard_btn_bg'"
+                  class="check_detail text-white cu-btn round"
+                  v-if="card_action_show == item.goods_id">
+                  收起详情
+                 </button>
+                 <button
+                 :class="index==0?'relax_btn_bg':'hard_btn_bg'"
+                  class="check_detail text-white cu-btn round"
+                  v-else>
+                  查看详情
+                 </button>
+              <!-- <img
                 src="https://img.shuimuai.com/web/btn_seedetil_1%402x.png"
                 class="check_detail"
                 alt=""
                 v-if="card_action_show == item.goods_id"
-              >
-              <img
+              > -->
+              <!-- <img
                 src="https://img.shuimuai.com/web/btn_seedetil_2.png"
                 class="check_detail"
                 alt=""
                 v-else
-              >
+              > -->
               </view>
 
             </div>
@@ -203,13 +228,32 @@
         </div>
       </view>
     </div>
+  </div>
 
+  <div class="text-center scan_wrap" v-else>
+    <span>请扫包装盒中的VIP会员卡二维码</span>
+    <button class="text-white cu-btn round scan_btn" @click="to_scan">扫描</button>
+  </div>
+
+<!-- 不能购买弹窗 -->
+  <van-popup
+    :custom-style='cant_buy_popup'
+    :show="is_can_buy"
+    :round="true" 
+    @close="onClosePopup">
+
+      <span class="margin-bottom-sm">您是家庭VIP会员</span>
+      <span>无需购买时间包</span>
+  </van-popup>
+  <van-toast id="van-toast"/>
   </div>
 </template>
 
 <script>
+import Toast from "../../../../static/vant/toast/toast";
 import { goodsCardList } from "../../../requests/goods";
 import { createOrder, deleteOrder } from "../../../requests/orders";
+import { vipCode, check_vip } from "../../../requests/vip";
 
 var $this;
 export default {
@@ -227,48 +271,76 @@ export default {
       userinfo: {},
       //  选中的充值卡
       selection_card: {},
+      // 不可购买弹窗
+      is_can_buy: false,
+      cant_buy_popup: `height:120px;
+            width:70%;
+            display:flex;
+            flex-direction:column;
+            justify-content:center;
+            align-items:center
+      `,
     };
   },
   watch: {},
   methods: {
     //确认订单
     to_confirm($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,
+      // 判断家庭VIP是否过期
+      check_vip().then((res) => {
+        console.log("vip", res);
+
+        if (res.code == 0) {
+          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,
+          });
+        } else {
+          $this.is_can_buy = true;
+        }
       });
     },
+    onClosePopup() {
+      $this.is_can_buy = false;
+    },
     //跳转填写地址
     to_write_address() {
       mpvue.navigateTo({
@@ -298,9 +370,39 @@ export default {
         url: "/pages/user_center/orders/main",
       });
     },
+    // 扫描会员卡
+    to_scan() {
+      wx.scanCode({
+        onlyFromCamera: true,
+        success(res) {
+          let $data = res;
+          if ($data.result) {
+            // console.log($data.result)
+            let url = decodeURIComponent($data.result);
+            let $code = url.match(/\?code=(.*)/);
+
+            // 会员码
+            let $vip_code = $code[1];
+
+            vipCode($vip_code).then((res) => {
+              let $res = res.data;
+              console.log("vipcode", $res);
+
+              if ($res.code == 0) {
+                mpvue.navigateTo({
+                  url: "/pages/index/main",
+                });
+              } else {
+                Toast.fail($res.errmsg);
+              }
+            });
+          }
+        },
+      });
+    },
     //  切换显示
     changeCardShow($id) {
-      console.log($id);
+      // console.log($id);
       if ($this.card_action_show == $id) {
         $this.card_action_show = 0;
       } else {
@@ -312,7 +414,7 @@ export default {
     $this.get_card_list();
     $this.userinfo = wx.getStorageSync("userinfo");
   },
-  onShow(){
+  onShow() {
     $this.get_card_list();
   },
   created() {
@@ -320,8 +422,8 @@ export default {
   },
   onLoad() {},
   onUnload() {
-    $this.close_success_pop();
-    $this.close_err_pop();
+    // $this.close_success_pop();
+    // $this.close_err_pop();
   },
 };
 </script>
@@ -354,6 +456,27 @@ export default {
   background: #5d4db8;
 }
 
+/* 扫描 */
+.scan_wrap {
+  width: 100%;
+  height: 100px;
+  position: fixed;
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%, -50%);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.scan_btn {
+  width: 90%;
+  height: 40px;
+  background: #4a73ef;
+  border-radius: 40px;
+}
+
 /*会员*/
 .vip {
   width: 345px;
@@ -364,22 +487,22 @@ export default {
 }
 
 .gold {
-  background-image: url("https://img.shuimuai.com/web/frame_huangjinhuiyuan.png");
+  background-image: url("https://img.shuimuai.com/bg_monthly_vip.png");
 }
 
 .platina {
-  background-image: url("https://img.shuimuai.com/web/frame_baijinhuiyuan.png");
+  background-image: url("https://img.shuimuai.com/bg_seasonly_vip.png");
 }
 
 .diamond {
-  background-image: url("https://img.shuimuai.com/web/frame_zuanshihuiyuan.png");
+  background-image: url("https://img.shuimuai.com/bg_yearly_vip.png");
 }
 
 .normal {
-  background-image: url("https://img.shuimuai.com/web/frame_cika.png");
+  background-image: url("https://img.shuimuai.com/bg_relaxly_time.png");
 }
 .oneMonth {
-  background-image: url("https://img.shuimuai.com/frame_oneMonth.png");
+  background-image: url("https://img.shuimuai.com/bg_hardly_time.png");
 }
 
 .card_body {
@@ -387,8 +510,38 @@ export default {
 }
 
 .check_detail {
-  width: 73px;
-  height: 22px;
+  width: 90px;
+  height: 28px;
+}
+
+/* 家庭VIP */
+.monthly_btn_bg {
+  background: #ec7945;
+}
+
+.seasonly_btn_bg {
+  background: #1c6cda;
+}
+
+.yearly_btn_bg {
+  background: #5959f8;
+}
+
+/* 专注时间包颜色 */
+.relax_text {
+  color: #eb7d07;
+}
+
+.hard_text {
+  color: #4ca8eb;
+}
+
+.relax_btn_bg {
+  background: #e87f12;
+}
+
+.hard_btn_bg {
+  background: #2f9ae8;
 }
 
 .desc {
@@ -496,11 +649,13 @@ export default {
   color: #ffffff;
 }
 .yellowButt {
-  width: 208px;
-  height: 44px;
-  background: #ffb400;
-  box-shadow: 0px 3px 7px 0px #ff9306;
-  border-radius: 5px;
+  width: 320px;
+  height: 40px;
+  background: linear-gradient(-90deg, #e1a268 0%, #f7cfaa 100%);
+  border-radius: 40px;
   margin-bottom: 27px;
 }
 </style>
+<style>
+</style>
+

+ 3 - 1
src/pages/user_center/recharge/main.json

@@ -1,6 +1,8 @@
 {
   "usingComponents": {
     "van-row": "../../../static/vant/row/index",
-    "van-col": "../../../static/vant/col/index"
+    "van-col": "../../../static/vant/col/index",
+    "van-toast": "../../../static/vant/toast/index",
+    "van-popup": "../../../static/vant/popup/index"
   }
 }

+ 15 - 0
src/requests/vip.js

@@ -5,3 +5,18 @@ export function vipPowerLevel($params = {}) {
   $params['access_token'] = wx.getStorageSync('token')
   return fly.post('power/power-level', $params)
 }
+
+// 扫会员卡二维码
+export function vipCode($vip_code) {
+  let $params = {}
+  $params['invite_id'] = $vip_code
+  $params['access_token'] = wx.getStorageSync('token')
+  return fly.post('invite/scan', $params)
+}
+
+// 是否可以购买
+export function check_vip() {
+  let $params = {}
+  $params['access_token'] = wx.getStorageSync('token')
+  return fly.post('user/check-user', $params)
+}

+ 156 - 30
src/utils/index.js

@@ -559,22 +559,22 @@ export function formatSeconds(value) {
 }
 
 //获取等级名称
-function get_level_name($level_id) {
-  let $level = [
-    "普通用户",
-    "体验会员",
-    "黄金会员",
-    "白金会员",
-    "钻石会员",
-    "创客代理",
-    "区域代理",
-    "合伙人",
-    "店员",
-    "店长",
-    "老师",
-  ];
-  return $level[$level_id];
-}
+// function get_level_name($level_id) {
+//   let $level = [
+//     "普通用户",
+//     "体验会员",
+//     "黄金会员",
+//     "白金会员",
+//     "钻石会员",
+//     "创客代理",
+//     "区域代理",
+//     "合伙人",
+//     "店员",
+//     "店长",
+//     "老师",
+//   ];
+//   return $level[$level_id];
+// }
 
 export function cal_down_time($final_time) {
   let $today = new Date().getTime();
@@ -650,30 +650,28 @@ export function getRadarChartOption($params) {
     radar: {
       radius: "65%",
       indicator: [{
-          name: "专注力平均指数",
+          name: "专注力平均",
           max: 100
         },
         {
-          name: "专注力广度指数",
+          name: "高专注力占比",
           max: 100
         },
         {
-          name: "专注力爆发指数",
+          name: "专注唤醒效率",
           max: 100
         },
         {
-          name: "专注力抗性指数",
+          name: "整体和谐度",
           max: 100
         },
         {
-          name: "专注力启动指数",
-          max: 100
-        },
-        {
-          name: "高专注力占比",
+          name: "专注力稳定度",
           max: 100
         },
       ],
+      // 点击事件
+      triggerEvent: true,
       splitArea: {
         show: true,
         areaStyle: {
@@ -711,15 +709,15 @@ export function getRadarChartOption($params) {
       silent: true,
       name: "预算 vs 开销(Budget vs spending)",
       type: "radar",
-      color: "#FFB72D",
+      color: "#5470c6",
       symbolSize: 3,
       data: [{
         value: $params,
         // name: '实际开销(Actual Spending)'
         name: "专注力要素分析数据",
-        areaStyle: {
-          color: "#FFB72D",
-        },
+        // areaStyle: {
+        //   color: "#FFB72D",
+        // },
       },],
     },],
   };
@@ -756,6 +754,113 @@ export function getPieChartsOption($pie_datas) {
   return option;
 }
 
+// 受干扰次数 getInterfereChartsOption 小乌龟
+export function getInterfereChartsOption(interfere_datas) {
+  // console.log('干扰初始化', interfere_datas)
+  if (interfere_datas) {
+    let option = {
+      color: '#23CC92',
+      // 标题
+      title: {
+        // left: 1220,
+      },
+      // 提示
+      tooltip: {
+        trigger: "axis",
+        axisPointer: {
+          type: "shadow",
+        },
+      },
+      grid: {
+        top: 20,
+        bottom: 20
+      },
+      // x轴数据显示
+      xAxis: {
+        type: 'category',
+        boundaryGap: false,
+        // data: ['0', '2', '4', '6', '8', '10', '12', '14', '16', '18', '20'],
+        splitNumber: 11,
+      },
+      // y轴坐标显示
+      yAxis: {
+        color: '#23CC92',
+        type: "value",
+        splitNumber: 5,
+        min: -100,
+        max: 0,
+        axisLabel: {
+          formatter: '{value}',
+          textStyle: {
+            color: '#23CC92'
+          }
+        }
+      },
+      //数据配置项
+      series: [{
+        data: interfere_datas,
+        type: "line",
+        large: true,
+        areaStyle: {}
+      },],
+    }
+    return option
+  }
+}
+
+//  能力调整 getAdjustmentChartsOption
+export function getAdjustmentChartsOption(interfere_datas) {
+  //   console.log('调整初始化', interfere_datas)
+  if (interfere_datas) {
+    let option = {
+      color: '#F3A100',
+      // 标题
+      title: {
+        // left: 1220,
+      },
+      grid: {
+        top: 20,
+        bottom: 20
+      },
+      // 提示
+      tooltip: {
+        trigger: "axis",
+        axisPointer: {
+          type: "shadow",
+        },
+      },
+      // x轴数据显示
+      xAxis: {
+        type: 'category',
+        boundaryGap: false,
+      },
+      // y轴坐标显示
+      yAxis: {
+        // x: "center",
+        type: "value",
+        splitNumber: 5,
+        min: 0,
+        max: 100,
+        axisLabel: {
+          formatter: '{value}',
+          textStyle: {
+            color: '#F3A100'
+          }
+        }
+      },
+      //数据配置项
+      series: [{
+
+        data: interfere_datas,
+        type: "line",
+        large: true,
+        areaStyle: {}
+      },],
+    }
+    return option
+  }
+}
+
 // 时间戳转化成时间格式
 export function timestampToTimeS(timestamp) {
   var date = new Date(timestamp * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
@@ -771,6 +876,26 @@ export function timestampToTimeS(timestamp) {
   return Y + M + D + h + m + s;
 }
 
+// 成绩记录干扰图表数据处理  
+export function interfereAction($data) {
+  if ($data) {
+    let $interfereArr = []
+    let $objData = {};
+    //  自定义的对象 1200s 20分钟
+    for (var i = 0; i < 1200; i++) {
+      $objData[i] = 0;
+    }
+    var $newObj = Object.assign($objData, $data);
+    // 对象转数组
+    for (const key in $newObj) {
+      $interfereArr.push($newObj[key]);
+    }
+    return $interfereArr
+
+  } else {
+    console.log("无数据", $data)
+  }
+}
 
 export default {
   formatNumber,
@@ -779,6 +904,7 @@ export default {
   getABOption,
   getDTOption,
   getBaseOption,
-  get_level_name,
+  // get_level_name,
   timestampToTimeS,
+  interfereAction
 };

+ 11 - 4
src/utils/user.js

@@ -36,13 +36,20 @@ export function reload_userinfo($this) {
 
     let nowTime = timestamp()
     //判断是否过期
-    if (nowTime > $this.userinfo['validity_unformattedTime']) {
-      $this.userinfo.isActive = false
-      $this.userinfo.isntActive = true
+    if ($this.userinfo['level'] == 11) {
+      if (nowTime > $this.userinfo['validity_unformattedTime']) {
+        $this.userinfo.isActive = false
+        $this.userinfo.isntActive = true
+      } else {
+        $this.userinfo.isActive = true
+        $this.userinfo.isntActive = false
+      }
+
     } else {
       $this.userinfo.isActive = true
       $this.userinfo.isntActive = false
     }
+    
 
     //当天具体日期
     // let date = new Date();
@@ -56,7 +63,7 @@ export function reload_userinfo($this) {
 
     $this.userinfo['validity_time'] = formatTime($this.userinfo['validity_time'])
     // console.log("数据:", $this.userinfo['validity_unformattedTime']);
-    $this.userinfo['level_name'] = utils.get_level_name($this.userinfo['level'])
+    // $this.userinfo['level_name'] = utils.get_level_name($this.userinfo['level'])
     $this.userinfo['free_time'] = formatSeconds($this.userinfo['free_time'])
     //设置邀请码
     user_store.setters.set_invite_code($this.userinfo['invite_id'])