短振动,可用于picker组件
uni.vibrateShort({
complete() {
//振动后逻辑
}
})
指纹识别
toSearch() {
uni.startSoterAuthentication({
//facial人脸识别,fingerPrint指纹识别
requestAuthModes: ['fingerPrint'],
challenge: '123456',
authContent: '请用指纹',
success(res) {
console.log("识别成功", res)
},
fail(res) {
console.log("识别失败", res)
}
})
},
客服
企业微信客服
uni.openCustomerServiceChat({
extInfo: {
//客服链接
url: config.url
},
//企业微信id
corpId: config.corpId,
success(res) {},
fail(res) {
console.log(res)
},
})
配置,参考网址https://work.weixin.qq.com/nl/act/p/a733314375294bdd
确认收货组件
openOrderConfirmView(items) {
const that = this
//拉起确认收货组件
if (wx.openBusinessView) {
wx.openBusinessView({
businessType: 'weappOrderConfirm',
extraData: {
transaction_id: items.channelOrderNo
},
success(e) {
if (e.extraData.status === 'success') {
// 用户确认收货成功,再执行自己的代码
that.receive()
} else if (e.extraData.status === 'fail') {
// 用户确认收货失败
uni.showToast({
title: "确认收货失败!",
icon: "none",
duration: 3000
});
}
},
fail(err) {
uni.showToast({
title: "确认收货失败!",
icon: "none",
duration: 3000
});
console.log(err);
},
complete() {}
});
} else {
//引导用户升级微信版本
uni.showToast({
title: "请升级微信版本",
duration: 3000,
icon: "none",
});
}
}
获取当前账号信息,如appId,version,插件信息等
uni.getAccountInfoSync().miniProgram.appId