123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439 |
- <template name="goods">
- <view class="goods-template">
- <!-- 商品列表 -->
- <view class="goods-list">
- <view class="goods-item clearfix">
- <view class="shoptitle">
- <view class="title-text">
- {{ orderInfo.shopName }}
- </view>
- </view>
- <view class="productlist">
- <view class="goods-pros-t" v-for="(pros, index) in dataList" :key="index" @click="details(pros)">
- <view class="pros-left">
- <view class="pros-img">
- <image :src="pros.image" alt="" />
- </view>
- </view>
- <view class="pros-product">
- <view class="producttitle">{{ pros.name }}</view>
- <view class="product-view">
- <view class="view-num red">¥{{ pros.price | NumFormat }}</view>
- <view class="view-num right">x {{ pros.num }}</view>
- </view>
- </view>
- </view>
- </view>
- <view class="goods-pros-m" v-if="orderInfo.note">
- <view class="m-text">留言:</view>
- <view class="m-input">
- <view class="text">{{ orderInfo.note ? orderInfo.note : '' }}</view>
- </view>
- </view>
- <view class="goods-pros-b clearfix">
- <view class="pros-price-view">
- <view class="price-view-le">商品总额:</view>
- <view class="price-view-ri">¥{{ orderInfo.productAmount | NumFormat }}</view>
- </view>
- <view class="pros-price-view" @click="popupShow = true">
- <view class="price-view-le">运费:</view>
- <view class="price-view-ri">{{ orderInfo.postageInfo }}</view>
- </view>
- <view class="pros-price-view">
- <view class="price-view-le">应付金额:</view>
- <view class="price-view-ri">¥{{ orderInfo.realPay | NumFormat }}</view>
- </view>
- <view class="pros-price-view">
- <view class="price-view-le">已付金额:</view>
- <view class="price-view-ri">¥{{ orderInfo.receiptAmount | NumFormat }}</view>
- </view>
- <view class="pros-price-view">
- <view class="price-view-le">待付金额:</view>
- <view class="price-view-ri red">¥{{ orderInfo.obligation | NumFormat }}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'goods',
- props: {
- list: {
- type: Array
- },
- orderInfo: {
- type: Object
- }
- },
- data() {
- return {
- dataList: [],
- vipFlag: 0,
- }
- },
- created() {
- this.initGetStotage(this.list)
- },
- filters: {
- NumFormat(value) {
- //处理金额
- return Number(value).toFixed(2)
- },
- formatIncludedTax(value) {
- if (value === '1') {
- return '不含税 '
- } else if (value === '2') {
- return '含税'
- } else {
- return ''
- }
- }
- },
- computed: {},
- methods: {
- async initGetStotage(data) {
- const userInfo = await this.$api.getStorage()
- this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
- this.dataList = data
- },
- details(pros) {
- if (pros.validFlag == 9) {
- return
- } else {
- this.$api.navigateTo(`/pages/goods/product?id=${pros.productId}`)
- }
- },
- clickPopupShow(pros) {
- console.log(pros)
- this.$emit('popupClick', pros)
- },
- PromotionsFormat(promo) {
- //促销活动类型数据处理
- if (promo != null) {
- if (promo.type == 1 && promo.mode == 1) {
- return true
- } else {
- return false
- }
- }
- return false
- }
- }
- }
- </script>
- <style lang="scss">
- .goods-template {
- width: 100%;
- height: auto;
- background: #ffffff;
- float: left;
- margin-top: 24rpx;
- .goods-list {
- width: 100%;
- height: auto;
- background: #f7f7f7;
- .goods-item {
- width: 702rpx;
- padding: 24rpx;
- height: auto;
- background: #ffffff;
- margin-bottom: 24rpx;
- &:last-child {
- margin-bottom: 0;
- }
- }
- .shoptitle {
- width: 100%;
- float: left;
- height: 56rpx;
- line-height: 56rpx;
- margin-bottom: 12rpx;
- .floor-item-act{
- height: 56rpx;
- text-align: center;
- box-sizing: border-box;
- float: left;
- padding: 10rpx 0;
- margin-right: 12rpx;
- .floor-tags{
- height: 28rpx;
- border-radius: 6rpx;
- background-color: #FFFFFF;
- line-height: 28rpx;
- color: $color-system;
- text-align: center;
- display: inline-block;
- padding:0 6rpx;
- font-size: $font-size-20;
- border: 1px solid #FF5B00;
- float: left;
- }
- }
- .title-text {
- width: 400rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- float: left;
- font-size: $font-size-28;
- color: $text-color;
- text-align: left;
- line-height: 56rpx;
- font-weight: bold;
- .iconfont {
- color: #999999;
- font-size: 28rpx;
- margin-left: 10rpx;
- }
- .paymenttext {
- color: #f9a94b;
- font-size: $font-size-22;
- margin-left: 20rpx;
- }
- }
- }
- .productlist {
- width: 100%;
- height: auto;
- padding: 0;
- box-sizing: border-box;
- }
- .goods-pros-t {
- display: flex;
- width: 100%;
- height: auto;
- margin: 20rpx 0;
- .pros-left {
- width: 210rpx;
- height: 100%;
- margin: 0 26rpx 0 0;
- }
- .pros-img {
- width: 210rpx;
- height: 210rpx;
- border-radius: 10rpx;
- border: 1px solid #f3f3f3;
- position: relative;
- .tips {
- display: inline-block;
- width: 80rpx;
- height: 40rpx;
- background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
- line-height: 40rpx;
- text-align: center;
- font-size: $font-size-24;
- color: #ffffff;
- border-radius: 10rpx 0 10rpx 0;
- position: absolute;
- top: 0;
- left: 0;
- }
- image {
- width: 210rpx;
- height: 210rpx;
- border-radius: 10rpx;
- }
- }
- }
- .product-info {
- padding: 10rpx 0;
- .product-view {
- font-size: $font-size-24;
- color: #999999;
- overflow: hidden;
- height: 44rpx;
- line-height: 44rpx;
- float: left;
- width: 50%;
- .view-num {
- float: left;
- .text{
- color: #333333;
- }
- }
- }
- }
- .pros-product {
- width: 468rpx;
- height: 100%;
- line-height: 36rpx;
- font-size: $font-size-26;
- position: relative;
- .product-view {
- &.allPrice {
- width: 100%;
- }
- .view-num {
- flex: 1;
- text-align: left;
- font-size: $font-size-26;
- color: #999999;
- line-height: 44rpx;
- float: left;
- &.right {
- float: right;
- }
- &.red {
- color: #ff2000;
- font-weight: bold;
- &.none {
- text-decoration: line-through;
- color: #999999;
- }
- }
- }
- }
- .producttitle {
- width: 100%;
- display: inline-block;
- height: auto;
- text-overflow: ellipsis;
- display: -webkit-box;
- word-break: break-all;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- margin-bottom: 8rpx;
- }
- .productspec {
- height: 44rpx;
- color: #999999;
- line-height: 44rpx;
- text-overflow: ellipsis;
- display: -webkit-box;
- word-break: break-all;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- overflow: hidden;
- margin-bottom: 25rpx;
- }
- .productprice {
- height: 48rpx;
- position: absolute;
- width: 100%;
- bottom: 0;
- .price {
- line-height: 48rpx;
- font-size: $font-size-28;
- width: 48%;
- color: #ff2a2a;
- float: left;
- .price {
- line-height: 48rpx;
- font-size: $font-size-28;
- width: 48%;
- color: #ff2a2a;
- float: left;
- font-weight: bold;
- }
- }
- .count {
- height: 100%;
- float: right;
- position: relative;
- .small {
- color: #666666;
- }
- }
- }
- .floor-item-act {
- width: 100%;
- height: 56rpx;
- text-align: center;
- box-sizing: border-box;
- float: left;
- padding: 10rpx 0 0 0;
- }
- .floor-item-act {
- height: 56rpx;
- text-align: center;
- box-sizing: border-box;
- float: left;
- padding: 10rpx 0;
- margin-right: 12rpx;
- }
- }
- .goods-pros-m {
- width: 100%;
- height: auto;
- line-height: 76rpx;
- font-size: $font-size-26;
- color: $text-color;
- float: left;
- .m-text {
- width: 62rpx;
- float: left;
- padding-right: 20rpx;
- font-weight: bold;
- }
- .m-input {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
- position: relative;
- width: 620rpx;
- height: auto;
- padding: 20rpx 0 10rpx 0;
- background: #ffffff;
- .text {
- width: 100%;
- height: 100%;
- font-size: $font-size-26;
- line-height: 36rpx;
- color: #333333;
- }
- }
- }
- .goods-pros-b {
- width: 100%;
- padding-top: 12rpx;
- float: left;
- .pros-price-view{
- width: 100%;
- height: 44rpx;
- font-size: 24rpx;
- line-height: 44rpx;
- .price-view-le{
- float: left;
- color: #999999;
- text-align: left;
- }
- .price-view-ri{
- float: right;
- color: #333333;
- text-align: right;
- &.red{
- color: #F94B4B;
- }
- }
- }
- .pros-price-btn{
- width: 100%;
- height: 48rpx;
- .btn{
- width: 168rpx;
- height: 48rpx;
- line-height: 46rpx;
- box-sizing: border-box;
- border: 2rpx solid #e1e1e1;
- border-radius: 8rpx;
- text-align: center;
- color: #b2b2b2;
- margin: 0 auto;
- font-size: $font-size-24;
- .iconfont {
-
- }
- }
- }
- }
- }
- }
- </style>
|