

{
        template: '${tmpl}',
                data: function() {
                        return {
                                popupVisible: false,
                                email: null,
                                phoneNum: null,
                                companyName: null,
                                tipsShow: false,
                                searchList: [],
                                diagnoseList: [
                                        {
                                                title: '商标价值评估',
                                                text: '公司知产与当前市场对比分析评估',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_201909041807456.png',
                                        },
                                        {
                                                title: '商标注册',
                                                text: '企业商标注册数据分析、检测评估',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_20190904180656.png',
                                        },
                                        {
                                                title: '商标增长',
                                                text: '企业6年商标增长数据情况趋势分析',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_201909041807451.png',
                                        },
                                        {
                                                title: '商标行业分布',
                                                text: '企业商标行业分布数据检测',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_201909041807452.png',
                                        },
                                        {
                                                title: '商标服务项分布、名称情况',
                                                text: '通过词云分析企业信息、行业领域等数据情况',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_201909041807453.png',
                                        },


                                ]
                        }
                },
        mounted: function() {
                console.log("this.$root.entcode-----------------------------");
                console.log(this.$root.entcode);
                console.log(this.$root.openid);
                /**先请求数据 */
                this.$root.hidemenu();
                $('.mobilereport input').on('blur', () => {
                        console.log(`111`);
                        window.scroll(0, 0);
                        /*
                        let top = document.documentElement.scrollTop;
                        */

                });
                $('.mobilereport input').on('focus', () => {
                        console.log(`vvv`);
                        window.scroll(0, 0);
                        /*
                        let top = document.documentElement.scrollTop;
                        */
                });
        },
        created: function() {

        },
        computed: {

        },
        methods: {
                sendMsg(){
                        var obj={ companyname: this.companyName, phonenum: this.phoneNum, email: this.email };
                        var entcode = this.$root.entcode;
                        var wxuser = this.$root.currentWxUser;
                        if(entcode){
                          obj["entcode"]=entcode;
                        }
                        if(wxuser && wxuser.id){
                          obj["wxuser_id"]=wxuser.id;
                        }
                        this.popupVisible = false;
                        let emailReg = /\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/;
                        let phoneReg = /(13|14|15|17|18|19)[0-9]{9}/;

                        if (emailReg.test(this.email)) {
                                if (this.email && this.companyName) {
                                        if (!phoneReg.test(this.phoneNum) && this.phoneNum != "") {

                                                this.$confirm('确定要继续发送吗?', '提示', {
                                                        confirmButtonText: '确定',
                                                        cancelButtonText: '取消',
                                                        type: 'warning'
                                                }).then(() => {
                                                        this.$root.getReq("/web/toolCtl/createMonitoringReportH5", obj).then(d => {
                                                                console.log("ddddddddd");
                                                                console.log(d);
                                                                if (d && d.code == 1) {
                                                                        this.$toast({
                                                                                message: '报告生成后将发至您的邮箱',
                                                                                duration: 3000
                                                                        });
                                                                        this.email = '';
                                                                        this.phoneNum = '';
                                                                } else {
                                                                        this.$toast({
                                                                                message: '操作失败',
                                                                                duration: 3000
                                                                        });
                                                                }

                                                        });
                                                }).catch((e) => {

                                                })

                                        } else {
                                                this.$root.getReq("/web/toolCtl/createMonitoringReportH5", obj).then(d => {
                                                        console.log("ddddddddd");
                                                        console.log(d);
                                                        if (d && d.code == 1) {
                                                                this.$toast({
                                                                        message: '报告生成后将发至您的邮箱',
                                                                        duration: 3000
                                                                });
                                                                this.email = '';
                                                                this.phoneNum = '';
                                                        } else {
                                                                this.$toast({
                                                                        message: '操作失败',
                                                                        duration: 3000
                                                                });
                                                        }

                                                });
                                        }



                                } else {
                                        this.$toast({
                                                message: '您有未填写的信息',
                                                duration: 3000
                                        });
                                }
                        } else {
                                this.$toast({
                                        message: '邮箱格式错误',
                                        duration: 3000
                                });
                        }


                },
                closePop(){
                        this.popupVisible = false;
                },
                popShow(){
                        this.popupVisible = true;
                },
                tips(){
                        if (this.companyName) {
                                this.tipsShow = true;
                        } else {
                                this.tipsShow = false;
                        }
                        this.$root.postReq("/web/toolCtl/getCompanyInfoByLikeName", { likestr: this.companyName }).then((res) => {
                                console.log(res);

                                this.searchList = res.data.slice(0, 5);
                                console.log(this.searchList, "////////////////////////");
                        });
                },
                companyModifiy(item){
                        this.tipsShow = false;
                        this.companyName = item.entName;
                }
        },
        vname: "gsb-mobilereport"
}
