//view js
export default{
  data(){
    return {
    };
  },
  mounted(){
    //onez.data(this,['items']);
  },
  methods:{
    buy(){
      onez.api(this,'bs.pay:pay',{
        subject:'购买'+this.pagedata.name,
        price:this.pagedata.price,
        proId:this.pagedata.id,
        nickname:this.pagedata.myname,
        sitetoken:'bs.app.shipments',
        goto:'/index/view.php?id='+this.pagedata.id,
        token:'product',
        type:'product'
      }).then((r)=>{
        if(r[0]){
        }else{
          onez.alert(r[1]);
          //this.$root.reload();
        }
      });
    }
  }
}