shmily1213 1 місяць тому
батько
коміт
3114fc1d33

+ 1 - 1
src/config.ts

@@ -19,7 +19,7 @@ export const env = {
   development: {
     serverBaseUrl: 'https://dz.shineking.top/prod-api',
     paySiteUrl: 'https://www.dz1kt.com/h5',
-    h5SiteUrl: 'http://192.168.31.227:5174/h5/pagesSystem/pages/startup/startup',
+    h5SiteUrl: 'https://dz.shineking.top/h5/pagesSystem/pages/startup/startup',
   },
   production: {
     serverBaseUrl: 'https://www.dz1kt.com/admin/prod-api',

+ 11 - 9
src/pagesMain/pages/index/components/index-banner.vue

@@ -31,6 +31,9 @@ type MenuItem = {
 }
 const navigateTo = async (item: MenuItem) => {
   const { pageUrl, navigateType, noLogin } = item;
+  if (!pageUrl) {
+    return;
+  }
   if (!noLogin) {
     const isLogin = await userStore.checkLogin();
     if (isLogin) {
@@ -48,13 +51,11 @@ const rankingPageUrl = computed(() => {
   const token = userStore.accessToken;
   const h5Url = config.h5SiteUrl;
   const oldRankPageUrl = '/pagesOther/pages/career/query-segment/query-segment';
-  const testParams = {
-    key1: '123'
-  }
+  const params = {}
   const h5Params = {
     token,
     redirect: oldRankPageUrl,
-    params: JSON.stringify(testParams)
+    params: JSON.stringify(params)
   };
   const transerParams = {
     url: h5Url,
@@ -112,11 +113,12 @@ const validMenus = computed(() => {
     //   icon: '/menu/menu-upgrade.png',
     //   pageUrl: '/pages/index/index',
     // }
-    {
-      name: '查位次',
-      icon: '/menu/menu-upgrade.png',
-      pageUrl: rankingPageUrl.value,
-    }
+    // {
+    //   name: '查位次',
+    //   icon: '/menu/menu-upgrade.png',
+    //   pageUrl: '',
+    //   // pageUrl: rankingPageUrl.value,
+    // }
   ]
   return menus.filter(item => item.visible !== false);
 });

+ 13 - 6
src/pagesSystem/pages/webview/webview.vue

@@ -2,7 +2,7 @@
   <ie-page :fix-height="true">
     <ie-navbar v-if="showNavbar" :title="pageTitle" />
     <ie-auto-resizer>
-      <web-view class="w-full h-full" :src="webviewSrc" />
+      <web-view class="w-full h-full" :fullscreen="false" border="none" :src="webviewSrc" @load="handleLoad" />
     </ie-auto-resizer>
   </ie-page>
 </template>
@@ -18,24 +18,31 @@ const webviewParams = ref('');
 
 onLoad(() => {
   const { url, params, title, showNavbar: _showNavbar } = prevData.value
-  console.log(1111, _showNavbar)
   pageTitle.value = title;
   showNavbar.value = JSON.parse(_showNavbar) ?? true;
   try {
+    uni.$ie.showLoading();
     if (typeof params === 'string') {
       webviewParams.value = JSON.parse(params);
     } else {
       webviewParams.value = params;
     }
-    // const {} = webviewParams.value;
     webviewSrc.value = `${url}?${Object.entries(webviewParams.value).map(([key, value]) => `${key}=${value}`).join('&')}`;
-    console.log(webviewSrc.value, showNavbar.value, 3333)
   } catch (error) {
     uni.$ie.showToast('参数错误');
     transferBack();
   }
-  console.log(111, prevData.value, webviewParams.value)
 });
+const handleLoad = () => {
+  uni.$ie.hideLoading();
+}
 </script>
 
-<style lang="scss"></style>
+<style lang="scss">
+:deep(iframe) {
+  width: 100% !important;
+  height: 100% !important;
+  border: none;
+  z-index: 999;
+}
+</style>