Slide.js
909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
define(function () {
    'use strict';
    var sources = {
        FROM_URL: "R",
        MANUAL: "L"
    }
    function Slide() { }
    Slide.prototype = {
        transferToVM: function (dm) {
            var items = dm.pic_items || [];
            
            if (dm.slideBtnType === "R") { // 图片来源从URL获取
                items = [{
                    url: "javascript:;",
                    pic_desc: "",
                    pic_path: "/mobilemode/images/mec/pic-icon2_wev8.png"
                }];
            }
            return {
                height: dm.height || 200,
                items: items.map(function (item) {
                    return {
                        url: "javascript:;",
                        desc: item.pic_desc,
                        path: item.pic_path
                    }
                })
            };
        }
    };
    return Slide;
});