{
    template:'${tmpl}',
    data:function(){
      var validateMobile = (rule, value, callback) =>{
        if(value==""){
          callback(new Error('请输入手机号码'));
        }else{
          var x=(/^1(3|4|5|7|8)\d{9}$/.test(value));
          if(!x){
            callback(new Error('手机号码格式有误'));
          }else{
            callback();
          }
        }
      };
      return {
        trademarkName:'',
        inputstr:"",
        loopplays:[
            {
                leftimg:'/imgs/autumn/banber.jpg' 
            }
        ],
        SpecialPerformance:[],
        tabNum:1,
        popupsDataList:[],
        pDataKey: 0,
        pTowDataKey: null,
        popupsData:[
            {
                itemTypeName:'（25类）服装鞋帽',
                smallList:[
                    {
                        serviceSmallClassTypeName:'（2501）衣物',
                        productList:[
                            {
                                name:'服装'
                            },{
                                name:'男装'
                            },{
                                name:'女装'
                            },{
                                name:'裤子'
                            },{
                                name:'衬衣'
                            },{
                                name:'童装'
                            },{
                                name:'内衣'
                            },{
                                name:'外套'
                            },{
                                name:'T恤'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（2507）鞋',
                        productList:[
                            {
                                name:'运动鞋'
                            },{
                                name:'凉鞋'
                            },{
                                name:'雨鞋'
                            },{
                                name:'运动靴'
                            },{
                                name:'鞋底'
                            },{
                                name:'鞋垫'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（2508）帽',
                        productList:[
                            {
                                name:'帽子'
                            },{
                                name:'头带'
                            },{
                                name:'儿童头盔'
                            },{
                                name:'风帽'
                            },{
                                name:'耳套'
                            },{
                                name:'大礼帽'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（2502）婴儿纺织用品',
                        productList:[
                            {
                                name:'婴儿裤'
                            },{
                                name:'婴儿睡袋'
                            },{
                                name:'婴儿全套衣（小孩用）'
                            },{
                                name:'婴儿纺织品尿布'
                            }
                        ]
                    }
                ]
            },
            {
                itemTypeName:'（03类）日化用品',
                smallList:[
                    {
                        serviceSmallClassTypeName:'（0301）肥皂，香皂及其他人用洗洁物品，洗衣用漂白剂',
                        productList:[
                            {
                                name:'洗衣用漂白剂'
                            },{
                                name:'香皂'
                            },{
                                name:'洗面奶'
                            },{
                                name:'沐浴露'
                            },{
                                name:'洗发液'
                            },{
                                name:'肥皂'
                            },{
                                name:'抑菌洗手剂'
                            },{
                                name:'洗衣用漂白剂'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（0302）清洁，去渍用制剂',
                        productList:[
                            {
                                name:'去污剂'
                            },{
                                name:'清洗用洗涤碱'
                            },{
                                name:'清洁制剂'
                            },{
                                name:'明矾石（收敛剂）'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（0305）香料，香油精',
                        productList:[
                            {
                                name:'香料'
                            },{
                                name:'花精（香料）'
                            },{
                                name:'香油精'
                            },{
                                name:'香木'
                            },{
                                name:'芳香剂（香精油）'
                            },{
                                name:'玫瑰油'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（0306）化妆品（不包括动物用化妆品）',
                        productList:[
                            {
                                name:'口红'
                            },{
                                name:'香水'
                            },{
                                name:'美容面膜'
                            },{
                                name:'染发剂'
                            },{
                                name:'假指甲'
                            },{
                                name:'防皱霜'
                            },{
                                name:'个人用除臭剂'
                            },
                        ]
                    }
                ]
            },
            {
                itemTypeName:'（30类）方便食品',
                smallList:[
                    {
                        serviceSmallClassTypeName:'（3001）咖啡，可可',
                        productList:[
                            {
                                name:'咖啡'
                            },{
                                name:'可可'
                            },{
                                name:'咖啡饮料'
                            },{
                                name:'巧克力饮料'
                            },{
                                name:'可可饮料'
                            },{
                                name:'巧克力酱'
                            },
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（3002）茶',
                        productList:[
                            {
                                name:'茶'
                            },{
                                name:'茶饮料'
                            },{
                                name:'用作茶叶代用品的花或叶'
                            },{
                                name:'冰茶'
                            },{
                                name:'甘菊茶饮料'
                            },
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（3006）面包糕点',
                        productList:[
                            {
                                name:'面包'
                            },{
                                name:'馅饼（点心）'
                            },{
                                name:'麻花'
                            },{
                                name:'燕麦食品'
                            },{
                                name:'甜食'
                            },{
                                name:'汉堡包'
                            },
                            {
                                name:'脆米饼'
                            },
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（3007）方便食品',
                        productList:[
                            {
                                name:'粥'
                            },{
                                name:'盒饭'
                            },{
                                name:'饺子'
                            },{
                                name:'馒头'
                            },{
                                name:'炒饭'
                            },{
                                name:'元宵'
                            },{
                                name:'粽子'
                            },
                        ]
                    }
                ]
            },
            {
                itemTypeName:'（29类）食品',
                smallList:[
                    {
                        serviceSmallClassTypeName:'（2901）肉，非活的家禽，野味，肉汁',
                        productList:[
                            {
                                name:'家禽（非活）'
                            },{
                                name:'肉'
                            },{
                                name:'猪肉'
                            },{
                                name:'火腿'
                            },{
                                name:'可食用昆虫（非活）'
                            },{
                                name:'冻田鸡腿'
                            },{
                                name:'熏肉'
                            },{
                                name:'人食用蚕蛹'
                            },
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（2902）非活水产品',
                        productList:[
                            {
                                name:'鱼（非活）'
                            },{
                                name:'虾（非活）'
                            },{
                                name:'鱼制食品'
                            },{
                                name:'牡蛎（非活）'
                            },{
                                name:'贝壳类动物（非活）'
                            },{
                                name:'鱼肉干'
                            },{
                                name:'鱼子酱'
                            },{
                                name:'腌制鱼'
                            },
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（2903）罐头食品（软包装食品不包括在内，随原料制成品归组）',
                        productList:[
                            {
                                name:'肉罐头'
                            },{
                                name:'水果罐头'
                            },{
                                name:'蔬菜罐头'
                            },{
                                name:'鱼罐头'
                            },{
                                name:'水产罐头'
                            },{
                                name:'鹌鹑蛋罐头'
                            },
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'(2905)腌制、干制蔬菜',
                        productList:[
                            {
                                name:'腌制蔬菜'
                            },{
                                name:'榨菜'
                            },{
                                name:'番茄酱'
                            },{
                                name:'咸菜'
                            },{
                                name:'速冻菜'
                            },{
                                name:'蔬菜汤料'
                            },{
                                name:'制汤剂'
                            },{
                                name:'汤'
                            },
                        ]
                    }
                ]
            },
            {
                itemTypeName:'（09类）科学仪器',
                smallList:[
                    {
                        serviceSmallClassTypeName:'（0901）电子计算机及其外部设备',
                        productList:[
                            {
                                name:'可下载的计算机程序'
                            },{
                                name:'智能手表（数据处理）'
                            },{
                                name:'计算机软件（已录制）'
                            },{
                                name:'已录制的计算机游戏软件'
                            },{
                                name:'具有人工智能的人形机器人'
                            },{
                                name:'平板电脑'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（0907）通信导航设备',
                        productList:[
                            {
                                name:'智能手机'
                            },{
                                name:'导航仪器'
                            },{
                                name:'光通信设备'
                            },{
                                name:'无线电设备'
                            },{
                                name:'穿戴式行动追踪器'
                            },{
                                name:'手机屏幕专用保护膜'
                            },{
                                name:'智能手机用壳'
                            },
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（0910）测量仪器仪表，实验室用器具，电测量仪器，科学仪器',
                        productList:[
                            {
                                name:'感应器（电）'
                            },{
                                name:'计量用玻璃器皿'
                            },{
                                name:'气量计（计量仪器）'
                            },{
                                name:'平衡仪器'
                            },{
                                name:'化学仪器和器具'
                            },{
                                name:'计量仪表'
                            },{
                                name:'教学仪器'
                            },{
                                name:'比重计'
                            },
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（0911）光学仪器',
                        productList:[
                            {
                                name:'目镜'
                            },{
                                name:'镜（光学）'
                            },{
                                name:'显微镜'
                            },{
                                name:'望远镜'
                            },{
                                name:'放大镜（光学）'
                            },{
                                name:'物镜（光学）'
                            },{
                                name:'光学玻璃'
                            }
                        ]
                    }
                ]
            },
            {
                itemTypeName:'（36类）金融物管',
                smallList:[
                    {
                        serviceSmallClassTypeName:'（3601）保险',
                        productList:[
                            {
                                name:'保险信息'
                            },{
                                name:'保险承保'
                            },{
                                name:'火灾保险承保'
                            },{
                                name:'事故保险承保'
                            },{
                                name:'健康保险承保'
                            },{
                                name:'保险咨询'
                            },{
                                name:'人寿保险承保'
                            },{
                                name:'保险经纪'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（3602）金融事务',
                        productList:[
                            {
                                name:'融资服务'
                            },{
                                name:'抵押贷款'
                            },{
                                name:'金融贷款'
                            },{
                                name:'电子转账'
                            },{
                                name:'基金投资'
                            },{
                                name:'金融管理'
                            },{
                                name:'发行信用卡'
                            },{
                                name:'公积金服务'
                            },{
                                name:'贸易清算（金融）'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（3603）珍品估价',
                        productList:[
                            {
                                name:'艺术品估价'
                            },{
                                name:'钱币估价'
                            },{
                                name:'首饰估价'
                            },{
                                name:'古玩估价'
                            },{
                                name:'珠宝估价'
                            },{
                                name:'邮票估价'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（3604）不动产事务',
                        productList:[
                            {
                                name:'不动产代理'
                            },{
                                name:'公寓管理'
                            },{
                                name:'不动产管理'
                            },{
                                name:'不动产经纪'
                            },{
                                name:'住所代理（公寓）'
                            },{
                                name:'商品房销售'
                            },{
                                name:'公寓出租'
                            }
                        ]
                    }
                ]
            },
            {
                itemTypeName:'（35类）广告营销',
                smallList:[
                    {
                        serviceSmallClassTypeName:'（3501）广告',
                        productList:[
                            {
                                name:'广告'
                            },{
                                name:'广告代理'
                            },{
                                name:'计算机网络上的在线广告'
                            },{
                                name:'广告设计'
                            },{
                                name:'为零售目的在通信媒体上展示商品'
                            },{
                                name:'广告宣传'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（3502）工商管理辅助业',
                        productList:[
                            {
                                name:'商业信息'
                            },{
                                name:'饭店商业管理'
                            },{
                                name:'通过网站提供商业信息'
                            },{
                                name:'市场分析'
                            },{
                                name:'商业中介服务'
                            },{
                                name:'商业评估'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（3503）替他人推销',
                        productList:[
                            {
                                name:'替他人推销'
                            },{
                                name:'为商品和服务的买卖双方提供在线市场'
                            },{
                                name:'替他人采购（替其他企业购买商品或服务）'
                            },{
                                name:'市场营销'
                            },{
                                name:'拍卖'
                            },{
                                name:'电话市场营销'
                            }
                        ]
                    },
                    {
                        serviceSmallClassTypeName:'（3507）财会',
                        productList:[
                            {
                                name:'会计'
                            },{
                                name:'商业审计'
                            },{
                                name:'财务审计'
                            },{
                                name:'税务申报服务'
                            },{
                                name:'税款准备'
                            },{
                                name:'绘制账单、账目报表'
                            },{
                                name:'拟备工资单'
                            },{
                                name:'簿记'
                            },
                        ]
                    }
                ]
            },
            {
              itemTypeName:'全部类别',
            }
        ],
        tms:[],
        tms1:[],
        tms2:[],
        tms3:[],
        tms4:[],
        ncldata:[
          {},{code:"01",name:"化学原料",type:1},{code:"02",name:"颜料油漆",type:1},{code:"03",name:"日化用品",type:1},{code:"04",name:"燃料油脂",type:1},{code:"05",name:"医药",type:1},
          {code:"06",name:"金属材料",type:1},{code:"07",name:"机械设备",type:1},{code:"08",name:"手工器械",type:1},{code:"09",name:"科学仪器",type:1},{code:"10",name:"医疗器械",type:1},
          {code:"11",name:"灯具空调",type:1},{code:"12",name:"运输工具",type:1},{code:"13",name:"军火烟火",type:1},{code:"14",name:"珠宝钟表",type:1},{code:"15",name:"乐器",type:1},
          {code:"16",name:"办公用品",type:1},{code:"17",name:"橡胶制品",type:1},{code:"18",name:"皮革皮具",type:1},{code:"19",name:"建筑材料",type:1},{code:"20",name:"家具",type:1},
          {code:"21",name:"厨房洁具",type:1},{code:"22",name:"绳网袋篷",type:1},{code:"23",name:"纱线丝",type:1},{code:"24",name:"布料床单",type:1},{code:"25",name:"服装鞋帽",type:1},
          {code:"26",name:"纽扣拉链",type:1},{code:"27",name:"地毯席垫",type:1},{code:"28",name:"健身器材",type:1},{code:"29",name:"食品",type:1},{code:"30",name:"方便食品",type:1},
          {code:"31",name:"饲料种籽",type:1},{code:"32",name:"啤酒饮料",type:1},{code:"33",name:"酒",type:1},{code:"34",name:"烟草烟具",type:1},{code:"35",name:"广告销售",type:1},
          {code:"36",name:"金融物管",type:1},{code:"37",name:"建筑修理",type:1},{code:"38",name:"通讯服务",type:1},{code:"39",name:"运输贮藏",type:1},{code:"40",name:"材料加工",type:1},
          {code:"41",name:"教育娱乐",type:1},{code:"42",name:"网站服务",type:1},{code:"43",name:"餐饮住宿",type:1},{code:"44",name:"医疗园艺",type:1},{code:"45",name:"社会服务",type:1}
        ],
      }
    },
    mounted:function(){
      var self=this;
      /*self.$root.postReq("/web/loopplayCtl/findAll",{}).then(function(d){
          if(d.status==0){
              self.loopplays=d.data;
              if(d.data.length==0){
                self.loopplays.push({"leftimg":"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_202215516795147422019414514742leftimg.png"});
              }
          }else{

          }
      });*/
      var f=function(){
        var own=self;
        var t=setTimeout(()=>{
        if(own.$root.currentCompany){
            own.getHotTm();
            own.getRecommendedTm();
            own.getSpecialofferTm();
            own.getHighqualityTm();
            own.getSpecialPerformance();
            clearTimeout(t);
        }else{
            f();
        }
        },1000);
      };
      f();

      
    },
    created:function(){
  
    },
    methods:{
        getSpecialPerformance(){
            if(this.$root.currentCompany){
                var company_id = this.$root.currentCompany.id;
                var obj={limit:4,company_id:company_id,siteTheme:'autumn'};
                this.$root.getReq("/web/transactionspecialperformanceCtl/getSpecialPerformanceBySiteTheme", obj).then(d=>{
                    console.log(d,'fffffffffffffffffffffffffff');
                    this.SpecialPerformance = d.data;
                })
            }
        },
      getSpecialofferTm(){
        if(this.$root.currentCompany){
          var company_id = this.$root.currentCompany.id;
          var obj={type:"specialoffer",company_id:company_id};
          this.$root.getReq("/web/trademarktransactionCtl/findByTmType", obj).then(d=>{
            
            if(d && d.code==1){
              this.tms3=d.data;
            }
          })
        }
      },
      getHighqualityTm(){
        if(this.$root.currentCompany){
          var company_id = this.$root.currentCompany.id;
          var obj={type:"highquality",company_id:company_id};
          this.$root.getReq("/web/trademarktransactionCtl/findByTmType", obj).then(d=>{
            if(d && d.code==1){
              this.tms4=d.data;
            }
          })
        }
      },
      getHotTm(){
        if(this.$root.currentCompany){
          var company_id = this.$root.currentCompany.id;
          var obj={type:"hot",company_id:company_id};
          this.$root.getReq("/web/trademarktransactionCtl/findByTmType", obj).then(d=> {
            if(d && d.code==1){
              this.tms1=d.data;
              this.tms=this.tms1;
            }
          })
        }
      },
      getRecommendedTm(){
        if(this.$root.currentCompany){
          var company_id = this.$root.currentCompany.id;
          var obj={type:"recommended",company_id:company_id};
          this.$root.getReq("/web/trademarktransactionCtl/findByTmType", obj).then(d=>{
            if(d && d.code==1){
              this.tms2=d.data;
            }
          })
        }
      },
      onfocus:function(name){
        if (typeof name == 'string') {
          this.inputstr = name;
        }
        if(this.inputstr==""){
          this.$message({
              type: 'error',
              message: '请填写搜索内容'
            });
        }else{
          this.$root.pushx({
            title:"商标交易市场",
            name:"/tmtransactionmarket",
            params:{tminput:this.inputstr}
          });
        }
      },
      autunmnTabs(num) {
        this.tabNum = num;
        if(num==1){
          this.tms = this.tms1
        }else if(num==2){
          this.tms = this.tms2
        }
        else if(num==3){
          this.tms = this.tms3
        }
        else if(num==4){
          this.tms = this.tms4
        }
      },
      popupsList (list,key) {
        this.trademarkName = list.itemTypeName;
        if (key == 7) {
          return;
        }
        this.popupsDataList = list.smallList;
        this.pDataKey = key;
        this.pTowDataKey = key;
      },
      popupsLeave() {
        this.pTowDataKey = null;
      },
      findAllServicesitemA(){
          this.company_id=this.$root.currentCompany.id;
          var params={company_id:this.$root.currentCompany.id};
          var that=this;
          this.$root.postReq("/web/serviceitemCtl/getAllProducts", params).then(function(d) {
          that.popupsData = [];
          if(d.status==0&&d.data){
              d.data.forEach(r=>{
                if(r){
                    that.popupsData.push(r);
                }
                that.popupsDataList = that.popupsData[0].smallList;
              });
              that.$root.popupsData=that.popupsData;
              that.$root.popupsDataList=  that.popupsDataList ;
          }
          })
      },
      goServiceDetails(){
        localStorage.setItem("trademarkName",this.trademarkName);
        this.$root.windowOpen({
          url:window.location.href.split("#")[0]+"#/tmtransactionmarket",
          title:"商标交易市场",
          params:[
            {}
          ]
        })
      },
      navJump(item,key) {
        /*var col = '';
        if (key == 0) {
            col = '#1d7cfa'
        }else if (key == 1) {
            col = '#fae0af'
        }else if (key == 2) {
            col = '#fcf3ed'
        }else if (key == 3) {
            col = '#ffe0d1'
        };*/
        console.log(item);
        this.$root.pushx({
          title:"商标交易市场",
          name:"/tmtransactionmarket",
          params:{trademarkCode:item.ncl_one_codes,trademarkImg:item.banner_img,trademarkColor:item.backgroundColor,trademarkTextColor:item.fontColor}
        });
      },
      toDetail(sbzch,gjfl){
        if(sbzch && gjfl){
          this.$root.windowOpen({
            url:window.location.href.split("#")[0]+"#/tmtransactiondetail",
            title:"商标详情",
            params:[
              {name:"sbzch",value: sbzch},
              {name:"gjfl",value: gjfl}
            ]
          })
        }
      },
    },
    computed:{
    },
    vname:"gsb-moreservice"
}
