my.opencarddetail(object object)
小程序开发者工具: 不支持。请使用真机调试。
主体: 企业支付宝小程序
打开支付宝卡包里指定的会员卡详情。
关于支付宝商家会员卡的更多信息,可查看商家会员卡产品介绍。
object object
查看示例
属性 | 类型 | 默认值 | 必填 | 描述 |
---|---|---|---|---|
passid | string | - | 是 | 卡实例 id。
|
success | function | - | 否 | 调用成功的回调函数 |
fail | function | - | 否 | 调用失败的回调函数 |
complete | function | - | 否 | 调用结束的回调函数(调用成功、失败都会执行) |
传参正确示例
传参为空示例
传参非空无效示例
my.opencarddetail({
passid: '11xxxxx', // 实际开发中请使用有效的 passid 值。
success: (res) => {
console.log(res);
},
fail: (err) => {
console.log(err);
},
});
参数正确的示例图
默认标题0

my.opencarddetail({
passid: '',
success: (res) => {
console.log(res);
},
fail: (err) => {
console.log(err);
},
});
参数正确的示例图
默认标题0

my.opencarddetail({
passid: '6666666666666',
success: (res) => {
console.log(res);
},
fail: (err) => {
console.log(err);
},
});
传参非空无效示例
默认标题0

-
tip当 passid 传错或传空时,该 api 不会报错,会跳转到其他页面,详情请看示例代码中的两种异常情况。使用时,请确保传入正确的 passid 值。