detail.wxml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <swiper class="slides" indicator-dots="{{shop.images.length > 1}}" indicator-color="#bcc0c9" indicator-active-color="#3a4861">
  2. <swiper-item wx:for="{{shop.images}}" wx:key="id">
  3. <image src="{{item}}" mode="aspectFill" bindtap="previewHandle" data-src="{{item}}"/>
  4. </swiper-item>
  5. </swiper>
  6. <view class="heading" wx:if="{{shop.name}}">
  7. <text class="name">{{shop.name}}</text>
  8. <text class="phone">电话:{{shop.phone || 'none'}}</text>
  9. <text class="address">地址:{{shop.address}}</text>
  10. <text class="hours">营业时间:{{shop.businessHours}}</text>
  11. <view class="score" wx:if="{{item.score}}">{{item.score}}</view>
  12. </view>
  13. <view class="introduction" wx:if="{{shop.introduction}}">
  14. <text>{{shop.introduction}}</text>
  15. </view>
  16. <view class="comments" wx:if="{{shop.comments.length}}">
  17. <view class="item" wx:for="{{shop.comments}}" wx:key="*this">
  18. <text class="name">{{item.name}}</text>
  19. <text class="date">{{item.date}}</text>
  20. <text class="rating">{{item.rating}}</text>
  21. <text class="content">{{item.content}}</text>
  22. <view class="images">
  23. <image wx:for="{{item.images}}" wx:key="*this" src="{{utils.size(item)}}"/>
  24. </view>
  25. </view>
  26. </view>
  27. <wxs module="utils">
  28. module.exports = {
  29. size: function (input) {
  30. return input.replace('w.h', '100.100')
  31. }
  32. }
  33. </wxs>