This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop-wechat/pages/sharing/goods/index.wxml
2020-04-25 22:59:04 +08:00

356 lines
15 KiB
Plaintext

<import src="../../../wxParse/wxParse.wxml"></import>
<scroll-view bindscroll="scroll" scroll-top="{{scrollTop}}" scroll-y="true" style="position:absolute; top:0; left:0; right:0; bottom:0;">
<view class="container" wx:if="{{detail.goods_id}}">
<view class="swiper">
<swiper autoplay="{{autoplay}}" bindchange="setCurrent" class="banner-box swiper-box" duration="{{duration}}" indicator-dots="{{indicatorDots}}" interval="{{interval}}" circular="{{true}}">
<swiper-item wx:for="{{detail.image}}" wx:key="this" catchtap="onPreviewImages" data-index="{{ index }}">
<image class="slide-image" mode="aspectFill" src="{{item.file_path}}"></image>
</swiper-item>
</swiper>
<view class="banner-num">
<text>{{ currentIndex }}</text>
<text>/{{ detail.image.length }}</text>
</view>
</view>
<!-- 团购提醒 -->
<view class="goods-attention dis-flex flex-y-center">
<!-- 商品价格 -->
<view class="goods-price">
<text class="price-currency f-26">¥</text>
<text class="price-text">{{ sharing_price }}</text>
</view>
<view class="goods-message">
<view class="line-price" wx:if="{{line_price > 0}}">
<text class="f-22">¥</text>
<text class="f-26">{{ line_price }}</text>
</view>
<view class="dis-flex flex-y-center">
<view class="in-tag f-24">团购中</view>
<view class="in-txt f-24">
<text></text>{{ detail.goods_sales }}人已参团</view>
</view>
</view>
</view>
<view class="goods-name b-f">
<!-- 商品名称 -->
<view class="dis-flex flex-y-center">
<view class="flex-box dis-flex flex-dir-column">
<view class="goods-title">
<view class="title f-30 twolist-hidden">
<text class="col-m f-28"> [{{ detail.people }}人团] </text>
<text>{{ detail.goods_name }}</text>
</view>
</view>
</view>
<!-- 分享按钮 -->
<view class="goods__share">
<form bindsubmit="onClickShare" report-submit="true">
<button formType="submit" class="btn-normal dis-flex flex-dir-column">
<text class="share__icon iconfont icon-fenxiang"></text>
<text class="f-24">分享</text>
</button>
</form>
</view>
</view>
<!-- 商品卖点 -->
<view class="goods-selling-point">
<text class="f-24">{{ detail.selling_point }}</text>
</view>
</view>
<!-- 选择商品规格 -->
<form wx:if="{{ goodsMultiSpec.spec_attr }}" bindsubmit="onToggleTrade" report-submit>
<button class="btn-normal" formType="submit">
<view class="sku-selector cont-box b-f m-top20 dis-flex flex-y-center">
<view class="flex-box f-28">
<text class="col-9">选择:</text>
<text wx:for="{{ goodsMultiSpec.spec_attr }}" wx:key="this">{{ item.group_name }} </text>
</view>
<view class="f-26 col-9 t-r">
<text class="iconfont icon-xiangyoujiantou"></text>
</view>
</view>
</button>
</form>
<!-- 商品评价 -->
<view class="goods-comment" wx:if="{{ detail.comment_data.length }}">
<view class="cont-box b-f goods-property-box m-top20">
<text class="col-3 f-30">评价 ({{ detail.comment_data_count }}条)</text>
<form bindsubmit="onTargetToComment" report-submit="true" class="comment-num">
<button formType="submit" class="btn-normal">
<text class="f-28">查看更多</text>
</button>
</form>
<view class="goods-property-jianTou">
<text class="iconfont icon-xiangyoujiantou user-orderJtou" style="margin-top:0;"></text>
</view>
</view>
<view class="goods-comment-box b-f" wx:for="{{ detail.comment_data }}" wx:key="this">
<view class="cont-box goods-comment-box b-t b-f b-b">
<view class="dis-flex">
<view class="user">
<text class="user_name f-26">{{ item.user.nickName }}</text>
</view>
<view class="com_xing">
<text class="iconfont icon-shoucang active"></text>
<block wx:if="{{ item.score < 30 }}">
<text class="iconfont icon-shoucang active"></text>
<text class="iconfont icon-shoucang active"></text>
</block>
<block wx:if="{{ item.score < 20 }}">
<text class="iconfont icon-shoucang active"></text>
<text class="iconfont icon-shoucang active"></text>
</block>
</view>
</view>
<view class="goods-comment-cont m-top20">
<text class="f-26 twolist-hidden">{{ item.content }}</text>
</view>
<view class="f-22 col-9 m-top10">{{ item.create_time }}</view>
</view>
</view>
</view>
<!-- 进行中的团购 -->
<view class="top-nav-bar m-top20 b-f" wx:if="{{ activeList.length }}">
<view class="top-nav dis-flex flex-x-between">
<text>进行中的团购</text>
<!-- <text class="col-9">更多团购 <text class="iconfont icon-xiangyoujiantou"></text> </text> -->
</view>
<!-- 进行中的团购-内容部分 -->
<view class="corwd" wx:for="{{ activeList }}" wx:key="this" catchtap="onTargetActive" data-id="{{ item.active_id }}">
<view class="corwd_people">
<!-- 进行中的团购-头像 -->
<view class="">
<image src="{{ item.user.avatarUrl }}" class="corwd_people_images"></image>
</view>
<!-- 进行中的团购-名称 -->
<text class="onelist-hidden">{{ item.user.nickName }}的团</text>
</view>
<view class="corwd_time">
<view class="corwd_time_text">
<!-- 进行中的团购-开团人数 -->
<text class="corwd_time_title onelist-hidden">还差<text>{{ item.people - item.actual_people }}</text>人成团</text>
<!-- 进行中的团购-倒计时 -->
<text class="corwd_time_number col-9 onelist-hidden">剩余{{ countDownList[index].day }}天{{ countDownList[index].hou }}:{{ countDownList[index].min }}:{{ countDownList[index].sec }}</text>
</view>
<!-- 进行中的团购-按钮 -->
<button>去参团</button>
</view>
</view>
</view>
<!-- 拼团玩法 -->
<view class="rule-nav top-nav-bar m-top20 b-f">
<form bindsubmit="onToggleRules" report-submit="true">
<button formType="submit" class="btn-normal">
<view class="top-nav dis-flex flex-x-between">
<text>拼团玩法</text>
<text class="f-25 col-9">查看规则</text>
</view>
<!-- 拼团步骤 -->
<view class="rule-simple dis-flex flex-x-around">
<view class="simple-item dis-flex flex-dir-column flex-y-center">
<view class="i-number dis-flex flex-x-center flex-y-center">
<text class="f-30">1</text>
</view>
<view class="i-text f-28">选择商品</view>
</view>
<view class="simple-item dis-flex flex-dir-column flex-y-center">
<view class="i-number dis-flex flex-x-center flex-y-center">
<text class="f-30">2</text>
</view>
<view class="i-text f-28">开团/参团</view>
</view>
<view class="simple-item dis-flex flex-dir-column flex-y-center">
<view class="i-number dis-flex flex-x-center flex-y-center">
<text class="f-30">3</text>
</view>
<view class="i-text f-28">邀请好友</view>
</view>
<view class="simple-item dis-flex flex-dir-column flex-y-center">
<view class="i-number dis-flex flex-x-center flex-y-center">
<text class="f-30">4</text>
</view>
<view class="i-text f-28">人满成团</view>
</view>
</view>
</button>
</form>
</view>
<!-- 商品描述 -->
<view class="p-bottom">
<view class="top-nav m-top20 b-f b-b">
<view class="top-nav-bar">商品描述</view>
</view>
<view class="order" hidden="{{hiddenOrder}}">
<view wx:if="{{detail.content!=''}}">
<view class="b-f goods-detail-box">
<!-- <view class="goods-cont-li"> -->
<template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
<!-- </view> -->
</view>
</view>
<view wx:else>
<view class="yoshop-notcont">
<text class="iconfont icon-wushuju"></text>
<text class="cont">亲,此处暂无详情数据</text>
</view>
</view>
</view>
</view>
<!-- 底部操作栏 -->
<view class="footer-fixed f-28">
<!-- 返回主页 -->
<form bindsubmit="onNavigationHome" report-submit="true">
<button formType="submit" class="btn-normal">
<view class="goods-fixed-icon dis-flex flex-x-center flex-y-center">
<text class="iconfont icon-zhuye"></text>
</view>
</button>
</form>
<!-- 在线客服 -->
<view class="goods-fixed-icon dis-flex flex-x-center flex-y-center">
<button open-type="contact" sessionFrom="weapp" size="27" style="opacity: 0;position:absolute;top:0px;left:0px;display:block;width:100%;height:100%;" type="default-light"></button>
<text class="iconfont icon-kefu"></text>
</view>
<!-- 购买按钮 -->
<view class="fixed-buttons flex-box dis-flex">
<view wx:if="{{ detail.is_alone == 0 }}" class="order-number flex-box dis-flex flex-dir-column flex-x-center">
<form bindsubmit="onTriggerOrder" report-submit="true" data-type="10">
<button formType="submit" class="btn-normal">
<view class="f-26">¥{{ goods_price }}</view>
<view>单独购买</view>
</button>
</form>
</view>
<view class="order-bt flex-box dis-flex flex-dir-column flex-x-center">
<form bindsubmit="onTriggerOrder" report-submit="true" data-type="20">
<button formType="submit" class="btn-normal col-f">
<view class="f-26">¥{{ sharing_price }}</view>
<view>发起拼单</view>
</button>
</form>
</view>
</view>
</view>
</view>
</scroll-view>
<!-- 确认购买弹窗 -->
<zan-popup show="{{ showBottomPopup }}" type="bottom" bindclose="onToggleTrade">
<view class="popup__trade">
<!-- 关闭按钮 -->
<view class="trade-close dis-flex flex-x-center flex-y-center">
<form bindsubmit="onToggleTrade" report-submit="true">
<button formType="submit" class="btn-normal">
<text class="iconfont icon-close f-26"></text>
</button>
</form>
</view>
<!-- 主体信息 -->
<view class="trade-main">
<view class="goods-info dis-flex">
<!-- 图片名称 -->
<view class="goods-image" catchtap="onPreviewSkuImage">
<image src="{{ skuCoverImage }}"></image>
</view>
<view class="right flex-box">
<view class="money-box dis-flex flex-y-end">
<!-- 商品价 -->
<view class="goods-price">
<text class="col-m f-26">¥</text>
<text class="goods-price_num col-m f-40">{{ order_type == 10 ? goods_price : sharing_price }}</text>
</view>
<!-- 划线价 -->
<view class="line-price" wx:if="{{line_price > 0}}">
<text>¥{{ line_price }}</text>
</view>
</view>
<view class="goods-stock dis-flex">
<text class="flex-box f-26 col-7">库存:{{stock_num}}</text>
</view>
</view>
</view>
<!-- 规格列表 -->
<view class="goods-attr">
<!-- 滚动容器 -->
<scroll-view class="goods-attr--scroll" scroll-y="{{ true }}">
<view class="group-item" wx:for="{{ goodsMultiSpec.spec_attr }}" wx:for-item="attr" wx:for-index="attr_idx" wx:key="this">
<view class="tips-text" data-id="{{ attr.group_id }}">{{ attr.group_name }}</view>
<view class="spec-item {{ item.checked ? 'cur' : '' }}" wx:for="{{ attr.spec_items }}" wx:for-index="item_idx" wx:key="this" data-attr-idx="{{ attr_idx }}" data-item-idx="{{ item_idx }}" catchtap="onSwitchSpec">
{{ item.spec_value }}
</view>
</view>
</scroll-view>
</view>
<!-- 购买数量 -->
<view class="buy_number">
<view class="buyNumber f-26">
<text>购买数量</text>
</view>
<view class="select-number">
<form bindsubmit="onDecGoodsNumber" report-submit="true">
<button formType="submit" class="default {{ goods_num > 1 ? '' : 'disabled' }}" type="default">-</button>
</form>
<input bindinput="onInputGoodsNum" type="number" value="{{ goods_num }}"></input>
<form bindsubmit="onIncGoodsNumber" report-submit="true">
<button formType="submit" class="default" type="default">+</button>
</form>
</view>
</view>
</view>
<!-- 底部操作栏 -->
<view class="footer-fixed f-30">
<block wx:if="{{stock_num > 0}}">
<view class="order-bt dis-flex flex-x-center flex-y-center" catchtap="onCheckout">
<text>确定</text>
</view>
</block>
<view class="default-btn" wx:else>暂无现货</view>
</view>
</view>
</zan-popup>
<!-- 返回顶部 -->
<view class="widget-goTop" wx:if="{{floorstatus}}">
<form bindsubmit="onScrollTop" report-submit="true">
<button formType="submit" class="btn-normal">
<text class="iconfont icon-fanhuidingbu"></text>
</button>
</form>
</view>
<!-- 分享按钮 -->
<zan-actionsheet show="{{ share.show }}" actions="{{ share.actions }}" cancel-text="{{ share.cancelText }}" cancel-with-mask="{{ share.cancelWithMask }}" bind:cancel="onCloseShare" bind:actionclick="onClickShareItem" mask-class="tiny" />
<!-- 商品海报 弹出层 -->
<zan-popup show="{{ share.showPopup }}" bindclose="onTogglePopup">
<view class="pop-poster pop-example__container">
<!-- 关闭按钮 -->
<view class="pop-close dis-flex flex-x-center flex-y-center" catchtap="onTogglePopup">
<text class="iconfont icon-shanchu f-30 col-9"></text>
</view>
<form bindsubmit="onSavePoster" report-submit="true">
<view class="poster__image">
<image mode="widthFix" src="{{ qrcode }}"></image>
</view>
<view class="poster__tips m-top10 t-c">
</view>
<view class="padding-box m-top10 profile-btn">
<button formType="submit">保存图片</button>
</view>
</form>
</view>
</zan-popup>
<!-- 拼团规则 -->
<zan-dialog id="zan-base-dialog"></zan-dialog>
<!-- 快捷导航 -->
<shortcut id=""></shortcut>