index.wxml
7.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<view class="navigation-bar">
<navigation-bar custom navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="商品详情">
<view class="navigation">
<view class="back text-center" bindtap="back">
<mp-icon icon="back" color="#323233" size="{{12}}"></mp-icon>
</view>
<view class="page-title">商品详情</view>
</view>
</navigation-bar>
</view>
<view class="tab-widget flex_sc" wx:if="{{!showSku && detailInfo.goodsSource == 1}}" style="top:{{padding_bottom}}px;opacity:{{opacity}};z-index:{{opacity>0.9?99:1}}">
<block wx:for="{{tabs}}" wx:key="index">
<view bind:tap="changeTab" data-index="{{index}}" class="tab-box flex_cc">
<text>{{item}}</text>
<view wx:if="{{curTabIndex==index}}" class="line"></view>
</view>
</block>
</view>
<view hidden="{{curTabIndex!=0}}">
<view class="layout" style="padding-bottom:{{padding_bottom + 20}}px;">
<view class="banner-box">
<swiper class="banner" bindchange="changeBanner">
<block wx:for="{{detailInfo.imageResponses}}" wx:key="index">
<swiper-item>
<glsx-image class="icon-bg" src="{{item.imgUrl}}" bindtap="previewImage" data-current="{{item.imgUrl}}" data-item="{{detailInfo.imageResponses}}"/>
</swiper-item>
</block>
</swiper>
<block wx:if="{{detailInfo.imageResponses.length > 1}}">
<view class="dot-box x-center">
<block wx:for="{{detailInfo.imageResponses}}" wx:key="index">
<view class="dot {{bannerIndex == index ? 'active':''}}"></view>
</block>
</view>
</block>
</view>
<view class="goods-container">
<view class="container-item goods-box">
<view class="price">
<view class="price-box">
<view class="sale-price">
<text class="price-num">{{detailInfo.redeemPoints}}</text><text>积分</text>
<text class="market-price">¥{{detailInfo.marketPrice}}</text>
</view>
</view>
<view class="count">
<text>剩余 {{goodsStock}}</text><text class="line">|</text><text>销售 {{detailInfo.saleAmount}}</text>
</view>
</view>
<view class="goods-title"><text wx:if="{{detailInfo.goodsSource == 1}}">{{detailInfo.brandName}}</text>{{detailInfo.goodsSkuName}}</view>
</view>
<view class="container-item select-params-box">
<view class="cell" bind:tap="showSkuModal" data-type="choose" wx:if="{{skuInfo || activeSku}}">
<view class="flex">
<view class="title">已选</view>
<view class="content flex_ccc">
<view class="text" wx:if="{{detailInfo.goodsSource == 1}}">{{skuInfo}}</view>
<view class="text" wx:else>{{activeSku}}</view>
</view>
</view>
<mp-icon icon="arrow" color="#B1B1B3" size="{{12}}"></mp-icon>
</view>
<view class="cell" bindtap="toShowAddressModal">
<view class="flex">
<view class="title">配送</view>
<view data-is-choose-address class="content flex_ccc">
<view class="text">{{contactAddress || '--'}}</view>
</view>
</view>
<mp-icon icon="arrow" color="#B1B1B3" size="{{12}}"></mp-icon>
</view>
<block>
<view class="cell" wx:if="{{detailInfo.goodsSource == 1}}">
<view class="title">服务</view>
<view class="content flex_ccc">
<view class="text">{{service[detailInfo.returnGoodsRules]}},包邮,正品保障</view>
</view>
</view>
<view class="cell" wx:else>
<view class="title">运费</view>
<view class="content flex_ccc">
<block wx:if="{{detailInfo.expressFee}}">{{detailInfo.expressFee}}积分</block>
<block wx:else>免运费(请以提交订单时为准)</block>
</view>
</view>
</block>
<view class="cell" wx:if="{{detailInfo.goodsSource == 2 && detailInfo.serviceDesc}}">
<view class="title">服务说明</view>
<view class="content flex_ccc">
<view class="text">{{detailInfo.serviceDesc}}</view>
</view>
</view>
</view>
<view class="goods-detail-box" wx:if="{{detailInfo.goodsDescribe || detailInfo.goodsDescList.length}}">
<view class="title">商品详情</view>
<view class="image-list-wrap" wx:if="{{detailInfo.goodsSource == 1}}">
<mp-html content="{{detailInfo.goodsDescribe}}"></mp-html>
</view>
<view wx:else>
<block wx:for="{{detailInfo.goodsDescList}}" wx:key="index">
<view class="content">
<block wx:if="{{item.resType == 1}}">
<image webp src="{{item.content}}" mode="widthFix" lazy-load></image>
</block>
<block wx:elif="{{item.resType == 2}}">
{{item.content}}
</block>
<block wx:else>
<video src="{{item.content}}" style="height:{{item.height}}px;width:100%"></video>
</block>
</view>
</block>
</view>
</view>
</view>
</view>
</view>
<view hidden="{{curTabIndex!=1}}">
<view class="layout" style="padding-bottom:{{padding_bottom + 20}}px;">
<view class="inner" style="padding-top:{{padding_bottom+48}}px">
<view class="title">商品参数</view>
<view class="table-wrap">
<view class="cell flex_sc">
<view class="label-box flex_sc">商品编号</view>
<view class="content-box flex_sc">{{detailInfo.goodsSkuCode}}</view>
</view>
<view class="cell flex_sc">
<view class="title-box flex_sc">参数</view>
</view>
<block wx:for="{{detailInfo.attributeResponses}}" wx:key="index">
<view wx:if="{{item.attributeName}}" class="cell flex_sc">
<view class="label-box flex_sc">{{item.attributeName}}</view>
<view class="content-box flex_sc">{{item.attributeValueName}}</view>
</view>
</block>
</view>
</view>
</view>
</view>
<block wx:if="{{navHeight && eventFlag}}">
<goods-action platformShop="{{true}}" id="goods-action" bindready="goodsActionReady" pay-disabled="{{false}}" upgradeSet="{{!detailInfo.retailPrice&&detailInfo.exchangeIntegral}}" stock="{{detailInfo.goodsStock==0}}" buyFlag="{{false}}" bindclick="goodsActionClick" hideShop="{{false}}"></goods-action>
</block>
<sku bind:cancelSku="closeSku" bind:getCount="getCount" bind:sameAddress="resetAddress" bind:joinSuccess="joinSuccess" show="{{showSku}}" defaultAds="{{contactAddress}}" goods="{{detailInfo}}" clickType="{{clickType}}" address="{{addressList}}" defaultAddress="{{defaultAddress}}"></sku>
<address address="{{addressList}}" defaultAddress="{{defaultAddress}}" bindcancel="closeAddress" bind:getAddress="getAddress" show="{{showAddress}}"></address>