var xici_user_api = "http://www.xici.net/apps/wedding/?method=wedding.user.getusername&from=comm_nav&jsoncallback=?";
var goldenflower_drop_api = "http://jinhua.xici.net/api/drop?userid={0}&username={1}&userlevel={2}&usercity={3}&activityid={4}&jsoncallback=?";
var goldenflower_accept_url = "http://jinhua.xici.net/gf/{0}/gift?aprid={1}";
var accepturl; $.format = function (source, params) {
if (arguments.length == 1)
return function () {
var args = $.makeArray(arguments);
args.unshift(source);
return $.format.apply(this, args);
};
if (arguments.length > 2 && params.constructor != Array) {
params = $.makeArray(arguments).slice(1);
}
if (params.constructor != Array) {
params = [params];
}
$.each(params, function (i, n) {
source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
});
return source;
}; function log(msg) {
console.log(msg);
} function getQueryString(name) {
var jssrc = $('#goldenflower').attr('src');
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = jssrc.substring(jssrc.indexOf("?")).substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
} $.ajax({
url: xici_user_api,
type: 'GET',
scriptCharset: 'GB2312',
cache: false,
async: true,
dataType: 'json',
error: function () {
},
success: function (xiciDate) {
if (xiciDate.Result.UserId > 0) {
var activityid = getQueryString("activityid");
var dropUrl = $.format(goldenflower_drop_api, xiciDate.Result.UserId, xiciDate.Result.UserName, xiciDate.Result.UserLevel, xiciDate.Result.UserCity, activityid);
dropUrl = encodeURI(dropUrl);
$.ajax({
url: dropUrl,
type: 'GET',
scriptCharset: 'UTF-8',
cache: false,
async: true,
dataType: 'json',
error: function () {
},
success: function (dropData) {
if (dropData.status) {
var body = $("body");
accepturl = $.format(goldenflower_accept_url, activityid, dropData.aprid);
var bottomHtml = $.format(dropHtml, dropData.flashurl, dropData.flashurl);
body.append(bottomHtml);
}
}
});
}
}
}); function Flash_ClickOpen() {
document.getElementById('bottomToolbar').innerHTML = "";
document.getElementById('bottomToolbar').style.display = 'none';
window.open(accepturl);
} function Flash_ClickClose() {
document.getElementById('bottomToolbar').innerHTML = "";
document.getElementById('bottomToolbar').style.display = 'none';
} var dropHtml = '<div id="bottomToolbar"><object width="970" height="350"'
+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"'
+ 'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">'
+ '<param value="{0}" name="movie">'
+ '<param value="high" name="quality">'
+ '<param value="transparent" name="wmode">'
+ '<param value="exactfit" name="SCALE">'
+ '<embed width="970" height="350" wmode="transparent" type="application/x-shockwave-flash"'
+ 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"'
+ 'quality="high" src="{1}">'
+ '</object></div>'; http://jinhua.xici.net/api/drop?userid=15346193&username=wolfzz&userlevel=1&usercity=nanjing&activityid=1&jsoncallback=?
?({"status":true,"message":"success","aprid":338075,"flashurl":"http://www.xici.net/flash/suguo.swf","title":"苏果超市50元购物卡","shopname":"苏果超市","point":10})
http://jinhua.xici.net/gf/{0}/gift?aprid={1}

