Blame view

template/www.yohobuy.com/partials/layout/use.phtml 2.28 KB
xuqi authored
1 2 3 4 5
<script>
    seajs.use('js/common');
</script>
{{!-- 首页 --}}
{{#if boysHomePage}}
xuqi authored
6
    <script>
7
        seajs.use('js/home/home');
xuqi authored
8 9 10 11 12 13
    </script>
{{/if}}

{{!-- 搜索 --}}
{{#if searchListPage}}
    <script>
14
        seajs.use(['js/product/list', 'js/product/product'], function (list, product) {
lore-w authored
15
16
            product.init(5);
17
            window.onresize = function () {
lore-w authored
18
                setTimeout(function () {
19
                    product.init(5);
lore-w authored
20
                }, 300);
21
            };
lore-w authored
22
23
        });
xuqi authored
24
    </script>
25 26 27 28
{{/if}}

{{!-- 列表 --}}
{{#if productListPage}}
xuqi authored
29 30
    <script>
        seajs.use(['js/product/list', 'js/product/product'], function (list, product) {
lore-w authored
31
32
            product.init(4);
33
            window.onresize = function () {
lore-w authored
34
                setTimeout(function () {
35
                    product.init(4);
lore-w authored
36
                }, 300);
37
            };
lore-w authored
38
xuqi authored
39 40 41 42
        });
    </script>
{{/if}}
xuqi authored
43 44 45 46 47 48 49
{{!-- 商品详情页 --}}
{{#if productDetailPage}}
    <script>
        seajs.use('js/product/item');
    </script>
{{/if}}
xuqi authored
50 51 52 53 54
{{!-- 逛 --}}
{{#if guangIndexPage}}
    <script>
        seajs.use('js/guang/index');
    </script>
unknown authored
55 56 57 58 59 60 61
{{/if}}

{{!-- 逛详情页 --}}
{{#if guangDetailPage}}
    <script>
        seajs.use('js/guang/detail');
    </script>
unknown authored
62 63
{{/if}}
64
{{!-- 逛列表页 --}}
xuqi authored
65 66 67
{{#if guangListPage}}
    <script>
        seajs.use('js/guang/list');
unknown authored
68
    </script>
69 70
{{/if}}
xuqi authored
71 72 73 74 75
{{!-- 登录注册找回密码--}}
{{#if loginPage}}
    <script>
        seajs.use('js/passport/login');
    </script>
lore-w authored
76 77 78 79
{{/if}}

{{!-- 注册页--}}
{{#if registerPage}}
80 81 82
    <script>
        seajs.use('js/passport/reg');
    </script>
83 84
{{/if}}
unknown authored
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
{{!-- 找回密码--}}
{{#if backPage}}
    <script>
        seajs.use('js/passport/back');
    </script>
{{/if}}

{{!-- 重置密码--}}
{{#if resetPage}}
    <script>
        seajs.use('js/passport/reset');
    </script>
{{/if}}

{{!-- 验证手机 --}}
{{#if vertificationPage}}
    <script>
        seajs.use('js/passport/vertification');
    </script>
unknown authored
104 105 106 107 108 109 110
{{/if}}

{{!-- 热销排行--}}
{{#if hotrankPage}}
    <script>
        seajs.use('js/product/hotrank');
    </script>
weiqingting authored
111 112 113 114 115 116
{{/if}}
{{!-- 品牌页 --}}
{{#if brandsHomePage}}
    <script>
        seajs.use('js/brand/index');
    </script>
weiqingting authored
117
{{/if}}
lore-w authored
118 119
{{!-- 订单保存--}}
{{#if orderSavePage}}
weiqingting authored
120 121 122 123
    <script>
        seajs.use('js/order/save');
    </script>
{{/if}}