uni-app打包apk(真机测试没问题,打包apk后部分功能没反应)

不勾选权限没有反应的代码
let _this = this; uni.showModal({ title: '提示', content: '是否退出登录', confirmText: "确定", // 确认按钮文字 cancelText:"取消", confirmColor: '#1295c9', cancelColor: '#7f7f7f', success: function(res) { if (res.confirm) { uni.request({ url: _this.$serverUrl, data: { request_type: 'USER_LOGOUT', app_id: _this.userInfo.app_id, }, method: 'POST', success: (res) => { if (res.data.code == 200) { _this.logout(res); uni.redirectTo({ url: "../login/login" }) }else{ uni.showToast({ title:'退出失败,请稍后再试', icon:"error" }) } }, fail: (res) => { uni.showToast({ title:'退出失败', icon:"error" }) } }) } else if (res.cancel) { uni.showToast({ title:"取消退出", icon:"none" }) } }, fail: (res) => { uni.showToast({ title:JSON.stringify(res), icon:"none" }) } });
点击修改密码,表单验证也无效果
updatePwd() { let _this = this; if(!_this.form.old_pwd || _this.form.new_pwd){ uni.showToast({ title:"表单信息不能为空", icon:"error" }); }else{ let _data = { phone: _this.phone, request_type: 'USER_CHANGE_PASSWORD', app_id: _this.app_id, old_password: this.form.old_pwd, password: this.form.new_pwd }; uni.showModal({ title: '提示', content: '确认修改密码吗?', confirmText: "确定", // 确认按钮文字 cancelText:"取消", confirmColor: '#1295c9', cancelColor: '#7f7f7f', success: function(res) { if (res.confirm) { uni.request({ url: _this.$serverUrl, data: _data, method: 'POST', success: (res) => { if (res.data.code == 200) { uni.redirectTo({ url: "../login/login" }) }else{ uni.showToast({ title:"密码修改失败,稍后重试", icon:"none" }); } }, fail: (res) => { uni.showToast({ title:JSON.stringify(res), icon:"none" }) } }) } else if (res.cancel) { uni.uni.showToast({ title: '取消修改', icon:"none" }); } }, }); } }
本文来自博客园,作者:小虾米吖~,转载请注明原文链接:https://www.cnblogs.com/LindaBlog/p/16594973.html
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【.NET】调用本地 Deepseek 模型
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
2020-08-17 uni-app 循环列表项跳转指定外链解决方案<web-view>标签
2020-08-17 jq插件 jsencrypt.min.js加密密钥和私钥(二次封装)