Xici drop flower的更多相关文章

  1. 如何区别数据库删除语句drop与delete与truncate?

    1.delete:删除数据表中的行(可以删除某一行,也可以在不删除数据表的情况下删除所有行) 删除某一行:delete from 数据表名称 where 列名称=值: 删除所有行:delete*fro ...

  2. HTML5 之拖放(drag与drop)

    拖放(Drag 和 drop)是 HTML5 标准的组成部分. 拖放是一种常见的特性,即抓取对象以后拖到另一个位置. 在 HTML5 中,拖放是标准的一部分,任何元素都能够拖放. HTML5 拖放实例 ...

  3. 通过HTML5的Drag and Drop生成拓扑图片Base64信息

    HTML5 原生的 Drag and Drop是很不错的功能,网上使用例子较多如 http://html5demos.com/drag ,但这些例子大部分没实际用途,本文将搞个有点使用价值的例子,通过 ...

  4. 炫酷的html5(Drag 和 drop)拖放

    在 HTML5 中,拖放是标准的一部分,任何元素都能够拖放.也是一种常见的特性,即抓取对象以后拖到另一个位置. 浏览器支持 Internet Explorer 9.Firefox.Opera 12.C ...

  5. Drop all the tables, stored procedures, triggers, constraints and all the dependencies in one SQL statement

    Is there any way in which I can clean a database in SQl Server 2005 by dropping all the tables and d ...

  6. HTML 学习笔记 (drag & drop)

    拖放(Drag & Drop)是一种常见的特性,即抓取对象以后拖到另一个位置.在 HTML5 中,拖放是标准的一部分,任何元素都能够拖放.过去,我们用监听鼠标的Mousedown.Mouseo ...

  7. sql中 truncate 、delete与drop区别

    相同点: 1.truncate和不带where子句的delete.以及drop都会删除表内的数据. 2.drop.truncate都是DDL语句(数据定义语言),执行后会自动提交. 不同点: 1. t ...

  8. Drop it

    FCC题目:队友该卖就卖,千万别舍不得. 让我们来丢弃数组(arr)的元素,从左边开始,直到回调函数return true就停止. 第二个参数,func,是一个函数.用来测试数组的第一个元素,如果返回 ...

  9. HTML5 Drop API

    转自:http://www.cnblogs.com/fsjohnhuang/p/3961066.html 一.前言    在HTML4的时代,各前端工程师为了实现拖拽功能可说是煞费苦心,初听HTML5 ...

随机推荐

  1. Shell执行SQL,并存入变量

    shell的语法还是比较严格的(比如变量赋值,两边不能用等号) #!/bin/bash ids=$(mysql -h172. -uroot -p1qaz@WSX -N -e "select ...

  2. (视频分辨率介绍)混淆的概念:SIF与CIF、4CIF与D1

    http://www.microjie.com/index.php/professional-knowledge/82-standards-parterns/26-profession-knowled ...

  3. leetcode 847. Shortest Path Visiting All Nodes 无向连通图遍历最短路径

    设计最短路径 用bfs 天然带最短路径 每一个状态是 当前的阶段 和已经访问过的节点 下面是正确但是超时的代码 class Solution: def shortestPathLength(self, ...

  4. shiro+jwt+springboot理解

    转自 https://www.cnblogs.com/fengli9998/p/6676783.html https://www.jianshu.com/p/0366a1675bb6 https:// ...

  5. Javascript-new Date() 与 Date() 的区别

    var today1 = Date() //返回一个字符串(string),没有getDate等日期对象方法,内容为当前时间 var today2 = new Date() //返回一日期对象,内容为 ...

  6. TZ_14_Zuul网关_过滤器

    1.Zuul作为网关的其中一个重要功能,就是实现请求的鉴权.而这个动作我们往往是通过Zuul提供的过滤器来实现的. 2.自定义过滤器实现用户登陆时需要携带一个Key才可以登陆,否则返回403 1> ...

  7. _mysql_exceptions.IntegrityError: (1062, "Duplicate entry, Python操作MySQL数据库,插入重复数据

    [python] view plain copy sql = "INSERT  INTO test_c(id,name,sex)values(%s,%s,%s)" param =  ...

  8. spring的基于xml的AOP配置案例和切入点表达式的一些写法

    <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.spr ...

  9. JQ效果 透明图片覆盖动画

    效果图呈上 先说思路 1,一个固定的框架,有两张图片,一张是狗狗的,一张是练习方式,想把做好的练习方式隐藏 2,效果上想要从下面滑动出来,所以透明框定位在下面 3,整理需要的东西,缓慢升起需要动画效果 ...

  10. 区间加值,区间gcd, 牛客949H

    牛客小白月赛16H 小阳的贝壳 题目链接 题意 维护一个数组,支持以下操作: 1: 区间加值 2: 询问区间相邻数差的绝对值的最大值 3: 询问区间gcd 题解 设原数组为\(a\), 用线段树维护\ ...