chenlei hai 1 ano
pai
achega
a7f8a5102a

+ 11 - 11
src/components/PageSwiper/index.tsx

@@ -95,18 +95,18 @@ export const PageSwiper: FC = () => {
 
     if (userInfo.invite === 0) {
       setVisitVisible(true);
-      return;
-    }
-
-    Taro.navigateTo({
-      url:
-        "/subModule/pages/iframe/index?url=" +
-        encodeURIComponent(getSceneUrl()),
-    });
-
-    setTimeout(() => {
       setXSZCVideoVisible(false);
-    }, 1000);
+    } else {
+      Taro.navigateTo({
+        url:
+          "/subModule/pages/iframe/index?url=" +
+          encodeURIComponent(getSceneUrl()),
+      });
+
+      setTimeout(() => {
+        setXSZCVideoVisible(false);
+      }, 1000);
+    }
   };
 
   const handleBgLoaded = () => {

+ 1 - 1
src/components/Video/index.tsx

@@ -20,7 +20,7 @@ export const VideoWrap: FC<VideoWrapProps> = ({
         onWaiting={() => {
           Taro.showLoading();
         }}
-        onPlay={() => {
+        onTimeUpdate={() => {
           Taro.hideLoading();
         }}
         {...props}

BIN=BIN
src/images/btn_start@2x-min.png


+ 6 - 2
src/pages/home/components/SearchLayout/index.scss

@@ -17,8 +17,6 @@
   }
   .layout-body {
     padding: 25px 40px;
-    padding-bottom: constant(safe-area-inset-bottom);
-    padding-bottom: env(safe-area-inset-bottom);
     max-height: unset;
     min-height: unset;
     height: 100%;
@@ -101,6 +99,12 @@
     background-color: rgba(255, 255, 255, 0.2);
   }
 
+  &__scroll {
+    height: calc(100vh - 50px - 77px - 92px - 6px);
+    padding-bottom: constant(safe-area-inset-bottom);
+    padding-bottom: env(safe-area-inset-bottom);
+    box-sizing: border-box;
+  }
   &__item {
     display: flex;
     align-items: flex-start;

+ 23 - 21
src/pages/home/components/SearchLayout/index.tsx

@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react";
 import { FC } from "@tarojs/taro";
 import { AtFloatLayout, AtInput, AtTabs, AtTabsPane } from "taro-ui";
 import { AtFloatLayoutProps } from "taro-ui/types/float-layout";
-import { View } from "@tarojs/components";
+import { ScrollView, View } from "@tarojs/components";
 import { CITY_LIST, SIGHT_LIST } from "../../constants";
 import { debounce } from "../../../../utils";
 import { getSignListApi } from "../../../../api";
@@ -97,28 +97,30 @@ export const SearchLayout: FC<SearchLayoutProps> = (props) => {
 
               return (
                 <AtTabsPane current={curTab} index={item.id}>
-                  {_list.length
-                    ? _list.map((subItem) => (
-                        <View
-                          key={subItem.id}
-                          className="search-tab__item"
-                          onClick={props.openDetail.bind(undefined, subItem)}
-                        >
-                          <View className="search-tab__item-inner">
-                            <View className="search-tab__item-inner__label">
-                              {subItem.name}
+                  <ScrollView scrollY className="search-tab__scroll">
+                    {_list.length
+                      ? _list.map((subItem) => (
+                          <View
+                            key={subItem.id}
+                            className="search-tab__item"
+                            onClick={props.openDetail.bind(undefined, subItem)}
+                          >
+                            <View className="search-tab__item-inner">
+                              <View className="search-tab__item-inner__label">
+                                {subItem.name}
+                              </View>
+                              <View className="limit-line">
+                                {subItem.description.slice(0, 50)}
+                              </View>
                             </View>
-                            <View className="limit-line">
-                              {subItem.description.slice(0, 50)}
-                            </View>
-                          </View>
 
-                          <View className="search-tab__item__more" />
-                        </View>
-                      ))
-                    : !loading && (
-                        <View className="search-tab__nomore">暂无内容</View>
-                      )}
+                            <View className="search-tab__item__more" />
+                          </View>
+                        ))
+                      : !loading && (
+                          <View className="search-tab__nomore">暂无内容</View>
+                        )}
+                  </ScrollView>
                 </AtTabsPane>
               );
             })}

+ 3 - 3
src/pages/home/components/VisitCard/index.scss

@@ -10,9 +10,9 @@
     box-sizing: border-box;
     background: url("./pop_bg@2x-min.png") no-repeat center / contain;
   }
-  // .at-curtain__btn-close {
-  //   display: none;
-  // }
+  .at-curtain__btn-close {
+    display: none;
+  }
 
   &__title {
     font-size: 38px;

+ 3 - 2
src/pages/home/index.scss

@@ -201,8 +201,9 @@
   }
   &__search {
     position: fixed;
-    top: 42px;
-    right: 33px;
+    top: 32px;
+    right: 23px;
+    padding: 10px;
     width: 40px;
     height: 40px;
     z-index: 9;

+ 9 - 3
src/pages/home/index.tsx

@@ -20,7 +20,6 @@ import BtmBgImg from "../../images/img_city-min.png";
 import CloudImg from "../../images/img_cloud-min.png";
 import LeftIcon from "../../images/icon_blue_left@2x-min.png";
 import RightIcon from "../../images/icon_blue_right@2x-min.png";
-import ButtonImg from "../../images/btn_start@2x-min.png";
 import { Swiper as SightSwiper, SwiperMethods } from "./components/Swiper";
 import { SearchLayout } from "./components/SearchLayout";
 import { SightDetailLayout } from "./components/SightDetailLayout";
@@ -82,8 +81,8 @@ const HomePage: FC = () => {
 
   const createBgAudio = () => {
     const audio = Taro.createInnerAudioContext();
-    console.log(loaded);
     audio.autoplay = loaded;
+    console.log("bg audio autoplay: ", loaded);
     audio.loop = true;
     audio.volume = 0.3;
     audio.src =
@@ -140,10 +139,17 @@ const HomePage: FC = () => {
   });
   useDidHide(() => {
     audioContext.current?.destroy();
+    audioContext.current = undefined;
 
     swiperRef.current?.setIsRunning(false);
   });
 
+  useEffect(() => {
+    return () => {
+      audioContext.current?.destroy();
+    };
+  }, []);
+
   return (
     <>
       <View
@@ -254,7 +260,7 @@ const HomePage: FC = () => {
         <SwiperItem className="home2">
           <Image
             className="home2__btn"
-            src={ButtonImg}
+            src="https://houseoss.4dkankan.com/project/wx-csbwg-public/images/btn_start%402x-min.png"
             mode="widthFix"
             onClick={async () => {
               const userInfo = baseStore.userInfo;

+ 10 - 0
src/subModule/pages/feedback/index.scss

@@ -120,10 +120,20 @@
   }
 
   .toolbar {
+    position: relative;
     display: flex;
     justify-content: center;
     gap: 46px;
 
+    &::before {
+      content: "";
+      position: absolute;
+      left: 0;
+      right: 0;
+      bottom: 0;
+      height: 40px;
+      z-index: 900;
+    }
     &__btn {
       width: 262px;
       height: 128px;

BIN=BIN
src/subModule/pages/museum/images/bg@2x-min.jpg


+ 1 - 1
src/subModule/pages/museum/index.tsx

@@ -12,7 +12,7 @@ const MuseumPage: FC = () => {
     });
   };
 
-  return <View className="museum" onClick={goRoam} />;
+  return <View className="museum" />;
 };
 
 export default MuseumPage;

+ 1 - 1
src/subModule/pages/shopmall/components/Records/index.tsx

@@ -28,7 +28,7 @@ export const RecordsItem: FC<RecordsItemProps> = ({ data, index }) => {
 
           {item.prizeName && (
             <Text style={{ paddingLeft: pxTransform(20) }}>
-              {item.prizeName}
+              {item.description}
             </Text>
           )}
         </View>

+ 3 - 3
src/utils/index.ts

@@ -14,9 +14,9 @@ export const getSceneUrl = (scene?: number) => {
   const name = getStorageSync(NICKNAME_KEY);
   const token = getStorageSync(TOKEN_KEY);
 
-  return `https://app.4dage.com/projects/wxcs/web/index.html?platform=wx&name=${name}&token=${token}${
-    typeof scene === "number" ? `&scene=${scene}` : ""
-  }`;
+  return `https://app.4dage.com/projects/wxcs/web/index.html?platform=wx&name=${encodeURIComponent(
+    name
+  )}&token=${token}${typeof scene === "number" ? `&scene=${scene}` : ""}`;
 };
 
 export const createRandomString = () => {

BIN=BIN
src/videos/xszc.mp4


BIN=BIN
src/videos/ysdt.mp4