鍍金池/ 問答/HTML/ IE11下vue1.*版本數(shù)據(jù)丟失,功能全部失效,還不報錯,有遇到此類問題嗎

IE11下vue1.*版本數(shù)據(jù)丟失,功能全部失效,還不報錯,有遇到此類問題嗎

頁面在chrome和ieEdge中正常顯示,ie11就不行了。所有數(shù)據(jù)為空。測試地址為: test.soundems.com鏈接描述
本渣找了兩天也沒找到問題,尋求幫助感激不盡,感謝您百忙之中幫我看看代碼。
如圖顯示圖片描述

下面是js的代碼。vue版本為1.x

// var token = '';
var token = localStorage.getItem('token');
var email = '';
console.log('1')
$(document).click(function () {
    $('.boxShow.mine').hide();
    $('.server').hide();
})
$('.boxShow.mine').delegate('.logout', 'click', function (e) {
    e.stopPropagation();
    localStorage.removeItem('token');
    window.location.href = "logIn/index.html";
})
$('.clickServer').click(function(e){
    e.stopPropagation();
    if( $('.server').css('display') == 'none' ){
        $('.server').css({'display':'block'});
        $('.mine').css({'display':'none'})
    }else{
        $('.server').css({'display':'none'})
    }
})
Vue.component('pager', {
    template: '#page-switch',
    props: ['count', 'current', 'routerName'],
    data: function () {
        return {
            page: 2,
            list: []
        }
    },
    watch: {
        'count': function () {
            this.setList();
        },
        'current': function () {
            this.setList();
        },
        'router-name': function () {
            this.setList();
        }
    },
    updated: function() {
        console.log('updated');
    },
    computed: {
    },
    ready: function () {
        this.page = 1;
        this.setList();
    },
    methods: {
        change: function (page) {
            this.$emit('redirect', page)
        },
        setList: function () {
            this.list = [];
            var count = this.count,
                    current = parseInt(this.current);
            var list = [];
            var i = 1;
            for (;i <= count; i++) {
                if (i <= 3 || Math.abs(current - i) <= 1 || count - i < 2 ) {
                    list.push(i);
                } else {
                    list.push(0);
                }
            }
            for (var j = list.length - 1; j >= 0; j--) {
                if (j > 0 && list[j - 1] == 0 && list[j] == 0) {
                    list.splice(j, 1);
                }
            }
            this.list = list;
        }
    }
});
Vue.component('share', {
    template: '#share',
    props: ['audio', 'title', 'time', 'size', 'oid', 'qr', 'share'],
    data: function () {
        return {
            // show: true
            playBool: false,
            rewordArr: [8.8, 6.6, 2.2, 1.1],
            reward: 0,
            customRewardShow: false,
            stage: 1,
            qrImg: 'data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==',
            api: {
                // apiQR: 'http://testmedia.heardtech.com/Post/PayReward',
                // apiPayStatus: 'http://testmedia.heardtech.com/Post/ajaxRewardIspay'
                apiQR: apiCollect.apiReward,
                apiPayStatus: apiCollect.apiRewardStatus
            },
            intervalId: 0
        }
    },
    computed: {
        qrUrl: function () {
            return 'share.html?qr=' + encodeURIComponent(encodeURIComponent(this.qr));
        }
    },
    created: function () {
        console.log(this.audio, this.title, this.share)
        // console.log(this.shareLink);
    },
    ready: function () {
        var _this = this;
        if (this.audio) {
            $('#share-audio').on('ended', function () {
                _this.playBool = false;
            })
        }
        var btn = document.getElementById('copyClip');
        var clipboard = new Clipboard(btn);//實例化

        //復(fù)制成功執(zhí)行的回調(diào),可選
        clipboard.on('success', function (e) {
            // console.log(e);
            headtipObj2.show('復(fù)制成功');
        });

        //復(fù)制失敗執(zhí)行的回調(diào),可選
        clipboard.on('error', function (e) {
            headtipObj.show('您的瀏覽器不支持該功能');
        });
    },
    methods: {
        close: function () {
            clearInterval(this.intervalId);
            this.$emit('close');
        },
        customRewardSet: function (ev) {
            ev.preventDefault();
            this.customRewardShow = !this.customRewardShow;
        },
        showAlipay: function () {
            headtipObj2.show('支付寶維護中 請稍后再試');
        },
        audioPlay: function () {
            if (this.playBool) {
                this.playBool = false;
                $('#share-audio').get(0).pause();
            } else {
                this.playBool = true;
                $('#share-audio').get(0).play();
            }
        },
        gotoPage2: function (val) {
            this.reward = val;
            this.stage = 2;
        },
        getQR: function (val) {
            var _this = this;
            // 獲取qr
            $.post(_this.api.apiQR, {
                // 數(shù)據(jù)
                token: localStorage.getItem('token'),
                oid: _this.oid,
                money: val
            }, function (data) {
                if (data.code == '000000') {
                    _this.stage = 3;
                    // 修改二維碼
                    _this.qrImg = data.data.fileName;
                    _this.getPaymentStatusLoop(data.data.out_trade_no);
                } else {
                    headtipObj.show(data.message);
                }
            })
        },
        getPaymentStatusLoop: function (num) {
            var _this = this;
            var cont = true;
            _this.intervalId = setInterval(function () {
                if (cont) {
                    cont = false;
                    // 詢問
                    $.post(_this.api.apiPayStatus, {
                        token: localStorage.getItem('token'),
                        oid: _this.oid,
                        out_trade_no: num
                    }, function (data) {
                        if (data.code == '000000') {
                            if (data.data.is_pay == 1) {
                                // 成功
                                // 正常操作

                                _this.stage = 4;
                                // headtipObj.show(data.message);
                                clearInterval(_this.intervalId);
                            } else {
                                // 失敗
                                cont = true;
                            }
                        } else {
                            headtipObj.show(data.message);
                        }
                    })
                }
            }, 1000);
        }
    }
})
// 付款組件
Vue.component('payment', {
    template: '#payment',
    props: ['email', 'oid', 'token', 'price', 'balance'],
    data: function () {
        return {
            qrImg: 'data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==',
            // apiGetQR: 'http://testmedia.heardtech.com/Post/PayOrder',
            // apiPayStatus: 'http://testmedia.heardtech.com/Post/ajaxOrderIspay',
            apiGetQR: apiCollect.apiGetWXQR,
            apiPayStatus: apiCollect.apiGetPayStatus,
            stage: 1,
            emailEditing: false,
            eml: '',
            title: '支付訂單',
            balanceCheckbox: false,
            regEmail: /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/
        }
    },
    computed: {
        discount: function () {
            return (parseFloat(this.price) * .35).toFixed(2);
        }
    },
    ready: function () {
        // console.log(this.email, this.oid, this.token)
        this.eml = this.email;
    },
    methods: {
        clickVIP: function () {
            headtipObj2.show('該功能僅對高級版/企業(yè)版充值用戶開放');
        },
        clickAlipay: function () {
            headtipObj2.show('支付寶維護中 請稍后再試');
        },
        paymentClose: function () {
            this.$emit('close');
        },
        useBalance: function () {
            if ($('.noclick').attr('id') <= 0){
                headtipObj2.show('您的余額不足 請前往充值套餐');
                $('.noclick').attr("checked",false);
                this.balanceCheckbox = false;
            }
            if (this.balanceCheckbox) {
                // 使用余額

            } else {
                // 不使用余額
            }
        },
        showQR: function () {
            ajaxLock = false;
            var _this = this;
            if (!_this.regEmail.test(_this.eml)) {
                headtipObj.show('郵箱格式不正確');
            } else {
                if (ajaxLock) return; // 如果有鎖 則不進行操作
                ajaxLock = true;            // 如果無鎖 先鎖定
                $.post(_this.apiGetQR, {
                    token: _this.token,
                    oid: _this.oid,
                    email: _this.eml,
                    paytype: 1, // 1 微信 2 支付寶
                    isbalance: $('.mask_footer_b input[type="checkbox"]').prop('checked') ? 1 : 0
                }, function (data) {
                    if (data.code == '000000') {
                        if (data.data.paystate == 0) {
                            // 直接跳到支付頁面
                            console.log(data);
                            _this.qrImg = data.data.fileName;
                            _this.stage = 2;
                            _this.title = '支付訂單(¥' + data.data.paymoney + ')'
                            _this.getPaymentStatusLoop();
                        } else if (data.data.paystate == 1) {
                            // 直接跳到支付成功頁
                            _this.title = '支付訂單(¥' + _this.price + ')'
                            _this.stage = 3;
                        }
                        ajaxLock = false;
                    } else {
                        headtipObj.show(data.message);
                        ajaxLock = false;
                    }
                })
            }
        },
        getPaymentStatusLoop: function () {
            var _this = this;
            var cont = true;
            var id = setInterval(function () {
                if (cont) {
                    cont = false;
                    // 詢問
                    $.post(_this.apiPayStatus, {
                        token: _this.token,
                        oid: _this.oid
                    }, function (data) {
                        if (data.code == '000000') {
                            if (data.data.is_pay == 1) {
                                // 成功
                                // 正常操作
                                _this.stage = 3;
                                // $('.mask_pay_two').hide();
                                // $('.mask_pay_three').show();
                                // $('.order_head').eq(1).addClass('col8ab2ed');
                                // $('.order_head').eq(2).addClass('col585858');

                                clearInterval(id);
                            } else {
                                // 失敗
                                cont = true;
                            }
                        } else {
                            Dialog.error(data.messge);
                        }
                    })
                }
            }, 1000);
        }
    }
})

