diff --git a/App.vue b/App.vue
index 3863a4e..4a5b4b5 100644
--- a/App.vue
+++ b/App.vue
@@ -31,7 +31,15 @@ export default {
"Content-Type": "application/x-www-form-urlencoded", // 关键配置
},
});
-
+ if (res.data.status == 400) {
+ // 1. 显示无按钮的 Toast(无法关闭)
+ uni.showToast({
+ title: res.data.message,
+ icon: 'none',
+ duration: 9999999, // 极长时间,相当于不自动关闭
+ mask: true, // 透明遮罩层,阻止触摸
+ });
+ }
if (res.statusCode == 200) {
// 存储用户信息到本地缓存(uni-app接口)
uni.setStorageSync("userInfo", res.data);
diff --git a/pages/deviceBind/index.vue b/pages/deviceBind/index.vue
index c77bd54..cd0b4c2 100644
--- a/pages/deviceBind/index.vue
+++ b/pages/deviceBind/index.vue
@@ -94,6 +94,12 @@ export default {
if (res.result) {
// 扫码成功,获取到设备ID或编码
this.deviceCode = res.result;
+ // 友好提示
+ uni.showToast({
+ title: '扫码成功,正在绑定设备...',
+ icon: 'success',
+ duration: 1500
+ });
// 调用绑定接口
this.bindDevice();
}
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 7c37d7c..1967f5f 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -90,12 +90,9 @@ export default {
// },
],
userInfo: {},
- avatarUrl: BASE_IMG_URL + "/file/image/",
+ avatarUrl: BASE_IMG_URL ,
user: BASE_IMG_URL + "/minePage/user.png", //用户默认图标
};
- },
- computed: {
-
},
onLoad () {
const systemInfo = wx.getSystemInfoSync();
diff --git a/pages/mine/update.vue b/pages/mine/update.vue
index c6c0612..7b97713 100644
--- a/pages/mine/update.vue
+++ b/pages/mine/update.vue
@@ -24,7 +24,7 @@
昵称
-
+
@@ -44,10 +44,10 @@ export default {
return {
back: BASE_IMG_URL + "/minePage/back.png", //返回图标
user: BASE_IMG_URL + "/minePage/user.png", //用户默认图标
- avatarUrl: BASE_IMG_URL + "/file/image/",
+ avatarUrl: BASE_IMG_URL,
statusBarHeight: 0,
userInfo: {
- nikename: "",
+ nickname: "",
avatar: "",
phone: ""
}
@@ -70,7 +70,7 @@ export default {
getUserInfoFromCache() {
const userInfo = uni.getStorageSync("userInfo");
if (userInfo) {
- this.userInfo.nikename = userInfo.nikeName;
+ this.userInfo.nickname = userInfo.nikeName;
this.userInfo.avatar = userInfo.avatar;
}
},
@@ -106,7 +106,7 @@ export default {
});
},
async saveProfile() {
- if (!this.userInfo.nikename.trim()) {
+ if (!this.userInfo.nickname.trim()) {
uni.showToast({
title: '昵称不能为空',
icon: 'none'