Browse Source

Merge branch 'master' of http://git.9026.com/roobe/miao

YanaDH 7 years ago
parent
commit
6d3c5fb137
26 changed files with 237 additions and 130 deletions
  1. 0 2
      miaomiao/config.xml
  2. 3 2
      miaomiao/package.json
  3. 46 2
      miaomiao/plugins/android.json
  4. 21 0
      miaomiao/plugins/cordova-plugin-jcore/LICENSE
  5. 33 0
      miaomiao/plugins/cordova-plugin-jcore/README.md
  6. BIN
      miaomiao/plugins/cordova-plugin-jcore/doc/sdk_model.png
  7. 29 0
      miaomiao/plugins/cordova-plugin-jcore/package.json
  8. 32 0
      miaomiao/plugins/cordova-plugin-jcore/plugin.xml
  9. BIN
      miaomiao/plugins/cordova-plugin-jcore/src/android/arm64-v8a/libjcore116.so
  10. BIN
      miaomiao/plugins/cordova-plugin-jcore/src/android/armeabi-v7a/libjcore116.so
  11. BIN
      miaomiao/plugins/cordova-plugin-jcore/src/android/armeabi/libjcore116.so
  12. BIN
      miaomiao/plugins/cordova-plugin-jcore/src/android/jcore-android-1.1.6.jar
  13. BIN
      miaomiao/plugins/cordova-plugin-jcore/src/android/mips/libjcore116.so
  14. BIN
      miaomiao/plugins/cordova-plugin-jcore/src/android/mips64/libjcore116.so
  15. BIN
      miaomiao/plugins/cordova-plugin-jcore/src/android/x86/libjcore116.so
  16. BIN
      miaomiao/plugins/cordova-plugin-jcore/src/android/x86_64/libjcore116.so
  17. BIN
      miaomiao/plugins/cordova-plugin-jcore/src/ios/jcore-ios-1.1.5.a
  18. 5 0
      miaomiao/plugins/cordova-plugin-jcore/www/jcore.js
  19. 14 102
      miaomiao/plugins/cordova-plugin-whitelist/package.json
  20. 10 12
      miaomiao/plugins/fetch.json
  21. 17 0
      miaomiao/plugins/ios.json
  22. 4 4
      miaomiao/www/js/app.js
  23. 1 1
      miaomiao/www/js/controllers/account.js
  24. 3 3
      miaomiao/www/js/controllers/add.js
  25. 1 0
      miaomiao/www/js/services/jpushservice.js
  26. 18 2
      server/app/Http/Controllers/Api/V1/AuthController.php

+ 0 - 2
miaomiao/config.xml

@@ -9,8 +9,6 @@
   </author>
   </author>
   <content src="index.html"/>
   <content src="index.html"/>
   <access origin="*"/>
   <access origin="*"/>
-  <allow-intent href="*"/>
-  <allow-navigation href="*"/>
   <preference name="webviewbounce" value="false"/>
   <preference name="webviewbounce" value="false"/>
   <preference name="UIWebViewBounce" value="false"/>
   <preference name="UIWebViewBounce" value="false"/>
   <preference name="DisallowOverscroll" value="true"/>
   <preference name="DisallowOverscroll" value="true"/>

+ 3 - 2
miaomiao/package.json

@@ -43,11 +43,12 @@
     "cordova-plugin-file-transfer",
     "cordova-plugin-file-transfer",
     "cordova-plugin-camera",
     "cordova-plugin-camera",
     "phonegap-plugin-barcodescanner",
     "phonegap-plugin-barcodescanner",
-    "cordova-plugin-whitelist",
     "cordova-hot-code-push-plugin",
     "cordova-hot-code-push-plugin",
