|
@@ -36,15 +36,19 @@ export default defineComponent({
|
|
|
timestamp: res.data.data.timestamp as number, // 必填,生成签名的时间戳
|
|
|
nonceStr: res.data.data.nonceStr as string, // 必填,生成签名的随机串
|
|
|
signature: res.data.data.signature as string, // 必填,签名
|
|
|
- jsApiList: ["previewImage"], // 必填,需要使用的JS接口列表
|
|
|
- openTagList: ["wx-open-launch-weapp"], // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
|
|
|
+ jsApiList: ["previewImage", "scanQRCode"], // 必填,需要使用的JS接口列表
|
|
|
+ openTagList: [], // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
|
|
|
});
|
|
|
- // wx.ready(()=>{
|
|
|
- // weappHtml.value = '成功';
|
|
|
- // })
|
|
|
+
|
|
|
wx.error(({ errMsg }) => {
|
|
|
-
|
|
|
weappHtml.value = errMsg;
|
|
|
+ wx.ready(() => {
|
|
|
+ wx.scanQRCode({
|
|
|
+ needResult: 1,
|
|
|
+ scanType: ["qrCode", "barCode"],
|
|
|
+ success(res) {},
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
});
|
|
|
|