Git Product home page Git Product logo

Comments (5)

luoliang222 avatar luoliang222 commented on June 12, 2024 3

在capacitor.config.json中新增插件属性:
"cordova": { "preferences": { "WECHATAPPID": "wxxxxxxxxxxxx" } }

from cordova-plugin-wechat.

yuangu avatar yuangu commented on June 12, 2024
  1. android在res/xml 下有一个config.xml文件。在这里面写上。
<preference name="WECHATAPPID" value="您的appid"/>

image

  1. 同理,在ios下面也有一个config.xml。如l图所示。

image

另:实测在capacitor里可以使用preference配置,但是
由于npx cap sync不会同步plugin.xml 里的preference,每次 sync后都需要手动修改,造成比较大的麻烦,不晓得capacitor下为啥不能同步cordova的preference配置?

from cordova-plugin-wechat.

mfyang avatar mfyang commented on June 12, 2024

好棒,谢谢!

from cordova-plugin-wechat.

Ong26 avatar Ong26 commented on June 12, 2024

@mfyang 你能在ionic v6做到微信登录吗?

from cordova-plugin-wechat.

mfyang avatar mfyang commented on June 12, 2024

没试过ionic,但是quasar在android下没问题了。具体就是上面二楼的回复,有效。

from cordova-plugin-wechat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.