{
  template: '${tmpl}',
    data: function() {
      return {
        "cityList": ['北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区','北京·朝阳区',],
        "buyNum": 1,
        "grade": ['★', '★', '★', '★', '★'],
        "duration": '一年',
        "describe": ['产品详情', '产品价格'],
        "navIndex": 0,
        "gradeIndex": -1,
        "cityIndex":0,
        "durationFlag":true,
      }
    },
  mounted: function() {

  },
  created: function() {
    console.log(this);
  },
  methods: {
    changeFirst(index){
      this.cityIndex = index;
    },
    add(){
      this.buyNum++;
    },
    reduce(){
      this.buyNum--;
      this.buyNum = this.buyNum < 1 ? 1 : this.buyNum;
    },

    buyNow(){
      let commodity = {
        buyNum: this.buyNum,
        duration: this.duration
      }
    },
    joinShopCar(){
      let commodity = {
        buyNum: this.buyNum,
        duration: this.duration
      }
    },
    toggleNav(index){
      this.navIndex = index;
    },
    togglegrade(index){
      this.gradeIndex = index;
    },
    toggleDurationFlag(){
        this.durationFlag= !this.durationFlag
    }
  },
  vname: "gsb-icproductdetail"
}
