{
  template: '${tmpl}',
    data: function() {
      return {
        selected: "1",
        count: 1,
        data: "",
        countPrice: '',
        loading: false,
        imgUrlButtom:"",
        imgUrlTop:"",
      }
    },
  mounted: function() {
    if (this.$route.query.data) {
      let data = JSON.parse(this.$route.query.data);
      this.data = data;
      this.countPrice = data.price;
      console.log(this.data);
      if(data.mobileContentImg7){
        this.imgUrlTop = data.mobileContentImg7;
      }else{
        this.imgUrlTop = data.mobilePic;
      }
      if(data.mobileContentImg8){
        this.imgUrlButtom = data.mobileContentImg8;
      }else{
        this.imgUrlButtom = data.mobileContentImg;
      }

    }

  },
  created: function() {

  },
  watch: {
    count(n, o){
      console.log(n, o);
      if (n < 0) {
        this.count = 0;
      };
      this.countPrice = n * this.data.price;
    }
  },
  methods: {
    countUp(){
      this.count++;
    },
    countDown(){
      this.count--;
    },
    goCompanyDetail(index, item){
      this.$router.push({ path: "/mobilenewaddress", })
    },
    goSubmitDemand(){
      let servicecode = this.data.code;
      let count = this.count;
      this.$router.push({ path: "/mobilesubmitdemand", query: { servicecode } });
    }
    /*
    getLoginUser : function (){
      var self =this;
      this.$root.postReq("/web/userCtl/loginUser",{}).then(function(d){
        if(d.status==0){
          self.loginUser = d.data;
        }
      });
    }
    */
  },
  vname: "gsb-mobileserverdetail"
}
