app-attr.wxml 8.5 KB

1
  1. <view class="app-attr data-v-674095fa"><view data-event-opts="{{[['tap',[['alert',['$event']]]]]}}" bindtap="__e" class="data-v-674095fa"><slot name="button"></slot></view><block wx:if="{{display==='block'}}"><view data-event-opts="{{[['tap',[['close',['$event']]]]]}}" class="modal data-v-674095fa" bindtap="__e"><view class="safe-area-inset-bottom u-attr-fixed data-v-674095fa"><view data-event-opts="{{[['tap',[['preventD',['$event']]]]]}}" class="content data-v-674095fa" catchtap="__e"><image class="close data-v-674095fa" src="../../../static/image/icon/close.png" data-event-opts="{{[['tap',[['close',['$event']]]]]}}" bindtap="__e"></image><view class="{{['first dir-left-nowrap data-v-674095fa',sign=='wholesale'?'no-border':'']}}"><view data-event-opts="{{[['tap',[['clickImg',['$0'],['attrPic']]]]]}}" class="box-grow-0 img data-v-674095fa" bindtap="__e"><app-image vue-id="067df58c-1" img-src="{{attrPic}}" width="100%" height="100%" class="data-v-674095fa" bind:__l="__l"></app-image></view><view class="info data-v-674095fa"><view class="{{['dir-left-nowrap cross-center data-v-674095fa',priceColor]}}"><view class="dir-left-nowrap cross-center data-v-674095fa"><block wx:if="{{selectAttr.extra||goods.extra}}"><view class="{{['dir-left-nowrap cross-center data-v-674095fa',theme+'-m-text '+theme]}}"><view class="data-v-674095fa">{{(selectAttr.extra?selectAttr.extra.value+selectAttr.extra.name:goods.extra.value+goods.extra.name)+''}}</view><block wx:if="{{!(goods.sign==='integral_mall'&&attrPrice==0)}}"><view class="data-v-674095fa">+</view></block></view></block><block wx:if="{{!(goods.sign==='integral_mall'&&attrPrice==0)&&sign!='wholesale'}}"><app-price vue-id="067df58c-2" theme="{{theme}}" type="text-price-all" price="{{attrPrice}}" default-price="{{goods.price}}" class="data-v-674095fa" bind:__l="__l"></app-price></block><block wx:if="{{sign=='wholesale'}}"><app-price vue-id="067df58c-3" theme="{{theme}}" type="text-price-all" price="{{attrPrice}}" max="{{goods.level_show==1?goods.price_member_max:goods.price_max}}" min="{{goods.level_show==1?goods.price_member_min:goods.price_min}}" class="data-v-674095fa" bind:__l="__l"></app-price></block></view><block wx:if="{{goods.level_show===1&&(selectAttr||sign=='wholesale')}}"><view class="data-v-674095fa"><app-member-mark vue-id="067df58c-4" theme="{{themeObject}}" class="data-v-674095fa" bind:__l="__l"></app-member-mark></view></block></view><view class="stock data-v-674095fa">{{"库存:"+attrNum}}</view></view></view><view class="{{['second data-v-674095fa',sign=='wholesale'?'no-padding':'']}}"><slot name="extra"></slot><block wx:if="{{sign=='wholesale'}}"><view class="wholesale data-v-674095fa"><block wx:for="{{goods.attr_groups}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{index!=goods.attr_groups.length-1}}"><view class="wholesale-attr-list dir-left-nowrap cross-center data-v-674095fa"><view class="wholesale-attr-group t-omit-two data-v-674095fa">{{item.attr_group_name}}</view><scroll-view class="wholesale-attr-item data-v-674095fa" scroll-left="{{item.scrollLeft}}" scroll-x="true" data-event-opts="{{[['scroll',[['scrollGet',['$event',index]]]]]}}" bindscroll="__e"><block wx:for="{{item.attr_list}}" wx:for-item="attr" wx:for-index="key" wx:key="key"><view data-event-opts="{{[['tap',[['chooseAttr',[index,'$0'],[[['goods.attr_groups','',index],['attr_list','',key]]]]]]]}}" class="{{['attr-name data-v-674095fa',attr.active?theme+'-m-back '+theme:'attr-background']}}" bindtap="__e">{{attr.attr_name+''}}<block wx:if="{{index==0&&attr.number>0}}"><view class="{{['attr-number data-v-674095fa',theme+'-m-back '+theme]}}" style="{{'right:'+(''+(attr.length+'rpx'))+';'}}">{{attr.number}}</view></block></view></block><view class="attr-name attr-background data-v-674095fa" style="visibility:hidden;">占位</view></scroll-view><view data-event-opts="{{[['tap',[['toBottom',[index]]]]]}}" class="right-icon data-v-674095fa" catchtap="__e"><view class="data-v-674095fa"></view><image src="/static/image/icon/right.png" class="data-v-674095fa"></image></view></view></block></block><view class="wholesale-attr-group-list data-v-674095fa"><block wx:for="{{goodsAttr}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="wholesale-attr-group data-v-674095fa"><view class="dir-left-nowrap data-v-674095fa"><view class="wholesale-attr-item main-between data-v-674095fa"><view class="dir-top-nowrap main-center attr-name t-omit data-v-674095fa"><view class="t-omit data-v-674095fa">{{item.attr_list[item.attr_list.length-1].attr_name}}</view><view class="attr-price data-v-674095fa">{{"¥"+(goods.level_show===1?item.price_member:item.price)}}</view></view><view class="dir-left-nowrap wholesale-number-box cross-center data-v-674095fa"><image class="block box-grow-0 cross-center main-center data-v-674095fa" src="{{item.number<=0?'/static/image/plugins/un-low.png':'/static/image/plugins/low.png'}}" data-event-opts="{{[['tap',[['wholesaleNumberSub',[index]]]]]}}" bindtap="__e"></image><view class="wholesale-number-input box-grow-0 cross-center main-center data-v-674095fa"><app-input vue-id="{{'067df58c-5-'+index}}" height="60" type="number" paddingLeft="0" center="{{true}}" placeholder=" " focus="{{false}}" width="88" value="{{item.number}}" data-event-opts="{{[['^blur',[['wholesaleNumberBlur',[index]]]],['^input',[['__set_model',['$0','number','$event',[]],[[['goodsAttr','',index]]]]]]]}}" bind:blur="__e" bind:input="__e" class="data-v-674095fa" bind:__l="__l"></app-input></view><image class="block box-grow-0 cross-center main-center data-v-674095fa" src="{{item.number>=item.stock?'/static/image/plugins/un-add.png':'/static/image/plugins/add.png'}}" data-event-opts="{{[['tap',[['wholesaleNumberAdd',[index]]]]]}}" bindtap="__e"></image></view></view></view></view></block></view></view></block><block wx:for="{{newAttrGroupList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{goods.type==='goods'&&sign!='wholesale'}}"><view class="attr-group data-v-674095fa"><view class="attr-group-name data-v-674095fa">{{item.attr_group_name}}</view><view class="dir-left-wrap data-v-674095fa"><block wx:for="{{item.attr_list}}" wx:for-item="attr" wx:for-index="key" wx:key="key"><view data-event-opts="{{[['tap',[['storeAttrClick',['$0','$1'],[[['newAttrGroupList','',index],['attr_list','',key,'attr_id']],[['newAttrGroupList','',index,'attr_group_id']]]]]]]}}" class="{{['attr-item data-v-674095fa',attr.checked&&sign!=='gift'?theme+'-m-back active '+theme:attr.checked&&sign==='gift'?theme+'-background active':'attr-item-default'+(attr.attr_num_0?' attr_num_0':'')]}}" bindtap="__e">{{attr.attr_name+''}}</view></block></view></view></block></block><block wx:if="{{chooseNumber}}"><view class="dir-left-nowrap number-box cross-center data-v-674095fa"><view class="box-grow-1 data-v-674095fa">数量</view><image class="block box-grow-0 cross-center main-center data-v-674095fa" src="{{number<=1?'/static/image/icon/can-be-reduced.png':'/static/image/cart/can-be-reduced.png'}}" data-event-opts="{{[['tap',[['numberSub',['$event']]]]]}}" bindtap="__e"></image><view class="number-input box-grow-0 cross-center main-center data-v-674095fa"><app-input vue-id="067df58c-6" type="number" paddingLeft="0" center="{{true}}" placeholder=" " focus="{{false}}" width="88" value="{{number}}" data-event-opts="{{[['^blur',[['numberBlur']]],['^input',[['__set_model',['','number','$event',[]]]]]]}}" bind:blur="__e" bind:input="__e" class="data-v-674095fa" bind:__l="__l"></app-input></view><image class="block box-grow-0 cross-center main-center data-v-674095fa" src="/static/image/cart/can-be-added.png" data-event-opts="{{[['tap',[['numberAdd',['$event']]]]]}}" bindtap="__e"></image></view></block></view><block wx:if="{{sign=='wholesale'}}"><view class="total data-v-674095fa">已选<text class="data-v-674095fa">{{totalNumber}}</text>件 总计<text class="data-v-674095fa">{{"¥"+(totalPrice>0?totalPrice:'0.00')}}</text></view></block><view class="three dir-left-nowrap data-v-674095fa"><block wx:if="{{cartShow}}"><view data-event-opts="{{[['tap',[['cart',['$event']]]]]}}" class="{{['box-grow-1 main-center cross-center data-v-674095fa',sign==='pick'?theme+'-m-back '+'buy '+theme:theme==='b'||theme==='f'||theme==='a'?theme+'-s-back '+'buy '+theme:theme+'-s-back '+theme+'-m-text '+theme]}}" bindtap="__e">{{addText+''}}</view></block><block wx:if="{{is_show_buy}}"><view data-event-opts="{{[['tap',[['buy',['$event']]]]]}}" class="{{['box-grow-1 main-center cross-center buy data-v-674095fa',sign!=='gift'?theme+'-m-back '+theme:theme+'-background']}}" bindtap="__e">{{''+buyText+''}}</view></block></view></view></view></view></block></view>