// 評價組件
Vue.component('comment', {
    template: "#comment",
    props: ['nickname', 'level', 'ontime', 'ordercount', 'orderovertime', 'releasetime', 'satisfied', 'uuid', 'audio', 'oid'],
    data: function () {
        return {
            // api: 'http://testmedia.heardtech.com//Post/ScoreOrder',
            // apiRefuse: 'http://testmedia.heardtech.com//Post/RejectOrder',
            api: apiCollect.apiOrderCmt,
            apiRefuse: apiCollect.apiOrderReject,
            star: 0,
            hoverStar: 0,
            commentList: {
                1: false,
                2: false,
                3: false,
                4: false,
                5: false,
                6: false,
                7: false,
                8: false,
                9: false,
                10: false,
                11: false,
                12: false
            },
            rejectList: {
                1: false,
                2: false,
                3: false,
                4: false,
                5: false,
                6: false
            },
            audioStatus: false,
            confirmBtnBool: false,
            rejecting: false,
            redoTxt: ''
        }
    },
    ready: function () {
        // console.log(this.orderovertime)
        // console.log(this.audio);
    },
    methods: {
        close: function () {
            this.$emit('close')
        },
        collect: function () {
            // 收藏
            headtipObj.show('該功能僅對高級版/企業(yè)版充值用戶開放');
        },
        playAudio: function () {
            var bool = !this.audioStatus;
            if (bool) {
                $('#cmt-audio').get(0).play();
            } else {
                $('#cmt-audio').get(0).pause();
            }
            this.audioStatus = bool;
        },
        confirmStar: function (star) {
            if (star == 1) {
                this.commentList[7] = false;
                this.commentList[8] = false;
                this.commentList[9] = false;
                this.commentList[10] = false;
                this.commentList[11] = false;
                this.commentList[12] = false;
            } else if (star >= 2) {
                this.commentList[1] = false;
                this.commentList[2] = false;
                this.commentList[3] = false;
                this.commentList[4] = false;
                this.commentList[5] = false;
                this.commentList[6] = false;
            }
            this.rejecting = false;
            this.star = star;
            this.activeSubmitBtn();
        },
        starHover: function (data) {
            this.hoverStar = data;
        },
        addReject: function (index) {
            this.rejectList[index] = !this.rejectList[index];
            this.activeSubmitBtn();
        },
        addCmt: function (index) {
            this.commentList[index] = !this.commentList[index];
            this.activeSubmitBtn();
        },
        getCmtList: function () {
            var list = [];
            for (var i = 1; i <= 12; i++) {
                if (this.commentList[i]) {
                    list.push(i);
                }
            }
            return list;
        },
        getRejectList: function () {
            var list = [];
            for (var i = 1; i <= 12; i++) {
                if (this.rejectList[i]) {
                    list.push(i);
                }
            }
            return list;
        },
        activeSubmitBtn: function () {
            if (this.rejecting) {
                var list = this.getRejectList();
                if (list.length > 0 || this.redoTxt.length > 0) {
                    this.confirmBtnBool = true;
                } else {
                    this.confirmBtnBool = false;
                }
            } else {
                var list = this.getCmtList();
                if (this.star && list.length > 0) {
                    this.confirmBtnBool = true;
                } else {
                    this.confirmBtnBool = false;
                }
            }
        },
        pushCmt: function () {
            var _this = this;
            if (_this.rejecting) {
                // 重新配音
                _this.redo();
            } else {
                // 正常配音
                var list = this.getCmtList();
                if (_this.star == 0) {
                    headtipObj.show('請選擇星級');
                } else if (list.length == 0) {
                    headtipObj.show('請選擇評論');
                } else {
                    $.ajax({
                        type: 'post',
                        url: this.api,
                        data: {
                            token: localStorage.getItem('token'),
                            oid: _this.oid,
                            score: _this.star,
                            passmessage: list
                        },
                        beforeSend: function () {
                            $('#bohui').prop('disabled',true);
                        },
                        success: function (data) {
                            if (data.code == '000000') {
                                // window.location.reload();
                                _this.$emit('refresh');
                                _this.$emit('close');
                                headtipObj2.show("評價成功 歡迎分享音頻/打賞主播");
                            }
                            $('#bohui').prop('disabled',false);
                        },
                        error:function (data) {
                            headtipObj.show(data.message);
                        }
                    });
                }
            }
        },
        refuse: function () {
            headtipObj2.show('即將開放,敬請期待');
        },
        showReject: function () {
            this.rejecting = true;
            this.activeSubmitBtn();
        },
        redo: function () {
            // 要求重新配音
            var _this = this;
            if (_this.redoTxt.length == 0) {
                headtipObj.show('請輸入理由');
            } else {
                $.ajax({
                    type: "POST",
                    url: _this.apiRefuse,
                    data: {
                        token: localStorage.getItem('token'),
                        oid: _this.oid,
                        passmessage: _this.redoTxt
                    },
                    beforeSend:function () {
                        $('#bohui').prop('disabled',true);
                    },
                    success: function(data){
                        if (data.code == '000000') {
                            _this.$emit('refresh');
                            _this.$emit('close');
                        }
                    },
                    complete:function () {
                        $('#bohui').prop('disabled',false);

                    },
                    error:function (data) {
                        headtipObj.show(data.message);
                    }
                });

            }
        }
    }
});

