diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js index 2107923..8f0b953 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.170:8084"; +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 lauchFlag = false; \ No newline at end of file diff --git a/fangija-zsyf/images/icon-praise-orange.png b/fangija-zsyf/images/icon-praise-orange.png new file mode 100644 index 0000000..13cb029 Binary files /dev/null and b/fangija-zsyf/images/icon-praise-orange.png differ 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 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/js/shara/sharaMine.js b/fangija-zsyf/js/shara/sharaMine.js new file mode 100644 index 0000000..658be98 --- /dev/null +++ b/fangija-zsyf/js/shara/sharaMine.js @@ -0,0 +1,89 @@ +/** + * + * 更新分享服务 + */ +function updateSerivces(){ + plus.share.getServices( function(s){ + shares={}; + for(var i in s){ + var t=s[i]; + shares[t.id]=t; + } + }, function(e){ + alert("获取分享服务列表失败:"+e.message ); + } ); +} +/** + * 分享操作 + * @param {JSON} sb 分享操作对象s.s为分享通道对象(plus.share.ShareService) + * @param {Boolean} bh 是否分享链接 + */ +function shareAction(sb,bh) { + if(!sb||!sb.s){ + alert("无效的分享服务!"); + return; + } + var msg={content:sharehrefDes,extra:{scene:sb.x}}; + if(bh){ + msg.href=shareUrl; + if(sharehrefTitle&&sharehrefTitle!=""){ + msg.title=sharehrefTitle; + } + if(sharehrefDes&&sharehrefDes!=""){ + if(sb.title=="新浪微博"){ + msg.content=shareUrl+sharehrefDes; + }else{ + msg.content=sharehrefDes; + } + } + msg.thumbs=[picUrl]; + msg.pictures=[picUrl]; + }else{ + if(pic&&pic.realUrl){ + msg.pictures=[pic.realUrl]; + } + } + // 发送分享 + if ( sb.s.authenticated ) { + shareMessage(msg,sb.s); + } else { + alert("---未授权---"); + sb.s.authorize( function(){ + shareMessage(msg,sb.s); + },function(e){ + alert("认证授权失败:"+e.code+" - "+e.message ); + + }); + } +} +/** + * 发送分享消息 + * @param {JSON} msg + * @param {plus.share.ShareService} s + */ +function shareMessage(msg,s){ + s.send( msg, function(){ + alert("分享到\""+s.description+"\"成功! " ); + + }, function(e){ + alert( "分享到\""+s.description+"\"失败 !"); + + } ); +} + + // 分析链接 + function shareHref(){ + var shareBts=[]; + // 更新分享列表 + var ss=shares['weixin']; + ss&&ss.nativeClient&&(shareBts.push({title:'微信朋友圈',s:ss,x:'WXSceneTimeline'}), + 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); + }):plus.nativeUI.alert('当前环境无法支持分享链接操作!'); + } \ No newline at end of file diff --git a/fangija-zsyf/manifest.json b/fangija-zsyf/manifest.json index c5b82b8..929aa72 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":{"description":"可选,微信分享"}}, "payment": {}, "oauth": { "weixin": { @@ -1496,6 +1460,16 @@ "fonts/mui.ttf", "images/icon-clear.png" ], + "refer": [ + "views/news/newsDetail.html" + ], + "priority": 0 + }, + "views/news/newsDetail.html": { + "resources": [ + "images/icon-comments.png", + "images/icon-praise-grey02.png" + ], "refer": [], "priority": 0 } diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index 32af709..f8db054 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -10,9 +10,9 @@ - + @@ -23,15 +23,66 @@ +

-
+


+ +
+
    +
  • 房贷
  • +
  • 广州
  • +
  • 首套房
  • +
+
+
+ +


更多房产资讯上有房APP

+
+ + +
+
    +
+
+ + +
+
+
+ +
+ +
+ + + + +
+ +
@@ -45,22 +96,69 @@ Zepto = $ $.config = {router: false} + + + + + +