Browse Source

分享頁

wukunlin 5 years ago
parent
commit
dff4a1169d

BIN
2019专题/特炫宣传页/src/img/icon-bg.png


BIN
2019专题/特炫宣传页/src/img/icon-play.png


BIN
2019专题/特炫宣传页/src/img/icon-video.png


BIN
2019专题/特炫宣传页/src/img/img-mask.png


+ 0 - 403
2019专题/特炫宣传页/src/modules/page/index-h5.js

@@ -1,403 +0,0 @@
-var dialog = require('dialog')
-require('jquery.gallery.js');
-require('swiper.js')
-var codeTpl = __inline('../../tpl/code.tmpl');
-var videoTpl = __inline('../../tpl/video.tmpl')
-
-
-var dialog_code
-var newBG = 'oldBg'//是否新背景
-
-
-var V = {
-    init: function () {
-        V.rollBg()
-        M.setVideo()
-        // M.share()
-    },
-    rollBg: function(){
-        if(Math.random()<0.5){
-            $('.box1').addClass('new-bg');
-            newBG = 'newBg'
-        }
-        $('body').show();
-    },
-
-    showTip: function (msg, timeout) {
-        if (!msg) {
-            return;
-        }
-        timeout = timeout || 2000;
-
-        var d = dialog({
-            title: "提示",
-            content: msg,
-            skin: "popup-ui"
-        }).showModal();
-
-        //2秒后自动关闭
-        setTimeout(function () {
-            d.close().remove();
-        }, timeout);
-    },
-
-    validata: function (phone, device) {
-        var reg = /0?(13|14|15|18)[0-9]{9}/
-        if (!reg.test(phone)) {
-            dialog({
-                title: " 提示",
-                content: "请输入正确的手机号码",
-                skin: "popup-ui"
-            }).showModal();
-            return false;
-        }
-        if (device == '' || device == null) {
-            dialog({
-                title: " 提示",
-                content: "请选择操作系统",
-                skin: "popup-ui"
-            }).showModal();
-            return false;
-        }
-
-        return true;
-    },
-
-    isWechat: function () {
-        var ua = window.navigator.userAgent.toLowerCase();
-        if (ua.match(/MicroMessenger/i) == 'micromessenger') {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-
-}
-
-var C = {
-    init: function () {
-        //坦克轮播
-        $('.arrow-l').on('click', C.tankBanner.last)
-        $('.arrow-r').on('click', C.tankBanner.next)
-
-        //特色轮播
-        $('#dg-container').gallery();
-
-        //新闻lunbo
-        var swiper = new Swiper('.swiper-container', {
-            pagination: '.swiper-pagination',
-            paginationClickable: true,
-            effect: 'fade',
-            autoplay: 2000,
-            loop: true
-        })
-
-        //验证码回车
-        $("body").on("keypress", ".dialog-code .card-input", function (e) {
-            var gift_id = $(this).closest('.dialog-code').find('span[data-giftid]').data('giftid')
-            if (e.keyCode == "13") {
-                var code = $(".dialog-code input").val();
-                dialog_code.remove();
-                M.linqu(gift_id, code);
-            }
-        });
-
-        //验证码换一张
-        $("body").on("click", ".change-codeimg", function () {
-            var $img = $(this).parent().prev().children();
-            var img = $img.attr("src");
-            img = img.slice(0, img.indexOf("&"));
-            var imgSrc = img + "&" + new Date().getTime() + "&fresh=1";
-            $img.attr("src", imgSrc);
-        })
-
-        //验证码弹窗确认
-        $("body").on("click", ".gift-codeSubmit", function () {
-            var gift_id = $(this).data('giftid')
-            var code = $(".dialog-code input").val();
-            dialog_code.remove();
-            M.linqu(gift_id, code);
-        });
-
-
-        //复制
-        if (window.clipboardData) {
-            $("body").on("click", ".btn-copy", function () {
-                var text = $(this).siblings("input").val();
-                window.clipboardData.setData('text', text);
-                var copyText = window.clipboardData.getData("text");
-                if (copyText == text) {
-                    V.showTip('复制成功');
-                }
-            })
-        } else {
-            var clipboard = new Clipboard('.btn-copy');
-            clipboard.on('success', function () {
-                V.showTip('复制成功');
-            });
-        }
-
-        //领取礼包按钮
-        $('.gift').on('click', function () {
-            location.href = "https://mka.duowan.com/card_201455.html"
-
-            return false;
-        })
-
-        //任务说明弹框
-        $('.gift-item').on('click', function () {
-            var taskId = $(this).attr('data-task')
-            $(".gift-box[data-role='" + taskId + "']").show();
-        })
-
-        //弹窗关闭按钮
-        $('.gift-close').on('click', function () {
-            // $('.gift-box').hide()
-            $(this).parents('.gift-box').hide()
-        })
-
-        //播放视频
-        $('.video-play').on('click', function () {
-            $('.video-wrap').show()
-            var v = document.querySelector('video')
-            v.load()
-            v.play()
-            return false
-        })
-
-        //关闭视频
-        $('.video-close').on('click', function () {
-            $('.video-wrap').hide();
-            var v = document.querySelector('video')
-            v.pause()
-        })
-
-
-
-
-        //下载
-        $('.download').on('click', function () {
-            //获取当前url上的文件名作为跳转链接的参数
-            var path = location.pathname.split('/')
-            var matchFileName = path[path.length-1].match(/(.*)\.html/)
-            var fileName = matchFileName[matchFileName.length-1]
-            location.href = "http://ccytk.duowan.com/s/zhongzhuan?fileName=" + fileName + '&bg=' + newBG
-
-
-            
-            return false
-
-        })
-
-
-        //关闭预约
-        $('.form-close').on('click', function () {
-            $('.form-box').hide()
-        })
-
-        //分享遮罩层
-        $('.share').on('click', function () {
-            $('.share-mask').show()
-            return false
-        })
-        $('.share-mask').on('click', function () {
-            $(this).hide();
-            return false
-
-        })
-        $('.a-download-mask').on('click', function () {
-            $(this).hide();
-            return false
-
-        })
-        $('.i-download-mask').on('click', function () {
-            $(this).hide();
-            return false
-
-        })
-
-        //加入qq群
-        $('.group').on('click', function () {
-            location.href = 'http://shang.qq.com/wpa/qunwpa?idkey=7bb8bae39ddfd7e33b2c35c4f8b7b7a5947596d187a13fd93812a781556773a1'
-        })
-
-        $('#signUp').on('click', function () {    //预订
-            var phoneNum = $('#phone').val();
-            var device = $("input[name='system']:checked").val()
-            if (V.validata(phoneNum, device)) {
-                M.pre(phoneNum, device)
-            }
-        })
-
-
-        //监听左右滑动事件
-        $(".dg-wrapper").on("touchstart", function (e) {
-            startX = e.originalEvent.changedTouches[0].pageX,
-                startY = e.originalEvent.changedTouches[0].pageY;
-        });
-        $(".dg-wrapper").on("touchmove", function (e) {
-            moveEndX = e.originalEvent.changedTouches[0].pageX,
-                moveEndY = e.originalEvent.changedTouches[0].pageY,
-                X = moveEndX - startX,
-                Y = moveEndY - startY;
-
-            if (Math.abs(X) > Math.abs(Y) && X > 80) {
-                $('.dg-prev').trigger('click')
-            }
-            else if (Math.abs(X) > Math.abs(Y) && X < -80) {
-                $('.dg-next').trigger('click')
-            }
-
-
-        });
-
-
-    },
-
-    tankBanner: {
-        last: function () {
-            var currentLeft = parseInt($('.roll-banner-wrap').css('left'))
-            var offectLeft = parseInt($('.tank-banner-item').css("width"))
-            //判断如果是第一张 切换到最后一张一样的
-            if (currentLeft == 0) {
-                var lastLeft = offectLeft * ($('.tank-banner-item').length - 1)
-                $('.roll-banner-wrap').css('left', '-' + lastLeft + 'px')
-            }
-            $('.arrow-l').off('click')
-            $('.arrow-r').off('click')
-            $('.roll-banner-wrap').animate({ 'left': parseInt($('.roll-banner-wrap').css('left')) + offectLeft + 'px' }, 500, function () {
-                $('.arrow-l').on('click', C.tankBanner.last)
-                $('.arrow-r').on('click', C.tankBanner.next)
-            })
-
-        },
-        next: function () {
-            var currentLeft = parseInt($('.roll-banner-wrap').css('left'))
-            var offectLeft = parseInt($('.tank-banner-item').css("width"))
-            var lastLeft = offectLeft * ($('.tank-banner-item').length - 1)
-            //判断如果是最后一张 切换到第一张一样的
-            if (currentLeft == 0 - lastLeft) {
-                $('.roll-banner-wrap').css('left', 0)
-            }
-            $('.arrow-l').off('click')
-            $('.arrow-r').off('click')
-            $('.roll-banner-wrap').animate({ 'left': parseInt($('.roll-banner-wrap').css('left')) - offectLeft + 'px' }, 500, function () {
-                $('.arrow-l').on('click', C.tankBanner.last)
-                $('.arrow-r').on('click', C.tankBanner.next)
-            })
-        }
-    }
-
-}
-
-var M = {
-    
-
-    //设置视频
-    setVideo: function () {
-        var ids = []
-
-        $('div[data-video]').each(function (i, item) {
-            ids.push(item.id)
-        })
-        var fontsize = parseFloat(document.getElementsByTagName('html')[0].style.fontSize)
-        console.log(parseFloat(fontsize))
-        var height = fontsize * 7.2;
-        var width = fontsize * 12.8;
-
-        if (ids.length) {
-            //异步加载 
-            $.getScript("http://video.duowan.com/style/js/huyavideo_placer.js?v=1234567890", function () {
-
-                //vid => {place, tpl, onFinish}
-                var map = {}
-
-                for (var i = 0, len = ids.length; i < len; i++) {
-                    map[ids[i]] = {
-                        place: '#' + ids[i],
-                        tpl: videoTpl({
-                            width: width,
-                            height: height
-                        }),
-                        playerOptions: {//MediaElementPlayer的options,非必需
-                            loop: true,
-                            autoplay: false, //自动播放不属于ME的自带选项
-                            pauseOtherPlayers: true
-                        },
-                        onFinish: function (context) {
-
-                        }
-                    }
-                }
-                new VhuyaPlayerPlacer(map);
-
-            })
-        }
-        return this
-    },
-
-    //预约游戏
-    pre: function (phone, device) {
-        $.ajax({
-            url: `http://sy.duowan.com/open/Reserved?mobile=${phone}&device=${device}&name=超次元坦克`,
-            dataType: "jsonp",
-            success: function (result) {
-                if (result.code == 0) {
-                    dialog({
-                        title: " 提示",
-                        content: "恭喜你,预约成功",
-                        skin: "popup-ui"
-                    }).showModal();
-                    $('#phone').val('');
-                    $('.form-box').hide();
-                }
-            },
-            error: function (e, x, t) {
-                console.log(e)
-                console.log(x)
-                console.log(t)
-
-            }
-        })
-    },
-
-    //微信分享
-    share: function () {
-        $.ajax({
-            url: "http://m.hiyd.com/weixin/getJsSign",
-            type: "GET",
-            data: {
-                url: location.href,
-                appid: 18
-            },
-            success: function (ret) {
-                ret.data.debug = false;
-                ret.data.jsApiList = [
-                    "onMenuShareTimeline",
-                    "onMenuShareAppMessage"
-                ]
-                wx.config(ret.data);
-                wx.ready(function () {
-                    wx.onMenuShareTimeline({
-                        title: "坦克大战焕新归来 今日iOS首发",
-                        link: location.href,
-                        imgUrl: "http://pub.dwstatic.com/zt2017/tank/1.0.0/img/share.png"
-                    })
-                    wx.onMenuShareAppMessage({
-                        title: "坦克大战焕新归来 今日iOS首发",
-                        link: location.href,
-                        desc: "多玩竞技手游《超次元坦克》,以FC坦克大战为基础打造全新体验。我已经在玩,快来和我对战吧!",
-                        imgUrl: "http://pub.dwstatic.com/zt2017/tank/1.0.0/img/share.png"
-                    })
-                })
-            }
-        })
-    }
-
-}
-
-$(function () {
-    V.init()    
-    C.init()
-})

+ 0 - 367
2019专题/特炫宣传页/src/modules/page/index-pc.js

@@ -1,367 +0,0 @@
-var dialog = require('dialog')
-require('jquery.gallery.js');
-require('swiper.js')
-var codeTpl = __inline('../../tpl/code.tmpl');
-
-
-var isGet  //是否已经领取礼包
-
-
-
-var V = {
-    init: function () {
-        V.rollBg()
-        M.linqustate()
-        V.initSwiper();
-        // V.animate();
-    },
-
-    rollBg: function(){
-        if(Math.random() > 0.5){
-            $('.bg-1').addClass('new-bg')
-        }
-    },
-
-    showTip: function (msg, timeout) {
-        if (!msg) {
-            return;
-        }
-        timeout = timeout || 2000;
-
-        var d = dialog({
-            title: "提示",
-            content: msg,
-            skin: "popup-ui"
-        }).showModal();
-
-        //2秒后自动关闭
-        setTimeout(function () {
-            d.close().remove();
-        }, timeout);
-    },
-
-    validata: function (phone, device) {
-        var reg = /0?(13|14|15|18)[0-9]{9}/
-        if (!reg.test(phone)) {
-            dialog({
-                title: " 提示",
-                content: "请输入正确的手机号码",
-                skin: "popup-ui"
-            }).showModal();
-            return false;
-        }
-        if (device == '' || device == null) {
-            dialog({
-                title: " 提示",
-                content: "请选择操作系统",
-                skin: "popup-ui"
-            }).showModal();
-            return false;
-        }
-
-        return true;
-    },
-
-    initSwiper: function () {
-        //新闻lunbo
-        var swiper = new Swiper('.swiper-container', {
-            pagination: '.swiper-pagination',
-            paginationClickable: true,
-            effect: 'fade',
-            autoplay: 2000,
-            loop: true,
-            observer:true,//修改swiper自己或子元素时,自动初始化swiper  
-            observeParents:true,//修改swiper的父元素时,自动初始化swiper  
-            onSlideChangeEnd: function(swiper){  
-                swiper.update();  
-            }
-        })
-    },
-
-    animate: function () {
-        //炮弹发射  0
-        $('.shot1').animate({ top: "341px", left: "473px" }, 1000, function () {
-            $(this).hide()
-        });
-        $('.shot2').animate({ bottom: "457px", right: "481px" }, 1000, function () {
-            $(this).hide()
-        });
-        // 炮弹碰撞 1000
-        var timer1 = setTimeout(function () {
-            var $img = $('.animate-img img'),
-                len = $img.length,
-                current = 0,
-                timer = setInterval(function () {
-                    if (current > len) {
-                        clearInterval(timer)
-                    } else {
-                        $img.hide();
-                        $img.eq(current).show()
-                        current++
-                    }
-                }, 100)
-                console.log(timer1)
-                clearTimeout(timer1)
-        }, 1000)
-        // 爆炸效果 4100
-        var timer2 = setTimeout(function () {
-            $('.animate-wrap').fadeOut(3000)
-            $('.page-index-pc').fadeIn(3000,function(){
-                V.initSwiper()
-            })
-        }, 4100)
-
-
-    }
-}
-
-var C = {
-    init: function () {
-        //坦克轮播
-        $('.arrow-l').on('click', C.tankBanner.last)
-        $('.arrow-r').on('click', C.tankBanner.next)
-
-        //特色轮播
-        $('#dg-container').gallery();
-
-
-
-
-        //验证码回车
-        $("body").on("keypress", ".dialog-code .card-input", function (e) {
-            var gift_id = $(this).closest('.dialog-code').find('span[data-giftid]').data('giftid')
-            if (e.keyCode == "13") {
-                var code = $(".dialog-code input").val();
-                dialog_code.remove();
-                M.linqu(gift_id, code);
-            }
-        });
-
-        //验证码换一张
-        $("body").on("click", ".change-codeimg", function () {
-            var $img = $(this).parent().prev().children();
-            var img = $img.attr("src");
-            img = img.slice(0, img.indexOf("&"));
-            var imgSrc = img + "&" + new Date().getTime() + "&fresh=1";
-            $img.attr("src", imgSrc);
-        })
-
-        //验证码弹窗确认
-        $("body").on("click", ".gift-codeSubmit", function () {
-            var gift_id = $(this).data('giftid')
-            var code = $(".dialog-code input").val();
-            dialog_code.remove();
-            M.linqu(gift_id, code);
-        });
-
-
-        //复制
-        if (window.clipboardData) {
-            $("body").on("click", ".btn-copy", function () {
-                var text = $(this).siblings("input").val();
-                window.clipboardData.setData('text', text);
-                var copyText = window.clipboardData.getData("text");
-                if (copyText == text) {
-                    V.showTip('复制成功');
-                }
-            })
-        } else {
-            var clipboard = new Clipboard('.btn-copy');
-            clipboard.on('success', function () {
-                V.showTip('复制成功');
-            });
-        }
-
-        //领取礼包按钮
-        $('.gift-btn').on('click', function () {
-            dwUDBProxy.isKaLogin(function (ret) {
-                if (!ret) {
-                    dwUDBProxy.kaLogin();
-                } else {
-                    if(isGet){
-                        $(".gift-box[data-role='gift']").show()
-                    }else{
-                        var gift_id = $('.gift-data').attr('data-giftid')
-                        M.linqu(gift_id)
-                    }
-                }
-            })
-
-        })
-
-        //任务说明弹框
-        $('.task-wrap li').on('click', function () {
-            var taskId = $(this).attr('data-task')
-            $(".gift-box[data-role='" + taskId + "']").show();
-        })
-
-        //弹窗关闭按钮
-        $('.gift-close').on('click', function () {
-            // $('.gift-box').hide()
-            $(this).parents('.gift-box').hide()
-        })
-
-        //视频播放按钮
-        $('.aim').on('click', function () {
-            $('.video-container').show()
-        })
-
-        //关闭视频
-        $('.video-close').on('click', function () {
-            $('.video-container').hide()
-        })
-
-
-        // //预约弹框
-        // $('.pre').on('click', function () {
-        //     if (new Date().getTime() / 1000 > 1505266200) {
-        //         location.href = 'https://itunes.apple.com/cn/app/id1263375572?mt=8'
-        //     }else{
-        //         $('.form-box').show()
-        //     }
-
-        // })
-
-
-        //关闭预约弹框
-        $('.form-close').on('click', function () {
-            $('.form-box').hide()
-        })
-
-        $('#signUp').on('click', function () {    //预订
-            var phoneNum = $('#phone').val();
-            var device = $("input[name='system']:checked").val()
-            if (V.validata(phoneNum, device)) {
-                M.pre(phoneNum, device)
-            }
-        })
-
-    },
-
-    tankBanner: {
-        last: function () {
-            var e;
-            var max = $(".tank-banner-item").length
-            $(".tank-banner-item").each(function (t) {
-                $(this).hasClass("active") && ($(this).removeClass("active"),
-                    e = 0 == t ? max : t)
-            }),
-                $(".tank-banner-item").eq(e - 1).addClass("active")
-
-        },
-        next: function () {
-            var e;
-            var max = $(".tank-banner-item").length - 1
-            $(".tank-banner-item").each(function (t) {
-                $(this).hasClass("active") && ($(this).removeClass("active"),
-                    e = max == t ? -1 : t)
-            }),
-                $(".tank-banner-item").eq(e + 1).addClass("active")
-        },
-
-    }
-
-}
-
-var M = {
-    linqustate: function () {
-        var $linquWrap = $(".gift-data")
-
-        $linquWrap.each(function (i, wrap) {
-            var gift_id = $(wrap).attr('data-giftid');
-            $.ajax({
-                url: 'http://ka.duowan.com/open/getGiftInfo',
-                dataType: 'jsonp',
-                data: { gift_id: gift_id },
-                jsonp: 'callback',
-                success: function (ret) {
-                    if (ret.code == 0) {
-                        var linqu_sn = ret.data.giftInfo.linqu_sn;
-                        if (linqu_sn) {
-                            isGet = true
-                            $(wrap).find('input').val(linqu_sn);
-                            $(wrap).find(".btn-copy").attr('data-clipboard-text', linqu_sn);
-                        }
-                    } else {
-                        V.showTip(ret.msg);
-                    }
-                }
-            })
-        })
-
-    },
-
-    linqu: function (gift_id, code) {
-        var data = {
-            gift_id: gift_id
-        }
-        if (code) {
-            data._phrase = code;
-        }
-        $.ajax({
-            url: 'http://ka.duowan.com/gift/receive',
-            dataType: 'jsonp',
-            data: data,
-            jsonp: 'callback',
-            success: function (ret) {
-                if (ret.code == 0) {
-                    var linqu_sn = ret.data;
-                    if (linqu_sn) {
-                        
-                        isGet = true
-                        var $wrap = $('[data-giftid=' + gift_id + ']')
-
-                        $wrap.parent().show().find('input').val(linqu_sn);
-
-                        $wrap.find(".btn-copy").attr('data-clipboard-text', linqu_sn);
-                    }
-                } else if (ret.code == -21) {
-                    var codeImg = ret.data;
-                    dialog_code = dialog({
-                        title: "请填写验证码",
-                        content: codeTpl({
-                            $data: {
-                                gift_id: gift_id,
-                                submitClass: 'gift-codeSubmit',
-                                inputClass: 'card-input'
-                            }
-                        }),
-                        skin: "base-ui"
-                    }).showModal();
-                    $("body .code-img").append('<img src="' + codeImg + '&' + new Date().getTime() + '" alt=""/>');
-                } else {
-                    V.showTip(ret.msg);
-                }
-            }
-        })
-    },
-    pre: function (phone, device) {
-        $.ajax({
-            url: `http://sy.duowan.com/open/Reserved?mobile=${phone}&device=${device}&name=超次元坦克`,
-            dataType: "jsonp",
-            success: function (result) {
-                if (result.code == 0) {
-                    dialog({
-                        title: " 提示",
-                        content: "恭喜你,预约成功",
-                        skin: "popup-ui"
-                    }).showModal();
-                    $('#phone').val('');
-                    $('.form-box').hide();
-                }
-            },
-            error: function (e, x, t) {
-                console.log(e)
-                console.log(x)
-                console.log(t)
-
-            }
-        })
-    }
-
-}
-
-$(function () {
-    V.init()
-    C.init()
-})

+ 0 - 523
2019专题/特炫宣传页/src/modules/page/jquery.gallery.js

@@ -1,523 +0,0 @@
-/**
- * jquery.gallery.js
- * http://www.codrops.com
- *
- * Copyright 2011, Pedro Botelho / Codrops
- * Free to use under the MIT license.
- *
- * Date: Mon Jan 30 2012
- */
-require('modernizr.custom.53451.js');
-
-(function( $, undefined ) {
-	
-	/*
-	 * Gallery object.
-	 */
-	$.Gallery 				= function( options, element ) {
-	
-		this.$el	= $( element );
-		this._init( options );
-		
-	};
-	
-	$.Gallery.defaults 		= {
-		current		: 0,	// index of current item
-		autoplay	: false,// slideshow on / off
-		interval	: 2000  // time between transitions
-    };
-	
-	$.Gallery.prototype 	= {
-		_init 				: function( options ) {
-			
-			this.options 		= $.extend( true, {}, $.Gallery.defaults, options );
-			
-			// support for 3d / 2d transforms and transitions
-			this.support3d		= Modernizr.csstransforms3d;
-			this.support2d		= Modernizr.csstransforms;
-			this.supportTrans	= Modernizr.csstransitions;
-			
-			this.$wrapper		= this.$el.find('.dg-wrapper');
-			
-			this.$items			= this.$wrapper.children();
-			this.itemsCount		= this.$items.length;
-			
-			this.$nav			= this.$el.find('nav');
-			this.$navPrev		= this.$nav.find('.dg-prev');
-			this.$navNext		= this.$nav.find('.dg-next');
-			
-			// minimum of 3 items
-			if( this.itemsCount < 3 ) {
-					
-				this.$nav.remove();
-				return false;
-			
-			}	
-			
-			this.current		= this.options.current;
-			
-			this.isAnim			= false;
-			
-			this.$items.css({
-				'opacity'	: 0,
-				'visibility': 'hidden'
-			});
-			
-			this._validate();
-			
-			this._layout();
-			
-			// load the events
-			this._loadEvents();
-			
-			// slideshow
-			if( this.options.autoplay ) {
-			
-				this._startSlideshow();
-			
-			}
-			
-		},
-		_validate			: function() {
-		
-			if( this.options.current < 0 || this.options.current > this.itemsCount - 1 ) {
-				
-				this.current = 0;
-			
-			}	
-		
-		},
-		_layout				: function() {
-			
-			// current, left and right items
-			this._setItems();
-			
-			// current item is not changed
-			// left and right one are rotated and translated
-			var leftCSS, rightCSS, currentCSS;
-			
-			if( this.support3d && this.supportTrans ) {
-			
-				leftCSS 	= {
-					'-webkit-transform'	: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)',
-					'-moz-transform'	: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)',
-					'-o-transform'		: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)',
-					'-ms-transform'		: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)',
-					'transform'			: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)'
-				};
-				
-				rightCSS	= {
-					'-webkit-transform'	: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)',
-					'-moz-transform'	: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)',
-					'-o-transform'		: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)',
-					'-ms-transform'		: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)',
-					'transform'			: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)'
-				};
-				
-				leftCSS.opacity		= 1;
-				leftCSS.visibility	= 'visible';
-				rightCSS.opacity	= 1;
-				rightCSS.visibility	= 'visible';
-			
-			}
-			else if( this.support2d && this.supportTrans ) {
-				
-				leftCSS 	= {
-					'-webkit-transform'	: 'translate(-350px) scale(0.8)',
-					'-moz-transform'	: 'translate(-350px) scale(0.8)',
-					'-o-transform'		: 'translate(-350px) scale(0.8)',
-					'-ms-transform'		: 'translate(-350px) scale(0.8)',
-					'transform'			: 'translate(-350px) scale(0.8)'
-				};
-				
-				rightCSS	= {
-					'-webkit-transform'	: 'translate(350px) scale(0.8)',
-					'-moz-transform'	: 'translate(350px) scale(0.8)',
-					'-o-transform'		: 'translate(350px) scale(0.8)',
-					'-ms-transform'		: 'translate(350px) scale(0.8)',
-					'transform'			: 'translate(350px) scale(0.8)'
-				};
-				
-				currentCSS	= {
-					'z-index'			: 999
-				};
-				
-				leftCSS.opacity		= 1;
-				leftCSS.visibility	= 'visible';
-				rightCSS.opacity	= 1;
-				rightCSS.visibility	= 'visible';
-			
-			}
-			
-			this.$leftItm.css( leftCSS || {} );
-			this.$rightItm.css( rightCSS || {} );
-			
-			this.$currentItm.css( currentCSS || {} ).css({
-				'opacity'	: 1,
-				'visibility': 'visible'
-			}).addClass('dg-center');
-			
-		},
-		_setItems			: function() {
-			
-			this.$items.removeClass('dg-center');
-			
-			this.$currentItm	= this.$items.eq( this.current );
-			this.$leftItm		= ( this.current === 0 ) ? this.$items.eq( this.itemsCount - 1 ) : this.$items.eq( this.current - 1 );
-			this.$rightItm		= ( this.current === this.itemsCount - 1 ) ? this.$items.eq( 0 ) : this.$items.eq( this.current + 1 );
-			
-			if( !this.support3d && this.support2d && this.supportTrans ) {
-			
-				this.$items.css( 'z-index', 1 );
-				this.$currentItm.css( 'z-index', 999 );
-			
-			}
-			
-			// next & previous items
-			if( this.itemsCount > 3 ) {
-			
-				// next item
-				this.$nextItm		= ( this.$rightItm.index() === this.itemsCount - 1 ) ? this.$items.eq( 0 ) : this.$rightItm.next();
-				this.$nextItm.css( this._getCoordinates('outright') );
-				
-				// previous item
-				this.$prevItm		= ( this.$leftItm.index() === 0 ) ? this.$items.eq( this.itemsCount - 1 ) : this.$leftItm.prev();
-				this.$prevItm.css( this._getCoordinates('outleft') );
-			
-			}
-			
-		},
-		_loadEvents			: function() {
-			
-			var _self	= this;
-			
-			this.$navPrev.on( 'click.gallery', function( event ) {
-				
-				if( _self.options.autoplay ) {
-				
-					clearTimeout( _self.slideshow );
-					_self.options.autoplay	= false;
-				
-				}
-				
-				_self._navigate('prev');
-				return false;
-				
-			});
-			
-			this.$navNext.on( 'click.gallery', function( event ) {
-				
-				if( _self.options.autoplay ) {
-				
-					clearTimeout( _self.slideshow );
-					_self.options.autoplay	= false;
-				
-				}
-				
-				_self._navigate('next');
-				return false;
-				
-			});
-			
-			this.$wrapper.on( 'webkitTransitionEnd.gallery transitionend.gallery OTransitionEnd.gallery', function( event ) {
-				
-				_self.$currentItm.addClass('dg-center');
-				_self.$items.removeClass('dg-transition');
-				_self.isAnim	= false;
-				
-			});
-			
-		},
-		_getCoordinates		: function( position ) {
-			
-			if( this.support3d && this.supportTrans ) {
-			
-				switch( position ) {
-					case 'outleft':
-						return {
-							'-webkit-transform'	: 'translateX(-250px) translateZ(-300px) rotateY(45deg) scale(0.82)',
-							'-moz-transform'	: 'translateX(-250px) translateZ(-300px) rotateY(45deg) scale(0.82)',
-							'-o-transform'		: 'translateX(-250px) translateZ(-300px) rotateY(45deg) scale(0.82)',
-							'-ms-transform'		: 'translateX(-250px) translateZ(-300px) rotateY(45deg) scale(0.82)',
-							'transform'			: 'translateX(-250px) translateZ(-300px) rotateY(45deg) scale(0.82)',
-							'opacity'			: 0,
-							'visibility'		: 'hidden'
-						};
-						break;
-					case 'outright':
-						return {
-							'-webkit-transform'	: 'translateX(250px) translateZ(-300px) rotateY(-45deg) scale(0.82)',
-							'-moz-transform'	: 'translateX(250px) translateZ(-300px) rotateY(-45deg) scale(0.82)',
-							'-o-transform'		: 'translateX(250px) translateZ(-300px) rotateY(-45deg) scale(0.82)',
-							'-ms-transform'		: 'translateX(250px) translateZ(-300px) rotateY(-45deg) scale(0.82)',
-							'transform'			: 'translateX(250px) translateZ(-300px) rotateY(-45deg) scale(0.82)',
-							'opacity'			: 0,
-							'visibility'		: 'hidden'
-						};
-						break;
-					case 'left':
-						return {
-							'-webkit-transform'	: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)',
-							'-moz-transform'	: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)',
-							'-o-transform'		: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)',
-							'-ms-transform'		: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)',
-							'transform'			: 'translateX(-250px) translateZ(-200px) rotateY(45deg) scale(0.82)',
-							'opacity'			: 1,
-							'visibility'		: 'visible'
-						};
-						break;
-					case 'right':
-						return {
-							'-webkit-transform'	: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)',
-							'-moz-transform'	: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)',
-							'-o-transform'		: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)',
-							'-ms-transform'		: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)',
-							'transform'			: 'translateX(250px) translateZ(-200px) rotateY(-45deg) scale(0.82)',
-							'opacity'			: 1,
-							'visibility'		: 'visible'
-						};
-						break;
-					case 'center':
-						return {
-							'-webkit-transform'	: 'translateX(0px) translateZ(0px) rotateY(0deg)',
-							'-moz-transform'	: 'translateX(0px) translateZ(0px) rotateY(0deg)',
-							'-o-transform'		: 'translateX(0px) translateZ(0px) rotateY(0deg)',
-							'-ms-transform'		: 'translateX(0px) translateZ(0px) rotateY(0deg)',
-							'transform'			: 'translateX(0px) translateZ(0px) rotateY(0deg)',
-							'opacity'			: 1,
-							'visibility'		: 'visible'
-						};
-						break;
-				};
-			
-			}
-			else if( this.support2d && this.supportTrans ) {
-			
-				switch( position ) {
-					case 'outleft':
-						return {
-							'-webkit-transform'	: 'translate(-450px) scale(0.7)',
-							'-moz-transform'	: 'translate(-450px) scale(0.7)',
-							'-o-transform'		: 'translate(-450px) scale(0.7)',
-							'-ms-transform'		: 'translate(-450px) scale(0.7)',
-							'transform'			: 'translate(-450px) scale(0.7)',
-							'opacity'			: 0,
-							'visibility'		: 'hidden'
-						};
-						break;
-					case 'outright':
-						return {
-							'-webkit-transform'	: 'translate(450px) scale(0.7)',
-							'-moz-transform'	: 'translate(450px) scale(0.7)',
-							'-o-transform'		: 'translate(450px) scale(0.7)',
-							'-ms-transform'		: 'translate(450px) scale(0.7)',
-							'transform'			: 'translate(450px) scale(0.7)',
-							'opacity'			: 0,
-							'visibility'		: 'hidden'
-						};
-						break;
-					case 'left':
-						return {
-							'-webkit-transform'	: 'translate(-350px) scale(0.8)',
-							'-moz-transform'	: 'translate(-350px) scale(0.8)',
-							'-o-transform'		: 'translate(-350px) scale(0.8)',
-							'-ms-transform'		: 'translate(-350px) scale(0.8)',
-							'transform'			: 'translate(-350px) scale(0.8)',
-							'opacity'			: 1,
-							'visibility'		: 'visible'
-						};
-						break;
-					case 'right':
-						return {
-							'-webkit-transform'	: 'translate(350px) scale(0.8)',
-							'-moz-transform'	: 'translate(350px) scale(0.8)',
-							'-o-transform'		: 'translate(350px) scale(0.8)',
-							'-ms-transform'		: 'translate(350px) scale(0.8)',
-							'transform'			: 'translate(350px) scale(0.8)',
-							'opacity'			: 1,
-							'visibility'		: 'visible'
-						};
-						break;
-					case 'center':
-						return {
-							'-webkit-transform'	: 'translate(0px) scale(1)',
-							'-moz-transform'	: 'translate(0px) scale(1)',
-							'-o-transform'		: 'translate(0px) scale(1)',
-							'-ms-transform'		: 'translate(0px) scale(1)',
-							'transform'			: 'translate(0px) scale(1)',
-							'opacity'			: 1,
-							'visibility'		: 'visible'
-						};
-						break;
-				};
-			
-			}
-			else {
-			
-				switch( position ) {
-					case 'outleft'	: 
-					case 'outright'	: 
-					case 'left'		: 
-					case 'right'	:
-						return {
-							'opacity'			: 0,
-							'visibility'		: 'hidden'
-						};
-						break;
-					case 'center'	:
-						return {
-							'opacity'			: 1,
-							'visibility'		: 'visible'
-						};
-						break;
-				};
-			
-			}
-		
-		},
-		_navigate			: function( dir ) {
-			
-			if( this.supportTrans && this.isAnim )
-				return false;
-				
-			this.isAnim	= true;
-			
-			switch( dir ) {
-			
-				case 'next' :
-					
-					this.current	= this.$rightItm.index();
-					
-					// current item moves left
-					this.$currentItm.addClass('dg-transition').css( this._getCoordinates('left') );
-					
-					// right item moves to the center
-					this.$rightItm.addClass('dg-transition').css( this._getCoordinates('center') );	
-					
-					// next item moves to the right
-					if( this.$nextItm ) {
-						
-						// left item moves out
-						this.$leftItm.addClass('dg-transition').css( this._getCoordinates('outleft') );
-						
-						this.$nextItm.addClass('dg-transition').css( this._getCoordinates('right') );
-						
-					}
-					else {
-					
-						// left item moves right
-						this.$leftItm.addClass('dg-transition').css( this._getCoordinates('right') );
-					
-					}
-					break;
-					
-				case 'prev' :
-				
-					this.current	= this.$leftItm.index();
-					
-					// current item moves right
-					this.$currentItm.addClass('dg-transition').css( this._getCoordinates('right') );
-					
-					// left item moves to the center
-					this.$leftItm.addClass('dg-transition').css( this._getCoordinates('center') );
-					
-					// prev item moves to the left
-					if( this.$prevItm ) {
-						
-						// right item moves out
-						this.$rightItm.addClass('dg-transition').css( this._getCoordinates('outright') );
-					
-						this.$prevItm.addClass('dg-transition').css( this._getCoordinates('left') );
-						
-					}
-					else {
-					
-						// right item moves left
-						this.$rightItm.addClass('dg-transition').css( this._getCoordinates('left') );
-					
-					}
-					break;	
-					
-			};
-			
-			this._setItems();
-			
-			if( !this.supportTrans )
-				this.$currentItm.addClass('dg-center');
-			
-		},
-		_startSlideshow		: function() {
-		
-			var _self	= this;
-			
-			this.slideshow	= setTimeout( function() {
-				
-				_self._navigate( 'next' );
-				
-				if( _self.options.autoplay ) {
-				
-					_self._startSlideshow();
-				
-				}
-			
-			}, this.options.interval );
-		
-		},
-		destroy				: function() {
-			
-			this.$navPrev.off('.gallery');
-			this.$navNext.off('.gallery');
-			this.$wrapper.off('.gallery');
-			
-		}
-	};
-	
-	var logError 			= function( message ) {
-		if ( this.console ) {
-			console.error( message );
-		}
-	};
-	
-	$.fn.gallery			= function( options ) {
-	
-		if ( typeof options === 'string' ) {
-			
-			var args = Array.prototype.slice.call( arguments, 1 );
-			
-			this.each(function() {
-			
-				var instance = $.data( this, 'gallery' );
-				
-				if ( !instance ) {
-					logError( "cannot call methods on gallery prior to initialization; " +
-					"attempted to call method '" + options + "'" );
-					return;
-				}
-				
-				if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
-					logError( "no such method '" + options + "' for gallery instance" );
-					return;
-				}
-				
-				instance[ options ].apply( instance, args );
-			
-			});
-		
-		} 
-		else {
-		
-			this.each(function() {
-			
-				var instance = $.data( this, 'gallery' );
-				if ( !instance ) {
-					$.data( this, 'gallery', new $.Gallery( options, this ) );
-				}
-			});
-		
-		}
-		
-		return this;
-		
-	};
-	
-})( jQuery );

