ProductInfo.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <!-- 商品 -->
  3. <view class="div commodity-wrapper">
  4. <!-- 轮播图 -->
  5. <info-goods-swipe></info-goods-swipe>
  6. <!-- 商品信息 -->
  7. <info-item></info-item>
  8. <!-- 促销信息 -->
  9. <info-promotions></info-promotions>
  10. <!-- 代金券 -->
  11. <view class="div main-content">
  12. <flex-line v-if="voucher" :is-link="true" :show-border="true" @click.native="goNavigate('/pages/home/storedetail/StoreVoucher')">
  13. <text class="span">领取优惠券</text>
  14. </flex-line>
  15. </view>
  16. <!-- 店铺服务 -->
  17. <view class="main-content" v-if="detailInfo.store_service_list && detailInfo.store_service_list.length">
  18. <flex-line class="field-line" :is-link="true" :show-border="true" @click.native="showPopup('showService')">
  19. <text>店铺服务</text>
  20. <view class="field-line-right" slot="right">
  21. <view class="service-list">
  22. <view class="service-item" v-for="(item,index) in detailInfo.store_service_list" :key="index">
  23. <text class="service-icon iconfont">&#xe69d;</text>
  24. <text class="service-text">{{item.store_service_title}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. </flex-line>
  29. <uni-popup background-color="#fff" ref="showService" type="bottom">
  30. <view class="popup-service-list">
  31. <view class="popup-service-item" v-for="(item,index) in detailInfo.store_service_list" :key="index">
  32. <view class="service-item">
  33. <text class="service-icon iconfont">&#xe69d;</text>
  34. <text class="service-text">{{item.store_service_title}}</text>
  35. </view>
  36. <view class="service-desc">{{item.store_service_desc}}</view>
  37. </view>
  38. </view>
  39. </uni-popup>
  40. </view>
  41. <!-- 购买 -->
  42. <info-buy></info-buy>
  43. <!-- 自提-->
  44. <info-chain></info-chain>
  45. <!-- 联系客服-->
  46. <info-contact></info-contact>
  47. <!-- 店铺保障-->
  48. <info-translate></info-translate>
  49. <!-- 评论 -->
  50. <info-goods-review @reviewposition='reviewposition'></info-goods-review>
  51. <!-- 店铺信息 -->
  52. <view class="div goods-detail-store" @click="goNavigate('/pages/home/storedetail/Storedetail',{id:storeInfo.store_id})">
  53. <view class="div">
  54. <view class="div store-name"><image mode="aspectFit" class="img" :src="storeInfo.store_avatar">
  55. {{storeInfo.store_name}}
  56. <text class="span icon-mall" v-if="storeInfo.is_platform_store">自营</text>
  57. </view>
  58. <view class="div store-rate">
  59. <text class="span equal">描述相符
  60. <text class="em">{{storeInfo.store_credit.store_servicecredit.credit}}</text>
  61. <text class="i">{{storeInfo.store_credit.store_servicecredit.percent_text}}</text>
  62. </text>
  63. <text class="span equal">服务态度
  64. <text class="em">{{storeInfo.store_credit.store_desccredit.credit}}</text>
  65. <text class="i">{{storeInfo.store_credit.store_servicecredit.percent_text}}</text>
  66. </text>
  67. <text class="span equal">发货速度
  68. <text class="em">{{storeInfo.store_credit.store_deliverycredit.credit}}</text>
  69. <text class="i">{{storeInfo.store_credit.store_servicecredit.percent_text}}</text>
  70. </text>
  71. </view>
  72. </view>
  73. </view>
  74. <!-- 商品搭配 -->
  75. <accessory-item></accessory-item>
  76. <!-- 商品详情 -->
  77. <product-desc @mbBodyposition="mbBodyposition"></product-desc>
  78. <!-- 推荐商品 -->
  79. <recommend-item></recommend-item>
  80. </view>
  81. </template>
  82. <script>
  83. import { urlencode } from '@/util/common'
  84. import { mapState, mapMutations } from 'vuex'
  85. import flexLine from '../../../flexLine'
  86. import InfoGoodsSwipe from './InfoGoodsSwipe'
  87. import InfoItem from './InfoItem'
  88. import InfoPromotions from './InfoPromotions'
  89. import InfoBuy from './InfoBuy'
  90. import InfoContact from './InfoContact'
  91. import InfoTranslate from './InfoTranslate'
  92. import InfoChain from './InfoChain'
  93. import InfoGoodsReview from './InfoGoodsReview'
  94. import RecommendItem from './RecommendItem'
  95. import AccessoryItem from './AccessoryItem'
  96. import ProductDesc from './ProductDesc'
  97. export default {
  98. data () {
  99. return {
  100. }
  101. },
  102. created () {},
  103. components: {
  104. flexLine,
  105. InfoGoodsSwipe,
  106. InfoItem,
  107. InfoPromotions,
  108. InfoBuy,
  109. InfoContact,
  110. InfoTranslate,
  111. InfoChain,
  112. InfoGoodsReview,
  113. RecommendItem,
  114. AccessoryItem,
  115. ProductDesc
  116. },
  117. computed: {
  118. ...mapState({
  119. storeInfo: state => state.goodsdetail.storeInfo,
  120. detailInfo: state => state.goodsdetail.detailInfo,
  121. voucher: state => state.goodsdetail.voucher
  122. })
  123. },
  124. mounted () {},
  125. methods:{
  126. showPopup(id){
  127. this.$refs[id].open()
  128. },
  129. hidePopup(id){
  130. this.$refs[id].close()
  131. },
  132. goNavigate(path,query=false){
  133. uni.navigateTo({url:path+(query?('?'+urlencode(query)):'')})
  134. },
  135. mbBodyposition:function(top){
  136. this.$emit('mbBodyposition',top);
  137. },
  138. reviewposition:function(top){
  139. this.$emit('reviewposition',top);
  140. }
  141. }
  142. }
  143. </script>
  144. <style lang="scss" scoped>
  145. .main-content{padding:0 $pageSpace;background-color: #fff;}
  146. .commodity-wrapper {
  147. }
  148. .goods-detail-store { display: block; position: relative; z-index: 1; padding: 0 $pageSpace;background: #FFF; margin-top:$modelSpace;box-shadow: 0px 4px 4px #f7f7f7; }
  149. .goods-detail-store .store-name { display: flex;align-items: center;min-height: 0.9rem; padding: 0.5rem 0 0.25rem 0; font-size:$subFontSize; line-height: 0.9rem; color: #333; }
  150. .goods-detail-store .store-name .img{width:100rpx;height: 100rpx;border-radius: .5rem;margin-right: .5rem;}
  151. .goods-detail-store .store-name .icon-store { display: inline-block; width: 0.8rem; height: 0.9rem; vertical-align: top; margin-right: 0.2rem; }
  152. .goods-detail-store .store-name .icon-store:before { content: "\e7dc"; }
  153. .goods-detail-store .store-name .icon-mall { color: #fff;background: $primaryColor;font-size: .55rem;margin-left: .5rem;padding: .1rem .2rem;border-radius: .3rem;}
  154. .goods-detail-store .store-rate { height: 0.7rem; padding: 0.4rem 0 0.5rem 0; border-top: dashed 1px #EEE; font-size: 0; }
  155. .goods-detail-store .store-rate .span { display: inline-block; width: 33.33%; height: 0.7rem; font-size:$h6; line-height: 0.7rem; color: #888; }
  156. .goods-detail-store .store-rate .span .em { display: inline-block; vertical-align: middle; font-size:$subFontSize; font-weight: 600;}
  157. .goods-detail-store .store-rate .span .i { display: inline-block; vertical-align: middle; width: 0.7rem; height: 0.7rem; font-size:$h6; line-height: 0.7rem; font-style: normal; text-align: center; border-radius: 0.1rem;margin-left:0.2rem;}
  158. .goods-detail-store .store-rate .span.high .em,
  159. .goods-detail-store .store-rate .span.equal .em { color: $primaryColor;}
  160. .goods-detail-store .store-rate .span.high .i,
  161. .goods-detail-store .store-rate .span.equal .i { color: #FFF; background-color: $primaryColor}
  162. .goods-detail-store .store-rate .span.low .em { color: #48CFAE;}
  163. .goods-detail-store .store-rate .span.low .i { color: #FFF; background-color: #48CFAE;}
  164. .service-list{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:flex;flex-wrap:wrap;padding-left:.5rem;height:1rem;line-height:1rem;}
  165. .service-item{display:flex;align-items:center;padding-right:.5rem;
  166. .service-icon{font-size:$subFontSize;color:$primaryColor;padding-right:.2rem;}
  167. .service-text{font-size:$subFontSize;}
  168. }
  169. .service-desc{font-size:$fontSize;color:#999;padding-left:.8rem;}
  170. .popup-service-list{padding:.5rem $pageSpace $footerHeight $pageSpace;
  171. .popup-service-item{border-bottom:1px solid #eee;padding:.5rem 0;}
  172. }
  173. </style>