From 090b7cc7538e467277fa7b96a7bd783127799011 Mon Sep 17 00:00:00 2001 From: Gdpao <1341331954@qq.com> Date: Thu, 6 Aug 2020 20:42:03 +0800 Subject: [PATCH] gdpaoup --- common/http.interceptor.js | 26 +++++++-- common/store/index.js | 3 +- components/index/daren-item/index.vue | 2 +- components/informations/notice/notice.vue | 31 +++++----- components/shop/group/index.vue | 4 +- components/shop/group/item.vue | 5 +- components/shop/list/index.vue | 3 +- components/shop/recommend/pintuan.vue | 3 +- components/shop/seckill/index.vue | 2 +- components/umaskes/umaskes.vue | 1 - pageB/components/details/userinfo.vue | 38 +++++++++++- pageB/components/userinfo/index.vue | 6 +- pageB/photo/index.vue | 15 +++-- pageB/sdetails/index.vue | 15 ++++- pageD/activity/activity.vue | 71 +++++++++++------------ pageD/attention/attention.vue | 44 ++------------ pageD/logistics/logistics.vue | 49 ++++------------ pageD/notice/notice.vue | 8 +-- pageE/mine/ImageTextCollection.vue | 17 +++--- pages/index/index.vue | 43 +++++++++----- pages/mine/index.vue | 4 -- pages/shop/index.vue | 3 + 22 files changed, 209 insertions(+), 184 deletions(-) diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 5484ac8..0b9424d 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -27,12 +27,28 @@ const install = (Vue, vm) => { return res; } else if(res.errCode == 401) { // 假设201为token失效,这里跳转登录 - vm.$u.toast('验证失败,请重新登录'); - setTimeout(() => { - // 此为uView的方法,详见路由相关文档 - vm.$u.route('/pageA/login/login') - }, 1500) + // vm.$u.toast('您还没有登录哦,请先去登录!'); + if (res.data.action != "memberinfo") { + uni.showModal({ + title: "温馨提示", + content: "您还未登录,请立即登录", + cancelText: "以后再说", + confirmText: "立即登录", + confirmColor: "#FF780F", + success(res) { + // console.log(res); + if (res.confirm) { + setTimeout(() => { + // 此为uView的方法,详见路由相关文档 + vm.$u.route('/pageA/login/login') + }, 500) + } + } + }) + } return false; + } else if (res.errCode == 1) { + console.log(res.message); } else { // 如果返回false,则会调用Promise的reject回调, // 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值 diff --git a/common/store/index.js b/common/store/index.js index 10370d5..d3f4929 100644 --- a/common/store/index.js +++ b/common/store/index.js @@ -17,7 +17,8 @@ const store = new Vuex.Store({ groupbuyInfo: {}, // 秒杀详情 loadmore: {}, // 下拉加载返回的数据 hasLogin: false, // 登录状态 - token: "" // 储存token + token: "", // 储存token + showLoginModel: false, // 登录框 }, getters: { getOrderAddress(state) { diff --git a/components/index/daren-item/index.vue b/components/index/daren-item/index.vue index 844eb1a..cbd056d 100644 --- a/components/index/daren-item/index.vue +++ b/components/index/daren-item/index.vue @@ -68,7 +68,7 @@ export default { height: 80rpx; border-radius: 50%; margin-top: 24rpx; - background-color: #0f0; + background-color: #0077AA; } .name{ font-size: 26rpx; diff --git a/components/informations/notice/notice.vue b/components/informations/notice/notice.vue index e63c347..c54e18b 100644 --- a/components/informations/notice/notice.vue +++ b/components/informations/notice/notice.vue @@ -1,10 +1,10 @@