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

支付宝的领券插件无效 #11762

Open
rrr5t6y7 opened this issue May 5, 2022 · 0 comments
Open

支付宝的领券插件无效 #11762

rrr5t6y7 opened this issue May 5, 2022 · 0 comments
Labels
F-react Framework - React T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x

Comments

@rrr5t6y7
Copy link

rrr5t6y7 commented May 5, 2022

相关平台

支付宝小程序

小程序基础库: 支付宝开发工具并无这个版本信息,但我没有选择【启用小程序基础库 2.0 构建】这个选项
使用框架: React

复现步骤

https://open.alipay.com/plugin/order-page?serviceCode=MP2021090600100574
支付宝的领券插件功能不支持动态加载(requirePlugin)方法(问过支付宝官方技术人员),需要点击方式(静态加载),文档中实现是采用get-coupon标签,但是按照支付宝文档的写法,在taro编译后,会被告知children prop不支持,估计是这个标签本身不支持props上带children,而taro的编译刚好把里面的标签内的内容变成get-coupon标签的children,这里就报错了。
报错信息是:
get-coupon can not have children prop, please change prop name!
于是乎,采用<get-coupon {...extraProps}></get-coupon>方法,把children通过extraProps传进去,可以显示,但是get-coupon被当作无效标签去除了。

期望结果

支持这个插件,或者支持部分功能避开taro编译,维持原有写法。

实际结果

报错并且无法进行。

环境信息

👽 Taro v3.3.10

Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating

  Taro CLI 3.3.10 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.16.1 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.13.4 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.3.10 => 3.3.10
      @tarojs/mini-runner: 3.3.10 => 3.3.10
      @tarojs/react: 3.3.10 => 3.3.10
      @tarojs/runtime: 3.3.10 => 3.3.10
      @tarojs/taro: 3.3.10 => 3.3.10
      @tarojs/webpack-runner: 3.3.10 => 3.3.10
      babel-preset-taro: 3.3.10 => 3.3.10
      eslint-config-taro: 3.3.10 => 3.3.10
      react: ^17.0.0 => 17.0.2
      taro-ui: ^3.0.0-alpha.2 => 3.0.0-alpha.10
    npmGlobalPackages:
      typescript: 4.1.2
@taro-bot2 taro-bot2 bot added F-react Framework - React T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x labels May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

1 participant