主题 : 获取广告
级别: 解元
UID: 120928
积分:317 加为好友
威望: 56 精华: 0
主题:60 回复:238
注册时间:2018-03-06
在线时长:0
1#   发表于:2018-04-10 17:53:29  IP:36.157.*.*


获取广告报错
级别: 解元
UID: 120928
积分:317 加为好友
威望: 56 精华: 0
主题:60 回复:238
注册时间:2018-03-06
在线时长:0
2#   发表于:2018-04-10 17:54:09  IP:36.157.*.*
回复第1楼
级别: 版主
UID: 121385
积分:34048 加为好友
威望: 0 精华: 0
主题:0 回复:32073
注册时间:2018-03-20
在线时长:0
3#   发表于:2018-04-11 08:27:33  IP:117.93.*.*
回复第2楼在哪个页面获取的?
世间没有一种具有真正价值的东西,可以不经过艰苦辛勤劳动而能够得到的。
级别: 解元
UID: 120928
积分:317 加为好友
威望: 56 精华: 0
主题:60 回复:238
注册时间:2018-03-06
在线时长:0
4#   发表于:2018-04-11 09:17:42  IP:36.154.*.*
回复第3楼

首页
级别: 版主
UID: 121385
积分:34048 加为好友
威望: 0 精华: 0
主题:0 回复:32073
注册时间:2018-03-20
在线时长:0
5#   发表于:2018-04-11 09:22:03  IP:117.93.*.*
回复第4楼您都没有调用。
参照我这个看下
广告对象属性
percent 转化率=点击数/展现数
name:名称
category:类型 image、flash、text、code 分别是图片、flash、文本、代码类型
code:广告代码,在category为code类型时候 该项有值
weight:权重
displayCount:展现次数
clickCount:点击次数
startTime:开始时间
endTime:结束时间
enabled:是否禁用
具体例子:
[@cms_advertising id='1'] 
[#if tag_bean??]
[#if tag_bean.category=="image"]
[#assign html]
<a href="${( tag_bean.attr.image_link)!}" target="${ tag_bean.attr.image_target!}" title="${(tag_bean.attr.image_title)!}">
<img src="${tag_bean.attr.image_url}" border="0"[#if (tag_bean.attr.image_width)??] width="${tag_bean.attr.image_width}"[/#if][#if (tag_bean.attr.image_height)??] height="${tag_bean.attr.image_height}"[/#if]/>
</a>
[/#assign]
${html!}
[#elseif tag_bean.category=="flash"]
[#assign html]
<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" menu="true"
 src="${(tag_bean.attr.flash_url)!}"[#if tag_bean.attr.flash_width?? && tag_bean.attr.flash_width!=""] width="${tag_bean.attr.flash_width}"[/#if][#if tag_bean.attr.flash_height?? && tag_bean.attr.flash_height!=""] height="${tag_bean.attr.flash_height}"[/#if]></embed>
[/#assign]
${html!}
[#elseif tag_bean.category=="text"]
[#assign html]
<a href="${(tag_bean.attr.text_link)!}" target="${(tag_bean.attr.text_target)!}">
<span style="[#if (tag_bean.attr.text_color)??]color:${tag_bean.attr.text_color};[/#if][#if (tag_bean.attr.text_font)??]font-size:${tag_bean.attr.text_font};[/#if]">${(tag_bean.attr.text_title)!}</span>
</a>
[/#assign]
${html!}
[#elseif tag_bean.category=="code"]
${tag_bean.code!}
[#else]
未知的广告类型:${tag_bean.category!}
[/#if]
[#else]
广告不存在"
[/#if]
[/@cms_advertising] 
简单的调用方式
${base}/ad.jspx?id=1   调用具体某个广告
世间没有一种具有真正价值的东西,可以不经过艰苦辛勤劳动而能够得到的。
级别: 解元
UID: 120928
积分:317 加为好友
威望: 56 精华: 0
主题:60 回复:238
注册时间:2018-03-06
在线时长:0
6#   发表于:2018-04-11 09:41:12  IP:36.157.*.*
回复第5楼
谢谢
级别: 版主
UID: 121385
积分:34048 加为好友
威望: 0 精华: 0
主题:0 回复:32073
注册时间:2018-03-20
在线时长:0
7#   发表于:2018-04-11 09:42:50  IP:117.93.*.*
回复第6楼
世间没有一种具有真正价值的东西,可以不经过艰苦辛勤劳动而能够得到的。
1 共1页