This commit is contained in:
Jarvanmo
2025-11-06 10:58:51 +08:00
parent edd97317b8
commit a63431b15a
2 changed files with 12 additions and 2 deletions

View File

@@ -16,9 +16,9 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
import 'package:fluwx/fluwx.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import '../../fluwx.dart';
import 'fluwx_method_channel.dart';
abstract class FluwxPlatform extends PlatformInterface {

View File

@@ -112,7 +112,17 @@ export class FluwxShareHandler {
const miniProgramObject = new wxopensdk.WXMiniProgramObject()
miniProgramObject.userName = call.argument("userName")
miniProgramObject.path = call.argument("path")
miniProgramObject.miniprogramType = wxopensdk.WXMiniProgramType.RELEASE
let miniProgramType = wxopensdk.WXMiniProgramType.RELEASE
let miniProgramTypeInt: number = call.argument("miniProgramType")
if (miniProgramTypeInt === 1) {
miniProgramType = wxopensdk.WXMiniProgramType.TEST
} else if (miniProgramType === 2) {
miniProgramType = wxopensdk.WXMiniProgramType.PREVIEW
}
miniProgramObject.miniprogramType = miniprogramType
const mediaMessage = new wxopensdk.WXMediaMessage()
mediaMessage.mediaObject = miniProgramObject