{
    template:'${tmpl}',
    data(){
        return {
          showMain:true,
          orderNum:"1111",
          from:"111",
          name:"111",
          data:[],
          activeName:"",
        }
    },

    mounted:function(){
       this.activeName="我要";
    },
    methods:{
      handleClick:function(tab, event){
        console.log(this.activeName);
      },
      toMyTmList(){
        this.$router.push({path:"/products/mobiletmlist2",query:{from:"mobile"}});
      },
      toMyOrderList(){
          this.$router.push({path:"/products/mobileorderlist2",query:{from:"mobile"}});
      },
      toTmSearch(){
        this.$router.push({path:"/products/mobiletmsearch2",query:{from:"mobile"}});
      },
      toMyChanceList(){
          this.$router.push({path:"/products/mobilechancelist2",query:{from:"mobile"}});
      },
      publishChance(type){
        this.$prompt('请输入联系电话,5分钟内服务专员会联系您', '提示', {
          inputPattern: /^1(3|4|5|7|8)\d{9}$/,
          inputErrorMessage: '联系电话格式不正确',
          confirmButtonText: '确定',
          cancelButtonText: '取消',
        }).then(({ value }) => {
          if(value!=null && value!=""){
            this.$root.getReq("/web/businesschanceCtl/publishChance",{"type":type,"mobile":value}).then(d=>{
              console.log(d);
              if(d.code=="1"){
                this.$message({
                  type: 'success',
                  message: '需求发布成功,请在\'需求列表\'中查看'
                });
              }else if(d.code=="2"){
                this.$message.warning(`该类型需求已经发布过，请在\'需求列表\'中进行查看`);
              }
            }).catch(e=>{
              console.log(e);
              this.$message.warning(`需求发布失败`);
            });
          }else{
            this.$message({
              type: 'info',
              message: '联系方式不能为空'
            });
          }
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '取消输入'
          });
        });

      },
    },

    vname:"gsb-mobilemy"
}