-    "cordova-plugin-wechat"
+    "cordova-plugin-whitelist",
+    "cordova-plugin-wechat@^1.4.0"
   ],
   ],
   "cordovaPlatforms": [
   "cordovaPlatforms": [
+    "ios",
     "android"
     "android"
   ],
   ],
   "cordova": {
   "cordova": {

+ 46 - 2
miaomiao/plugins/android.json

@@ -7,10 +7,44 @@
         "files": {}
         "files": {}
     },
     },
     "installed_plugins": {
     "installed_plugins": {
+        "cordova-hot-code-push-plugin": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
         "cordova-plugin-actionsheet": {
         "cordova-plugin-actionsheet": {
             "PACKAGE_NAME": "com.miaomiao.app"
             "PACKAGE_NAME": "com.miaomiao.app"
         },
         },
-        "cordova-hot-code-push-plugin": {
+        "cordova-plugin-camera": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-console": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-device": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-file-transfer": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-media-capture": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-splashscreen": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-statusbar": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-whitelist": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "ionic-plugin-keyboard": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "jpush-phonegap-plugin": {
+            "APP_KEY": "69838317211448192366f9d8",
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "phonegap-plugin-barcodescanner": {
             "PACKAGE_NAME": "com.miaomiao.app"
             "PACKAGE_NAME": "com.miaomiao.app"
         },
         },
         "cordova-plugin-wechat": {
         "cordova-plugin-wechat": {
@@ -18,5 +52,15 @@
             "PACKAGE_NAME": "com.miaomiao.app"
             "PACKAGE_NAME": "com.miaomiao.app"
         }
         }
     },
     },
-    "dependent_plugins": {}
+    "dependent_plugins": {
+        "cordova-plugin-compat": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-file": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-jcore": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        }
+    }
 }
 }

+ 21 - 0
miaomiao/plugins/cordova-plugin-jcore/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 极光开发者
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 33 - 0
miaomiao/plugins/cordova-plugin-jcore/README.md

