浏览代码

feat: 接入小程序插件

huangzhichao 1 年之前
父节点
当前提交
aa1e7e18bc
共有 3 个文件被更改,包括 6 次插入5 次删除
  1. 3 3
      src/http/index.ts
  2. 2 1
      src/plugin/components/custom/index.less
  3. 1 1
      src/plugin/components/custom/index.tsx

+ 3 - 3
src/http/index.ts

@@ -64,9 +64,9 @@ class Http {
 }
 
 export function wrapData(params) {
-  const systemInfo = Taro.$global.systemInfo
-  const launchOption = Taro.$global.launchOption
-  const network = Taro.$global.network
+  const systemInfo = Taro.$global?.systemInfo
+  const launchOption = Taro.$global?.launchOption
+  const network = Taro.$global?.network
 
   const defaultInfo = {
     appId: APP_ID,

+ 2 - 1
src/plugin/components/custom/index.less

@@ -23,6 +23,7 @@
       font-size: 20rpx;
       text-align: center;
       line-height: 32rpx;
+      z-index: 1;
     }
   
     .close-icon {
@@ -35,7 +36,7 @@
       height: 60rpx;
       border-radius: 50%;
       background: rgba(0, 0, 0, .4);
-
+      z-index: 1;
     }
 
     .close-icon::before,

+ 1 - 1
src/plugin/components/custom/index.tsx

@@ -251,7 +251,7 @@ function Custom({
         className='custom-video'
         objectFit='fill'
         controls={false}
-        autoplay={false}
+        autoplay
         loop
         src={adData.materialAddress}
         poster={adData.materialCoverPic}