diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js
index a126994..f20f0c4 100644
--- a/fangija-zsyf/config.js
+++ b/fangija-zsyf/config.js
@@ -1,8 +1,8 @@
/**服务端地址**/
//var BASE_PATH = "http://192.168.10.128:8084";
//var BASE_PATH = "http://192.168.10.47:8086";
-var BASE_PATH = "http://192.168.10.161:8084";
+//var BASE_PATH = "http://192.168.10.161:8084";
//var BASE_PATH = "http://192.168.10.53:8084";
-//var BASE_PATH = "http://192.168.10.170:8084";
+var BASE_PATH = "http://192.168.10.171:8084";
/**是否显示过启动页面**/
var lauchFlag = false;
\ No newline at end of file
diff --git a/fangija-zsyf/js/login/thirdLogin.js b/fangija-zsyf/js/login/thirdLogin.js
new file mode 100644
index 0000000..9f94671
--- /dev/null
+++ b/fangija-zsyf/js/login/thirdLogin.js
@@ -0,0 +1,121 @@
+var auths = {}
+function plusReady() {
+ plus.oauth.getServices(function(services) {
+ for(var i in services){
+ var service=services[i];
+ auths[service.id]=service;
+ }
+ }, function(e) {
+ alert("获取登录服务列表失败:" + e.message + " - " + e.code);
+ });
+}
+document.addEventListener('plusready',plusReady,false);
+// 登录认证
+function loginInfo(dest){
+ var auth=auths[dest];
+ console.log(JSON.stringify(auth))
+ if(auth){
+ var w=null;
+ if(plus.os.name=="Android"){
+ w=plus.nativeUI.showWaiting();
+ }
+ document.addEventListener("pause",function(){
+ setTimeout(function(){
+ w&&w.close();w=null;
+ },2000);
+ }, false );
+ auth.login(function(){
+ w&&w.close();w=null;
+ userinfo(auth);
+ },function(e){
+ w&&w.close();w=null;
+ $.toast("登录认证失败:["+e.code+"]:"+e.message);
+ });
+ }else{
+ $.toast("无效的登录认证通道!");
+ $.toast("无效的登录认证通道!",null,"登录");
+ }
+}
+
+//wx获取用户信息
+function userinfo(a){
+ a.getUserInfo(function(){
+ console.log(JSON.stringify(a))
+ $.showPreloader();
+ if(a.id=='weixin'){
+ var nickname=a.userInfo.nickname||a.userInfo.name||a.userInfo.miliaoNick;
+ var openid = a.authResult.openid;
+ var accessToken = a.authResult.access_token;
+ var unionid = a.userInfo.unionid;
+ var headImg = a.userInfo.headimgurl;
+ wxLogin(openid,unionid,accessToken,nickname,headImg,"weixin")
+ }else if(a.id=='qq'){
+ var nickname=a.userInfo.nickname;
+ var openid = a.authResult.openid;
+ var accessToken = a.authResult.access_token;
+ var headImg = a.userInfo.headimgurl;
+ qqLogin(openid,accessToken,nickname,headImg,"qq")
+ }else{
+ //微博信息获取
+ var nickname=a.userInfo.name||a.userInfo.screen_name;
+ var openid = a.authResult.openid;
+ var accessToken = a.authResult.access_token;
+ var headImg = a.userInfo.profile_image_url;
+ var uid = a.authResult.uid
+ weiboLogin(openid,accessToken,nickname,headImg,"sinaweibo")
+ }
+
+ },function(e){
+ $.toast("获取微信用户信息失败:["+e.code+"]:"+e.message);
+ });
+}
+
+function wxLogin(openid, unionid, accessToken, nickname, headImg,loginFrom) {
+ axios.post("/rest/user/wxLogin", {loginFrom:loginFrom,openid:openid, unionid:unionid, accessToken: accessToken, nickname:nickname,headImg:headImg})
+ .then(function (response) {
+ $.hidePreloader();
+ if(response.data.status){
+ if("no"==response.data.message){
+ //跳转绑定手机号码页面
+ console.log(response.data.message)
+ }else{
+
+ }
+ }else{
+ //登录失败
+ $.toast(response.data.data)
+ }
+ })
+}
+function qqLogin(openid, accessToken, nickname, headImg,loginFrom) {
+ axios.post("/rest/user/qqLogin", {loginFrom:loginFrom,openid:openid, accessToken: accessToken, nickname:nickname,headImg:headImg})
+ .then(function (response) {
+ $.hidePreloader();
+ if(response.data.status){
+ if("no"==response.data.message){
+ //跳转绑定手机号码页面
+ }else{
+
+ }
+ }else{
+ //登录失败
+ $.toast(response.data.data)
+ }
+ })
+}
+function weiboLogin(openid, accessToken, nickname, headImg,loginFrom) {
+ axios.post("/rest/user/sinaweiboLogin", {loginFrom:loginFrom,openid:openid, accessToken: accessToken, nickname:nickname,headImg:headImg})
+ .then(function (response) {
+ $.hidePreloader();
+ if(response.data.status){
+ if("no"==response.data.message){
+ //跳转绑定手机号码页面
+ }else{
+
+ }
+ }else{
+ //登录失败
+ $.toast(response.data.data)
+ }
+ })
+}
diff --git a/fangija-zsyf/js/login/wxLogin.js b/fangija-zsyf/js/login/wxLogin.js
deleted file mode 100644
index 1b144a1..0000000
--- a/fangija-zsyf/js/login/wxLogin.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var auths = {}
-function plusReady() {
- plus.oauth.getServices(function(services) {
- alert("111111111111111111111111")
- auths = services;
- }, function(e) {
- alert("获取登录服务列表失败:" + e.message + " - " + e.code);
- });
-}
-document.addEventListener('plusready',plusReady,false);
-// 登录认证
-function webChatLogin(){
- var auth=auths['weixin'];
- if(auth){
- var w=null;
- if(plus.os.name=="Android"){
- w=plus.nativeUI.showWaiting();
- }
- document.addEventListener("pause",function(){
- setTimeout(function(){
- w&&w.close();w=null;
- },2000);
- }, false );
- auth.login(function(){
- w&&w.close();w=null;
- userinfo(auth);
- },function(e){
- w&&w.close();w=null;
- $.toast("登录认证失败:["+e.code+"]:"+e.message);
- });
- }else{
- $.toast("无效的登录认证通道!");
- $.toast("无效的登录认证通道!",null,"登录");
- }
-}
-
-function authLogin(type) {
- console.log("hhhhhhhhhhhhhhhhhhh")
-}
diff --git a/fangija-zsyf/manifest.json b/fangija-zsyf/manifest.json
index 98399d1..ebe1f31 100644
--- a/fangija-zsyf/manifest.json
+++ b/fangija-zsyf/manifest.json
@@ -14,7 +14,7 @@
"icons": {
"144": "icon.png"
},
- "launch_path": "main.html",/*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/
+ "launch_path": "/views/user/bindingMobile.html",/*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/
"developer": {
"name": "",/*开发者名称*/
"email": "",/*开发者邮箱地址*/
@@ -101,9 +101,7 @@
"Maps": {
"description": "地图"
},
- "OAuth": {
- "description": "登录授权"
- },
+ "OAuth": {},
"Push": {
"description": "消息推送"
@@ -312,12 +310,6 @@
"description": "可选,微信分享",
"appid": "wx734a9e3085abcd90",
"appsecret": "47ce59f3c52984c4e193880fb09b12af"
- },
- "sina": {
- "appkey": "3194052034",
- "appsecret": "e863ae4e4f14d41af3142e5ae06867dd",
- "redirect_uri": "http://sh.fangjia.com/",
- "description": "可选,新浪微博分享"
}
},
"payment": {},
@@ -325,7 +317,7 @@
"weixin": {
"appid": "wx734a9e3085abcd90",
"appsecret": "47ce59f3c52984c4e193880fb09b12af"
- }
+ },"qq":{"appid":"1106734669"},"sina":{"appkey":"3194052034","appsecret":"e863ae4e4f14d41af3142e5ae06867dd","redirect_uri":"http://fangjia.com"}
}
},
"debug": true
@@ -1519,6 +1511,20 @@
],
"refer": [],
"priority": 0
+ },
+ "/views/user/bindingMobile.html": {
+ "resources": [],
+ "refer": [
+ "error.html"
+ ],
+ "priority": 0
+ },
+ "views/user/codeSms.html": {
+ "resources": [
+ "/views/user/bindingMobile.html"
+ ],
+ "refer": [],
+ "priority": 0
}
},
"idle": {
diff --git a/fangija-zsyf/views/evaluate/evaluateList.html b/fangija-zsyf/views/evaluate/evaluateList.html
index 8f976ee..2956840 100644
--- a/fangija-zsyf/views/evaluate/evaluateList.html
+++ b/fangija-zsyf/views/evaluate/evaluateList.html
@@ -73,9 +73,11 @@ $.config = {router: false}
+
-
+
+
@@ -83,6 +85,8 @@ $.config = {router: false}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+