|
仿途牛的实例中,在旅游目的地的例子中,想实现点击图片后跳转到某个链接。
在 placeTwoData.json文件中最后一列增加 fLink列,详细如下
[
{"fID":"001","fOneID":"001","fTitle":"分支公司业务战报","fImg":"./img/b1.jpg","fLink":"baidu.com"},
{"fID":"007","fOneID":"002","fTitle":"2016年个险开门红TOP20实时播报","fImg":"./img/b2.jpg","fLink":"baidu.com"},
{"fID":"010","fOneID":"002","fTitle":"2016年个险开门红暂收保费业绩快报","fImg":"./img/b3.jpg","fLink":""},
{"fID":"011","fOneID":"003","fTitle":"年度短险指标完成情况统计","fImg":"./img/b4.jpg","fLink":""},
{"fID":"006","fOneID":"004","fTitle":"2016年银保开门红TOP20实时播报","fImg":"./img/b5.jpg","fLink":""},
{"fID":"016","fOneID":"005","fTitle":"业管专项报表","fImg":"./img/b6.jpg","fLink":""},
{"fID":"017","fOneID":"006","fTitle":"财务专项报表","fImg":"./img/b7.jpg","fLink":""},
{"fID":"018","fOneID":"007","fTitle":"客服专项报表","fImg":"./img/b8.jpg","fLink":""}
]
那么问题来了,w文件中的跳转链接怎么获取呢?我是新新手,试了好多次得到的都是常常的字符串,没法获取到字段值,下面红色字体部分是链接的内容,请帮助分析
xid="list3" data="placeTwoData" filter="$row.val("fOneID")==$model.comp('placeOneData').val("fID")">
<ul xid="listTemplateUl3" class="x-list-template" bind-click="listClick">
<li xid="li4" class="text-center x-block">
<a href="document.getElementById('fLink').value">
<h5 xid="h52" bind-text="ref('fTitle')" class="text-white"/>
<img alt="" xid="image32" bind-attr-src='$model.getImageUrl(val("fImg"))' class="img-responsive img1"/></a> |
|