diff --git a/pages/ai/paint/paint.vue b/pages/ai/paint/paint.vue index 77998e6..8f49323 100644 --- a/pages/ai/paint/paint.vue +++ b/pages/ai/paint/paint.vue @@ -324,6 +324,7 @@ uni.showModal({ title:'提示', content:'您还没有登录!点击确定跳转登录界面以体验服务', + showCancel: false, success(res) { if (res.confirm) { //跳转登录界面 diff --git a/pages/userInfo/goldNum/goldNum.vue b/pages/userInfo/goldNum/goldNum.vue index 34bc5f5..b6e4412 100644 --- a/pages/userInfo/goldNum/goldNum.vue +++ b/pages/userInfo/goldNum/goldNum.vue @@ -183,17 +183,12 @@ export default { appType: 0 } const res = await signGetGold(data); - console.log('签到结果===', res); + //console.log('签到结果===', res); if (res && res.data.code === 200) { - return uni.showToast({ + uni.showToast({ title: "签到成功!", icon: 'none' }); - }else { - uni.showModal({ - content: res.data.msg, - showCancel: false - }); } }, diff --git a/utils/request.js b/utils/request.js index e18af8d..8982f5c 100644 --- a/utils/request.js +++ b/utils/request.js @@ -152,6 +152,7 @@ service.interceptors.response.use(res => { uni.clearStorage(); uni.clearStorageSync(); uni.showModal({ + showCancel: false, title:'提示', content:'您还没有登录!点击确定跳转登录界面以体验服务', success(res) { @@ -170,14 +171,22 @@ service.interceptors.response.use(res => { }); }else if(res.data.code != 200){ //拦截响应,做统一处理 + if(res.data.code === 500){ + uni.showToast({ + title: '网络错误,请稍候重试~', + icon:"none", + duration: 2000, + success() { + console.log('接口响应错误,'+ res.data.msg) + } + }) + }else{ uni.showToast({ - title: '网络错误,请稍后再试~', + title: res.data.msg, icon:"none", - duration: 2000, - success() { - console.log('接口请求错误',res.data.msg) - } - }) + duration: 2000 + }) + } }else{ return res; }