bayi 2 anni fa
parent
commit
1973275355
4 ha cambiato i file con 17 aggiunte e 10 eliminazioni
  1. 1 1
      app.js
  2. 8 0
      pages/index/index.js
  3. 1 2
      pages/reading/index.js
  4. 7 7
      utils/request.js

+ 1 - 1
app.js

@@ -67,7 +67,7 @@ App({
         if (this.globalData.isIOS ? scene != 1104 : scene != 1023) {
           let preTime = wx.getStorageSync('preDesktopTime')
           let flag = !preTime ? true : (new Date() - preTime) / 43200000 > 1 ? true : false
-          if (flag) {
+          if (flag || !preTime) {
             this.globalData.desktopTips = true
             wx.setStorage({
               key: "preDesktopTime",

+ 8 - 0
pages/index/index.js

@@ -50,6 +50,10 @@ Page({
         this.setData({
           desktopTips: false
         })
+        wx.setStorage({
+          key: "preDesktopTime",
+          data: new Date()
+        })
       }, 6000)
     }
   },
@@ -139,5 +143,9 @@ Page({
     this.setData({
       desktopTips: false
     })
+    wx.setStorage({
+      key: "preDesktopTime",
+      data: new Date()
+    })
   }
 })

+ 1 - 2
pages/reading/index.js

@@ -247,7 +247,7 @@ Page({
         attachAudioUrl: 1,
         result: {
           details: {
-            gop_adjust: -0.8
+            gop_adjust: -0.2
           }
         }
       },
@@ -313,7 +313,6 @@ Page({
   },
   // 获取测评结果
   getRecordScore(res) {
-    console.log('评测结果:', res);
     const result = res.result;
     const integrity = Math.floor(result.integrity); //完成度
     const tone = Math.floor(result.tone); // 语调声调

+ 7 - 7
utils/request.js

@@ -6,13 +6,13 @@ const {
     envVersion
   }
 } = wx.getAccountInfoSync();
-// if (envVersion == 'develop') {
-baseUrl = 'https://reader-api.efunbox.cn/wx'
-oldUrl = 'https://reader-api.efunbox.cn'
-/* } else {
-baseUrl = 'https://reader-api.ai160.com/wx'
-oldUrl = 'https://reader-api.ai160.com'
-} */
+if (envVersion == 'develop') {
+  baseUrl = 'https://reader-api.efunbox.cn/wx'
+  oldUrl = 'https://reader-api.efunbox.cn'
+} else {
+  baseUrl = 'https://reader-api.ai160.com/wx'
+  oldUrl = 'https://reader-api.ai160.com'
+}
 
 function request(url, method, data, oldBaseUrl = false) {
   let header = {