收藏
回答

新手不会啊,获取会员开卡插件参数?

 card:function(){
   wx.request({
     url'https://api.weixin.qq.com/card/membercard/activate/geturl?access_token= ACCESS_TOKEN',
     method:"POST",
     access_token:"38_ZrEhrg8d0jciiol_XeIKx1Qp2uuAL9EVUOsWFTAtdAQquo0vaBh2tR0AQIPT56l4BbefIlC8qNwx1W4_wU9IHrY4jY9XQhI9f-_A-eCjtpj0odDmOM-jCGyC1JmMu84LsoGSSlIHXemhnozPJGJcAAAMJM",
     card_id:"pxn4S6MWtwgxIihmLdpY_6TZimsE",
     success(res){
         console.log(res)
     },
     fail(err){
         console.log(err)
     }
     
   })
 }

 这样写对不对啊

回答关注问题邀请回答
收藏

1 个回答

  • 青团社
    青团社
    11-05
     card(){
    let token = '38_ZrEhrg8d0jciiol_XeIKx1Qp2uuAL9EVUOsWFTAtdAQquo0vaBh2tR0AQIPT56l4BbefIlC8qNwx1W4_wU9IHrY4jY9XQhI9f-_A-eCjtpj0odDmOM-jCGyC1JmMu84LsoGSSlIHXemhnozPJGJcAAAMJM'
       wx.request({
         url`https://api.weixin.qq.com/card/membercard/activate/geturl?access_token=${token}`,
         method:"POST",
         data: {
           card_id: "pxn4S6MWtwgxIihmLdpY_6TZimsE",
           outer_str: '123'
         },
         success: (res)=> {
             console.log(res)
         },
         fail: (err)=> {
             console.log(err)
         }
         
       })
     }
    
    11-05
    有用 1
    回复 2
登录 后发表内容
问题标签