Sanakey
2020-10-20 0da8db73585b015a7bbaf3500b77142d41b7c2ff
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!--pages/posterList/posterList.wxml-->
<!-- <text>pages/posterList/posterList.wxml</text> -->
<!-- <van-nav-bar
        placeholder
    class="van-nav-bar"
    bind:click-left="onClickNavBarLeft"
    bind:click-right="onClickNavBarRight"
>
    <view slot="left"  class="user-center flex_row">
        <image class="avatar" wx:if="{{avatarUrl||userInfo.avatarUrl}}" src="{{avatarUrl||userInfo.avatarUrl}}"></image>
        <text wx:else class="iconfont icon-morentouxiang avatar-icon"></text>
        <text class="avatar-text">个人中心</text>
    </view>
    <view slot="left"  class="user-center flex_row">
        <text class="iconfont icon-morentouxiang avatar-icon"></text>
        <text class="avatar-text">点我登录</text>
    </view>
    <navigator slot="title" class="van-nav-title" url="../search/search">
        <text class="nav-title">{{navTitle||'首页'}}</text>
        <text class="iconfont icon-sousuo1 search-icon"></text>
    </navigator>
</van-nav-bar> -->
<view class="search-bar">
    <navigator class="search-box" url="../search/search">
        <view class="search-input">
            <icon type="search" size="12" />
            <text>请输入搜索内容</text>
        </view>
    </navigator>
</view>
<view class="container">
    <scroll-view class="nav-left has-footer" scroll-y="true" style="height:{{windowHeight}}px;">
        <van-sidebar class="van-sidebar" active-key="{{ activeKey }}">
            <block wx:for="{{menuList}}" wx:key="key" wx:for-item="item">
                <van-sidebar-item bind:click="goCurrentMenu" data-index="{{index}}" data-id="{{item.MatGroup}}">{{item.MatGroupName}}>
                    <view slot="title">
                        <view class="h1-item-title no-wrap" title="{{item.MatGroupName}}">{{item.MatGroupName}}</view>
                    </view>
                </van-sidebar-item>
                <block wx:for="{{item.list}}" wx:key="key">
                    <van-sidebar-item bind:click="goCurrentMenu" data-index="{{index}}" data-id="{{item.SubMatGroup}}">{{item.SubMatGroupName}}>
                        <view slot="title">
                            <view class="item-title no-wrap" title="{{item.SubMatGroupName}}">{{item.SubMatGroupName}}</view>
                        </view>
                    </van-sidebar-item>
                </block>
            </block>
 
        </van-sidebar>
 
    </scroll-view>
 
 
    <!-- 内容 -->
    <scroll-view scroll-top="{{scrollTop}}" class="nav-right has-footer" scroll-y="true" style="height:{{windowHeight}}px;">
 
        <!-- <van-button bind:click="getPosterByTag" color="#7232dd">全部</van-button>
    <block wx:for="{{TagList}}" wx:key="key">
      <van-button bind:click="getPosterByTag" color="#7232dd">{{item}}</van-button>
    </block> -->
<!--        price="{{item.isShowPrice?item.Price:''}}"-->
<!--        origin-price="{{item.isShowPrice?item.SalesPrice:''}}"-->
<!--        currency="{{item.isShowPrice?item.CurrencySign:''}}"-->
        <view class="card-container">
            <block wx:for="{{goodsList}}" wx:for-item="item" wx:key="key">
                <van-card
                        class="goods-card"
                        custom-class="van-card"
                        thumb-mode="aspectFill"
                        desc="{{item.isShowMatCode?item.MatCode:''}}"
                        desc-class="desc-class"
                        title="{{item.isShowMatName?item.MatName:''}}"
                        thumb="{{item.PhotoPath||'/imgs/img.png'}}"
                        tag="{{(item.isRestrictQuantity&&item.RestrictBuyingQuantity<=0)?'已抢光':((item.isStartupPanicBuying&&item.PanicBuyingEndTimeBalance<=0)?'已结束':'')}}"
                >
                    <view slot="price-top" class="goods-desc">
                        <view>单位:{{item.Uom}}</view>
                        <view wx:if="{{item.PreSendMinutesDesc}}">{{item.PreSendMinutesDesc}}送达</view>
                    </view>
                    <!-- <view slot="price-top">交货分钟:{{item.PreSendMinutes}}</view> -->
                    <view slot="footer" class="card-footer flex_row">
                        <view class="price" wx:if="{{item.isShowPrice}}">
                            <text class="now-price">{{item.CurrencySign}}{{item.Price}}</text>
                            <text class="origin-price" wx:if="{{item.isShowPrice&&item.Price&&item.Price!=item.SalesPrice&&item.SalesPrice!=0}}">{{item.CurrencySign}}{{item.SalesPrice}}</text>
                        </view>
                        <view hidden="{{(item.isStartupPanicBuying&&item.PanicBuyingEndTimeBalance<=0)||(item.isRestrictQuantity&&item.RestrictBuyingQuantity<=0)}}">
                            <van-stepper
                                input-width="45"
                                button-size="25"
                                min="0"
                                value="{{ item.selectedQuantity }}"
                                async-change
                                bind:plus="onCartItemPlus"
                                bind:minus="onCartItemMinus"
                                bind:blur="onCartItemInputBlur"
                                data-id="{{item.CartId}}"
                                data-quantity="{{item.selectedQuantity}}"
                                data-matcode="{{item.MatCode}}"
                                show-minus="{{item.selectedQuantity}}"
                                class="van-stepper"
                                input-class="stepper-input {{item.selectedQuantity?'stepper-input-show':'stepper-input-hide'}}"
                                plus-class="stepper-plus"
                                minus-class="stepper-minus"
                            />
                        </view>
                        
