From 3954f6b756c40e61a44056adbc6c70bbbaa6b6db Mon Sep 17 00:00:00 2001 From: RIceWqy <1840169763@qq.com> Date: Mon, 8 Jan 2024 21:13:09 +0800 Subject: [PATCH] init --- package.json | 2 +- src/pages.json | 39 +- src/pages/basket/basket.vue | 522 ++++---- .../member-info-detail/member-info-detail.vue | 22 + src/pages/member-info/member-info.scss | 238 ++++ src/pages/member-info/member-info.vue | 22 + src/pages/member/member.scss | 125 ++ src/pages/member/member.vue | 110 ++ src/pages/order-detail/order-detail.vue | 30 +- src/pages/prod/prod.vue | 1110 ++++++++--------- src/pages/score/score.scss | 126 ++ src/pages/score/score.vue | 110 ++ src/pages/sub-category/sub-category.scss | 18 +- src/pages/sub-category/sub-category.vue | 217 ++-- src/pages/submit-order/submit-order.vue | 551 ++++---- src/pages/user/user.vue | 418 +++---- 16 files changed, 2129 insertions(+), 1531 deletions(-) create mode 100644 src/pages/member-info-detail/member-info-detail.vue create mode 100644 src/pages/member-info/member-info.scss create mode 100644 src/pages/member-info/member-info.vue create mode 100644 src/pages/member/member.scss create mode 100644 src/pages/member/member.vue create mode 100644 src/pages/score/score.scss create mode 100644 src/pages/score/score.vue diff --git a/package.json b/package.json index 81d46f7..dd91b78 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "version": "0.0.0", "scripts": { - "preinstall": "npx only-allow pnpm", + "preinstall": "npx only-allow npm", "dev:h5": "uni", "dev:h5-test": "uni --mode testing", "dev:mp-weixin": "uni -p mp-weixin", diff --git a/src/pages.json b/src/pages.json index e0115c2..b364482 100644 --- a/src/pages.json +++ b/src/pages.json @@ -149,12 +149,49 @@ "navigationBarBackgroundColor": "#fafafa" } }, + { + "path": "pages/score/score", + "style": { + "backgroundTextStyle": "light", + "navigationBarTitleText": "积分商城", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#fafafa" + } + }, + { + "path": "pages/member/member", + "style": { + "backgroundTextStyle": "light", + "navigationBarTitleText": "会员专区", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#fafafa" + } + }, + { + "path": "pages/member-info/member-info", + "style": { + "backgroundTextStyle": "light", + "navigationBarTitleText": "会员信息", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#fafafa" + } + }, + { + "path": "pages/member-info-detail/member-info-detail", + "style": { + "backgroundTextStyle": "light", + "navigationBarTitleText": "会员信息详情", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#fafafa" + } + }, { "path": "pages/accountLogin/accountLogin" }, { "path": "pages/register/register" - } + }, + ], "tabBar": { "selectedColor": "#3a86b9", diff --git a/src/pages/basket/basket.vue b/src/pages/basket/basket.vue index b8e810a..3ad9809 100644 --- a/src/pages/basket/basket.vue +++ b/src/pages/basket/basket.vue @@ -1,15 +1,9 @@ diff --git a/src/pages/member-info-detail/member-info-detail.vue b/src/pages/member-info-detail/member-info-detail.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/src/pages/member-info-detail/member-info-detail.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/src/pages/member-info/member-info.scss b/src/pages/member-info/member-info.scss new file mode 100644 index 0000000..547b964 --- /dev/null +++ b/src/pages/member-info/member-info.scss @@ -0,0 +1,238 @@ +.container { + background-color: #f7f7f7; + padding-bottom: 60rpx; +}.price { + font-size: 30rpx; + color: #ff3000; + font-weight: 600; + + &::before { + content: '¥'; + font-size: 24rpx; + } + } + + .origin-price { + font-size: 26rpx; + font-weight: 400; + text-decoration: line-through; + color: #c4c4c4; + } +.userinfo { + position: relative; + width: 100%; + background: #fff; + text-align: center; + padding: 30rpx 0; + .userinfo-con { + width: 240rpx; + margin: auto; + .userinfo-avatar { + overflow: hidden; + display: block; + width: 160rpx; + height: 160rpx; + border-radius: 50%; + box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); + margin: auto; + image { + width: 160rpx; + height: 160rpx; + } + } + .userinfo-name { + font-size: 30rpx; + font-weight: bold; + margin-top: 20rpx; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + text-overflow: ellipsis; + word-break: break-all; + } + } +} +.userinfo-none { + display: flex; + padding: 30rpx; + background: #fff; + align-items: center; + .default-pic { + padding-right: 30rpx; + image { + width: 160rpx; + height: 160rpx; + } + } +} +.none-login { + button { + background: #fff; + &::after { + border: 0; + } + } + .unlogin { + font-size: 30rpx; + text-align: left; + padding: 0; + } + .click-login { + font-size: 26rpx; + color: #777; + text-align: left; + padding: 0; + } +} +.binding-phone { + position: relative; + background: #fff; + height: 80rpx; + line-height: 80rpx; + padding: 0 30rpx; + border-top: 2rpx solid #f7f7f7; + border-bottom: 2rpx solid #f7f7f7; + .show-tip { + font-size: 26rpx; + } + .gotobinding { + border-radius: 8rpx; + font-size: 28rpx; + color: #e24b4b; + font-weight: bold; + } +} +.list-cont { + width: 100%; + background: #f7f7f7; + margin-top: 20rpx; + .total-order { + background: #fff; + .order-tit { + display: flex; + justify-content: space-between; + height: 80rpx; + line-height: 80rpx; + font-size: 30rpx; + border-bottom: 1px solid #f7f7f7; + padding: 0 30rpx; + .checkmore { + font-size: 22rpx; + color: #80848f; + display: flex; + align-items: center; + } + } + .procedure { + display: flex; + justify-content: space-around; + align-items: center; + font-size: 25rpx; + height: 160rpx; + .items { + position: relative; + display: flex; + flex-direction: column; + align-items: center; + image { + width: 70rpx; + height: 70rpx; + margin-bottom: 20rpx; + } + .num-badge { + position: absolute; + top: -15rpx; + right: -12rpx; + color: #eb2444; + border: 3rpx solid #eb2444; + border-radius: 50rpx; + background: #fff; + min-width: 30rpx; + height: 30rpx; + line-height: 30rpx; + text-align: center; + padding: 2rpx; + display: block; + } + } + } + } + .my-menu { + background-color: #fff; + margin-top: 20rpx; + .memu-item { + display: flex; + align-items: center; + justify-content: space-between; + height: 100rpx; + border-bottom: 2rpx solid #f7f7f7; + padding: 0 30rpx; + &:nth-child(1) { + border-top: 2rpx solid #f7f7f7; + } + &:last-child { + border-bottom: none; + } + text { + font-size: 28rpx; + } + image { + width: 50rpx; + height: 50rpx; + margin-right: 20rpx; + } + .i-name { + display: flex; + align-items: center; + } + } + } +} +.arrowhead { + width: 15rpx; + height: 15rpx; + border-top: 2rpx solid #999; + border-right: 2rpx solid #999; + transform: rotate(45deg); + margin-left: 10rpx; +} +.prod-col { + margin-top: 20rpx; + background: #fff; + display: flex; + justify-content: space-around; + padding: 30rpx 0 10rpx 0; + font-size: 12px; + .col-item { + text-align: center; + .num { + font-size: 16px; + font-weight: 700; + color: #3a86b9; + } + .tit { + line-height: 34px; + } + } +} +.log-out { + padding: 20rpx; + text-align: center; + margin-top: 20rpx; +} +.log-out-n { + font-size: 30rpx; + margin: auto; + width: 200rpx; + padding: 20rpx; + border-radius: 10rpx; + background: #e43130; + color: #ffffff; +} +button.memu-btn.memu-item { + background-color: #fff; + &:after { + border: 0; + } +} diff --git a/src/pages/member-info/member-info.vue b/src/pages/member-info/member-info.vue new file mode 100644 index 0000000..4d97660 --- /dev/null +++ b/src/pages/member-info/member-info.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/src/pages/member/member.scss b/src/pages/member/member.scss new file mode 100644 index 0000000..3762352 --- /dev/null +++ b/src/pages/member/member.scss @@ -0,0 +1,125 @@ +.container { + background: #f4f4f4; +}.price { + font-size: 30rpx; + color: #ff3000; + font-weight: 600; + + /* &::before { + content: '¥'; + font-size: 24rpx; + } */ + } + + .origin-price { + font-size: 26rpx; + font-weight: 400; + text-decoration: line-through; + color: #c4c4c4; + } +.category-tit { + width: 100%; + white-space: nowrap; + position: fixed; + top: 0px; + z-index: 999; + background-color: #fff; + border-bottom: 2rpx solid #f4f4f4; + font-size: 30rpx; + .category-item { + display: inline-block; + padding: 20rpx 10rpx; + margin: 0 20rpx; + box-sizing: border-box; + font-size: 28rpx; + } +} +.prod-item { + height: calc(100vh - 100rpx); +} +.on { + border-bottom: 4rpx solid #e43130; + color: #e43130; +} +::-webkit-scrollbar { + width: 0; + height: 0; + color: transparent; +} +.empty { + margin-top: 200rpx; +} +.prod-items { + width: 345rpx; + display: inline-block; + background: #fff; + padding-bottom: 20rpx; + box-sizing: border-box; + box-shadow: 0rpx 6rpx 8rpx rgba(58,134,185,0.2); + &:nth-child(2n-1) { + margin: 20rpx 10rpx 10rpx 20rpx; + } + &:nth-child(2n) { + margin: 20rpx 20rpx 10rpx 10rpx; + } + .hot-imagecont { + .hotsaleimg { + width: 341rpx; + height: 341rpx; + } + font-size: 0; + text-align: center; + } + .hot-text { + .hotprod-text { + font-size: 28rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + margin-top: 20rpx; + padding: 0 10rpx; + .prod-info { + font-size: 22rpx; + color: #999; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .prod-text-info { + position: relative; + height: 70rpx; + line-height: 70rpx; + font-family: Arial; + .hotprod-price { + display: inline; + font-size: 26rpx; + color: #eb2444; + } + .basket-img { + width: 50rpx; + height: 50rpx; + position: absolute; + right: 0; + bottom: 7rpx; + padding: 8rpx; + } + } + } +} +.more-prod { + .prod-text-right { + .prod-info { + font-size: 22rpx; + color: #999; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } +} +.empty-wrap { + color: #aaa; + text-align: center; + padding-top: 400rpx; +} diff --git a/src/pages/member/member.vue b/src/pages/member/member.vue new file mode 100644 index 0000000..5f5ca4b --- /dev/null +++ b/src/pages/member/member.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/pages/order-detail/order-detail.vue b/src/pages/order-detail/order-detail.vue index 2c48514..3623bbf 100644 --- a/src/pages/order-detail/order-detail.vue +++ b/src/pages/order-detail/order-detail.vue @@ -50,7 +50,10 @@ - + + + + @@ -61,6 +64,20 @@ .{{ wxs.parsePrice(item.price)[1] }} + + + + + + + {{ item.payScore }} + + + 积分 + + + + @@ -172,6 +189,14 @@ 实付款: + + + {{totalScore }} + + + 积分+ + + @@ -234,7 +259,7 @@ const userAddrDto = ref(null) const orderNumber = ref('') const createTime = ref('') const total = ref(0) // 商品总额 -/** +const totalScore =ref(0)/** * 加载订单数据 */ const loadOrderDetail = (orderNum) => { @@ -257,6 +282,7 @@ const loadOrderDetail = (orderNum) => { transfee.value = data.transfee reduceAmount.value = data.reduceAmount total.value = data.total + totalScore.value = data.actualTotalScore uni.hideLoading() }) } diff --git a/src/pages/prod/prod.vue b/src/pages/prod/prod.vue index 576998e..65dd02f 100644 --- a/src/pages/prod/prod.vue +++ b/src/pages/prod/prod.vue @@ -2,18 +2,9 @@ - - + + @@ -26,49 +17,42 @@ {{ prodName }} - - - + + + 收藏 {{ brief }} - - + + {{ wxs.parsePrice(defaultSku.price)[0] }} .{{ wxs.parsePrice(defaultSku.price)[1] }} - + ¥{{ wxs.parsePrice(defaultSku.oriPrice)[0] }}.{{ wxs.parsePrice(defaultSku.oriPrice)[1] }} + + + + {{payScore }} + + 积分 + + + + + - + 已选 @@ -81,10 +65,7 @@ - + 评价 @@ -97,10 +78,7 @@ - + 全部({{ prodCommData.number }}) 好评({{ prodCommData.praiseNumber }}) 中评({{ prodCommData.secondaryNumber }}) @@ -108,20 +86,13 @@ 有图({{ prodCommData.picNumber }}) - + {{ item.recTime }} - + 查看全部评价 @@ -163,98 +123,62 @@ - + 首页 - + 购物车 - + {{ totalCartNum }} - + 加入购物车 - + 立即购买 - + - - + + ¥ - + {{ wxs.parsePrice(defaultSku.price)[0] }} .{{ wxs.parsePrice(defaultSku.price)[1] }} + + + {{payScore}} + + 积分 + 已选 {{ selectedProp.length > 0 ? selectedProp + ',' : '' }}{{ prodNum }}件 - + - - - + + + {{ key }} - + isSkuLineItemNotOptional(allProperties,selectedPropObj,key,skuLineItem,propKeys)? 'dashed' : '']" @click="toChooseItem(skuGroupItemIndex, skuLineItem, key)"> {{ skuLineItem }} @@ -264,23 +188,13 @@ - + - + - + @@ -291,16 +205,10 @@ - + 加入购物车 - + 立即购买 @@ -308,10 +216,7 @@ - + 商品评价 @@ -319,65 +224,35 @@ 好评度{{ prodCommData.positiveRating }}% - + - + 全部({{ prodCommData.number }}) - + 好评({{ prodCommData.praiseNumber }}) - + 中评({{ prodCommData.secondaryNumber }}) - + 差评({{ prodCommData.negativeNumber }}) - + 有图({{ prodCommData.picNumber }}) - + {{ item.recTime }} - + 暂无评价 - + 点击加载更多 @@ -429,447 +287,461 @@ diff --git a/src/pages/score/score.scss b/src/pages/score/score.scss new file mode 100644 index 0000000..020cef0 --- /dev/null +++ b/src/pages/score/score.scss @@ -0,0 +1,126 @@ +.container { + background: #f4f4f4; +} +.price { + font-size: 30rpx; + color: #ff3000; + font-weight: 600; + + /* &::before { + content: '¥'; + font-size: 24rpx; + } */ + } + + .origin-price { + font-size: 26rpx; + font-weight: 400; + text-decoration: line-through; + color: #c4c4c4; + } +.category-tit { + width: 100%; + white-space: nowrap; + position: fixed; + top: 0px; + z-index: 999; + background-color: #fff; + border-bottom: 2rpx solid #f4f4f4; + font-size: 30rpx; + .category-item { + display: inline-block; + padding: 20rpx 10rpx; + margin: 0 20rpx; + box-sizing: border-box; + font-size: 28rpx; + } +} +.prod-item { + height: calc(100vh - 100rpx); +} +.on { + border-bottom: 4rpx solid #e43130; + color: #e43130; +} +::-webkit-scrollbar { + width: 0; + height: 0; + color: transparent; +} +.empty { + margin-top: 200rpx; +} +.prod-items { + width: 345rpx; + display: inline-block; + background: #fff; + padding-bottom: 20rpx; + box-sizing: border-box; + box-shadow: 0rpx 6rpx 8rpx rgba(58,134,185,0.2); + &:nth-child(2n-1) { + margin: 20rpx 10rpx 10rpx 20rpx; + } + &:nth-child(2n) { + margin: 20rpx 20rpx 10rpx 10rpx; + } + .hot-imagecont { + .hotsaleimg { + width: 341rpx; + height: 341rpx; + } + font-size: 0; + text-align: center; + } + .hot-text { + .hotprod-text { + font-size: 28rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + margin-top: 20rpx; + padding: 0 10rpx; + .prod-info { + font-size: 22rpx; + color: #999; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .prod-text-info { + position: relative; + height: 70rpx; + line-height: 70rpx; + font-family: Arial; + .hotprod-price { + display: inline; + font-size: 26rpx; + color: #eb2444; + } + .basket-img { + width: 50rpx; + height: 50rpx; + position: absolute; + right: 0; + bottom: 7rpx; + padding: 8rpx; + } + } + } +} +.more-prod { + .prod-text-right { + .prod-info { + font-size: 22rpx; + color: #999; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } +} +.empty-wrap { + color: #aaa; + text-align: center; + padding-top: 400rpx; +} diff --git a/src/pages/score/score.vue b/src/pages/score/score.vue new file mode 100644 index 0000000..ca7323a --- /dev/null +++ b/src/pages/score/score.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/pages/sub-category/sub-category.scss b/src/pages/sub-category/sub-category.scss index 93a6335..7154126 100644 --- a/src/pages/sub-category/sub-category.scss +++ b/src/pages/sub-category/sub-category.scss @@ -1,6 +1,22 @@ .container { background: #f4f4f4; -} +}.price { + font-size: 30rpx; + color: #ff3000; + font-weight: 600; +/* + &::before { + content: '¥'; + font-size: 24rpx; + } */ + } + + .origin-price { + font-size: 26rpx; + font-weight: 400; + text-decoration: line-through; + color: #c4c4c4; + } .category-tit { width: 100%; white-space: nowrap; diff --git a/src/pages/sub-category/sub-category.vue b/src/pages/sub-category/sub-category.vue index fa8ab78..d268a0f 100644 --- a/src/pages/sub-category/sub-category.vue +++ b/src/pages/sub-category/sub-category.vue @@ -1,22 +1,10 @@ diff --git a/src/pages/submit-order/submit-order.vue b/src/pages/submit-order/submit-order.vue index 166ad64..aff325b 100644 --- a/src/pages/submit-order/submit-order.vue +++ b/src/pages/submit-order/submit-order.vue @@ -3,14 +3,8 @@ - - + + @@ -19,10 +13,7 @@ - + @@ -43,15 +34,8 @@ - - + + @@ -63,7 +47,8 @@ {{ item.skuName }} - + + @@ -74,6 +59,18 @@ .{{ wxs.parsePrice(item.price)[1] }} + + + + + + + {{ item.payScore }} + + + 积分 + + x{{ item.prodCount }} @@ -88,6 +85,14 @@ 合计: + + + {{totalScore }} + + + 积分+ + + @@ -104,17 +109,11 @@ - + 优惠券: - + 暂无可用 @@ -124,10 +123,7 @@ 买家留言: - + @@ -185,6 +181,14 @@ 小计: + + + {{totalScore }} + + + 积分+ + + @@ -206,6 +210,16 @@ 合计: + + + + + {{totalScore }} + + + 积分+ + + @@ -218,76 +232,41 @@ - + 提交订单 - + 优惠券 - + - + 可用优惠券({{ coupons.canUseCoupons.length ? coupons.canUseCoupons.length : 0 }}) - + 不可用优惠券({{ coupons.unCanUseCoupons.length ? coupons.unCanUseCoupons.length : 0 }}) - - + + - - + + - + 确定 @@ -298,230 +277,238 @@ diff --git a/src/pages/user/user.vue b/src/pages/user/user.vue index 51aed0b..9954a71 100644 --- a/src/pages/user/user.vue +++ b/src/pages/user/user.vue @@ -1,21 +1,16 @@