// 詳情組件
Vue.component('detail', {
    template: '#detail',
    props: ['type', 'email', 'cmt', 'total', 'price', 'paystatus', 'state', 'quality', 'cmt2', 'achor', 'words'],
    data: function () {
        return {
        }
    },
    created: function(){
        console.log(1)
    },
    ready: function () {
        console.log(this.paystatus)
    },
    methods: {
        close: function () {
            this.$emit('close');
        }
    }
});

var all = Vue.extend({
    template: '#all',
    data: function () {
        return {
            all: {
                toke: token,
                page: '1',
                type: '0',
                email: ''
            },
            list: [],
            mation: {
                level: '',
                uuid: '',
                nickname: '',
                satisfied: '',
                ordercount: '',
                ontime: '',
                orderovertime: '',
                releasetime: ''
            },
            share: {
                show: false,
                audio: '',
                time: '',
                title: '',
                size: '',
                oid: '',
                qr: '',
                shareLink: ''
            },
            payment: {
                show: false,
                email: '',
                oid: '',
                price: 0,
                balance: 0
            },
            page: {
                current: 0, // 目前頁數(shù)
                count: 0,      // 總頁數(shù)
                routerName: 'all', //router name
                page: 0,
                list: []
            },
            comment: {
                show: false,
                star: 0,
                nickname: '',
                level: 0,
                ontime: 0,
                ordercount: 0,
                orderovertime: 0,
                releasetime: '',
                satisfied: 0,
                audio: '',
                uuid: '',
                oid: ''
            },
            // 詳情
            detail: {
                show: false,
                type: '極速配音 >優(yōu)質(zhì)主播 238字',
                email: '123@qq.com',
                cmt: '-',
                total: '2132',
                price: '23',
                paystatus: 0,
                state: '配音中',
                quality: '5',
                cmt2: 'dfsdfsdfdsfdsfsd',
                achor: '',
                words: 0
            },
            empty: false
        }
    },
    ready: function () {
        this.setPage();
        this.setTypeFromRoute();
        this.ajaxhtml();
        var _this = this;
        // 獲取用戶數(shù)據(jù)
        // 設(shè)置改變主體項
        pressSelect.init();
        // 設(shè)置個人信息項
        personInfo.init(function () {}, function (data) {
            _this.all.email = data.data.email;
        });
    },
    watch: {
        '$route': function (to, from) {
            // 對路由變化作出響應(yīng)...
            this.setTypeFromRoute();
            this.clearData();
            this.setPage();
            this.ajaxhtml();
        }
    },
    methods: {
        goto: function(page) {
            var name = this.$route.name;
            this.$router.go({
                name: name,
                query: {
                    page: page
                }
            })
        },
        clearData: function () {
            this.list = [];
        },
        setPage: function () {
            this.page.current = this.$route.query.page ? this.$route.query.page : 1;
            this.page.routerName = this.$route.name;
        },
        showDetail: function (demand, level, words, email, cmt, total, price, state, score, cmt2, paystatus) {
            var orderType = ['簽約配音','極速配音', '極速配音', '預(yù)約配音'];
            var achorLevel = [0, 0, 0, 0, '頂級主播', '知名主播', '優(yōu)質(zhì)主播']
            this.detail.type = orderType[demand];
            this.detail.achor = achorLevel[level - 1];
            this.detail.words = words;
            console.log(this.detail.type)
            this.detail.paystatus = paystatus;
            this.detail.email = email;
            this.detail.cmt = cmt;
            this.detail.total = total;
            this.detail.price = price;
            var status = ['未接單', '已接單', '已交付未結(jié)算', '已交付已結(jié)算', '需要重新上傳音頻'];
            if (state == 1) {
                this.detail.state = '-'
            } else if (state == 2 || state == 5) {
                this.detail.state = '配音中'
            } else if (state == 3 || state == 4) {
                this.detail.state = '已交付'
            }
            this.detail.quality = score;
            this.detail.cmt2 = cmt2
            this.detail.show = true;
        },
        cancelOrder: function (id) {
            var _this = this;
            commonConfirmBox.show({
                title: '取消訂單',
                text: '是否取消該訂單?'
            }, function () { }, function () {
                // 確認(rèn)后重置
                $.post(apiCollect.apiDeleteOrder, {
                    token: localStorage.getItem('token'),
                    oid: id
                }, function (data) {
                    if (data.code == '000000') {
                        // 刪除成功
                        _this.ajaxhtml();
                        commonConfirmBox.hide();
                    } else {
                        headtipObj.show(data.message);
                    }
                })
            })
        },
        delete: function (id) {
            var _this = this;
            commonConfirmBox.show({
                title: '刪除訂單',
                text: '是否刪除該訂單?'
            }, function () { }, function () {
                // 確認(rèn)后重置
                $.post(apiCollect.apiDeleteOrder, {
                    token: localStorage.getItem('token'),
                    oid: id
                }, function (data) {
                    if (data.code == '000000') {
                        // 刪除成功
                        _this.ajaxhtml();
                        commonConfirmBox.hide();
                    } else {
                        headtipObj.show(data.message);
                    }
                })
            })
        },
        setTypeFromRoute: function () {
            var typeObj = {
                'all': 0,
                'wait': 1,
                'dong': 2,
                'finish': 3,
                'talk': 4
            };
            this.all.type = typeObj[this.$route.name];
        },
        paymentShow: function (oid, email, price) {
            var _this = this;
            console.log(this.all.email, email)
            $.post(apiCollect.apiGetBalance, {
                wid: localStorage.getItem('wid')
            }, function (data) {
                if (data.code == '000000') {
                    // 付款組件顯示
                    _this.payment.show = true;
                    _this.payment.oid = oid;
                    _this.payment.price = price;
                    _this.payment.email = email;
                    _this.payment.balance = data.data.balance;
                } else {
                    headtipObj.show(data.message);
                }
            })
        },
        paymentClose: function () {
            // 付款組件關(guān)閉
            this.payment.show = false;
        },
        shareShow: function (show, audio, time, title, size, id, qr, shareLink) {
            // 分享組件顯示或者關(guān)閉
            this.share.show = show;
            this.share.audio = audio;
            this.share.oid = id;
            this.share.qr = qr;
            this.share.shareLink = shareLink;
            if (time) {
                var minutes = Math.floor(time / 60);
                var seconds = time % 60;
                this.share.time = (minutes > 10 ? minutes : '0' + minutes) + ':' + (seconds > 10 ? seconds : '0' + seconds);
            } else {
                this.share.time = 0;
            }
            this.share.title = title;
            this.share.size = size;
        },
        ajaxhtml: function () {
            var _self = this;
            $.ajax({
                type: "POST",
                url: apiCollect.apiOrderList,
                data: {
                    token: _self.all.toke,
                    page: _self.page.current,
                    type: _self.all.type
                },
                success: function (data) {
                    if (data.code == '000000') {
                        _self.all.page += 1;
                        _self.list = data.data.order ? data.data.order : [];
                        _self.page.count = data.data.count;
                        if (_self.list.length == 0) {
                            _self.empty = true;
                        } else {
                            _self.empty = false;
                        }
                        // _self.setRouterList();
                        // console.log('all.page.count', _self.page.count);
                    } else {
                        console.log(data.message)
                    }
                }
            });
        },
        talke: function (item, audio) {
            var _self = this;
            $.ajax({
                type: "POST",
                url: apiCollect.apiOrderCmtInfo,
                data: {
                    token: _self.all.toke,
                    oid: item
                },
                success: function (data) {
                    if (data.code == '000000') {
                        // 顯示評價窗口
                        _self.comment.nickname = data.data.nickname;
                        _self.comment.satisfied = data.data.satisfied;
                        _self.comment.ordercount = data.data.ordercount;
                        _self.comment.ontime = data.data.ontime;
                        _self.comment.releasetime = data.data.releasetime;
                        _self.comment.orderovertime = data.data.orderovertime;
                        _self.comment.level = data.data.level;
                        _self.comment.audio = audio;
                        _self.comment.oid = item;
                        _self.comment.show = true;
                    } else {
                        headtipObj.show(data.message);
                    }
                }
            });
        },
        share: function () {
            Dialog.customsMessage("<div class='talker-mask-line'></div>" +
                "<div class='mask-s-title'>" +
                "<img src='img/mask-icon.png' class='mask-s-logo fl'>" +
                "<div class='mask-s-mail fl'>" +
                "<p class='px14 col-59'>樂視裁員風(fēng)暴...</P>" +
                "<p class='px12 col-59 line-19'>08:33</p>" +
                "<p class='px12 col-59 line-19 col-94'>12.5M</p>" +
                "</div>" +
                "<div class='mask-s-r fl mar-15'>" +
                "<img src='img/mask-down.png' class='mask-s-img'>" +
                "<a href='javascript:;' class='mask-s-rt px12 col-94 line-33'>下載</a>" +
                "</div>" +
                "<div class='mask-s-r fl'>" +
                "<img src='img/mask-code.png' class='mask-s-img'>" +
                "<a href='javascript:;' class='mask-s-rt px12 col-94 line-33'>掃碼</a>" +
                "</div>" +
                "</div>", "", "", "分享/打賞");
        }
    }
});

