mirror of
https://github.com/little-snow-fox/react-native-wechat-lib.git
synced 2025-12-06 15:26:49 +08:00
fix 修复分享小程序只能分享开发版的bug
This commit is contained in:
parent
3633cf614b
commit
721f79b191
3
index.js
3
index.js
@ -270,6 +270,9 @@ export function shareWebpage(data) {
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function shareMiniProgram(data) {
|
||||
if (data.miniProgramType == null) {
|
||||
data.miniProgramType = 0
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
nativeShareMiniProgram(data);
|
||||
emitter.once('SendMessageToWX.Resp', resp => {
|
||||
|
||||
@ -389,7 +389,7 @@ RCT_EXPORT_METHOD(shareMiniProgram:(NSDictionary *)data
|
||||
object.hdImageData = [self compressImage: image toByte:131072];
|
||||
}
|
||||
object.withShareTicket = data[@"withShareTicket"];
|
||||
object.miniProgramType = data[@"miniProgramType"] || WXMiniProgramTypeRelease;
|
||||
object.miniProgramType = [data[@"miniProgramType"] integerValue];
|
||||
WXMediaMessage *message = [WXMediaMessage message];
|
||||
message.title = data[@"title"];
|
||||
message.description = data[@"description"];
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "react-native-wechat-lib",
|
||||
"version": "1.1.1",
|
||||
"description": "react-native library for wechat app",
|
||||
"version": "1.1.2",
|
||||
"description": "react-native library for wechat app. 支持分享和拉起小程序。",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo 1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user