+ 0 - 352
2019专题/特炫宣传页/src/modules/page/ka.js

@@ -1,352 +0,0 @@
-var dialog = require('dialog')
-var Qrcode = require('qrcode')
-require('jquery.gallery.js');
-var codeTpl = __inline('../../tpl/code.tmpl');
-var seaLoader = require('seaLoader');
-
-
-var task1Status,     //任务状态
-    task2Status
-
-
-
-var M = {
-    linqustate: function () {
-        var $linquWrap = $(".lingqu-wrap")
-
-        $linquWrap.each(function (i, wrap) {
-            var gift_id = $(wrap).attr('data-giftid');
-            $.ajax({
-                url: 'http://ka.duowan.com/open/getGiftInfo',
-                dataType: 'jsonp',
-                data: { gift_id: gift_id },
-                jsonp: 'callback',
-                success: function (ret) {
-                    if (ret.code == 0) {
-                        var linqu_sn = ret.data.giftInfo.linqu_sn;
-                        if (linqu_sn) {
-                            $(wrap).find(".linqu-sn").show().siblings('.btn-lingqu').hide().parent().find('input').val(linqu_sn);
-                            $(wrap).find(".btn-copy").attr('data-clipboard-text', linqu_sn);
-                        }
-                    } else {
-                        V.showTip(ret.msg);
-                    }
-                }
-            })
-        })
-
-    },
-    linqu: function (gift_id, code) {
-        var data = {
-            gift_id: gift_id
-        }
-        if (code) {
-            data._phrase = code;
-        }
-        $.ajax({
-            url: 'http://ka.duowan.com/gift/receive',
-            dataType: 'jsonp',
-            data: data,
-            jsonp: 'callback',
-            success: function (ret) {
-                if (ret.code == 0) {
-                    var linqu_sn = ret.data;
-                    if (linqu_sn) {
-                        var $wrap = $('[data-giftid=' + gift_id + ']')
-
-                        $wrap.find(".linqu-sn").show().siblings('.btn-lingqu').hide().parent().find('input').val(linqu_sn);
-
-                        $wrap.find(".btn-copy").attr('data-clipboard-text', linqu_sn);
-
-                    }
-                } else if (ret.code == -21) {
-                    var codeImg = ret.data;
-                    dialog_code = dialog({
-                        title: "请填写验证码",
-                        content: codeTpl({
-                            $data: {
-                                gift_id: gift_id,
-                                submitClass: 'gift-codeSubmit',
-                                inputClass: 'card-input'
-                            }
-                        }),
-                        skin: "base-ui"
-                    }).showModal();
-                    $("body .code-img").append('<img src="' + codeImg + '&' + new Date().getTime() + '" alt=""/>');
-                } else {
-                    V.showTip(ret.msg);
-                }
-            }
-        })
-    },
-
-    //初始化任务状态
-    inittask1: function () {
-        var task_id = $(".task1").attr('data-taskid');
-        $.ajax({
-            url: 'http://kaplus.duowan.com/open/taskInfo',
-            dataType: 'jsonp',
-            data: { task_id: task_id },
-            jsonp: 'callback',
-            success: function (ret) {
-                if (ret.code == 0) {
-                    var task = ret.data.task;
-                    task1Status = task.status
-                }
-            }
-        })
-    },
-    inittask2: function () {
-        var task_id = $(".task2").attr('data-taskid');
-        $.ajax({
-            url: 'http://kaplus.duowan.com/open/taskInfo',
-            dataType: 'jsonp',
-            data: { task_id: task_id },
-            jsonp: 'callback',
-            success: function (ret) {
-                if (ret.code == 0) {
-                    var task = ret.data.task;
-                    task2Status = task
-                    if (task.status == 4) {
-                        $('.btn-auth').addClass('authed');
-                    } else if (task.need_auth == 1 && task.status == 3) {    //是否已授权
-                        $('.btn-auth').removeClass('authed')
-                        $('.btn-auth').addClass('auth')
-                    } else if (task.need_auth == 0 && task.status == 3) {
-                        $('.btn-auth').addClass('authed')
-                        $('.btn-auth').removeClass('auth')
-                    } else {
-                        $('.btn-auth').removeClass('authed')
-                        $('.btn-auth').removeClass('auth')
-                    }
-                }
-            }
-        })
-    },
-
-    //领取任务奖励
-    reward1: function (task_id) {
-        $.ajax({
-            url: 'http://kaplus.duowan.com/task/reward',
-            dataType: 'jsonp',
-            data: { task_id: task_id },
-            jsonp: 'callback',
-            success: function (ret) {
-                if (ret.code == 0) {
-                    V.showTip("领取成功!");
-                    task1Status = 10086
-                } else {
-                    V.showTip(ret.msg);
-                }
-            }
-        })
-    },
-    reward2: function (task_id) {
-        $.ajax({
-            url: 'http://kaplus.duowan.com/task/reward',
-            dataType: 'jsonp',
-            data: { task_id: task_id },
-            jsonp: 'callback',
-            success: function (ret) {
-                if (ret.code == 0) {
-                    V.showTip("领取成功!");
-                    task2Status = 10086;
-                } else {
-                    V.showTip(ret.msg);
-                }
-            }
-        })
-    },
-
-    //检查登录
-    checkLogin: function () {
-        dwUDBProxy.isKaLogin(function (ret) {
-            if (!ret) {
-                dwUDBProxy.kaLogin();
-            }
-        })
-    },
-
-    //微信授权
-    auth: function (wrap) {
-        seaLoader(function (seajs) {
-            seajs.use(['arale/qrcode/1.0.3/qrcode'], function (Qrcode) {
-                $.ajax({
-                    url: '//mka.duowan.com/wxServer/bindOpenId',
-                    data: { appid: 14 },
-                    dataType: 'jsonp',
-                    success: function (result) {
-                        var code = result.data
-                        var qrcode = new Qrcode({
-                            text: code,
-                            width: 130,
-                            height: 130
-                        })
-                        console.log(qrcode)
-                        $(wrap).find('.qrcode').html($(qrcode))
-                        $(wrap).show();
-
-                    }
-                })
-            })
-        })
-
-    }
-}
-
-var V = {
-    init: function () {
-        //特色轮播
-        $('#dg-container').gallery();
-        M.checkLogin();
-        M.linqustate();
-        M.inittask1();
-        M.inittask2();
-
-    },
-
-    showTip: function (msg, timeout) {
-        if (!msg) {
-            return;
-        }
-        timeout = timeout || 2000;
-
-        var d = dialog({
-            title: "提示",
-            content: msg,
-            skin: "popup-ui"
-        }).showModal();
-
-        //2秒后自动关闭
-        setTimeout(function () {
-            d.close().remove();
-        }, timeout);
-    },
-}
-
-
-var C = {
-    init: function () {
-        //复制
-        if (window.clipboardData) {
-            $("body").on("click", ".btn-copy", function () {
-                var text = $(this).siblings("input").val();
-                window.clipboardData.setData('text', text);
-                var copyText = window.clipboardData.getData("text");
-                if (copyText == text) {
-                    V.showTip('复制成功');
-                }
-            })
-        } else {
-            var clipboard = new Clipboard('.btn-copy');
-            clipboard.on('success', function () {
-                V.showTip('复制成功');
-            });
-        }
-
-
-
-        //验证码回车
-        $("body").on("keypress", ".dialog-code .card-input", function (e) {
-            var gift_id = $(this).closest('.dialog-code').find('span[data-giftid]').data('giftid')
-            if (e.keyCode == "13") {
-                var code = $(".dialog-code input").val();
-                dialog_code.remove();
-                M.linqu(gift_id, code);
-            }
-        });
-
-        //验证码换一张
-        $("body").on("click", ".change-codeimg", function () {
-            var $img = $(this).parent().prev().children();
-            var img = $img.attr("src");
-            img = img.slice(0, img.indexOf("&"));
-            var imgSrc = img + "&" + new Date().getTime() + "&fresh=1";
-            $img.attr("src", imgSrc);
-        })
-
-        //验证码弹窗确认
-        $("body").on("click", ".gift-codeSubmit", function () {
-            var gift_id = $(this).data('giftid')
-            var code = $(".dialog-code input").val();
-            dialog_code.remove();
-            M.linqu(gift_id, code);
-        });
-
-        //领取卡码
-        $(".lingqu-wrap").on('click', '.btn-lingqu', function () {
-            var gift_id = $(this).closest('.lingqu-wrap').data('giftid')
-            dwUDBProxy.isKaLogin(function (ret) {
-                if (!ret) {
-                    dwUDBProxy.kaLogin();
-                } else {
-                    M.linqu(gift_id);
-                }
-            })
-            return false
-        })
-
-        //关闭授权弹框
-        $('.auth-close').on('click', function () {
-            $(this).parent().hide()
-        })
-
-        //领取任务奖励
-        $('.reward1').on('click', function () {
-            dwUDBProxy.isKaLogin(function (ret) {
-                if (!ret) {
-                    dwUDBProxy.kaLogin();
-                } else {
-                    if (task1Status == 1 || task1Status == 2) {
-                        V.showTip("尚为完成任务,无法领取奖励", 5000)
-                    } else if (task1Status == 4 || task1Status == 10086) {
-                        V.showTip("您已领取过奖励", 5000)
-                    } else if (task1Status == 3) {
-                        var taskId = $('.task1').attr('data-taskid')
-                        M.reward1(taskId)
-                    }
-                }
-            })
-
-        })
-
-        $('.reward2').on('click', function () {
-            dwUDBProxy.isKaLogin(function (ret) {
-                if (!ret) {
-                    dwUDBProxy.kaLogin();
-                } else {
-                    if (task2Status.status == 4 || task2Status == 10086) {
-                        V.showTip("您已领取过奖励", 5000)
-                    } else if (task2Status.need_auth == 1 && task2Status.status == 3) {
-                        V.showTip("请先授权微信后再领取奖励", 5000)
-                    } else if (task2Status.need_auth == 0 && task2Status.status == 3) {
-                        var taskId = $('.task2').attr('data-taskid')
-                        M.reward2(taskId)
-                    } else if (task2Status.status == 1 || task2Status.status == 2) {
-                        V.showTip("尚为完成任务,无法领取奖励", 5000)
-                    }
-                }
-            })
-
-
-        })
-
-        //授权按钮
-        $('.auth').on('click', function () {
-            dwUDBProxy.isKaLogin(function (ret) {
-                if (!ret) {
-                    dwUDBProxy.kaLogin();
-                } else {
-                    M.auth('.auth-wrap')
-                }
-            })
-        })
-
-    }
-}
-
-
-$(function () {
-    V.init();
-    C.init();
-})