@@ -0,0 +1,33 @@
+# Cordova Plugin JCore
+
+[![release](https://img.shields.io/badge/release-1.1.8-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases)
+[![platforms](https://img.shields.io/badge/platforms-iOS%7CAndroid-lightgrey.svg)](https://github.com/jpush/jpush-phonegap-plugin)
+[![weibo](https://img.shields.io/badge/weibo-JPush-blue.svg)](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)
+
+极光各种开发者服务的核心依赖 JCore SDK 的 Cordova 插件。
+
+极光开发者服务及对应的 Cordova 插件如下:
+
+- 极光推送(JPush)- [jpush-phonegap-plugin](https://github.com/jpush/jpush-phonegap-plugin)
+- 极光 IM(JMessage)- [jmessage-phonegap-plugin](https://github.com/jpush/jmessage-phonegap-plugin)
+- 极光统计(JAnalytics)- [cordova-plugn-janalytics](https://github.com/jpush/cordova-plugin-janalytics)
+- 极光短信验证码(JSMS)- [cordova-plugin-jsms](https://github.com/jpush/cordova-plugin-jsms)
+
+## 什么是 JCore
+
+极光开发者服务 SDK 采用了模块化的使用模式,即一个核心(JCore)+ N 种服务(JPush,JMessage...)的使用方式,方便开发者使用某一项服务或多项服务,极大的优化了多模块同时使用时功能模块重复的问题。如下图:
+
+![](doc/sdk_model.png)
+
+## Install
+
+cordova-plugin-jcore 作为其他极光 Cordova 插件的依赖,在安装其他插件时会自动安装。
+
+## Support
+
+- [极光社区](http://community.jiguang.cn/)
+- QQ 交流群:413602425
+
+## License
+
+MIT © [JiGuang](/license)

BIN
miaomiao/plugins/cordova-plugin-jcore/doc/sdk_model.png


+ 29 - 0
miaomiao/plugins/cordova-plugin-jcore/package.json

@@ -0,0 +1,29 @@
+{
+  "name": "cordova-plugin-jcore",
+  "version": "1.1.8",
+  "description": "jcore for cordova plugin",
+  "cordova": {
+    "id": "cordova-plugin-jcore",
+    "platforms": [
+      "android",
+      "ios"
+    ]
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/jpush/cordova-plugin-jcore"
+  },
+  "keywords": [
+    "jcore",
+    "jpush",
+    "ecosystem:cordova",
+    "cordova-android",
+    "cordova-ios"
+  ],
+  "author": "wilhantian, jiguang",
+  "license": "MIT License",
+  "bugs": {
+    "url": "https://github.com/jpush/cordova-plugin-jcore/issues"
+  },
+  "homepage": "https://github.com/jpush/cordova-plugin-jcore#readme"
+}

+ 32 - 0
miaomiao/plugins/cordova-plugin-jcore/plugin.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
+     xmlns:android="http://schemas.android.com/apk/res/android"
+     id="cordova-plugin-jcore"
+     version="1.1.8">
+
+    <name>JCore</name>
+    <description>Cordova plugin for jcore</description>
+    <author>WilhanTian, JiGuang</author>
+    <keywords>jcore,jpush</keywords>
+    <license>MIT License</license>
+
+    <engines>
+        <engine name="cordova" version=">=3.0.0"/>
+    </engines>
+
+    <platform name="android">
+        <source-file src="src/android/arm64-v8a/libjcore116.so" target-dir="libs/arm64-v8a"/>
+        <source-file src="src/android/armeabi/libjcore116.so" target-dir="libs/armeabi"/>
+        <source-file src="src/android/armeabi-v7a/libjcore116.so" target-dir="libs/armeabi-v7a"/>
+        <source-file src="src/android/mips/libjcore116.so" target-dir="libs/mips"/>
+        <source-file src="src/android/mips64/libjcore116.so" target-dir="libs/mips64"/>
+        <source-file src="src/android/x86/libjcore116.so" target-dir="libs/x86"/>
+        <source-file src="src/android/x86_64/libjcore116.so" target-dir="libs/x86_64"/>
+
+        <source-file src="src/android/jcore-android-1.1.6.jar" target-dir="libs"/>
+    </platform>
+
+    <platform name="ios">
+        <source-file src="src/ios/jcore-ios-1.1.5.a" framework="true" />
+    </platform>
+</plugin>

BIN
miaomiao/plugins/cordova-plugin-jcore/src/android/arm64-v8a/libjcore116.so


BIN
miaomiao/plugins/cordova-plugin-jcore/src/android/armeabi-v7a/libjcore116.so


BIN
miaomiao/plugins/cordova-plugin-jcore/src/android/armeabi/libjcore116.so


BIN
miaomiao/plugins/cordova-plugin-jcore/src/android/jcore-android-1.1.6.jar


BIN
miaomiao/plugins/cordova-plugin-jcore/src/android/mips/libjcore116.so


BIN
miaomiao/plugins/cordova-plugin-jcore/src/android/mips64/libjcore116.so


BIN
miaomiao/plugins/cordova-plugin-jcore/src/android/x86/libjcore116.so


BIN
miaomiao/plugins/cordova-plugin-jcore/src/android/x86_64/libjcore116.so


BIN
miaomiao/plugins/cordova-plugin-jcore/src/ios/jcore-ios-1.1.5.a


+ 5 - 0
miaomiao/plugins/cordova-plugin-jcore/www/jcore.js

@@ -0,0 +1,5 @@
+var exec = require('cordova/exec')
+
+exports.coolMethod = function (arg0, success, error) {
+  exec(success, error, 'jcore', 'coolMethod', [arg0])
+}

+ 14 - 102
miaomiao/plugins/cordova-plugin-whitelist/package.json

@@ -1,70 +1,22 @@
 {
 {
-  "_args": [
-    [
-      {
-        "raw": "cordova-plugin-whitelist@1.3.2",
-        "scope": null,
-        "escapedName": "cordova-plugin-whitelist",
-        "name": "cordova-plugin-whitelist",
-        "rawSpec": "1.3.2",
-        "spec": "1.3.2",
-        "type": "version"
-      },
-      "D:\\my\\miao\\miaomiao\\node_modules"
-    ]
-  ],
-  "_from": "cordova-plugin-whitelist@1.3.2",
-  "_id": "cordova-plugin-whitelist@1.3.2",
-  "_inCache": true,
-  "_location": "/cordova-plugin-whitelist",
-  "_nodeVersion": "6.6.0",
-  "_npmOperationalInternal": {
-    "host": "packages-18-east.internal.npmjs.com",
-    "tmp": "tmp/cordova-plugin-whitelist-1.3.2.tgz_1488934526149_0.2759723379276693"
-  },
-  "_npmUser": {
-    "name": "stevegill",
-    "email": "stevengill97@gmail.com"
-  },
-  "_npmVersion": "4.1.1",
-  "_phantomChildren": {},
-  "_requested": {
-    "raw": "cordova-plugin-whitelist@1.3.2",
-    "scope": null,
-    "escapedName": "cordova-plugin-whitelist",
-    "name": "cordova-plugin-whitelist",
-    "rawSpec": "1.3.2",
-    "spec": "1.3.2",
-    "type": "version"
-  },
-  "_requiredBy": [
-    "#USER",
-    "/"
-  ],
-  "_resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.2.tgz",
-  "_shasum": "5b6335feb9f5301f3c013b9096cb8885bdbd5076",
-  "_shrinkwrap": null,
-  "_spec": "cordova-plugin-whitelist@1.3.2",
-  "_where": "D:\\my\\miao\\miaomiao\\node_modules",
-  "author": {
-    "name": "Apache Software Foundation"
-  },
-  "bugs": {
-    "url": "https://github.com/apache/cordova-plugin-whitelist/issues"
-  },
+  "name": "cordova-plugin-whitelist",
+  "version": "1.3.2",
+  "description": "Cordova Whitelist Plugin",
   "cordova": {
   "cordova": {
     "platforms": [
     "platforms": [
       "android"
       "android"
     ]
     ]
   },
   },
-  "dependencies": {},
-  "description": "Cordova Whitelist Plugin",
-  "devDependencies": {},
-  "directories": {},
-  "dist": {
-    "shasum": "5b6335feb9f5301f3c013b9096cb8885bdbd5076",
-    "tarball": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.2.tgz"
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/apache/cordova-plugin-whitelist"
   },
   },
+  "keywords": [
+    "cordova",
+    "whitelist",
+    "ecosystem:cordova",
+    "cordova-android"
+  ],
   "engines": {
   "engines": {
     "cordovaDependencies": {
     "cordovaDependencies": {
       "0.0.0": {
       "0.0.0": {
@@ -75,46 +27,6 @@
       }
       }
     }
     }
   },
   },
-  "homepage": "https://github.com/apache/cordova-plugin-whitelist#readme",
-  "keywords": [
-    "cordova",
-    "whitelist",
-    "ecosystem:cordova",
-    "cordova-android"
-  ],
-  "license": "Apache-2.0",
-  "maintainers": [
-    {
-      "name": "bowserj",
-      "email": "bowserj@apache.org"
-    },
-    {
-      "name": "csantanapr",
-      "email": "csantana23@gmail.com"
-    },
-    {
-      "name": "filmaj",
-      "email": "maj.fil@gmail.com"
-    },
-    {
-      "name": "purplecabbage",
-      "email": "purplecabbage@gmail.com"
-    },
-    {
-      "name": "shazron",
-      "email": "shazron@gmail.com"
-    },
-    {
-      "name": "stevegill",
-      "email": "stevengill97@gmail.com"
-    }
-  ],
-  "name": "cordova-plugin-whitelist",
-  "optionalDependencies": {},
-  "readme": "ERROR: No README data found!",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/apache/cordova-plugin-whitelist.git"
-  },
-  "version": "1.3.2"
+  "author": "Apache Software Foundation",
+  "license": "Apache-2.0"
 }
 }

+ 10 - 12
miaomiao/plugins/fetch.json

@@ -108,18 +108,10 @@
         "is_top_level": true,
         "is_top_level": true,
         "variables": {}
         "variables": {}
     },
     },
-    "cordova-plugin-whitelist": {
-        "source": {
-            "type": "registry",
-            "id": "cordova-plugin-whitelist@1.3.2"
-        },
-        "is_top_level": true,
-        "variables": {}
-    },
     "cordova-hot-code-push-plugin": {
     "cordova-hot-code-push-plugin": {
         "source": {
         "source": {
             "type": "registry",
             "type": "registry",
-            "id": "cordova-hot-code-push-plugin"
+            "id": "cordova-hot-code-push-plugin@^1.5.3"
         },
         },
         "is_top_level": true,
         "is_top_level": true,
         "variables": {}
         "variables": {}
@@ -135,14 +127,20 @@
             "APP_KEY": "69838317211448192366f9d8"
             "APP_KEY": "69838317211448192366f9d8"
         }
         }
     },
     },
+    "cordova-plugin-whitelist": {
+        "source": {
+            "type": "registry",
+            "id": "cordova-plugin-whitelist@^1.3.2"
+        },
+        "is_top_level": true,
+        "variables": {}
+    },
     "cordova-plugin-wechat": {
     "cordova-plugin-wechat": {
         "source": {
         "source": {
             "type": "registry",
             "type": "registry",
             "id": "cordova-plugin-wechat@^1.4.0"
             "id": "cordova-plugin-wechat@^1.4.0"
         },
         },
         "is_top_level": true,
         "is_top_level": true,
-        "variables": {
-            "WECHATAPPID": "wxc5181c0d406023e6"
-        }
+        "variables": {}
     }
     }
 }
 }

+ 17 - 0
miaomiao/plugins/ios.json

@@ -39,6 +39,20 @@
         "cordova-plugin-statusbar": {
         "cordova-plugin-statusbar": {
             "PACKAGE_NAME": "com.miaomiao.app"
             "PACKAGE_NAME": "com.miaomiao.app"
         },
         },
+        "cordova-plugin-whitelist": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "ionic-plugin-keyboard": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "jpush-phonegap-plugin": {
+            "APP_KEY": "69838317211448192366f9d8",
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "phonegap-plugin-barcodescanner": {
+            "CAMERA_USAGE_DESCRIPTION": " ",
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
         "cordova-plugin-wechat": {
         "cordova-plugin-wechat": {
             "WECHATAPPID": "wxc5181c0d406023e6",
             "WECHATAPPID": "wxc5181c0d406023e6",
             "PACKAGE_NAME": "com.miaomiao.app"
             "PACKAGE_NAME": "com.miaomiao.app"
@@ -50,6 +64,9 @@
         },
         },
         "cordova-plugin-file": {
         "cordova-plugin-file": {
             "PACKAGE_NAME": "com.miaomiao.app"
             "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-jcore": {
+            "PACKAGE_NAME": "com.miaomiao.app"
         }
         }
     }
     }
 }
 }

+ 4 - 4
miaomiao/www/js/app.js

@@ -50,10 +50,10 @@
                   StatusBar.styleLightContent();
                   StatusBar.styleLightContent();
                }
                }
                var receiveNotification = function (event) {
                var receiveNotification = function (event) {
-                   alert("receiveMessageIniOSCallback是" + +JSON.stringify(event));
+                   // alert("receiveMessageIniOSCallback是" + +JSON.stringify(event));
                };
                };
                var setTagsWithAliasCallback = function (event) {
                var setTagsWithAliasCallback = function (event) {
-                   window.alert('result code:' + event.resultCode + ' tags:' + event.tags + ' alias:' + event.alias);
+                   // window.alert('result code:' + event.resultCode + ' tags:' + event.tags + ' alias:' + event.alias);
                };
                };
                if (window.cordova) {
                if (window.cordova) {
                    jpushService.init({
                    jpushService.init({
@@ -67,11 +67,11 @@
                            if (registrationID.length == 0) {
                            if (registrationID.length == 0) {
                                var t1 = window.setTimeout(getRegistrationID, 1000);
                                var t1 = window.setTimeout(getRegistrationID, 1000);
                            } else {
                            } else {
-                               alert("RegistrationID是" + registrationID);
+                               // alert("RegistrationID是" + registrationID);
                                localStorage.setItem('jpush', registrationID);
                                localStorage.setItem('jpush', registrationID);
                            }
                            }
                        } catch (exception) {
                        } catch (exception) {
-                           alert("onGetRegistrationID err:" + JSON.stringify(exception));
+                           // alert("onGetRegistrationID err:" + JSON.stringify(exception));
                        }
                        }
                    };
                    };
                    var getRegistrationID = function () {
                    var getRegistrationID = function () {

+ 1 - 1
miaomiao/www/js/controllers/account.js

@@ -75,7 +75,7 @@
                 }, function (error) {
                 }, function (error) {
                     $scope.vm.waitSeconds = "获取验证码";
                     $scope.vm.waitSeconds = "获取验证码";
                     wait(0);
                     wait(0);
-                    alert(JSON.stringify(error));
+                    // alert(JSON.stringify(error));
                     // msg.error(error.data.message);
                     // msg.error(error.data.message);
                 });
                 });
             };
             };

