鍍金池/ 問答/網(wǎng)絡(luò)安全  HTML/ vue用mock+rap模擬數(shù)據(jù),請求參數(shù)怎么寫?

vue用mock+rap模擬數(shù)據(jù),請求參數(shù)怎么寫?

1、這個(gè)是模擬的數(shù)據(jù)
圖片描述

2、圖片描述

問題是: 應(yīng)該只請求年級是2017的數(shù)據(jù),可是返回的是所有的數(shù)據(jù),請求參數(shù)那邊怎么寫?
注:`this.$http.get('http://rap2api.taobao.org/app...', { params: {

                'grade': '2017',

// major: this.newstu.major,

                'name': this.newstu.name,
                'idcard': this.newstu.idcard
            }}`

'grade' 是模擬數(shù)據(jù)界面的參數(shù)字段
this.newstu.name 是在vue的data里面定義的newstu對象

回答
編輯回答
枕邊人

解決了嗎?

2017年1月17日 21:41