+ 0 - 389
2019专题/特炫宣传页/src/modules/page/modernizr.custom.53451.js

@@ -1,389 +0,0 @@
-/* Modernizr 2.0.6 (Custom Build) | MIT & BSD
- * Build: http://www.modernizr.com/download/#-csstransforms-csstransforms3d-csstransitions-iepp-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load
- */
-;
-window.Modernizr = function(a, b, c) {
-    function C(a, b) {
-        var c = a.charAt(0).toUpperCase() + a.substr(1),
-            d = (a + " " + o.join(c + " ") + c).split(" ");
-        return B(d, b)
-    }
-    function B(a, b) {
-        for (var d in a) if (k[a[d]] !== c) return b == "pfx" ? a[d] : !0;
-        return ! 1
-    }
-    function A(a, b) {
-        return !! ~ ("" + a).indexOf(b)
-    }
-    function z(a, b) {
-        return typeof a === b
-    }
-    function y(a, b) {
-        return x(n.join(a + ";") + (b || ""))
-    }
-    function x(a) {
-        k.cssText = a
-    }
-    var d = "2.0.6",
-        e = {},
-        f = !0,
-        g = b.documentElement,
-        h = b.head || b.getElementsByTagName("head")[0],
-        i = "modernizr",
-        j = b.createElement(i),
-        k = j.style,
-        l,
-        m = Object.prototype.toString,
-        n = " -webkit- -moz- -o- -ms- -khtml- ".split(" "),
-        o = "Webkit Moz O ms Khtml".split(" "),
-        p = {},
-        q = {},
-        r = {},
-        s = [],
-        t = function(a, c, d, e) {
-            var f, h, j, k = b.createElement("div");
-            if (parseInt(d, 10)) while (d--) j = b.createElement("div"),
-                j.id = e ? e[d] : i + (d + 1),
-                k.appendChild(j);
-            f = ["&shy;", "<style>", a, "</style>"].join(""),
-                k.id = i,
-                k.innerHTML += f,
-                g.appendChild(k),
-                h = c(k, a),
-                k.parentNode.removeChild(k);
-            return !! h
-        },
-        u,
-        v = {}.hasOwnProperty,
-        w; ! z(v, c) && !z(v.call, c) ? w = function(a, b) {
-        return v.call(a, b)
-    }: w = function(a, b) {
-        return b in a && z(a.constructor.prototype[b], c)
-    };
-    var D = function(a, c) {
-        var d = a.join(""),
-            f = c.length;
-        t(d,
-            function(a, c) {
-                var d = b.styleSheets[b.styleSheets.length - 1],
-                    g = d.cssRules && d.cssRules[0] ? d.cssRules[0].cssText: d.cssText || "",
-                    h = a.childNodes,
-                    i = {};
-                while (f--) i[h[f].id] = h[f];
-                e.csstransforms3d = i.csstransforms3d.offsetLeft === 9
-            },
-            f, c)
-    } ([, ["@media (", n.join("transform-3d),("), i, ")", "{#csstransforms3d{left:9px;position:absolute}}"].join("")], [, "csstransforms3d"]);
-    p.csstransforms = function() {
-        return !! B(["transformProperty", "WebkitTransform", "MozTransform", "OTransform", "msTransform"])
-    },
-        p.csstransforms3d = function() {
-            var a = !!B(["perspectiveProperty", "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"]);
-            a && "webkitPerspective" in g.style && (a = e.csstransforms3d);
-            return a
-        },
-        p.csstransitions = function() {
-            return C("transitionProperty")
-        };
-    for (var E in p) w(p, E) && (u = E.toLowerCase(), e[u] = p[E](), s.push((e[u] ? "": "no-") + u));
-    x(""),
-        j = l = null,
-    a.attachEvent &&
-    function() {
-        var a = b.createElement("div");
-        a.innerHTML = "<elem></elem>";
-        return a.childNodes.length !== 1
-    } () &&
-    function(a, b) {
-        function s(a) {
-            var b = -1;
-            while (++b < g) a.createElement(f[b])
-        }
-        a.iepp = a.iepp || {};
-        var d = a.iepp,
-            e = d.html5elements || "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
-            f = e.split("|"),
-            g = f.length,
-            h = new RegExp("(^|\\s)(" + e + ")", "gi"),
-            i = new RegExp("<(/*)(" + e + ")", "gi"),
-            j = /^\s*[\{\}]\s*$/,
-            k = new RegExp("(^|[^\\n]*?\\s)(" + e + ")([^\\n]*)({[\\n\\w\\W]*?})", "gi"),
-            l = b.createDocumentFragment(),
-            m = b.documentElement,
-            n = m.firstChild,
-            o = b.createElement("body"),
-            p = b.createElement("style"),
-            q = /print|all/,
-            r;
-        d.getCSS = function(a, b) {
-            if (a + "" === c) return "";
-            var e = -1,
-                f = a.length,
-                g, h = [];
-            while (++e < f) {
-                g = a[e];
-                if (g.disabled) continue;
-                b = g.media || b,
-                q.test(b) && h.push(d.getCSS(g.imports, b), g.cssText),
-                    b = "all"
-            }
-            return h.join("")
-        },
-            d.parseCSS = function(a) {
-                var b = [],
-                    c;
-                while ((c = k.exec(a)) != null) b.push(((j.exec(c[1]) ? "\n": c[1]) + c[2] + c[3]).replace(h, "$1.iepp_$2") + c[4]);
-                return b.join("\n")
-            },
-            d.writeHTML = function() {
-                var a = -1;
-                r = r || b.body;
-                while (++a < g) {
-                    var c = b.getElementsByTagName(f[a]),
-                        d = c.length,
-                        e = -1;
-                    while (++e < d) c[e].className.indexOf("iepp_") < 0 && (c[e].className += " iepp_" + f[a])
-                }
-                l.appendChild(r),
-                    m.appendChild(o),
-                    o.className = r.className,
-                    o.id = r.id,
-                    o.innerHTML = r.innerHTML.replace(i, "<$1font")
-            },
-            d._beforePrint = function() {
-                p.styleSheet.cssText = d.parseCSS(d.getCSS(b.styleSheets, "all")),
-                    d.writeHTML()
-            },
-            d.restoreHTML = function() {
-                o.innerHTML = "",
-                    m.removeChild(o),
-                    m.appendChild(r)
-            },
-            d._afterPrint = function() {
-                d.restoreHTML(),
-                    p.styleSheet.cssText = ""
-            },
-            s(b),
-            s(l);
-        d.disablePP || (n.insertBefore(p, n.firstChild), p.media = "print", p.className = "iepp-printshim", a.attachEvent("onbeforeprint", d._beforePrint), a.attachEvent("onafterprint", d._afterPrint))
-    } (a, b),
-        e._version = d,
-        e._prefixes = n,
-        e._domPrefixes = o,
-        e.testProp = function(a) {
-            return B([a])
-        },
-        e.testAllProps = C,
-        e.testStyles = t,
-        g.className = g.className.replace(/\bno-js\b/, "") + (f ? " js " + s.join(" ") : "");
-    return e
-} (window, document,undefined),
-    function(a, b, c) {
-        function k(a) {
-            return ! a || a == "loaded" || a == "complete"
-        }
-        function j() {
-            var a = 1,
-                b = -1;
-            while (p.length - ++b) if (p[b].s && !(a = p[b].r)) break;
-            a && g()
-        }
-        function i(a) {
-            var c = b.createElement("script"),
-                d;
-            c.src = a.s,
-                c.onreadystatechange = c.onload = function() { ! d && k(c.readyState) && (d = 1, j(), c.onload = c.onreadystatechange = null)
-                },
-                m(function() {
-                        d || (d = 1, j())
-                    },
-                    H.errorTimeout),
-                a.e ? c.onload() : n.parentNode.insertBefore(c, n)
-        }
-        function h(a) {
-            var c = b.createElement("link"),
-                d;
-            c.href = a.s,
-                c.rel = "stylesheet",
-                c.type = "text/css";
-            if (!a.e && (w || r)) {
-                var e = function(a) {
-                    m(function() {
-                            if (!d) try {
-                                a.sheet.cssRules.length ? (d = 1, j()) : e(a)
-                            } catch(b) {
-                                b.code == 1e3 || b.message == "security" || b.message == "denied" ? (d = 1, m(function() {
-                                        j()
-                                    },
-                                    0)) : e(a)
-                            }
-                        },
-                        0)
-                };
-                e(c)
-            } else c.onload = function() {
-                d || (d = 1, m(function() {
-                        j()
-                    },
-                    0))
-            },
-            a.e && c.onload();
-            m(function() {
-                    d || (d = 1, j())
-                },
-                H.errorTimeout),
-            !a.e && n.parentNode.insertBefore(c, n)
-        }
-        function g() {
-            var a = p.shift();
-            q = 1,
-                a ? a.t ? m(function() {
-                        a.t == "c" ? h(a) : i(a)
-                    },
-                    0) : (a(), j()) : q = 0
-        }
-        function f(a, c, d, e, f, h) {
-            function i() { ! o && k(l.readyState) && (r.r = o = 1, !q && j(), l.onload = l.onreadystatechange = null, m(function() {
-                    u.removeChild(l)
-                },
-                0))
-            }
-            var l = b.createElement(a),
-                o = 0,
-                r = {
-                    t: d,
-                    s: c,
-                    e: h
-                };
-            l.src = l.data = c,
-            !s && (l.style.display = "none"),
-                l.width = l.height = "0",
-            a != "object" && (l.type = d),
-                l.onload = l.onreadystatechange = i,
-                a == "img" ? l.onerror = i: a == "script" && (l.onerror = function() {
-                    r.e = r.r = 1,
-                        g()
-                }),
-                p.splice(e, 0, r),
-                u.insertBefore(l, s ? null: n),
-                m(function() {
-                        o || (u.removeChild(l), r.r = r.e = o = 1, j())
-                    },
-                    H.errorTimeout)
-        }
-        function e(a, b, c) {
-            var d = b == "c" ? z: y;
-            q = 0,
-                b = b || "j",
-                C(a) ? f(d, a, b, this.i++, l, c) : (p.splice(this.i++, 0, a), p.length == 1 && g());
-            return this
-        }
-        function d() {
-            var a = H;
-            a.loader = {
-                load: e,
-                i: 0
-            };
-            return a
-        }
-        var l = b.documentElement,
-            m = a.setTimeout,
-            n = b.getElementsByTagName("script")[0],
-            o = {}.toString,
-            p = [],
-            q = 0,
-            r = "MozAppearance" in l.style,
-            s = r && !!b.createRange().compareNode,
-            t = r && !s,
-            u = s ? l: n.parentNode,
-            v = a.opera && o.call(a.opera) == "[object Opera]",
-            w = "webkitAppearance" in l.style,
-            x = w && "async" in b.createElement("script"),
-            y = r ? "object": v || x ? "img": "script",
-            z = w ? "img": y,
-            A = Array.isArray ||
-                function(a) {
-                    return o.call(a) == "[object Array]"
-                },
-            B = function(a) {
-                return Object(a) === a
-            },
-            C = function(a) {
-                return typeof a == "string"
-            },
-            D = function(a) {
-                return o.call(a) == "[object Function]"
-            },
-            E = [],
-            F = {},
-            G,
-            H;
-        H = function(a) {
-            function f(a) {
-                var b = a.split("!"),
-                    c = E.length,
-                    d = b.pop(),
-                    e = b.length,
-                    f = {
-                        url: d,
-                        origUrl: d,
-                        prefixes: b
-                    },
-                    g,
-                    h;
-                for (h = 0; h < e; h++) g = F[b[h]],
-                g && (f = g(f));
-                for (h = 0; h < c; h++) f = E[h](f);
-                return f
-            }
-            function e(a, b, e, g, h) {
-                var i = f(a),
-                    j = i.autoCallback;
-                if (!i.bypass) {
-                    b && (b = D(b) ? b: b[a] || b[g] || b[a.split("/").pop().split("?")[0]]);
-                    if (i.instead) return i.instead(a, b, e, g, h);
-                    e.load(i.url, i.forceCSS || !i.forceJS && /css$/.test(i.url) ? "c": c, i.noexec),
-                    (D(b) || D(j)) && e.load(function() {
-                        d(),
-                        b && b(i.origUrl, h, g),
-                        j && j(i.origUrl, h, g)
-                    })
-                }
-            }
-            function b(a, b) {
-                function c(a) {
-                    if (C(a)) e(a, h, b, 0, d);
-                    else if (B(a)) for (i in a) a.hasOwnProperty(i) && e(a[i], h, b, i, d)
-                }
-                var d = !!a.test,
-                    f = d ? a.yep: a.nope,
-                    g = a.load || a.both,
-                    h = a.callback,
-                    i;
-                c(f),
-                    c(g),
-                a.complete && b.load(a.complete)
-            }
-            var g, h, i = this.yepnope.loader;
-            if (C(a)) e(a, 0, i, 0);
-            else if (A(a)) for (g = 0; g < a.length; g++) h = a[g],
-                C(h) ? e(h, 0, i, 0) : A(h) ? H(h) : B(h) && b(h, i);
-            else B(a) && b(a, i)
-        },
-            H.addPrefix = function(a, b) {
-                F[a] = b
-            },
-            H.addFilter = function(a) {
-                E.push(a)
-            },
-            H.errorTimeout = 1e4,
-        b.readyState == null && b.addEventListener && (b.readyState = "loading", b.addEventListener("DOMContentLoaded", G = function() {
-                b.removeEventListener("DOMContentLoaded", G, 0),
-                    b.readyState = "complete"
-            },
-            0)),
-            a.yepnope = d()
-    } (window, document,undefined),
-    Modernizr.load = function() {
-        yepnope.apply(window, [].slice.call(arguments, 0))
-    };

