diff --git a/commons/style.css b/commons/style.css index 816fe51..a2d6489 100644 --- a/commons/style.css +++ b/commons/style.css @@ -35,8 +35,8 @@ page {background-color: #FFFFFF;} } .login-btn { - width: calc(100% - 40rpx); - line-height: 130rpx; + width: calc(100% - 60rpx); + line-height: 100rpx; margin: 0 auto; box-shadow: 0rpx 8rpx 20rpx rgba(254,191,0,.75); } @@ -198,7 +198,6 @@ page {background-color: #FFFFFF;} /* 搜索结果 */ .search-box{ width: 100%; - height: 100vh; position: fixed; left: 0; top: 0; @@ -229,10 +228,18 @@ page {background-color: #FFFFFF;} } .keyword-txt{ line-height: 1.5; + padding-bottom: 10rpx; text-align: center; } .search-list{ - height: calc(100% - 140rpx); + height: calc(100% - 205rpx); +} +.search-list .item:nth-of-type(1), +.search-list .item:nth-of-type(2){ + margin-top: 30rpx !important; +} +.search-list .item:last-child{ + margin-bottom: 20rpx; } /* 商品详情 */ diff --git a/jsFile/public-api.js b/jsFile/public-api.js index 5df8943..ccaec02 100644 --- a/jsFile/public-api.js +++ b/jsFile/public-api.js @@ -8,11 +8,12 @@ export function slidePosition(data) { // 查询购物车信息 export function getCartInfo(){ - return requst.get('/api/user/info').then(res=>{ + return requst.post('/api/index/indexGetShoppingCartInformation').then(res=>{ if(res.code==0){ - let cartObj = res.data.shopping_cart_info; + console.log(res,'首页购物车信息') + let cartObj = res.data; store.commit('setNum', cartObj.count) - store.commit('setPrice', cartObj.total_price) + store.commit('setPrice', cartObj.price) } }) } \ No newline at end of file diff --git a/jsFile/requst.js b/jsFile/requst.js index 6d7ea6f..b00b936 100644 --- a/jsFile/requst.js +++ b/jsFile/requst.js @@ -20,10 +20,12 @@ const refreshTokenPage = () => { param += '?' + key + '=' + currentParam[key] } let localRoute = '/'+ currentRoute + param; - uni.setStorageSync('page-path-options',routeParam); - uni.navigateTo({ - url: '/pages/login/login' - }) + uni.setStorageSync('page-path-options',localRoute); + setTimeout(()=>{ + uni.navigateTo({ + url: '/pages/login/login' + }) + },1200) flag = true; } // 请求错误处理 diff --git a/pages/cart/cart.vue b/pages/cart/cart.vue index 05f34e2..8708d58 100644 --- a/pages/cart/cart.vue +++ b/pages/cart/cart.vue @@ -267,9 +267,7 @@ confirmDel(){ this.$requst.post('/api/order/shopping-cart-del',{ids:this.delIds.toString()}).then(res=>{ if(res.code==0){ - // 查询购物车列表 - this.listData = []; - this.getList(); + this.listData = this.listData.filter(item=>item.ifcheck==false) this.$toolAll.tools.showToast('删除成功'); }else{ this.$toolAll.tools.showToast(res.msg) diff --git a/pages/index/index.vue b/pages/index/index.vue index 9c7d776..1b35929 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,12 +1,12 @@