Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持抖音小程序新增能力 #4699

Closed
chaoranwill opened this issue Jan 22, 2024 · 4 comments
Closed

支持抖音小程序新增能力 #4699

chaoranwill opened this issue Jan 22, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@chaoranwill
Copy link

新功能描述

  1. 支持配置抖音小程序数据预取能力 https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/guide/experience-optimization/list/data-preload

  2. getSystemInfoSync 、getSystemInfo useCache 参数使用支持:https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/api/device/system-information/tt-get-system-info-sync/

  3. Fragment 组件节点 https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/framework/custom-component/component-model-and-style/#7417c627

现状及问题
开发成本增加,无法接入有效的优化能力如数据预取

@chaoranwill chaoranwill added the enhancement New feature or request label Jan 22, 2024
@1998yyh
Copy link

1998yyh commented Jan 23, 2024

+1 我这边也需要数据预拉取功能

@yurj26
Copy link
Contributor

yurj26 commented Jan 24, 2024

  1. 把相关配置定义在manifest.json文件的mp-toutiao里,会自动同步到app.json文件中
  2. 直接使用即可,uni.getSystemInfoSync(true)uni.getSystemInfo({useCache: true})
  3. 后续会支持

@yurj26 yurj26 self-assigned this Jan 24, 2024
@yurj26
Copy link
Contributor

yurj26 commented Jan 27, 2024

问题3下个版本会支持,临时解决方案:

  1. vue2 项目替换 文件HBuilderX根目录/plugins/uniapp-cli/node_modules/@dcloudio/uni-mp-toutiao/dist/
    vue3 项目替换 文件HBuilderX根目录/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-mp-toutiao/dist/

  2. 在组件中添加 virtualHost 属性,具体可以参考 文档

export default {
  data(){ return { } },
  options: {
    virtualHost: true
  }
}

@yurj26
Copy link
Contributor

yurj26 commented Mar 11, 2024

请升级到最新版,已支持。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants