You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

364 lines
15 KiB

<!--pages/goods/detail.wxml-->
<view class="body" wx:if="{{remind}}">
<view class='zong'>
<view class="spinner">
<view class="spinner-container container1">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container2">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container3">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
</view>
</view>
</view>
<!-- 加载页面结束 -->
<block wx:else>
<import src="/pages/template/toast.wxml" />
<import src="../../wxParse/wxParse.wxml" />
<scroll-view scroll-y="true" class="scroll-view-y" scroll-with-animation="true" scroll-top="{{scrollTop}}" lower-threshold="50" bindscrolltolower="scrolltolower" style="height: {{windowHeight-50}}px;">
<swiper class="swiper" autoplay="true" interval="5000" duration="1000">
<block wx:for="{{itemData.images}}" wx:for-index="index">
<swiper-item>
<image src="{{item}}" class="slide-image" mode="aspectFill" />
</swiper-item>
</block>
</swiper>
<view class='xstg_box'>
<image class='img' src='../../images/group/xstg_bg.png' mode="widthFix"></image>
<view class='xstg_text'>
<text>限时团购</text>
</view>
<view class='xstg_text_two'>
<view style='margin:0 0 0px 15px;font-size:27rpx;'>距离结束仅剩</view>
<view class='sj'>{{day}}</view> 天
<view class='sj'>{{hour}}</view> 时
<view class='sj'>{{minute}}</view> 分
<view view class='sj'>{{secStr}}</view> 秒
</view>
</view>
<view class="datails-text-area">
<view class="datails-price">
<view class="red-price"><text>¥</text>{{gprice}}</view>
<view class="gray-price">原价:¥{{itemData.market_price}}</view>
</view><!--end datails-price-->
<view class='datails-title'>{{itemData.pro_name}}</view>
<view class="datails-right-icon">
<view bindtap="set_share" data-status="1" class="datails-icon-box">
<image class="datails-icon-image" src="/images/f.png"></image>
<view class="datails-icon-text">分享</view>
</view>
<view class="datails-icon-box">
<image class="datails-icon-image" src="/images/tuannub.png"></image>
<view class="datails-icon-text"><text style="color: #f00;">{{itemData.man_num}}</text>人团</view>
</view>
</view><!--end datails-right-icon-->
</view><!--end datails-text-area-->
<view class="groups-list-ing">
<view class="n-title">有<text class="red">{{groupList.length}}</text>位小伙伴正在发起拼团:</view>
<view class="n-pt" wx:if="{{groupList.length == 0}}">暂时没有小伙伴发起拼团,您来发起吧!</view>
<block wx:for="{{groupList}}" wx:key="unique">
<view class='groups-list-view' data-id="{{item.ptcode}}" bindtap="joinGroup">
<image src="{{item.headimgurl}}" mode="aspectFill" class="n-photo"></image>
<view class="groups-list-con">
<view class="n-tit">{{item.user_name}}</view>
<view class="n-ex">
还差 <text class="red">{{itemData.man_num-item.ptnumber}}</text> 人成团
<view style="padding-left: 20rpx; display: inline-block;">
剩余 <text class="red">{{item.leftTimeStr}}</text> 结束
</view>
</view>
<view class="n-time"></view>
<view class="n-button">去参团</view>
</view><!--end groups-list-con-->
</view><!--end groups-list-view-->
</block>
</view><!--groups-list-ing-->
<view class="comment-box-area">
<view class="comment-box-title" bindtap="powerDrawer" data-statu="open">
<image src="/images/x_right.png"></image>
<view class="n-tit">产品评论</view>
</view>
<view class="comment-box-tag">
<view bindtap="powerDrawer" class="n-text-view" style="background-color: #d62418;">好评({{comnum.good}})</view>
<view bindtap="powerDrawer" class="n-text-view" style="background-color: #f80;">中评({{comnum.notbad}})</view>
<view bindtap="powerDrawer" class="n-text-view" style="background-color: #ddd;">差评({{comnum.bad}})</view>
</view><!--end comment-box-tag-->
<view class="comment-list" wx:for="{{comments}}" wx:key="id">
<view class="comment-left">
<image class="n-photo" src='{{item.headimgurl}}'></image>
<view class='comment-icon-view'>
<view wx:if="{{item.CommentType == 'GOOD'}}">
<image src='/images/icon_good_select.png'></image> 好评
</view>
<view wx:if="{{item.CommentType == 'NOTBAD'}}">
<image src='/images/icon_middle_select.png'></image> 中评
</view>
<view wx:if="{{item.CommentType == 'BAD'}}">
<image src='/images/icon_bad_select.png'></image> 差评
</view>
</view><!--end comment-icon-view-->
</view><!--end comment-left-->
<view class="comment-list-con">
<view class="n-tit"><text class="n-time">{{item.time}}</text> {{item.user_name}}</view>
<view class="n-pt">
<text>规格:{{item.size}}</text>
</view><!--end n-pt-->
<view class="n-content">{{item.content}}</view>
<view class="n-image-list">
<image wx:for="{{item.images}}" wx:for-item="url" src="{{url.url}}" data-src="{{url.url}}"
catchtap="previewImage" wx:key="key"></image>
</view>
<view class="n-content n-content-rep" wx:if="{{item.reply.length > 1}}">掌柜回复:{{item.reply}}</view>
</view><!--comment-list-con-->
</view><!--comment-list-->
</view><!--comment-box-area-->
<!--图文详情头部-->
<view class="datail-content">
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">拼团规则<em></em></view>
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">产品详情</view>
</view>
<!-- 拼团规则 -->
<view hidden="{{!(currentTab==0)}}" style="margin-bottom:100rpx;min-height:500rpx;">
<view class='content-box'>
<import src="../../wxParse/wxParse.wxml" />
<view class="wxParse">
<template is="wxParse" data="{{wxParseData:rule.nodes}}" />
</view>
</view><!--end content-box-->
</view>
<!-- 商品详情 -->
<view hidden="{{!(currentTab==1)}}" style="height:100%;margin-bottom:100rpx;min-height:500rpx;">
<view class='content-box'>
<import src="../../wxParse/wxParse.wxml" />
<view class="wxParse">
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
</view>
</view><!--end content-box-->
</view>
</view><!--end datail-content-->
</scroll-view>
<!---底部开始-->
<view class="datail-foot-area">
<block wx:if="{{type1 == 1}}">
<view class="datail-foot-left">
<view class="datail-foot-icon">
<image class="n-image" src="/images/icons/kefu.png"></image>
<view class="n-text">客服</view>
<contact-button type="default-light" session-from="productId_{{itemData.id}}" class="button-100">
</contact-button>
</view><!--end datail-foot-icon-->
<view class="datail-foot-icon" bindtap="t_index">
<image class="n-image" src="/images/icons/home.png"></image>
<view class="n-text">首页</view>
</view><!--end datail-foot-icon-->
</view><!--end datail-foot-left-->
<view class="datail-foot-right">
<!--获取formid -->
<view class="datail-foot-button button-red-bg" bindtap="setModalStatus" data-status="1" data-type="canjiapintuan">
拼团 ¥{{itemData.price11}}
<form bindsubmit="getUserformid" report-submit="true" data-status="1" data-type="canjiapintuan">
<button type="primary" formType="submit" class="button-100"></button>
</form>
</view>
<view class="datail-foot-button" bindtap="setModalStatus" data-status="1" data-type="buynow">
单独买 ¥ {{itemData.price_yh}}
</view>
</view><!--end datail-foot-right-->
</block>
<block wx:else>
<view class="datail-foot-left">
<view class="datail-foot-icon">
<image class="n-image" src="/images/icons/kefu.png"></image>
<view class="n-text">客服</view>
<contact-button type="default-light" session-from="productId_{{itemData.id}}" class="button-100">
</contact-button>
</view><!--end datail-foot-icon-->
<view class="datail-foot-icon" bindtap='toIndex'>
<image class="n-image" src="/images/icons/home.png"></image>
<view class="n-text">首页</view>
</view><!--end datail-foot-icon-->
</view><!--end datail-foot-left-->
<view class="datail-foot-right">
<block wx:if="{{is_over==false}}">
<form report-submit="true" data-type="group" bindtap="setModalStatus" data-status="1">
<button class='datail-foot-button button-red-bg' type="primary" formType="submit">
立即开团 ¥{{gprice}}
</button>
</form>
</block>
<block wx:else>
<view class='datail-foot-button' style="background-color: #ccc;">
(活动已结束)
</view>
</block>
<view class='datail-foot-button' bindtap="setModalStatus" data-status="1" data-type="only">
单独购买¥{{itemData.market_price}}
</view>
</view><!--end datail-foot-right-->
</block>
</view><!--end datail-foot-area-->
<!--弹窗-->
<view class="drawer_screen" catchtouchmove="preventTouchMove" bindtap="setModalStatus" data-status="0" data-type="11" wx:if="{{showModalStatus}}"></view>
<view animation="{{animationData}}" class="drawer_attr_box" catchtouchmove="preventTouchMove" wx:if="{{showModalStatus}}">
<view class="close_icon" bindtap="setModalStatus" data-status="0" data-type="11">×</view>
<view class="drawer_attr_content">
<view class="text_center">
<image class="drawer_image" src="{{itemData.image}}"></image>
</view>
<view class="mingcheng">
<view style="font-size:38rpx;color:red">
<text wx:if="{{paytype == 'group'}}">开团价:</text>¥
<text wx:if="{{paytype == 'group'}}">{{itemData.member_price}}</text>
<text wx:else>{{itemData.market_price}}</text>
</view>
<view style="font-size:26rpx;color:#ccc">库存:{{itemData.num}}</view>
</view>
<view style='clear:both;'></view>
<view class="commodity_attr_list" catchtouchmove="preventTouchMove">
<!--每组属性-->
<scroll-view scroll-y="true" style="height:100%;">
<!-- 属性选择 -->
<view wx:for="{{attrList}}" wx:for-index="idx" wx:key="userInfoListId" class="outStyle">
<view class='outStyleText textStyle buttonPaddingStyle' style="padding-left:0">{{item.attrName}}</view>
<view class='typeStyle textStyle' style="margin-left:0">
<view wx:for="{{item.attr}}" data-item='{{item.attr[index]}}' data-index='{{index}}' data-idx='{{idx}}' wx:key="userInfoListId" bindtap="onChangeShowState" wx:for-item="items">
<view class="{{items.enable == true ?(items.select==true?'orange':'back') : 'bai'}} textStyle buttonPaddingStyle de_left">
{{items.attributeValue}}
</view>
</view>
</view>
</view>
<!-- 属性选择 -->
<view class="shu" wx:if="{{paytype != 'group'}}">
<text class="cun">购买数量</text>
<view class="dian">
<view class="stepper" catchtouchmove="preventTouchMove">
<!-- 减号 -->
<text class="{{minusStatuses[index]}}" data-alpha-beta="0" bindtap="minus">-</text>
<!-- 数值 -->
<view class="nownum">{{num}}</view>
<!-- 加号 -->
<text class="normal" data-alpha-beta="1" bindtap="plus">+</text>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="footc" style='border-radius:15rpx;'>
<form bindsubmit="getformidToo" report-submit="true" data-type="{{paytype}}">
<button class="" type="primary" formType="submit" style='width:100%;height:90rpx;background:#d62418;color:#fff !important;line-height:90rpx;'>确定</button>
</form>
</view>
</view>
</view>
<!--弹框结尾 -->
<template is="toast" data="{{toast:toast}}" />
<!-- 弹窗 -->
<view class="drawer_screen" bindtap="set_share" data-index="0" data-status="0" wx:if="{{show_share}}"></view>
<view animation="{{animationData}}" class="drawer_attr_share" catchtouchmove="preventTouchMove" wx:if="{{show_share}}">
<view class='myyhq'> </view>
<view class='share_top'>
分享
<view class='close_share' bindtap="set_share" data-index="0" data-status="0">x</view>
</view>
<view class='fx_box'>
<view wx:if="{{share.friends}}" class='fx_img_box'>
<button open-type="share" hover-class="button-hover" style='line-height:normal;border:0;border-radius:0px;padding:0;font-size:12px;display:inline;'>
<view>
<image class='fx_img' src='/images/wx.png'></image>
</view>
<view>微信好友</view>
</button>
</view>
<view class='fx_img_box' wx:if="{{share.friend}}" bindtap='user_share'>
<view>
<image class='fx_img' src='/images/pyq.png'></image>
</view>
<view>朋友圈</view>
</view>
</view>
</view>
<view class='imagePathBox' hidden="{{maskHidden == false}}">
<view class='images_bg'>
<view class='share_top'>
分享到朋友圈
<view class='close_share' bindtap='close_share'>x</view>
</view>
<image src="{{imagePath}}" data-src="{{imagePath}}" catchtap="previewImage" class='shengcheng'></image>
<button class='baocun' style='background:#e93737;' bindtap='baocun'>保存相册</button>
<view class='share_bottom'>保存图片到手机后,您可到朋友圈分享该商品图片</view>
</view>
</view>
<view hidden="{{maskHidden == false}}" class="mask"></view>
</block>
<pop id="pop"></pop>