This commit is contained in:
尹吉欢
2018-04-10 14:10:23 +08:00
parent 141956e0ee
commit e6b94fe98b
2 changed files with 20 additions and 20 deletions
+9 -7
View File
@@ -1882,7 +1882,12 @@ $.config = {router: false}
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script> <script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
<script type="text/javascript" src="../../js/axios.min.js"></script> <script type="text/javascript" src="../../js/axios.min.js"></script>
<script type="text/javascript" src="../../js/axiosPlugin.js"></script> <script type="text/javascript" src="../../js/axiosPlugin.js"></script>
<script src="new_file.js"></script>
<script>
var myFocus = new Vue({
el:"#myFocus"
})
</script>
<script> <script>
/* 页面滑动切换 */ /* 页面滑动切换 */
@@ -1907,13 +1912,13 @@ $('.cityImgBox > div').click(function () {
/* 获取资讯正文字数,截取资讯正文前30字,并添加... */ /* 获取资讯正文字数,截取资讯正文前30字,并添加... */
$(document).ready(function () { $(document).ready(function () {
var text = $(".cardInfo02 .item-title").text(); /*var text = $(".cardInfo02 .item-title").text();
var length = $(".cardInfo02 .item-title").text().length; var length = $(".cardInfo02 .item-title").text().length;
var textStr = ""; var textStr = "";
if(length > 30){ if(length > 30){
textStr = text.substr(0,30); textStr = text.substr(0,30);
$(".cardInfo02 .item-title").text(textStr + "..."); $(".cardInfo02 .item-title").text(textStr + "...");
} }*/
}); });
/* 关注&已关注切换 */ /* 关注&已关注切换 */
@@ -2378,9 +2383,6 @@ var myChart02 = echarts.init(document.getElementById('chart02'));
myChart02.setOption(option02,true); myChart02.setOption(option02,true);
</script> </script>
<script src="new_file.js"></script>
var myFocus = new Vue({
el:"#myFocus"
})
</body> </body>
</html> </html>
+11 -13
View File
@@ -44,12 +44,10 @@ Vue.component('my_focus',{
}, },
methods:{ methods:{
loadMyFocus:function(){ loadMyFocus:function(){
axios.get("/rest/quotations/userCollectCityInfo", { axios.get("/rest/quotations/userCollectCityInfo").then(function(response){
params: { myFocusDatas.myFocusList = response.data.data
}
}).then(function(response){
myFocusDatas.myFocusList = response.data.data.results
}).catch(function(error){ }).catch(function(error){
alert(error);
console.log(error) console.log(error)
}) })
} }
@@ -60,14 +58,14 @@ Vue.component('my_focus',{
}) })
//我的关注 //我的关注
var myFocus = new Vue({ //var myFocus = new Vue({
el:"#myFocus", // el:"#myFocus",
data:{ // data:{
myfocusList:[{num:1,city:"test1",avgPrice:"123",percent:"",ranking:"1"}, // myfocusList:[{num:1,city:"test1",avgPrice:"123",percent:"",ranking:"1"},
{num:2,city:"test2",avgPrice:"321",percent:"6.6",ranking:"2"} // {num:2,city:"test2",avgPrice:"321",percent:"6.6",ranking:"2"}
] // ]
} // }
}) //})
//涨幅榜 //涨幅榜
var tabCityRanking1 = new Vue({ var tabCityRanking1 = new Vue({