Browse Source

9/2 打包正式,外发券即时性问题

Foystor 3 năm trước cách đây
mục cha
commit
8d565a13f3

+ 2 - 1
config/dev.env.js

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

+ 6 - 2
project.private.config.json

@@ -15,8 +15,12 @@
         {
           "name": "pages/index/main",
           "pathName": "pages/index/main",
-          "query": "other=1",
-          "scene": 1001
+          "query": "other=0",
+          "scene": 1065,
+          "partialCompile": {
+            "enabled": true,
+            "pages": []
+          }
         },
         {
           "name": "pages/coupons/main",

+ 9 - 7
src/App.vue

@@ -6,26 +6,28 @@ export default {
     })
   },
   //外发
-  onLaunch(options){
-      // console.log('链接参数',options.query)
-      // console.log('启动小程序的场景值:', options.scene)
-      let scene = options.scene
+  onShow(options){
       let query = options.query.other
-      // 场景值
-      if(scene == 1065){
+      console.log('进入小程序了',options)
+      // 有无参数
+      if(query){
         console.log('外发给你')
         wx.setStorageSync("is_out", true);
       }else{
         wx.setStorageSync("is_out", false);
       }
       // 判断是啥券
-      if(query == 1 ){
+      if(query == 1){
         console.log("外发其它券")
         wx.setStorageSync("is_other", true);
       }else{
         wx.setStorageSync("is_other", false);
       }
   },
+  onHide(){
+     wx.removeStorageSync("is_out");
+     wx.removeStorageSync("is_other");
+  },
   created() {
 
     // 调用API从本地缓存中获取数据

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

@@ -227,38 +227,38 @@ export default {
   },
   methods: {
     //会员日注册领取体验卡
-    get_ticket() {
-      if ($this.receive == 0) {
-        $this.receive += 1;
-        console.log($this.receive);
-        $this.first = false;
-        let params
-        couponReceiveFirstID().then((res)=>{
-          let resData = res.data.data
-          params={
-            ID: resData.coupon_category_id,
-            start_time: resData.validity_time.start_time,
-            end_time: resData.validity_time.end_time,
-          }
-          couponReceiveFirst(params).then((res) => {
-            let $res = res.data;
-            if ($res.code == 0) {
-               $this.first = false;
-               userUpdateLoginTime().then((res) => {
-                let $res = res.data;
-                $this.userinfo["login_time"] = $res.data;
-                $this.$store = user_store.setters.set_userinfo($this.userinfo);
-                wx.setStorageSync("is_first", false);
-                reload_userinfo($this);
-              });
-              Toast.success($res.errmsg);
-            } else {
-               Toast.fail($res.errmsg);
-            }
-          });
-        })
-      }
-    },
+    // get_ticket() {
+    //   if ($this.receive == 0) {
+    //     $this.receive += 1;
+    //     console.log($this.receive);
+    //     $this.first = false;
+    //     let params
+    //     couponReceiveFirstID().then((res)=>{
+    //       let resData = res.data.data
+    //       params={
+    //         ID: resData.coupon_category_id,
+    //         start_time: resData.validity_time.start_time,
+    //         end_time: resData.validity_time.end_time,
+    //       }
+    //       couponReceiveFirst(params).then((res) => {
+    //         let $res = res.data;
+    //         if ($res.code == 0) {
+    //            $this.first = false;
+    //            userUpdateLoginTime().then((res) => {
+    //             let $res = res.data;
+    //             $this.userinfo["login_time"] = $res.data;
+    //             $this.$store = user_store.setters.set_userinfo($this.userinfo);
+    //             wx.setStorageSync("is_first", false);
+    //             reload_userinfo($this);
+    //           });
+    //           Toast.success($res.errmsg);
+    //         } else {
+    //            Toast.fail($res.errmsg);
+    //         }
+    //       });
+    //     })
+    //   }
+    // },
     //领取外发卡券
     get_coupon(){
        wx.setStorageSync("is_out", false);

+ 1 - 2
src/pages/index/index.vue

@@ -191,10 +191,9 @@ export default {
   onHide() {},
   onLoad($option) {
     if (process.env.NODE_ENV == "development") {
-      wx.setStorageSync("token", "ZbNv-hpdpmxk895iqUrEwe4kCJjEWCJD");
+      // wx.setStorageSync("token", "ZbNv-hpdpmxk895iqUrEwe4kCJjEWCJD");
     }
 
-
     if (game_store.getters.getGameStatus() == 1) {
       Dialog.alert({
         title: "系统提示",

+ 13 - 8
src/pages/report/index.vue

@@ -10,7 +10,7 @@
           <text>{{ record.phone }}</text>
         </view>
         <view class="box_wrap info_right">
-          <text class="margin-bottom-sm margin-top-xs">{{ record.start_time }}</text>
+          <text style="margin-bottom:12px">{{ record.start_time }}</text>
           <text>训练时间 : {{ record.play_time }}</text>
         </view>
 
@@ -41,6 +41,7 @@
     </view>
 
     <!--    专注力维持区间、受干扰次数,专注力最大爆发值、专注力启动时长-->
+
     <view class="margin-tb">
       <!-- 高专注力占比 -->
       <view class="margin_left">
@@ -51,10 +52,10 @@
             canvasId="demo-canvas-interfere"
           />
         </view>
-        <!-- <view class="left_content">
-          <view class="left_num">{{ record.height_absorbed }}%</view>
-          <view class="left_text">高专注力占比</view>
-        </view> -->
+        <view class="left_content">
+          <view class="left_num">{{ record.height_absorbed }}<text class="textLil text-gray">%</text></view>
+          <view class="left_text">高专注力<br/>&emsp;占比</view>
+        </view>
       </view>
       <!-- 数据详情 -->
       <view class="margin_centent">
@@ -409,7 +410,7 @@ export default {
       //是否截断数据
       is_cut: false,
       //数据截断数
-      data_section: 0,
+      data_section: 4,
       //数据集合
       data_lines: [],
 
@@ -449,7 +450,6 @@ export default {
             let $options = getHightPieChartOption(
               $this.record.height,
               $this.record.total,
-              $this.record.height_absorbed,
             );
             hight_att_pie_charts.setOption($options);
 
@@ -685,16 +685,21 @@ image.boy {
 }
 
 .margin-tb .margin_left .left_content {
+  height: 110px;
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   color: #676767;
+  z-index:999;
+  margin-top: -100px;
+  margin-left:5px
 }
 
 .margin-tb .margin_left .left_content .left_num {
-  font-size: 16px;
+  font-size: 18px;
   font-weight: 900;
+  margin-bottom: -3px
 }
 
 .margin-tb .margin_left .left_content .left_text {

+ 1 - 0
src/utils/index.js

@@ -593,6 +593,7 @@ export function getHightPieChartOption($params, $total) {
       show: false,
     },
     series: [{
+      silent: true,
       name: "访问来源",
       type: "pie",
       radius: ["58%","85%"],