+ 0 - 202
2019专题/特炫宣传页/src/modules/page/preH5.js

@@ -1,202 +0,0 @@
-var dialog = require('dialog');
-var tipsTpl = __inline('../../tpl/tip.tmpl');
-var videoTpl = __inline('../../tpl/video.tmpl')
-
-
-
-$(function () {
-
-    share()
-
-    $('.player-icon').on('click', function () {
-        $('.video-wrap').show()
-        var v = document.querySelector('video')
-        v.load()
-        v.play()
-        return false
-    })
-
-    $('.video-close').on('click', function () {
-        $('.video-wrap').hide()
-        var v = document.querySelector('video')
-        v.pause()
-        return false
-
-    })
-
-    $('.pre-btn').on('click', function () {
-        $('.form-box').show()
-        return false
-    })
-
-    $('.form-close').on('click', function () {
-        $('.form-box').hide()
-        return false
-
-    })
-
-
-
-
-    $('#signUp').on('click', function () {    //预订
-        var phoneNum = $('#phone').val();
-        var device = $("input[name='system']:checked").val()
-        if (validata(phoneNum, device)) {
-            submit(phoneNum, device)
-        }
-    })
-
-    setVideos()
-
-
-
-})
-
-window.onload = function () {
-    //火箭发射开始
-    $('.rocket').addClass('shot');
-    //火箭发射结束 1500ms
-    setTimeout(function(){
-        $('.old-background').fadeOut(1000);
-        $('.bomb').show();
-        $('.rocket').hide();
-    },1500)
-    setTimeout(function(){
-        $('.bomb').hide();
-        $('.wenan1').fadeIn(2500)
-    },2500)
-    setTimeout(function(){
-        $('.background').fadeIn(4000)
-        $('.wenan1').fadeOut(3000)
-    },5000)
-    
-    
-}
-
-
-
-
-function validata(phone, device) {
-    var reg = /0?(13|14|15|18)[0-9]{9}/
-    if (!reg.test(phone)) {
-        dialog({
-            title: " 提示",
-            content: tipsTpl({ msg: "请输入正确的手机号码" }),
-            skin: "popup-ui"
-        }).showModal();
-        return false;
-    }
-    if (device == '' || device == null) {
-        dialog({
-            title: " 提示",
-            content: tipsTpl({ msg: "请选择操作系统" }),
-            skin: "popup-ui"
-        }).showModal();
-        return false;
-    }
-
-    return true;
-}
-
-
-
-function submit(phone, device) {
-    $.ajax({
-        url: `http://sy.duowan.com/open/Reserved?mobile=${phone}&device=${device}&name=超次元坦克`,
-        dataType: "jsonp",
-        success: function (result) {
-            if (result.code == 0) {
-                dialog({
-                    title: " 提示",
-                    content: tipsTpl({ msg: "恭喜你,预约成功" }),
-                    skin: "popup-ui"
-                }).showModal();
-                $('#phone').val('');
-                $('.form-box').hide();
-            }
-        },
-        error: function (e, x, t) {
-            console.log(e)
-            console.log(x)
-            console.log(t)
-
-        }
-    })
-}
-
-
-function setVideos() {
-    var ids = []
-
-    $('div[data-video]').each(function (i, item) {
-        ids.push(item.id)
-    })
-    var fontsize  = parseFloat(document.getElementsByTagName('html')[0].style.fontSize)
-    console.log(parseFloat(fontsize))
-    var height = fontsize * 7.2;
-    var width = fontsize * 12.8;
-
-    if (ids.length) {
-        //异步加载 
-        $.getScript("http://video.duowan.com/style/js/huyavideo_placer.js?v=1234567890", function () {
-
-            //vid => {place, tpl, onFinish}
-            var map = {}
-
-            for (var i = 0, len = ids.length; i < len; i++) {
-                map[ids[i]] = {
-                    place: '#' + ids[i],
-                    tpl: videoTpl({
-                        width: width,
-                        height: height
-                    }),
-                    playerOptions: {//MediaElementPlayer的options,非必需
-                        loop: true,
-                        autoplay: false, //自动播放不属于ME的自带选项
-                        pauseOtherPlayers: true
-                    },
-                    onFinish: function (context) {
-
-                    }
-                }
-            }
-            new VhuyaPlayerPlacer(map);
-
-        })
-    }
-    return this
-}
-
-
-
-function share () {
-    $.ajax({
-    url: "http://m.hiyd.com/weixin/getJsSign",
-    type: "GET",
-    data: {
-        url: location.href,
-        appid: 18
-    },
-    success: function (ret) {
-        ret.data.debug = false;
-        ret.data.jsApiList = [
-            "onMenuShareTimeline",
-            "onMenuShareAppMessage"
-        ]
-        wx.config(ret.data);
-        wx.ready(function () {
-            wx.onMenuShareTimeline({
-                title: "坦克大战重塑归来 手游版即将上线",
-                link: location.href,
-                imgUrl: "http://pub.dwstatic.com/zt2017/tank/1.0.0/img/share.png"
-            })
-            wx.onMenuShareAppMessage({
-                title: "坦克大战重塑归来 手游版即将上线",
-                link: location.href,
-                desc: "多玩首款休闲竞技手游《超次元坦克》,以FC坦克大战为基础打造的全新体验。",
-                imgUrl: "http://pub.dwstatic.com/zt2017/tank/1.0.0/img/share.png"
-            })
-        })
-    }
-})
-}

