123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <!-- Detailinfo.vue -->
- <template>
- <view class="div ui-detail-info" v-if="detailInfo">
- <view class="div info-header ui-flex">
- <text class="h3">{{ detailInfo.pgoods_name }}</text>
- </view>
- <view class="div price">
- <text class="span current-price"><text class="i price-number">{{ detailInfo.pgoods_points }}</text>积分</text>
- <text class="span old-price">¥{{ detailInfo.pgoods_price }}</text>
- </view>
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex'
- export default {
- data () {
- return {
- isShowDesc: false // 商品简介是否显示更多
- }
- },
- computed: {
- ...mapState({
- detailInfo: state => state.pointsgoods.detailInfo,
- currentProductId: state => state.pointsgoods.currentProductId,
- user: state => state.member.info
- })
- },
- created () {
- },
- methods: {
- ...mapMutations({
- changeIndex: 'changeIndex'
- })
- }
- }
- </script>
- <style lang="scss" scoped>
- .ui-detail-info {
- padding: 0 $pageSpace;
- background: #ffffff;
- margin-bottom: $modelSpace;
- .ui-flex {
- display: flex;
- justify-content: space-between;
- align-content: center;
- align-items: center;
- flex-basis: 100%;
- width: auto;
- }
- .info-header {
- padding-top: 0.4rem;
- .h3 {
- color: #333;
- font-size:$subFontSize;
- padding: 0;
- margin: 0;
- font-weight: normal;
- line-height:1rem;
- flex:1;
- }
- .div {
- display: flex;
- justify-content: space-between;
- align-content: center;
- align-items: center;
- .img {
- width: 1.2rem;
- height: 1.2rem;
- vertical-align: middle;
- margin-left: 0.75rem;
- flex-shrink: 0;
- }
- }
- .span {
- width: 1.5rem;
- height: 0.9rem;
- line-height: 0.9rem;
- text-align: center;
- background: $primaryColor;
- border-radius: 0.1rem;
- font-size:$fontSize;
- color: rgba(255, 255, 255, 1);
- display: inline-block;
- margin-right: 0.5rem;
- }
- }
- .price {
- padding-bottom: 0.4rem;
- display: flex;
- align-items: baseline;
- .span {
- display: block;
- font-weight: normal;
- &.current-price {
- font-size:$fontSize;
- color: $primaryColor;
- line-height: 1rem;
- .price-number{font-size:$h1;font-weight: bold;margin-right:.2rem;}
- }
- &.num{
- font-size:$fontSize;
- color:#666;
- }
- &.old-price {
- font-size:$fontSize;
- color: rgba(164, 170, 179, 1);
- line-height: 1rem;
- text-decoration: line-through;
- margin-left: 0.3rem;
- }
- }
- }
- .info-sub {
- border-bottom: 0.5px solid #e8eaed;
- padding-bottom: 0.75rem;
- .p {
- padding: 0;
- margin: 0;
- color: $primaryColor;
- font-size:$fontSize;
- &.ui-clip {
- display: -webkit-box;
- overflow: hidden;
- }
- }
- .img {
- width: 0.4rem;
- height: 0.2rem;
- margin-left: 0.5rem;
- }
- }
- }
- </style>
|