风云坤:import React, { Component } from 'react';|@|import {|@| AppRegistry,|@| BackAndroid,|@| StyleSheet,|@| Text,|@| View|@|} from 'react-native';|@|import JPushModule from 'jpush-react-native';|@||@|export default class xuexi6 extends Component {|@||@| constructor(props) {|@| super(props);|@||@| this.state = {|@| bg: '#ffffff',|@| appkey: 'AppKey',|@| imei: 'IMEI',|@| package: 'PackageName',|@| deviceId: 'DeviceId',|@| version: 'Version',|@| pushMsg: 'PushMessage',|@| registrationId: 'registrationId',|@| };|@| |@| }|@||@| componentDidMount() {|@| JPushModule.getInfo((map) => {|@| this.setState({|@| appkey: map.myAppKey,|@| imei: map.myImei,|@| package: map.myPackageName,|@| deviceId: map.myDeviceId,|@| version: map.myVersion|@| });|@| });|@| JPushModule.notifyJSDidLoad((resultCode) => {|@| if (resultCode === 0) {|@| }|@| });|@| JPushModule.addReceiveCustomMsgListener((map) => {|@| this.setState({|@| pushMsg: map.message|@| });|@| console.log("extras: " + map.extras);|@| });|@| JPushModule.addReceiveNotificationListener((map) => {|@| console.log("alertContent: " + map.alertContent);|@| console.log("extras: " + map.extras);|@| // var extra = JSON.parse(map.extras);|@| // console.log(extra.key + ": " + extra.value);|@| });|@| JPushModule.addReceiveOpenNotificationListener((map) => {|@| console.log("Opening notification!");|@| console.log("map.extra: " + map.extras);|@| //JPushModule.jumpToPushActivity("SecondActivity");|@| });|@| JPushModule.addGetRegistrationIdListener((registrationId) => {|@| console.log("Device register succeed, registrationId " + registrationId);|@| });|@| }|@||@| componentWillUnmount() {|@| JPushModule.removeReceiveCustomMsgListener(receiveCustomMsgEvent);|@| JPushModule.removeReceiveNotificationListener(receiveNotificationEvent);|@| JPushModule.removeReceiveOpenNotificationListener(openNotificationEvent);|@| JPushModule.removeGetRegistrationIdListener(getRegistrationIdEvent);|@| console.log("Will clear all notifications");|@| JPushModule.clearAllNotifications();|@| }|@||@| render() {|@| return (|@| |@| |@| Welcome to React Native!dddddddddddddddd|@| |@| |@| To get started, edit index.android.js|@| |@| |@| Double tap R on your keyboard to reload,{'\n'}|@| Shake or press menu button for dev menu|@| |@| |@| );|@| }|@|}|@||@|const styles = StyleSheet.create({|@| container: {|@| flex: 1,|@| justifyContent: 'center',|@| alignItems: 'center',|@| backgroundColor: '#F5FCFF',|@| },|@| welcome: {|@| fontSize: 20,|@| textAlign: 'center',|@| margin: 10,|@| },|@| instructions: {|@| textAlign: 'center',|@| color: '#333333',|@| marginBottom: 5,|@| },|@|});|@||@|AppRegistry.registerComponent('xuexi6', () => xuexi6);
c sqlserver mysql_sqlserver模仿mysql函数FIND_IN_SET,group_concat的功能
最新推荐文章于 2023-07-04 10:26:50 发布