+ 0 - 137
2019专题/特炫宣传页/src/modules/page/prePc.js

@@ -1,137 +0,0 @@
-var dialog = require('dialog');
-var tipsTpl = __inline('../../tpl/tip.tmpl');
-
-if(!IsPC()){
-    location.href = 'http://ccytk.duowan.com/1708/m_366390494560.html'
-}
-
-
-
-
-$(function(){
-    $('.pre-btn').on('click',function(){
-        $('.form-box').show()
-        return false;
-    })
-
-    $('.form-box').on('click',function(){
-        $(this).hide()
-        return false;        
-    })
-
-    $('.form-wrap').on('click',function(e){
-        e.stopPropagation();
-    })
-
-    $('.video-wrap').on('click',function(e){
-        e.stopPropagation();
-    })
-    //封面按钮
-    $('.icon-play').on('click',function(){
-        $('.video-container').show();
-    })
-
-    //视频关闭按钮
-    $('.video-close').on('click',function(){
-        $('.video-container').hide();        
-    })
-
-    //轮胎按钮点击打开视频
-    $('.rorate-btn').on('click',function(){
-        $('.video-container').show();
-    })
-
-    //轮胎按钮点击打开视频
-    $('.form-close').on('click',function(){
-        $('.form-box').hide()
-
-    })
-
-    
-
-    
-
-    $('#signUp').on('click',function(){    //预订
-        var phoneNum = $('#phone').val();
-        var device = $("input[name='system']:checked").val()
-        if (validata(phoneNum,device)){
-            submit(phoneNum,device)
-        }
-    })
-
-    $('#preNum').text(count);
-    setInterval(function(){
-        count += parseInt(Math.random() * 3) 
-        
-        $('#preNum').text(count);
-    },10000)
-
-    
-    
-})
-
-
-
-
-function validata (phone, device) {
-    var reg = /0?(13|14|15|18)[0-9]{9}/
-    if ( !reg.test(phone) ){
-        dialog({
-            title:" 提示",
-            content:tipsTpl({msg:"请输入正确的手机号码"}),
-            skin: "popup-ui"
-        }).showModal();
-        return false;
-    }
-    if (device == '' || device == null){
-        dialog({
-            title:" 提示",
-            content:tipsTpl({msg:"请选择操作系统"}),
-            skin: "popup-ui"
-        }).showModal();
-        return false;
-    }
-
-    return true;
-}
-
-
-
-function submit (phone,device) {
-    $.ajax({
-        url:`http://sy.duowan.com/open/Reserved?mobile=${phone}&device=${device}&name=超次元坦克`,
-        dataType:"jsonp",
-        success:function(result){
-            if(result.code == 0){
-                dialog({
-                    title:" 提示",
-                    content:tipsTpl({msg:"恭喜你,预约成功"}),
-                    skin: "popup-ui"
-                }).showModal();
-                $('#phone').val('');
-                $('.form-box').hide();
-            }
-        },
-        error:function(e,x,t){
-            console.log(e)
-            console.log(x)
-            console.log(t)
-            
-        }
-    })
-}
-
-function IsPC() {
-    var userAgentInfo = navigator.userAgent;
-    var Agents = ["Android", "iPhone",
-                "SymbianOS", "Windows Phone",
-                "iPad", "iPod"];
-    var flag = true;
-    for (var v = 0; v < Agents.length; v++) {
-        if (userAgentInfo.indexOf(Agents[v]) > 0) {
-            flag = false;
-            break;
-        }
-    }
-    return flag;
-}

