美文网首页
Daily work

Daily work

作者: assassian_zj | 来源:发表于2017-06-20 20:52 被阅读0次

![](file:///C:\Users\v_czjzhang\AppData\Roaming\Tencent\Users\792013934\QQ\WinTemp\RichOle_LUS8%IPB]LZ_7F$EC0T{B.png)![](file:///C:\Users\v_czjzhang\AppData\Roaming\Tencent\Users\792013934\QQ\WinTemp\RichOle_LUS8%IPB]LZ_7F$EC0T{B.png)![](file:///C:\Users\v_czjzhang\AppData\Roaming\Tencent\Users\792013934\QQ\WinTemp\RichOle_LUS8%IPB]LZ_7F$EC0T{B.png)![](file:///C:\Users\v_czjzhang\AppData\Roaming\Tencent\Users\792013934\QQ\WinTemp\RichOle_LUS8%IPB]LZ_7F$EC0T{B.png)![](file:///C:\Users\v_czjzhang\AppData\Roaming\Tencent\Users\792013934\QQ\WinTemp\RichOle_LUS8%IPB]LZ_7F$EC0T{B.png)![](file:///C:\Users\v_czjzhang\AppData\Roaming\Tencent\Users\792013934\QQ\WinTemp\RichOle_LUS8%IPB]LZ_7F$EC0T{B.png)![](file:///C:\Users\v_czjzhang\AppData\Roaming\Tencent\Users\792013934\QQ\WinTemp\RichOle_LUS8%IPB]LZ_7F$~EC0T{B.png)[图片上传中。。。(1)][图片上传中。。。(2)]1.常用代码

// new一个实例化的qv.zero.Page对象.
var page = new qv.zero.Page({
        jsonid:194583,  //主项目id
        game:'jxqy',      //游戏名称
        mqqEnv: true,  
        onlyMobile : true,
        isOpenSQView: true,
        redirectUrl: "",
        preloads : ['ShareMessage'], //预加载组件
        afterInit : function() {              //初始化之后执行的逻辑代码
            qv.zero.Login.ensure();     //强制登录(Login插件)
            $('body').on('click','a[href="#"]',function(e){
                        e.preventDefault();
            });
            //切换竞猜女神
            $('.check_goddess').click(function(){
                 zUtil.openUrl('//youxi.vip.qq.com/m/act/201705/jxqy_god/gift.html?_wv=1&_wwv=4', 195442 , 1);
            });
            $('.next').click(function(){
                zUtil.openUrl('//youxi.vip.qq.com/m/act/201705/jxqy_god/goddess.html?_wv=1&_wwv=4', 195442 , 1);
            });
            //参与竞猜活动
            $('.to_guess').click(function(){
                 zUtil.openUrl('//buluo.qq.com/mobile/detail.html?_wv=1027&bid=304889&pid=7200852-1495082009&source=buluoadmin&from=buluoadmin', 195441 , 1);    
            });
            //分享
            var share_data = zMsg.getFormData(1)[0];
            var sm = this.sm = new qv.zero.ShareMessage({
                title : share_data.share_title,
                desc : share_data.share_desc,
                image_url : window.location.protocol + share_data.share_img,
                actid: 194651
            });
            sm.setOnShareHandler();//右上角分享按钮
        }
    });

分享功能:通过zMsg.getFormData(1)[0]就能得到我们所需要分享的信息。


image.png

子活动(关注)

image.png

子活动(下载启动游戏)

image.png

子活动(领取礼包) --- 一般领取游戏礼包都需要通过调zHttp.syrequest()这个方法。

回调方法里面的zHttp.showResponse()方法返回的是提示语。


image.png image.png image.png image.png

子活动(投票)

image.png image.png

search作为page对象的一个方法,如果想在另一个方法afterInit方法中调用search方法,则需要在afterInit方法的内部保存下this指向,然后通过me.search()调用即可,不然会报错。

image.png
常用代码
    afterInit: function(){
                var me = this;
                me.search();
                //启动游戏(下载游戏)
                $('.start_game').click(function(){
                        OZ.report({operType: '点击',operDesc: '开始游戏'});  //报道点击量
                        zHttp.send({actid:199409}, function(){
                              qv.zero.SQGameManager.start(page);  //在手游中打开游戏
                        });
                });
                //关注
                $('.concern,.guestbook').click(function(){
                    var url = $(this).data("url");
                    var aid = $(this).data("aid");
                    zUtil.openUrl(url ,aid, 1);
                });
                //领取礼包
                $('.recive').click(function(){
                    zHttp.syrequest({actid:199720}, function(json,actid,fn){
                        zHttp.showResponse(json,actid,fn);
                    });
                });
                //投票
                $('.vote').click(function(){
                    var voteid = $(this).data("uin");
                    zHttp.syrequest({actid:199427, vote_uin:voteid}, function(json,actid,fn){
                        zHttp.showResponse(json,actid,fn);
                        me.search();
                    });
                });
                //分享
                var sm = this.sm = new qv.zero.ShareMessage({
                    title: "6月必看-美女CEO高端组局!",
                    desc: "美女CEO组局欢乐麻将,老司机教你搓麻技巧,Q币奖品送送送!",
                    image_url: window.location.protocol + "//imgcache.gtimg.cn/vipstyle/game/act/owx/201706/hlmj/img/share.png",
                    actid: 198089,
                    url: "//youxi.vip.qq.com/m/act/201706/owx/hlmj/index.html?_wv=1"
                });
                sm.setOnShareHandler(); //右上角分享按钮
            }

子活动(拉取QQ密友)

image.png image.png

子活动(领取注册礼包)

image.png image.png image.png

判断是否安装

qv.zero.SQGameManager.isInstalled(this,function(flag){
    if(flag){
            $(".start").show();
            $(".xz").hide();
          } else {
            $(".start").hide();
            $(".xz").show();
            }
});

子活动(我要当主播)

image.png

子活动(邀请好友)

image.png image.png

子活动(拉取同玩好友)

image.png image.png

子活动(进入直播间)

image.png

子活动(分享)

image.png

调用区服组件

image.png

返回的是组件getData函数里面的4个返回值。

image.png image.png

主人态与客人态

主人态链接为:http://youxi.vip.qq.com/m/act/201706/zj/hyrz0630/hyrz_z.html?_wv=1&test=792013934
客人态链接为:http://youxi.vip.qq.com/m/act/201706/zj/hyrz0630/hyrz_z.html?_wv=1&invite_uin&test=3126300353,并且登录态要修改为客人态的QQ号。

抽奖

抽奖单需要产品提供1.抽奖MP单号 2.订单号 3.礼包组编号 4.礼包ID等等,
同时若需要验证用户是否还拥有抽奖机会,需到 活动日志-》查询抽奖机会(需要填写QQ号和MP单号) 中查询抽奖机会次数。
同时还需要检查MP单是否存在异常,在子活动列表中选择最后一项,像音乐符号的按键名为 "检查子活动"

相关文章

  • Work Daily

    每个项目开始之前都要写一个大概的任务列表。确定每个模块,每个功能花费的时间。 每天下班之前到redmine登记工时...

  • Daily work

    ![](file:///C:\Users\v_czjzhang\AppData\Roaming\Tencent\U...

  • daily work

    上午: 回复询盘,消息 挑选照片,拍摄新照片 整理客户资料 发微信状态 下午: 更新动态。 WhatsApp, F...

  • My story II

    My daily work in the conference company was to call those...

  • Sadhguru:Your Mind Should Work F

    Daily Wisdom Sadhguru:Your Mind Should Work For You, Not ...

  • The core of programming

    Don't get trapped in your daily programming work! If you ...

  • The book is advertising.

    In my daily work recently,I had the access to a total new...

  • Keep busy

    My daily work is still busy at high speed The state is OK...

  • Keep busy

    My daily work is still busy at high speed The state is OK...

  • Daily work of an editor

    In fact, my work just like a delivery worker——put good...

网友评论

      本文标题:Daily work

      本文链接:https://www.haomeiwen.com/subject/ybcnqxtx.html