diff --git a/api/shop.js b/api/shop.js index e39a092d..87b18479 100644 --- a/api/shop.js +++ b/api/shop.js @@ -18,4 +18,6 @@ export const apiArr = { getComment: '/api/v2/wechat/commodity/review/list', // 获取评论 mergePreorder: '/api/v2/wechat/commodity/order/preorder', // 商品订单合并预下单 + + goodsSearch: '/api/v2/wechat/commodity/search', // 商品搜索 } \ No newline at end of file diff --git a/packages/shop/search/index.css b/packages/shop/search/index.css index 11d0b23b..2710bcbd 100644 --- a/packages/shop/search/index.css +++ b/packages/shop/search/index.css @@ -69,6 +69,12 @@ image { margin-top: 48rpx; } +.hisTop{ + display: flex; + align-items: center; + justify-content: space-between; +} + .hisTit { font-size: 33rpx; color: #222222; @@ -170,8 +176,8 @@ image { .searchItem_right { flex: 1; -} - +} + .tag { background-color: #ff7d00; color: white; @@ -182,24 +188,29 @@ image { .tag-img { position: absolute; - /* top: 1; */ - bottom: 1; - left: 10; + top: 0; + left: 0; z-index: 1; -} - -.tag-name { - background-color: #ff7d00; - color: white; - font-size: 22rpx; - padding: 5rpx 10rpx; - border-radius: 20rpx 0 20rpx 20rpx; +} + +.tag-text { + display: inline-block; + vertical-align: middle; + margin-right: 20rpx; +} + +.tag-name { + background-color: #ff7d00; + color: white; + font-size: 22rpx; + padding: 5rpx 10rpx; + border-radius: 20rpx 0 20rpx 20rpx; } .searchItem_right_tit { font-size: 30rpx; color: #000000; - font-weight: 600; + font-weight: 600; display: flex; } @@ -209,6 +220,171 @@ image { margin-top: 10rpx; } +/* 商品信息样式 */ +.CateInfo_Item_Box { + display: flex; + padding: 20rpx 40rpx; + border-bottom: 1rpx solid #EBEBEB; + position: relative; +} + +.CateInfo_Item_left { + width: 140rpx; + min-width: 140rpx; + height: 140rpx; + border-radius: 20rpx 20rpx 20rpx 20rpx; + overflow: hidden; + margin-right: 15rpx; + position: relative; +} + +.CateInfo_Item_left image { + width: 100%; + height: 100%; +} + +.CateInfo_Item_right { + flex: 1; +} + +.CateInfo_Item_right_Tit { + font-size: 30rpx; + color: #000000; + font-weight: bold; + margin-bottom: 10rpx; +} + +.CateInfo_Item_right_subtit { + font-size: 26rpx; + color: #999999; + margin-top: 10rpx; +} + +.CateInfo_Item_Money { + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 27rpx; +} + +.CateInfo_Item_Money_left { + font-size: 34rpx; + color: #FF370B; +} + +.CateInfo_Item_Money_left span { + font-size: 28rpx; +} + +.CateInfo_Item_Money_right .input { + padding: 0; +} + +/* 数量选择器样式 */ +.minus { + width: 22px; + height: 22px; + border-width: 1px; + border-color: #E6E6E6; + border-style: solid; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; +} + +.input { + padding: 0 10px; +} + +.plus { + width: 22px; + height: 22px; + background-color: #FF0000; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; +} + +/* 规格选择样式 */ +.gg { + width: 142rpx; + height: 40rpx; + background: #FFEBEB; + border-radius: 20rpx 20rpx 20rpx 20rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 24rpx; + color: #FF370B; + position: absolute; + right: 100rpx; + bottom: 20rpx; +} + +.GGList { + width: 550rpx; + background: rgba(255, 239, 239, 0.5); + border-radius: 20rpx 20rpx 20rpx 20rpx; + padding: 25rpx 16rpx; + box-sizing: border-box; + margin-left: 26rpx; + position: relative; + left: 22%; +} + +.noneBor { + border-bottom: none; +} + +.GGItem { + display: flex; + align-items: center; + margin-bottom: 10rpx; +} + +.GGItem_Image { + width: 120rpx; + height: 100rpx; + margin: 0 20rpx 20rpx 0; + position: relative; +} + +.GGItem_Image image { + border-radius: 20rpx; +} + +.GGItem_Con_Tit { + font-size: 28rpx; + color: #000000; +} + +.GGItem_Con { + flex: 1; +} + +.GGItem_Con_Msg_left { + display: flex; + font-size: 30rpx; + color: #FF370B; +} + +.GGItem_Con_Msg_left span { + font-size: 24rpx; +} + +.GGItem_Con_Msg { + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 20rpx; +} + +.GGItem_Con_Msg_right .input { + padding: 0; +} + .searchItem_right_Money { display: flex; align-items: center; @@ -250,24 +426,24 @@ image { display: flex; align-items: center; justify-content: center; -} - - - -/* 测试用 */ -.search-input { - width: 100%; - padding: 10px; - border-radius: 5px; - /* border: 1px solid #ccc; */ -} - -.search-results { - margin-top: 20px; -} - -.result-item { - padding: 10px; - /* border-bottom: 1px solid #ddd; */ -} +} + + + +/* 测试用 */ +.search-input { + width: 100%; + padding: 10px; + border-radius: 5px; + /* border: 1px solid #ccc; */ +} + +.search-results { + margin-top: 20px; +} + +.result-item { + padding: 10px; + /* border-bottom: 1px solid #ddd; */ +} /* 测试用 */ \ No newline at end of file diff --git a/packages/shop/search/index.vue b/packages/shop/search/index.vue index 52aae9a2..c06be7eb 100644 --- a/packages/shop/search/index.vue +++ b/packages/shop/search/index.vue @@ -1,109 +1,152 @@ @@ -111,9 +154,9 @@