Blame view

web/src/js/order/customer-order-controller.js 1.2 KB
3a892ee0   xu   app-wx(v0.1.0 bui...
1
2
3
4
5
6
7
8
9
/**
 * 维修中页
 */
define(
    "order/customer-order-controller",
    [
        'mk7/controller',
        'mk7/url',
        'mk7/utils',
1de3211f   xu   app-wx(v0.1.0 bui...
10
    ],
3a892ee0   xu   app-wx(v0.1.0 bui...
11
12

    function(ctrl, url, utils) {
1de3211f   xu   app-wx(v0.1.0 bui...
13

3a892ee0   xu   app-wx(v0.1.0 bui...
14
15
16
17
18
19
20
21
22
23
        var $$ = Dom7;
        var t7 = Template7;
        var ctrl = new ctrl();

        var pageURL = 'order/customer/order-details';
        ctrl.run = function () {
            var me = this;
            me.id = me.params.id;
            me.sn = me.params.sn;
            me.setPageTitle("维修单");
6bece648   xu   app-wx(v0.1.0 bui...
24
            me.loadPage();
3a892ee0   xu   app-wx(v0.1.0 bui...
25
26
27
        }
        ctrl.bindEvents = function () {
            var me = this;
6bece648   xu   app-wx(v0.1.0 bui...
28
            console.log("bindEvents");
3a892ee0   xu   app-wx(v0.1.0 bui...
29
30
31
32
            me.goToComment();
        }
        ctrl.loadPage = function() {
            var me = this
f3ed8f51   xu   app-wx(v0.1.0 bui...
33
            var pData = me.csrf({id: me.id});
afd2f743   xu   app-ht(v0.0.1 bui...
34
            utils.httpPost(url.to(pageURL), pData, function(res) {
3a892ee0   xu   app-wx(v0.1.0 bui...
35
                var rData = res;
6bece648   xu   app-wx(v0.1.0 bui...
36
37
38
39
40
41
42
43
                me.render(rData);
            }, true)

        }

        ctrl.goToComment = function() {
            var me = this;
            $$('#customer-order .rate-btn-cls').click(function(e){
3a892ee0   xu   app-wx(v0.1.0 bui...
44
45
46
47
48
                window.location.replace(url.to('order/customer#rate/'+me.id+'/'+me.sn))
            })

        }
        return ctrl;
6bece648   xu   app-wx(v0.1.0 bui...
49
    }
3a892ee0   xu   app-wx(v0.1.0 bui...
50
);
afd2f743   xu   app-ht(v0.0.1 bui...

1de3211f   xu   app-wx(v0.1.0 bui...

f3ed8f51   xu   app-wx(v0.1.0 bui...

1de3211f   xu   app-wx(v0.1.0 bui...

f3ed8f51   xu   app-wx(v0.1.0 bui...

1de3211f   xu   app-wx(v0.1.0 bui...

f3ed8f51   xu   app-wx(v0.1.0 bui...

1de3211f   xu   app-wx(v0.1.0 bui...

f3ed8f51   xu   app-wx(v0.1.0 bui...

3a892ee0   xu   app-wx(v0.1.0 bui...