gistfile1.txt // getlet url = this.initGetUrl(host, this.url) this.$http.get(url, { params: { hb_key: this.hb_key } }).then((response) = { // Lambda写法 response = response.data; if (response.code == 10000){ this.jiaoyier = response.data.
// get let url = this.initGetUrl(host, this.url) this.$http.get(url, { params: { hb_key: this.hb_key } }).then((response) => { // Lambda写法 response = response.data; if (response.code == 10000){ this.jiaoyier = response.data.zu_money this.forRmb = response.data.total_shouyu this.allyonghu = response.data.number } }); // 方法二 let url = this.getNewListUrl +'?event_key='+this.event_key this.$http.get(url).then((response) => { response = response.data; console.log(response) if (response.code == 10000){ this.dataShuj = response.data.rank_list // 滚动ios兼容性 let rillWidth = $(".rolling_list li").eq(0).width()*$(".rolling_list li").length+($(".rolling_list li").length-1)*50 $(".rolling_list").css('width', rillWidth + 'px'); } // post import qs from 'qs'; var params2 = { tel: this.telVal, event_key: this.event_key, money: this.money, hb_type: hb_type } this.$http.post(this.addItemsUrl, qs.stringify(params2)).then((response) => { response = response.data; // console.log(response) if(response.code = 10000) { window.location.href = './success.html?telVal='+this.telVal+'&money='+ this.money } })