Slide.js 909 Bytes
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;
});