diff --git a/App.vue b/App.vue index c7e2217..b59ad23 100644 --- a/App.vue +++ b/App.vue @@ -8,6 +8,7 @@ import { mapMutations } from "vuex"; import APPUpdate from "@/plugins/APPUpdate"; import { getClipboardData } from "@/js_sdk/h5-copy/h5-copy.js"; import config from "@/config/config"; +import storage from "@/utils/storage"; // 悬浮球 export default { @@ -66,14 +67,14 @@ export default { onShow() { // #ifndef H5 - // this.getClipboard(); + this.getClipboard(); // #endif // #ifdef APP-PLUS - console.log(storage.getShow()); + if (storage.getShow()) { if(uni.getSystemInfoSync().platform == 'ios'){ this.$u.route("/pages/tabbar/screen/fullScreen"); - // uni.reLaunch({ url: "/pages/tabbar/screen/fullScreen" }); + } } // #endif diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue index 075b1da..60724a3 100644 --- a/components/m-buy/goods.vue +++ b/components/m-buy/goods.vue @@ -473,6 +473,8 @@ color: #999 !important; font-size: 24rpx; margin:0 20rpx; + display: flex; + justify-content: center; } .goods-header { @@ -492,7 +494,8 @@ .goods-price { color: $price-color; - line-height: 80rpx; + line-height: 80rpx; + margin-right: 20rpx; >* { color: $price-color; line-height: 80rpx; diff --git a/components/m-goods-list/README.md b/components/m-goods-list/README.md new file mode 100644 index 0000000..74fa4c2 --- /dev/null +++ b/components/m-goods-list/README.md @@ -0,0 +1,10 @@ +## 商品列表展示 + +### OBJECT 参数说明 + +| 属性 | 说明 | 类型 | 必填 | +| ----------- | ---------------------------------------------------------- | ------- | ---- | +| `res` | 显示数据 | Array | 是 | +| `type` | 商品展示类型 oneColumns twoColumns ,默认展示一行两列商品 | String | 否 | +| `storeName` | 是否展示店铺名称,默认展示 | Boolean | 否 | + diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue new file mode 100644 index 0000000..55446b7 --- /dev/null +++ b/components/m-goods-list/list.vue @@ -0,0 +1,293 @@ + + + + + diff --git a/components/m-goods-recommend/index.vue b/components/m-goods-recommend/index.vue index dbd5815..8f60967 100644 --- a/components/m-goods-recommend/index.vue +++ b/components/m-goods-recommend/index.vue @@ -1,27 +1,11 @@ - diff --git a/pages/mine/set/securityCenter/editPassword.vue b/pages/mine/set/securityCenter/editPassword.vue index 7be7247..7da13e0 100644 --- a/pages/mine/set/securityCenter/editPassword.vue +++ b/pages/mine/set/securityCenter/editPassword.vue @@ -1,12 +1,13 @@ \ No newline at end of file diff --git a/pages/navigation/search/search.scss b/pages/navigation/search/search.scss index a3efed1..6985233 100644 --- a/pages/navigation/search/search.scss +++ b/pages/navigation/search/search.scss @@ -22,19 +22,6 @@ } } -.promotion { - margin-top: 4rpx; - display: flex; - div { - span { - font-size: 24rpx; - color: $light-color; - margin-right: 10rpx; - padding: 0 4rpx; - border-radius: 2rpx; - } - } -} .status_bar { height: var(--status-bar-height); background: #fff !important; @@ -437,180 +424,13 @@ view { margin-left: 4rpx; font-size: 26rpx; color: #888; - - } .xia { transform: scaleY(-1); } } - - .cate-item { - display: flex; - justify-content: center; - align-items: center; - height: 100%; - width: 80rpx; - position: relative; - font-size: 44rpx; - - &:after { - content: ""; - position: absolute; - left: 0; - top: 50%; - transform: translateY(-50%); - border-left: 1px solid #ddd; - width: 0; - height: 36rpx; - } - } } - -/* 分类 */ -.cate-mask { - position: fixed; - left: 0; - top: var(--window-top); - bottom: 0; - width: 100%; - background: rgba(0, 0, 0, 0); - z-index: 95; - transition: 0.3s; - - .cate-content { - width: 630rpx; - height: 100%; - background: #fff; - float: right; - transform: translateX(100%); - transition: 0.3s; - } - - &.none { - display: none; - } - - &.show { - background: rgba(0, 0, 0, 0.4); - - .cate-content { - transform: translateX(0); - } - } -} - -.cate-list { - display: flex; - flex-direction: column; - height: 100%; - - .cate-item { - display: flex; - align-items: center; - height: 90rpx; - padding-left: 30rpx; - font-size: 28rpx; - color: #555; - position: relative; - } - - .two { - height: 64rpx; - color: #303133; - font-size: 30rpx; - background: #f8f8f8; - } -} -.price-box { - margin-top: 10rpx; - display: flex; - align-items: center; - justify-content: space-between; - padding-right: 10rpx; - font-size: 24rpx; - color: $font-color-light; -} - -.price { - font-size: 26rpx; - line-height: 1; - color: $main-color; - font-weight: bold; - /deep/ span:nth-of-type(1) { - font-size: 38rpx; - } -} -/* 商品列表 */ -.goods-list { - display: flex; - flex-wrap: wrap; - margin: 10rpx 20rpx 284rpx; - - - // background: #fff; - width: 100%; - .goods-item { - background-color: #ffffff; - display: flex; - border-radius: 16rpx; - flex-direction: column; - width: calc(50% - 30rpx); - margin-bottom: 20rpx; - padding-bottom: 20rpx; - - &:nth-child(2n + 1) { - margin-right: 20rpx; - } - - .goods-detail { - margin: 0 20rpx; - } - } - - .image-wrapper { - width: 100%; - height: 330rpx; - border-radius: 16rpx 16rpx 0 0; - overflow: hidden; - padding: 0; - image { - width: 100%; - height: 100%; - opacity: 1; - border-radius: 16rpx 16rpx 0 0; - } - } - - .title { - font-size: $font-base; - color: $font-color-dark; - line-height: 1.5; - height: 84rpx; - padding: 10rpx 0 0; - display: -webkit-box; - - -webkit-box-orient: vertical; - - -webkit-line-clamp: 2; - - overflow: hidden; - } - - .count-config, - .store-seller-name { - font-size: $font-sm; - } - - .text-hidden { - - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } -} - .status_bar { height: var(--status-bar-height); width: 100%; diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue index 5aa2f2a..5cbc9f6 100644 --- a/pages/navigation/search/searchPage.vue +++ b/pages/navigation/search/searchPage.vue @@ -82,50 +82,7 @@
-
-
-
-
- - - -
-
-
{{ item.content.goodsName }}
- -
- ¥{{ formatPrice(item.content.price )[0] }} .{{ - formatPrice(item.content.price )[1] - }} -
-
-
-
- - 满减 - 秒杀 -
-
-
- 已售 {{ item.content.buyCount || '0' }} - {{ item.content.commentNum || '0' }}条评论 -
-
-
- - {{ item.content.storeName }} - 进店 -
- - - -
-
-
- -
-
+
@@ -136,49 +93,7 @@ "> - - - - - - -
{{ item.content.goodsName }}
- -
- ¥{{ formatPrice(item.content.price )[0] }} .{{ - formatPrice(item.content.price )[1] - }} -
-
- -
-
- -
-
- - 满减 - 秒杀 -
-
- -
- 已售 {{ item.content.buyCount || "0" }} - {{ item.content.commentNum || "0" }}条评论 -
-
-
- - {{ item.content.storeName || "暂无" }} -
- - - -
-
-
-
+
@@ -277,7 +192,7 @@ diff --git a/pages/product/shopPage.vue b/pages/product/shopPage.vue index 07f050c..6a0041d 100644 --- a/pages/product/shopPage.vue +++ b/pages/product/shopPage.vue @@ -60,18 +60,7 @@
暂无商品信息 - - - - -
{{ item.content.goodsName }}
-
-
¥{{ item.content.price | unitPrice }}
-
- -
已售 {{ item.content.buyCount || "0" }}
-
-
+
@@ -94,7 +83,8 @@ - - \ No newline at end of file + + + + + diff --git a/pages/tabbar/home/template/tpl.js b/pages/tabbar/home/template/tpl.js index e0d8f23..0e8897e 100644 --- a/pages/tabbar/home/template/tpl.js +++ b/pages/tabbar/home/template/tpl.js @@ -27,7 +27,7 @@ export function modelNavigateTo(item) { // 活动 case "marketing": uni.navigateTo({ - url: "/pages/product/goods?id=" + val.skuId + "goodsId=" + val.goodsId, + url: "/pages/product/goods?id=" + val.id + "goodsId=" + val.goodsId, }); break; case "pages": diff --git a/uni.scss b/uni.scss index 7fe2f11..20c6fca 100644 --- a/uni.scss +++ b/uni.scss @@ -168,4 +168,12 @@ $font-weight: 400; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; +} + +.wes-3 { + /* 适用于webkit内核和移动端 */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; } diff --git a/utils/request.js b/utils/request.js index 17cf14a..3cb42cc 100644 --- a/utils/request.js +++ b/utils/request.js @@ -119,9 +119,11 @@ http.interceptors.response.use( response.data.status === 403 ) { if (!isRefreshing) { + console.log('旧token',token) isRefreshing = true; + let oldRefreshToken = storage.getRefreshToken(); //调用刷新token的接口 - return refreshTokenFn(storage.getRefreshToken()) + return refreshTokenFn(oldRefreshToken) .then((res) => { let { accessToken, refreshToken } = res.data.result; storage.setAccessToken(accessToken); @@ -129,11 +131,13 @@ http.interceptors.response.use( response.header.accessToken = `${accessToken}`; // token 刷新后将数组的方法重新执行 + console.log('接口队列',requests,'新token',accessToken) requests.forEach((cb) => cb(accessToken)); requests = []; // 重新请求完清空 return http.request(response.config); }) .catch((err) => { + console.log('刷新token报错'+oldRefreshToken,err) cleanStorage(); return Promise.reject(err); }) @@ -153,9 +157,10 @@ http.interceptors.response.use( // 如果当前返回没登录 } else if ( - (!token && response.statusCode === 403) || + (!token && !storage.getRefreshToken() && response.statusCode === 403) || response.data.code === 403 ) { + console.log('没有token 以及刷新token 内容',token,storage.getRefreshToken()) cleanStorage(); // 如果当前状态码为正常但是success为不正常时