1 <!--从后台衔接数据-->
2 <!--拿取后台id 值-->
3 /**
4 **
5 页面传输传递参数
6 url:"xxx?userId="+userid +"&username="+username
7
8 **
9
10
11 */
12 data{
13 userId:"",
14 headlist:'',
15
16 }
17 onload(options){
18 let userId= options.userId
19 this,setData({
20 userId:userId
21 })
22 //从后台拿取接口 ----addDirectionInviteByPhone 这个是后台接口,根据后台而定
23 postRequest(addDirectionInviteByPhone,{
24 //需要的参数
25 userId:userId,
26 },res=>{
27 //成功过后
28 if(res.data.success){
29 const listData = res.data.data //获取后台数据
30 this.setData({
31
32 headlist:data
33
34 })
35
36
37 }
38 })
39
40
41 }