x %!s(int64=5) %!d(string=hai) anos
pai
achega
0c4fdc1bbe
Modificáronse 1 ficheiros con 21 adicións e 0 borrados
  1. 21 0
      src/libs/jpush.js

+ 21 - 0
src/libs/jpush.js

@@ -0,0 +1,21 @@
+const JPush = {
+  init: function() {
+    try {
+      if (window.JPush) {
+        window.JPush.init();
+        window.JPush.setDebugMode(true);
+
+        // if (device.platform != "Android") {
+        //   window.JPush.setApplicationIconBadgeNumber(0);
+        // }
+        console.log("JPush init success !");
+      } else {
+        console.log("JPush is not defined !");
+      }
+    } catch (exception) {
+      console.log("Jpsuh init faield ! exception: ", exception);
+    }
+  }
+};
+
+export default JPush;