From dcc7b2d14fcbac97fb6d2c8975a3cd93dfbcc458 Mon Sep 17 00:00:00 2001
From: xuxy <1059738716@qq.com>
Date: 星期六, 27 七月 2024 20:36:11 +0800
Subject: [PATCH] update 功能调整
---
sub_pages/customer/trade/list.vue | 38
sub_pages/customer/shopping/shopping.vue | 712 ++++----
pages/home/components/home-top-flow.vue | 2
static/images/customer/brand/info-brand-bg.png | 0
App.vue | 1604 ++++++++++----------
sub_pages/customer/trade/detail.vue | 35
pages/login/supplier-login.vue | 2
pages/home/components/home-price.vue | 36
components/top-tabs.vue | 4
sub_pages/customer/self/follow.vue | 222 +-
sub_pages/customer/self/collect.vue | 2
sub_pages/customer/shop/shop.vue | 666 ++++----
sub_pages/customer/shopping/confirm.vue | 720 ++++----
pages/order/order.vue | 2
sub_pages/customer/trade/trade.vue | 2
pages/user/supplier-user.vue | 550 +++---
16 files changed, 2,352 insertions(+), 2,245 deletions(-)
diff --git a/App.vue b/App.vue
index 8ac35a5..d028cdd 100644
--- a/App.vue
+++ b/App.vue
@@ -49,7 +49,7 @@
url: '/pages/home/home'
})
// #endif
-
+
},
onReady() {
@@ -81,9 +81,10 @@
page {
background-color: #f5f5f5;
}
+
@import '@/common/selfvar.scss';
// @import '@/common/self.scss';
-
+
@import '@/common/icons.scss';
@import '@/common/global.scss';
@@ -115,1117 +116,1128 @@
</style>
<style lang="scss">
// @import '@/common/self.scss';
-
+
.topic-font {
- color: var(--topicolor) !important;
+ color: var(--topicolor) !important;
}
-
+
.flex-wrap-normal {
- flex-wrap: nowrap !important;
+ flex-wrap: nowrap !important;
}
-
+
.topic-gray {
- color: var(--topicgray);
+ color: var(--topicgray);
}
-
+
.relative {
- position: relative;
+ position: relative;
}
-
+
.t-red {
- color: #CE3C39 !important;
+ color: #CE3C39 !important;
}
-
+
.t-green {
- color: #04BA97 !important;
+ color: #04BA97 !important;
}
-
+
.uni-section .uni-section-header__decoration {
- background-color: #04BA97 !important;
+ background-color: #04BA97 !important;
}
-
+
.f-32 {
- font-size: 32rpx;
+ font-size: 32rpx;
}
-
+
.f-14 {
- font-size: 28rpx;
+ font-size: 28rpx;
}
-
+
.f-12 {
- font-size: 24rpx;
+ font-size: 24rpx;
}
-
+
.scroll-container {
- max-height: 80vh;
- overflow: scroll;
+ max-height: 80vh;
+ overflow: scroll;
}
-
+
.m-t-8 {
- margin-top: 16rpx;
+ margin-top: 16rpx;
}
-
+
.m-20 {
- margin: 20rpx;
+ margin: 20rpx;
}
-
+
.m-b-24 {
- margin-bottom: 24rpx;
+ margin-bottom: 24rpx;
}
-
-
+
+
.border-button-blue {
- border: 2rpx solid #3140A2;
- /* padding: 14rpx; */
-
- border-radius: 16rpx;
- padding-left: 40rpx;
- padding-right: 40rpx;
- padding-top: 8rpx;
- padding-bottom: 8rpx;
- text-align: center;
-
+ border: 2rpx solid #3140A2;
+ /* padding: 14rpx; */
+
+ border-radius: 16rpx;
+ padding-left: 40rpx;
+ padding-right: 40rpx;
+ padding-top: 8rpx;
+ padding-bottom: 8rpx;
+ text-align: center;
+
}
-
+
.bg-button-blue {
- background-color: #3140A2;
- border-radius: 8rpx;
- padding-left: 40rpx;
- padding-right: 40rpx;
+ background-color: #3140A2;
+ border-radius: 8rpx;
+ padding-left: 40rpx;
+ padding-right: 40rpx;
}
-
+
.border-button-org {
- border: 2rpx solid #3140A2;
- /* padding: 14rpx; */
-
- border-radius: 8rpx;
- padding-left: 40rpx;
- padding-right: 40rpx;
+ border: 2rpx solid #3140A2;
+ /* padding: 14rpx; */
+
+ border-radius: 8rpx;
+ padding-left: 40rpx;
+ padding-right: 40rpx;
}
-
+
.white {
- background-color: #FFFFFF;
+ background-color: #FFFFFF;
}
-
+
.bg-white {
- background-color: #FFFFFF;
+ background-color: #FFFFFF;
}
-
+
.br-4 {
- border-radius: 8rpx;
+ border-radius: 8rpx;
}
-
+
.bg-app-white {
- background-color: #FFFFFF;
- min-height: 800rpx;
+ background-color: #FFFFFF;
+ min-height: 800rpx;
}
-
+
.bg-grey {
- background-color: #f3f2f2;
+ background-color: #f3f2f2;
}
-
+
.flex {
- display: flex;
- flex-wrap: wrap;
+ display: flex;
+ flex-wrap: wrap;
}
-
+
.title-before-blue {
- padding-top: 40rpx;
- padding-bottom: 40rpx;
- font-size: var(--title_font_size2);
+ padding-top: 40rpx;
+ padding-bottom: 40rpx;
+ font-size: var(--title_font_size2);
}
-
+
.title-before-blue:before {
- content: "|";
- color: #3140A2;
- margin-right: 20rpx;
+ content: "|";
+ color: #3140A2;
+ margin-right: 20rpx;
}
-
+
.blue {
- color: #3140A2
+ color: #3140A2
}
-
+
.org {
- color: #3140A2
+ color: #3140A2
}
-
+
.tab {
- cursor: pointer;
+ cursor: pointer;
}
-
+
/* 谷歌浏览器,最小字体是12px,需要自己配置 */
.font-small {
- font-size: 6px;
+ font-size: 6px;
}
-
+
.text-blue {
- color: #3140A2
+ color: #3140A2
}
-
+
.image-s {
- background-size: 100% 100%;
+ background-size: 100% 100%;
}
-
+
.w-fit {
- width: fit-content;
+ width: fit-content;
}
-
+
.h-fit {
- height: fit-content;
+ height: fit-content;
}
-
+
.m-auto {
- margin: 0 auto;
+ margin: 0 auto;
}
-
+
.m-l-a {
- margin-left: auto !important;
+ margin-left: auto !important;
}
-
+
.m-r-0 {
- margin-right: 0px;
+ margin-right: 0px;
}
-
+
.m-l-40 {
- margin-left: 80rpx;
+ margin-left: 80rpx;
}
-
+
.m-l-5 {
- margin-left: 10rpx;
+ margin-left: 10rpx;
}
-
+
.m-l-12 {
- margin-left: 24rpx;
-
+ margin-left: 24rpx;
+
}
-
+
.m-r-a {
- margin-right: auto;
+ margin-right: auto;
}
-
+
.m-r-15 {
- margin-right: 30rpx;
+ margin-right: 30rpx;
}
-
+
.m-l-0 {
- margin-left: 0px;
+ margin-left: 0px;
}
-
+
.m-t-2 {
- margin-top: 4rpx;
-
+ margin-top: 4rpx;
+
}
-
+
.m-r-2 {
- margin-right: 4rpx;
-
+ margin-right: 4rpx;
+
}
-
+
.m-r-5 {
- margin-right: 10rpx;
+ margin-right: 10rpx;
}
-
+
.m-r-10 {
- margin-right: 20rpx;
-
+ margin-right: 20rpx;
+
}
-
+
.m-l-10 {
- margin-left: 20rpx;
-
+ margin-left: 20rpx;
+
}
-
+
.flex1 {
- flex: 1;
+ flex: 1;
}
-
+
.m-r-20 {
- margin-right: 40rpx;
-
+ margin-right: 40rpx;
+
}
-
+
.m-t-20 {
- margin-top: 40rpx;
+ margin-top: 40rpx;
}
-
+
.m-t-12 {
- margin-top: 24rpx;
+ margin-top: 24rpx;
}
-
+
.m-r-40 {
- margin-right: 80rpx;
+ margin-right: 80rpx;
}
-
+
.m-r-6 {
- margin-right: 12rpx;
+ margin-right: 12rpx;
}
-
+
.m-r-80 {
- margin-right: 160rpx;
+ margin-right: 160rpx;
}
-
+
.m-b-12 {
- margin-bottom: 24rpx;
+ margin-bottom: 24rpx;
}
-
+
.m-b-20 {
- margin-bottom: 40rpx;
+ margin-bottom: 40rpx;
}
-
+
.m-b-40 {
- margin-bottom: 40rpx;
+ margin-bottom: 40rpx;
}
-
+
.m-b-5 {
- margin-bottom: 10rpx;
+ margin-bottom: 10rpx;
}
-
+
.m-t-4 {
- margin-top: 8rpx;
+ margin-top: 8rpx;
}
-
+
.m-t-15 {
- margin-top: 30rpx;
+ margin-top: 30rpx;
}
-
+
.m-t-icon {
- margin-top: 8rpx;
+ margin-top: 8rpx;
}
-
+
.m-t-icon-h2 {
- margin-top: 16rpx;
+ margin-top: 16rpx;
}
-
+
.p9-12 {
- padding: 18rpx 24rpx;
+ padding: 18rpx 24rpx;
}
-
+
.p15 {
- padding: 30rpx;
-
+ padding: 30rpx;
+
}
-
+
.p10 {
- padding: 20rpx;
+ padding: 20rpx;
}
-
+
.p20 {
- padding: 40rpx;
+ padding: 40rpx;
}
-
+
.p40 {
- padding: 80rpx;
+ padding: 80rpx;
}
-
+
.m-l-15 {
- margin-left: 30rpx;
+ margin-left: 30rpx;
}
-
+
.p-t-5 {
- padding-top: 5px;
+ padding-top: 5px;
}
-
+
.p-l-10 {
- padding-left: 20rpx !important;
+ padding-left: 20rpx !important;
}
-
+
.p-b-0 {
- padding-bottom: 0px;
+ padding-bottom: 0px;
}
-
+
.p-r-10 {
- padding-right: 20rpx !important;
+ padding-right: 20rpx !important;
}
-
+
.l-h-2 {
- line-height: 1.2;
+ line-height: 1.2;
}
-
+
.desc-gray {
- color: #9a9da2;
+ color: #9a9da2;
}
-
+
.border {
- border: 1px solid var(--self_light_gray);
+ border: 1px solid var(--self_light_gray);
}
-
+
.t-white {
- color: #FFFFFF;
+ color: #FFFFFF;
}
-
+
.button-blue {
- color: #3140A2 !important;
+ color: #3140A2 !important;
}
-
+
.button-common {
- padding: 10rpx 20rpx;
- /* padding-left: 40rpx; */
- /* padding-right: 40rpx; */
- text-align: center;
- color: #3140A2 !important;
- cursor: pointer;
+ padding: 10rpx 20rpx;
+ /* padding-left: 40rpx; */
+ /* padding-right: 40rpx; */
+ text-align: center;
+ color: #3140A2 !important;
+ cursor: pointer;
}
-
+
.button-submit {
- text-align: center;
- height: 80rpx;
- background: #3140A2;
- border-radius: 88rpx;
- line-height: 80rpx;
- color: #FFFFFF;
- cursor: pointer;
+ text-align: center;
+ height: 80rpx;
+ background: #3140A2;
+ border-radius: 88rpx;
+ line-height: 80rpx;
+ color: #FFFFFF;
+ cursor: pointer;
}
-
+
.radius-44 {
- border-radius: 44rpx;
+ border-radius: 44rpx;
}
-
+
.button-red {
- color: #CE3C39 !important;
+ color: #CE3C39 !important;
}
-
+
.title-blue {
- color: #0052a4;
- font-size: 60rpx;
+ color: #0052a4;
+ font-size: 60rpx;
}
-
+
.text-center {
- text-align: center;
+ text-align: center;
}
-
+
.text-right {
- text-align: right;
+ text-align: right;
}
-
+
.f1 {
- flex: 1;
+ flex: 1;
}
-
+
.f2 {
- flex: 1;
+ flex: 1;
}
-
+
.h1 {
- font-size: var(--title_font_size)
+ font-size: var(--title_font_size)
}
-
+
.h2 {
- font-size: var(--title_font_size2);
+ font-size: var(--title_font_size2);
}
-
+
.title-more {
- color: var(--selfgray);
+ color: var(--selfgray);
}
-
+
.title-bold {
- font-weight: 600;
+ font-weight: 600;
}
-
+
.image-size-30 {
- width: 60rpx;
- height: 60rpx;
+ width: 60rpx;
+ height: 60rpx;
}
-
+
.b-r-20 {
- border-radius: 40rpx;
+ border-radius: 40rpx;
}
-
+
.b-r-10 {
- border-radius: 20rpx;
+ border-radius: 20rpx;
}
-
+
.line-gray {
- background-color: var(--self_light_gray);
- height: 2rpx;
- width: 100%;
- margin-top: 18rpx;
- margin-bottom: 20rpx;
+ background-color: var(--self_light_gray);
+ height: 2rpx;
+ width: 100%;
+ margin-top: 18rpx;
+ margin-bottom: 20rpx;
}
-
+
.line-gray-big {
- background-color: #f3f3f3;
- height: 40rpx;
- width: 100%;
+ background-color: #f3f3f3;
+ height: 40rpx;
+ width: 100%;
}
-
+
.line-v {
- width: 2rpx;
- /* height: 80%; */
- height: auto;
- /* margin-top: 10%; */
- background-color: var(--self_light_gray);
- margin-left: 20rpx;
- margin-right: 20rpx;
+ width: 2rpx;
+ /* height: 80%; */
+ height: auto;
+ /* margin-top: 10%; */
+ background-color: var(--self_light_gray);
+ margin-left: 20rpx;
+ margin-right: 20rpx;
}
-
+
/* .title-more:after{
content: url(../static/60x60.png);
} */
-
+
.image-icon {
- width: 120rpx;
- height: 120rpx;
- border-radius: 50%;
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 50%;
}
-
+
.icon-small {
- width: 32rpx;
- height: 36rpx;
+ width: 32rpx;
+ height: 36rpx;
}
-
+
.price-orange {
- /* color: #d26600; */
- color: #ebb360;
- text-align: right;
+ /* color: #d26600; */
+ color: #ebb360;
+ text-align: right;
}
-
+
.nav-current {
- background-color: #3140A2;
- position: relative;
- color: #FFFFFF;
+ background-color: #3140A2;
+ position: relative;
+ color: #FFFFFF;
}
-
+
.pointer {
- cursor: pointer;
+ cursor: pointer;
}
-
+
.nav-current:before {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- height: 2px;
- content: '';
- -webkit-transform: scaleY(.5);
- transform: scaleY(.5);
- background-color: #3140A2;
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ height: 2px;
+ content: '';
+ -webkit-transform: scaleY(.5);
+ transform: scaleY(.5);
+ background-color: #3140A2;
}
-
+
.calendar {
- border-radius: 10rpx;
- padding-left: 20rpx;
- padding-top: 4rpx;
- padding-bottom: 4rpx;
- padding-right: 20rpx;
- min-width: 400rpx;
- cursor: pointer;
+ border-radius: 10rpx;
+ padding-left: 20rpx;
+ padding-top: 4rpx;
+ padding-bottom: 4rpx;
+ padding-right: 20rpx;
+ min-width: 400rpx;
+ cursor: pointer;
}
-
+
/* special */
.tips {
- margin-top: 20rpx;
+ margin-top: 20rpx;
}
-
+
.tips .button-blue {
- border: 1px solid #3140A2;
- padding: 10rpx;
- width: 200rpx;
- line-height: 28rpx;
- text-align: center;
- padding-left: 20rpx;
- padding-right: 20rpx;
- border-radius: 40rpx;
- margin-right: 20rpx;
+ border: 1px solid #3140A2;
+ padding: 10rpx;
+ width: 200rpx;
+ line-height: 28rpx;
+ text-align: center;
+ padding-left: 20rpx;
+ padding-right: 20rpx;
+ border-radius: 40rpx;
+ margin-right: 20rpx;
}
-
+
.el-dropdown-link {
- cursor: pointer;
- color: #409EFF;
+ cursor: pointer;
+ color: #409EFF;
}
-
+
.el-icon-arrow-down {
- font-size: 12px;
+ font-size: 12px;
}
-
+
.icon-arrow-down {
- width: 24rpx;
- height: 24rpx;
+ width: 24rpx;
+ height: 24rpx;
+ vertical-align: middle;
+ display: inline-block;
}
-
- .app-tips {
- }
-
+
+ .app-tips {}
+
.app-tips .app-tip {
- background-color: #F3F3F3;
- text-align: center;
- border-radius: 10rpx;
- width: 102rpx;
- color: #999999
+ background-color: #F3F3F3;
+ text-align: center;
+ border-radius: 10rpx;
+ width: 102rpx;
+ color: #999999
}
-
+
.p-b-5 {
- padding-bottom: 10rpx;
+ padding-bottom: 10rpx;
}
-
+
.word-e {
- display: block;
- overflow: hidden;
- white-space: nowrap;
- -o-text-overflow: ellipsis;
- text-overflow: ellipsis;
+ display: block;
+ overflow: hidden;
+ white-space: nowrap;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
}
-
+
.m5 {
- margin: 10rpx;
+ margin: 10rpx;
}
-
+
.high-line {
- background-color: #6dfaff77;
+ background-color: #6dfaff77;
}
-
+
.icon-arrow-right {
- width: 32rpx;
- height: 32rpx;
+ width: 32rpx;
+ height: 32rpx;
}
-
+
.w-m-300 .uni-section {
- min-width: 600rpx;
+ min-width: 600rpx;
}
-
+
.w-180 {
- width: 360rpx;
+ width: 360rpx;
}
-
+
.img-d {
- background-size: 100% 100%;
+ background-size: 100% 100%;
}
-
+
.m-t-36 {
- margin-top: 36rpx;
+ margin-top: 36rpx;
}
-
+
.button-green-1 {
- height: 80rpx;
-
- background: var(--topicolor);
- border-radius: 44rpx;
- line-height: 80rpx;
- text-align: center;
- color: #FFFFFF;
- font-size: 32rpx;
+ height: 80rpx;
+
+ background: var(--topicolor);
+ border-radius: 44rpx;
+ line-height: 80rpx;
+ text-align: center;
+ color: #FFFFFF;
+ font-size: 32rpx;
}
-
+
.button-green-border {
- height: 80rpx;
- border: 1px solid var(--topicolor);
- border-radius: 44rpx;
- line-height: 80rpx;
- text-align: center;
- color: #04BA97;
- font-size: 32rpx;
+ height: 80rpx;
+ border: 1px solid var(--topicolor);
+ border-radius: 44rpx;
+ line-height: 80rpx;
+ text-align: center;
+ color: #04BA97;
+ font-size: 32rpx;
}
-
+
.button-circle {
- width: 100rpx;
- position: fixed;
- right: 60rpx;
- height: 100rpx;
- color: #ffffff;
- font-size: 36rpx;
- cursor: pointer;
- text-align: center;
- font-weight: 400;
- line-height: 100rpx;
- margin: 0 auto;
- bottom: 160rpx;
- // background:radial-gradient(#FFFFFF, #4ce531);
- border-radius: 50%;
- background-color: #04BA97;
+ width: 100rpx;
+ position: fixed;
+ right: 60rpx;
+ height: 100rpx;
+ color: #ffffff;
+ font-size: 36rpx;
+ cursor: pointer;
+ text-align: center;
+ font-weight: 400;
+ line-height: 100rpx;
+ margin: 0 auto;
+ bottom: 160rpx;
+ // background:radial-gradient(#FFFFFF, #4ce531);
+ border-radius: 50%;
+ background-color: #04BA97;
}
-
+
// #ifdef APP || H5
.button-circle.app {
- background-color: unset;
- background-size: 100% 100%;
- width: 136rpx;
- height: 136rpx;
+ background-color: unset;
+ background-size: 100% 100%;
+ width: 136rpx;
+ height: 136rpx;
}
-
+
// #endif
.flex-w100 {
- min-width: 100%;
+ min-width: 100%;
}
-
+
.p-b-20 {
- padding-bottom: 40rpx;
+ padding-bottom: 40rpx;
}
-
+
.app-container {
- min-height: calc(100vh - 100rpx);
- height: 100%;
- background-color: rgba(247, 247, 247, 1);
+ min-height: calc(100vh - 100rpx);
+ height: 100%;
+ background-color: rgba(247, 247, 247, 1);
}
-
+
.msg-tip {
- font-size: 24rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- color: #999999;
- line-height: 34rpx;
+ font-size: 24rpx;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ color: #999999;
+ line-height: 34rpx;
}
-
+
.top-search-button {
- color: #fff;
- text-align: center;
- line-height: 80rpx;
- height: 80rpx;
+ color: #fff;
+ text-align: center;
+ line-height: 80rpx;
+ height: 80rpx;
}
-
+
.form-item .required::before {
- content: "*";
- color: red;
+ content: "*";
+ color: red;
}
-
+
.self-form-item .required::before {
- content: "*";
- color: red;
+ content: "*";
+ color: red;
}
-
+
.file-text {
- color: #3140A2;
- word-break: break-all;
-
+ color: #3140A2;
+ word-break: break-all;
+
}
-
+
.v-center {
- align-items: center;
+ align-items: center;
}
-
+
.t-grey {
- color: #999999;
+ color: #999999;
}
-
+
.button-text {
- text-align: center;
- color: #3140A2;
-
- width: 100rpx;
- font-size: 36rpx;
- cursor: pointer;
- text-align: center;
- font-weight: 400;
- line-height: 100rpx;
- border: 2rpx solid #3140A2;
+ text-align: center;
+ color: #3140A2;
+
+ width: 100rpx;
+ font-size: 36rpx;
+ cursor: pointer;
+ text-align: center;
+ font-weight: 400;
+ line-height: 100rpx;
+ border: 2rpx solid #3140A2;
}
-
+
.button-bind {
- text-align: center;
- color: #3140A2;
- width: 160rpx;
- font-size: 28rpx;
- cursor: pointer;
- text-align: center;
- font-weight: 400;
- line-height: 60rpx;
- border: 2rpx solid #3140A2;
- border-radius: 40rpx;
- background-color: rgb(244, 247, 254);
+ text-align: center;
+ color: #3140A2;
+ width: 160rpx;
+ font-size: 28rpx;
+ cursor: pointer;
+ text-align: center;
+ font-weight: 400;
+ line-height: 60rpx;
+ border: 2rpx solid #3140A2;
+ border-radius: 40rpx;
+ background-color: rgb(244, 247, 254);
}
-
+
.button-bind-1 {
- background-color: #3140A2;
- color: #fff;
+ background-color: #3140A2;
+ color: #fff;
}
-
+
.button-fixed-bottom {
- position: fixed;
- bottom: 60rpx;
- left: 40rpx;
- right: 40rpx;
- z-index: 1;
+ position: fixed;
+ bottom: 60rpx;
+ left: 40rpx;
+ right: 40rpx;
+ z-index: 1;
}
-
+
.close-parent {
- position: relative;
- font-weight: 600;
- font-size: 32rpx;
- color: #000000;
- text-align: center;
-
- .close {
- position: absolute;
- right: 40rpx;
- top: calc(50% - 24rpx);
- }
+ position: relative;
+ font-weight: 600;
+ font-size: 32rpx;
+ color: #000000;
+ text-align: center;
+
+ .close {
+ position: absolute;
+ right: 40rpx;
+ top: calc(50% - 24rpx);
+ }
}
-
+
.common-select-items {
- .common-select-item {
-
- }
+ .common-select-item {}
}
-
+
.uni-noticebar {
- border-radius: 10rpx;
- height: 82rpx;
-
- .self-uni-notice-bar-icon-left {
- width: 38rpx;
- height: 38rpx;
- margin-right: 16rpx;
- }
-
- .self-uni-notice-bar-icon {
- width: 16rpx;
- height: 24rpx;
- }
+ border-radius: 10rpx;
+ height: 82rpx;
+
+ .self-uni-notice-bar-icon-left {
+ width: 38rpx;
+ height: 38rpx;
+ margin-right: 16rpx;
+ }
+
+ .self-uni-notice-bar-icon {
+ width: 16rpx;
+ height: 24rpx;
+ }
}
-
+
.button-green {
- width: 302rpx;
- height: 80rpx;
- background: var(--topicolor);
- border-radius: 62rpx;
-
- font-size: 32rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 600;
- color: #FFFFFF;
- line-height: 80rpx;
- text-align: center;
- // margin: 0 auto;
- margin-left: auto;
- margin-right: auto;
- display: block;
+ width: 302rpx;
+ height: 80rpx;
+ background: var(--topicolor);
+ border-radius: 62rpx;
+
+ font-size: 32rpx;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 600;
+ color: #FFFFFF;
+ line-height: 80rpx;
+ text-align: center;
+ // margin: 0 auto;
+ margin-left: auto;
+ margin-right: auto;
+ display: block;
}
-
+
.button-grey {
- width: 440rpx;
- height: 92rpx;
- border-radius: 62rpx;
- border: 2rpx solid #666666;
- font-size: 32rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 92rpx;
- display: block;
- margin: 0 auto;
+ width: 440rpx;
+ height: 92rpx;
+ border-radius: 62rpx;
+ border: 2rpx solid #666666;
+ font-size: 32rpx;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ color: #666666;
+ line-height: 92rpx;
+ display: block;
+ margin: 0 auto;
}
-
+
.close-parent {
- position: relative;
- font-size: 28rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 600;
- color: #000000;
- line-height: 40rpx;
- // margin-bottom: 34rpx;
- text-align: center;
-
- .close {
- position: absolute;
- right: 0rpx;
-
- }
+ position: relative;
+ font-size: 28rpx;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 600;
+ color: #000000;
+ line-height: 40rpx;
+ // margin-bottom: 34rpx;
+ text-align: center;
+
+ .close {
+ position: absolute;
+ right: 0rpx;
+
+ }
}
-
+
.form {
- .form-item {
- display: flex;
- border-bottom: 2rpx solid #EEEEEE;
- height: 36rpx;
- line-height: 36rpx;
- padding-top: 30rpx;
- padding-bottom: 30rpx;
- position: relative;
-
- .require::before {
- content: '*';
- color: red;
- }
-
- .form-item-label {
- position: absolue;
- width: 160rpx;
- font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
- font-weight: 600;
- text-align: left;
- font-style: normal;
- }
-
- .form-item-value {
- font-size: 28rpx;
- }
- }
+ .form-item {
+ display: flex;
+ border-bottom: 2rpx solid #EEEEEE;
+ height: 36rpx;
+ line-height: 36rpx;
+ padding-top: 30rpx;
+ padding-bottom: 30rpx;
+ position: relative;
+
+ .require::before {
+ content: '*';
+ color: red;
+ }
+
+ .form-item-label {
+ position: absolue;
+ width: 160rpx;
+ font-size: 28rpx;
+ color: #000000;
+ line-height: 40rpx;
+ font-weight: 600;
+ text-align: left;
+ font-style: normal;
+ }
+
+ .form-item-value {
+ font-size: 28rpx;
+ }
+ }
}
-
+
.footer-shop {
- width: 690rpx;
- height: 92rpx;
- line-height: 92rpx;
- background: #04BA97;
- border-radius: 62rpx;
-
- .total {
- margin-left: 40rpx;
- width: 104rpx;
- font-size: 28rpx;
- color: #FFFFFF;
-
- }
-
- .price {
- margin-left: 8rpx;
- font-weight: 600;
- font-size: 50rpx;
- color: #FFFFFF;
- line-height: 84rpx;
- }
-
- .txt {
- font-weight: 600;
- font-size: 32rpx;
- color: #FFFFFF;
- margin-right: 72rpx;
- margin-left: auto;
- }
+ width: 690rpx;
+ height: 92rpx;
+ line-height: 92rpx;
+ background: #04BA97;
+ border-radius: 62rpx;
+
+ .total {
+ margin-left: 40rpx;
+ width: 104rpx;
+ font-size: 28rpx;
+ color: #FFFFFF;
+
+ }
+
+ .price {
+ margin-left: 8rpx;
+ font-weight: 600;
+ font-size: 50rpx;
+ color: #FFFFFF;
+ line-height: 84rpx;
+ }
+
+ .txt {
+ font-weight: 600;
+ font-size: 32rpx;
+ color: #FFFFFF;
+ margin-right: 72rpx;
+ margin-left: auto;
+ }
}
-
+
.radio {
- width: 22rpx;
- height: 22rpx;
- border-radius: 50%;
- border: 1rpx solid #999999
+ width: 22rpx;
+ height: 22rpx;
+ border-radius: 50%;
+ border: 1rpx solid #999999
}
-
+
.radio.select {
- background: #04BA97;
- border: 1rpx solid #04BA97
-
+ background: #04BA97;
+ border: 1rpx solid #04BA97
}
-
-
+
+
// 表单的
.popup-form {
- background-color: #FFFFFF;
- padding: 30rpx;
-
- .form-vars {
- margin-top: 36rpx;
- margin-bottom: 56rpx;
-
- .title {
- font-weight: 600;
- font-size: 40rpx;
- color: #000000;
- line-height: 56rpx;
- }
-
- .var-title {
- font-weight: 600;
- font-size: 32rpx;
- color: #000000;
- line-height: 44rpx;
- margin-top: 38rpx;
- }
-
- .var-items {
- display: flex;
- flex-wrap: wrap;
-
- .var-item {
- min-width: 82rpx;
- padding-left: 10rpx;
- padding-right: 10rpx;
- height: 56rpx;
- line-height: 56rpx;
- border-radius: 8rpx;
- border: 2rpx solid #CECECE;
- font-size: 24rpx;
- color: #000000;
- text-align: center;
- margin-right: 16rpx;
- margin-top: 8rpx;
- }
-
- .var-item.cur {
- border: 2rpx solid #fff;
- background-color: #04BA97;
- color: #fff;
- font-weight: 600;
- }
- }
-
- }
-
- .cover-img {
- width: 690rpx;
- height: 394rpx;
- }
+ background-color: #FFFFFF;
+ padding: 30rpx;
+
+ .form-vars {
+ margin-top: 36rpx;
+ margin-bottom: 56rpx;
+
+ .title {
+ font-weight: 600;
+ font-size: 40rpx;
+ color: #000000;
+ line-height: 56rpx;
+ }
+
+ .var-title {
+ font-weight: 600;
+ font-size: 32rpx;
+ color: #000000;
+ line-height: 44rpx;
+ margin-top: 38rpx;
+ }
+
+ .var-items {
+ display: flex;
+ flex-wrap: wrap;
+
+ .var-item {
+ min-width: 82rpx;
+ padding-left: 10rpx;
+ padding-right: 10rpx;
+ height: 56rpx;
+ line-height: 56rpx;
+ border-radius: 8rpx;
+ border: 2rpx solid #CECECE;
+ font-size: 24rpx;
+ color: #000000;
+ text-align: center;
+ margin-right: 16rpx;
+ margin-top: 8rpx;
+ }
+
+ .var-item.cur {
+ border: 2rpx solid #fff;
+ background-color: #04BA97;
+ color: #fff;
+ font-weight: 600;
+ }
+ }
+
+ }
+
+ .cover-img {
+ width: 690rpx;
+ height: 394rpx;
+ }
}
-
+
.v-line {
- height: 4rpx;
- // border: 2rpx solid #EEEEEE;
- background: #EEEEEE;
- margin-top: 22rpx;
- margin-bottom: 22rpx;
+ height: 4rpx;
+ // border: 2rpx solid #EEEEEE;
+ background: #EEEEEE;
+ margin-top: 22rpx;
+ margin-bottom: 22rpx;
}
-
+
.icon-down {
- transform: rotate(90deg);
+ transform: rotate(90deg);
}
-
+
.info-brand {
- padding: 20rpx 30rpx;
- //padding: 10rpx;
- background: #fff;
-
- .name {
- margin-bottom: 22rpx;
- font-weight: 600;
- }
-
- .store-logo {
- width: 96rpx;
- height: 96rpx;
- border-radius: 50%;
- margin-right: 20rpx;
- }
-
- .store-name {
- font-weight: 600;
- font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
- }
-
- .store-address {
- font-weight: 400;
- font-size: 24rpx;
- color: #666666;
- line-height: 34rpx;
- }
-
- .store-to {
- width: 172rpx;
- height: 52rpx;
- background: #E1F0E7;
- border-radius: 4rpx;
- font-weight: 400;
- font-size: 24rpx;
- color: #5B8C71;
- line-height: 52rpx;
- text-align: center;
- }
-
- .store-sc {
- width: 176rpx;
- height: 64rpx;
- background: #39AF6E;
- border-radius: 32rpx;
- font-weight: 400;
- font-size: 32rpx;
- color: #FFFFFF;
- line-height: 64rpx;
- display: flex;
- .icon-view {
- margin-top: 4rpx;
- margin-left: 30rpx;
- margin-right: 10rpx;
- }
-
- .icon {
- width: 36rpx;
- height: 36rpx;
-
- display: inline-block;
- }
- }
+ padding: 20rpx 30rpx;
+ //padding: 10rpx;
+ // background: #fff;
+
+ .name {
+ margin-bottom: 22rpx;
+ font-weight: 600;
+ }
+
+ .store-logo {
+ width: 114rpx;
+ height: 114rpx;
+ border-radius: 50%;
+ margin-right: 20rpx;
+ border: 2rpx solid #FFFFFF;
+ background-size: 100% 100%;
+ background-color: #fff;
+ }
+
+ .store-name {
+ font-weight: 600;
+ font-size: 36rpx;
+ color: #FFFFFF;
+ line-height: 40rpx;
+ margin-top: 20rpx;
+ }
+ .store-name.t1 {
+ color: #666;
+ }
+
+ .store-address {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #FFFFFF;
+ line-height: 34rpx;
+ margin-top: 8rpx;
+ }
+ .store-address.t1 {
+ color: #666;
+ }
+
+ .store-to {
+ width: 172rpx;
+ height: 52rpx;
+ background: #E1F0E7;
+ border-radius: 4rpx;
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #5B8C71;
+ line-height: 52rpx;
+ text-align: center;
+ }
+
+ .store-sc {
+ width: 176rpx;
+ height: 64rpx;
+ background: #39AF6E;
+ border-radius: 32rpx;
+ font-weight: 400;
+ font-size: 32rpx;
+ color: #FFFFFF;
+ line-height: 64rpx;
+ display: flex;
+
+ .icon-view {
+ // margin-top: 8rpx;
+ margin-left: 30rpx;
+ margin-right: 10rpx;
+ }
+
+ .icon {
+ width: 36rpx;
+ height: 36rpx;
+
+ display: inline-block;
+ vertical-align: middle;
+ }
+ }
}
-
+
.text-left {
- text-align: left;
+ text-align: left;
}
-
+
.img100 {
- background-size: 100% 100%;
+ background-size: 100% 100%;
}
-
+
.infocontainar {
- width: 100vw;
- height: calc(100vh - 300rpx);
- background: #fff;
- box-sizing: border-box;
- padding: 0 30rpx;
-
- .avatarUrl {
- padding: 80rpx 0 40rpx;
- background: #fff;
-
- button {
- background: #fff;
- line-height: 80rpx;
- height: auto;
- border: none !important;
- width: auto;
- // padding: 20rpx 30rpx;
- margin: 0;
- display: flex;
- border: none;
- justify-content: center;
- align-items: center;
-
- &::after {
- border: none;
- }
-
- .refreshIcon {
- width: 160rpx;
- height: 160rpx;
- border-radius: 50%;
- background-color: #ccc;
- border: 1px solid #e0dfdf;
- }
-
- .jt {
- width: 14rpx;
- height: 28rpx;
- }
- }
- }
-
- .userName {
- background: #fff;
- padding: 20rpx 30rpx 80rpx;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .weui-input {
- padding-left: 60rpx;
- padding-bottom: 20rpx;
- border-bottom: 1px solid darkgray;
- }
- }
-
- .btn {
- margin-top: 30rpx;
- }
+ width: 100vw;
+ height: calc(100vh - 300rpx);
+ background: #fff;
+ box-sizing: border-box;
+ padding: 0 30rpx;
+
+ .avatarUrl {
+ padding: 80rpx 0 40rpx;
+ background: #fff;
+
+ button {
+ background: #fff;
+ line-height: 80rpx;
+ height: auto;
+ border: none !important;
+ width: auto;
+ // padding: 20rpx 30rpx;
+ margin: 0;
+ display: flex;
+ border: none;
+ justify-content: center;
+ align-items: center;
+
+ &::after {
+ border: none;
+ }
+
+ .refreshIcon {
+ width: 160rpx;
+ height: 160rpx;
+ border-radius: 50%;
+ background-color: #ccc;
+ border: 1px solid #e0dfdf;
+ }
+
+ .jt {
+ width: 14rpx;
+ height: 28rpx;
+ }
+ }
+ }
+
+ .userName {
+ background: #fff;
+ padding: 20rpx 30rpx 80rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ .weui-input {
+ padding-left: 60rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1px solid darkgray;
+ }
+ }
+
+ .btn {
+ margin-top: 30rpx;
+ }
}
-
-
+
+
.img100 {
- background-size: 100% 100%;
+ background-size: 100% 100%;
}
-
- uni-image > img {
- opacity: 1 !important;
+
+ uni-image>img {
+ opacity: 1 !important;
}
-
+
.component-radio {
- width: 26rpx;
- height: 26rpx;
- min-width: 26rpx;
- min-height: 26rpx;
- border-radius: 50%;
- border: 2rpx solid #20613D;
-
- &.cur {
- background-color: #20613D;
- }
+ width: 26rpx;
+ height: 26rpx;
+ min-width: 26rpx;
+ min-height: 26rpx;
+ border-radius: 50%;
+ border: 2rpx solid #20613D;
+
+ &.cur {
+ background-color: #20613D;
+ }
}
</style>
\ No newline at end of file
diff --git a/components/top-tabs.vue b/components/top-tabs.vue
index ab18eb9..5779e66 100644
--- a/components/top-tabs.vue
+++ b/components/top-tabs.vue
@@ -68,7 +68,9 @@
bottom: 8rpx;
// width: 110rpx;
height: 8rpx;
- background: #04BA97;
+ // background: #04BA97;
+ background: #ffffff;
+
border-radius: 4rpx;
}
}
diff --git a/pages/home/components/home-price.vue b/pages/home/components/home-price.vue
index 266fba3..2ee596c 100644
--- a/pages/home/components/home-price.vue
+++ b/pages/home/components/home-price.vue
@@ -9,33 +9,33 @@
<view class="item flex1">
<view class="title">{{list1[0]&&list1[0].name||''}}</view>
<view class="price">
- {{list1[0]&&list1[0].avePrice||'-'}}
+ {{list1[0]&&list1[0].avePrice||''}}
</view>
<view class="flex desc" v-if="list1[0]">
- <view class="m-l-a m-r-a">{{list1[0]&&list1[0].avePriceDifference<0?'-':'+'}}{{list1[0]&&list1[0].avePriceDifference||''}}</view>
- <view class="m-l-a m-r-a text-right">{{list1[0]&&list1[0].avePriceDifferenceRate<0?'-':'+'}}{{list1[0]&&list1[0].avePriceDifferenceRate*100||''}}%</view>
+ <view class="m-l-a m-r-a">{{list1[0]&&list1[0].avePriceDifference<0?'':'+'}}{{list1[0]&&list1[0].avePriceDifference||'0'}}</view>
+ <view class="m-l-a m-r-a text-right">{{list1[0]&&list1[0].avePriceDifferenceRate<0?'':'+'}}{{list1[0]&&list1[0].avePriceDifferenceRate*100||''}}%</view>
</view>
</view>
<view class="line"></view>
<view class="item flex1">
<view class="title">{{list1[1]&&list1[1].name||''}}</view>
<view class="price">
- {{list1[1]&&list1[1].avePrice||'-'}}
+ {{list1[1]&&list1[1].avePrice||''}}
</view>
<view class="flex desc" v-if="list1[1]">
- <view class="m-l-a m-r-a">{{list1[1]&&list1[1].avePriceDifference<0?'-':'+'}}{{list1[1]&&list1[1].avePriceDifference||''}}</view>
- <view class="m-l-a m-r-a text-right">{{list1[1]&&list1[1].avePriceDifferenceRate<0?'-':'+'}}{{list1[1]&&list1[1].avePriceDifferenceRate*100||''}}%</view>
+ <view class="m-l-a m-r-a">{{list1[1]&&list1[1].avePriceDifference<0?'':'+'}}{{list1[1]&&list1[1].avePriceDifference||''}}</view>
+ <view class="m-l-a m-r-a text-right">{{list1[1]&&list1[1].avePriceDifferenceRate<0?'':'+'}}{{list1[1]&&list1[1].avePriceDifferenceRate*100||''}}%</view>
</view>
</view>
<view class="line"></view>
<view class="item flex1">
<view class="title">{{list1[2]&&list1[2].name||''}}</view>
<view class="price">
- {{list1[2]&&list1[2].avePrice||'-'}}
+ {{list1[2]&&list1[2].avePrice||''}}
</view>
<view class="flex desc" v-if="list1[2]">
- <view class="m-l-a m-r-a">{{list1[2]&&list1[2].avePriceDifference<0?'-':'+'}}{{list1[2]&&list1[2].avePriceDifference||''}}</view>
- <view class="m-l-a m-r-a text-right">{{list1[2]&&list1[2].avePriceDifferenceRate<0?'-':'+'}}{{list1[2]&&list1[2].avePriceDifferenceRate*100||''}}%</view>
+ <view class="m-l-a m-r-a">{{list1[2]&&list1[2].avePriceDifference<0?'':'+'}}{{list1[2]&&list1[2].avePriceDifference||''}}</view>
+ <view class="m-l-a m-r-a text-right">{{list1[2]&&list1[2].avePriceDifferenceRate<0?'':'+'}}{{list1[2]&&list1[2].avePriceDifferenceRate*100||''}}%</view>
</view>
</view>
</view>
@@ -44,33 +44,33 @@
<view class="item flex1">
<view class="title">{{list2[0]&&list2[0].name||''}}</view>
<view class="price">
- {{list2[0]&&list2[0].avePrice||'-'}}
+ {{list2[0]&&list2[0].avePrice||''}}
</view>
<view class="flex desc" v-if="list2[0]">
- <view class="m-l-a m-r-a">{{list2[0]&&list2[0].avePriceDifference<0?'-':'+'}}{{list2[0]&&list2[0].avePriceDifference||''}}</view>
- <view class="m-l-a m-r-a text-right">{{list2[0]&&list2[0].avePriceDifferenceRate<0?'-':'+'}}{{list2[0]&&list2[0].avePriceDifferenceRate*100||''}}%</view>
+ <view class="m-l-a m-r-a">{{list2[0]&&list2[0].avePriceDifference<0?'':'+'}}{{list2[0]&&list2[0].avePriceDifference||''}}</view>
+ <view class="m-l-a m-r-a text-right">{{list2[0]&&list2[0].avePriceDifferenceRate<0?'':'+'}}{{list2[0]&&list2[0].avePriceDifferenceRate*100||''}}%</view>
</view>
</view>
<view class="line"></view>
<view class="item flex1">
<view class="title">{{list2[1]&&list2[1].name||''}}</view>
<view class="price">
- {{list2[1]&&list2[1].avePrice||'-'}}
+ {{list2[1]&&list2[1].avePrice||''}}
</view>
<view class="flex desc" v-if="list2[1]">
- <view class="m-l-a m-r-a">{{list2[1]&&list2[1].avePriceDifference<0?'-':'+'}}{{list2[1]&&list2[1].avePriceDifference||''}}</view>
- <view class="m-l-a m-r-a text-right">{{list2[1]&&list2[1].avePriceDifferenceRate<0?'-':'+'}}{{list2[1]&&list2[1].avePriceDifferenceRate*100||''}}%</view>
+ <view class="m-l-a m-r-a">{{list2[1]&&list2[1].avePriceDifference<0?'':'+'}}{{list2[1]&&list2[1].avePriceDifference||''}}</view>
+ <view class="m-l-a m-r-a text-right">{{list2[1]&&list2[1].avePriceDifferenceRate<0?'':'+'}}{{list2[1]&&list2[1].avePriceDifferenceRate*100||''}}%</view>
</view>
</view>
<view class="line"></view>
<view class="item flex1">
<view class="title">{{list2[2]&&list2[2].name||''}}</view>
<view class="price">
- {{list2[2]&&list2[2].avePrice||'-'}}
+ {{list2[2]&&list2[2].avePrice||''}}
</view>
<view class="flex desc" v-if="list2[2]">
- <view class="m-l-a m-r-a">{{list2[2]&&list2[2].avePriceDifference<0?'-':'+'}}{{list2[2]&&list2[2].avePriceDifference||''}}</view>
- <view class="m-l-a m-r-a text-right">{{list2[2]&&list2[2].avePriceDifferenceRate<0?'-':'+'}}{{list2[2]&&list2[2].avePriceDifferenceRate*100||''}}%</view>
+ <view class="m-l-a m-r-a">{{list2[2]&&list2[2].avePriceDifference<0?'':'+'}}{{list2[2]&&list2[2].avePriceDifference||''}}</view>
+ <view class="m-l-a m-r-a text-right">{{list2[2]&&list2[2].avePriceDifferenceRate<0?'':'+'}}{{list2[2]&&list2[2].avePriceDifferenceRate*100||''}}%</view>
</view>
</view>
</view>
diff --git a/pages/home/components/home-top-flow.vue b/pages/home/components/home-top-flow.vue
index af9a79c..6694506 100644
--- a/pages/home/components/home-top-flow.vue
+++ b/pages/home/components/home-top-flow.vue
@@ -6,7 +6,7 @@
:src="item.cover">
</image>
<view class="level">
- {{ ite.levelStr}}
+ {{ item.levelStr}}
</view>
</view>
diff --git a/pages/login/supplier-login.vue b/pages/login/supplier-login.vue
index 2806c85..96c7a4a 100644
--- a/pages/login/supplier-login.vue
+++ b/pages/login/supplier-login.vue
@@ -188,7 +188,7 @@
},
toHome(){
uni.redirectTo({
- url: '/pages//pages/home/home'
+ url: '/pages/home/home'
})
},
toReg() {
diff --git a/pages/order/order.vue b/pages/order/order.vue
index 33e9d8c..deecabc 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -113,6 +113,8 @@
.order-item {
margin-bottom: 20rpx;
padding: 28rpx;
+ background-color: #fff;
+ border-radius: 8rpx;
.title {
font-weight: 600;
diff --git a/pages/user/supplier-user.vue b/pages/user/supplier-user.vue
index da328c0..bd6f55a 100644
--- a/pages/user/supplier-user.vue
+++ b/pages/user/supplier-user.vue
@@ -1,184 +1,186 @@
<template>
- <view class="main-container user-container">
- <!-- <view>
+ <view class="main-container user-container">
+ <!-- <view>
我的
</view> -->
- <!-- 背景图 -->
- <view class="top-bg img100 relative" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }">
- <image class="component-bg"
- src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.png"
- mode="scaleToFill"/>
+ <!-- 背景图 -->
+ <view class="top-bg img100 relative" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }">
+ <image class="component-bg"
+ src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.png"
+ mode="scaleToFill" />
- <view class="title" style="position: relative;">
- 个人中心
+ <view class="title" style="position: relative;">
+ 个人中心
- </view>
- <!-- v-if="currentInfo&&(currentInfo.id)" -->
- <view class="flex user-info">
- <!-- 头像 -->
- <image class="user-icon" v-if="!currentInfo.picture"
- src='https://youzhen123.oss-cn-huhehaote.aliyuncs.com/WechatOwnerProperty/images/mrtx.png'
- mode="aspectFit"></image>
- <image class="user-icon" v-if="currentInfo.picture" :src="currentInfo.picture" mode="aspectFit"></image>
+ </view>
+ <!-- v-if="currentInfo&&(currentInfo.id)" -->
+ <view class="flex user-info">
+ <!-- 头像 -->
+ <image class="user-icon" v-if="currentInfo.picture
+ ||currentInfo.customerDTO&¤tInfo.customerDTO.cover
+ ||currentInfo.supplierDTO&¤tInfo.supplierDTO.cover
+ " :src="currentInfo.picture
+ ||currentInfo.customerDTO&¤tInfo.customerDTO.cover
+ ||currentInfo.supplierDTO&¤tInfo.supplierDTO.cover" mode="aspectFit"></image>
+ <image class="user-icon" v-else
+ src='https://youzhen123.oss-cn-huhehaote.aliyuncs.com/WechatOwnerProperty/images/mrtx.png'
+ mode="aspectFit"></image>
- <view class="name" v-if="currentInfo.id">
- <view class="t1">
- {{
- (!!currentInfo.supplierDTO ? (currentInfo.supplierDTO.name) : "") || currentInfo.nickName || currentInfo.loginName || '-'
- }}<span
- v-if="currentInfo.supplierDTO&¤tInfo.supplierDTO.status!=='P'">
+ <view class="name" v-if="currentInfo.id">
+ <view class="t1">
+ {{
+ (!!currentInfo.supplierDTO ? (currentInfo.supplierDTO.name) : "") || (!!currentInfo.customerDTO ? (currentInfo.customerDTO.name) : "") || currentInfo.nickName || currentInfo.loginName || '-'
+ }}<span v-if="currentInfo.supplierDTO&¤tInfo.supplierDTO.status!=='P'">
({{ currentInfo.supplierDTO ? currentInfo.supplierDTO.statusStr : '' }})</span>
- </view>
- <view class="t2">{{ currentInfo.tel || '暂无电话' }}</view>
- </view>
- <view class="name" v-if="!currentInfo.id" open-type="getUserInfo" @click.stop="toCustomerLogin"
- style="font-size: 48rpx;margin-top: 16rpx;">
- <!-- getUserProfile -->
- {{ '点击登陆' }}
- </view>
- <image class="icon-setting" src="../../static/common/icon-setting.png" mode="aspectFit"></image>
- </view>
- <!-- #ifdef PUB_CUSTOMER -->
- <view class="customer-info-records">
- <view class="item">
- <view class="num">{{ tj.collectNum || 0 }}</view>
- <view class="name">我的收藏</view>
- </view>
- <view class="line"></view>
- <view class="item">
- <view class="num">{{ tj.followNum || 0 }}</view>
- <view class="name">关注店铺</view>
- </view>
- <view class="line"></view>
- <view class="item">
- <view class="num">{{ tj.browseNum || 0 }}</view>
- <view class="name">浏览记录</view>
- </view>
- </view>
- <!-- #endif -->
+ </view>
+ <view class="t2">{{ currentInfo.tel || '暂无电话' }}</view>
+ </view>
+ <view class="name" v-if="!currentInfo.id" open-type="getUserInfo" @click.stop="toCustomerLogin"
+ style="font-size: 48rpx;margin-top: 16rpx;">
+ <!-- getUserProfile -->
+ {{ '点击登陆' }}
+ </view>
+ <image class="icon-setting" src="../../static/common/icon-setting.png" mode="aspectFit"></image>
+ </view>
+ <!-- #ifdef PUB_CUSTOMER -->
+ <view class="customer-info-records">
+ <view class="item">
+ <view class="num">{{ tj.collectNum || 0 }}</view>
+ <view class="name">我的收藏</view>
+ </view>
+ <view class="line"></view>
+ <view class="item">
+ <view class="num">{{ tj.followNum || 0 }}</view>
+ <view class="name">关注店铺</view>
+ </view>
+ <view class="line"></view>
+ <view class="item">
+ <view class="num">{{ tj.browseNum || 0 }}</view>
+ <view class="name">浏览记录</view>
+ </view>
+ </view>
+ <!-- #endif -->
- </view>
- <!-- #ifdef PUB_CUSTOMER -->
- <view class="user-utils m-20 user-customer-order-infos" v-if="selftype==='customer'||!selftype">
- <view class="user-util m-t-12">
- <view class="title flex">
- <view class="flex1">我的订单</view>
- <view class="m-r-a m-r-0 more" @click="goto('/pages/order/order',true)">全部订单
- <uni-icons class="" type="right"
- size="12"></uni-icons>
- </view>
- </view>
- <view class="flex order-icons-container">
- <view class="order-icons" @click="goto('/pages/order/order?status=PENDING',true)">
- <image src="../../static/images/customer/order/order-type-1.png" class="order-icon dfk"></image>
- <view>待付款</view>
- </view>
- <view class="order-icons" @click="goto('/pages/order/order?status=SEND',true)">
- <image src="../../static/images/customer/order/order-type-2.png" class="order-icon dfh"></image>
- <view>待发货</view>
- </view>
- <view class="order-icons" @click="goto('/pages/order/order?status=RECEIVE',true)">
- <image src="../../static/images/customer/order/order-type-3.png" class="order-icon dsh"></image>
- <view>待收货</view>
- </view>
- <view class="order-icons" @click="goto('/pages/order/order?status=EVALUATE',true)">
- <image src="../../static/images/customer/order/order-type-4.png" class="order-icon dpj"></image>
- <view>待评价</view>
- </view>
- <view class="order-icons" @click="goto('/pages/order/order?status=COMPLETED',true)">
- <image src="../../static/images/customer/order/order-type-5.png" class="order-icon sh"></image>
- <view>售后</view>
- </view>
- </view>
- </view>
- </view>
- <view class="user-utils m-20" v-if="selftype==='customer'||!selftype">
- <view class="user-util m-t-12 user-customer-service-infos">
- <view class="title flex">
- <view>我的服务</view>
- </view>
- <view class="flex service-icons-container">
- <view class="service-icons" @click="goto('/sub_pages/customer/self/follow',true)">
- <image src="../../static/images/customer/service/service-icon-1.png" class="service-icon ">
- </image>
- <view>关注店铺</view>
- </view>
- <view class="service-icons" @click="goto('/sub_pages/customer/self/collect',true)">
- <image src="../../static/images/customer/service/service-icon-2.png" class="service-icon ">
- </image>
- <view>我的收藏</view>
- </view>
- <view class="service-icons" @click="goto('/pages/user/address/address',true)">
- <image src="../../static/images/customer/service/service-icon-3.png" class="service-icon ">
- </image>
- <view>地址管理</view>
- </view>
- <view class="service-icons" @click.stop="$meesage.showToast('敬请期待')" >
- <image src="../../static/images/customer/service/service-icon-4.png" class="service-icon ">
- </image>
- <view>售后规则</view>
- </view>
- </view>
- <view class="flex service-icons-container" >
- <view class="service-icons" @click.stop="$meesage.showToast('敬请期待')" >
- <image src="../../static/images/customer/service/service-icon-5.png" class="t2 service-icon ">
- </image>
- <view>新手帮助</view>
- </view>
- <view class="service-icons" @click.stop="$meesage.showToast('敬请期待')" >
- <image src="../../static/images/customer/service/service-icon-6.png" class="t2 service-icon ">
- </image>
- <view>运费详查</view>
- </view>
- <view class="service-icons"></view>
- <view class="service-icons"></view>
- </view>
- </view>
- </view>
- <!-- #endif -->
- <view class="user-utils m-20">
- <view class="user-util m-t-12 flex" @click="goto('/sub_pages/customer/customer-info/customer-info',true)">
- <view class="title">个人信息</view>
- <view class="right-icon">
- <uni-icons type="right"></uni-icons>
- </view>
- </view>
- <view class="user-util m-t-12 flex" v-if="selftype==='partner'"
- @click="goto('/sub_pages/partner/partner-info/partner-info',true)">
- <view class="title">合伙人信息</view>
- <view class="right-icon">
- <uni-icons type="right"></uni-icons>
- </view>
- </view>
- <view class="user-util m-t-12 flex" v-if="selftype==='supplier'"
- @click="goto('/sub_pages/supplier/supplier-info/supplier-info',true)">
- <view class="title">店铺信息</view>
- <view class="right-icon">
- <uni-icons type="right"></uni-icons>
- </view>
- </view>
- <view class="user-util m-t-12 flex" @click="goto('/pages/user/user-pwd/user-pwd',true)">
- <view class="title">修改密码</view>
- <view class="right-icon">
- <uni-icons type="right"></uni-icons>
- </view>
- </view>
- <view class="user-util m-t-12 "
- v-if="selftype==='supplier'||selftype==='customer' || !selftype">
- <view class="title">我的客服</view>
- <view class="flex">
- <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image>
- <view class="name" @click="callTel">
- 客服电话 : <span class="topic-gray">{{ tel }}</span>
- </view>
- <view class="right-icon" open-type="contact">
- <uni-icons type="right"></uni-icons>
- </view>
- </view>
- </view>
- <!-- <view class="user-util m-t-12 " @click="callTel" v-if="selftype==='partner'">
+ </view>
+ <!-- #ifdef PUB_CUSTOMER -->
+ <view class="user-utils m-20 user-customer-order-infos" v-if="selftype==='customer'||!selftype">
+ <view class="user-util m-t-12">
+ <view class="title flex">
+ <view class="flex1">我的订单</view>
+ <view class="m-r-a m-r-0 more" @click="goto('/pages/order/order',true)">全部订单
+ <uni-icons class="" type="right" size="12"></uni-icons>
+ </view>
+ </view>
+ <view class="flex order-icons-container">
+ <view class="order-icons" @click="goto('/pages/order/order?status=PENDING',true)">
+ <image src="../../static/images/customer/order/order-type-1.png" class="order-icon dfk"></image>
+ <view>待付款</view>
+ </view>
+ <view class="order-icons" @click="goto('/pages/order/order?status=SEND',true)">
+ <image src="../../static/images/customer/order/order-type-2.png" class="order-icon dfh"></image>
+ <view>待发货</view>
+ </view>
+ <view class="order-icons" @click="goto('/pages/order/order?status=RECEIVE',true)">
+ <image src="../../static/images/customer/order/order-type-3.png" class="order-icon dsh"></image>
+ <view>待收货</view>
+ </view>
+ <view class="order-icons" @click="goto('/pages/order/order?status=EVALUATE',true)">
+ <image src="../../static/images/customer/order/order-type-4.png" class="order-icon dpj"></image>
+ <view>待评价</view>
+ </view>
+ <view class="order-icons" @click="goto('/pages/order/order?status=COMPLETED',true)">
+ <image src="../../static/images/customer/order/order-type-5.png" class="order-icon sh"></image>
+ <view>售后</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="user-utils m-20" v-if="selftype==='customer'||!selftype">
+ <view class="user-util m-t-12 user-customer-service-infos">
+ <view class="title flex">
+ <view>我的服务</view>
+ </view>
+ <view class="flex service-icons-container">
+ <view class="service-icons" @click="goto('/sub_pages/customer/self/follow',true)">
+ <image src="../../static/images/customer/service/service-icon-1.png" class="service-icon ">
+ </image>
+ <view>关注店铺</view>
+ </view>
+ <view class="service-icons" @click="goto('/sub_pages/customer/self/collect',true)">
+ <image src="../../static/images/customer/service/service-icon-2.png" class="service-icon ">
+ </image>
+ <view>我的收藏</view>
+ </view>
+ <view class="service-icons" @click="goto('/pages/user/address/address',true)">
+ <image src="../../static/images/customer/service/service-icon-3.png" class="service-icon ">
+ </image>
+ <view>地址管理</view>
+ </view>
+ <view class="service-icons" @click.stop="$meesage.showToast('敬请期待')">
+ <image src="../../static/images/customer/service/service-icon-4.png" class="service-icon ">
+ </image>
+ <view>售后规则</view>
+ </view>
+ </view>
+ <view class="flex service-icons-container">
+ <view class="service-icons" @click.stop="$meesage.showToast('敬请期待')">
+ <image src="../../static/images/customer/service/service-icon-5.png" class="t2 service-icon ">
+ </image>
+ <view>新手帮助</view>
+ </view>
+ <view class="service-icons" @click.stop="$meesage.showToast('敬请期待')">
+ <image src="../../static/images/customer/service/service-icon-6.png" class="t2 service-icon ">
+ </image>
+ <view>运费详查</view>
+ </view>
+ <view class="service-icons"></view>
+ <view class="service-icons"></view>
+ </view>
+ </view>
+ </view>
+ <!-- #endif -->
+ <view class="user-utils m-20">
+ <view class="user-util m-t-12 flex" @click="goto('/sub_pages/customer/customer-info/customer-info',true)">
+ <view class="title">个人信息</view>
+ <view class="right-icon">
+ <uni-icons type="right"></uni-icons>
+ </view>
+ </view>
+ <view class="user-util m-t-12 flex" v-if="selftype==='partner'"
+ @click="goto('/sub_pages/partner/partner-info/partner-info',true)">
+ <view class="title">合伙人信息</view>
+ <view class="right-icon">
+ <uni-icons type="right"></uni-icons>
+ </view>
+ </view>
+ <view class="user-util m-t-12 flex" v-if="selftype==='supplier'"
+ @click="goto('/sub_pages/supplier/supplier-info/supplier-info',true)">
+ <view class="title">店铺信息</view>
+ <view class="right-icon">
+ <uni-icons type="right"></uni-icons>
+ </view>
+ </view>
+ <view class="user-util m-t-12 flex" @click="goto('/pages/user/user-pwd/user-pwd',true)">
+ <view class="title">修改密码</view>
+ <view class="right-icon">
+ <uni-icons type="right"></uni-icons>
+ </view>
+ </view>
+ <view class="user-util m-t-12 " v-if="selftype==='supplier'||selftype==='customer' || !selftype">
+ <view class="title">我的客服</view>
+ <view class="flex">
+ <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image>
+ <view class="name" @click="callTel">
+ 客服电话 : <span class="topic-gray">{{ tel }}</span>
+ </view>
+ <view class="right-icon" open-type="contact">
+ <uni-icons type="right"></uni-icons>
+ </view>
+ </view>
+ </view>
+ <!-- <view class="user-util m-t-12 " @click="callTel" v-if="selftype==='partner'">
<view class="name">
账号: <span class="topic-gray">{{tel}}</span>
</view>
@@ -186,139 +188,139 @@
密码: <span class="topic-gray">{{tel}}</span>
</view>
</view> -->
- </view>
+ </view>
- <!-- #ifdef PUB_CUSTOMER -->
- <view style="padding-bottom:200rpx">
- </view>
- <common-footer flg="3"></common-footer>
+ <!-- #ifdef PUB_CUSTOMER -->
+ <view style="padding-bottom:200rpx">
+ </view>
+ <common-footer flg="3"></common-footer>
- <uni-popup ref="popup_info" type="bottom">
- <view class="popup-form">
+ <uni-popup ref="popup_info" type="bottom">
+ <view class="popup-form">
- <view class="infocontainar">
- <cu-custom bgColor="none" :isBack="false">
- <block slot="content"><span style="color: #333;font-weight: 400;">获取用户头像、昵称</span></block>
- </cu-custom>
+ <view class="infocontainar">
+ <cu-custom bgColor="none" :isBack="false">
+ <block slot="content"><span style="color: #333;font-weight: 400;">获取用户头像、昵称</span></block>
+ </cu-custom>
- <view class="avatarUrl">
- <button type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar">
- <image :src="regAvatarUrl" class="refreshIcon"></image>
- </button>
- </view>
- <view class="userName">
- <text style="padding-bottom: 20rpx;">修改昵称:</text>
- <input :clearable="false" type="nickname" class="weui-input" :value="regUserName" @blur="onBindblur"
- placeholder="请输入昵称" @input="onBindinput"/>
- </view>
+ <view class="avatarUrl">
+ <button type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar">
+ <image :src="regAvatarUrl" class="refreshIcon"></image>
+ </button>
+ </view>
+ <view class="userName">
+ <text style="padding-bottom: 20rpx;">修改昵称:</text>
+ <input :clearable="false" type="nickname" class="weui-input" :value="regUserName"
+ @blur="onBindblur" placeholder="请输入昵称" @input="onBindinput" />
+ </view>
- <view style="width: 100%;height: 1px; background: #EEE;">
+ <view style="width: 100%;height: 1px; background: #EEE;">
- </view>
- <view style="width: 700rpx; height: 20px; font-size: 13px; margin: auto; margin-top: 40rpx;">
- · 申请获取以下权限
- </view>
- <view
- style="width: 700rpx; height: 20px; font-size: 13px; margin: auto; color: #cbcbcb; margin-top: 25rpx;">
- · 获得你的信息(昵称、头像等)
- </view>
+ </view>
+ <view style="width: 700rpx; height: 20px; font-size: 13px; margin: auto; margin-top: 40rpx;">
+ · 申请获取以下权限
+ </view>
+ <view
+ style="width: 700rpx; height: 20px; font-size: 13px; margin: auto; color: #cbcbcb; margin-top: 25rpx;">
+ · 获得你的信息(昵称、头像等)
+ </view>
- <view class="btn">
- <view @click="onWxCheckSubmit" class="button-green">保存</view>
- </view>
+ <view class="btn">
+ <view @click="onWxCheckSubmit" class="button-green">保存</view>
+ </view>
- </view>
- </view>
- </uni-popup>
+ </view>
+ </view>
+ </uni-popup>
- <!-- #endif -->
- <!-- #ifndef PUB_CUSTOMER -->
- <view class="button-login-out topic-gray" @click="clearlogout">
- 退出登录
- </view>
+ <!-- #endif -->
+ <!-- #ifndef PUB_CUSTOMER -->
+ <view class="button-login-out topic-gray" @click="clearlogout">
+ 退出登录
+ </view>
- <view style="padding-bottom:200rpx">
- </view>
- <common-footer flg="1"></common-footer>
- <!-- #endif -->
+ <view style="padding-bottom:200rpx">
+ </view>
+ <common-footer flg="1"></common-footer>
+ <!-- #endif -->
- </view>
+ </view>
</template>
<script>
-export default {
- data() {
- return {
- CustomBar: uni.getStorageSync('CustomBar'),
- StatusBar: uni.getStorageSync('StatusBar'),
- tcode: '',
- inviterName: '',
- // StatusBar:0,
- tel: '15974805814',
- tj: {},
- };
- },
+ export default {
+ data() {
+ return {
+ CustomBar: uni.getStorageSync('CustomBar'),
+ StatusBar: uni.getStorageSync('StatusBar'),
+ tcode: '',
+ inviterName: '',
+ // StatusBar:0,
+ tel: '15974805814',
+ tj: {},
+ };
+ },
- onLoad(options) {
- // const url = options.q ? decodeURIComponent(options.q) : '';
- // const urlcode = options.url && decodeURIComponent(options.url) || ''
+ onLoad(options) {
+ // const url = options.q ? decodeURIComponent(options.q) : '';
+ // const urlcode = options.url && decodeURIComponent(options.url) || ''
- // #ifdef PUB_CUSTOMER
- if (this.currentInfo.id) {
- let that = this
- setTimeout(() => {
- this.$http.request('get', '/api/customer/center/tj', {}).then(res => {
- if (res.code === 0) {
- that.tj = res.data || {}
- }
- })
- }, 200)
- }
- // #endif
+ // #ifdef PUB_CUSTOMER
+ if (this.currentInfo.id) {
+ let that = this
+ setTimeout(() => {
+ this.$http.request('get', '/api/customer/center/tj', {}).then(res => {
+ if (res.code === 0) {
+ that.tj = res.data || {}
+ }
+ })
+ }, 200)
+ }
+ // #endif
- },
- created() {
+ },
+ created() {
- },
- async onPullDownRefresh() {
- await this.$store.dispatch('getCurrentInfo')
- uni.stopPullDownRefresh()
- },
- methods: {
+ },
+ async onPullDownRefresh() {
+ await this.$store.dispatch('getCurrentInfo')
+ uni.stopPullDownRefresh()
+ },
+ methods: {
- async clearlogout() {
- await this.$message.confirm('是否退出登录?')
- this.$store.commit('updateLogin', false)
+ async clearlogout() {
+ await this.$message.confirm('是否退出登录?')
+ this.$store.commit('updateLogin', false)
- uni.reLaunch({
- url: '/pages/login/supplier-login'
- })
- },
- async callTel() {
- await this.$message.confirm('是否拨打客服电话')
- uni.makePhoneCall({
- phoneNumber: this.tel //仅为示例
- });
- },
- toCustomerLogin() {
- uni.navigateTo({
- url: '/pages/login/supplier-login'
- })
- },
- }
-}
+ uni.reLaunch({
+ url: '/pages/login/supplier-login'
+ })
+ },
+ async callTel() {
+ await this.$message.confirm('是否拨打客服电话')
+ uni.makePhoneCall({
+ phoneNumber: this.tel //仅为示例
+ });
+ },
+ toCustomerLogin() {
+ uni.navigateTo({
+ url: '/pages/login/supplier-login'
+ })
+ },
+ }
+ }
</script>
<style lang="scss" scoped>
-@import "./user.scss";
+ @import "./user.scss";
</style>
<!-- #ifdef PUB_CUSTOMER -->
<style lang="scss" scoped>
-@import "./user-customer.scss";
+ @import "./user-customer.scss";
</style>
<!-- #endif -->
<style lang="scss" scoped>
diff --git a/static/images/customer/brand/info-brand-bg.png b/static/images/customer/brand/info-brand-bg.png
new file mode 100644
index 0000000..20e9330
--- /dev/null
+++ b/static/images/customer/brand/info-brand-bg.png
Binary files differ
diff --git a/sub_pages/customer/self/collect.vue b/sub_pages/customer/self/collect.vue
index 81d4612..3611207 100644
--- a/sub_pages/customer/self/collect.vue
+++ b/sub_pages/customer/self/collect.vue
@@ -96,7 +96,7 @@
}).then(res => {
var data = res.data
this.level_columns = [data || []]
- this.columns_levels[0].unshift({
+ this.level_columns[0].unshift({
label: '全部',
value: ''
})
diff --git a/sub_pages/customer/self/follow.vue b/sub_pages/customer/self/follow.vue
index 5963c4b..93e1e86 100644
--- a/sub_pages/customer/self/follow.vue
+++ b/sub_pages/customer/self/follow.vue
@@ -1,120 +1,132 @@
<template>
- <view class="follow-page">
- <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
+ <view class="follow-page">
+ <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
- <view class="follow-item m-b-40" v-for="(item,index) of list" :key="index">
- <image class="avatar img100" :src="item.avatar" mode="aspectFill"></image>
- <view class="info">
- <view class="name">{{ item.supplierName }}</view>
- <view class="time">{{ item.createTime }}</view>
- </view>
- <view class="m-l-a m-r-0 flex">
- <view class="button button-1" @click="clearFollow(item)">取消关注</view>
- <view class="button button-2" @click="toDetail(item)">进店</view>
- </view>
- </view>
- </view>
+ <view class="follow-item m-b-40 flex" v-for="(item,index) of list" :key="index">
+ <image class="avatar img100" :src="item.cover" mode="aspectFill"></image>
+ <view class="info">
+ <view class="name">{{ item.supplierName }}</view>
+ <view class="time">{{ item.createTime }}</view>
+ </view>
+ <view class="m-l-a m-r-0 flex">
+ <view class="button button-1" @click="clearFollow(item)">取消关注</view>
+ <view class="button button-2" @click="toDetail(item)">进店</view>
+ </view>
+ </view>
+ </view>
</template>
<script>
-export default {
- data() {
- return {}
- },
- async onPullDownRefresh() {
- await this.refreshList()
- uni.stopPullDownRefresh()
- },
- async onShow() {
- if (this.sign['follow']) {
- await this.$store.dispatch('sign_clear', 'follow');
- this.refreshList()
- }
- },
- async onLoad() {
- await this.$store.dispatch('sign_clear', 'follow');
- this.listApi = '/api/follow/list'
- this.getList()
- },
- methods: {
- toDetail(item) {
- uni.navigateTo({
- url: '/sub_pages/customer/shop/shop?id=' + (item.id || '')
- })
- },
- async clearFollow(item) {
- this.$message.showLoading()
- const {code} = await this.$http.request('get', `/api/follow/delete`, {
- params: {
- supplierId: item.id
- }
- })
- this.$message.hideLoading()
- if (code === 0) {
- //删除list里的本元素
- for (var i = 0; i < this.list.length; i++) {
- if (this.list[i].id === item.id) {
- this.list.splice(i, 1)
- }
- }
- }
- },
- getList_after() {
- // uni.
- }
- }
-}
+ export default {
+ data() {
+ return {}
+ },
+ async onPullDownRefresh() {
+ await this.refreshList()
+ uni.stopPullDownRefresh()
+ },
+ async onShow() {
+ if (this.sign['follow']) {
+ await this.$store.dispatch('sign_clear', 'follow');
+ this.refreshList()
+ }
+ },
+ async onLoad() {
+ await this.$store.dispatch('sign_clear', 'follow');
+ this.listApi = '/api/follow/list'
+ this.getList()
+ },
+ methods: {
+ toDetail(item) {
+ uni.navigateTo({
+ url: '/sub_pages/customer/shop/shop?id=' + (item.id || '')
+ })
+ },
+ async clearFollow(item) {
+ this.$message.showLoading()
+ const {
+ code
+ } = await this.$http.request('get', `/api/follow/delete`, {
+ params: {
+ supplierId: item.id
+ }
+ })
+ this.$message.hideLoading()
+ if (code === 0) {
+ //删除list里的本元素
+ for (var i = 0; i < this.list.length; i++) {
+ if (this.list[i].id === item.id) {
+ this.list.splice(i, 1)
+ }
+ }
+ }
+ },
+ getList_after() {
+ // uni.
+ }
+ }
+ }
</script>
<style lang="scss" scoped>
-.follow-page {
- .follow-item {
- .avatar {
- width: 114rpx;
- height: 114rpx;
- border: 2rpx solid #FFFFFF;
- border-radius: 50%;
- margin-right: 10rpx;
- }
+ .follow-page {
+ .follow-item {
+ padding: 30rpx;
+ background-color: #FFFFFF;
+ margin-bottom: 20rpx;
- .info {
- .name {
- font-weight: 600;
- font-size: 36rpx;
- color: #000000;
- line-height: 50rpx;
- }
+ .avatar {
+ width: 80rpx;
+ height: 80rpx;
+ border: 2rpx solid #FFFFFF;
+ border-radius: 50%;
+ margin-right: 20rpx;
+ }
- .time {
- font-weight: 400;
- font-size: 28rpx;
- color: #666666;
- line-height: 40rpx;
- }
- }
+ .info {
+ .name {
+ font-weight: 600;
+ font-size: 32rpx;
+ color: #000000;
+ line-height: 40rpx;
+ margin-top: 6rpx;
+ }
- .button {
- padding: 14rpx 36rpx;
- text-align: center;
- margin-left: 10rpx;
- font-weight: 400;
- font-size: 24rpx;
- line-height: 60rpx;
+ .time {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ line-height: 40rpx;
+ }
+ }
- }
+ .button {
+ padding: 14rpx 36rpx;
+ text-align: center;
+ margin-left: 10rpx;
+ font-weight: 400;
+ font-size: 24rpx;
+ line-height: 30rpx;
+ border-radius: 34rpx;
+ margin-top: 10rpx;
- .button-1 {
- color: #999999;
- border-radius: 34rpx;
- border: 2rpx solid #999999;
- }
+ // min-width: 128rpx;
+ height: 30rpx;
- .button-2 {
- border-radius: 34rpx;
- border: 2rpx solid #20613D;
- color: #20613D;
- }
- }
-}
-</style>
+
+ }
+
+ .button-1 {
+ color: #999999;
+ border: 2rpx solid #999999;
+
+ }
+
+ .button-2 {
+ border: 2rpx solid #20613D;
+ color: #20613D;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/sub_pages/customer/shop/shop.vue b/sub_pages/customer/shop/shop.vue
index 5abc28f..4899b93 100644
--- a/sub_pages/customer/shop/shop.vue
+++ b/sub_pages/customer/shop/shop.vue
@@ -1,358 +1,392 @@
<template>
- <view class="brand-detail">
+ <view class="brand-detail" style="background: #20613D;">
- <view class="brand-top-info">
- <view class="search-container m-t-12 flex">
- <view class="flex1 input">
- <u-input placeholder="请输入花名" v-model="search_flow">
- <template slot="suffix">
- <uni-icons color="#20613D" type="search" size="24" @tap="buttonSearchFlow"></uni-icons>
- </template>
- </u-input>
- </view>
- </view>
- <view class="info-brand m-t-12" v-if="id">
- <view class="flex">
- <image class="store-logo"></image>
- <view>
- <view class="store-name">花仙子</view>
- <view class="store-address">云南省-昆明市-官渡区</view>
- </view>
- <view class="store-sc m-l-a m-r-0" @click="updateGz(!dto.followed)">
- <view class="icon-view">
- <image src="../../../static/icon-gz-1.png" class="icon" v-if="dto.followed"
- ></image>
- <image src="../../../static/icon-gz-0.png" class="icon" v-if="!dto.followed"
- ></image>
- </view>
- <view>关注</view>
- </view>
- </view>
- </view>
- <view class="tj-info m-t-12">
- <view class="form-item">
- <view class="value">0</view>
- <view class="label">发布</view>
- </view>
- <view class="form-item">
- <view class="value">0</view>
- <view class="label">获赞</view>
- </view>
- <view class="form-item">
- <view class="value">0</view>
- <view class="label">粉丝</view>
- </view>
- <view class="form-item">
- <view class="value">0</view>
- <view class="label">关注</view>
- </view>
- </view>
- <top-tabs class="m-t-12" :tabs="tabs" :flg="flg" @change="changeTab">
+ <view class="brand-top-info">
+ <view class="search-container flex" style="padding-left: 20rpx;padding-right: 20rpx;padding-top: 20rpx">
+ <view class="flex1 input">
+ <u-input placeholder="请输入花名" v-model="search_flow">
+ <template slot="suffix">
+ <uni-icons color="#20613D" type="search" size="24" @tap="buttonSearchFlow"></uni-icons>
+ </template>
+ </u-input>
+ </view>
+ </view>
+ <view class="info-brand m-t-12" v-if="id">
+ <view class="flex">
+ <image class="store-logo" :src="dto.cover"></image>
+ <view>
+ <view class="store-name">{{dto.name}}</view>
+ <view class="store-address">
+ {{ ((dto.province||'')+ (dto.city&&'-'||'') + (dto.city||'')+ (dto.region&&'-'||'')+(dto.region||'')) ||dto.address || '暂无详细地址'}}
+ </view>
+ </view>
+ <view class="store-sc m-l-a m-r-0" @click="updateGz(!dto.followed)">
+ <view class="icon-view">
+ <image src="../../../static/icon-gz-1.png" class="icon" v-if="dto.followed"></image>
+ <image src="../../../static/icon-gz-0.png" class="icon" v-if="!dto.followed"></image>
+ </view>
+ <view>{{dto.followed?'取消':'关注'}}</view>
+ </view>
+ <!-- <view class="store-sc m-l-a m-r-0" @click="updateGz(!dto.followed)">
+ <image src="../../../static/icon-gz-1.png" class="icon" v-if="dto.followed"
+ ></image>
+ <image src="../../../static/icon-gz-0.png" class="icon" v-if="!dto.followed"
+ ></image>
+ 关注
+ </view> -->
+ </view>
+ </view>
+ <view class="tj-info m-t-12">
+ <view class="form-item">
+ <view class="value">0</view>
+ <view class="label">发布</view>
+ </view>
+ <view class="form-item">
+ <view class="value">0</view>
+ <view class="label">获赞</view>
+ </view>
+ <view class="form-item">
+ <view class="value">0</view>
+ <view class="label">粉丝</view>
+ </view>
+ <view class="form-item">
+ <view class="value">0</view>
+ <view class="label">关注</view>
+ </view>
+ </view>
+ <view class="p10" style="padding-left: 20rpx;padding-right: 20rpx;">
+ <top-tabs :tabs="tabs" :flg="flg" @change="changeTab">
- </top-tabs>
- </view>
- <view class="brand-info">
- <view v-if="flg==='0'" class="brand-info-0">
- <view class="component-filter-container" style="padding-top: 12rpx;">
- <view class="flex1">
- 排序
- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
- </view>
- <view class="flex1">
- 等级
- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
- </view>
- <view class="flex1">
- 参数
- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
- </view>
- </view>
- <view class="top-title">
- 报价已包含打包费、材料费、交易佣金
- </view>
- <view class="component-shop-item flex" v-for="(item,index) of list" :key="index"
- @click.stop="toDetail(item)">
- <view class="img">
- <image class="img img100"
- src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/ff/fff3027bd0a146478fd1f0aae816a028%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20240710224139.png">
- </image>
- <view class="level">
- A级
- </view>
- </view>
+ </top-tabs>
+ </view>
+ </view>
+ <view class="brand-info">
+ <view v-if="flg==='0'" class="brand-info-0">
+ <view class="component-filter-container" style="padding-top: 12rpx;">
+ <view class="flex1">
+ 排序
+ <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
+ </view>
+ <view class="flex1">
+ 等级
+ <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
+ </view>
+ <view class="flex1">
+ 参数
+ <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
+ </view>
+ </view>
+ <view class="top-title">
+ 报价已包含打包费、材料费、交易佣金
+ </view>
+ <view class="component-shop-item flex" v-for="(item,index) of list" :key="index"
+ @click.stop="toDetail(item)">
+ <view class="img">
+ <image class="img img100"
+ src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/ff/fff3027bd0a146478fd1f0aae816a028%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20240710224139.png">
+ </image>
+ <view class="level">
+ A级
+ </view>
+ </view>
- <view class="m-l-12 info-container flex1">
- <view class="title">
- 橙色芭比
- <view class="price">
- ¥6.60/扎
- </view>
- </view>
- <view class="shop-name">
- 牛油果泡泡·白色
- </view>
- <view class="other-info flex">
- <view class="m-r-15">
- 已售:7
- </view>
- <view class="m-r-15">
- 剩余:13
- </view>
- <view class="m-r-15">
- 1支/扎
- </view>
- </view>
- <view class="bottom-buttons flex">
+ <view class="m-l-12 info-container flex1">
+ <view class="title">
+ 橙色芭比
+ <view class="price">
+ ¥6.60/扎
+ </view>
+ </view>
+ <view class="shop-name">
+ 牛油果泡泡·白色
+ </view>
+ <view class="other-info flex">
+ <view class="m-r-15">
+ 已售:7
+ </view>
+ <view class="m-r-15">
+ 剩余:13
+ </view>
+ <view class="m-r-15">
+ 1支/扎
+ </view>
+ </view>
+ <view class="bottom-buttons flex">
- <view class="icons flex">
- <uni-icons v-if="item.shopnum&&item.shopnum>=1" type="minus" size="32"
- @click.stop="addnum(item,-1)"></uni-icons>
- <view class="curnums" v-if="item.shopnum&&item.shopnum>=1">{{ item.shopnum }}</view>
- <uni-icons v-if="!item.shopnum||item.shopnum<=99" type="plus-filled" size="32"
- @click.stop="addnum(item,1)"></uni-icons>
- </view>
- </view>
- </view>
- </view>
+ <view class="icons flex">
+ <uni-icons v-if="item.shopnum&&item.shopnum>=1" type="minus" size="32"
+ @click.stop="addnum(item,-1)"></uni-icons>
+ <view class="curnums" v-if="item.shopnum&&item.shopnum>=1">{{ item.shopnum }}</view>
+ <uni-icons v-if="!item.shopnum||item.shopnum<=99" type="plus-filled" size="32"
+ @click.stop="addnum(item,1)"></uni-icons>
+ </view>
+ </view>
+ </view>
+ </view>
- </view>
+ </view>
- <view v-if="flg==='1'" class="brand-info-1">
- <trade :hidefooter="true"></trade>
- </view>
- <view v-if="flg==='2'" class="brand-info-3">
- <view class="title">
- 基础信息
- </view>
- <view class="form-input">
- <view class="label">经营模式</view>
- <view class="value">供应商</view>
- </view>
- <view class="form-input">
- <view class="label">身份认证</view>
- <view class="value">个人身份认证</view>
- </view>
- </view>
- </view>
+ <view v-if="flg==='1'" class="brand-info-1">
+ <trade :hidefooter="true"></trade>
+ </view>
+ <view v-if="flg==='2'" class="brand-info-3">
+ <view class="title">
+ 基础信息
+ </view>
+ <view class="form-input flex">
+ <view class="label ">经营模式</view>
+ <view class="value">供应商</view>
+ </view>
+ <view class="form-input flex">
+ <view class="label ">商家详细</view>
+ <view class="value">{{dto.address || '暂无'}}</view>
+ </view>
+ <view class="form-input flex">
+ <view class="label ">商家介绍</view>
+ <view class="value">{{dto.description || '-'}}</view>
+ </view>
+ <view class="form-input flex">
+ <view class="label">身份认证</view>
+ <view class="value">个人身份认证</view>
+ </view>
+ </view>
+ </view>
- </view>
+ </view>
</template>
<script>
-import trade from '@/sub_pages/customer/trade/trade.vue'
-import http from "../../../plugins/http";
+ import trade from '@/sub_pages/customer/trade/trade.vue'
+ import http from "../../../plugins/http";
-export default {
- components: {
- trade,
- },
- data() {
- return {
- search_flow: '',
- flg: '0',
- tabs: [{
- name: '全部商品'
- },
- {
- name: '分类'
- },
- // {
- // name: '评价'
- // },
- {
- name: '商家'
- },
- ],
- dto: {},
- list: [{}, {}],
- id: '',
- }
- },
- onLoad(options) {
- this.id = options.id || ''
- if (this.id) {
- this.getDetail()
- }
- },
- methods: {
- async getDetail() {
- this.$message.showLoading()
- const {
- code,
- data
- } = await this.$http.request('get', `/api/pub/supplier/detail/${this.id}`, {
- params: {}
- })
- if (code === 0) {
- this.dto = {
- ...data,
- }
- }
+ export default {
+ components: {
+ trade,
+ },
+ data() {
+ return {
+ search_flow: '',
+ flg: '0',
+ tabs: [{
+ name: '全部商品'
+ },
+ {
+ name: '分类'
+ },
+ // {
+ // name: '评价'
+ // },
+ {
+ name: '商家'
+ },
+ ],
+ dto: {},
+ list: [{}, {}],
+ id: '',
+ }
+ },
+ onLoad(options) {
+ this.id = options.id || ''
+ if (this.id) {
+ this.getDetail()
+ }
+ },
+ methods: {
+ async getDetail() {
+ this.$message.showLoading()
+ const {
+ code,
+ data
+ } = await this.$http.request('get', `/api/pub/supplier/detail/${this.id}`, {
+ params: {}
+ })
+ if (code === 0) {
+ this.dto = {
+ ...data,
+ }
+ }
- this.$message.hideLoading()
+ this.$message.hideLoading()
- },
- //update 关注
- async updateGz(type) {
- this.$message.showLoading()
- const {code} = await this.$http.request(type ? 'post' : 'get', `/api/follow/${type ? 'add' : 'delete'}`, {
- data: {
- supplierId: this.dto.supplierId || this.dto.id
- },
- params: {
- supplierId: this.dto.supplierId || this.dto.id
- }
- })
- this.$message.hideLoading()
- if (code === 0) {
- this.dto.followed = !this.dto.followed
- await this.$store.dispatch('sign_add', 'follow')
- }
+ },
+ //update 关注
+ async updateGz(type) {
+ this.$message.showLoading()
+ const {
+ code
+ } = await this.$http.request(type ? 'post' : 'get', `/api/follow/${type ? 'add' : 'delete'}`, {
+ data: {
+ supplierId: this.dto.supplierId || this.dto.id
+ },
+ params: {
+ supplierId: this.dto.supplierId || this.dto.id
+ }
+ })
+ if (code === 0) {
+ this.dto.followed = !this.dto.followed
+ await this.$store.dispatch('sign_add', 'follow')
+ this.$forceUpdate()
+ }
+ this.$message.hideLoading()
- },
- changeTab(flg) {
- this.flg = flg
- //如果没有加载数据,需要加载一下
+ },
+ changeTab(flg) {
+ console.log('changeTab', flg)
+ this.flg = ''+flg
+ //如果没有加载数据,需要加载一下
- },
- buttonSearchFlow() {
+ },
+ buttonSearchFlow() {
- },
+ },
- async addnum(item, addnum) {
- if (!this.currentInfo.id) {
- await this.$message.confirm('请前往登录')
- uni.navigateTo({
- url: '/pages/user/supplier-user'
- })
- return
- }
- if (!item.shopnum) {
- item.shopnum = 0
- }
- if (item.shopnum + addnum >= 0) {
+ async addnum(item, addnum) {
+ if (!this.currentInfo.id) {
+ await this.$message.confirm('请前往登录')
+ uni.navigateTo({
+ url: '/pages/user/supplier-user'
+ })
+ return
+ }
+ if (!item.shopnum) {
+ item.shopnum = 0
+ }
+ if (item.shopnum + addnum >= 0) {
- } else {
- return
- }
- this.$message.showLoading()
- const {code} = await http.request('post', '/api/customer/flower/cart/change-num', {
- data: {
- id: item.id,
- num: addnum
- }
- }
- )
- this.$message.hideLoading()
- if (code === 0) {
- item.shopnum += addnum
- }
- this.$forceUpdate()
- },
+ } else {
+ return
+ }
+ this.$message.showLoading()
+ const {
+ code
+ } = await http.request('post', '/api/customer/flower/cart/change-num', {
+ data: {
+ id: item.id,
+ num: addnum
+ }
+ })
+ this.$message.hideLoading()
+ if (code === 0) {
+ item.shopnum += addnum
+ }
+ this.$forceUpdate()
+ },
- }
-}
+ }
+ }
</script>
<style lang="scss" scoped>
-.brand-detail {
- .brand-info {
- background: #FFFFFF;
- border-radius: 40rpx 40rpx 0rpx 0rpx;
- padding: 40rpx 32rpx;
+ .brand-detail {
+ .brand-info {
+ background: #FFFFFF;
+ // border-radius: 40rpx 40rpx 0rpx 0rpx;
+ border-top-left-radius: 40rpx;
+ border-top-right-radius: 40rpx;
+ overflow: hidden;
+ overflow-y: scroll;
+ padding: 40rpx 32rpx;
+ height: calc(100vh - 650rpx);
+ padding-top: 0rpx;
- .brand-info-0 {
- .top-title {
- height: 80rpx;
- background: #E4ECE8;
- border-radius: 4rpx;
- font-weight: 400;
- font-size: 24rpx;
- color: #779787;
- margin-top: 10rpx;
- line-height: 80rpx;
- }
- }
+ .brand-info-0 {
+ .top-title {
+ height: 60rpx;
+ background: #E4ECE8;
+ border-radius: 4rpx;
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #779787;
+ margin-top: 10rpx;
+ line-height: 60rpx;
+ padding-left: 20rpx;
+ }
+ }
- .brand-info-3 {
- .title {
- font-weight: 600;
- font-size: 32rpx;
- color: #000000;
- line-height: 44rpx;
- margin-bottom: 20rpx;
- }
+ .brand-info-3 {
+ padding: 40rpx 30rpx;
+ .title {
+ font-weight: 600;
+ font-size: 32rpx;
+ color: #000000;
+ line-height: 44rpx;
+ margin-bottom: 20rpx;
+ }
- .form-item {
- display: flex;
- border-bottom: 2rpx solid #EEEEEE;
+ .form-input {
+ display: flex;
+ border-bottom: 2rpx solid #EEEEEE;
- .label {
- font-weight: 400;
- font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
- }
+ .label {
+ font-weight: 600;
+ font-size: 28rpx;
+ color: #000000;
+ line-height: 40rpx;
+ }
- .value {
- font-weight: 400;
- font-size: 28rpx;
- color: #666666;
- line-height: 40rpx;
- margin-left: auto;
- text-align: right;
+ .value {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #666666;
+ line-height: 40rpx;
+ margin-left: auto;
+ margin-right: 0;
+
+ text-align: right;
- .check {
- background: #20613D;
- border-radius: 4rpx;
- }
- }
- }
- }
- }
+ .check {
+ background: #20613D;
+ border-radius: 4rpx;
+ }
+ }
+ }
+ }
+ }
- .brand-top-info {
- background-image: url('https://hmy-flower.oss-cn-shanghai.aliyuncs.com/37/37dc02b58bd44af79e45031af2bb6c0b%E4%BD%8D%E5%9B%BE@2x.png');
+ .brand-top-info {
+ background-image: url('https://hmy-flower.oss-cn-shanghai.aliyuncs.com/37/37dc02b58bd44af79e45031af2bb6c0b%E4%BD%8D%E5%9B%BE@2x.png');
+ background-size: 100% 100%;
- .tj-info {
- display: flex;
+ .tj-info {
+ display: flex;
- .form-item {
- flex: 1;
- text-align: center;
+ .form-item {
+ flex: 1;
+ text-align: center;
- .label {
- font-weight: 400;
- font-size: 32rpx;
- color: #FFFFFF;
- line-height: 44rpx;
- }
+ .label {
+ font-weight: 400;
+ font-size: 32rpx;
+ color: #FFFFFF;
+ line-height: 44rpx;
+ }
- .value {
- font-weight: 600;
- font-size: 48rpx;
- color: #FFFFFF;
- line-height: 66rpx;
- }
- }
- }
+ .value {
+ font-weight: 600;
+ font-size: 48rpx;
+ color: #FFFFFF;
+ line-height: 66rpx;
- .search-container {
- display: flex;
- margin: 12rpx 0rpx 20rpx 0rpx;
- position: relative;
- z-index: 1;
+ }
+ }
+ }
- .input {
+ .search-container {
+ display: flex;
+ margin: 12rpx 0rpx 20rpx 0rpx;
+ position: relative;
+ z-index: 1;
- background-color: #fff !important;
+ .input {
- border-radius: 8rpx;
- }
+ background-color: #fff !important;
- }
- }
-}
+ border-radius: 8rpx;
+ }
+
+ }
+ }
+ }
</style>
\ No newline at end of file
diff --git a/sub_pages/customer/shopping/confirm.vue b/sub_pages/customer/shopping/confirm.vue
index 19f2098..776d98d 100644
--- a/sub_pages/customer/shopping/confirm.vue
+++ b/sub_pages/customer/shopping/confirm.vue
@@ -1,409 +1,423 @@
<script>
-import {
- mapState
-} from 'vuex'
+ import {
+ mapState
+ } from 'vuex'
-export default {
- name: "订单详情",
- computed: {
- ...mapState({
- address: state => {
- return state.defaultaddress || {}
- },
- }),
+ export default {
+ name: "订单详情",
+ computed: {
+ ...mapState({
+ address: state => {
+ return state.defaultaddress || {}
+ },
+ }),
- },
- async onShow() {
+ },
+ async onShow() {
- },
- onLoad(options) {
- // console.log('dto',options)
+ },
+ onLoad(options) {
+ // console.log('dto',options)
- // let item = JSON.parse(decodeURIComponent(options.query.dto));
- let item = JSON.parse(this.$storage.getItem('_cache_shopping_dto') || '{}') || {}
- this.dto = {
- ...this.dto,
- ...item
- }
- //先获取直接的全部地址
- // @ApiModelProperty(value = "订单商品")
- // private List<FlowerCartListDTO> flowers;
- // @ApiModelProperty(value = "打包费")
- // private BigDecimal packing;
+ // let item = JSON.parse(decodeURIComponent(options.query.dto));
+ let item = JSON.parse(this.$storage.getItem('_cache_shopping_dto') || '{}') || {}
+ this.dto = {
+ ...this.dto,
+ ...item
+ }
+ //先获取直接的全部地址
+ // @ApiModelProperty(value = "订单商品")
+ // private List<FlowerCartListDTO> flowers;
+ // @ApiModelProperty(value = "打包费")
+ // private BigDecimal packing;
- },
- data() {
- return {
- dto: {
- remarks: '',
- specialNeeds: '',
- transportId: '',
- addressId: '',
- flowers: [],
- },
- current_transport: {},
- cacheAddressId: '',
- transportList: [],
+ },
+ data() {
+ return {
+ dto: {
+ remarks: '',
+ specialNeeds: '',
+ transportId: '',
+ addressId: '',
+ flowers: [],
+ },
+ current_transport: {},
+ cacheAddressId: '',
+ transportList: [],
- }
- },
- watch: {
- address(nv, ov) {
- if (nv && nv.id !== this.cacheAddressId) {
- this.loadTransportList()
- this.cacheAddressId = nv.id
+ }
+ },
+ watch: {
+ address(nv, ov) {
+ if (nv && nv.id !== this.cacheAddressId) {
+ this.loadTransportList()
+ this.cacheAddressId = nv.id
- }
- }
- },
- methods: {
- async loadTransportList() {
- let that = this
- {
- console.log('address', that.address, that.cacheAddressId)
- if (that.address && that.address.id && that.cacheAddressId !== that.address.id) {
- that.$message.showLoading()
- const {code, data} = await that.$http.request('post', '/api/customer/flower/order/confirm/transports', {
- data: {
- addressId: that.address.id,
- weight: that.dto.totalWeight || 0
- }
- })
- that.$message.hideLoading()
- that.transportList = []
- if (code === 0) {
- that.transportList = data || []
- }
- }
- }
- },
- async submitOrder() {
- console.log('submitOrder', this.dto)
- if (!this.dto.transportId) {
- this.$message.showToast('请选择配送方式')
- return
- }
- if (!this.address.id) {
- this.$message.showToast('请选择收货地址')
- return
- }
- this.dto.addressId = this.address.id
+ }
+ }
+ },
+ methods: {
+ async loadTransportList() {
+ let that = this;
+ console.log('address', that.address, that.cacheAddressId)
+ if (that.address && that.address.id && that.cacheAddressId !== that.address.id) {
+ that.$message.showLoading()
+ const {
+ code,
+ data
+ } = await that.$http.request('post', '/api/customer/flower/order/confirm/transports', {
+ data: {
+ addressId: that.address.id,
+ weight: that.dto.totalWeight || 0
+ }
+ })
+ that.$message.hideLoading()
+ that.transportList = []
+ if (code === 0) {
+ that.transportList = data || []
+ }
+ }
- let tmp = this
- wx.login({
- success: async res => {
- console.log(res)
- if (res.code) {
- tmp.$message.showLoading()
- const {code, data} = await tmp.$http.request('post', '/api/customer/flower/order/commit', {
- data: {
- ...tmp.dto,
- wxcode: res.code
- }
- })
- tmp.$message.hideLoading()
- if (code === 0) {
- //提交信息
- console.log('pay,', data)
- if (data && data['_testOrderId']) {
- //回调
- tmp.$message.showLoading()
- const res2 = await tmp.$http.request('get', '/api/customer/flower/order/callback/tmp', {
- params: {
- id: res2.data['_testOrderId']
- }
- })
- tmp.$message.hideLoading()
- } else if (data) {
- wx.requestPayment({
- ...data,
- async success(res) {
- console.log('pay success', res)
- tmp.$message.showToast('支付成功')
- //返回上一页
- await tmp.$store.dispatch('sign_add', 'shopping')
- uni.navigateBack()
- },
- fail(err) {
- console.error('pay fail', err)
- tmp.$message.showToast('支付失败')
- }
- })
+ },
+ async submitOrder() {
+ console.log('submitOrder', this.dto)
+ if (!this.dto.transportId) {
+ this.$message.showToast('请选择配送方式')
+ return
+ }
+ if (!this.address.id) {
+ this.$message.showToast('请选择收货地址')
+ return
+ }
+ this.dto.addressId = this.address.id
- }
- }
+ let tmp = this
+ wx.login({
+ success: async res => {
+ console.log(res)
+ if (res.code) {
+ tmp.$message.showLoading()
+ const {
+ code,
+ data
+ } = await tmp.$http.request('post', '/api/customer/flower/order/commit', {
+ data: {
+ ...tmp.dto,
+ wxcode: res.code
+ }
+ })
+ tmp.$message.hideLoading()
+ if (code === 0) {
+ //提交信息
+ console.log('pay,', data)
+ if (data && data['_testOrderId']) {
+ //回调
+ tmp.$message.showLoading()
+ const res2 = await tmp.$http.request('get',
+ '/api/customer/flower/order/callback/tmp', {
+ params: {
+ id: res2.data['_testOrderId']
+ }
+ })
+ tmp.$message.hideLoading()
+ } else if (data) {
+ wx.requestPayment({
+ ...data,
+ async success(res) {
+ console.log('pay success', res)
+ tmp.$message.showToast('支付成功')
+ //返回上一页
+ await tmp.$store.dispatch('sign_add', 'shopping')
+ uni.navigateBack()
+ },
+ fail(err) {
+ console.error('pay fail', err)
+ tmp.$message.showToast('支付失败')
+ }
+ })
- } else {
- tmp.$message.showToast('获取微信信息失败');
- }
- },
- error: res => {
- tmp.$message.showToast('获取微信信息失败:' + res);
- }
- });
+ }
+ }
+
+ } else {
+ tmp.$message.showToast('获取微信信息失败');
+ }
+ },
+ error: res => {
+ tmp.$message.showToast('获取微信信息失败:' + res);
+ }
+ });
- }
- }
-}
+ }
+ }
+ }
</script>
<template>
- <view class="page-confirm">
- <view class="p10 bg-white br-4">
- <common-address-select ref="addressselect"></common-address-select>
- </view>
- <view>
- <view class="flower-container m-t-12 br-4 p10">
- <view class="shopping-item m-b-20" v-for="(item,index) of dto.flowers" :key="index">
- <u-divider v-if="index>0"></u-divider>
- <view class="sup-title flex">
- <image class="icon-dp img100 m-r-10" src="/static/common/icon-dp.png"></image>
- <view>{{ item.supplierName || '-' }}</view>
- </view>
- <view class="item-each m-t-12 flex">
- <image class="img img100 m-r-6" :src="item.url||item.cover"></image>
- <view>
- <view class="title"><span class="m-r-5" style="display: inline-block;">{{item.categoryStr||''}}</span><span v-if="item.levelStr" class="m-r-5" style="display: inline-block;">{{ item.levelStr || '' }}</span>{{ item.name || '-' }}</view>
- <view class="price">
- {{ item.price || 0 }}*{{ item.num }}扎
- </view>
- <view class="desc m-t-12">
- <view class="m-r-15">每扎重量:{{ item.weight || 0 }}</view>
- </view>
- </view>
- </view>
- </view>
- <view class="price">
- <view class="m-l-a m-r-0 text-right">
- 共{{ dto.flowers.length }}件,小计<span class="t-red">¥{{ dto.totalAmount || 0 }}</span>
- </view>
- </view>
- </view>
- <!-- 查看商品列表,和选择运费 -->
- <view class="br-4 transform-container m-t-12 p10">
- <view class="title">
- <view>运输方式:</view>
- <view class="flex transform-list">
- <view v-for="(transform,index) of transportList" :class="[transform.id===dto.transportId?'cur':'']"
- :key="index" class="transform-item" @click="()=>{
+ <view class="page-confirm">
+ <view class="p10 bg-white br-4">
+ <common-address-select ref="addressselect"></common-address-select>
+ </view>
+ <view>
+ <view class="flower-container m-t-12 br-4 p10">
+ <view class="shopping-item m-b-20" v-for="(item,index) of dto.flowers" :key="index">
+ <u-divider v-if="index>0"></u-divider>
+ <view class="sup-title flex">
+ <image class="icon-dp img100 m-r-10" src="/static/common/icon-dp.png"></image>
+ <view>{{ item.supplierName || '-' }}</view>
+ </view>
+ <view class="item-each m-t-12 flex">
+ <image class="img img100 m-r-6" :src="item.url||item.cover"></image>
+ <view>
+ <view class="title"><span class="m-r-5"
+ style="display: inline-block;">{{item.categoryStr||''}}</span><span
+ v-if="item.levelStr" class="m-r-5"
+ style="display: inline-block;">{{ item.levelStr || '' }}</span>{{ item.name || '-' }}
+ </view>
+ <view class="price">
+ {{ item.price || 0 }}*{{ item.num }}扎
+ </view>
+ <view class="desc m-t-12">
+ <view class="m-r-15">每扎重量:{{ item.weight || 0 }}</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="price">
+ <view class="m-l-a m-r-0 text-right">
+ 共{{ dto.flowers.length }}件,小计<span class="t-red">¥{{ dto.totalAmount || 0 }}</span>
+ </view>
+ </view>
+ </view>
+ <!-- 查看商品列表,和选择运费 -->
+ <view class="br-4 transform-container m-t-12 p10">
+ <view class="title">
+ <view>运输方式:</view>
+ <view class="flex transform-list flex-wrap-normal">
+ <view v-for="(transform,index) of transportList"
+ :class="[transform.id===dto.transportId?'cur':'']" :key="index" class="transform-item"
+ @click="()=>{
dto.transportId = transform.id;
current_transport = transform
}">
- <view class="title">{{ transform.name }}</view>
- <view class="price">¥{{ transform.fee }}</view>
- </view>
- </view>
- </view>
- <view class="m-t-20" v-if="false">
- <view class="desc-red">
- 10kg以下的零买订单将收取打包费,花店建议购满20kg, 可选冷链物流
- </view>
- <view class="desc">
- 预计装1Mini件,运费约18.00元(5公斤内18元,不满5公斤按5公斤计费,每件货不能超过5公斤),第一汤下单预计次日凌晨发货,备货高峰期除外,冷链汽车运输,发货后72小时左右到货,三线城市会推迟6-12小时,顺丰送货到店。
- 优势:价格便宜,顺丰配送
- 弊端:订单必须是5kg以内
- </view>
- </view>
- </view>
+ <view class="title">{{ transform.name }}</view>
+ <view class="price">¥{{ transform.fee }}</view>
+ </view>
+ </view>
+ </view>
+ <view class="m-t-20" v-if="false">
+ <view class="desc-red">
+ 10kg以下的零买订单将收取打包费,花店建议购满20kg, 可选冷链物流
+ </view>
+ <view class="desc">
+ 预计装1Mini件,运费约18.00元(5公斤内18元,不满5公斤按5公斤计费,每件货不能超过5公斤),第一汤下单预计次日凌晨发货,备货高峰期除外,冷链汽车运输,发货后72小时左右到货,三线城市会推迟6-12小时,顺丰送货到店。
+ 优势:价格便宜,顺丰配送
+ 弊端:订单必须是5kg以内
+ </view>
+ </view>
+ </view>
- <view class="p10 bg-white m-t-20 br-4">
- <view class="form-item ">
- <view class="label">特殊需求</view>
- <view class="m-l-a m-r-0 flex1">
- <view class="m-t-12 m-b-12">
- <u-textarea v-model="dto.specialNeeds" placeholder="请输入特殊需求">
+ <view class="p10 bg-white m-t-20 br-4">
+ <view class="form-item ">
+ <view class="label">特殊需求</view>
+ <view class="m-l-a m-r-0 flex1">
+ <view class="m-t-12 m-b-12">
+ <u-textarea v-model="dto.specialNeeds" placeholder="请输入特殊需求">
- </u-textarea>
- </view>
- </view>
- </view>
- <view class="form-item m-t-12 ">
- <view class="label">留言</view>
- <view class="m-l-a m-r-0 flex1">
- <view class="m-t-12 m-b-12">
- <u-textarea v-model="dto.remarks" placeholder="填写内容需与卖家协商并确认">
+ </u-textarea>
+ </view>
+ </view>
+ </view>
+ <view class="form-item m-t-12 ">
+ <view class="label">留言</view>
+ <view class="m-l-a m-r-0 flex1">
+ <view class="m-t-12 m-b-12">
+ <u-textarea v-model="dto.remarks" placeholder="填写内容需与卖家协商并确认">
- </u-textarea>
- </view>
- </view>
- </view>
- </view>
+ </u-textarea>
+ </view>
+ </view>
+ </view>
+ </view>
- </view>
- <view class="m-t-20 br-4 info-container p10 bg-white">
- <view class="desc flex">
- <view>商品金额:</view>
- <view class="m-l-a m-r-0 text-right">
- {{ (dto.totalAmount || 0) - (dto.packing) || 0 }}
- </view>
- </view>
- <view class="desc flex">
- <view>打包费:</view>
- <view class="m-l-a m-r-0 text-right">
- {{ (dto.packing || 0) }}
- </view>
- </view>
- <view class="desc flex">
- <view>运费:</view>
- <view class="m-l-a m-r-0 text-right">
- {{ (current_transport.fee || 0) }}
- </view>
- </view>
- </view>
+ </view>
+ <view class="m-t-20 br-4 info-container p10 bg-white">
+ <view class="desc flex">
+ <view>商品金额:</view>
+ <view class="m-l-a m-r-0 text-right">
+ {{ (dto.totalAmount || 0) || 0 }}
+ </view>
+ </view>
+ <view class="desc flex">
+ <view>打包费:</view>
+ <view class="m-l-a m-r-0 text-right">
+ {{ (dto.packing || 0) }}
+ </view>
+ </view>
+ <view class="desc flex">
+ <view>运费:</view>
+ <view class="m-l-a m-r-0 text-right">
+ {{ (current_transport.fee || 0) }}
+ </view>
+ </view>
+ </view>
- <view style="min-height:200rpx">
- </view>
- <view class="bottom-price flex">
- <view class="m-t-12 m-l-0 m-r-a">
- 合计 <span class="t-red">¥ {{ (dto.totalAmount || 0) + (current_transport.fee || 0) || 0 }} </span>元
- </view>
- <view class="button-green-1 m-l-a m-r-0" style="min-width: 240rpx" @click="submitOrder">
- 提交订单
- </view>
- </view>
- </view>
+
+ <view style="min-height:200rpx">
+ </view>
+ <view class="bottom-price flex">
+ <view class="m-t-12 m-l-0 m-r-a">
+ 合计 <span class="t-red">¥
+ {{ (dto.totalAmount || 0) + (dto.packing || 0) + (current_transport.fee || 0) || 0 }} </span>元
+ </view>
+ <view class="button-green-1 m-l-a m-r-0" style="min-width: 240rpx" @click="submitOrder">
+ 提交订单
+ </view>
+ </view>
+ </view>
</template>
<style scoped lang="scss">
-.page-confirm {
- padding: 20rpx 30rpx;
+ .page-confirm {
+ padding: 20rpx 30rpx;
- .bottom-price {
- position: fixed;
- background-color: #ffffff;
- left: 0rpx;
- padding: 20rpx;
- right: 0rpx;
- bottom: 0rpx;
- }
+ .bottom-price {
+ position: fixed;
+ background-color: #ffffff;
+ left: 0rpx;
+ padding: 20rpx;
+ right: 0rpx;
+ bottom: 0rpx;
+ }
- .flower-container {
- background-color: #ffffff;
+ .flower-container {
+ background-color: #ffffff;
- .shopping-item {
- padding: 28rpx 22rpx;
- position: relative;
+ .shopping-item {
+ padding: 28rpx 22rpx;
+ position: relative;
- .sup-title {
- border-bottom: 2rpx solid #EEEEEE;
- line-height: 50rpx;
+ .sup-title {
+ border-bottom: 2rpx solid #EEEEEE;
+ line-height: 50rpx;
- .icon-dp {
- width: 36rpx;
- height: 36rpx;
- margin-top: 7rpx;
- }
- }
+ .icon-dp {
+ width: 36rpx;
+ height: 36rpx;
+ margin-top: 7rpx;
+ }
+ }
- .item-each {
- padding-left: 20rpx;
+ .item-each {
+ padding-left: 20rpx;
- .img {
- width: 124rpx;
- height: 124rpx;
- }
+ .img {
+ width: 124rpx;
+ height: 124rpx;
+ }
- .title {
- font-weight: 600;
- font-size: 28rpx;
+ .title {
+ font-weight: 600;
+ font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
+ color: #000000;
+ line-height: 40rpx;
- .level {
- color: #20613D;
- }
- }
+ .level {
+ color: #20613D;
+ }
+ }
- .price {
- font-weight: 400;
- font-size: 28rpx;
- color: #CF0000;
- line-height: 40rpx;
- }
+ .price {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #CF0000;
+ line-height: 40rpx;
+ }
- .desc {
- font-weight: 400;
- font-size: 24rpx;
- color: #666666;
- line-height: 34rpx;
+ .desc {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ line-height: 34rpx;
- }
- }
+ }
+ }
- .button-icons {
- position: absolute;
- line-height: 40rpx;
+ .button-icons {
+ position: absolute;
+ line-height: 40rpx;
- }
- }
+ }
+ }
- }
+ }
- .info-container {
- .desc {
- font-weight: 400;
- font-size: 28rpx;
- color: #666666;
- line-height: 40rpx;
+ .info-container {
+ .desc {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #666666;
+ line-height: 40rpx;
- .value {
- text-align: right;
- }
- }
- }
+ .value {
+ text-align: right;
+ }
+ }
+ }
- .transform-container {
- background-color: #ffffff;
+ .transform-container {
+ background-color: #ffffff;
- .transform-list {
- .transform-item {
- background: rgba(225, 240, 231, 0.38);
- border-radius: 8rpx;
- //min-height: 112rpx;
- border: 2rpx solid rgba(225, 240, 231, 0.38);
- padding: 14rpx;
- text-align: center;
- //margin: 0 auto;
- margin-left: 20rpx;
- margin-top: 10rpx;
- margin-right: auto;
- max-width: 32%;
- min-width: 120rpx;
+ .transform-list {
+ .transform-item {
+ background: rgba(225, 240, 231, 0.38);
+ border-radius: 8rpx;
+ //min-height: 112rpx;
+ border: 2rpx solid rgba(225, 240, 231, 0.38);
+ padding: 10rpx;
+ text-align: center;
+ //margin: 0 auto;
+ margin-left: 10rpx;
+ margin-top: 10rpx;
+ margin-right: auto;
+ max-width: 32%;
+ width: 130rpx;
- .title {
- font-weight: 400;
- font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
- }
+ .title {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #000000;
+ line-height: 40rpx;
+ word-break: break-word;
+ }
- .price {
- font-weight: 600;
- font-size: 32rpx;
- color: #20613D;
- //line-height: 44rpx;
- }
- }
+ .price {
+ font-weight: 600;
+ font-size: 30rpx;
+ color: #20613D;
+ //line-height: 44rpx;
+ }
+ }
- .transform-item.cur {
- background: #E1F0E7;
- border-radius: 8rpx;
- border: 2rpx solid #20613D;
- }
- }
+ .transform-item.cur {
+ background: #E1F0E7;
+ border-radius: 8rpx;
+ border: 2rpx solid #20613D;
+ }
+ }
- .transform-list:nth-child(3n+0) {
- margin-left: 0
- }
+ .transform-list:nth-child(3n+0) {
+ margin-left: 0
+ }
- .transform-list:nth-child(3n+2) {
- margin-right: 0;
- }
+ .transform-list:nth-child(3n+2) {
+ margin-right: 0;
+ }
- }
+ }
-}
+ }
</style>
\ No newline at end of file
diff --git a/sub_pages/customer/shopping/shopping.vue b/sub_pages/customer/shopping/shopping.vue
index aefa2ec..30d8998 100644
--- a/sub_pages/customer/shopping/shopping.vue
+++ b/sub_pages/customer/shopping/shopping.vue
@@ -1,388 +1,400 @@
<template>
- <view class="shopping-container">
- <view class="top-title"><span class="t-red">*</span> 苏州市一价全含,市区内包邮派送到店
- </view>
- <view class="top-desc">
- 全程鲜花冷链专线,时效快,损耗小
- </view>
- <view class="flex top-kf">
- <image class="icon-clock m-r-6" src="../../../static/common/icon-kf.png"></image>
- <view class="name">
- 15974805814
- </view>
- </view>
- <view class="">
- <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
- <view class="shopping-item m-t-20" v-for="(item,index) of list" :key="index">
+ <view class="shopping-container">
+ <view class="top-title"><span class="t-red">*</span> 苏州市一价全含,市区内包邮派送到店
+ </view>
+ <view class="top-desc">
+ 全程鲜花冷链专线,时效快,损耗小
+ </view>
+ <view class="flex top-kf">
+ <image class="icon-clock m-r-6" src="../../../static/common/icon-kf.png"></image>
+ <view class="name">
+ 15974805814
+ </view>
+ </view>
+ <view class="">
+ <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
+ <view class="shopping-item m-t-20" v-for="(item,index) of list" :key="index">
- <view class="sup-title">
- <radio :checked="ids.indexOf(item.id)>=0" @click="changeItem(item,'supplier')"></radio>
- {{ item.supplierName || '-' }}
- </view>
- <u-divider></u-divider>
- <view v-for="(dto,j) of item.flowerList" :key="j">
- <u-divider v-if="j>0"></u-divider>
- <u-swipe-action>
- <u-swipe-action-item
- :options="options1"
- @click="(e)=>{clickSwipeButton(dto)}"
- >
- <view class="item-each flex">
- <radio :checked="ids.indexOf(dto.id)>=0" @click="changeItem(dto,'flower')"></radio>
- <image class="img img100 m-r-6" :src="dto.url||dto.cover"></image>
- <view class="flex1">
- <view class="title"><span class="m-r-5" style="display: inline-block;">{{item.categoryStr||''}}</span><span v-if="item.levelStr" class="m-r-5" style="display: inline-block;">{{ item.levelStr || '' }}</span>{{ dto.name || '-' }}</view>
- <view class="price">
- {{ dto.price || '-' }}元/扎
- </view>
- <view class="flex">
- <view class="desc m-t-12 flex">
- <view class="m-r-15">剩余:{{ dto.stock || 0 }}</view>
- <view class="m-r-15">颜色:{{ dto.color || '-' }}</view>
- </view>
- <view class="button-icons flex m-l-a m-r-0">
- <uni-icons v-if="dto.num&&dto.num>=1" type="minus" size="32"
- @click="addnum(dto,-1)"></uni-icons>
- <view class="curnums" v-if="dto.num&&dto.num>=1">{{ dto.num }}</view>
- <uni-icons type="plus-filled" size="32" @click="addnum(dto,1)"></uni-icons>
- </view>
- </view>
- </view>
- </view>
- </u-swipe-action-item>
- </u-swipe-action>
- </view>
+ <view class="sup-title">
+ <radio :checked="ids.indexOf(item.id)>=0" @click="changeItem(item,'supplier')"></radio>
+ {{ item.supplierName || '-' }}
+ </view>
+ <u-divider></u-divider>
+ <view v-for="(dto,j) of item.flowerList" :key="j">
+ <u-divider v-if="j>0"></u-divider>
+ <u-swipe-action>
+ <u-swipe-action-item :options="options1" @click="(e)=>{clickSwipeButton(dto)}">
+ <view class="item-each flex">
+ <radio :checked="ids.indexOf(dto.id)>=0" @click="changeItem(dto,'flower')"></radio>
+ <image class="img img100 m-r-6" :src="dto.url||dto.cover"></image>
+ <view class="flex1">
+ <view class="title"><span class="m-r-5"
+ style="display: inline-block;">{{item.categoryStr||''}}</span><span
+ v-if="item.levelStr" class="m-r-5"
+ style="display: inline-block;">{{ item.levelStr || '' }}</span>{{ dto.name || '-' }}
+ </view>
+ <view class="price">
+ {{ dto.price || '-' }}元/扎
+ </view>
+ <view class="flex">
+ <view class="desc m-t-12 flex">
+ <view class="m-r-15">剩余:{{ dto.stock || 0 }}</view>
+ <view class="m-r-15">颜色:{{ dto.color || '-' }}</view>
+ </view>
+ <view class="button-icons flex m-l-a m-r-0">
+ <uni-icons v-if="dto.num&&dto.num>=1" type="minus" size="32"
+ @click="addnum(dto,-1)"></uni-icons>
+ <view class="curnums" v-if="dto.num&&dto.num>=1">{{ dto.num }}</view>
+ <uni-icons type="plus-filled" size="32" @click="addnum(dto,1)"></uni-icons>
+ </view>
+ </view>
+ </view>
+ </view>
+ </u-swipe-action-item>
+ </u-swipe-action>
+ </view>
- </view>
+ </view>
- </view>
- <view style="min-height:200rpx">
- </view>
- <view class="bottom-price flex">
- <view class="m-t-12">
- <radio :checked="checkall" @click="selectAll"></radio>
- 全选
- </view>
- <view class="m-t-12 m-l-a m-r-20 text-center">
- 合计 <span class="t-red">¥ {{ totalprice || 0 }}</span> 元
- </view>
- <view class="button-green-1 m-l-a m-r-0" style="min-width: 240rpx" @click="submitPay">
- 提交订单
- </view>
- </view>
- <view style="min-height:200rpx">
- </view>
- <common-footer flg="2"></common-footer>
- </view>
+ </view>
+ <view style="min-height:200rpx">
+ </view>
+ <view class="bottom-price flex">
+ <view class="m-t-12">
+ <radio :checked="checkall" @click="selectAll"></radio>
+ 全选
+ </view>
+ <view class="m-t-12 m-l-a m-r-20 text-center">
+ 合计 <span class="t-red">¥ {{ totalprice || 0 }}</span> 元
+ </view>
+ <view class="button-green-1 m-l-a m-r-0" style="min-width: 240rpx" @click="submitPay">
+ 提交订单
+ </view>
+ </view>
+ <view style="min-height:200rpx">
+ </view>
+ <common-footer flg="2"></common-footer>
+ </view>
</template>
<script>
-import http from "../../../plugins/http";
+ import http from "../../../plugins/http";
-export default {
- data() {
- return {
- tel: '15974805814',
- ids: [],
- checkall: false,
- options1: [{
- text: '删除'
- }],
- list: []
- }
- },
- onShow() {
- if (this.sign['shopping']) {
- this.init()
- }
- },
- mounted() {
- this.init()
- },
- computed: {
- totalprice() {
+ export default {
+ data() {
+ return {
+ tel: '15974805814',
+ ids: [],
+ checkall: false,
+ options1: [{
+ text: '删除'
+ }],
+ list: []
+ }
+ },
+ onShow() {
+ if (this.sign['shopping']) {
+ this.init()
+ }
+ },
+ mounted() {
+ this.init()
+ },
+ computed: {
+ totalprice() {
- let totalprice = 0
- this.list && this.list.forEach(dto => {
- dto.flowerList && dto.flowerList.forEach(item => {
- if (this.ids.indexOf(item.id) >= 0) {
- totalprice += item.price * item.num
- }
- })
- })
- return totalprice.toFixed(2)
- },
- },
- methods: {
- async submitPay() {
- // order/confirm/info
- var arr = []
- for (var j = 0; j < this.list.length; j++) {
- if(!this.list[j].flowerList){
- continue
- }
- for (var k = 0; k < this.list[j].flowerList.length; k++) {
- if (this.ids.indexOf(this.list[j].flowerList[k].id) >= 0) {
- arr.push({
- id: this.list[j].flowerList[k].id,
- num: this.list[j].flowerList[k].num
- })
- } else {
- // console.log('skip', arr, this.list.flowerList[j],this.list.flowerList[j].id)
- }
- }
+ let totalprice = 0
+ this.list && this.list.forEach(dto => {
+ dto.flowerList && dto.flowerList.forEach(item => {
+ if (this.ids.indexOf(item.id) >= 0) {
+ totalprice += item.price * item.num
+ }
+ })
+ })
+ return totalprice.toFixed(2)
+ },
+ },
+ methods: {
+ async submitPay() {
+ // order/confirm/info
+ var arr = []
+ for (var j = 0; j < this.list.length; j++) {
+ if (!this.list[j].flowerList) {
+ continue
+ }
+ for (var k = 0; k < this.list[j].flowerList.length; k++) {
+ if (this.ids.indexOf(this.list[j].flowerList[k].id) >= 0) {
+ arr.push({
+ id: this.list[j].flowerList[k].id,
+ num: this.list[j].flowerList[k].num
+ })
+ } else {
+ // console.log('skip', arr, this.list.flowerList[j],this.list.flowerList[j].id)
+ }
+ }
- }
- if (arr.length < 1) {
- console.log('请选择商品', arr, this.ids)
- return
- }
- this.$message.showLoading()
- const {code, data} = await http.request('post', '/api/customer/flower/order/confirm/info', {
- data: {
- flowers: arr,
- }
- }
- )
- this.$message.hideLoading()
- if (code === 0) {
- this.$storage.setItem('_cache_shopping_dto',JSON.stringify(data))
- uni.navigateTo({
- url: '/sub_pages/customer/shopping/confirm'
- })
- }
- },
- async clickSwipeButton(item) {
- //删除商品,重新加载数据?
+ }
+ if (arr.length < 1) {
+ console.log('请选择商品', arr, this.ids)
+ return
+ }
+ this.$message.showLoading()
+ const {
+ code,
+ data
+ } = await http.request('post', '/api/customer/flower/order/confirm/info', {
+ data: {
+ flowers: arr,
+ }
+ })
+ this.$message.hideLoading()
+ if (code === 0) {
+ this.$storage.setItem('_cache_shopping_dto', JSON.stringify(data))
+ uni.navigateTo({
+ url: '/sub_pages/customer/shopping/confirm'
+ })
+ }
+ },
+ async clickSwipeButton(item) {
+ //删除商品,重新加载数据?
- this.$message.showLoading()
- const {code} = await http.request('get', '/api/customer/flower/cart/delete', {
- params: {
- id: item.id,
- }
- }
- )
- this.$message.hideLoading()
- if (code === 0) {
- if (this.ids.indexOf(item.id) >= 0) {
- this.ids.splice(this.ids.indexOf(item.id), 1)
- }
- for (var i = 0; i < this.list.length; i++) {
- if (this.list[i].id === item.supplierId) {
- this.list[i].splice(i, 1)
- if (this.list[i].flowerList.length === 1) {
- if (this.ids.indexOf('supplier@' + this.list[i].supplierId) >= 0) {
- this.ids.splice(this.ids.indexOf('supplier@' + this.list[i].supplierId), 1)
- }
- this.list[i].flowerList.splice(0, 1)
- this.list.splice(i, 1)
- } else {
- //只需要清楚这个元素
- var k = -1
- for (var j = 0; j < this.list[i].flowerList.length; j++) {
- if (this.list[i][j].id === item.id) {
- k = j;
- break
- }
- }
- this.list[i].flowerList.splice(k, 1)
- }
- break
- }
- }
- }
- },
+ this.$message.showLoading()
+ const {
+ code
+ } = await http.request('get', '/api/customer/flower/cart/delete', {
+ params: {
+ id: item.id,
+ }
+ })
+ this.$message.hideLoading()
+ if (code === 0) {
+ if (this.ids.indexOf(item.id) >= 0) {
+ this.ids.splice(this.ids.indexOf(item.id), 1)
+ }
+ for (var i = 0; i < this.list.length; i++) {
+ if (this.list[i].id === item.supplierId) {
+ this.list[i].splice(i, 1)
+ if (this.list[i].flowerList.length === 1) {
+ if (this.ids.indexOf('supplier@' + this.list[i].supplierId) >= 0) {
+ this.ids.splice(this.ids.indexOf('supplier@' + this.list[i].supplierId), 1)
+ }
+ this.list[i].flowerList.splice(0, 1)
+ this.list.splice(i, 1)
+ } else {
+ //只需要清楚这个元素
+ var k = -1
+ for (var j = 0; j < this.list[i].flowerList.length; j++) {
+ if (this.list[i][j].id === item.id) {
+ k = j;
+ break
+ }
+ }
+ this.list[i].flowerList.splice(k, 1)
+ }
+ break
+ }
+ }
+ }
+ },
- selectAll() {
- console.log('selectAll', this.checkall)
- if (this.checkall) {
- this.ids = []
- this.checkall = false
- // this.$forceUpdate()
- } else {
- this.list.forEach(dto => {
- if (this.ids.indexOf(dto.id) < 0) {
- this.ids.push(dto.id)
- }
- dto.flowerList.forEach(item => {
- if (this.ids.indexOf(item.id) < 0) {
- this.ids.push(item.id)
- }
- })
- })
- this.checkall = true
- }
- },
- changeItem(dto, type) {
- console.log('click changeItem', dto, type, this.ids)
- if (type === 'supplier') {
- //全选上
- if (this.ids.indexOf('supplier@' + dto.supplierId) < 0) {
- this.ids.push('supplier@' + dto.supplierId)
- dto.flowerList.forEach(item => {
- if (this.ids.indexOf(item.id) < 0) {
- this.ids.push(item.id)
- }
- })
- } else {
- this.checkall = false
- this.ids.splice(this.ids.indexOf('supplier@' + dto.supplierId), 1)
- dto.flowerList.forEach(item => {
- this.ids.splice(this.ids.indexOf('supplier@' + item.supplierId), 1)
- })
- }
+ selectAll() {
+ console.log('selectAll', this.checkall)
+ if (this.checkall) {
+ this.ids = []
+ this.checkall = false
+ // this.$forceUpdate()
+ } else {
+ this.list.forEach(dto => {
+ if (this.ids.indexOf(dto.id) < 0) {
+ this.ids.push(dto.id)
+ }
+ dto.flowerList.forEach(item => {
+ if (this.ids.indexOf(item.id) < 0) {
+ this.ids.push(item.id)
+ }
+ })
+ })
+ this.checkall = true
+ }
+ },
+ changeItem(dto, type) {
+ console.log('click changeItem', dto, type, this.ids)
+ if (type === 'supplier') {
+ //全选上
+ if (this.ids.indexOf('supplier@' + dto.supplierId) < 0) {
+ this.ids.push('supplier@' + dto.supplierId)
+ dto.flowerList.forEach(item => {
+ if (this.ids.indexOf(item.id) < 0) {
+ this.ids.push(item.id)
+ }
+ })
+ } else {
+ this.checkall = false
+ this.ids.splice(this.ids.indexOf('supplier@' + dto.supplierId), 1)
+ dto.flowerList.forEach(item => {
+ this.ids.splice(this.ids.indexOf('supplier@' + item.supplierId), 1)
+ })
+ }
- } else {
- //更换个人的
- if (this.ids.indexOf(dto.id) < 0) {
- this.ids.push(dto.id)
- } else {
- this.checkall = false
+ } else {
+ //更换个人的
+ if (this.ids.indexOf(dto.id) < 0) {
+ this.ids.push(dto.id)
+ } else {
+ this.checkall = false
- if (this.ids.indexOf(dto.id) >= 0) {
- this.ids.splice(this.ids.indexOf(dto.id), 1)
- }
- }
+ if (this.ids.indexOf(dto.id) >= 0) {
+ this.ids.splice(this.ids.indexOf(dto.id), 1)
+ }
+ }
- }
- },
- async addnum(dto, addnum) {
- if (dto.num + addnum >= 0) {
+ }
+ },
+ async addnum(dto, addnum) {
+ if (dto.num + addnum >= 0) {
- } else {
- return
- }
- this.$message.showLoading()
- const {code} = await http.request('post', '/api/customer/flower/cart/change-num', {
- data: {
- id: dto.id,
- num: addnum
- }
- }
- )
- this.$message.hideLoading()
- if (code === 0) {
- dto.num += addnum
- }
- },
- async init() {
- if (!this.currentInfo.customerDTO) {
- this.$message.showToast('请先前往个人中心补充个人信息')
- return
- }
- this.$message.showLoading()
- await this.$store.dispatch('sign_clear', 'shopping');
- const {code, data} = await this.$http.request('get', '/api/customer/flower/cart/list', {})
- this.$message.hideLoading()
- this.list = []
- if (code === 0) {
- this.list = data || []
+ } else {
+ return
+ }
+ this.$message.showLoading()
+ const {
+ code
+ } = await http.request('post', '/api/customer/flower/cart/change-num', {
+ data: {
+ id: dto.id,
+ num: addnum
+ }
+ })
+ this.$message.hideLoading()
+ if (code === 0) {
+ dto.num += addnum
+ }
+ },
+ async init() {
+ if (!this.currentInfo.id) {
+ this.$message.showToast('请先登录')
+ return
+ }
+ if (!this.currentInfo.customerDTO) {
+ this.$message.showToast('请先前往个人中心补充个人信息')
+ return
+ }
+ this.$message.showLoading()
+ await this.$store.dispatch('sign_clear', 'shopping');
+ const {
+ code,
+ data
+ } = await this.$http.request('get', '/api/customer/flower/cart/list', {})
+ this.$message.hideLoading()
+ this.list = []
+ if (code === 0) {
+ this.list = data || []
- }
- }
- }
-}
+ }
+ }
+ }
+ }
</script>
<style lang="scss" scoped>
-.shopping-container {
- background-color: rgba(255, 255, 255, 0.4);
- padding: 20rpx 30rpx;
+ .shopping-container {
+ background-color: rgba(255, 255, 255, 0.4);
+ padding: 20rpx 30rpx;
- .bottom-price {
- position: fixed;
- background-color: #ffffff;
- left: 0rpx;
- padding: 20rpx;
- right: 0rpx;
- bottom: 160rpx;
- }
+ .bottom-price {
+ position: fixed;
+ background-color: #ffffff;
+ left: 0rpx;
+ padding: 20rpx;
+ right: 0rpx;
+ bottom: 160rpx;
+ }
- .shopping-item {
- padding: 28rpx 22rpx;
- position: relative;
- background-color: #ffffff;
+ .shopping-item {
+ padding: 28rpx 22rpx;
+ position: relative;
+ background-color: #ffffff;
- .sup-title {
- margin-left: 10rpx;
- margin-top: 10rpx;
- }
+ .sup-title {
+ margin-left: 10rpx;
+ margin-top: 10rpx;
+ }
- .item-each {
- padding-left: 40rpx;
+ .item-each {
+ padding-left: 40rpx;
- .img {
- width: 124rpx;
- height: 124rpx;
- }
+ .img {
+ width: 124rpx;
+ height: 124rpx;
+ }
- .title {
- font-weight: 600;
- font-size: 28rpx;
+ .title {
+ font-weight: 600;
+ font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
+ color: #000000;
+ line-height: 40rpx;
- .level {
- color: #20613D;
- }
- }
+ .level {
+ color: #20613D;
+ }
+ }
- .price {
- font-weight: 400;
- font-size: 28rpx;
- color: #CF0000;
- line-height: 40rpx;
- }
+ .price {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #CF0000;
+ line-height: 40rpx;
+ }
- .desc {
- font-weight: 400;
- font-size: 24rpx;
- color: #666666;
- line-height: 34rpx;
- }
- }
+ .desc {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ line-height: 34rpx;
+ }
+ }
- .button-icons {
- //position: absolute;
- //z-index: 10;
- line-height: 40rpx;
+ .button-icons {
+ //position: absolute;
+ //z-index: 10;
+ line-height: 40rpx;
- .curnums {
- margin-left: 10rpx;
- margin-right: 10rpx;
- }
- }
- }
+ .curnums {
+ margin-left: 10rpx;
+ margin-right: 10rpx;
+ }
+ }
+ }
- .top-title {
- font-size: 32rpx;
- color: #000000;
- line-height: 40rpx;
- }
+ .top-title {
+ font-size: 32rpx;
+ color: #000000;
+ line-height: 40rpx;
+ }
- .top-desc {
- font-size: 28rpx;
- color: #666666;
- line-height: 40rpx;
- }
+ .top-desc {
+ font-size: 28rpx;
+ color: #666666;
+ line-height: 40rpx;
+ }
- .top-kf {
- background: linear-gradient(270deg, rgba(219, 244, 229, 0) 0%, #D5ECDE 100%);
- border-radius: 8rpx;
- font-weight: 400;
- font-size: 24rpx;
- margin-top: 10rpx;
- color: #20613D;
- line-height: 52rpx;
- height: 52rpx;
- padding-left: 26rpx;
+ .top-kf {
+ background: linear-gradient(270deg, rgba(219, 244, 229, 0) 0%, #D5ECDE 100%);
+ border-radius: 8rpx;
+ font-weight: 400;
+ font-size: 24rpx;
+ margin-top: 10rpx;
+ color: #20613D;
+ line-height: 52rpx;
+ height: 52rpx;
+ padding-left: 26rpx;
- .icon-clock {
- margin-top: 9rpx;
- }
- }
-}
-</style>
+ .icon-clock {
+ margin-top: 12rpx;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/sub_pages/customer/trade/detail.vue b/sub_pages/customer/trade/detail.vue
index b25c7c0..af290b5 100644
--- a/sub_pages/customer/trade/detail.vue
+++ b/sub_pages/customer/trade/detail.vue
@@ -3,7 +3,7 @@
<view class="top-img-container">
<image :src="dto.cover" class="top-img" mode="aspectFill"></image>
<view class="icon-container">
- <image src="../../../static/common/icon-sc.png" class="icon-sc"></image>
+ <image src="../../../static/common/icon-sc.png" @click="collectItem(dto)" class="icon-sc"></image>
<!-- <view class="num">12</view>-->
</view>
<view class="icon-container">
@@ -63,10 +63,10 @@
<view class="info-brand m-t-12" @click.stop="openbrand">
<view class="title-before-blue" style="padding-top: 0rpx;padding-bottom: 0rpx;">店铺</view>
<view class="flex m-t-12">
- <image class="store-logo"></image>
+ <image class="store-logo" :src="dto.supplierCover"></image>
<view>
- <view class="store-name">{{dto.supplierName||'-'}}</view>
- <view class="store-address">{{dto.supplierStation||'-'}}</view>
+ <view class="store-name t1">{{dto.supplierName||'-'}}</view>
+ <view class="store-address t1">{{dto.supplierStation||'-'}}</view>
</view>
<view class="store-to m-l-a m-r-0">进入店铺</view>
</view>
@@ -133,6 +133,23 @@
}
},
methods: {
+ async collectItem(dto){
+ await this.$message.confirm('是否添加到收藏')
+ this.$message.showLoading()
+ const {
+ code,
+ data
+ } = await this.$http.request('post', '/api/collect/add', {
+ data: {
+ flowerId: dto.id
+ }
+ })
+ if (code === 0) {
+ this.$message.showToast('收藏成功')
+ }
+
+ this.$message.hideLoading()
+ },
async submitShopping(dto) {
//提交到购物车中
this.$message.showLoading()
@@ -198,6 +215,7 @@
font-size: 28rpx;
color: #CF0000;
line-height: 40rpx;
+ margin-top: -10rpx;
.num {
font-size: 48rpx;
@@ -335,6 +353,7 @@
position: absolute;
top: 20rpx;
width: 80rpx;
+ left: 40rpx;
height: 80rpx;
background: rgba(0, 0, 0, 0);
@@ -367,12 +386,12 @@
}
.icon-container:last-child {
- left: 140rpx;
+ left: 100rpx;
}
- .icon-container:first-child {
- left: 40rpx;
- }
+ // .icon-container:first-child {
+ // left: 40rpx;
+ // }
}
}
diff --git a/sub_pages/customer/trade/list.vue b/sub_pages/customer/trade/list.vue
index fe3f11d..c5d7132 100644
--- a/sub_pages/customer/trade/list.vue
+++ b/sub_pages/customer/trade/list.vue
@@ -4,17 +4,14 @@
<view class="category-detail flex" v-if="query.category">
<view class="flex1 info">
<view class="title flex">
- <view>{{categoryInfo.name||'-'}}</view>
- <view>
- <image src="../../../static/common/icon-kf.png" class="icon-kf m-l-15 img100"></image>
-
- </view>
+ {{categoryInfo.name||'-'}}
+ <image src="../../../static/common/icon-kf.png" class="icon-kf m-l-15 img100"></image>
</view>
<view class="desc">
- 规格:{{categoryInfo.unit}}
+ 规格:{{categoryInfo.unit || '暂无'}}
</view>
<view class="desc">
- 颜色:{{categoryInfo.color}}
+ 颜色:{{categoryInfo.color || '暂无'}}
</view>
<!-- <view class="desc">
包袋:棉袋
@@ -22,24 +19,23 @@
</view>
<view class="info-price">
<view class="title">当日均价</view>
- <view class="price">19.66</view>
+ <view class="price">{{categoryInfo.avePrice||'暂无'}}</view>
<view class="flex desc">
- <view class="m-l-a m-r-5">+0.76</view>
- <view class="m-r-a m-l-5">+4.02%</view>
+ <view class="m-l-a m-r-5">{{categoryInfo.avePriceDifference&&categoryInfo.avePriceDifference>=0?'+':''}}{{categoryInfo.avePriceDifference||0}}</view>
+ <view class="m-r-a m-l-5">{{categoryInfo.avePriceDifferenceRate&&categoryInfo.avePriceDifferenceRate>=0?'+':''}}{{categoryInfo.avePriceDifferenceRate||0}}%</view>
</view>
</view>
</view>
<view class="" style="min-height: calc(100vh - 260rpx);">
- <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
- <view v-else>
+ <view>
<!-- 查询条件 -->
<view class="component-filter-container">
<view class="flex1" @click.stop="order_show=true">
- {{ this.query.columnStr || '排序' }}
+ {{ query.columnStr || '排序' }}
<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
</view>
<view class="flex1" @click.stop="level_show=true">
- {{ this.query.levelStr || '级别' }}
+ {{ query.levelStr || '级别' }}
<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
</view>
@@ -55,14 +51,15 @@
</view>
</view>
</view>
+ <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
<view class="component-shop-item flex" v-for="(item,index) of list" :key="index">
<view class="img" @click.stop="toDetail(item)">
<image class="img img100"
- src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/ff/fff3027bd0a146478fd1f0aae816a028%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20240710224139.png">
+ :src="item.cover">
</image>
<view class="level">
- {{levelStr||''}}
+ {{item.levelStr||''}}
</view>
</view>
@@ -79,10 +76,10 @@
</view>
<view class="other-info flex">
<view class="m-r-15">
- 已售:{{item.sales}}
+ 已售:{{item.sales||0}}
</view>
<view class="m-r-15">
- 剩余:{{item.stock}}
+ 剩余:{{item.stock||0}}
</view>
<view class="m-r-15">
{{item.unit}}
@@ -196,7 +193,7 @@
}).then(res => {
var data = res.data
this.level_columns = [data || []]
- this.columns_levels[0].unshift({
+ this.level_columns[0].unshift({
label: '全部',
value: ''
})
@@ -286,6 +283,7 @@
},
select_level(e) {
this.level_show = false
+ console.log('select_level',e)
this.query.levelStr = e.value[0].label
this.query.level = e.value[0].value
this.refreshList('post')
@@ -361,7 +359,7 @@
font-weight: 600;
font-size: 36rpx;
color: #000000;
- line-height: 50rpx;
+ line-height: 44rpx;
}
.icon-kf {
diff --git a/sub_pages/customer/trade/trade.vue b/sub_pages/customer/trade/trade.vue
index b76ccdc..cf1a60b 100644
--- a/sub_pages/customer/trade/trade.vue
+++ b/sub_pages/customer/trade/trade.vue
@@ -38,7 +38,7 @@
<view v-for="(item,index) of listFilter" :key="item.id" class="canteen-item list"
@click.stop="toDetailList(item)">
<view class="m-r-10">
- <image :src="item.imageUrl" mode="scaleToFill" class="cover"
+ <image :src="item.imageUrl" mode="scaleToFill" class="cover" :lazy-load="true"
@click.stop="previewImg(item.imageUrl)">
</image>
</view>
--
Gitblit v1.9.3