浏览代码

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

nieyuge 2 年之前
父节点
当前提交
54ef9a4d62

+ 26 - 3
src/view/iframe/treasure-hunt/components/invite-friends.vue

@@ -73,12 +73,36 @@ let facebookAppConfig = {
 onMounted(() => {
     state.btn_loading = false
     setFrontConfig();
+    initInviteChannel()
+})
+
+chrome.management.onDisabled.addListener(() => {
+    initInviteChannel()
+})
+chrome.management.onEnabled.addListener(() => {
+    initInviteChannel()
+})
+
+chrome.management.onInstalled.addListener(() => {
+    initInviteChannel()
+})
+chrome.management.onUninstalled.addListener(() => {
+    initInviteChannel()
+})
+
+let linePluginInstalled
+const initInviteChannel = () => {
     try {
         chrome.management.get('ophjlpahpchlmihnnnihgmmeilfjmjjc', (res) => {
-            let linePluginInstalled = 0
+            if ((res && linePluginInstalled == 1) || (!res && linePluginInstalled == 0)) {
+                return
+            }
             if (res) {
                 linePluginInstalled = 1
+            } else {
+                linePluginInstalled = 0
             }
+
             inviteChannel({
                 params: {
                     linePluginInstalled,
@@ -93,8 +117,7 @@ onMounted(() => {
     } catch (error) {
         console.error(error)
     }
-
-})
+}
 
 async function clickBtn() {
     let _userInfo = await state.checkIsLogin()

+ 2 - 1
src/view/iframe/treasure-hunt/components/invite-list.vue

@@ -215,6 +215,7 @@ async function clickBtn() {
                 text-align: center;
 
                 img {
+                    cursor: pointer;
                     border-radius: 50px;
                     width: 30px;
                     height: 30px;
@@ -233,7 +234,7 @@ async function clickBtn() {
                     color: #000000;
                     font-weight: 500;
                     font-size: 15px;
-
+                    cursor: pointer;
                 }
 
                 div:nth-child(2) {