File tree Expand file tree Collapse file tree
ohos/src/main/ets/components/plugin/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 * License for the specific language governing permissions and limitations under
1717 * the License.
1818 */
19- import 'package:fluwx/fluwx.dart' ;
2019import 'package:plugin_platform_interface/plugin_platform_interface.dart' ;
2120
21+ import '../../fluwx.dart' ;
2222import 'fluwx_method_channel.dart' ;
2323
2424abstract class FluwxPlatform extends PlatformInterface {
Original file line number Diff line number Diff line change @@ -112,7 +112,17 @@ export class FluwxShareHandler {
112112 const miniProgramObject = new wxopensdk.WXMiniProgramObject()
113113 miniProgramObject.userName = call.argument("userName")
114114 miniProgramObject.path = call.argument("path")
115- miniProgramObject.miniprogramType = wxopensdk.WXMiniProgramType.RELEASE
115+
116+ let miniProgramType = wxopensdk.WXMiniProgramType.RELEASE
117+
118+ let miniProgramTypeInt: number = call.argument("miniProgramType")
119+ if (miniProgramTypeInt === 1) {
120+ miniProgramType = wxopensdk.WXMiniProgramType.TEST
121+ } else if (miniProgramType === 2) {
122+ miniProgramType = wxopensdk.WXMiniProgramType.PREVIEW
123+ }
124+
125+ miniProgramObject.miniprogramType = miniprogramType
116126
117127 const mediaMessage = new wxopensdk.WXMediaMessage()
118128 mediaMessage.mediaObject = miniProgramObject
You can’t perform that action at this time.
0 commit comments