+ 101 - 0
2019专题/特炫宣传页/src/modules/page/share.js

@@ -0,0 +1,101 @@
+class Index {
+    constructor() {
+        this.init();
+        this.id = this._getParam("id");
+        this.getVideoInfo();
+    }
+
+    init() {
+        this.bindEvent();
+    }
+
+    bindEvent() {
+        var self = this
+        $(".btn-play").on("touchend", function() {
+            document.getElementsByTagName("video")[0].play();
+            $('img').hide()
+            $(this).hide();
+            
+        });
+        
+
+        $('.btn').on('click',function() {
+            // alert('click')
+            let downloadLink = $(this).find('span').attr('href')
+            self.openApp('dwsupershow://toTemplateDetail?templateId=' + self.id)
+            if(downloadLink) {
+                location.href = downloadLink
+            }
+        })
+
+        $('video').on('pause', function() {
+            $(".btn-play").show()
+        })
+    }
+
+    _getParam(name) {
+        var getParam2 = function(name, str) {
+            //获取参数name的值
+            var reg = new RegExp("(^|!|&|\\?)" + name + "=([^&]*)(&|$)");
+
+            //再获取?后面的参数
+            var r = str.match(reg);
+            if (r != null) {
+                try {
+                    return decodeURIComponent(r[2]);
+                } catch (e) {
+                    console.log(e + "r[2]:" + r[2]);
+                    return null;
+                }
+            }
+            return null;
+        };
+
+        //先获取#后面的参数
+        var str = document.location.hash.substr(2);
+        var value = getParam2(name, str);
+        if (value == null) {
+            str = document.location.search.substr(1);
+            value = getParam2(name, str);
+        }
+        return value;
+    }
+
+    getVideoInfo() {
+        if (!this.id) {
+            alert("无法获取ID");
+            return;
+        }
+        let API = "https://test-api-texiu.duowan.com/template/detail";
+        $.ajax({
+            url: API,
+            data: { id: this.id },
+            dataType: "json",
+            success: this.requsetCb
+        });
+    }
+
+    requsetCb(ret) {
+        var data = ret.data;
+        $('img').attr('src',data.cover)
+        $("video")
+            .attr("poster", data.cover)
+            .attr("src", data.url);
+        $("#title").text(data.description);
+        document.title = data.music.title;
+    }
+
+    openApp(url) {
+        var iframe = document.createElement("iframe");
+        iframe.src = url;
+        iframe.style.display = "none";
+        document.body.appendChild(iframe);
+        setTimeout(() => {
+            document.body.removeChild(iframe);
+        }, 1000);
+    }
+}
+
+$(function() {
+    new Index();
+});

