Преглед изворни кода

Merge branch 'develop/3.2.2_tencent' into test_tencent

Damon пре 8 месеци
родитељ
комит
aa8001ddf2

+ 1 - 1
.env.development

@@ -5,4 +5,4 @@ VUE_APP_ENV = 'development'
 
 # 开发环境接口
 VUE_APP_BASE_API = 'https://web.ohplay.airsmartser.com/web'
-# VUE_APP_BASE_API = 'https://o3tapi.radio1964.com/web'
+# VUE_APP_BASE_API = 'https://o3tapi.radio1964.com/web'

+ 2 - 2
.env.production

@@ -4,5 +4,5 @@ NODE_ENV = production
 VUE_APP_ENV = 'production'
 
 # 生产环境接口
-VUE_APP_BASE_API = 'https://web.ohplay.airsmartser.com/web'
-# VUE_APP_BASE_API = 'https://client.ohplay.radio1964.net/web'
+VUE_APP_BASE_API = 'https://client.ohplay.airsmartser.com/web'
+# VUE_APP_BASE_API = 'https://client.ohplay.radio1964.net/web'

+ 24 - 18
src/pages/public/uuid.vue

@@ -45,6 +45,7 @@ export default {
       }).then((res) => {
         if (res.code === 0) {
           this.openId = res.data.openid;
+          this.deviceBindInfo(true);
         }
       });
     },
@@ -60,7 +61,10 @@ export default {
         });
         return;
       }
+      this.deviceBindInfo(false);
+    },
 
+    deviceBindInfo(isInit) {
       deviceBindInfo({
         state: this.state,
         openId: this.openId,
@@ -73,24 +77,26 @@ export default {
               url: `/pages/public/remote?state=${this.state}&openId=${this.openId}`,
             });
           } else {
-            deviceBind({
-              deviceMac: this.inputValue,
-              state: this.state,
-              openId: this.openId,
-            }).then((res) => {
-              if (res.code === 0) {
-                uni.redirectTo({
-                  url: `/pages/public/remote?state=${this.state}&openId=${this.openId}`,
-                });
-              } else {
-                uni.showToast({
-                  title: res.message,
-                  icon: "none",
-                  mask: true,
-                  duration: 2000,
-                });
-              }
-            });
+            if (!isInit) {
+              deviceBind({
+                deviceMac: this.inputValue,
+                state: this.state,
+                openId: this.openId,
+              }).then((res) => {
+                if (res.code === 0) {
+                  uni.redirectTo({
+                    url: `/pages/public/remote?state=${this.state}&openId=${this.openId}`,
+                  });
+                } else {
+                  uni.showToast({
+                    title: res.message,
+                    icon: "none",
+                    mask: true,
+                    duration: 2000,
+                  });
+                }
+              });
+            }
           }
         }
       });

+ 24 - 18
src/pages/public/uuidt.vue

@@ -45,6 +45,7 @@ export default {
       }).then((res) => {
         if (res.code === 0) {
           this.openId = res.data.openid;
+          this.deviceBindInfo(true);
         }
       });
     },
@@ -60,7 +61,10 @@ export default {
         });
         return;
       }
+      this.deviceBindInfo(false);
+    },
 
+    deviceBindInfo(isInit) {
       deviceBindInfo({
         state: this.state,
         openId: this.openId,
@@ -73,24 +77,26 @@ export default {
               url: `/pages/public/remote?state=${this.state}&openId=${this.openId}`,
             });
           } else {
-            deviceBind({
-              deviceMac: this.inputValue,
-              state: this.state,
-              openId: this.openId,
-            }).then((res) => {
-              if (res.code === 0) {
-                uni.redirectTo({
-                  url: `/pages/public/remote?state=${this.state}&openId=${this.openId}`,
-                });
-              } else {
-                uni.showToast({
-                  title: res.message,
-                  icon: "none",
-                  mask: true,
-                  duration: 2000,
-                });
-              }
-            });
+            if (!isInit) {
+              deviceBind({
+                deviceMac: this.inputValue,
+                state: this.state,
+                openId: this.openId,
+              }).then((res) => {
+                if (res.code === 0) {
+                  uni.redirectTo({
+                    url: `/pages/public/remote?state=${this.state}&openId=${this.openId}`,
+                  });
+                } else {
+                  uni.showToast({
+                    title: res.message,
+                    icon: "none",
+                    mask: true,
+                    duration: 2000,
+                  });
+                }
+              });
+            }
           }
         }
       });

+ 1 - 1
src/pages/share/channels.vue

@@ -44,7 +44,7 @@ export default {
   methods: {
     getDetail(item) {
       uni.navigateTo({
-        url: `?page=/pages/share/list&channelId=${item.id}&userId=${this.userId}`,
+        url: `?page=/pages/share/list&channelId=${item.id}&userId=${this.userId}&categoryId=${this.categoryId}`,
       })
     },
   }

+ 5 - 1
src/pages/share/list.vue

@@ -56,13 +56,17 @@ export default {
     if (e.userId) {
       this.form.userId = e.userId
       this.form.channelId = e.channelId
+      this.form.categoryId = e.categoryId
       // 频道详情
       channelDetail({
         channelId: e.channelId,
+        categoryId: e.categoryId,
         userId: e.userId
       }).then(res => {
         if (res.code === 0) {
           this.data = res.data
+          // 返回给APP的
+          this.data.categoryId = this.data.categoryId ?? e.categoryId
         }
       })
       this.getList()
@@ -93,7 +97,7 @@ export default {
     // },
     // 打开app
     open() {
-      this.openApp(`?page=/mobile/channelSinglePage&channel=${this.data.channelId}&channelId=${this.data.id}`)
+      this.openApp(`?page=/mobile/channelSinglePage&channel=${this.data.channelId}&channelId=${this.data.id}&categoryId=${this.data.categoryId}`)
     }
   }
 }

+ 6 - 0
src/pages/ximalaya/index.vue

@@ -24,6 +24,11 @@ export default {
         this.type = 'clear'
         this.title = '授权失败!'
       }
+
+      const name = 'authXmlyWeb'
+      const code = res.code === 0 ? "1" : "0"
+      webChannel.postMessage(`?name=${name}&code=${code}`)
+
     })
   }
 }
@@ -47,6 +52,7 @@ export default {
   0% {
     transform: rotate(0deg)
   }
+
   100% {
     transform: rotate(360deg);
   }