Переглянути джерело

Merge branch 'test' of https://git.yishihui.com/DeNet/de-net into test

wenliming 3 роки тому
батько
коміт
fd871c4291

+ 3 - 3
src/http/configAPI.js

@@ -1,9 +1,9 @@
 export const appVersionCode = 1
 
 const api = {
-	production: 'https://api.denet.me',
-	pre: 'https://preapi.denet.me',
-	development: 'https://testapi.denet.me'
+	production: 'https://api.denet.net',
+	pre: 'https://preapi.denet.net',
+	development: 'https://testapi.denet.net'
 }
 
 export const baseAPIUrl = api[process.env.NODE_ENV] + '/denet'

+ 1 - 1
src/manifest.development.json

@@ -32,7 +32,7 @@
     ],
     "host_permissions": [
         "*://*/*",
-        "https://testh5.denet.me"
+        "https://testh5.denet.net"
     ],
     "permissions": [
         "tabs",

+ 3 - 4
src/manifest.pre.json

@@ -32,14 +32,12 @@
     ],
     "host_permissions": [
         "*://*/*",
-        "https://de-net-test.piaoquantv.com"
+        "https://preh5.denet.net"
     ],
     "permissions": [
         "tabs",
         "action",
         "cookies",
-        "declarativeNetRequest",
-        "webNavigation",
         "activeTab",
         "scripting",
         "storage"
@@ -49,7 +47,8 @@
         {
             "resources": [
                 "/iframe/publish.html",
-                "/iframe/red-packet.html"
+                "/iframe/red-packet.html",
+                "/iframe/home.html"
             ],
             "matches": [
                 "<all_urls>"

+ 0 - 58
src/manifest.preview.json

@@ -1,58 +0,0 @@
-{
-    "manifest_version": 3,
-    "name": "DeNet",
-    "description": "chrome extension",
-    "version": "0.0.1",
-    "background": {
-        "service_worker": "/js/background.js"
-    },
-    "icons": {
-        "16": "/logo/16.png",
-        "48": "/logo/48.png",
-        "128": "/logo/128.png"
-    },
-    "action": {
-        "default_popup": "popup.html"
-        // "default_icon": {
-        //     "16": "/logo/16.png",
-        //     "48": "/logo/48.png",
-        //     "128": "/logo/128.png"
-        // }
-    },
-    "content_scripts": [
-        {
-            "matches": [
-                "<all_urls>"
-            ],
-            "run_at": "document_start",
-            "js": [
-                "/js/content.js"
-            ]
-        }
-    ],
-    "host_permissions": [
-        "*://*/*",
-        "https://preh5.denet.me"
-    ],
-    "permissions": [
-        "tabs",
-        "action",
-        "cookies",
-        "activeTab",
-        "scripting",
-        "storage"
-    ],
-    "options_page": "options.html",
-    "web_accessible_resources": [
-        {
-            "resources": [
-                "/iframe/publish.html",
-                "/iframe/red-packet.html",
-                "/iframe/home.html"
-            ],
-            "matches": [
-                "<all_urls>"
-            ]
-        }
-    ]
-}

+ 1 - 1
src/manifest.production.json

@@ -32,7 +32,7 @@
     ],
     "host_permissions": [
         "*://*/*",
-        "https://h5.denet.me"
+        "https://h5.denet.net"
     ],
     "permissions": [
         "tabs",

+ 14 - 9
src/view/red-packet.vue

@@ -384,6 +384,12 @@ function myReceivedState() {
   // 我的红包已经过期了 and 大红包可以领取
   if (data.detail.myReceived.taskFinishStatus == 2 && !data.detail.receiveTimeExpired) {
     data.status = 'not-open'
+
+    // 任务已经被领完了
+    if (data.detail.totalCount == data.detail.receiveCount) {
+      data.status = 'close'
+      data.close_title = 'Better luck next time!'
+    }
   }
   // 我领取未完成 and 大红包可以领取
   if (data.detail.myReceived.taskFinishStatus == 0 && !data.detail.receiveTimeExpired) {
@@ -400,11 +406,7 @@ function myReceivedState() {
     data.close_title = `This Giveaways`
     data.close_text = `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`
   }
-  // 任务已经被领完了
-  if (data.detail.totalCount == data.detail.receiveCount) {
-    data.status = 'close'
-    data.close_title = 'Better luck next time!'
-  }
+
   // 我领取成功了
   if (data.detail.myReceived.taskFinishStatus == 1) {
     data.status = 'success'
@@ -589,21 +591,21 @@ function handleFinishRedPacket() {
                 if (_data[i].finished) {
                   data.done.follow = true
                 } else {
-                  alert('关注未完成')
+                  alert('Please complete the task: follow')
                 }
                 break
               case '2':
                 if (_data[i].finished) {
                   data.done.like = true
                 } else {
-                  alert('like未完成')
+                  alert('Please complete the task: like tweet')
                 }
                 break
               case '3':
                 if (_data[i].finished) {
                   data.done.retweet = true
                 } else {
-                  alert('转推未完成')
+                  alert('Please complete the task: Retweet')
                 }
                 break
             }
@@ -614,8 +616,11 @@ function handleFinishRedPacket() {
         data.error_txt = `oops, new accounts cannot participate in this event,`
         data.status = 'error'
         break
+      case "-106":
+        alert('Clicking too often, wait a moment and click again')
+        break
       default:
-        alert(res.msg)
+        console(res)
     }
   })
 }