lyh
6 天以前 c60e141e9b43be2eb5122eaa7da13bc0cf3848cd
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/**
 * Created by admin on 2018/2/19.
 */
webpackJsonp([31], {
  0: function (e, a, t) {
    e.exports = t(75)
  }, 30: function (e, a, t) {
    var r = t(4), s = React.createClass({
      displayName: "fox", componentDidMount: function () {
      }, render: function () {
        var e = [], a = "?page=", t = this.props.pageData, s = this.props.cname ? this.props.cname : "page";
        if (this.props.urlData && (this.props.urlData.page && delete this.props.urlData.page, a = "?" + r.parseParam(this.props.urlData) + "&page="), t.totalPage < 8 && 1 != t.totalPage)for (var i = 1; i <= t.totalPage; i++)t.pageCurrent == i ? e.push(React.createElement("a", {
          key: i,
          href: a + i,
          className: "active ipg",
          "data-id": i
        }, i)) : e.push(React.createElement("a", {
          key: i,
          href: a + i,
          className: "ipg",
          "data-id": i
        }, i)); else if (t.totalPage >= 8) {
          e.push(React.createElement("a", {
            key: "0",
            href: a + "1",
            className: "ipg",
            "data-id": "1"
          }, "首页")), 1 != t.pageCurrent && e.push(React.createElement("a", {
            key: "-1",
            href: a + (t.pageCurrent - 1),
            className: "ipg",
            "data-id": t.pageCurrent - 1
          }, "上一页"));
          for (var i = 1; i <= 8; i++) {
            var c = i;
            t.pageCurrent > 4 && (c += t.pageCurrent - 4), t.totalPage - t.pageCurrent < 4 && (c = t.totalPage - 8 + i), t.pageCurrent == c ? e.push(React.createElement("a", {
              key: i,
              href: a + c,
              className: "active ipg",
              "data-id": c
            }, c)) : e.push(React.createElement("a", {key: i, href: a + c, className: "ipg", "data-id": c}, c))
          }
          t.pageCurrent != t.totalPage && e.push(React.createElement("a", {
            key: "+1",
            href: a + (t.pageCurrent + 1),
            className: "ipg",
            "data-id": t.pageCurrent + 1
          }, "下一页")), e.push(React.createElement("a", {
            key: "++1",
            href: a + t.totalPage,
            className: "ipg",
            "data-id": t.totalPage
          }, "尾页"))
        }
        return React.createElement("div", {className: s, key: "page"}, e)
      }
    });
    e.exports = s
  }, 75: function (e, a, t) {
    function r(e) {
      $("#loading").show(), n.req("course_menu", o, function (a) {
        $("#loading").hide(), $(window).scrollTop(0), console.log(a), l = a.course.resultData, s(), e && e(a)
      })
    }
 
    function s() {
      c(React.createElement(i, {data: l, urldata: o}), document.getElementById("course"))
    }
 
    t(2);
    var i = t(76), c = React.render, n = t(3), l = [],
      o = {tid1: $("#cate1 .active>a").attr("tid"), tid2: $(".cate2.active .active>a").attr("tid"), pageNum: 1};
    o.tid1 = o.tid1 ? o.tid1 : "", o.tid2 = o.tid2 ? o.tid2 : "", $(".classify ").delegate("a", "click", function () {
      $(this).parent().addClass("active").siblings().removeClass("active");
      var e = $(this).parents(".classify").attr("id");
      if ("cate1" == e) {
        var a = $(this).attr("tid");
        $("#c" + a).addClass("active").siblings().removeClass("active"), o.tid1 = a ? a : "", o.tid2 = ""
      } else {
        var a = $(this).attr("tid");
        o.tid2 = a ? a : "", o.tid1 = $("#cate1 .active>a").attr("tid")
      }
      return o.pageNum = 1, history.pushState(o, "龙果学院-课程列表", "?" + n.parseParam(o)), r(), !1
    }), $("#course").delegate(".ipg", "click", function () {
      var e = $(this).attr("data-id");
      return o.page = e, r(), history.pushState(o, "龙果学院-课程列表", "?" + n.parseParam(o)), !1
    }), window.onpopstate = function (e) {
      o = e.state ? e.state : o, r(), $("#cate1 a[tid='" + o.tid1 + "']").parent().addClass("active").siblings().removeClass("active"), $(".cate2 a[tid='" + o.tid2 + "']").parent().addClass("active").siblings().removeClass("active"), $("#c" + o.tid1).addClass("active").siblings().removeClass("active")
    }
  }, 76: function (e, a, t) {
    var r = (t(4), t(30)), s = React.createClass({
      displayName: "tmpApp", getDefaultProps: function () {
        return {}
      }, getInitialState: function () {
        return {data: this.props.data}
      }, componentWillMount: function () {
      }, componentWillReceiveProps: function (e) {
      }, _dealWithData: function (e) {
        function a(e) {
          var a = e.map(function (e, a) {
            var t;
            return t = 0 == e.isFree ? "免费" : e.fabPrice >= 2e6 ? "面议" : e.fabPrice, React.createElement("li", {className: "course_item"}, React.createElement("a", {
              href: "view/" + e.courseUuid,
              title: e.courseName,
              target: "_blank",
              className: "img"
            }, React.createElement("img", {
              src: e.courseLogo,
              alt: e.courseName
            })), React.createElement("div", {className: "summary"}, React.createElement("a", {
              href: "view/" + e.courseUuid,
              title: e.courseName,
              target: "_blank",
              className: "name"
            }, e.courseName), React.createElement("div", {className: ""}, React.createElement("span", {className: "fabprice"}, "¥", t), React.createElement("s", {className: "orgprice"}, "¥", e.orgPrice), React.createElement("span", {className: "study_count fr"}, e.studyCount, "人学习")), React.createElement("div", {className: "icon_fonts"})))
          });
          return React.createElement("ul", {key: "ul1", className: "course_list clearfix"}, a)
        }
 
        console.log(e);
        var t = [];
        t.push(a(e.list));
        var s = {totalPage: e.totalPage, pageCurrent: e.pageCurrent, pageSize: e.pageSize};
        return t.push(React.createElement(r, {key: "page", pageData: s, urlData: this.props.urldata})), t
      }, loopRender: function () {
        var e = [];
        !!this.props.itemStyle && this.props.itemStyle, !!this.props.itemClass && this.props.itemClass;
        if (this.props.data) {
          var a = this.props.data;
          e = this._dealWithData(a)
        }
        return e
      }, componentDidMount: function () {
      }, render: function () {
        var e = this.loopRender();
        return React.createElement("div", {className: "list-wrap"}, e)
      }
    });
    e.exports = s
  }
});