This commit is contained in:
@@ -140,10 +140,10 @@ const handleScanLogin = async () => {
|
|||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
try {
|
try {
|
||||||
// 检查是否在微信环境
|
// 检查是否在微信环境
|
||||||
if (!isInWechat()) {
|
// if (!isInWechat()) {
|
||||||
uni.showToast({ title: '请在微信中打开', icon: 'none' });
|
// uni.showToast({ title: '请在微信中打开', icon: 'none' });
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 调用扫一扫
|
// 调用扫一扫
|
||||||
const resultStr = await wxScan();
|
const resultStr = await wxScan();
|
||||||
@@ -172,10 +172,10 @@ const handleScanLogin = async () => {
|
|||||||
console.error('扫码错误:', err);
|
console.error('扫码错误:', err);
|
||||||
uni.showToast({ title: JSON.stringify(err), icon: 'none' });
|
uni.showToast({ title: JSON.stringify(err), icon: 'none' });
|
||||||
}
|
}
|
||||||
// #endif
|
// // #endif
|
||||||
// #ifndef H5
|
// // #ifndef H5
|
||||||
uni.showToast({ title: '请在微信中打开', icon: 'none' });
|
// uni.showToast({ title: '请在微信中打开', icon: 'none' });
|
||||||
// #endif
|
// // #endif
|
||||||
};
|
};
|
||||||
|
|
||||||
const getPathDeviceId = () => {
|
const getPathDeviceId = () => {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// utils/wxsdk.js —— 封装微信扫一扫 不用旧的了
|
// utils/wxsdk.js —— 封装微信扫一扫 不用旧的了
|
||||||
import { wechatApi } from '@/api/index.js'
|
import { wechatApi } from '@/api/index.js'
|
||||||
|
|
||||||
const wx = window.wx
|
const wx = window.jWeixin
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化微信 JS-SDK
|
* 初始化微信 JS-SDK
|
||||||
|
|||||||
Reference in New Issue
Block a user