因为业务需要,为某银行做一个前半部分有业务展示动效,后半部分为砸蛋活动的h5,由于需要用到比较强的互动,所以,就选择ih5这种交互功能比较完善的第三方工具来做。做完之后发现这样的需求应该还是蛮多的,因为这样的h5可以将传统的动效展示和互动性很强的砸蛋抽奖活动完美的结合在一起,这样用户既不会因为全部都是广告而感到反感,也可以参与砸蛋得点小便宜。下面,我就来给大家分享一下制作的过程:

一、设计前面的展示动效,用以宣传业务。

由于是给某银行做的h5展示页,因此加入了一些银行的吉祥物和宣传元素。这部分没有什么特别之处,就不再详细展开,放上一些图片做参考吧。

二、与砸蛋活动的对接

很多人认为这个对接不就是在展示页后面加上活动页不就行了吗?起初,我也是这么认为的,可是,当我真的这样弄好以后,发现问题来了,我所做的没人可以参与一次砸蛋活动的限制失效了。这是什么原因呢?原来是因为由于在活动页前面加入了业务展示页,所以砸蛋页面没有在第一页出现,这样我对砸蛋次数限制所触发的事件就不会在程序启动的时候加载,比如:判断砸蛋是否已经1次,如果已经砸蛋,则隐藏开始砸蛋的按钮、隐藏锤子等,而那个按钮和锤子现在还在后面几页呢,跟本就没有加载,也就不会隐藏,而此时,这个事件已经执行了,那么,真的加载到砸蛋页面的时候就不会隐藏。这样的解释,您听懂了吗?

那么怎么解决呢?我的办法就是通过设置cookie和读取cookie。

在舞台中添加变量1

在限制每天只能砸一次的事件组里面添加事件,讲变量1设置到cookie变量bb中,如下:

然后,在砸蛋页面设置时间为1秒的时间轴

并赋值变量,从cookie中获取bb赋值给变量1

在砸蛋的计数器中绑定变量1,这样就可以跨页面赋值了。

这样,最主要的跨页面传值的问题就解决了,至于砸蛋怎么实现的,ih5的视频教程里面就介绍的非常详细了,这里不在赘述。

20 对 “如何利用ih5将传统h5展示和砸蛋活动结合在一起”的想法;

  1. An outstanding share! I’ve just forwarded this onto a friend who has been doing a
    little research on this. And he in fact ordered me dinner simply because
    I stumbled upon it for him… lol. So allow me to reword this….
    Thanks for the meal!! But yeah, thanks for spending the time to talk about this matter here on your internet site.

  2. I would like to thank you for the efforts you have put in writing this website.
    I really hope to view the same high-grade content from you in the future as well.

    In fact, your creative writing abilities has inspired me to get my
    very own site now 😉

  3. Hello would you mind letting me know which webhost you’re utilizing?
    I’ve loaded your blog in 3 completely different browsers and I must
    say this blog loads a lot quicker then most.
    Can you recommend a good hosting provider at a honest price?

    Cheers, I appreciate it!

  4. I’ve learn several just right stuff here. Definitely value bookmarking for revisiting.
    I surprise how much effort you set to create this sort of
    wonderful informative website.

  5. I have been exploring for a little bit for any high
    quality articles or weblog posts in this sort of house .

    Exploring in Yahoo I eventually stumbled upon this
    website. Studying this info So i’m happy to exhibit that I’ve an incredibly good uncanny
    feeling I discovered exactly what I needed. I most for sure will
    make certain to don?t disregard this site and give it a look on a relentless basis.

  6. Today, I went to the beachfront with my children. I found
    a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell
    to her ear and screamed. There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is totally off topic but I
    had to tell someone!

  7. Magnificent goods from you, man. I have understand your stuff previous to and
    you’re just too wonderful. I actually like what you’ve acquired here, certainly like
    what you are stating and the way in which you say it.
    You make it entertaining and you still care for to keep it smart.
    I can’t wait to read much more from you. This is
    actually a terrific website.

发表评论

电子邮件地址不会被公开。 必填项已用*标注