+ 3 - 3
miaomiao/www/js/controllers/add.js

@@ -41,8 +41,8 @@
             };
             };
             $scope.add = function () {
             $scope.add = function () {
                 var data = {
                 var data = {
-                    pics: ["https://www.ba/idu.com/img/bd_logo1.png"],
-                    //pics: $scope.imgs,
+                    // pics: ["https://www.ba/idu.com/img/bd_logo1.png"],
+                    pics: $scope.imgs,
                     video: $scope.video.server,
                     video: $scope.video.server,
                     name: $scope.vm.name,
                     name: $scope.vm.name,
                     about: $scope.vm.about,
                     about: $scope.vm.about,
@@ -59,7 +59,7 @@
                 });
                 });
             };
             };
             $scope.$on('$ionicView.beforeEnter', function () {
             $scope.$on('$ionicView.beforeEnter', function () {
-                $scope.imgs=['http://q8.9026.com/attachment/e4459544b0fe0818ad79e35e0b0acaf8'];
+                $scope.imgs=[];
                 $scope.video = {};
                 $scope.video = {};
                 $scope.vm={
                 $scope.vm={
                     name:'',
                     name:'',

+ 1 - 0
miaomiao/www/js/services/jpushservice.js

@@ -5,6 +5,7 @@
         //var jpushapi=$window.plugins.jPushPlugin;
         //var jpushapi=$window.plugins.jPushPlugin;
         //启动极光推送
         //启动极光推送
         var _init = function (config) {
         var _init = function (config) {
+            $window.plugins.jPushPlugin.startJPushSDK()
             $window.plugins.jPushPlugin.init();
             $window.plugins.jPushPlugin.init();
             // //设置tag和Alias触发事件处理
             // //设置tag和Alias触发事件处理
             // document.addEventListener('jpush.setTagsWithAlias',config.stac,false);
             // document.addEventListener('jpush.setTagsWithAlias',config.stac,false);

+ 18 - 2
server/app/Http/Controllers/Api/V1/AuthController.php

@@ -88,6 +88,14 @@ class AuthController extends Controller
             return $this->validatorError($validator->messages()->all(),ErrorCode::CLIENT_WRONG_PARAMS);
             return $this->validatorError($validator->messages()->all(),ErrorCode::CLIENT_WRONG_PARAMS);
         $phone = $request->phone;
         $phone = $request->phone;
         $wechat = $request->wechat;
         $wechat = $request->wechat;
+
+        $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=wxd2334195ddfc7d93&secret=c349515d0079ccbc71f4a4f191c1621e&code=".$wechat."&grant_type=authorization_code";
+        $res = file_get_contents($url);     //file_get_contents获取指定路由返回的数据
+        \Log::info($res);
+        $arr = json_decode($res, true);
+        $openid = $arr['openid'];
+        \Log::info('openid: ' . $openid);
+
         $jpush = $request->jpush;
         $jpush = $request->jpush;
         $key = $this->keySmsCode . $phone;
         $key = $this->keySmsCode . $phone;
         $code = Cache::store('file')->get($key);
         $code = Cache::store('file')->get($key);
@@ -97,7 +105,7 @@ class AuthController extends Controller
         if (empty($user)) {
         if (empty($user)) {
             $user = UserInfoModel::create([
             $user = UserInfoModel::create([
                 'phone'=>$phone,
                 'phone'=>$phone,
-                'wechat'=>$wechat,
+                'wechat'=>$openid,
                 'jpush'=>$jpush,
                 'jpush'=>$jpush,
                 'password'=>bcrypt(123456)
                 'password'=>bcrypt(123456)
             ]);
             ]);
@@ -170,7 +178,15 @@ class AuthController extends Controller
 
 
         if ($validator->fails())
         if ($validator->fails())
             return $this->validatorError($validator->messages()->all(),ErrorCode::CLIENT_WRONG_PARAMS);
             return $this->validatorError($validator->messages()->all(),ErrorCode::CLIENT_WRONG_PARAMS);
-        $user = UserInfoModel::where('wechat',$request->wechat)->first();
+
+
+        $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=wxd2334195ddfc7d93&secret=c349515d0079ccbc71f4a4f191c1621e&code=".$request->wechat."&grant_type=authorization_code";
+        $res = file_get_contents($url);     //file_get_contents获取指定路由返回的数据
+        \Log::info($res);
+        $arr = json_decode($res, true);
+        $openid = $arr['openid'];
+        \Log::info('openid: ' . $openid);
+        $user = UserInfoModel::where('wechat',$openid)->first();
         if (empty($user)) {
         if (empty($user)) {
 //            return $this->error(ErrorCode::LOGIN_FAILED);
 //            return $this->error(ErrorCode::LOGIN_FAILED);
         }else{
         }else{