From 7bd5bbb6996b350feefb135d34414d5d069a57a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Mon, 26 Mar 2018 14:08:52 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/manifest.json | 48 +++++--------------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/fangija-zsyf/manifest.json b/fangija-zsyf/manifest.json index c5b82b8..7976ed3 100644 --- a/fangija-zsyf/manifest.json +++ b/fangija-zsyf/manifest.json @@ -39,9 +39,7 @@ "Console": { "description": "调试输出日志" }, - "Contacts": { - "description": "系统通讯录" - }, + "Device": { "description": "设备信息" }, @@ -63,9 +61,7 @@ "Invocation": { "description": "Native.js能力" }, - "Messaging": { - "description": "消息通讯" - }, + "Orientation": { "description": "方向传感器" }, @@ -111,7 +107,7 @@ "Push": { "description": "消息推送" - } + },"Statistic":{},"Share":{} }, "plus": { "error": { @@ -168,39 +164,7 @@ "password": "",/*Android应用打包使用密钥库中证书的密码*/ "aliasname": "",/*Android应用打包使用密钥库中证书的别名*/ "ImmersedStatusbar": true,/*Android平台开启沉浸式状态栏样式*/ - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] + "permissions": ["","","","","","","","","","","","","","","","","","","","","","","","","",""] }, "orientation": [ "portrait-primary" @@ -291,7 +255,7 @@ } }, "plugins": { - "statics": {}, + "statics": {"umeng":{"appkey_ios":"5ab09d69a40fa374da0002e4","channelid_ios":"有房IOS","appkey_android":"5ab09e16f29d9854f200026e","channelid_android":"有房Android"}}, "maps": { "baidu": {/*配置应用使用百度地图,参考http://ask.dcloud.net.cn/article/29*/ "appkey_ios": "cmXf4GGYGYiu1fuVRN4847cGvgR25WTV",/*iOS平台百度地图appkey*/ @@ -307,7 +271,7 @@ "description": "个推推送" } }, - "share": {}, + "share": {"weixin":{"appid":"wx734a9e3085abcd90","appsecret":"47ce59f3c52984c4e193880fb09b12af","description":"可选,微信分享"}}, "payment": {}, "oauth": { "weixin": { From b9f5c8a6ed3a6c67301bfcf4749b0ba9439a3054 Mon Sep 17 00:00:00 2001 From: hubingliang Date: Mon, 26 Mar 2018 14:25:44 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/config.js | 3 +- fangija-zsyf/js/shara/shara.js | 60 +++++++++++++++++++++++++ fangija-zsyf/manifest.json | 4 +- fangija-zsyf/views/news/newsDetail.html | 2 + 4 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 fangija-zsyf/js/shara/shara.js diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js index 2107923..1131d53 100644 --- a/fangija-zsyf/config.js +++ b/fangija-zsyf/config.js @@ -1,6 +1,7 @@ /**服务端地址**/ //var BASE_PATH = "http://192.168.10.128:8084"; -var BASE_PATH = "http://192.168.10.53: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/shara/shara.js b/fangija-zsyf/js/shara/shara.js new file mode 100644 index 0000000..b77d07e --- /dev/null +++ b/fangija-zsyf/js/shara/shara.js @@ -0,0 +1,60 @@ +plus.share.getServices(function(s) { + shares = ss; + for (var i in ss ) { + var s = ss[i]; + var item = document.createElement("li"); + item.setAttribute("class", "ditem"); + item.setAttribute("onclick", (s.id == "weixin") ? "shareWeiXin(this.plusShare)" : "shareAction(this.plusShare)"); + item.innerText = s.description; + item.plusShare = s; + list.appendChild(item); + } +}, function(e) { + alert("获取分享服务列表失败:" + e.message); +}); + +function shareAction(s, ex) { + outSet("分享操作:"); + if (!s) { + outLine("无效的分享服务!"); + return; + } + if (s.authenticated) { + outLine("---已授权---"); + shareMessage(s, ex); + } else { + outLine("---未授权---"); + s.authorize(function() { + shareMessage(s, ex); + }, function(e) { + outLine("认证授权失败:" + e.code + " - " + e.message); + }); + } +} + +function shareMessage(s,ex){ + var msg={content:sharecontent.value,extra:{scene:ex}}; + if(pic&&pic.realUrl){ + msg.pictures=[pic.realUrl]; + } + + s.send( msg, function(){ + alert( "分享到\""+s.description+"\"成功! " ); + }, function(e){ + alert( "分享到\""+s.description+"\"失败: "+e.code+" - "+e.message ); + } ); +} + +function cancelAuth(){try{ + + for ( var i in shares ) { + var s = shares[i]; + if ( s.authenticated ) { + outLine( "取消\""+s.description+"\""); + } + s.forbid(); + } + // 取消授权后需要更新服务列表 + updateServices(); + outLine( "操作成功!" );}catch(e){alert(e);} +} \ No newline at end of file diff --git a/fangija-zsyf/manifest.json b/fangija-zsyf/manifest.json index c5b82b8..0a96b48 100644 --- a/fangija-zsyf/manifest.json +++ b/fangija-zsyf/manifest.json @@ -1496,7 +1496,9 @@ "fonts/mui.ttf", "images/icon-clear.png" ], - "refer": [], + "refer": [ + "views/news/newsDetail.html" + ], "priority": 0 } }, diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index 32af709..62d7638 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -23,6 +23,7 @@ +

@@ -50,6 +51,7 @@ $.config = {router: false} + - + From c42e41c5fc78b9141bec0b1fc02a00536de5649c Mon Sep 17 00:00:00 2001 From: hubingliang Date: Tue, 27 Mar 2018 13:32:32 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/shara/sharaMine.js | 13 +++++++++---- fangija-zsyf/views/news/newsDetail.html | 8 +++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/fangija-zsyf/js/shara/sharaMine.js b/fangija-zsyf/js/shara/sharaMine.js index 1ad3b70..3d84c86 100644 --- a/fangija-zsyf/js/shara/sharaMine.js +++ b/fangija-zsyf/js/shara/sharaMine.js @@ -23,15 +23,18 @@ function shareAction(sb,bh) { alert("无效的分享服务!"); return; } - var msg={content:sharehrefDes,extra:{scene:sb.x}}; if(bh){ msg.href=shareUrl; if(sharehrefTitle&&sharehrefTitle!=""){ msg.title=sharehrefTitle; } - if(sharehrefDes&&sharehrefDes!=""){ - msg.content=sharehrefDes; + if(sharehrefDes&&sharehrefDes!=""){ + if(sb.title=="新浪微博"){ + msg.content=shareUrl+sharehrefDes; + }else{ + msg.content=sharehrefDes; + } } msg.thumbs=["_www/logo.png"]; msg.pictures=["_www/logo.png"]; @@ -63,7 +66,7 @@ function shareMessage(msg,s){ alert("分享到\""+s.description+"\"成功! " ); }, function(e){ - alert( "分享到\""+s.description+"\"失败: "+JSON.stringify(e) ); + alert( "分享到\""+s.description+"\"失败 !"); } ); } @@ -77,6 +80,8 @@ function shareMessage(msg,s){ shareBts.push({title:'微信好友',s:ss,x:'WXSceneSession'})); ss=shares['qq']; ss&&ss.nativeClient&&shareBts.push({title:'QQ',s:ss}); + ss=shares['sinaweibo']; + ss&&shareBts.push({title:'新浪微博',s:ss}); // 弹出分享列表 shareBts.length>0?plus.nativeUI.actionSheet({title:'分享链接',cancel:'取消',buttons:shareBts},function(e){ (e.index>0)&&shareAction(shareBts[e.index-1],true); diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index 2f7af8c..650e28a 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -57,8 +57,8 @@ $.config = {router: false} + + + From ff65cb002646defb34d40ef8aa9e16e39bab3997 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Tue, 27 Mar 2018 13:53:09 +0800 Subject: [PATCH 06/12] update --- fangija-zsyf/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js index 2107923..2ec781f 100644 --- a/fangija-zsyf/config.js +++ b/fangija-zsyf/config.js @@ -1,6 +1,6 @@ /**服务端地址**/ //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.53:8084"; -//var BASE_PATH = "http://192.168.10.170:8084"; /**是否显示过启动页面**/ var lauchFlag = false; \ No newline at end of file From 51dd55419352aa2f4f36286c20298f6fd263a048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Tue, 27 Mar 2018 14:56:53 +0800 Subject: [PATCH 07/12] add js --- fangija-zsyf/js/axiosPlugin.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 fangija-zsyf/js/axiosPlugin.js diff --git a/fangija-zsyf/js/axiosPlugin.js b/fangija-zsyf/js/axiosPlugin.js new file mode 100644 index 0000000..bfa7c47 --- /dev/null +++ b/fangija-zsyf/js/axiosPlugin.js @@ -0,0 +1,17 @@ +axios.defaults.baseURL = BASE_PATH; +axios.defaults.headers.post['Content-Type'] = 'application/json'; + +// 添加请求拦截器 +axios.interceptors.request.use(function (config) { + config.headers.Authorization = '111111111' + return config; + }, function (error) { + return Promise.reject(error); +}); + +// 添加响应拦截器 +axios.interceptors.response.use(function (response) { + return response; + }, function (error) { + return Promise.reject(error); +}); \ No newline at end of file From 96b46cab92c5fe296143e9d329d814073b819672 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Tue, 27 Mar 2018 14:57:33 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E6=94=B6=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/config.js | 2 +- fangija-zsyf/css/main.css | 4 +- fangija-zsyf/views/news/newsDetail.html | 65 ++++++++++++++++--------- 3 files changed, 45 insertions(+), 26 deletions(-) diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js index 8e5fe1f..5c42836 100644 --- a/fangija-zsyf/config.js +++ b/fangija-zsyf/config.js @@ -2,6 +2,6 @@ //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.53:8084"; -var BASE_PATH = "http://192.168.10.171:8084"; +//var BASE_PATH = "http://192.168.10.171:8084"; /**是否显示过启动页面**/ var lauchFlag = false; \ No newline at end of file diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css index 5f6465e..ede7acb 100644 --- a/fangija-zsyf/css/main.css +++ b/fangija-zsyf/css/main.css @@ -5,7 +5,7 @@ *{font-size:16px;font-family:arial,"华文细黑";} ul li{list-style:none;} img{display:block;} -a{color:#18a2ff;} +a{color:#F18D00;} em{font-style:normal;} em.up{color:#ff1100;} em.down{color:#2cb66a;} @@ -531,7 +531,7 @@ input::-webkit-input-placeholder{ .commentInput{height:66px;background:#fff;position:absolute;right:0;left:0;bottom:0;z-index:10;} .commentInput .searchbar{padding:0.75rem 0.5rem;padding-left:0;margin:0;height:66px;background:#fff;border-top:solid 1px #dcdcdc;position:absolute;right:0;left:0;bottom:0;z-index:10;} .commentInput .searchbar .search-input{line-height:36px;} -.commentInput .searchbar .search-input input{height:36px;background:#EFEFEF;padding-left:1.8rem;} +.commentInput .searchbar .search-input input{height:36px;background:#EFEFEF;} .commentInput .searchbar span{text-align:center;} .commentInput .searchbar span a{font-size:0.65rem;color:#666;line-height:36px;} .commentInput .searchbar span .collection{margin-left:0.75rem;position:static;} diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index df412a0..86f2fe2 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -10,9 +10,9 @@ - + @@ -62,7 +62,7 @@
-
@@ -103,6 +103,7 @@ $.config = {router: false} + From 548805f1c055ccea6bd68a92ae29a91a2cd492d6 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Wed, 28 Mar 2018 13:42:38 +0800 Subject: [PATCH 12/12] bug update --- fangija-zsyf/css/main.css | 20 ++-- fangija-zsyf/js/district-search.js | 0 fangija-zsyf/views/news/newsDetail.html | 125 ++++++++++++++---------- 3 files changed, 86 insertions(+), 59 deletions(-) delete mode 100644 fangija-zsyf/js/district-search.js diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css index 9926e33..20b332a 100644 --- a/fangija-zsyf/css/main.css +++ b/fangija-zsyf/css/main.css @@ -528,21 +528,23 @@ input::-webkit-input-placeholder{ .list-block.commentList .item-media img{width:2.3rem;height:2.3rem;} .list-block.commentList .item-text{height:auto;min-height:1.5rem;} -.commentInput{height:66px;background:#fff;position:absolute;right:0;left:0;bottom:0;z-index:10;} -.commentInput .searchbar{padding:0.75rem 0.5rem;padding-left:0;margin:0;height:66px;background:#fff;border-top:solid 1px #dcdcdc;position:absolute;right:0;left:0;bottom:0;z-index:10;} -.commentInput .searchbar .search-input{line-height:36px;} -.commentInput .searchbar .search-input input{height:36px;background:#EFEFEF;} -.commentInput .searchbar span{text-align:center;} -.commentInput .searchbar span a{font-size:0.65rem;color:#666;line-height:36px;} -.commentInput .searchbar span .collection{margin-left:0.75rem;position:static;} +.commentBox{height:66px;background:#fff;position:absolute;right:0;left:0;bottom:0;z-index:10;} +.commentBox .searchbar{padding:0.75rem 0.5rem;padding-left:0;margin:0;height:66px;background:#fff;border-top:solid 1px #DCDCDC;position:absolute;right:0;left:0;bottom:0;z-index:10;} +.commentBox .searchbar .search-input{line-height:36px;} +.commentBox .searchbar .search-input input{height:36px;background:#EFEFEF;} +.commentBox .searchbar.commentInputBox .search-input input{padding-left:1.8rem;} +.commentBox .searchbar span{text-align:center;} +.commentBox .searchbar span a font{font-size:0.65rem;color:#666;line-height:36px;} +.commentBox .searchbar span .collection{margin-left:0.75rem;position:static;} +.commentBox .searchbar > a{line-height:36px;} .icon-comments{width:17px;height:16px;background:url(../images/icon-comments.png) no-repeat center center;background-size:100%;margin-left:0.3rem;vertical-align:baseline;} .icon-praise-grey01{width:14px;height:14px;background:url(../images/icon-praise-grey01.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;} .icon-praise-grey02{width:16px;height:16px;background:url(../images/icon-praise-grey02.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:text-bottom;} .icon-praise-orange01{width:14px;height:14px;background:url(../images/icon-praise-orange.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;} .icon-praise-orange02{width:16px;height:16px;background:url(../images/icon-praise-orange.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:text-bottom;} -.commentInput .icon-collection01{display:inline-block;vertical-align:text-bottom;margin:0;} -.commentInput .icon-collection02{display:inline-block;vertical-align:text-bottom;margin:0;} +.commentBox .icon-collection01{display:inline-block;vertical-align:text-bottom;margin:0;} +.commentBox .icon-collection02{display:inline-block;vertical-align:text-bottom;margin:0;} /* 顶部 */ .top{width:100%;padding:0.75rem 0.5rem;border-bottom:solid 1px #dcdcdc;overflow:hidden;position:absolute;top:0;z-index:10;} diff --git a/fangija-zsyf/js/district-search.js b/fangija-zsyf/js/district-search.js deleted file mode 100644 index e69de29..0000000 diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index ddd239f..f8db054 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -61,14 +61,14 @@ -
+
@@ -98,6 +98,7 @@ $.config = {router: false} + @@ -108,7 +109,7 @@ $.config = {router: false}