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.
2493 lines
97 KiB
2493 lines
97 KiB
<template>
|
|
<view>
|
|
<!-- #ifdef H5 -->
|
|
<loading v-if="loadlogo"></loading>
|
|
<view class="container" :style="{height: wfShow?'90vh':'auto'}" v-if="!loadlogo">
|
|
<!-- #endif -->
|
|
<!-- #ifndef H5 -->
|
|
<loading v-if="loadlogo"></loading>
|
|
<view class="container" :style="{height: wfShow?'90vh':'auto',display:loadlogo?'none':'block'}">
|
|
<!-- #endif -->
|
|
<block v-if="goodsType !== 'integral'">
|
|
<!-- 购买弹幕 -->
|
|
<block v-if="barrageList.length > 0">
|
|
<view class="success-tips dis-flex flex-y-center" :class="{ show: showTips }">
|
|
<image class="success-avatar" :src="barrageList[tipsIndex] ? barrageList[tipsIndex]['avatar'] : ''"></image>
|
|
<view class="onelist-hidden success-goods f-24 col-f m-left12">{{ barrageList[tipsIndex] ? barrageList[tipsIndex]['nickname'] : '' }}
|
|
刚刚{{goodsType === '7' ? '为本商品砍价' + barrageList[tipsIndex]['bargainprice'] + '元'
|
|
: goodsType === '5'
|
|
? dataInfo.is_charge === '1'
|
|
? '购买了此卡券'
|
|
: '领取了此卡券'
|
|
: '购买了此商品'}}
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<!-- 商品详情头部 -->
|
|
<view class="goods-header" v-if="(goodsType === '5' && !!dataInfo.logo) || (goodsType !== '5' && dataInfo['thumbs'].length != 0) || (goodsType !== '5' && !!dataInfo['videourl'])" >
|
|
|
|
<block v-if="(dataInfo.thumbs.length > 0 && ifimg) || (dataInfo.logo && ifimg)">
|
|
<swiper @change="bindchange" v-if="dataInfo['thumbs'].length > 0" :autoplay="true" :interval="3000" :circular="true" class="goods-swiper" :style="{ height: (dataInfo['imgstyle'].height * ratio) + 'px',width: (dataInfo['imgstyle'].width * ratio) + 'px' }">
|
|
<swiper-item class="swiper-item" v-for="(banner_item, index) in dataInfo['thumbs']" :key="index">
|
|
<image :src="banner_item" :data-id="index"></image>
|
|
</swiper-item>
|
|
</swiper>
|
|
<block v-if="dataInfo['thumbs'].length == 0 && dataInfo.logo">
|
|
<image :src="dataInfo.logo" :style="{ height: (dataInfo['imgstyle'].height * ratio) + 'px',width: (dataInfo['imgstyle'].width * ratio) + 'px' }" class="coupon-Image"></image>
|
|
</block>
|
|
<view class="switchShow dis-flex" v-if="dataInfo.videourl && (dataInfo.thumbs.length > 0 || dataInfo.logo)">
|
|
<view class="flex-box">
|
|
<view class="switchImg" @click="changeIfimg(false)">
|
|
<text class="iconfont icon-playfill switchImg-icon"></text>
|
|
视频
|
|
</view>
|
|
</view>
|
|
<view class="flex-box" @click="changeIfimg(true)">
|
|
<view class=" switchVideo">
|
|
图片
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</view>
|
|
</block>
|
|
<block v-else-if="dataInfo.videourl && !ifimg">
|
|
<!-- <swiper @change="bindchange" :autoplay="true" :interval="3000" :circular="true" class="goods-swiper" > -->
|
|
<view class="swiper-item" :style="{ height: (dataInfo['imgstyle'].height * ratio) + 'px',width: (dataInfo['imgstyle'].width * ratio) + 'px' }">
|
|
<video id="shopVideo" :loop="true" t7-video-player-type="inline" webkit-playsinline="true" playsinline="true" x-webkit-airplay="true" x5-playsinline="showLine" vslide-gesture :show-mute-btn="true" style="width: 100%;height: 100%;" objectFit="contain" :src="dataInfo.videourl" controls></video>
|
|
</view>
|
|
<!-- </swiper> -->
|
|
<view class="switchShow dis-flex" v-if="dataInfo.videourl && (dataInfo.thumbs.length > 0 || dataInfo.logo)">
|
|
<view class="flex-box" @click="changeIfimg(false)">
|
|
<view class=" switchVideo">
|
|
<text class="iconfont icon-playfill switchImg-icon"></text>
|
|
视频
|
|
</view>
|
|
</view>
|
|
<view class="flex-box">
|
|
<view class="switchImg " @click="changeIfimg(true)">
|
|
图片
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</block>
|
|
|
|
<view class="goods-viewed">{{ dataInfo['pv'] }}人喜欢</view>
|
|
</view>
|
|
<!-- 砍价倒计时背景 -->
|
|
<block v-if="goodsType === '7'">
|
|
<view class="bargain-countdown dis-flex flex-y-center" :style="{ 'background-image': ' url(' + imageRoot + 'bargain_bg.png)' }">
|
|
<view class="bargain-countdown-content dis-flex flex-x-between flex-y-center flex-box">
|
|
<view class="bargain-countdown-content-left">
|
|
<view class="bargain-label dis-flex flex-y-center">
|
|
<view class="bargain-countdown-nowPrice f-44 col-f m-right30">
|
|
<text class="col-f f-24">¥</text>
|
|
{{ dataInfo.is_vip > 0 && dataInfo['vipstatus'] === '1' ? dataInfo['vipprice'] : dataInfo['price'] }}
|
|
<text class="f-24 m-left10" v-if="optionstatus == '1'">起</text>
|
|
</view>
|
|
<view class="bargain-label-box dis-flex b-f p-r">
|
|
<image :src="imgfixUrls + 'goods/bargin_count_bg.png'" mode=""></image>
|
|
<view class="f-24 ">砍价享</view>
|
|
<view class="bargain-label-icon bargain-label-icon-bargin iconfont icon-triangledownfill"></view>
|
|
</view>
|
|
</view>
|
|
<view class="bargain-countdown-oldPrice f-24 col-f">
|
|
市场价
|
|
<text style="text-decoration:line-through;">¥{{ dataInfo['oldprice'] }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="bargain-countdown-content-right">
|
|
<block v-if="!!countDown['timeobj']">
|
|
<view class="col-f f-24 t-c">距离{{ dataInfo['stateTime'] === 1 ? '结束' : '开始' }}还剩:</view>
|
|
<view class="countdownTime-box dis-flex flex-x-center">
|
|
<view class="countdownTime-style countdownTime-style-color2 countdownTime-hh col-f" v-if="countDown.timeobj.tt !== '00'">
|
|
<text class="f-24">{{ countDown['timeobj']['tt'] }}</text>
|
|
<span style="font-size: 24upx;">天</span>
|
|
</view>
|
|
<view class="countdownTime-style countdownTime-style-color2 countdownTime-hh col-f">
|
|
<text class="f-24">{{ countDown['timeobj']['hh'] }}</text>
|
|
:
|
|
</view>
|
|
<view class="countdownTime-style countdownTime-style-color2 countdownTime-ss col-f">
|
|
<text class="f-24">{{ countDown['timeobj']['mm'] }}</text>
|
|
:
|
|
</view>
|
|
<view class="countdownTime-style countdownTime-style-color2 countdownTime-mm col-f">
|
|
<text class="f-24">{{ countDown['timeobj']['ss'] }}</text>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<block v-if="dataInfo['isTimeOver']">
|
|
<view class="f-28 col-6">活动{{ dataInfo['stateTime'] === 1 ? '已结束' : '未开始' }}</view>
|
|
</block>
|
|
<block v-else-if="!(!!countDown['timeobj'])">
|
|
<view class="bargain-countdown-right-loading p-r">
|
|
<part-loading ref="partLoading" :backgroundType="'goods'"></part-loading>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<!-- 抢购倒计时背景 -->
|
|
<block v-if="goodsType === '1'">
|
|
<view class="group-countdown dis-flex flex-y-center" :style="{ 'background-image': ' url(' + imageRoot + 'rush_bg.png)' }">
|
|
<view class="bargain-countdown-content dis-flex flex-x-between flex-box">
|
|
<view class="bargain-countdown-content-left">
|
|
<view class="dis-flex flex-y-center dis-flex flex-y-center">
|
|
<!-- <image :src="imgfixUrls + 'goods/rush_logo.png'" class="rush_logo m-right30" mode=""></image> -->
|
|
<view>
|
|
<view class="bargain-label dis-flex flex-y-center">
|
|
<view class="bargain-countdown-nowPrice f-44 col-f m-right30">
|
|
<span class="col-f f-24">¥</span>
|
|
{{ dataInfo['price'] }}
|
|
<span class="f-24 m-left10" v-if="optionstatus == '1'">起</span>
|
|
</view>
|
|
<block v-if="dataInfo['vipstatus'] === '1'">
|
|
<view class="rush-label-box p-r f-24">
|
|
{{dataInfo.levelarmy == 1?'拥军价格':dataInfo.levelname}}立减{{ dataInfo['discount_price'] }}元
|
|
<view class="bargain-label-icon bargain-label-icon-rush iconfont icon-triangledownfill"></view>
|
|
</view>
|
|
</block>
|
|
|
|
</view>
|
|
<view class="dis-flex">
|
|
<view class="bargain-countdown-oldPrice f-24 col-f" :style="{textDecoration:goodsType === '1'?'line-through':'none'}">
|
|
{{goodsType === '1'?'市场价':'单买价'}}
|
|
<text :style="{textDecoration:goodsType === '1'?'line-through':'none'}">¥{{ goodsType === '1'?dataInfo['oldprice']:dataInfo['aloneprice'] }}</text>
|
|
</view>
|
|
<!-- <view class="group-countdown-num dis-flex flex-y-center" style="margin-left: 30upx;">
|
|
<view class="group-countdown-num-logo b-f">
|
|
<image :src="imgfixUrls + 'goods/groupnum.png'" mode=""></image>
|
|
</view>
|
|
<view class="group-countdown-numGroup f-24 col-f" style="padding-right: 10upx;">{{ dataInfo['peoplenum'] }}人团</view>
|
|
</view> -->
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<block v-if="!!countDown['timeobj']">
|
|
<view class="bargain-countdown-content-right">
|
|
<view class="color-f02 f-24 t-c">距离{{ dataInfo['stateTime'] === 1 ? '结束' : '开始' }}还剩:</view>
|
|
<view class="countdownTime-box dis-flex flex-x-center flex-y-center">
|
|
<view class="countdownTime-style countdownTime-style-color1 countdownTime-hh color-f02" v-if="countDown.timeobj.tt !== '00'">
|
|
<text class="f-24">{{ countDown['timeobj']['tt'] }}</text>
|
|
<span style="font-size: 24upx;">天</span>
|
|
</view>
|
|
<view class="countdownTime-style countdownTime-style-color1 countdownTime-hh color-f02">
|
|
<text class="f-24">{{ countDown['timeobj']['hh'] }}</text>
|
|
:
|
|
</view>
|
|
<view class="countdownTime-style countdownTime-style-color1 countdownTime-ss color-f02">
|
|
<text class="f-24">{{ countDown['timeobj']['mm'] }}</text>
|
|
:
|
|
</view>
|
|
<view class="countdownTime-style countdownTime-style-color1 countdownTime-mm color-f02">
|
|
<text class="f-24">{{ countDown['timeobj']['ss'] }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<block v-if="dataInfo['isTimeOver']">
|
|
<view class="f-28 col-9 dis-flex flex-y-center">活动{{ dataInfo['stateTime'] === 1 ? '已结束' : '未开始' }}</view>
|
|
</block>
|
|
<block v-else-if="!(!!countDown['timeobj'])">
|
|
<view class="bargain-countdown-right-loading p-r">
|
|
<part-loading ref="partLoading" :backgroundType="'goods'"></part-loading>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<!-- 拼团倒计时背景 -->
|
|
<block v-if="goodsType === '3'">
|
|
<view class="group-countdown dis-flex flex-y-center" :style="{ 'background-image': dataInfo['isTimeOver'] ? ' url(' + imageRoot + 'group_bg2.png)' : 'url(' + imageRoot + 'group_bg.png)' }">
|
|
<view class="group-countdown-content dis-flex flex-x-between flex-y-center flex-box">
|
|
<view class="group-countdown-content-left">
|
|
<view class="dis-flex flex-y-center">
|
|
<view class="group-countdown-nowPrice col-f f-58 m-right30">
|
|
<text class="f-30 m-right10">¥</text>
|
|
{{ dataInfo['price'] }}
|
|
<text class="f-24 m-left10" v-if="optionstatus == '1'">起</text>
|
|
</view>
|
|
|
|
<view class="group-countdown-num_oldPrice">
|
|
<view class="group-countdown-num dis-flex flex-y-center">
|
|
<view class="group-countdown-num-logo b-f">
|
|
<image :src="imgfixUrls + 'goods/groupnum.png'" mode=""></image>
|
|
</view>
|
|
<view class="group-countdown-numGroup f-24 col-f">{{ dataInfo['peoplenum'] }}人团</view>
|
|
</view>
|
|
<view class="group-countdown-oldPrice f-24 col-f">单价买 ¥{{ dataInfo['aloneprice'] }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="bargain-countdown-content-right">
|
|
<block v-if="!!countDown['timeobj']">
|
|
<view class="col-f f-24 group-countdown-title t-c">距离{{ dataInfo['stateTime'] === 1 ? '结束' : '开始' }}还剩:</view>
|
|
<view class="countdownTime-box dis-flex flex-x-center flex-y-center">
|
|
<view class="groupcountdownTime-style countdownTime-hh col-f" v-if="countDown.timeobj.tt !== '00'">
|
|
<text class="f-24">{{ countDown['timeobj']['tt'] }}</text>
|
|
<span style="font-size: 24upx;">天</span>
|
|
</view>
|
|
<view class="groupcountdownTime-style countdownTime-hh col-f">
|
|
<text class="f-24">{{ countDown['timeobj']['hh'] }}</text>
|
|
:
|
|
</view>
|
|
<view class="groupcountdownTime-style countdownTime-ss col-f">
|
|
<text class="f-24">{{ countDown['timeobj']['mm'] }}</text>
|
|
:
|
|
</view>
|
|
<view class="groupcountdownTime-style countdownTime-mm col-f">
|
|
<text class="f-24">{{ countDown['timeobj']['ss'] }}</text>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<block v-if="dataInfo['isTimeOver']">
|
|
<view class="f-28 col-9">活动已结束</view>
|
|
</block>
|
|
<block v-else-if="!(!!countDown['timeobj'])">
|
|
<view class="bargain-countdown-right-loading p-r">
|
|
<part-loading ref="partLoading" :backgroundType="'goods'"></part-loading>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<!-- 商品信息 -->
|
|
<view class="goods-info m-btm20">
|
|
<!-- 商品内容 -->
|
|
<view class="goods-content module-content">
|
|
<!-- 商品价格 -->
|
|
<block v-if="goodsType !== '1' && goodsType !== '7' && goodsType !== '3'">
|
|
<view class="goods-price-box dis-flex flex-dir-row flex-y-end flex-x-between">
|
|
<!-- 普通商品-->
|
|
<view class="goods-price dis-flex flex-dir-row flex-y-end">
|
|
<block v-if="goodsType === '5'">
|
|
<view class="goods-price-now price-font-family">
|
|
<text class="f-32">{{ !!dataInfo.is_charge && dataInfo.is_charge === '1' ? dataInfo['price'] : '免费' }}</text>
|
|
<text class="f-24 m-left10" v-if="optionstatus == '1'">起</text>
|
|
</view>
|
|
</block>
|
|
<block v-else>
|
|
<view class="goods-price-now price-font-family">
|
|
<view class="money-label f-24">¥</view>
|
|
<text class="f-58">{{ dataInfo['price'] }}</text>
|
|
<text class="f-24 m-left10" v-if="optionstatus == '1'">起</text>
|
|
</view>
|
|
|
|
</block>
|
|
<view :style="{'position': 'relative','top': Number(dataInfo.discount_price) != 0?'12rpx':'0rpx'}">
|
|
<block v-if="dataInfo['vipstatus'] === '1' && Number(dataInfo.discount_price) != 0">
|
|
<view class="rush-label-box p-r f-24" style="bottom: -10upx;left: 20upx;">
|
|
{{dataInfo.levelarmy == 1?'拥军价格':dataInfo.levelname}}立减{{ dataInfo['discount_price'] }}元
|
|
<view class="bargain-label-icon bargain-label-icon-rush iconfont icon-triangledownfill"></view>
|
|
</view>
|
|
</block>
|
|
<view class="goods-price-old f-24 col-9" style="text-decoration:line-through;" v-if="!!dataInfo['oldprice']">
|
|
|
|
<text class="money-label">¥</text>{{ dataInfo['oldprice'] }}
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
<!-- 商品销量/库存 -->
|
|
<!-- <view class="goods-browse">
|
|
已{{ goodsType === '5' && dataInfo['is_charge'] === '0' ? '领' : '售' }}{{ dataInfo['buy_num'] }}/仅剩{{ dataInfo['stk'] }}
|
|
</view> -->
|
|
</view>
|
|
</block>
|
|
<!-- 商品标题 -->
|
|
<view class="goods-title">
|
|
<!-- 商品名称 -->
|
|
<view class="goods-title-mian f-36 col-3 m-btm15" @click="copy(dataInfo['goods_name'])">{{ dataInfo['goods_name'] }}</view>
|
|
<!-- 商品活动 -->
|
|
<view class="dis-flex">
|
|
<view class="goods-activity dis-flex flex-y-center flex-warp m-btm20" style="flex: 0.95;" @click="looktag">
|
|
<view class="activity-item dis-flex flex-y-center m-right30" v-for="(tagItem, index) in dataInfo['tag_list']" :key="index">
|
|
<image :src="imgfixUrls + 'goods/activityImage.png'" style="width: 25upx;height: 25upx;" mode=""></image>
|
|
<view class="f-24 col-9" style="max-width: 600upx;" >{{ tagItem }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="f-20 m-btm20" style="flex: 0.05;color: #999999;" v-if="dataInfo['tag_list']" @click="looktag">
|
|
<!-- 查看详情 -->
|
|
<text :class="!istag? 'iconfont icon-unfold':'iconfont icon-fold'" style="color: #6f6f6f;font-size: 26upx;line-height: 60upx;padding-left: 10upx;display: inline-block;box-sizing: border-box;"></text>
|
|
</view>
|
|
</view>
|
|
<!-- 砍价购介绍 -->
|
|
<block v-if="goodsType === '7'">
|
|
<view class="bargain-buy-box padding-box-all">
|
|
<view class="bargain-buy-top dis-flex flex-y-center flex-x-between" @click="wfShow = true">
|
|
<view class="bargain-buy-top-title f-24 m-btm15">[{{!!dataInfo.barset && dataInfo.barset.playdesc?dataInfo.barset.playtitle:'砍价购'}}]</view>
|
|
<view class="f-24 col-9">
|
|
玩法详情
|
|
<text class="iconfont icon-right icon-right-buybarainIcon"></text>
|
|
</view>
|
|
</view>
|
|
<view class="bargain-buy-top f-24 col-9">{{!!dataInfo.barset && dataInfo.barset.playdesc?dataInfo.barset.playdesc:'邀请好友砍价,超低价购买心仪商品!'}}</view>
|
|
</view>
|
|
</block>
|
|
<!-- 核销尾款 -->
|
|
<view class="f-28 col-9" v-if="dataInfo['retainage'] && dataInfo['retainage'] !== '0.00'">商品核销尾款:{{ dataInfo['retainage'] }}元</view>
|
|
</view>
|
|
|
|
<!-- 乐豆 -->
|
|
<view class="dis-flex col-f LeBeans" v-if="dataInfo.diy_userInfo">
|
|
<view >
|
|
|
|
<view class="f-28 f-w" style="padding-bottom: 15upx;" v-if="dataInfo.diy_userInfo.credit">
|
|
<text class="f-w">您的兑换券金额</text>
|
|
<text style="padding: 0 0upx;vertical-align: top;">:</text>
|
|
<text>{{dataInfo.diy_userInfo.credit}}</text>
|
|
|
|
<view class="f-28 f-w" style="padding-top: 15upx;">(此商品至少需要<text style="padding: 0 0upx;">{{dataInfo.price}}</text>元兑换券)</view>
|
|
</view>
|
|
|
|
|
|
<view class="f-28" style="padding-bottom: 15upx;" v-else>
|
|
未登录
|
|
</view>
|
|
<!-- #ifdef H5 -->
|
|
<view class="f-20 f-w" style="fontSize: 20upx;width: 88%;">
|
|
<view class="dis-il-block" style="padding: 4upx 8upx;background-color: rgba(0,0,0,0.3);border-radius: 5upx;margin-right: 10upx;">
|
|
{{dataInfo.diy_userInfo.dhtip1}}
|
|
</view>
|
|
<text>{{dataInfo.diy_userInfo.dhtip2}}</text>
|
|
</view>
|
|
<!-- #endif -->
|
|
<!-- #ifndef H5 -->
|
|
<view class="f-20 f-w" style="fontSize: 20upx;width: 92%;">
|
|
<view class="dis-il-block" style="padding: 4upx 8upx;background-color: rgba(0,0,0,0.3);border-radius: 5upx;margin-right: 10upx;">
|
|
{{dataInfo.diy_userInfo.dhtip1}}
|
|
</view>
|
|
<text>{{dataInfo.diy_userInfo.dhtip2}}</text>
|
|
</view>
|
|
<!-- #endif -->
|
|
</view>
|
|
<view class="f-26" style="">
|
|
<view class="conversion" @click="goladur(dataInfo.diy_userInfo.dhurl)">
|
|
去兑换
|
|
<text class="iconfont icon-right" style="font-size: 26upx;"></text>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
<!-- 乐豆 -->
|
|
|
|
<!-- 会员卡 -->
|
|
<view class="member-box dis-flex flex-y-center flex-x-between m-btm40" v-if="dataInfo.is_open_vip === 1">
|
|
<view class="member-left dis-flex flex-y-center">
|
|
<image :src="imgfixUrls + 'goods/member.png'" mode=""></image>
|
|
<view class="f-24 member-fontColor">{{ TextSubstitution['halfcardtext'] }}</view>
|
|
<view class="member-fontColor-cut"></view>
|
|
<view class="member-title f-24 member-fontColor onelist-hidden">
|
|
{{ dataInfo.is_vip > 0 ? '续费' + TextSubstitution['halfcardtext'] + ',继续立享优惠折扣' : '开通' + TextSubstitution['halfcardtext'] + ',立享优惠折扣' }}
|
|
</view>
|
|
</view>
|
|
<view class="member-right t-c f-24" @click="member()">
|
|
{{ dataInfo.is_vip > 0 ? '去续费' : '去开通' }}
|
|
<text class="iconfont icon-right"></text>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 邀请 -->
|
|
<view class="goods-already-box m-btm20" :class="!!dataInfo['community'] ? 'padding-box-all' : 'already-box-padding'">
|
|
<!-- 浏览人数 -->
|
|
<view :class="{ 'border-bottom border-line': (goodsType === '1' || goodsType === '2') && !!dataInfo['community'] }">
|
|
<view class="goods-already dis-flex flex-dir-row flex-y-end flex-x-between p-r" style="height: 116upx;" >
|
|
<view class="goods-already-buy">
|
|
<block v-if="goodsType !== '1' && goodsType !== '7' && goodsType !== '3'">
|
|
<view class="goods-already-num f-24 m-btm20">TA们都在逛</view>
|
|
</block>
|
|
<block v-else>
|
|
|
|
</block>
|
|
<view class="goods-already-user">
|
|
<image class="user-avatar" :src="userItem" v-for="(userItem, index) in dataInfo['user_list']" :key="index"
|
|
:style="{ 'z-index': dataInfo['user_list']['length'] * 2 - index }"></image>
|
|
<view class="user-avatar user-more f-24">···</view>
|
|
</view>
|
|
</view>
|
|
<view class="goods-invite-reward" v-if="dataInfo['dis_assistant']['is_show'] === 1">
|
|
最高赚¥{{
|
|
dataInfo['dis_assistant']['max_commission']
|
|
}}
|
|
</view>
|
|
<view class="goods-invite" @click="posterShare(dataInfo)">邀请好友</view>
|
|
|
|
|
|
</view>
|
|
<view class="dis-flex">
|
|
<view class="goods-already-num f-24 m-btm20" style="flex: 0.5;">
|
|
<text v-if="Number(dataInfo.alldaylimit ) > 0">总计:</text>已售{{ dataInfo['buy_num'] }}/仅剩{{ dataInfo['stk'] }}
|
|
</view>
|
|
<view class="goods-already-num f-24 m-btm20 t-r" style="flex: 0.5;" v-if="Number(dataInfo.alldaylimit ) > 0">
|
|
今日:已{{ goodsType === '5' && dataInfo['is_charge'] === '0' ? '领' : '售' }}{{ dataInfo['todayselenum'] }}/{{ dataInfo['alldaylimit'] }}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 社群 -->
|
|
<block v-if="!!dataInfo['community']">
|
|
<view class="goods-community dis-flex flex-x-between flex-y-center m-top20">
|
|
<view class="community-user dis-flex flex-y-center flex-box ">
|
|
<image :src="dataInfo['community']['imgUrl']" class="community-user-img"></image>
|
|
<view class="community-user-info flex-box">
|
|
<view class="community-user-name col-0 f-28">{{ dataInfo['community']['name'] }}</view>
|
|
<view class="community-user-des f-24 col-9 onelist-hidden">{{ dataInfo['community']['introduce'] }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="community-btn"><button class="community-add community-add-bgcolor f-24 col-f" @click="showCommunity = true"
|
|
v-if="!!dataInfo['community']">添加</button></view>
|
|
</view>
|
|
</block>
|
|
<!-- 社群弹窗 -->
|
|
<PopManager :show="showCommunity" type="center" @clickmask="showCommunity = false" v-if="!!dataInfo['community']">
|
|
<view class="community-detail b-f t-c">
|
|
<view class="community-header f-w f-36 p-r col-f"><text class="community-header-text p-r">{{dataInfo['community']['name']}}</text></view>
|
|
<!-- #ifdef H5 -->
|
|
<view class="community-body">
|
|
<image :src="!!dataInfo['community'] ? dataInfo['community']['qrcodeUrl'] : ''" class="community-qrcodeimg"></image>
|
|
<view class="community-toreply f-26 col-3">长按识别二维码</view>
|
|
</view>
|
|
<!-- #endif -->
|
|
<!-- #ifndef H5 -->
|
|
<view class="community-body f-26 col-3">
|
|
有任何疑问,点击“
|
|
<text class="col-m">去回复</text>
|
|
”发送“
|
|
<text class="col-m">{{ dataInfo['community']['community_id'] }}</text>
|
|
”,即可添加{{dataInfo['community']['name']}}
|
|
</view>
|
|
<!-- #endif -->
|
|
<view class="community-phone dis-flex flex-y-center flex-x-between" v-if="!!dataInfo['community'] && !!dataInfo['community']['phone']">
|
|
<view class="community-number dis-flex flex-y-center">
|
|
<image :src="imgfixUrls + 'goods/community.png'" class="community-number-icon"></image>
|
|
<view class="f-24 col-3">{{ dataInfo['community']['phone'] }}</view>
|
|
</view>
|
|
<view class="community-bdial f-24" @click="callPhone(dataInfo.community.phone)">拨号</view>
|
|
</view>
|
|
<button class="community-reply f-24 col-f" open-type="contact" v-if="clienType === '3'">去回复</button>
|
|
</view>
|
|
</PopManager>
|
|
|
|
</view>
|
|
<!-- 限数抢购 -->
|
|
<view class="limit-rushBox p-left-right-30" v-if="dataInfo.lp_status != '0' && dataInfo.type === '1'">
|
|
<view class="limit-rushList m-left-right-30">
|
|
<view class="limit-item border-line border-bottom dis-flex flex-y-center flex-x-between p-top-bom-30" v-for="(limitItem, index) in dataInfo.lp_set" :key="index">
|
|
<view class="limit-left">
|
|
<view class="limitPrice-goodNum dis-flex flex-y-center m-btm20">
|
|
<view class="col-f4 f-30 m-right30">
|
|
<text class="f-24">¥</text>
|
|
{{ limitItem.price }}
|
|
</view>
|
|
<view class="f-24 col-3">(第{{ limitItem.min }}~{{ limitItem.max }}件)</view>
|
|
</view>
|
|
<view class="progress-box p-r">
|
|
<view class="progress-bar" :style="{ width: limitItem.proportion + '%' }"></view>
|
|
<view class="default-progress-bar dis-flex flex-y-center">
|
|
<view class="col-f f-22 shrink">已卖{{ limitItem.buy_num }}件</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<block v-if="limitItem.proportion < 100">
|
|
<view class="limit-right f-24 col-3">仅剩{{ limitItem.surplus }}件</view>
|
|
</block>
|
|
<block v-else>
|
|
<view class="f-24 col-f4">已卖清</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 拼团列表 -->
|
|
<block v-if="goodsType === '3' && dataInfo['is_pool'] !== '1' && dataInfo['group_list'].length > 0">
|
|
<view class="group-list p-top-bom-40 b-f m-btm20">
|
|
<view class="group-list-content m-left-right-30">
|
|
<view class="dis-flex flex-y-center flex-x-between">
|
|
<view class="group-list-title f-30 col-3">参与拼团,享受优惠</view>
|
|
</view>
|
|
<view class="group-list-item p-top-bom-30 border-line border-bottom" v-for="(groupItem, index) in dataInfo['group_list']" :key="index">
|
|
<view class="dis-flex flex-x-between flex-y-center">
|
|
<view class="group-detail dis-flex flex-y-center">
|
|
<view class="group-item-logo m-right10" :style="{ 'background-image': ' url(' + groupItem['avatar'] + ')' }"></view>
|
|
<view class="group-item-name f-28 col-3">{{ groupItem['nickname'] }}</view>
|
|
</view>
|
|
<view class="dis-flex flex-y-center">
|
|
<view class="clustering-dateTime-num m-right30">
|
|
<view class="clustering-num f-24">
|
|
还差
|
|
<text>{{ groupItem['lacknum'] }}人</text>
|
|
成团
|
|
</view>
|
|
<view class="f-24 col-9">
|
|
剩余 {{ !!groupItem['groupTime'] ? groupItem['groupTime']['hh'] : '00' }}:
|
|
{{ !!groupItem['groupTime'] ? groupItem['groupTime']['mm'] : '00' }}:
|
|
{{ !!groupItem['groupTime'] ? groupItem['groupTime']['ss'] : '00' }}
|
|
</view>
|
|
</view>
|
|
<view class="group-list-item-btn t-c f-24 col-f" :class="groupItem['isTimeOver'] ? 'group-list-item-btn-isEndTimeTrue' : 'group-list-item-btn-isEndTimefalse'"
|
|
@click="navbargin(groupItem)">
|
|
去参团
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<!-- 使用须知 -->
|
|
<view class="b-f padding-box-all m-btm20">
|
|
<!-- 配置标题 -->
|
|
<goodsHeaderTitle :titleName="TextSubstitution.shiylctext"></goodsHeaderTitle>
|
|
<!-- 使用流程 -->
|
|
<view v-if="strings.strings">
|
|
<jyf-parser domain="https://6874-html-foe72-1259071903.tcb.qcloud.la" gesture-zoom lazy-load ref="article"
|
|
selectable showWithAnimation show-with-animation use-anchor :html="strings.strings" @imgtap="imgtap"></jyf-parser>
|
|
</view>
|
|
|
|
<view v-else class="use-flow dis-flex flex-x-between p-r">
|
|
<view class="use-flow-item t-c">
|
|
<view class="use-order t-c col-f f-24">1</view>
|
|
<view class="use-detail">
|
|
<view class="f-24 col-3">选择商品</view>
|
|
<view class="f-24 col-9">点击立即购买</view>
|
|
</view>
|
|
</view>
|
|
<view class="use-flow-item t-c">
|
|
<view class="use-order t-c col-f f-24">2</view>
|
|
<view class="use-detail">
|
|
<view class="f-24 col-3">购买完成</view>
|
|
<view class="f-24 col-9">在订单页使用</view>
|
|
</view>
|
|
</view>
|
|
<view class="use-flow-item t-c">
|
|
<view class="use-order t-c col-f f-24">3</view>
|
|
<view class="use-detail">
|
|
<view class="f-24 col-3">获取核销码</view>
|
|
<view class="f-24 col-9">等待商家发货</view>
|
|
</view>
|
|
</view>
|
|
<view class="use-cut use-cut-left"></view>
|
|
<view class="use-cut use-cut-right"></view>
|
|
</view>
|
|
</view>
|
|
<!-- 商家信息 -->
|
|
<view class="store padding-box-all b-f m-btm20" v-if="!!dataInfo['shop'] && 0">
|
|
<!-- 配置标题 -->
|
|
<goodsHeaderTitle :titleName="'商家信息'"></goodsHeaderTitle>
|
|
<view class="store-detail" @click="naviStore(dataInfo['shop'])">
|
|
<view class="m-btm20 col-3 f-28">{{ dataInfo['shop']['storename'] }} <text class="dis-il-block f-w" style="float: right;color: #FF4444;">点击进入<text
|
|
class="f-24 iconfont icon-right f-w" style="color: #FF4444;font-size: 28upx;"></text></text></view>
|
|
<view class="f-24 col-9 m-btm30 lxPack">
|
|
<text>营业时间:{{ dataInfo['shop']['storehours'] }}</text>
|
|
<view class="lx" @click.stop="goLt"><img :src="imgfixUrls + 'merchant/spLt.png'" class="lxImg" /></view>
|
|
</view>
|
|
<view class="dis-flex flex-x-between m-btm20">
|
|
<view class="store-addressInfo f-24 col-9">商家电话:{{ dataInfo['shop']['mobile'] }}</view>
|
|
<view class="store-addressInfo-icon t-c col-f iconfont icon-dianhua" @click.stop="supple(dataInfo['shop'], 'mobile')"></view>
|
|
</view>
|
|
<view class="dis-flex flex-x-between">
|
|
<view class="store-addressInfo store-addressInfo-onelist onelist-hidden f-24 col-9">{{ dataInfo['shop']['address'] }}</view>
|
|
<view class="store-addressInfo-icon t-c col-f iconfont icon-daohang" @click.stop="supple(dataInfo['shop'], 'address')"></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 须知详情评论tabBar -->
|
|
<view class="goods-contentInfo b-f padding-box-all m-btm20">
|
|
<view class="goods-detail-nav dis-flex flex-dir-row flex-y-center flex-x-between m-btm30">
|
|
<view class="goods-detail-nav-item" v-for="(item, index) in InfoTabBar" :class="{ active: detailType === item.tabBarType }" :key="index"
|
|
@click="detailTypeChange(item.tabBarType)">
|
|
{{ item.title }}
|
|
<view class="select-nav-items" v-if="detailType === item.tabBarType">
|
|
<image :src="imgfixUrls + 'goods/br.png'" mode=""></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 商品评价 -->
|
|
<view class="goods-detail-evaluation b-f" v-show="detailType === 'comment'">
|
|
<block v-if="!!dataInfo['comment'] && dataInfo['comment']['length'] > 0">
|
|
<view class="evaluation-item border-line border-bottom" v-for="(commentItem, index) in dataInfo['comment']" :key="index">
|
|
<view class="evaluation-hd dis-flex flex-dir-row flex-y-center flex-x-between">
|
|
<view class="evaluation-user dis-flex flex-dir-row flex-y-center">
|
|
<image :src="commentItem['headimg']" mode=""></image>
|
|
<view class="evaluation-user-name">
|
|
<view class="user-name f-24">{{ commentItem['nickname'] }}</view>
|
|
<view class="evaluation-time f-24 col-9">{{ commentItem['createtime'] }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="evaluation-grade dis-flex flex-dir-row flex-y-center">
|
|
<view class="iconfont icon-shoucangxiao select" v-for="(score, scoreIndex) in commentItem['star']" :key="scoreIndex"></view>
|
|
<view class="iconfont icon-shoucangxiao" v-for="(score, scoreIndex) in 5 - commentItem['star']" :key="scoreIndex"></view>
|
|
</view>
|
|
</view>
|
|
<view class="evaluation-bd">
|
|
<view class="evaluation-content f-26 col-9">{{ commentItem['text'] }}</view>
|
|
<view class="picImage_view">
|
|
<image :src="picItem" v-for="(picItem,picIndex) in commentItem['pic']" class="picImage" :key="picIndex" @click="lookimg(commentItem.pic,picIndex)"></image>
|
|
</view>
|
|
<block v-if="!!commentItem['replypicone'] && commentItem['replypicone']['length'] > 0">
|
|
<view class="evaluation-imgs dis-flex flex-warp">
|
|
<block v-for="(comment_image_item, index) in commentItem['replypicone']" :key="index">
|
|
<image :src="comment_image_item" mode=""></image>
|
|
</block>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
<block v-if="!!commentItem['replytextone']">
|
|
<view class="store-reply">
|
|
<view class="reply-content">
|
|
<view class="reply-content-item f-24 col-9">
|
|
<text class="reply-content-itemfont f-24 col-9 iconfont icon-pinglun"></text>
|
|
商家回复:
|
|
<text class="col-3">{{ commentItem['replytextone'] }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
<!-- <view @click="commentList()" style="text-align: center;font-size: 25rpx;margin-top: 10rpx;" v-if="!!dataInfo['comment'] && dataInfo['comment']['length'] == 5">
|
|
查看更多
|
|
</view> -->
|
|
</block>
|
|
<block v-else>
|
|
<view class="evaluation-all dis-flex flex-dir-row flex-y-center flex-x-center"><text class="f-28">暂无评价</text></view>
|
|
</block>
|
|
</view>
|
|
|
|
<!-- 购买须知/商品详情 -->
|
|
<view class="b-f" v-if="detailType === 'detail'">
|
|
<jyf-parser domain="https://6874-html-foe72-1259071903.tcb.qcloud.la" gesture-zoom lazy-load ref="article"
|
|
selectable @load="parseLoad" @ready="parseImgload" show-with-animation use-anchor :html="detailType === 'detail' ? dataInfo['detail'] : dataInfo['describe']"
|
|
autoscroll :tagStyle="tagStyle"></jyf-parser>
|
|
</view>
|
|
<view class="b-f" v-else-if="detailType === 'notice'">
|
|
<jyf-parser domain="https://6874-html-foe72-1259071903.tcb.qcloud.la" gesture-zoom lazy-load ref="article"
|
|
selectable @load="parseLoad" @ready="parseImgload" show-with-animation use-anchor :html="detailType === 'detail' ? dataInfo['detail'] : dataInfo['describe']"
|
|
autoscroll :tagStyle="tagStyle"></jyf-parser>
|
|
</view>
|
|
</view>
|
|
<!-- 价格说明 -->
|
|
<view class="b-f padding-box-all m-btm20" v-if="TextSubstitution.jiagsmext">
|
|
<!-- 配置标题 -->
|
|
<goodsHeaderTitle :titleName="TextSubstitution.jiagsmext"></goodsHeaderTitle>
|
|
<!-- 说明富文本 -->
|
|
<view v-if="nodes">
|
|
<!-- <u-parse :content="nodes" /> -->
|
|
<jyf-parser domain="https://6874-html-foe72-1259071903.tcb.qcloud.la" gesture-zoom lazy-load ref="article"
|
|
selectable show-with-animation use-anchor :html="nodes"></jyf-parser>
|
|
</view>
|
|
<view v-else>
|
|
<view class="f-24 col-6 m-btm20">
|
|
<text style="color: #CCBF66;">·划线价格:</text>
|
|
划线的价格可能是商品的专柜价、吊牌价、正品零售价、指导价、曾经展示过的销售价等,并非市场价,仅供您参考。
|
|
</view>
|
|
<view class="f-24 col-6 m-btm20">
|
|
<text style="color: #CCBF66;">·未划线价格:</text>
|
|
未划线的价格是商品的销售标价,不因表述差异改变性质具体的成交价格可能因会员使用优惠券、积分等发生变化,最终以订单结算价格为准。
|
|
</view>
|
|
<view class="f-24" style="color: #CCBF66;">·若商家针对划线价格进行说明,以商家的表述为准。</view>
|
|
</view>
|
|
|
|
</view>
|
|
<!-- 推荐商品 -->
|
|
<view class="b-f padding-box-all m-btm40" v-if="recommendGoodlength > 0 && dataInfo.type && dataInfo.id">
|
|
<!-- 配置标题 -->
|
|
<goodsHeaderTitle :titleName="'推荐商品'"></goodsHeaderTitle>
|
|
<!-- 推荐商品 -->
|
|
<recommendGoods :goods_type="dataInfo.type" :goods_id="dataInfo.id" @recommendGoodNoOff="recommendGoodNoOff"></recommendGoods>
|
|
</view>
|
|
<view style="padding: 60upx 0;" v-else>
|
|
|
|
</view>
|
|
<!-- 底部菜单 -->
|
|
<view class="goods-footer dis-flex flex-dir-row flex-y-center border-line border-top" :style="{ 'padding-bottom': isPadding ? '20px' : '','z-index':getTipShow || istag?'9998':'999' }">
|
|
<view class="dis-flex flex-y-center" style="width: 50%;">
|
|
<view class="goods-footer-item dis-flex flex-dir-column flex-x-center p-r" @click="footerNav('home')">
|
|
<button class="btn-normal report-btn" form-type="submit" style="overflow: hidden;"></button>
|
|
<image :src="imgfixUrls + 'goods/home.png'"></image>
|
|
<view class="goods-footer-item-text">首页</view>
|
|
</view>
|
|
<view class="goods-footer-item dis-flex flex-dir-column flex-x-center p-r" @click="footerNav('order')">
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
<image :src="imgfixUrls + 'goods/flow.png'"></image>
|
|
<view class="goods-footer-item-text">订单</view>
|
|
</view>
|
|
<view class="goods-footer-item dis-flex flex-dir-column flex-x-center" @click="footerNav('user')">
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
<image :src="imgfixUrls + 'goods/my.png'"></image>
|
|
<view class="goods-footer-item-text">我的</view>
|
|
</view>
|
|
|
|
<view class="advfei" v-if="dataInfo.dis_assistant.tipflag == 1 && tipflag == true && TextSubstitution.fxstext">
|
|
<view class="iconfont icon-roundclose" style="font-size: 40upx;color: #FFFFFF;font-weight: 700;flex: 0.1;line-height: 70upx;margin: auto;"
|
|
@click="closeadv">
|
|
|
|
</view>
|
|
<view class="col-f t-l" style="flex: 0.7;padding-left: 10upx;">
|
|
<text class="f-22">{{dataInfo.dis_assistant.korea == 1?`대리상 가입으로 쉽게하는 돈벌이!`:`加入${TextSubstitution.fxstext},一起赚更多`}} </text><br />
|
|
<text class="f-22">{{dataInfo.dis_assistant.korea == 1?`좋은상품 추천 할겸, 혜택도 보는 생활 재태크`:`此商品,分享赚¥${dataInfo.dis_assistant.max_commission}`}} </text>
|
|
</view>
|
|
<view
|
|
style="background-color: #FFC3C2;
|
|
color: #B90C1F;
|
|
height: 70upx;
|
|
line-height: 70upx;
|
|
font-size: 28upx;
|
|
border-radius: 10upx;
|
|
flex: 0.2;
|
|
padding: 0 10upx;
|
|
margin: auto;"
|
|
@click="gohomefxs">
|
|
{{dataInfo.dis_assistant.korea == 1?'바로가입':'立即加入'}}
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
<block v-if="goodsType === '1' || goodsType === '2'">
|
|
<view class="go-buy dis-flex flex-dir-column flex-y-center flex-x-center p-r flex-box" :class="
|
|
dataInfo['sales_status'] !== 2?
|
|
goodsType === '1' && dataInfo.status === '1'?
|
|
dataInfo.is_follow === 0
|
|
? 'remind-go-buy' : 'alrea-remind-go-buy'
|
|
: 'end-go-buy'
|
|
: (dataInfo.stk===0 || dataInfo.status === '4' ?'alrea-remind-go-buy':'star-go-buy')"
|
|
@click="onToggleTrade(dataInfo['sales_status'], dataInfo)">
|
|
<block v-if="goodsType === '1' && dataInfo.status === '1'">
|
|
<text class="f-28 col-f">{{ dataInfo.is_follow === 0 ? '提醒我' : '已关注' }}</text>
|
|
</block>
|
|
<block v-else-if="goodsType !== '1' && dataInfo.status === '1'">
|
|
<text class="f-28 col-f">未开始</text>
|
|
</block>
|
|
<block v-else-if="dataInfo.status === '2' || dataInfo.status === '7'">
|
|
<text class="f-28 col-f">{{getTipShow==false?(dataInfo.stk===0?'已售罄': dataInfo.sales_status === 1?'未开始':dataInfo.sales_status === 3?'已结束':dataInfo.sales_status === 4?'今日已售罄':'立即抢购'):'同意并且购买'}}</text>
|
|
</block>
|
|
<block v-else style="background-color: #C0C0C0;"><text class="f-28 col-f">已下架</text></block>
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
</view>
|
|
</block>
|
|
<!-- 卡券 -->
|
|
<block v-if="goodsType === '5'">
|
|
<block v-if="dataInfo['is_charge'] === '1' && (dataInfo.sales_status === 2 )">
|
|
<view class="go-buy dis-flex flex-dir-column flex-y-center flex-x-center p-r flex-box star-go-buy" @click="onToggleTrade(dataInfo['sales_status'], dataInfo)">
|
|
<text class="f-28 col-f">{{getTipShow==false?'立即购买':'同意并且购买'}}</text>
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
</view>
|
|
</block>
|
|
<block v-else>
|
|
<block v-if="(dataInfo.buy_limit >= 0 || _this.dataInfouser_limit_num > 0) && dataInfo.sales_status === 2">
|
|
<view class="go-buy dis-flex flex-dir-column flex-y-center flex-x-center p-r flex-box star-go-buy" @click="getCouponDicont(dataInfo['sales_status'], dataInfo)">
|
|
<text class="f-28 col-f">立即领取</text>
|
|
</view>
|
|
</block>
|
|
<block v-else>
|
|
<view class="unqualified-gobuy dis-flex flex-dir-column flex-y-center flex-x-center p-r flex-box">
|
|
<text class="f-28 col-f" v-if="dataInfo.sales_status === 1">活动未开始</text>
|
|
<text class="f-28 col-f" v-if="dataInfo.sales_status === 3">活动已结束</text>
|
|
<text class="f-28 col-f" v-if="dataInfo.sales_status === 4">已售罄</text>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
</block>
|
|
<!-- 拼团 -->
|
|
<block v-if="goodsType === '3'">
|
|
<view class="group-go-buy dis-flex flex-box flex-y-center" v-if="!getTipShow">
|
|
<view class="out_buy-left p-r dis-flex flex-dir-column flex-x-center" v-if="dataInfo.aloneprice_switch == 0 || dataInfo.aloneprice_switch == '0'" @click="isGroupToggleTrade('1', dataInfo)">
|
|
<view class="out_buy-leftTop f-24 col-f">¥{{ dataInfo['aloneprice'] }}</view>
|
|
<view class="out_buy-leftbom f-24 col-f">直接购买</view>
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
</view>
|
|
<block v-if="!!countDown['timeobj'] && dataInfo['sales_status'] === 2">
|
|
<view class="out_buy-right starbtn dis-flex flex-dir-column flex-x-center" :style="{borderRadius: (dataInfo.aloneprice_switch == 0 || dataInfo.aloneprice_switch == '0')?'0 40rpx 40rpx 0':'40rpx'}" @click="isGroupToggleTrade('2', dataInfo)">
|
|
<view class="out_buy-leftTop f-24" style="color:black">¥{{dataInfo['price'] }}</view>
|
|
<view class="out_buy-leftbom f-24" style="color:black">{{dataInfo['peoplenum'] }}人团</view>
|
|
</view>
|
|
</block>
|
|
<block v-else>
|
|
<view class="out_buy-right havebtn" :style="{borderRadius: (dataInfo.aloneprice_switch == 0 || dataInfo.aloneprice_switch == '0')?'0 40rpx 40rpx 0':'40rpx'}">
|
|
<view class="havenot-btn f-24 col-9">{{ dataInfo['isTimeOver'] ? '已结束' : dataInfo['stateTime'] === 1 ? '已售罄' : '未开始' }}</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
<view class="group-go-buy dis-flex flex-box flex-y-center" v-else>
|
|
<view class="out_buy-left p-r dis-flex flex-dir-column flex-x-center" style="border-radius: 60upx;" @click="isGroupToggleTrade(0, dataInfo)">
|
|
<!-- <view class="out_buy-leftTop f-24 col-f">¥{{ dataInfo['aloneprice'] }}</view> -->
|
|
<view class="out_buy-leftbom f-24 col-f">{{group_buy_type == '1'?'同意并直接购买':'同意拼团'}}</view>
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
</view>
|
|
|
|
</view>
|
|
</block>
|
|
<!-- 砍价 -->
|
|
<block v-if="goodsType === '7'">
|
|
<block v-if="dataInfo['sales_status'] === 2">
|
|
<view class="group-go-buy dis-flex" @click="sorbargin(dataInfo['is_participate'],dataInfo['stk'])">
|
|
<view class="go-buy dis-flex flex-dir-column flex-y-center flex-x-center p-r flex-box " :style="{'background-color': dataInfo['stk'] == 0 ? '#999999': '#ff4444'}">
|
|
<text class="f-28 col-f">{{ !!dataInfo['is_participate'] && dataInfo['is_participate'] > 0 ? '查看砍价' : (dataInfo['stk'] == 0) ? '已售罄' : '发起砍价' }}</text>
|
|
<button class="btn-normal report-btn" form-type="submit" :disabled="dataInfo['stk'] == 0"></button>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<block v-else>
|
|
<view class="group-go-buy dis-flex">
|
|
<view class="go-buy dis-flex flex-dir-column flex-y-center flex-x-center p-r flex-box end-go-buy">
|
|
<text class="f-28 col-f">{{dataInfo['stk'] == 0 ?'已售罄':'发起砍价'}}</text>
|
|
<button class="btn-normal report-btn" form-type="submit" :disabled="dataInfo['stk'] == 0"></button>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
|
|
</view>
|
|
</block>
|
|
<block v-else>
|
|
<block v-if="barrageList.length > 0">
|
|
<view class="success-tips dis-flex flex-y-center" :class="{ show: showTips }">
|
|
<image class="success-avatar" :src="barrageList[tipsIndex] ? barrageList[tipsIndex]['avatar'] : ''"></image>
|
|
<view class="onelist-hidden success-goods f-24 col-f m-left12">{{ barrageList[tipsIndex] ? barrageList[tipsIndex]['nickname'] : '' }}刚刚兑换的此商品</view>
|
|
</view>
|
|
</block>
|
|
<view class="goods-header" v-if="dataInfo['advs']">
|
|
<swiper @change="bindchange" :autoplay="true" :interval="3000" :circular="true" class="goods-swiper" :style="{ height: imgstyle.height + 'px',width: imgstyle.width + 'px'}">
|
|
<swiper-item class="swiper-item" v-for="(banner_item, index) in dataInfo['advs']" :key="index">
|
|
<image :src="banner_item" :data-id="index"></image>
|
|
</swiper-item>
|
|
</swiper>
|
|
<view class="goods-viewed">{{ dataInfo['pv'] }}人喜欢</view>
|
|
</view>
|
|
<view class="goods-info m-btm20">
|
|
<!-- 商品内容 -->
|
|
<view class="goods-content module-content">
|
|
<!-- 商品价格 -->
|
|
<view class="goods-price-box dis-flex flex-dir-row flex-y-end flex-x-between">
|
|
<!-- 普通商品-->
|
|
<view class="goods-price dis-flex flex-dir-row flex-y-end">
|
|
<view class="goods-price-now price-font-family dis-flex flex-y-center">
|
|
<image :src="imgfixUrls + 'integral/integral_logo.png'" class="m-right10" mode=""></image>
|
|
<view class="credit f-36">{{dataInfo['price']>0?dataInfo['use_credit1'] + TextSubstitution.credittext+'+'+ dataInfo['price']+'元' : dataInfo['use_credit1']+TextSubstitution.credittext}}</view>
|
|
</view>
|
|
<view class="goods-price-old" v-if="!!dataInfo['old_price']">
|
|
<text class="money-label">¥</text>
|
|
{{ dataInfo['old_price'] }}
|
|
<text class="f-24 m-left10" v-if="optionstatus == '1'">起</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 商品标题 -->
|
|
<view class="goods-title m-btm30">
|
|
<!-- 商品名称 -->
|
|
<view class="goods-title-mian f-36 col-3 m-btm40">{{ dataInfo['title'] }}</view>
|
|
<view class="member-box dis-flex flex-y-center flex-x-between m-btm40" v-if="dataInfo['is_open_vip'] === 1">
|
|
<view class="member-left dis-flex flex-y-center">
|
|
<image :src="imgfixUrls + 'goods/member.png'" mode=""></image>
|
|
<view class="f-24 member-fontColor">{{ dataInfo['halfcard_text'] }}</view>
|
|
<view class="member-fontColor-cut"></view>
|
|
<view class="member-title f-24 member-fontColor onelist-hidden">
|
|
{{ dataInfo.is_vip > 0 ? '续费' + dataInfo['halfcard_text'] + ',继续立享优惠折扣' : '开通' + dataInfo['halfcard_text'] + ',立享优惠折扣' }}
|
|
</view>
|
|
</view>
|
|
<view class="member-right t-c f-24" @click="member()">
|
|
{{ dataInfo.is_vip > 0 ? '去续费' : '去开通' }}
|
|
<text class="iconfont icon-right"></text>
|
|
</view>
|
|
</view>
|
|
<view class="goods-already-box padding-box-all">
|
|
<!-- 浏览人数 -->
|
|
<view class="goods-already dis-flex flex-dir-row flex-y-end flex-x-between p-r border-bottom border-line">
|
|
<view class="goods-already-buy">
|
|
<view class="goods-already-num f-24 m-btm20">TA们都在逛</view>
|
|
<view class="goods-already-user">
|
|
<image class="user-avatar" :src="userItem" v-for="(userItem, index) in dataInfo['avatar_list']" :key="index"
|
|
:style="{ 'z-index': dataInfo['avatar_list']['length'] * 2 - index }"></image>
|
|
<view class="user-avatar user-more f-24">···</view>
|
|
</view>
|
|
</view>
|
|
<view class="goods-invite-reward" v-if="dataInfo['dis_assistant']['is_show'] === 1">
|
|
最高赚:¥{{ dataInfo['dis_assistant']['max_commission'] }}
|
|
</view>
|
|
<view class="goods-invite" @click="posterShare(dataInfo)">邀请好友一起抢</view>
|
|
</view>
|
|
<!-- 社群 -->
|
|
<block v-if="!!dataInfo['community']">
|
|
<view class="goods-community dis-flex flex-x-between flex-y-center m-top20">
|
|
<view class="community-user dis-flex flex-y-center flex-box ">
|
|
<image :src="dataInfo['community']['imgUrl']" class="community-user-img"></image>
|
|
<view class="community-user-info flex-box">
|
|
<view class="community-user-name col-0 f-28">{{ dataInfo['community']['name'] }}</view>
|
|
<view class="community-user-des f-24 col-9 onelist-hidden">{{ dataInfo['community']['introduce'] }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="community-btn"><button class="community-add community-add-bgcolor f-24 col-f" @click="showCommunity = true">添加</button></view>
|
|
</view>
|
|
</block>
|
|
<!-- 社群弹窗 -->
|
|
<PopManager :show="showCommunity" type="center" @clickmask="showCommunity = false" v-if="!!dataInfo['community']">
|
|
<view class="community-detail b-f t-c">
|
|
<view class="community-header f-w f-36 p-r col-f"><text class="community-header-text p-r">{{dataInfo['community']['name']}}</text></view>
|
|
<!-- #ifdef H5 -->
|
|
<view class="community-body">
|
|
<image :src="!!dataInfo['community'] ? dataInfo['community']['qrcodeUrl'] : ''" class="community-qrcodeimg"></image>
|
|
<view class="community-toreply f-26 col-3">长按识别二维码</view>
|
|
</view>
|
|
<!-- #endif -->
|
|
<!-- #ifndef H5 -->
|
|
<view class="community-body f-26 col-3">
|
|
有任何疑问,点击“
|
|
<text class="col-m">去回复</text>
|
|
”发送“
|
|
<text class="col-m">{{ dataInfo['community']['community_id'] }}</text>
|
|
”,即可添加{{dataInfo['community']['name']}}
|
|
</view>
|
|
<!-- #endif -->
|
|
<view class="community-phone dis-flex flex-y-center flex-x-between" v-if="!!dataInfo['community'] && !!dataInfo['community']['phone']">
|
|
<view class="community-number dis-flex flex-y-center">
|
|
<image :src="imgfixUrls + 'goods/community.png'" class="community-number-icon"></image>
|
|
<view class="f-24 col-3">{{ dataInfo['community']['phone'] }}</view>
|
|
</view>
|
|
<view class="community-bdial f-24 col-3" @click="callPhone(dataInfo.community.phone)">拨号</view>
|
|
</view>
|
|
<button class="community-reply f-24 col-f" open-type="contact" v-if="clienType === '3'">去回复</button>
|
|
</view>
|
|
</PopManager>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="goods-detail-evaluation b-f padding-box-all m-btm20 ">
|
|
<!-- 购买须知/商品详情 -->
|
|
<goodsHeaderTitle :titleName="'商品详情'"></goodsHeaderTitle>
|
|
<view class="b-f">
|
|
<jyf-parser domain="https://6874-html-foe72-1259071903.tcb.qcloud.la" gesture-zoom lazy-load ref="article"
|
|
selectable show-with-animation use-anchor :html="dataInfo.description"></jyf-parser>
|
|
</view>
|
|
</view>
|
|
<view class="b-f padding-box-all m-btm80">
|
|
<!-- 配置标题 -->
|
|
<goodsHeaderTitle :titleName="'价格说明'"></goodsHeaderTitle>
|
|
<!-- 说明富文本 -->
|
|
<view class="f-24 col-6 m-btm20">
|
|
<text style="color: #CCBF66;">·划线价格:</text>
|
|
划线的价格可能是商品的专柜价、吊牌价、正品零售价、指导价、曾经展示过的销售价等,并非市场价,仅供您参考。
|
|
</view>
|
|
<view class="f-24 col-6 m-btm20">
|
|
<text style="color: #CCBF66;">·未划线价格:</text>
|
|
未划线的价格是商品的销售标价,不因表述差异改变性质具体的成交价格可能因会员使用优惠券、积分等发生变化,最终以订单结算价格为准。
|
|
</view>
|
|
<view class="f-24" style="color: #CCBF66;">·若商家针对划线价格进行说明,以商家的表述为准。</view>
|
|
</view>
|
|
<!-- <view class="goods-footer-crted">
|
|
<view class="go-buy-crted" @click="converlink()">
|
|
<text class="f-28 col-f">立即兑换</text>
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
</view>
|
|
</view> -->
|
|
<!-- 底部菜单 -->
|
|
<view class="goods-footer dis-flex flex-dir-row flex-y-center border-line border-top" :style="{ 'padding-bottom': isPadding ? '20px' : '','z-index':getTipShow || istag?'9998':'999' }">
|
|
<view class="dis-flex flex-y-center" style="width: 50%;">
|
|
<view class="goods-footer-item dis-flex flex-dir-column flex-x-center p-r" @click="footerNav('home')">
|
|
<button class="btn-normal report-btn" form-type="submit" style="overflow: hidden;"></button>
|
|
<image :src="imgfixUrls + 'goods/home.png'"></image>
|
|
<view class="goods-footer-item-text">首页</view>
|
|
</view>
|
|
<view class="goods-footer-item dis-flex flex-dir-column flex-x-center p-r" @click="footerNav('order')">
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
<image :src="imgfixUrls + 'goods/flow.png'"></image>
|
|
<view class="goods-footer-item-text">订单</view>
|
|
</view>
|
|
<view class="goods-footer-item dis-flex flex-dir-column flex-x-center" @click="footerNav('user')">
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
<image :src="imgfixUrls + 'goods/my.png'"></image>
|
|
<view class="goods-footer-item-text">我的</view>
|
|
</view>
|
|
|
|
<!-- <view class="advfei" v-if="dataInfo.dis_assistant.tipflag == 1 && tipflag == true && TextSubstitution.fxstext">
|
|
<view class="iconfont icon-roundclose" style="font-size: 40upx;color: #FFFFFF;font-weight: 700;flex: 0.1;line-height: 70upx;"
|
|
@click="closeadv">
|
|
|
|
</view>
|
|
<view class="col-f t-l" style="flex: 0.6;padding-left: 10upx;">
|
|
<text class="f-28">加入{{TextSubstitution.fxstext}},一起赚更多</text><br />
|
|
<text class="f-24">此商品,分享赚¥{{dataInfo.dis_assistant.max_commission}}</text>
|
|
</view>
|
|
<view style="background-color: #FFC3C2;color: #B90C1F;width: 200upx;height: 70upx;line-height: 70upx;font-size: 28upx;border-radius: 10upx;flex: 0.3;"
|
|
@click="gohomefxs">
|
|
立即加入
|
|
</view>
|
|
</view> -->
|
|
|
|
</view>
|
|
<block >
|
|
<block>
|
|
<view class="group-go-buy dis-flex" @click="onToggleTrade(dataInfo['sales_status'], dataInfo)">
|
|
<view style="border-radius: 60upx;" class=" dis-flex flex-dir-column flex-y-center flex-x-center p-r flex-box star-go-buy">
|
|
<text class="f-28 col-f">立即兑换</text>
|
|
<button class="btn-normal report-btn" form-type="submit"></button>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
|
|
</view>
|
|
</block>
|
|
</view>
|
|
<!-- 音乐 -->
|
|
<view class="audio-main" @click="playAudio" v-if="!!dataInfo.bgmusic">
|
|
<view class="audio-bg" :class="{'stop-audio':!play_Audio}">
|
|
<view class="audio-gif" :style="{'background-image':'url('+imageRoot+'musicgif.gif)'}">
|
|
<view class="audio-png" :style="{'background-image':'url('+imageRoot+'music.png)'}"></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 分享 -->
|
|
<!-- #ifdef H5 -->
|
|
<view class="masking" v-if="isShare" @click="isOpenShare">
|
|
<image :src="imageRoot + 'share.png'" class="to-share" mode="widthFix"></image>
|
|
</view>
|
|
<!-- #endif -->
|
|
<!-- 购买菜单 -->
|
|
<block v-if="goodsType !== '1integral'">
|
|
<GoodsBuyMenu ref="goodsBuyMenu" @submit="goodsSubmit" :goods-detail="dataInfo" :goods-spec="specData"
|
|
:group-buy-type="group_buy_type"></GoodsBuyMenu>
|
|
</block>
|
|
|
|
<follow :followShow="followShow" :followType="followType" :followTitleShow="followTitleShow" @clickmask="openQrShow"
|
|
@closeFollowPop="closeFollowPop" @closeFollowTitle="closeFollowTitle" :shareId="shareId"></follow>
|
|
<share-bottom :shareBottomShow="popOpenShare" :postType="dataInfo.postertype" :postId="dataInfo.id" @shareImgShow="shareImgShow"
|
|
@clickmask="clearPopShare" :shareShow="popShareImage" @closeShareShow="onImgShow"></share-bottom>
|
|
|
|
<PopManager :show="wfShow">
|
|
<view class="wfView">
|
|
<view class="wfViewMain">
|
|
<view class="wfTitle" style="position: relative;">
|
|
<image :src="wfBack" class="wfTitleImage"></image>
|
|
<view class="wfViewClose" style="position: absolute;right: 20upx;top: -60upx;" @click="wfShow = false">
|
|
<image :src="imgfixUrls + 'merchant/close.png'" class="closeImg"></image>
|
|
</view>
|
|
</view>
|
|
<view class="wfBody">
|
|
<view class="wfBodyPackage" v-if="!!dataInfo.barset && !dataInfo.barset.playdetail">
|
|
<text class="wfBodyText">
|
|
1、活动期间消费者可邀请好友帮忙砍价,好友砍到底价{{
|
|
dataInfo.vipstatus == '1' && dataInfo.is_vip != '0' ? '¥' + dataInfo.vipprice : '¥' + dataInfo.price
|
|
}}后,即可按{{ dataInfo.vipstatus == '1' && dataInfo.is_vip != '0' ? '¥' + dataInfo.vipprice : '¥' + dataInfo.price }}购买商品;
|
|
</text><br />
|
|
<text class="wfBodyText">
|
|
2、好友帮忙砍到底价{{
|
|
dataInfo.vipstatus == '1' && dataInfo.is_vip != '0' ? '¥' + dataInfo.vipprice : '¥' + dataInfo.price
|
|
}}后,消费者需要在有效期内购买砍价商品,逾期商品将恢复市场价;
|
|
</text><br />
|
|
<text class="wfBodyText">3、同一商品,同一用户仅可享受一次优惠价格;</text><br />
|
|
<text class="wfBodyText">4、同一商品,同一用户仅能帮好友砍价一次;</text><br />
|
|
<text class="wfBodyText">5、砍价商品数量有限,商品售罄后,商品将无法购买,即使你已经成功发起砍价;</text><br />
|
|
<text class="wfBodyText">6、本活动解释权在法律范围内归{{ TextSubstitution.sysname }}所有。</text><br />
|
|
</view>
|
|
<view class="wfBodyPackage" v-else>
|
|
<textarea value="" disabled :auto-height="true" class="textarea" v-model="!!dataInfo.barset && dataInfo.barset.playdetail" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</PopManager>
|
|
<PopManager :show="getTipShow" :type="getTipType" @clickmask='closegetTip'>
|
|
<view class="getTip">
|
|
<view class="getTip_package">
|
|
<view class="getTip_title">购买须知
|
|
<text class="iconfont icon-roundclose" style="float: right;font-size: 40upx;color: #999999;" @click="closegetTip"></text>
|
|
</view>
|
|
<scroll-view class="getTip_main" :scroll-x="false" scroll-y>
|
|
<jyf-parser domain="https://6874-html-foe72-1259071903.tcb.qcloud.la" gesture-zoom lazy-load ref="article"
|
|
selectable show-with-animation use-anchor :html="dataInfo.describe"></jyf-parser>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
<view class="popFull"></view>
|
|
</PopManager>
|
|
<!-- 查看tag详情 -->
|
|
<PopManager :show="istag" :type="'bottom'" @clickmask="changeIstag">
|
|
<view class="b-f" style="width: 92vw;border-radius: 30upx 30upx 0upx 0upx;padding: 30upx;padding-bottom: 100upx;">
|
|
<view class="f-30 f-w">
|
|
商品标签
|
|
<text class="iconfont icon-roundclose" style="float: right;color: #999999;font-size: 40upx;" @click="changeIstag"></text>
|
|
</view>
|
|
<view style="padding: 30upx 0;height: 650upx;overflow: auto;">
|
|
<view style="padding-bottom: 20upx;" v-for="(tag,index) in dataInfo.tagslist" :key="index">
|
|
<view style="flex: 0.2;">
|
|
<view class="t-c f-26 dis-il-block" style="padding: 5upx 20upx;color: #FF4444;border: 1upx solid pink;border-radius: 8upx;">
|
|
{{tag.title}}
|
|
</view>
|
|
</view>
|
|
<view v-if="tag.content" style="flex: 0.8;">
|
|
<view class="t-l f-26 dis-il-block" style="padding: 0upx 0upx;color: #6f6f6f;border: 1upx solid #FFFFFF;line-height: 38upx;height: 38upx;border-radius: 5upx;">
|
|
{{tag.content}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</PopManager>
|
|
<far-bottom></far-bottom>
|
|
<PhoneMask :show1="show1" @clickmask1="closePop1"></PhoneMask>
|
|
<getvxphone :show="vxshow" @showFalse="showFalse"></getvxphone>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import App from "@/common/js/app.js"
|
|
import Map from '@/common/js/ms-openMap/openMap.js'
|
|
import recommendGoods from '@/components/page/pageComponents/Recommend_goods.vue';
|
|
import goodsHeaderTitle from '@/components/template/goodsHeaderTitle.vue';
|
|
import loading from '@/components/template/loadlogo';
|
|
import GoodsBuyMenu from '@/components/template/GoodsBuyMenu.vue';
|
|
import PartLoading from '@/components/template/PartLoading.vue';
|
|
import follow from '@/components/template/follow.vue';
|
|
import shareBottom from '@/components/template/shareBottom.vue';
|
|
import PopManager from '@/components/template/PopManager';
|
|
import jyfParser from '@/components/jyf-parser/jyf-parser.vue';
|
|
import PhoneMask from '@/components/template/PhoneMask';
|
|
import getvxphone from '@/components/template/getVXphone.vue'
|
|
// #ifdef H5
|
|
import wxApi from '@/common/js/wxApi.js';
|
|
|
|
// #endif
|
|
let setEndTime = null,
|
|
successTimer = null,
|
|
indexTimer = null,
|
|
setTimer = null,
|
|
videoContext = null,
|
|
groupTimer = null,
|
|
innerAudioContext = uni.createInnerAudioContext();
|
|
export default {
|
|
components: {
|
|
PopManager,
|
|
follow,
|
|
goodsHeaderTitle,
|
|
recommendGoods,
|
|
loading,
|
|
GoodsBuyMenu,
|
|
PartLoading,
|
|
shareBottom,
|
|
PhoneMask,
|
|
jyfParser,
|
|
getvxphone
|
|
},
|
|
data() {
|
|
return {
|
|
show1: false,
|
|
optionstatus:null,
|
|
shareId: null,
|
|
getTipType: 'bottom',
|
|
getTipShow: false,
|
|
TextSubstitution: null,
|
|
followTitleShow: true,
|
|
strings: {
|
|
strings:''
|
|
},
|
|
nodes: '',
|
|
followShow: false,
|
|
followType: '0',
|
|
wfShow: false,
|
|
goods_id: null, //商品id
|
|
goodsType: null, //商品类型
|
|
goods_num: 1, // 商品数量
|
|
goods_sku_id: "", // 规格id
|
|
dataInfo: {}, //商品详情信息
|
|
specData: [], //规格
|
|
group_buy_type: null, //是否购买拼团商品
|
|
showCommunity: false, //社群显示开关
|
|
detailType: 'detail',
|
|
buystatus: null, // 判断拼团 单独购买或参团
|
|
InfoTabBar: [{
|
|
title: '购买须知',
|
|
tabBarType: 'notice'
|
|
},
|
|
{
|
|
title: '商品详情',
|
|
tabBarType: 'detail'
|
|
},
|
|
{
|
|
title: '客户评价',
|
|
tabBarType: 'comment'
|
|
}
|
|
],
|
|
barrageList: [], //弹幕数据
|
|
showTips: false, //显示弹幕
|
|
tipsIndex: 0,
|
|
loadlogo: true, //加载动画
|
|
isShare: false, //分享遮罩
|
|
halfcardtext: null,
|
|
tipflag:true,
|
|
countDown: {},
|
|
duurUrl:'',
|
|
bannerHeightList: [],
|
|
currentBannerHeight: 0,
|
|
isPadding: null,
|
|
popOpenShare: false,
|
|
popShareImage: false,
|
|
play_Audio: false,
|
|
num:0,
|
|
vxshow:false,
|
|
recommendGoodlength:1,
|
|
ratio:0,
|
|
getnum:1,
|
|
istag:false,
|
|
freeofcharge:true,
|
|
imgstyle:{},
|
|
tagStyle:{
|
|
table: 'border-collapse:collapse;border-top:1px solid gray;border-left:1px solid gray;',
|
|
th: 'border-right:1px solid gray;border-bottom:1px solid gray;background-color: #ffffff;font-size: 10px;',
|
|
td: 'border-right:1px solid gray;border-bottom:1px solid gray;background-color: #f8f8f8;font-size: 10px;'
|
|
},
|
|
onTogglenum:1,
|
|
ifimg:true
|
|
}
|
|
},
|
|
onLoad(e) {
|
|
console.log(e,'无敌');
|
|
innerAudioContext.src = '';
|
|
videoContext = uni.createVideoContext('shopVideo', this);
|
|
let _this = this,
|
|
goods_id = e.goods_id || e.id || '23',
|
|
goodsType = e.goodsType || e.type ||'3',
|
|
shareId = e.id || e.goods_id,
|
|
followType = e.goodsType=='integral'?'13':e.goodsType?e.goodsType:e.type?e.type:'3';
|
|
_this.setData({
|
|
goods_id,
|
|
goodsType,
|
|
shareId,
|
|
followType
|
|
});
|
|
_this.imgstyle = uni.getStorageSync('imgstyle');
|
|
_this.getText();
|
|
// if()
|
|
// #ifdef H5
|
|
wxApi.wxRegister();
|
|
// #endif
|
|
// _this.requestShareInfo(goods_id, goodsType)
|
|
if (goodsType === 'integral') {
|
|
// _this.getinteGoodsDetail(goods_id);
|
|
// this.getGoodsDetail(goods_id, goodsType);
|
|
}
|
|
|
|
_this.tabisPadbtm();
|
|
_this.bannerHeightList[0] = 0;
|
|
// this.getGoodsDetail(goods_id, goodsType);
|
|
// #ifdef H5
|
|
// this.requestShareInfo()
|
|
// #endif
|
|
|
|
},
|
|
computed: {
|
|
clienType() {
|
|
return App.getClientType()
|
|
},
|
|
imgfixUrls() {
|
|
return uni.getStorageSync('imgPrefix');
|
|
},
|
|
wfBack() {
|
|
return this.imageRoot + 'wfBack.png';
|
|
}
|
|
},
|
|
watch:{
|
|
ifimg(val){
|
|
if(!val){
|
|
setTimeout(()=>{
|
|
videoContext.play();
|
|
})
|
|
|
|
}
|
|
}
|
|
},
|
|
onShow() {
|
|
this.getGoodsDetail(this.goods_id, this.goodsType);
|
|
},
|
|
methods: {
|
|
getText(){
|
|
let _this = this;
|
|
uni.getStorage({
|
|
key: 'TextSubstitution',
|
|
success: function(res) {
|
|
_this.TextSubstitution = res.data
|
|
_this.halfcardtext = res.datahalfcardtext
|
|
}
|
|
});
|
|
if(!_this.TextSubstitution){
|
|
setTimeout(()=>{
|
|
_this.getText()
|
|
},500)
|
|
}
|
|
},
|
|
imgtap(e){
|
|
|
|
return
|
|
},
|
|
copy(value){
|
|
//#ifdef H5
|
|
App.clipboard(value);
|
|
//#endif
|
|
uni.setClipboardData({
|
|
data: value
|
|
});
|
|
uni.showToast({
|
|
title:'商品名已复制到粘贴板',
|
|
icon:'none'
|
|
})
|
|
},
|
|
looktag(){
|
|
this.istag = true;
|
|
},
|
|
changeIstag(){
|
|
this.istag = false;
|
|
},
|
|
goladur(url){
|
|
// this.duurUrl = url;
|
|
// url = encodeURIComponent(url);
|
|
// App.navigationTo({
|
|
// url: `pages/subPages/webview/webview?urlsrc=${url}`
|
|
// })
|
|
// #ifdef H5
|
|
let locations = window.location.href;
|
|
let urls = url + '&backurl=' + encodeURIComponent(locations);
|
|
console.log(urls);
|
|
location.href = urls;
|
|
//#endif
|
|
//#ifndef H5
|
|
let pages = getCurrentPages();
|
|
let pageObj = pages[pages.length - 1];
|
|
let wxurl = pageObj.route + '?aid=' + pageObj.options.aid + '&i=' + pageObj.options.i + '&id=' + pageObj.options.id + '&type=' + pageObj.options.type;
|
|
let urls = url + '&backurl=' + wxurl;
|
|
console.log(pageObj.options);
|
|
uni.navigateTo({
|
|
url: `/pages/subPages/webview/webview?urlsrc=${encodeURIComponent(urls)}`
|
|
})
|
|
//#endif
|
|
|
|
// uni.redirectTo({
|
|
// url: `/pages/subPages/webview/webview?urlsrc=${url}`
|
|
// });
|
|
},
|
|
gohomefxs(){
|
|
App.navigationTo({
|
|
url: "pages/subPages/dealer/index/index"
|
|
})
|
|
},
|
|
closeadv(){
|
|
this.tipflag = false;
|
|
},
|
|
parseImgload(e){
|
|
// console.log('parseImgload')
|
|
|
|
|
|
// this.loadlogo = false;
|
|
|
|
},
|
|
parseLoad(e){
|
|
console.log('parseLoad');
|
|
// uni.showToast({
|
|
// title:'富文本加载完成'
|
|
// })
|
|
},
|
|
lookimg(imgList,index){
|
|
console.log(imgList,index);
|
|
uni.previewImage({
|
|
current: index,
|
|
urls: imgList
|
|
})
|
|
},
|
|
recommendGoodNoOff(res){
|
|
console.log(res.length);
|
|
this.recommendGoodlength = res.length;
|
|
},
|
|
showFalse(){
|
|
console.log('进了showfalse')
|
|
this.vxshow = false;
|
|
},
|
|
closePop1() {
|
|
let _this = this;
|
|
_this.show1 = false;
|
|
},
|
|
closegetTip() {
|
|
let _this = this
|
|
_this.getTipShow = false
|
|
},
|
|
// 联系商家
|
|
goLt() {
|
|
let _this = this
|
|
// App.navigationTo({
|
|
// url: "pages/subPages/homepage/chat/chat?other_party_id=" + _this.dataInfo.sid + '&other_party_type=2' +
|
|
// '&type=1'
|
|
// })
|
|
let getSetInfo = uni.getStorageSync('getSetInfo');
|
|
if(getSetInfo.type == 1){
|
|
App.navigationTo({
|
|
url: 'pagesA/instantMessenger/instantMessenger?other_party_id=' + _this.dataInfo.sid + '&other_party_type=' + 2+ '&type=1' + '&id='
|
|
})
|
|
}else{
|
|
App.navigationTo({
|
|
url: 'pages/subPages/homepage/chat/chat?other_party_id=' + _this.dataInfo.sid + '&other_party_type=' + 2+ '&type=1' + '&id='
|
|
})
|
|
}
|
|
},
|
|
// 获取积分详情数据
|
|
getinteGoodsDetail(goods_id) {
|
|
let _this = this;
|
|
App._post_form('&p=consumption&do=detail', {
|
|
id: goods_id,
|
|
}, res => {
|
|
_this.setData({
|
|
dataInfo: res.data,
|
|
});
|
|
successTimer = setTimeout(() => {
|
|
_this.setSuccessBarrage(goods_id, 8);
|
|
}, 5000);
|
|
if(_this.dataInfo.videourl){
|
|
_this.ifimg = false;
|
|
return
|
|
}else if(_this.dataInfo.logo || _this.dataInfo.thumbs.length > 0){
|
|
_this.ifimg = true;
|
|
|
|
}
|
|
}, false, () => {
|
|
_this.loadlogo = false;
|
|
})
|
|
},
|
|
//跳转商品评论页面
|
|
// commentList(){
|
|
// uni.navigateTo({
|
|
// url:'/pages/subPages/commentList/commentList?goods_id=' + this.goods_id + '&goodsType=' + this.goodsType
|
|
// })
|
|
// },
|
|
// 获取商品详情数据
|
|
getGoodsDetail(goods_id, goodsType) {
|
|
let _this = this,
|
|
getUserInfo = uni.getStorageSync('userinfo'),
|
|
requestData = {
|
|
id: goods_id,
|
|
type: (goodsType == 'integral')?'8':goodsType,
|
|
head_id: App.siteInfo.head_id || getUserInfo.mid || ""
|
|
};
|
|
|
|
|
|
App._post_form('&p=goods&do=getGoodsDetail', requestData, (result) => {
|
|
_this.optionstatus = result.data.optionstatus;
|
|
if(!!result.data.info_set){
|
|
_this.$set(_this.strings,'strings',result.data.info_set.use_info);
|
|
}
|
|
// _this.strings = result.data.info_set.use_info;
|
|
// if(_this.num == 0){
|
|
// _this.num++;
|
|
// }else{
|
|
// _this.num++;
|
|
// // uni.hideLoading();
|
|
// _this.loadlogo = false;
|
|
// // console.log('进来了,按道理要false');
|
|
// };
|
|
let dataobj = result.data;
|
|
// _this.setData({
|
|
// specData: result.data.spec.list
|
|
// });
|
|
// console.log(_this.specData);
|
|
if (!!dataobj['comment'] && !!dataobj['comment']['length'] > 0) {
|
|
dataobj.comment.forEach((val) => {
|
|
val.createtime = _this.$util.formatTime(val.createtime, 'rule', '-');
|
|
val.star = Number(val.star);
|
|
return val
|
|
})
|
|
};
|
|
dataobj.is_vip = Number(dataobj.is_vip);
|
|
let data = dataobj;
|
|
let specData = !!data.spec ? data.spec.list : null;
|
|
|
|
if (!!data.bgmusic) {
|
|
|
|
innerAudioContext.src = encodeURI(data.bgmusic);
|
|
setTimeout(() => {
|
|
|
|
//#ifndef H5
|
|
innerAudioContext.loop = true;
|
|
innerAudioContext.play();
|
|
this.playAudio();
|
|
//#endif
|
|
//#ifdef H5
|
|
jWeixin.ready(() => {
|
|
innerAudioContext.loop = true;
|
|
innerAudioContext.play();
|
|
this.playAudio();
|
|
});
|
|
//#endif
|
|
|
|
|
|
// _this.playAudio();
|
|
},1000);
|
|
}
|
|
// uni.$emit('getspecData',specData);
|
|
_this.setData({
|
|
dataInfo: data
|
|
});
|
|
if(_this.dataInfo.logo || _this.dataInfo.thumbs.length > 0){
|
|
_this.ifimg = true;
|
|
}else if(_this.dataInfo.videourl){
|
|
_this.ifimg = false;
|
|
}
|
|
//
|
|
_this.getnum++;
|
|
// this.$set(this.specData,specData);
|
|
// console.log(_this.$refs.goodsBuyMenu);
|
|
// setTimeout(()=>{
|
|
// _this.$refs.goodsBuyMenu.goodsSpec = specData;
|
|
// },1000)
|
|
|
|
|
|
if(!_this.dataInfo.detail){
|
|
_this.dataInfo.detail = '<span style="color:#999999;font-size: 13px;">暂无内容</span>';
|
|
}
|
|
if(!_this.dataInfo.describe){
|
|
_this.dataInfo.describe = '<span style="color:#999999;font-size: 13px;>暂无内容</span>';
|
|
}
|
|
uni.getSystemInfo({
|
|
success: function (res) {
|
|
console.log(res.windowWidth);
|
|
_this.ratio = res.windowWidth / _this.dataInfo.imgstyle.width;
|
|
}
|
|
});
|
|
_this.goodsEndTime(goodsType);
|
|
if (goodsType === '3') {
|
|
_this.groupListTime(data)
|
|
}
|
|
successTimer = setTimeout(() => {
|
|
_this.setSuccessBarrage(goods_id, goodsType);
|
|
}, 1000);
|
|
//
|
|
if(result.data.spec){
|
|
_this.specData = result.data.spec.list;
|
|
_this.onTogglenum = 1;
|
|
};
|
|
if(!!result.data.info_set ){
|
|
setTimeout(()=>{
|
|
_this.nodes = result.data.info_set.price_info;
|
|
|
|
});
|
|
}
|
|
if(_this.dataInfo.videourl){
|
|
_this.ifimg = false;
|
|
}
|
|
// return
|
|
}, false, () => {
|
|
_this.loadlogo = false;
|
|
_this.freeofcharge = true;
|
|
//#ifndef H5
|
|
// setTimeout(()=>{
|
|
// _this.loadlogo = false;
|
|
// },4000)
|
|
if(_this.num == 1){
|
|
// uni.showLoading({
|
|
// title:'加载中...',
|
|
// mask:true
|
|
// });
|
|
}
|
|
//#endif
|
|
// uni.hideLoading();
|
|
})
|
|
},
|
|
// 初始化商品数据
|
|
initGoodsDetailData(data) {
|
|
let _this = this;
|
|
if (!!data['comment'] && !!data['comment']['length'] > 0) {
|
|
data.comment.forEach((val) => {
|
|
val.createtime = _this.$util.formatTime(val.createtime, 'rule', '-');
|
|
val.star = Number(val.star);
|
|
return val
|
|
})
|
|
};
|
|
data.is_vip = Number(data.is_vip);
|
|
return data
|
|
},
|
|
/**
|
|
* 音乐
|
|
*/
|
|
playAudio() {
|
|
let _this = this,
|
|
play_Audio = _this.play_Audio ? false : true,
|
|
pageAudio = _this.dataInfo.music;
|
|
if (play_Audio) {
|
|
//#ifdef H5
|
|
jWeixin.ready(() => {
|
|
jWeixin.getLocation({
|
|
type: 'gcj02',
|
|
success: function(res) {
|
|
innerAudioContext.play();
|
|
}
|
|
});
|
|
});
|
|
//#endif
|
|
//#ifndef H5
|
|
innerAudioContext.play()
|
|
//#endif
|
|
innerAudioContext.onPlay(() => {
|
|
console.log('开始播放');
|
|
});
|
|
}
|
|
if (!play_Audio) {
|
|
innerAudioContext.pause()
|
|
innerAudioContext.onPause(() => {
|
|
console.log('暂停播放');
|
|
});
|
|
}
|
|
_this.play_Audio = play_Audio
|
|
},
|
|
/**
|
|
* 领取优惠券
|
|
*/
|
|
getCouponDicont(goodsStatus,dataInfo) {
|
|
let _this = this,
|
|
data = {
|
|
type: _this.goodsType,
|
|
id: _this.shareId
|
|
};
|
|
if(!_this.freeofcharge)return;
|
|
_this.freeofcharge = false;
|
|
console.log(dataInfo);
|
|
if (!!dataInfo && dataInfo.type === "1" && dataInfo.is_follow === 0 && dataInfo.status === "1") {
|
|
App._post_form('&p=rush&do=follow', {
|
|
id: dataInfo.id
|
|
}, res => {
|
|
if (res.errno === 0) {
|
|
console.log('1');
|
|
App.showSuccess(res.message, () => {
|
|
_this.$set(dataInfo, 'is_follow', 1);
|
|
_this.getover();
|
|
})
|
|
}
|
|
_this.freeofcharge = true;
|
|
})
|
|
return
|
|
} else {
|
|
App._post_form('&do=Follow', data, res => {
|
|
if (res.data.status == '1') {
|
|
_this.followShow = true;
|
|
console.log('2');
|
|
if (goodsType !== 'integral') {
|
|
this.getGoodsDetail(_this.goods_id, _this.goodsType);
|
|
}
|
|
// _this.getover();
|
|
} else {
|
|
if (dataInfo.is_describe_tip == '1' && _this.getTipShow == false) {
|
|
_this.getTipShow = true;
|
|
console.log('3');
|
|
_this.getover();
|
|
|
|
} else {
|
|
_this.getTipShow = false;
|
|
if (goodsStatus !== 2) return
|
|
console.info('goodsStatus', goodsStatus)
|
|
//关闭后重置规格数据
|
|
// this.groupsBuyMeuns(!this.showBuyMenu);
|
|
// this.showBuyMenu = !this.showBuyMenu;
|
|
// this.$refs.goodsBuyMenu.onToggleTrade();
|
|
_this.getover();
|
|
console.log('4');
|
|
};
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
},
|
|
getover(){
|
|
let _this = this,
|
|
requestData = {
|
|
id: _this.goods_id,
|
|
num: 1,
|
|
usestatus: 0,
|
|
plugin: "coupon"
|
|
};
|
|
uni.showLoading({});
|
|
uni.hideLoading();
|
|
App._post_form('&p=pay&do=createOrder', requestData, res => {
|
|
if (res.data.status === 0) {
|
|
let naviData = {
|
|
order_id: res.data.orderid,
|
|
plugin: "coupon",
|
|
id: res.data.recordid
|
|
};
|
|
_this.freeofcharge = true;
|
|
App.showSuccess('领取成功', () => {
|
|
App.navigationTo({
|
|
url: 'pages/subPages/coupon/couponDetails/couponDetails?' + App.urlEncode(naviData)
|
|
}, false, () => {})
|
|
})
|
|
}
|
|
},
|
|
fail => {
|
|
_this.freeofcharge = true;
|
|
if (fail.data.message == '未绑定手机号') {
|
|
//#ifdef H5
|
|
_this.show1 = true;
|
|
//#endif
|
|
//#ifndef H5
|
|
_this.vxshow = true;
|
|
//#endif
|
|
}
|
|
})
|
|
},
|
|
/**
|
|
* 跳转店铺详情
|
|
*/
|
|
naviStore(shopData) {
|
|
let _this = this,
|
|
urlData = {
|
|
sid: shopData.sid
|
|
};
|
|
App.navigationTo({
|
|
url: 'pages/mainPages/store/index?' + App.urlEncode(urlData)
|
|
})
|
|
},
|
|
/**
|
|
* 社群显示
|
|
*/
|
|
communityShow() {
|
|
this.showCommunity = !this.showCommunity;
|
|
},
|
|
// 拨号跟地址
|
|
supple(storeInfo, supType) {
|
|
let _this = this;
|
|
if (supType === "mobile") {
|
|
uni.makePhoneCall({
|
|
phoneNumber: storeInfo['mobile']
|
|
});
|
|
}
|
|
if (supType === "address") {
|
|
// #ifdef H5
|
|
console.log(storeInfo);
|
|
wxApi.WxopenLocation(
|
|
storeInfo['location']['lat'],
|
|
storeInfo['location']['lng'],
|
|
storeInfo['storename'],
|
|
storeInfo['address']
|
|
)
|
|
// #endif
|
|
// #ifdef MP-WEIXIN
|
|
App.openLocation(storeInfo)
|
|
// #endif
|
|
//#ifdef APP-PLUS
|
|
Map.openMap(Number(storeInfo['location']['lat']),Number(storeInfo['location']['lng']),storeInfo['storename'],'gcj02')
|
|
//#endif
|
|
}
|
|
},
|
|
/**
|
|
* 商品确认购买
|
|
* @param {Object} buyData 用户选择商品信息
|
|
*/
|
|
goodsSubmit(buyData) {
|
|
|
|
console.log("buyData", buyData);
|
|
if(buyData.status == '7'){
|
|
App.showError("商品已下架");
|
|
return
|
|
}
|
|
let {
|
|
btnType,
|
|
goods_num,
|
|
goods_sku_id,
|
|
buystatus
|
|
} = buyData;
|
|
this.goods_num = goods_num;
|
|
this.goods_sku_id = goods_sku_id;
|
|
this.buystatus = buystatus;
|
|
if (btnType === "confirm" && this.goodsType != 'integral') {
|
|
this.submit();
|
|
}else if(btnType === "confirm" && this.goodsType == 'integral'){
|
|
this.converlink()
|
|
}
|
|
},
|
|
/**
|
|
* 加入购物车and立即购买
|
|
*/
|
|
submit() {
|
|
let _this = this,
|
|
dataInfo = _this.dataInfo,
|
|
buy_limit = Number(dataInfo.buy_limit) || "",
|
|
user_limit_num = dataInfo.user_limit_num || "";
|
|
// group_buy_type = _this.group_buy_type;
|
|
//
|
|
if (buy_limit > 0 && user_limit_num <= 0) {
|
|
App.showError("购买数量已达上限");
|
|
return;
|
|
}
|
|
// 立即购买
|
|
App.navigationTo({
|
|
url: 'pages/subPages/submitOrder/submitOrder?' + App.urlEncode({
|
|
goods_id: _this.goods_id,
|
|
goods_num: _this.goods_num,
|
|
specid: _this.goods_sku_id || "",
|
|
plugin: dataInfo.type,
|
|
buystatus: _this.buystatus || ""
|
|
}),
|
|
success() {
|
|
// 关闭弹窗
|
|
_this.onToggleTrade();
|
|
}
|
|
});
|
|
_this.onToggleTrade();
|
|
},
|
|
|
|
posterShare() {
|
|
let _this = this;
|
|
_this.popOpenShare = true;
|
|
},
|
|
clearPopShare() {
|
|
let _this = this;
|
|
_this.popOpenShare = false;
|
|
},
|
|
shareImgShow(data) {
|
|
let _this = this;
|
|
//#ifdef H5
|
|
_this.popOpenShare = false;
|
|
_this.popShareImage = true;
|
|
//#endif
|
|
//#ifdef APP-PLUS
|
|
uni.share({
|
|
provider: "weixin",
|
|
scene: "WXSceneSession",
|
|
type: 0,
|
|
href: 'https://image.baidu.com/search/index?tn=baiduimage&ipn=r&ct=201326592&cl=2&lm=-1&st=-1&fm=result&fr=&sf=1&fmq=1624417903682_R&pv=&ic=&nc=1&z=&hd=&latest=©right=&se=1&showtab=0&fb=0&width=&height=&face=0&istype=2&ie=utf-8&sid=&word=%E7%BE%8E%E5%A5%B3',
|
|
title: '测试分享',
|
|
summary: '测试分享测试分享测试分享测试分享测试分享测试分享测试分享测试分享',
|
|
imageUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.jj20.com%2Fup%2Fallimg%2F1114%2F0H120155P2%2F200H1155P2-8-1200.jpg&refer=http%3A%2F%2Fpic.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1627009532&t=5a1cd2d5f04d46cc9f2c6a713cb3790a',
|
|
success: function (res) {
|
|
console.log(JSON.stringify(res));
|
|
uni.showToast({
|
|
title: '已分享',
|
|
duration: 2000
|
|
});
|
|
},
|
|
|
|
fail: function (err) {
|
|
|
|
var errrr = JSON.stringify(err);
|
|
if(errrr){
|
|
uni.showModal({
|
|
title: '表单不能留空',
|
|
content: '请完善所有信息再发起分享',
|
|
success: function (res) {
|
|
if (res.confirm) {
|
|
console.log('用户点击确定');
|
|
} else if (res.cancel) {
|
|
console.log('用户点击取消');
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
//#endif
|
|
},
|
|
onImgShow() {
|
|
this.popShareImage = false;
|
|
},
|
|
/**
|
|
* 底部菜单按钮跳转
|
|
*/
|
|
footerNav(type) {
|
|
let url = "";
|
|
if (type === "home") {
|
|
url = "pages/mainPages/index/index";
|
|
App.navigationTo({
|
|
url: url,
|
|
navType: 'reLaunch'
|
|
});
|
|
return;
|
|
} else if (type === "order") {
|
|
url = "pages/subPages/orderList/orderList";
|
|
App.navigationTo({
|
|
url: url
|
|
});
|
|
return;
|
|
} else if (type === "user") {
|
|
url = "pages/mainPages/userCenter/userCenter";
|
|
App.navigationTo({
|
|
url: url,
|
|
navType: 'reLaunch'
|
|
});
|
|
return;
|
|
}
|
|
},
|
|
/**
|
|
* 跳转会员卡
|
|
*/
|
|
member() {
|
|
let url = 'pages/mainPages/memberCard/getMembership/getMembership';
|
|
App.navigationTo({
|
|
url: url
|
|
});
|
|
},
|
|
/**
|
|
* 商品详情显示切换
|
|
*/
|
|
detailTypeChange(type) {
|
|
this.detailType = type;
|
|
console.log(type);
|
|
},
|
|
/**
|
|
* 商品倒计时
|
|
*/
|
|
goodsEndTime(goodsType) {
|
|
let _this = this,
|
|
dataInfo = _this.dataInfo,
|
|
// 开始时间
|
|
startTime = Number(dataInfo.starttime * 1000),
|
|
// 截止时间
|
|
endTime = Number(dataInfo.endtime) * 1000;
|
|
// 抢购\拼团\砍价倒计时
|
|
if (goodsType === '1' || goodsType === '3' || goodsType === '7') {
|
|
clearInterval(setEndTime);
|
|
setEndTime = setInterval(() => {
|
|
let nowTime = new Date().getTime(),
|
|
// 距离结束时间
|
|
leftTime = parseInt((endTime - nowTime) / 1000),
|
|
// 距离开始时间
|
|
rightTime = parseInt((startTime - nowTime) / 1000),
|
|
// 每个商品活动时间
|
|
timeobj = {},
|
|
callback = function(dataTime) {
|
|
let oo = parseInt(dataTime / 60 / 60 / 24 * 24),
|
|
tt = parseInt(oo / 24),
|
|
hh = oo - tt*24,
|
|
mm = parseInt(dataTime / 60 % 60),
|
|
ss = parseInt(dataTime % 60),
|
|
timeobj = {
|
|
tt: tt < 10 ? `0${tt}` : tt,
|
|
hh: hh < 10 ? `0${hh}` : hh,
|
|
mm: mm < 10 ? `0${mm}` : mm,
|
|
ss: ss < 10 ? `0${ss}` : ss
|
|
};
|
|
_this.$set(_this.countDown, 'timeobj', timeobj)
|
|
// _this.dataInfo.stateTime = timeType === 'left' ? 1 : 2;
|
|
};
|
|
if (leftTime > 0 && rightTime <= 0) {
|
|
if (nowTime > startTime && nowTime < endTime) {
|
|
callback(leftTime, 'left')
|
|
// let hh = parseInt(leftTime / 60 / 60 / 24 * 24),
|
|
// mm = parseInt(leftTime / 60 % 60),
|
|
// ss = parseInt(leftTime % 60),
|
|
let timeType = 'left';
|
|
// timeobj = {
|
|
// hh: hh < 10 ? `0${hh}` : hh,
|
|
// mm: mm < 10 ? `0${mm}` : mm,
|
|
// ss: ss < 10 ? `0${ss}` : ss
|
|
// };
|
|
let oo = parseInt(leftTime / 60 / 60 / 24 * 24),
|
|
tt = parseInt(oo / 24),
|
|
hh = oo - tt*24,
|
|
mm = parseInt(leftTime / 60 % 60),
|
|
ss = parseInt(leftTime % 60),
|
|
timeobj = {
|
|
tt: tt < 10 ? `0${tt}` : tt,
|
|
hh: hh < 10 ? `0${hh}` : hh,
|
|
mm: mm < 10 ? `0${mm}` : mm,
|
|
ss: ss < 10 ? `0${ss}` : ss
|
|
};
|
|
_this.$set(_this.countDown, 'timeobj', timeobj)
|
|
_this.dataInfo.stateTime = timeType === 'left' ? 1 : 2;
|
|
}
|
|
} else if (rightTime > 0 && leftTime > 0) {
|
|
if (startTime > nowTime && nowTime < endTime) {
|
|
// callback(rightTime, 'right')
|
|
// let hh = parseInt(rightTime / 60 / 60 / 24 * 24),
|
|
// mm = parseInt(rightTime / 60 % 60),
|
|
// ss = parseInt(rightTime % 60),
|
|
let timeType = 'right';
|
|
// timeobj = {
|
|
// hh: hh < 10 ? `0${hh}` : hh,
|
|
// mm: mm < 10 ? `0${mm}` : mm,
|
|
// ss: ss < 10 ? `0${ss}` : ss
|
|
// };
|
|
let oo = parseInt(rightTime / 60 / 60 / 24 * 24),
|
|
tt = parseInt(oo / 24),
|
|
hh = oo - tt*24,
|
|
mm = parseInt(rightTime / 60 % 60),
|
|
ss = parseInt(rightTime % 60),
|
|
timeobj = {
|
|
tt: tt < 10 ? `0${tt}` : tt,
|
|
hh: hh < 10 ? `0${hh}` : hh,
|
|
mm: mm < 10 ? `0${mm}` : mm,
|
|
ss: ss < 10 ? `0${ss}` : ss
|
|
};
|
|
_this.$set(_this.countDown, 'timeobj', timeobj)
|
|
_this.dataInfo.stateTime = timeType === 'left' ? 1 : 2;
|
|
}
|
|
} else {
|
|
_this.dataInfo.isTimeOver = true;
|
|
_this.dataInfo.stateTime = 1;
|
|
clearInterval(setEndTime);
|
|
return false
|
|
}
|
|
}, 1000);
|
|
}
|
|
},
|
|
/**
|
|
* 发起砍价
|
|
*/
|
|
sorbargin(barginStatus,statics) {
|
|
let _this = this;
|
|
if(statics == 0){
|
|
return
|
|
}
|
|
if (!!barginStatus && Number(barginStatus) > 0) {
|
|
console.log(Number(_this.dataInfo['imgstyle'].width) * _this.ratio + 'px','宽高')
|
|
App.navigationTo({
|
|
url: 'pages/subPages/bargin/barginDetail/barginDetail?bargin_id=' + barginStatus + '&width=' + (Number(_this.dataInfo['imgstyle'].width) * _this.ratio + 'px') + '&height=' + (Number(_this.dataInfo['imgstyle'].height) * _this.ratio + 'px')
|
|
})
|
|
} else {
|
|
let data = {
|
|
type: _this.goodsType,
|
|
id: _this.shareId
|
|
};
|
|
App._post_form('&do=Follow', data, res => {
|
|
if (res.data.status == '1') {
|
|
_this.followShow = true
|
|
} else {
|
|
if (_this.dataInfo.is_describe_tip == '1' && _this.getTipShow == false) {
|
|
_this.getTipShow = true
|
|
} else {
|
|
_this.getTipShow = false;
|
|
uni.showModal({
|
|
title: '砍价活动',
|
|
content: '是否参与该商品砍价',
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
uni.showLoading({})
|
|
uni.hideLoading()
|
|
App._post_form('&p=bargain&do=launchBargain', {
|
|
id: _this.goods_id
|
|
}, res => {
|
|
if (!!res.data) {
|
|
App.navigationTo({
|
|
url: 'pages/subPages/bargin/barginDetail/barginDetail?bargin_id=' + res.data.id + '&width=' + (Number(_this.dataInfo['imgstyle'].width) * _this.ratio + 'px') + '&height=' + (Number(_this.dataInfo['imgstyle'].height) * _this.ratio + 'px')
|
|
})
|
|
}
|
|
},
|
|
fail => {
|
|
|
|
if (fail.data.message == '未绑定手机号') {
|
|
_this.show1 = true;
|
|
|
|
}
|
|
})
|
|
}
|
|
}
|
|
})
|
|
}
|
|
}
|
|
});
|
|
}
|
|
},
|
|
/**
|
|
* 拼团列表倒计时
|
|
*/
|
|
groupListTime(dataInfo) {
|
|
let _this = this,
|
|
groupList = dataInfo.group_list;
|
|
groupList.map((val, index) => {
|
|
val.isEndTime = false;
|
|
val.failtime = Number(val.failtime * 1000);
|
|
groupTimer = setInterval(() => {
|
|
let nowTime = new Date().getTime(),
|
|
// 距离结束时间
|
|
leftTime = parseInt((val.failtime - nowTime) / 1000),
|
|
// 每个商品活动时间
|
|
timeobj = {};
|
|
if (leftTime > 0 && nowTime < val.failtime) {
|
|
// let hh = parseInt(leftTime / 60 / 60 / 24 * 24),
|
|
// mm = parseInt(leftTime / 60 % 60),
|
|
// ss = parseInt(leftTime % 60),
|
|
// timeobj = {
|
|
// hh: hh < 10 ? `0${hh}` : hh,
|
|
// mm: mm < 10 ? `0${mm}` : mm,
|
|
// ss: ss < 10 ? `0${ss}` : ss
|
|
// };
|
|
let oo = parseInt(leftTime / 60 / 60 / 24 * 24),
|
|
tt = parseInt(oo / 24),
|
|
hh = oo - tt*24,
|
|
mm = parseInt(leftTime / 60 % 60),
|
|
ss = parseInt(leftTime % 60),
|
|
timeobj = {
|
|
tt: tt < 10 ? `0${tt}` : tt,
|
|
hh: hh < 10 ? `0${hh}` : hh,
|
|
mm: mm < 10 ? `0${mm}` : mm,
|
|
ss: ss < 10 ? `0${ss}` : ss
|
|
};
|
|
_this.$set(val, 'groupTime', timeobj);
|
|
} else {
|
|
timeobj = {
|
|
hh: '00',
|
|
mm: '00',
|
|
ss: '00'
|
|
};
|
|
_this.$set(val, 'groupTime', timeobj);
|
|
_this.$set(val, 'isEndTime', true);
|
|
}
|
|
}, 1000)
|
|
return val
|
|
});
|
|
},
|
|
//拼团列表参团
|
|
navbargin(groupItem) {
|
|
console.log(groupItem)
|
|
if (groupItem['isEndTime']) return;
|
|
App.navigationTo({
|
|
url: 'pages/subPages/group/assemble/assemble?' + App.urlEncode({
|
|
id: this.goods_id,
|
|
group_id: groupItem.id
|
|
})
|
|
});
|
|
},
|
|
// 分享
|
|
isOpenShare() {
|
|
this.isShare = !this.isShare
|
|
},
|
|
/**
|
|
* 获取弹幕数据
|
|
*/
|
|
getBarrageData(goods_id, goodsType) {
|
|
return new Promise((reslove, reject) => {
|
|
App._post_form("&do=payBarrageList", {
|
|
id: goods_id,
|
|
type: goodsType
|
|
}, (res) => {
|
|
reslove(res.data);
|
|
});
|
|
})
|
|
},
|
|
/**
|
|
* 判断是购买拼团商品
|
|
*/
|
|
isGroupToggleTrade(group_buy_type, dataInfo) {
|
|
if(group_buy_type !== 0){
|
|
this.group_buy_type = group_buy_type;
|
|
}
|
|
this.onToggleTrade(this.dataInfo.sales_status, dataInfo);
|
|
},
|
|
/**
|
|
* 设置购买弹幕
|
|
*/
|
|
setSuccessBarrage(goods_id, goodsType) {
|
|
let _this = this,
|
|
tipsIndex = _this.tipsIndex,
|
|
barrageList = _this.barrageList;
|
|
if (tipsIndex == 0 && barrageList.length == 0) {
|
|
_this.getBarrageData(goods_id, goodsType).then(res => {
|
|
_this.tipsIndex = 0;
|
|
_this.barrageList = res;
|
|
res.length > 0 && _this.setSuccessBarrage(goods_id, goodsType);
|
|
})
|
|
} else {
|
|
// console.log(_this.tipsIndex,barrageList.length);
|
|
_this.showTips = true;
|
|
successTimer = setTimeout(() => {
|
|
_this.showTips = false;
|
|
setTimer = setTimeout(() => {
|
|
_this.tipsIndex++
|
|
if(_this.tipsIndex > barrageList.length){
|
|
_this.tipsIndex = 0;
|
|
}
|
|
}, 500);
|
|
indexTimer = setTimeout(() => {
|
|
_this.setSuccessBarrage(goods_id, goodsType);
|
|
}, 3000);
|
|
}, 5000);
|
|
}
|
|
},
|
|
closeFollowTitle() {
|
|
let _this = this
|
|
_this.followTitleShow = false
|
|
},
|
|
closeFollowPop() {
|
|
let _this = this
|
|
_this.followShow = false
|
|
},
|
|
openQrShow() {
|
|
let _this = this
|
|
_this.followShow = true
|
|
},
|
|
/**
|
|
* 购买菜单显示隐藏
|
|
*/
|
|
onToggleTrade(goodsStatus, dataInfo) {
|
|
let _this = this
|
|
let data = {
|
|
type: _this.goodsType=='integral'?'13': _this.goodsType,
|
|
id: _this.shareId || _this.goods_id
|
|
};
|
|
App._post_form('&p=member&do=userData', {}, res => {
|
|
console.log(res);
|
|
|
|
_this.istag = false;
|
|
console.log(dataInfo,_this.$refs.goodsBuyMenu);
|
|
if(dataInfo.status == '7' || dataInfo.status == '4'){
|
|
uni.showToast({
|
|
title:'当前商品已下架',
|
|
icon:'none'
|
|
});
|
|
return
|
|
};
|
|
_this.$refs.goodsBuyMenu.initBuyMeunData(dataInfo,_this.onTogglenum);
|
|
_this.onTogglenum++;
|
|
console.log(dataInfo);
|
|
|
|
if (!!dataInfo && dataInfo.type === "1" && dataInfo.is_follow === 0 && dataInfo.status === "1") {
|
|
|
|
App._post_form('&p=rush&do=follow', {
|
|
id: dataInfo.id
|
|
}, res => {
|
|
if (res.errno === 0) {
|
|
App.showSuccess(res.message, () => {
|
|
_this.$set(dataInfo, 'is_follow', 1)
|
|
})
|
|
}
|
|
})
|
|
|
|
// App.showSuccess(res.message, () => {
|
|
// _this.$set(dataInfo, 'is_follow', 1)
|
|
// })
|
|
|
|
return
|
|
}else{
|
|
if(!!dataInfo && dataInfo.type === "1" && dataInfo.is_follow === 1 && dataInfo.status === "1"){
|
|
App._post_form('&p=rush&do=follow', {
|
|
id: dataInfo.id
|
|
}, res => {
|
|
if (res.errno === 0) {
|
|
App.showSuccess(res.message, () => {
|
|
_this.$set(dataInfo, 'is_follow', 0)
|
|
})
|
|
}
|
|
})
|
|
}
|
|
//#ifdef H5
|
|
App._post_form('&do=Follow', data, res => {
|
|
if (res.data.status == '1') {
|
|
_this.followShow = true
|
|
} else {
|
|
if (dataInfo.is_describe_tip == '1' && _this.getTipShow == false) {
|
|
_this.getTipShow = true
|
|
|
|
} else {
|
|
_this.getTipShow = false;
|
|
console.info('goodsStatus', goodsStatus)
|
|
if (goodsStatus !== 2 && _this.goodsType !== 'integral') return
|
|
|
|
//关闭后重置规格数据
|
|
// this.groupsBuyMeuns(!this.showBuyMenu);
|
|
// this.showBuyMenu = !this.showBuyMenu;
|
|
|
|
this.$refs.goodsBuyMenu.onToggleTrade();
|
|
}
|
|
}
|
|
});
|
|
//#endif
|
|
//#ifndef H5
|
|
|
|
// App._post_form('&do=Follow', data, res => {
|
|
// if (res.data.status == '1') {
|
|
// _this.followShow = true
|
|
// } else {
|
|
if (dataInfo.is_describe_tip == '1' && _this.getTipShow == false) {
|
|
_this.getTipShow = true
|
|
|
|
} else {
|
|
console.info('goodsStatus', goodsStatus)
|
|
// debugger
|
|
_this.getTipShow = false;
|
|
if (goodsStatus !== 2 && _this.goodsType !== 'integral') return
|
|
|
|
//关闭后重置规格数据
|
|
// this.groupsBuyMeuns(!this.showBuyMenu);
|
|
// this.showBuyMenu = !this.showBuyMenu;
|
|
this.$refs.goodsBuyMenu.onToggleTrade();
|
|
}
|
|
// }
|
|
// });
|
|
//#endif
|
|
}
|
|
})
|
|
},
|
|
|
|
converlink(goodsData) {
|
|
let _this = this;
|
|
App.navigationTo({
|
|
url: 'pages/subPages/submitOrder/submitOrder?' + App.urlEncode({
|
|
goods_id: _this.goods_id,
|
|
goods_num: _this.goods_num,
|
|
specid: "",
|
|
plugin: "8",
|
|
buystatus: ""
|
|
})
|
|
});
|
|
},
|
|
saveCode(codeImage) {
|
|
let _this = this;
|
|
uni.getImageInfo({
|
|
src: codeImage,
|
|
success: function(res) {
|
|
if (res.errMsg === "getImageInfo:ok") {
|
|
uni.showLoading({})
|
|
uni.saveImageToPhotosAlbum({
|
|
filePath: res.path,
|
|
success: function() {
|
|
App.showSuccess('保存成功');
|
|
},
|
|
complete() {
|
|
uni.hideLoading()
|
|
}
|
|
});
|
|
}
|
|
}
|
|
})
|
|
},
|
|
// imageLoad(e) {
|
|
// //当图片载入完毕时
|
|
// let imgwidth = e.detail.width,
|
|
// imgheight = e.detail.height,
|
|
// //宽高比
|
|
// ratio = imgwidth / imgheight;
|
|
// // 计算的高度值
|
|
// let viewHeight = 750 / ratio,
|
|
// imgheightList = viewHeight,
|
|
// bannerHeightList = this.bannerHeightList;
|
|
// //把每一张图片的对应的高度记录到数组里
|
|
// bannerHeightList[e.target.dataset.id] = imgheightList;
|
|
// console.info('bannerHeightList', e.target.dataset.id)
|
|
// this.setData({
|
|
// bannerHeightList
|
|
// })
|
|
// },
|
|
bindchange(e) {
|
|
this.setData({
|
|
currentBannerHeight: e.detail.current
|
|
})
|
|
},
|
|
callPhone(phoneNumber) {
|
|
uni.makePhoneCall({
|
|
phoneNumber: phoneNumber
|
|
})
|
|
},
|
|
tabisPadbtm() {
|
|
let _this = this;
|
|
uni.getSystemInfo({
|
|
success(res) {
|
|
let model = res.model,
|
|
iphoneModel = ["iPhone10,3", "iPhone10,6", "iPhone11,8", "iPhone11,2", "iPhone11,6"];
|
|
_this.isPadding = iphoneModel.includes(model) || model.indexOf("iPhone X") !== -1 || model.indexOf("iPhone12") !==
|
|
-1;
|
|
}
|
|
});
|
|
},
|
|
changeIfimg(boolean){
|
|
if(this.ifimg == boolean) return;
|
|
this.ifimg = boolean;
|
|
}
|
|
},
|
|
onHide() {
|
|
let _this = this;
|
|
_this.onToggleTrade();
|
|
// pageAudio = _this.dataInfo.music;
|
|
innerAudioContext.pause()
|
|
innerAudioContext.onPause(() => {
|
|
console.log('暂停播放');
|
|
});
|
|
_this.play_Audio = false;
|
|
clearTimeout(successTimer);
|
|
clearTimeout(setTimer);
|
|
clearTimeout(indexTimer);
|
|
this.showTips = false;
|
|
this.play_Audio = false;
|
|
innerAudioContext.stop()
|
|
innerAudioContext.onStop(() => {
|
|
console.log('页面跳转暂停播放');
|
|
})
|
|
console.log("onUnload");
|
|
},
|
|
destroyed() {
|
|
innerAudioContext.stop();
|
|
innerAudioContext.onStop(() => {
|
|
console.log('页面跳转暂停播放');
|
|
});
|
|
clearTimeout(successTimer);
|
|
clearTimeout(setTimer);
|
|
clearTimeout(indexTimer);
|
|
},
|
|
onUnload() {
|
|
let _this = this;
|
|
// pageAudio = _this.dataInfo.music;
|
|
innerAudioContext.pause()
|
|
innerAudioContext.onPause(() => {
|
|
console.log('暂停播放');
|
|
});
|
|
_this.play_Audio = false;
|
|
clearTimeout(successTimer);
|
|
clearTimeout(setTimer);
|
|
clearTimeout(indexTimer);
|
|
this.showTips = false;
|
|
this.play_Audio = false;
|
|
innerAudioContext.stop()
|
|
innerAudioContext.onStop(() => {
|
|
console.log('页面跳转暂停播放');
|
|
})
|
|
console.log("onUnload");
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
@import '../goods/index.css';
|
|
|
|
page {
|
|
background: #f2f2f2;
|
|
}
|
|
|
|
.goodSwiper {
|
|
/* height: 30vh; */
|
|
}
|
|
|
|
.container {
|
|
overflow: hidden !important;
|
|
padding-bottom: 20px;
|
|
}
|
|
|
|
.swiper-item-img {
|
|
width: 100%;
|
|
height: 100%;
|
|
background-size: 100% 100%;
|
|
}
|
|
|
|
.picImage {
|
|
display: inline-block;
|
|
width: 120upx;
|
|
height: 120upx;
|
|
border-radius: 10upx;
|
|
margin: 10upx 10upx 0 0;
|
|
}
|
|
|
|
.picImage_view {
|
|
width: 400upx;
|
|
}
|
|
//
|
|
.status_bar {
|
|
width: 100%;
|
|
height: var(--status-bar-height);
|
|
padding-bottom: 15px;
|
|
background-color: #fff;
|
|
position: fixed;
|
|
top: 0px;
|
|
z-index: 99;
|
|
}
|
|
</style>
|
|
|