File diff suppressed because it is too large
+ 0 - 14
2019专题/特炫宣传页/src/modules/page/swiper.js


+ 8 - 0
2019专题/特炫宣传页/src/sass/base/_mMixins.scss

@@ -1,6 +1,7 @@
 @charset "UTF-8";
 
 $vari : 1080 / 640;
+$var : 750 / 640;
 
 @function px2rem($size){
 	@return $size / 20 / 2 / $vari + rem;
@@ -9,6 +10,13 @@ $vari : 1080 / 640;
     @return - $size / 20 / 2 / $vari + rem;
 }
 
+@function rem($size){
+	@return $size / 20 / 2 / $var + rem;
+}
+@function -rem($size){
+    @return - $size / 20 / 2 / $var + rem;
+}
+
 @mixin reset{
 	margin: 0;
 	padding: 0;

+ 96 - 0
2019专题/特炫宣传页/src/sass/share.scss

@@ -0,0 +1,96 @@
+@charset "UTF-8";
+$yahei: "Microsoft YaHei";
+$pingfan:PingFangSC-Regular;
+
+/*通用变量*/
+
+$baseFontSize:14px;
+$baseFontColor:#999;
+/*基础样式*/
+
+@import "base/mBase";
+@import "base/mMixins";
+
+
+html,body{
+    height: 100%;
+    overflow: hidden;
+}
+body {
+    font-size: $baseFontSize;
+    font-family:$pingfan, $yahei    , Helvetica, Arial, sans-serif;
+    background-color: #fff;
+}
+video {
+    object-fit: fill;
+}
+
+.page-share {
+    height: 100%;
+    position: relative;
+    img {
+        width:100%;height:100%;
+        position: absolute;
+        top:0;
+        left: 0;
+        z-index: 1;
+    }
+    video {
+        width: 100%;
+        height: 100%;
+    }
+    .shade {
+        height: rem(595);
+        background: url(../img/img-mask.png) 0 0 / 1px 100%;
+        z-index: 999;
+        width: 100%;
+        position: absolute;
+        bottom: 0;
+        left: 0; 
+        p {
+            width: rem(500);
+            padding: rem(30) 0 rem(30) rem(30);
+            bottom: 0;
+            left: 0;
+            color: #fff;
+            font-size: rem(28);
+            line-height: rem(40);
+            position: absolute;
+        }
+        .btn {
+            position: absolute;
+            width: rem(135);
+            height: rem(109);
+            background: url(../img/icon-bg.png) 0 / 100%;
+            bottom: rem(30);
+            right: rem(35);
+            text-align: center;
+        }
+        .icon-carm {
+            display: block;
+            width: rem(72);
+            height: rem(57);
+            background: url(../img/icon-video.png) 0 / 100%;
+            margin: rem(10) auto;
+        }
+        span {
+            font-size: rem(22);
+            color: #fff;
+            position: absolute;
+            left: 0;
+            width: 100%;
+            bottom: rem(15);
+        }
+    }
+    .btn-play {
+        position: absolute;
+        z-index: 5;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%,-50%);
+        width: rem(162);
+        height: rem(144);
+        background: url(../img/icon-play.png) 0 / 100% no-repeat;
+        cursor: pointer;
+    }
+}

+ 38 - 0
2019专题/特炫宣传页/src/share.html

@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
+    <meta name="format-detection" content="telephone=no" />
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>特炫</title>
+    <link href="sass/share.scss" rel="stylesheet">
+    <script src="lib/rem.js"></script><!--ignore-->
+    <script src="lib/jquery.js"></script><!--ignore-->
+</head>
+<body>
+    <div class="page-share">
+        <video preload="meta" 
+            x5-video-player-fullscreen="false" 
+            loop 
+            playsinline
+            webkit-playsinline="true"
+            x5-video-player-type="h5">
+        </video>
+        <img alt="">
+        <a class="btn-play"></a>
+        <div class="shade">
+            <p id="title"></p>
+            <!-- 打开app协议 DWSuperShow -->
+            <a class="btn">
+                <i class="icon-carm"></i>
+                <span href="">炫同款</span>
+            </a>
+        </div>
+    </div>
+    <script src="lib/mod.js"></script>
+    <script>
+        require('./modules/page/share.js')
+    </script>
+</body>
+</html>

Some files were not shown because too many files changed in this diff