Vue.component('mask', {
    template: '#mask',
    props: ['status'],
    data: function () {
        return {
            text: '選擇您要配音的文本文件',
            api: 'http://testoss.heardtech.com/demo.php',
            uploaded: false,
            fileName: '',
            docTitle: '',
            weburl: '',
            webBtnActive: false,
            url:''
        }
    },
    ready: function () {
    },
    watch:{
        "weburl":function() { //此處不要使用箭頭函數(shù)
            if (this.weburl) {
                this.webBtnActive = true;
            } else {
                this.webBtnActive = false;
            }
        }
    },
    methods: {
        analysisUrl: function () {
            var _this = this;
            if (_this.webBtnActive) {
                $.post(apiCollect.apiGetArticleContent, {
                    url: _this.weburl
                }, function(data) {
                    if (data.code == '000000') {
                        window.location.href = 'speeDdubbing.html?file=' + encodeURIComponent(encodeURIComponent(data.data.txt))
                            + '&title=' + encodeURIComponent(encodeURIComponent(data.data.title));
                    } else {
                        headtipObj.show(data.message);
                    }
                })
            }
        },
        activeWebBtn: function () {
            if (this.weburl) {
                this.webBtnActive = true;
            } else {
                this.webBtnActive = false;
            }
        },
        close: function () {
            this.$emit('close');
        },
        switchMask: function (status) {
            console.log('emit change', status);
            this.$emit('switch', status);
        },
        gotoEditor: function () {
            if (this.uploaded) {
                var url = './speeDdubbing.html?file=' + encodeURIComponent(encodeURIComponent(this.fileName)) +
                    "&title=" + encodeURIComponent(encodeURIComponent(this.docTitle));
                window.location.href = url;
            }
        },
        selectFile: function () {
            $('#upload-word').trigger('click');
        },
        upload: function (e) {
            // console.log(this.file)
            var _this = this;
            var file = e.target.files[0];
            // console.log(file)
            var timeStamp = new Date().getTime();
            var storeAs = timeStamp + '.docx';//這個用于請求獲取文章內(nèi)容的
            _this.fileName = storeAs;
            _this.docTitle = file.name.substring(0, file.name.lastIndexOf('.'));
            OSS.urllib.request(_this.api, { method: 'GET' }, function (err, response) {
                _this.text = '上傳中';
                if (err) {
                    return alert(err);
                }
                try {
                    result = JSON.parse(response);
                } catch (e) {
                    return alert('parse sts response info error: ' + e.message);
                }
                console.log(result)
         
回答
編輯回答
大濕胸

你應(yīng)該是用了模板字符串了吧?``,ie11好像不兼容
模板字符串兼容性

2017年8月15日 13:40