Browse Source

去除不存在的api

shmily1213 14 giờ trước cách đây
mục cha
commit
9715afd160

+ 1 - 1
src/pagesOther/pages/university/detail/components/college-info.vue

@@ -11,7 +11,7 @@
     <view class="mt-50 flex-1">
       <view class="text-36 font-bold text-fore-title">{{ info.name }}</view>
       <view v-if="bxTags.length" class="mt-8 flex flex-wrap gap-8">
-        <uv-tags v-for="t in bxTags" :text="t" v-bind="getHighlightBindings(t)" @click="handleTagClick(t)" />
+        <uv-tags v-for="t in bxTags" :key="t" :text="t" v-bind="getHighlightBindings(t)" @click="handleTagClick(t)" />
       </view>
       <uv-text type="tips" prefix-icon="empty-address" :icon-style="{ color: '#999999' }" size="12" :text="info.address"
         margin="8px 0 0 0" />

+ 11 - 34
src/utils/uni-tool.ts

@@ -196,40 +196,17 @@ const tool: IeTool = {
 
     // #ifdef MP-WEIXIN
     // 微信小程序
-    if (wx.openBrowser) {
-      wx.openBrowser({
-        url: url,
-        success: () => {
-          console.log('打开浏览器成功')
-        },
-        fail: (err: any) => {
-          console.error('打开浏览器失败', err)
-          // 降级处理:复制链接,提示用户
-          uni.setClipboardData({
-            data: url,
-            success: () => {
-              uni.showModal({
-                title: '提示',
-                content: '链接已复制,请在浏览器中打开',
-                showCancel: false
-              })
-            }
-          })
-        }
-      })
-    } else {
-      // 如果不支持,使用降级方案
-      uni.setClipboardData({
-        data: url,
-        success: () => {
-          uni.showModal({
-            title: '提示',
-            content: '链接已复制,请在浏览器中打开',
-            showCancel: false
-          })
-        }
-      })
-    }
+    uni.setClipboardData({
+      data: url,
+      showToast: false,
+      success: () => {
+        uni.showModal({
+          title: '提示',
+          content: '链接已复制,请在浏览器中打开',
+          showCancel: false
+        })
+      }
+    })
     // #endif
 
     // #ifdef MP-ALIPAY