<!--                        wx:if="{{item.selectedQuantity}}"-->
<!--                        <view wx:else data-matcode="{{item.MatCode}}" bind:tap="addCartItem">-->
<!--                            <text class="iconfont icon-jia add-btn"></text>-->
<!--                        </view>-->
                    </view>
                </van-card>
<!--                <van-tag class="van-tags"  mark type="{{tagTypes[item.LiveStatus]}}">{{liveStatus[item.LiveStatus]}}</van-tag>-->
            </block>
            <c-empty wx:if="{{goodsList.length<1}}" desc="该分类下没有商品"></c-empty>
        </view>
 
 
<!--        <template is="noMoreTemplate" />-->
        <!-- <van-grid column-num="2" border="{{ false }}" gutter="{{ 10 }}">
            <block wx:for="{{posterList}}" wx:key="key" wx:for-item="item">
                <van-grid-item use-slot content-class="poster-container" wx:for="{{item.Images}}" wx:key="key" wx:for-item="childItem">
                    <image mode="aspectFill" style="width: 100%;" src="{{childItem.url}}" />
                </van-grid-item>
            </block>
        </van-grid> -->
    </scroll-view>
 
</view>
 
<view class="cart-footer">
<!--    <van-row class="cart-bar">-->
<!--        <van-col span="6">-->
<!--            <image src="../../imgs/cart.png"></image>-->
<!--        </van-col>-->
<!--        <van-col span="12">span: 8</van-col>-->
<!--        <van-col span="6">span: 8</van-col>-->
<!--    </van-row>-->
    <view class="cart-bar" bind:tap="openHideLayer">
        <view class="cart-icon-container">
            <image mode="widthFix" class="cart-icon" src="../../imgs/cart.png">
                <text class="dot">{{cartItems}}</text>
            </image>
        </view>
        <view class="cart-info">
            <text>已选{{cartItems}}项</text>
            <view class="price">¥{{selectTotalAmount}}</view>
        </view>
        <view>
<!--            <c-authorize-phone bind:authorize="submitCart" class="clear-btn">-->
<!--                <view slot="content" class="cart-btn">提交</view>-->
<!--            </c-authorize-phone>-->
            <view catch:tap="submitCart" class="cart-btn">去结算</view>
        </view>
    </view>
</view>
 
<c-slideIn wx:if="{{showHideLayer}}" bind:maskTap="maskTap" layer-height="800">
    <view class="dialog" slot="content">
        <view class="dialog-title">
            <view class="clear-cart" bind:tap="clearCart">
                <text class="iconfont icon-lajixiang"></text>清空购物车
            </view>
        </view>
        <view class="card-container">
            <block wx:for="{{cartList}}" wx:for-item="item" wx:key="key">
                <van-swipe-cell right-width="{{ 65 }}" async-close data-id="{{item.CartId}}" bind:close="onDeleteCartItem">
                    <van-card
                            custom-class="van-card"
                            thumb-mode="aspectFill"
                            desc="{{item.isShowMatCode?item.MatCode:''}}"
                            desc-class="desc-class"
                            title="{{item.isShowMatName?item.MatName:''}}"
                            thumb="{{item.PhotoPath||'/imgs/img.png'}}"
                            price="{{item.isShowPrice?item.Price:''}}"
                            origin-price="{{item.isShowPrice?item.SalesPrice:''}}"
                            currency="{{item.isShowPrice?item.CurrencySign:''}}"
                    >
                        <view slot="price-top" class="">
                            <view wx:if="{{isShowSpecial}}">{{item.Special}}</view>
                        </view>
                        <view slot="footer" class="cart-card-footer">
                            <van-stepper
                                    input-width="50"
                                    button-size="25"
                                    min="0"
                                    value="{{ item.Quantity }}"
                                    async-change
                                    bind:plus="onCartItemPlus"
                                    bind:minus="onCartItemMinus"
                                    bind:blur="onCartItemInputBlur"
                                    data-id="{{item.CartId}}"
                                    data-quantity="{{item.Quantity}}"
                                    class="van-stepper"
                                    input-class="stepper-input}}"
                                    plus-class="stepper-plus"
                                    minus-class="stepper-minus"
                            />
                        </view>
                    </van-card>
                    <view slot="right" class="delete-item-btn">
                        <view>删除</view>
                    </view>
                </van-swipe-cell>
 
            </block>
            <c-empty wx:if="{{cartList.length<1}}" desc="购物车里空空如也"></c-empty>
        </view>
        <view class="dialog-footer"></view>
    </view>
 
</c-slideIn>
<!--<van-dialog id="van-dialog" />-->