@@ -38,7 +38,26 @@ export default {
return;
}
- this.getWxLoginCode();
+ // 添加确认对话框
+ uni.showModal({
+ title: '微信登录',
+ content: '是否使用微信账号登录?',
+ confirmText: '确认登录',
+ cancelText: '取消',
+ success: (res) => {
+ if (res.confirm) {
+ // 用户点击确认,继续登录流程
+ this.getWxLoginCode();
+ } else {
+ // 用户点击取消,不执行登录
+ console.log('用户取消了登录');
+ uni.showToast({
+ title: '已取消登录',
+ icon: 'none'
+ });
+ }
},
getWxLoginCode() {
@@ -21,7 +21,23 @@ const _sfc_main = {
});
+ common_vendor.index.showModal({
+ title: "微信登录",
+ content: "是否使用微信账号登录?",
+ confirmText: "确认登录",
+ cancelText: "取消",
+ console.log("用户取消了登录");
+ common_vendor.index.showToast({
+ title: "已取消登录",
+ icon: "none"
common_vendor.index.showLoading({ title: "登录中..." });
@@ -8,7 +8,7 @@
"urlCheck": false,
"es6": true,
"postcss": false,
- "minified": false,
+ "minified": true,
"newFeature": true,
"bigPackageSizeSupport": true,
"babelSetting": {