Commit 44d45fbf authored by 罗超's avatar 罗超

1

parent e6a74664
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="goods"> <view class="goods">
<view class="u-skeleton" v-if="isExsitGoods"> <view class="u-skeleton" v-if="isExsitGoods">
<view class="u-skeleton-rect"> <view class="u-skeleton-rect">
<!-- <u-swiper <!-- <u-swiper
:list="g.pic_url" :list="g.pic_url"
height="100" height="100"
unit="vw" unit="vw"
...@@ -11,26 +11,49 @@ ...@@ -11,26 +11,49 @@
:border-radius="0" :border-radius="0"
@click="previewImage" @click="previewImage"
></u-swiper> --> ></u-swiper> -->
<swiper <swiper
indicator-dots indicator-dots
:autoplay="false" :autoplay="false"
:interval="1000" :interval="1000"
style="height:100vw;" style="height: 100vw"
> >
<block v-for="(item, index) in g.pic_url" :key="index"> <block v-for="(item, index) in g.pic_url" :key="index">
<swiper-item> <swiper-item>
<video @click="startPlay(item)" style="width:100%;height:100%" id="myVideo" v-if="item.type==1" :src="item.pic_url" <video
:autoplay="false" loop muted show-play-btn :enable-progress-gesture="true" @click="startPlay(item)"
:controls="true" :show-progress="true" :show-mute-btn="true" objectFit="cover"></video> style="width: 100%; height: 100%"
<image @click="previewImage(index)" style="width:100%;height:100%;" v-else :src="item.pic_url" mode="aspectFill"></image> id="myVideo"
</swiper-item> v-if="item.type == 1"
</block> :src="item.pic_url"
</swiper> :autoplay="false"
loop
muted
show-play-btn
:enable-progress-gesture="true"
:controls="true"
:show-progress="true"
:show-mute-btn="true"
objectFit="cover"
></video>
<image
@click="previewImage(index)"
style="width: 100%; height: 100%"
v-else
:src="item.pic_url"
mode="aspectFill"
></image>
</swiper-item>
</block>
</swiper>
<!-- TODO 分销价格未做 is_share_price --> <!-- TODO 分销价格未做 is_share_price -->
<view class="is_share" v-if="g.share > 0 && hideshare == false&&setting.is_show_korea==0" style="top:240px;"> <view
class="is_share"
v-if="g.share > 0 && hideshare == false && setting.is_show_korea == 0"
style="top: 240px"
>
<image <image
src="@/static/images/icon/WechatIMG424.png" src="@/static/images/icon/WechatIMG424.png"
style="width: 20px; margin-left: 12px; opacity: 1;height: auto;" style="width: 20px; margin-left: 12px; opacity: 1; height: auto"
mode="widthFix" mode="widthFix"
/> />
<view <view
...@@ -46,134 +69,289 @@ ...@@ -46,134 +69,289 @@
<Text>即刻分享赚</Text> <Text>即刻分享赚</Text>
<Text>{{ g.share }}</Text> <Text>{{ g.share }}</Text>
</view> </view>
<u-icon name="close" style='position: absolute;right: 4px;top: 12.5px;' color="#fff" size="40" @click='hideshare=true'></u-icon> <u-icon
name="close"
style="position: absolute; right: 4px; top: 12.5px"
color="#fff"
size="40"
@click="hideshare = true"
></u-icon>
</view> </view>
<view class="is_share" v-if="g.myBuyCommission > 0 && hideshare == false&&setting.is_show_korea==0"> <view
class="is_share"
v-if="
g.myBuyCommission > 0 &&
hideshare == false &&
setting.is_show_korea == 0
"
>
<image <image
src="@/static/images/icon/WechatIMG424.png" src="@/static/images/icon/WechatIMG424.png"
style="width: 20px; margin-left: 12px; opacity: 1;height: auto;" style="width: 20px; margin-left: 12px; opacity: 1; height: auto"
mode="widthFix" mode="widthFix"
/> />
<view <view
style=" style="
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-left: 8px; margin-left: 8px;
font-size: 11px; font-size: 11px;
color: #fff; color: #fff;
opacity: 1; opacity: 1;
" "
> >
<Text>即刻购买省</Text> <Text>即刻购买省</Text>
<Text>{{ g.myBuyCommission }}</Text> <Text>{{ g.myBuyCommission }}</Text>
</view> </view>
<u-icon v-if='g.share ==0' name="close" style='position: absolute;right: 4px;top: 12.5px;' color="#fff" size="40" @click='hideshare=true'></u-icon> <u-icon
v-if="g.share == 0"
name="close"
style="position: absolute; right: 4px; top: 12.5px"
color="#fff"
size="40"
@click="hideshare = true"
></u-icon>
</view> </view>
</view> </view>
<view class="g-info"> <view class="g-info">
<view class="g-name u-skeleton-rect"> <view class="g-name u-skeleton-rect">
<view <view
v-if="g.marketingLogo.iswords&&g.marketingLogo.iswords==1 && g.marketingLogo.words!=''" v-if="
g.marketingLogo.iswords &&
g.marketingLogo.iswords == 1 &&
g.marketingLogo.words != ''
"
class="Logo" class="Logo"
:style="{color: g.marketingLogo.wordsColor, :style="{
background:g.marketingLogo.wordsBack ,}" color: g.marketingLogo.wordsColor,
>{{g.marketingLogo.words}}</view> background: g.marketingLogo.wordsBack,
}"
>{{ g.marketingLogo.words }}</view
>
<image <image
v-if="g.marketingLogo.iswords&&g.marketingLogo.iswords==2&& g.marketingLogo.ico!=''" v-if="
g.marketingLogo.iswords &&
g.marketingLogo.iswords == 2 &&
g.marketingLogo.ico != ''
"
mode="heightFix" mode="heightFix"
:src="g.marketingLogo.ico" :src="g.marketingLogo.ico"
style=" height: 12px;margin-right: 5px" style="height: 12px; margin-right: 5px"
/> />
{{ g.name }} {{ g.name }}
</view> </view>
<view class="g-price-box" v-if="setting.is_show_korea==0"> <view class="g-price-box" v-if="setting.is_show_korea == 0">
<view class="left"> <view class="left">
<view class="price u-skeleton-rect" :style="{ color: mc }"> <view class="price u-skeleton-rect" :style="{ color: mc }">
<u-tag v-if='g.price_min!=g.original_price' text="心动价" mode="light" size='mini' type="error" style='font-size: 12px;font-family: aa;margin-right: 10px;'/> <u-tag
v-if="g.price_min != g.original_price"
text="心动价"
mode="light"
size="mini"
type="error"
style="font-size: 12px; font-family: aa; margin-right: 10px"
/>
<text class="small"></text> <text class="small"></text>
<text <text class="numfont" v-if="g.form_id != 1">
class="numfont" v-if="g.form_id!=1" {{
> g.price_min == g.price_max
{{ g.price_min == g.price_max ? g.price_min : g.price_min + '-' + g.price_max }} ? g.price_min
</text> : g.price_min + "-" + g.price_max
<text class="numfont" v-if="g.form_id==1"> }}
{{ g.price_min }} </text>
</text> <text class="numfont" v-if="g.form_id == 1">
<text class="small" v-if="g.form_id==1"></text> {{ g.price_min }}
</text>
<text class="small" v-if="g.form_id == 1"></text>
</view> </view>
<!-- TODO is_common_user_member_price 普通用户会员价 --> <!-- TODO is_common_user_member_price 普通用户会员价 -->
<!-- TODO is_member_user_member_price 会员用户会员价 --> <!-- TODO is_member_user_member_price 会员用户会员价 -->
<view class="sell u-skeleton-rect"> <view class="sell u-skeleton-rect">
<text class="oprice" v-if="setting.is_underline_price == 1">原价:{{ g.original_price }}</text> <text class="oprice" v-if="setting.is_underline_price == 1"
<text v-if="setting.is_sales == 1">已售出{{ g.sales }}{{ g.unit }}</text> >原价:{{ g.original_price }}</text
>
<text v-if="setting.is_sales == 1"
>已售出{{ g.sales }}{{ g.unit }}</text
>
</view> </view>
</view> </view>
<view class="right u-skeleton-rect" @click="openShare" v-if="isAllowShare == 1"> <view
<image src="@/static/images/icon/icon-share.png" class="share-icon" /> class="right u-skeleton-rect"
@click="openShare"
v-if="isAllowShare == 1"
>
<image
src="@/static/images/icon/icon-share.png"
class="share-icon"
/>
<text>分享</text> <text>分享</text>
</view> </view>
</view> </view>
<template v-if="setting.is_show_korea==1"> <template v-if="setting.is_show_korea == 1">
<view style="height:50px;margin:10px 10px 0 0;display:none;"> <view style="height: 50px; margin: 10px 10px 0 0; display: none">
<view style="float:right;" @click="openShare" v-if="isAllowShare == 1"> <view
<image src="@/static/images/icon/icon-share.png" style="width:20px;height:20px;" class="share-icon" /> style="float: right"
</view> @click="openShare"
</view> v-if="isAllowShare == 1"
<view class="koarea_Country" style="display:none;"> >
<view style="flex: 1;text-align: center;border-right:1px solid #F2F3F6;"> <image
<text v-if="g.goods_country">{{g.goods_country}}</text> src="@/static/images/icon/icon-share.png"
</view> style="width: 20px; height: 20px"
<view style="flex: 1;text-align: center;border-right:1px solid #F2F3F6;"></view> class="share-icon"
<view style="flex: 1;text-align: center;" v-if="g.cats&&g.cats.length>0">{{g.cats[0].CategoryName}}</view> />
</view> </view>
<view style="text-align: left;padding:15px 0;border-bottom:1px solid #F2F3F6;display:none;"> </view>
卖点:<text v-if="g.subname">{{g.subname}}</text> <view class="koarea_Country" style="display: none">
</view> <view
<view style="text-align: left;border-bottom:1px solid #F2F3F6;padding:15px 0;display:flex;font-size:13px;color:#737373;"> style="
<u-icon name="location" color="#D4D4D4" size="30"></u-icon> flex: 1;
地址:<text v-if="g.fatcode">{{g.fatcode}}</text> text-align: center;
</view> border-right: 1px solid #f2f3f6;
<view style="display:flex;text-align: left;padding:10px;background-color: #F3F3F3;color:#404040;min-height:100px;line-height: 25px;font-size:13px;"> "
<text style="flex-shrink: 0;width:45px;">简介:</text><text v-if="g.goodsurl">{{g.goodsurl}}</text> >
</view> <text v-if="g.goods_country">{{ g.goods_country }}</text>
</template> </view>
<view
style="
flex: 1;
text-align: center;
border-right: 1px solid #f2f3f6;
"
></view
>
<view
style="flex: 1; text-align: center"
v-if="g.cats && g.cats.length > 0"
>{{ g.cats[0].CategoryName }}</view
>
</view>
<view
style="
text-align: left;
padding: 15px 0;
border-bottom: 1px solid #f2f3f6;
display: none;
"
>
卖点:<text v-if="g.subname">{{ g.subname }}</text>
</view>
<view
style="
text-align: left;
border-bottom: 1px solid #f2f3f6;
padding: 15px 0;
display: flex;
font-size: 13px;
color: #737373;
"
>
<u-icon name="location" color="#D4D4D4" size="30"></u-icon>
地址:<text v-if="g.fatcode">{{ g.fatcode }}</text>
</view>
<view
style="
display: flex;
text-align: left;
padding: 10px;
background-color: #f3f3f3;
color: #404040;
min-height: 100px;
line-height: 25px;
font-size: 13px;
"
>
<text style="flex-shrink: 0; width: 45px">简介:</text
><text v-if="g.goodsurl">{{ g.goodsurl }}</text>
</view>
</template>
</view>
<view
class="sku-box u-skeleton-rect"
style="margin: 0; padding: 10px"
v-if="
g.friendUrl != null && g.friendUrl != '' && setting.is_show_korea == 0
"
@click="goCoiling(g.friendUrl)"
>
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/goodsCoiling.png"
style="width: 100%; height: 68px"
/>
</view> </view>
<view class="sku-box u-skeleton-rect" style="margin: 0;padding: 10px;" v-if="g.friendUrl!=null && g.friendUrl!=''&&setting.is_show_korea==0" @click="goCoiling(g.friendUrl)"> <view
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/goodsCoiling.png" style="width: 100%;height: 68px;"/> class="sku-box u-skeleton-rect"
</view> style="align-items: flex-start"
<view class="sku-box u-skeleton-rect" style="align-items: flex-start;" v-if="(g.goods_marketing_award.integral.title != '')|| (g.goods_marketing_award.PresentFXGradeMsg != '')|| g.freeShippingName != null && g.freeShippingName != '' && (g.fullMoneyPinkage > 0 || g.fullNumPinkage > 0)"> v-if="
<view class="label" style="margin-top: 5px;">活动</view> g.goods_marketing_award.integral.title != '' ||
<view class="content" style="display: flex;flex-direction: column"> g.goods_marketing_award.PresentFXGradeMsg != '' ||
(g.freeShippingName != null &&
g.freeShippingName != '' &&
(g.fullMoneyPinkage > 0 || g.fullNumPinkage > 0))
"
>
<view class="label" style="margin-top: 5px">活动</view>
<view class="content" style="display: flex; flex-direction: column">
<view <view
style="display: flex;flex-direction: row;align-items: center;margin-bottom: 5px;" style="
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 5px;
"
v-if="g.goods_marketing_award.integral.title != ''" v-if="g.goods_marketing_award.integral.title != ''"
> >
<u-tag text="送积分" type="error" /> <u-tag text="送积分" type="error" />
<text <text style="margin-left: 5px; font-size: 12px">{{
style="margin-left: 5px; font-size: 12px;" g.goods_marketing_award.integral.title
>{{ g.goods_marketing_award.integral.title }}</text> }}</text>
</view> </view>
<view <view
style="display: flex;flex-direction: row;align-items: center" style="display: flex; flex-direction: row; align-items: center"
v-if="g.goods_marketing_award.PresentFXGradeMsg != ''" v-if="g.goods_marketing_award.PresentFXGradeMsg != ''"
@click="goVIP" @click="goVIP"
> >
<u-tag text="送会员" type="error" /> <u-tag text="送会员" type="error" />
<text <text style="margin-left: 5px; font-size: 12px">{{
style="margin-left: 5px; font-size: 12px;" g.goods_marketing_award.PresentFXGradeMsg
>{{ g.goods_marketing_award.PresentFXGradeMsg }}</text> }}</text>
</view> </view>
<view <view
style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;" style="
display: flex;
flex-direction: row;
align-items: center;
margin-top: 5px;
"
@click="goUrl(g.FreeShippingUrl)" @click="goUrl(g.FreeShippingUrl)"
v-if="g.freeShippingName != null && g.freeShippingName != '' && (g.fullMoneyPinkage > 0 || g.fullNumPinkage > 0)" v-if="
g.freeShippingName != null &&
g.freeShippingName != '' &&
(g.fullMoneyPinkage > 0 || g.fullNumPinkage > 0)
"
> >
<view <view
style="color: #fa3534;background: #fef0f0;padding: 12rpx 22rpx; font-size: 22rpx;margin-right: 5px;border: 1px solid #fde2e2;border-radius: 6rpx;" style="
>{{ g.freeShippingName != null ? g.freeShippingName : '' }}</view> color: #fa3534;
{{ g.fullMoneyPinkage > 0 && g.fullNumPinkage == 0 ? g.fullMoneyPinkage + '元包邮' : '' }} background: #fef0f0;
{{ g.fullMoneyPinkage == 0 && g.fullNumPinkage > 0 ? g.fullNumPinkage + '件包邮' : '' }} padding: 12rpx 22rpx;
font-size: 22rpx;
margin-right: 5px;
border: 1px solid #fde2e2;
border-radius: 6rpx;
"
>{{ g.freeShippingName != null ? g.freeShippingName : "" }}</view
>
{{
g.fullMoneyPinkage > 0 && g.fullNumPinkage == 0
? g.fullMoneyPinkage + "元包邮"
: ""
}}
{{
g.fullMoneyPinkage == 0 && g.fullNumPinkage > 0
? g.fullNumPinkage + "件包邮"
: ""
}}
</view> </view>
<!-- <view style="margin-top: 5px;" v-if=" <!-- <view style="margin-top: 5px;" v-if="
...@@ -185,29 +363,37 @@ ...@@ -185,29 +363,37 @@
</view>--> </view>-->
</view> </view>
</view> </view>
<view class="sku-box u-skeleton-rect" style="align-items: flex-start;" v-if="sku.length > 0&&setting.is_show_korea==0"> <view
class="sku-box u-skeleton-rect"
style="align-items: flex-start"
v-if="sku.length > 0 && setting.is_show_korea == 0"
>
<view class="label">选择</view> <view class="label">选择</view>
<view class="content"> <view class="content">
<view class="sku-chosen" @click="chosenSku"> <view class="sku-chosen" @click="chosenSku">
<view class="sku">{{ currentSku.attr_list.length > 0 ? '已' : '请' }}选择 {{ sku }}</view> <view class="sku"
>{{ currentSku.attr_list.length > 0 ? "已" : "请" }}选择
{{ sku }}</view
>
<view class="arrow"> <view class="arrow">
<u-icon name="arrow" :size="32" color="#111"></u-icon> <u-icon name="arrow" :size="32" color="#111"></u-icon>
</view> </view>
</view> </view>
<view class="suk-item" style="flex-wrap: wrap;"> <view class="suk-item" style="flex-wrap: wrap">
<template v-if="skuimage.length > 0"> <template v-if="skuimage.length > 0">
<view <view
v-for="(x, i) in skuimage" v-for="(x, i) in skuimage"
class="item img" class="item img"
style="margin-bottom: 5px;" style="margin-bottom: 5px"
:key="i" :key="i"
> >
<image :src="x" style="width: 100%; height: 100%;" /> <image :src="x" style="width: 100%; height: 100%" />
</view> </view>
<view <view class="item" v-if="g.attr_groups[0].attr_list.length > 1"
class="item" >{{ g.attr_groups[0].attr_list.length }}{{
v-if="g.attr_groups[0].attr_list.length > 1" g.attr_groups[0].attr_group_name
>{{ g.attr_groups[0].attr_list.length }}{{ g.attr_groups[0].attr_group_name }}可选</view> }}可选</view
>
</template> </template>
<template v-else> <template v-else>
<template v-for="(x, i) in g.attr_groups[0].attr_list"> <template v-for="(x, i) in g.attr_groups[0].attr_list">
...@@ -215,30 +401,40 @@ ...@@ -215,30 +401,40 @@
class="item" class="item"
v-if="i < 5" v-if="i < 5"
:key="i" :key="i"
style="margin-bottom: 5px;" style="margin-bottom: 5px"
>{{ x.attr_name }}</view> >{{ x.attr_name }}</view
>
</template> </template>
<view <view class="item" v-if="g.attr_groups[0].attr_list.length > 1"
class="item" >共{{ g.attr_groups[0].attr_list.length }}种{{
v-if="g.attr_groups[0].attr_list.length > 1" g.attr_groups[0].attr_group_name
>共{{ g.attr_groups[0].attr_list.length }}种{{ g.attr_groups[0].attr_group_name }}可选</view> }}可选</view
>
</template> </template>
</view> </view>
</view> </view>
</view> </view>
<view class="sku-box u-skeleton-rect" v-if="g.sendArea&&g.sendArea!=''"> <view
class="sku-box u-skeleton-rect"
v-if="g.sendArea && g.sendArea != ''"
>
<view class="label">发货地</view> <view class="label">发货地</view>
<view class="content">{{g.sendArea }}</view> <view class="content">{{ g.sendArea }}</view>
</view> </view>
<view class="sku-box u-skeleton-rect" v-if="setting.is_express == '1'&&setting.is_show_korea==0"> <view
class="sku-box u-skeleton-rect"
v-if="setting.is_express == '1' && setting.is_show_korea == 0"
>
<view class="label">快递</view> <view class="label">快递</view>
<view class="content">{{ g.express == '' ? '免运费' : '¥' + g.express }}</view> <view class="content">{{
g.express == "" ? "免运费" : "¥" + g.express
}}</view>
</view> </view>
<view <view
class="sku-box u-skeleton-rect" class="sku-box u-skeleton-rect"
style="margin-top: -10;" style="margin-top: -10"
v-if="g.goods_marketing.shipping != ''" v-if="g.goods_marketing.shipping != ''"
> >
<view class="label">包邮</view> <view class="label">包邮</view>
...@@ -246,14 +442,21 @@ ...@@ -246,14 +442,21 @@
</view> </view>
<view <view
class="sku-box u-skeleton-rect" class="sku-box u-skeleton-rect"
style="margin-top: -10;" style="margin-top: -10"
v-if="g.goods_marketing.limit != ''&&setting.is_show_korea==0" v-if="g.goods_marketing.limit != '' && setting.is_show_korea == 0"
> >
<view class="label">限购</view> <view class="label">限购</view>
<view class="content">{{ g.goods_marketing.limit }}</view> <view class="content">{{ g.goods_marketing.limit }}</view>
</view> </view>
<view class="sku-box u-skeleton-rect" v-if="comments.length == 0 && setting.is_comment == 1&&setting.is_show_korea==0"> <view
class="sku-box u-skeleton-rect"
v-if="
comments.length == 0 &&
setting.is_comment == 1 &&
setting.is_show_korea == 0
"
>
<view class="label">暂无评论信息</view> <view class="label">暂无评论信息</view>
</view> </view>
<view class="comment" v-if="comments.length > 0"> <view class="comment" v-if="comments.length > 0">
...@@ -272,86 +475,148 @@ ...@@ -272,86 +475,148 @@
<view class="u-box"> <view class="u-box">
<view class="user"> <view class="user">
<u-avatar :src="comments[0].UserPhotoPath" :size="50"></u-avatar> <u-avatar :src="comments[0].UserPhotoPath" :size="50"></u-avatar>
<text style="margin-left: 10px;">{{ comments[0].UserName }}</text> <text style="margin-left: 10px">{{ comments[0].UserName }}</text>
<u-rate <u-rate
:current="comments[0].CommentScore" :current="comments[0].CommentScore"
active-color="#FA3534" active-color="#FA3534"
inactive-color="#b2b2b2" inactive-color="#b2b2b2"
active-icon="star" active-icon="star"
inactive-icon="star-o" inactive-icon="star-o"
size="20" size="20"
:disabled="true" :disabled="true"
></u-rate> ></u-rate>
</view> </view>
<view class="timer">{{ comments[0].CreateDate }}</view> <view class="timer">{{ comments[0].CreateDate }}</view>
</view> </view>
<view class="ucontent">{{ comments[0].Content }}</view> <view class="ucontent">{{ comments[0].Content }}</view>
</view> </view>
</view> </view>
<u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent">商品详情</u-divider> <u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent"
>商品详情</u-divider
>
<view class="details"> <view class="details">
<!-- <rich-text :nodes="detailContent" @click="clickDescription"></rich-text> --> <!-- <rich-text :nodes="detailContent" @click="clickDescription"></rich-text> -->
<h-parse :content="detailContent" @navigate="clickDescription"></h-parse> <h-parse
:content="detailContent"
@navigate="clickDescription"
></h-parse>
</view> </view>
<template v-if="setting.is_show_korea==1"> <template v-if="setting.is_show_korea == 1">
<view style="width:100%;height:1px;border-top:1px solid #FFFFFF;margin:20px 0;"></view> <view
<view class="commontList" v-for="(item,index) in compentList" :key="index"> style="
<view> width: 100%;
<img :src="item.UserPhoto" style="width:30px;height:30px;border-radius: 50%;" alt=""> height: 1px;
</view> border-top: 1px solid #ffffff;
<view style="width:100%;margin-left:10px;"> margin: 20px 0;
<view style="color:#000000;font-size:14px;margin-bottom:5px;">{{item.UserName}}</view> "
<view style="color:#909399;font-size:13px;">{{item.Content}}</view> ></view>
</view> <view
<view @click="delCompent(item)" v-if="item.UserId==u.UserId"> class="commontList"
<u-icon name="delete" color="red" size="40"></u-icon> v-for="(item, index) in compentList"
</view> :key="index"
</view> >
<view v-if="compentTotal>1" style="display: flex;justify-content: end;float:right;margin-bottom:20px;"> <view>
<view class="fenyeBtn" v-if="comListMsg.pageIndex>1" @click="goBefore">上一页</view> <img
<view class="fenyeBtn" v-if="comListMsg.pageIndex<compentTotal" @click="goAfter">下一页</view> :src="item.UserPhoto"
</view> style="width: 30px; height: 30px; border-radius: 50%"
<view style="padding:10px;margin-top:30px;"> alt=""
<view style="margin:10px 0;">留言(至少填写10个文字)</view> />
<view> </view>
<textarea placeholder="请输入评论信息" style="width: 94.5%;height: 100px;border:1px solid #d1d1d1; <view style="width: 100%; margin-left: 10px">
padding:10px;background-color: #fff;" confirm-type='done' v-model="comentMsg.Content"> <view style="color: #000000; font-size: 14px; margin-bottom: 5px">{{
</textarea> item.UserName
</view> }}</view>
<view class="goodComentBtn" @click="submitCommit">提交留言</view> <view style="color: #909399; font-size: 13px">{{
</view> item.Content
</template> }}</view>
<u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent">或许你喜欢</u-divider> </view>
<view style="width: calc(100vw - 20px); margin-left: 10px; overflow: hidden;"> <view @click="delCompent(item)" v-if="item.UserId == u.UserId">
<u-icon name="delete" color="red" size="40"></u-icon>
</view>
</view>
<view
v-if="compentTotal > 1"
style="
display: flex;
justify-content: end;
float: right;
margin-bottom: 20px;
"
>
<view
class="fenyeBtn"
v-if="comListMsg.pageIndex > 1"
@click="goBefore"
>上一页</view
>
<view
class="fenyeBtn"
v-if="comListMsg.pageIndex < compentTotal"
@click="goAfter"
>下一页</view
>
</view>
<view style="padding: 10px; margin-top: 30px">
<view style="margin: 10px 0">留言(至少填写10个文字)</view>
<view>
<textarea
placeholder="请输入评论信息"
style="
width: 94.5%;
height: 100px;
border: 1px solid #d1d1d1;
padding: 10px;
background-color: #fff;
"
confirm-type="done"
v-model="comentMsg.Content"
>
</textarea>
</view>
<view class="goodComentBtn" @click="submitCommit">提交留言</view>
</view>
</template>
<u-divider :margin-top="20" :margin-bottom="20" bg-color="transparent"
>或许你喜欢</u-divider
>
<view
style="width: calc(100vw - 20px); margin-left: 10px; overflow: hidden"
>
<goodlist :list="recommend"></goodlist> <goodlist :list="recommend"></goodlist>
</view> </view>
<u-skeleton v-if="loading" :loading="true" :animation="true" bgcolor="#FFF"></u-skeleton> <u-skeleton
<template v-if="setting&&setting.is_show_korea==0"> v-if="loading"
<goodsaction :loading="true"
v-if="!loading" :animation="true"
:good-name="g.name" bgcolor="#FFF"
:cover-pic="g.cover_pic" ></u-skeleton>
:favorite="g.favorite" <template v-if="setting && setting.is_show_korea == 0">
:good-id="id" <goodsaction
:total-stock="g.totalStock" v-if="!loading"
:status="g.status" :good-name="g.name"
:formid='g.form_id' :cover-pic="g.cover_pic"
@joincar="joinCar" :favorite="g.favorite"
@buy="buy" :good-id="id"
></goodsaction> :total-stock="g.totalStock"
</template> :status="g.status"
<template v-if="setting&&setting.is_show_korea==1"> :formid="g.form_id"
<kotragoodsaction @joincar="joinCar"
v-if="!loading" @buy="buy"
:good-name="g.name" ></goodsaction>
:cover-pic="g.pic_url" </template>
:favorite="g.favorite" <template v-if="setting && setting.is_show_korea == 1">
:good-id="id" <kotragoodsaction
:total-stock="g.totalStock" v-if="!loading"
:status="g.status" :good-name="g.name"
@buy="buy"> :cover-pic="g.pic_url"
</kotragoodsaction> :favorite="g.favorite"
</template> :good-id="id"
:total-stock="g.totalStock"
:status="g.status"
@buy="buy"
>
</kotragoodsaction>
</template>
<goodsku <goodsku
v-if="!loading && showSku" v-if="!loading && showSku"
border-radius="10" border-radius="10"
...@@ -364,7 +629,11 @@ ...@@ -364,7 +629,11 @@
@close="closeSkuChosen" @close="closeSkuChosen"
></goodsku> ></goodsku>
</view> </view>
<u-empty text="没有找到商品,或商品已下架" mode="favor" v-if="!isExsitGoods"></u-empty> <u-empty
text="没有找到商品,或商品已下架"
mode="favor"
v-if="!isExsitGoods"
></u-empty>
<share <share
:good-id="id" :good-id="id"
v-if="showShare" v-if="showShare"
...@@ -373,7 +642,11 @@ ...@@ -373,7 +642,11 @@
:advertising="g.advertising" :advertising="g.advertising"
@close="closeShare" @close="closeShare"
></share> ></share>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> <auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
<coupon <coupon
v-if="showCoupons" v-if="showCoupons"
:coupon-message="couponMessage" :coupon-message="couponMessage"
...@@ -389,7 +662,7 @@ const dom = weex.requireModule("dom"); ...@@ -389,7 +662,7 @@ const dom = weex.requireModule("dom");
// #endif // #endif
import goodlist from "@/components/goods/list"; import goodlist from "@/components/goods/list";
import goodsaction from "./components/goodsaction"; import goodsaction from "./components/goodsaction";
import kotragoodsaction from "./components/kotragoodsaction"; //韩国馆项目引用 import kotragoodsaction from "./components/kotragoodsaction"; //韩国馆项目引用
import goodsku from "@/components/goods/goodsku"; import goodsku from "@/components/goods/goodsku";
import auth from "@/components/auth/index"; import auth from "@/components/auth/index";
import coupon from "@/components/coupons/coupons"; import coupon from "@/components/coupons/coupons";
...@@ -431,31 +704,31 @@ export default { ...@@ -431,31 +704,31 @@ export default {
isAllowShare: 1, isAllowShare: 1,
u: {}, u: {},
vipState: {}, vipState: {},
Up:0, Up: 0,
hideshare:false, hideshare: false,
comentMsg:{ comentMsg: {
GoodsId:0, GoodsId: 0,
Content:'' Content: "",
}, },
comListMsg:{ comListMsg: {
pageIndex:1, pageIndex: 1,
pageSize:5, pageSize: 5,
GoodsId:0 GoodsId: 0,
}, },
compentList:[] ,//评论列表 compentList: [], //评论列表
compentTotal:0, compentTotal: 0,
curren:1 curren: 1,
}; };
}, },
components: { components: {
goodlist, goodlist,
goodsaction, goodsaction,
kotragoodsaction, kotragoodsaction,
goodsku, goodsku,
auth, auth,
coupon, coupon,
share, share,
hParse hParse,
}, },
onLoad(option) { onLoad(option) {
this.opTionObj = option; this.opTionObj = option;
...@@ -472,24 +745,28 @@ export default { ...@@ -472,24 +745,28 @@ export default {
if (custom_params.user_id) { if (custom_params.user_id) {
uni.setStorageSync("pid", { pid: custom_params.user_id }); uni.setStorageSync("pid", { pid: custom_params.user_id });
} }
if (custom_params.Up) {//分享进入校园id if (custom_params.Up) {
uni.setStorageSync("Up", { Up: custom_params.Up }); //分享进入校园id
} uni.setStorageSync("Up", { Up: custom_params.Up });
}
} }
if (option && option.user_id) { if (option && option.user_id) {
uni.setStorageSync("pid", { pid: option.user_id }); uni.setStorageSync("pid", { pid: option.user_id });
} }
if (option && option.SmallShopId) { if (option && option.SmallShopId) {
uni.setStorageSync("SmallShopId", { SmallShopId: option.SmallShopId }); uni.setStorageSync("SmallShopId", { SmallShopId: option.SmallShopId });
} }
if (uni.getStorageSync("AnchorName")) { if (uni.getStorageSync("AnchorName")) {
//如果有主播名称了先清除 //如果有主播名称了先清除
uni.removeStorageSync("AnchorName"); uni.removeStorageSync("AnchorName");
} }
if (option && option.Up) {//分享进入校园id if (option && option.Up) {
uni.setStorageSync("Up", { Up: option.Up }); //分享进入校园id
} uni.setStorageSync("Up", { Up: option.Up });
this.Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;//用于分享出去的参数 }
this.Up = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserPageType
: 0; //用于分享出去的参数
if (option && option.AnchorName) { if (option && option.AnchorName) {
//当传过来有主播名称的时候 存入缓存 //当传过来有主播名称的时候 存入缓存
uni.setStorageSync("AnchorName", { AnchorName: option.AnchorName }); uni.setStorageSync("AnchorName", { AnchorName: option.AnchorName });
...@@ -513,14 +790,15 @@ export default { ...@@ -513,14 +790,15 @@ export default {
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
this.setting = uni.getStorageSync("basedata").mall.setting; this.setting = uni.getStorageSync("basedata").mall.setting;
wx.showShareMenu({ wx.showShareMenu({
withShareTicket: true, withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"], menus: ["shareAppMessage", "shareTimeline"],
}); });
this.comListMsg.GoodsId = this.id; this.comListMsg.GoodsId = this.id;
this.getCommitList(); this.getCommitList();
}, },
// #ifdef MP-WEIXIN
onShareTimeline() { onShareTimeline() {
setTimeout(() => { setTimeout(() => {
console.log("分享调用"); console.log("分享调用");
...@@ -529,57 +807,79 @@ export default { ...@@ -529,57 +807,79 @@ export default {
let uid = uni.getStorageSync("mall_UserInfo") let uid = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserId ? uni.getStorageSync("mall_UserInfo").UserId
: 0; : 0;
if(uid==0){ if (uid == 0) {
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0 uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
} }
let SmallShopId = uni.getStorageSync("mall_UserInfo") let SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").SmallShopId ? uni.getStorageSync("mall_UserInfo").SmallShopId
: 0; : 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id if (SmallShopId == 0) {
SmallShopId = uni.getStorageSync("mall_UserInfo") //如果微店id为0 去找所属微店id
? uni.getStorageSync("mall_UserInfo").UserSmallShopId SmallShopId = uni.getStorageSync("mall_UserInfo")
: 0; ? uni.getStorageSync("mall_UserInfo").UserSmallShopId
} : 0;
}
let title = let title =
this.g.app_share_title != null && this.g.app_share_title != "" this.g.app_share_title != null && this.g.app_share_title != ""
? this.g.app_share_title ? this.g.app_share_title
: this.g.name; : this.g.name;
let imageUrl = // let imageUrl =
this.g.app_share_pic != null && this.g.app_share_pic != "" // this.g.app_share_pic != null && this.g.app_share_pic != ""
? this.g.app_share_pic // ? this.g.app_share_pic
: this.g.pic_url[0].pic_url; // : this.g.pic_url[0].pic_url;
let id = this.id; let id = this.id;
return { return {
title: title, title: title,
query: "id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up, query:
imageUrl: imageUrl, "id=" +
this.id +
"&user_id=" +
uid +
"&SmallShopId=" +
SmallShopId +
"&Up=" +
this.Up,
// imageUrl: imageUrl,
imageUrl: "",
}; };
}, },
onShareAppMessage(res) { // #endif
onShareAppMessage() {
setTimeout(() => { setTimeout(() => {
console.log("分享调用"); console.log("分享调用");
this.getReceive(); this.getReceive();
}, 2500); }, 2500);
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0; let uid = u.UserId ? u.UserId : 0;
if(uid==0){ if (uid == 0) {
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0 uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
} }
let SmallShopId = u.SmallShopId ? u.SmallShopId : 0; let SmallShopId = u.SmallShopId ? u.SmallShopId : 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id if (SmallShopId == 0) {
SmallShopId = u.UserSmallShopId? u.UserSmallShopId:0 //如果微店id为0 去找所属微店id
} SmallShopId = u.UserSmallShopId ? u.UserSmallShopId : 0;
}
return { return {
title: title:
this.g.app_share_title != null && this.g.app_share_title != "" this.g.app_share_title != null && this.g.app_share_title != ""
? this.g.app_share_title ? this.g.app_share_title
: this.g.name, : this.g.name,
// path: "/pages/goods/goods?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId, // path: "/pages/goods/goods?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId,
path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=1', path:
imageUrl: "/pages/index/index?id=" +
this.g.app_share_pic != null && this.g.app_share_pic != "" this.id +
? this.g.app_share_pic "&user_id=" +
: this.g.pic_url[0].pic_url, uid +
"&SmallShopId=" +
SmallShopId +
"&Up=" +
this.Up +
"&JumpType=1",
imageUrl: "",
// imageUrl:
// this.g.app_share_pic != null && this.g.app_share_pic != ""
// ? this.g.app_share_pic
// : this.g.pic_url[0].pic_url,
}; };
}, },
mounted() { mounted() {
...@@ -605,7 +905,6 @@ export default { ...@@ -605,7 +905,6 @@ export default {
// console.log(data) // console.log(data)
// }) // })
// .exec(); // .exec();
// wx.createSelectorQuery() // wx.createSelectorQuery()
// .selectAll("#goodpic") // .selectAll("#goodpic")
// .fields({ rect: true }) // .fields({ rect: true })
...@@ -767,14 +1066,16 @@ export default { ...@@ -767,14 +1066,16 @@ export default {
); );
}, },
initRecommend() { initRecommend() {
var UserPageType = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0; var UserPageType = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserPageType
: 0;
this.request2( this.request2(
{ {
url: "/api/AppletGoods/GetAppletGoodsRecommendListForZY", url: "/api/AppletGoods/GetAppletGoodsRecommendListForZY",
data: { data: {
RecommendType: 1, RecommendType: 1,
GoodsId:this.id, GoodsId: this.id,
GoodsPageType:UserPageType GoodsPageType: UserPageType,
}, },
}, },
(res) => { (res) => {
...@@ -833,12 +1134,11 @@ export default { ...@@ -833,12 +1134,11 @@ export default {
this.showShare = false; this.showShare = false;
}, },
openShare() { openShare() {
if (this.u) { if (this.u) {
this.showShare = true; this.showShare = true;
} else { } else {
this.showAuth = true; this.showAuth = true;
} }
}, },
getReceive() { getReceive() {
//分享进入调取领券接口 //分享进入调取领券接口
...@@ -873,94 +1173,98 @@ export default { ...@@ -873,94 +1173,98 @@ export default {
url: url, url: url,
}); });
}, },
//点击跳转 //点击跳转
startPlay(item){ startPlay(item) {
uni.navigateTo({ url: '/pages/video/index?GoodsId='+this.id+'&VideoUrl='+item.pic_url }) uni.navigateTo({
}, url:
goCoiling(url){//跳转发圈页面 "/pages/video/index?GoodsId=" + this.id + "&VideoUrl=" + item.pic_url,
uni.navigateTo({ url: url }) });
}, },
//提交留言 goCoiling(url) {
submitCommit(){ //跳转发圈页面
this.comentMsg.GoodsId = this.id; uni.navigateTo({ url: url });
if(this.comentMsg.Content==''){ },
uni.showToast({ //提交留言
title: "请输入评价内容", submitCommit() {
icon:'none' this.comentMsg.GoodsId = this.id;
}); if (this.comentMsg.Content == "") {
return; uni.showToast({
} title: "请输入评价内容",
if(this.comentMsg.Content.length<10){ icon: "none",
uni.showToast({ });
title: "留言至少10个字!", return;
icon:'none' }
}); if (this.comentMsg.Content.length < 10) {
return; uni.showToast({
} title: "留言至少10个字!",
this.request2( icon: "none",
{ });
url: "/api/AppletGoods/SetGoodsLeavemessage", return;
data: this.comentMsg, }
}, this.request2(
(res) => { {
if (res.resultCode == 1) { url: "/api/AppletGoods/SetGoodsLeavemessage",
uni.showToast({ data: this.comentMsg,
title: "评价成功" },
}); (res) => {
this.comentMsg.Content=''; if (res.resultCode == 1) {
this.getCommitList(); uni.showToast({
} title: "评价成功",
} });
); this.comentMsg.Content = "";
}, this.getCommitList();
//获取评论信息 }
getCommitList(){ }
this.request2( );
{ },
url: "/api/AppletGoods/GetGoodsLeaveMessagePage", //获取评论信息
data: this.comListMsg, getCommitList() {
}, this.request2(
(res) => { {
if (res.resultCode == 1) { url: "/api/AppletGoods/GetGoodsLeaveMessagePage",
this.compentTotal = res.data.pageCount; data: this.comListMsg,
this.compentList =res.data.pageData; },
} (res) => {
} if (res.resultCode == 1) {
); this.compentTotal = res.data.pageCount;
}, this.compentList = res.data.pageData;
//上一页 }
goBefore(){ }
this.comListMsg.pageIndex--; );
if(this.comListMsg.pageIndex<1){ },
this.comListMsg.pageIndex=1 //上一页
} goBefore() {
this.getCommitList(); this.comListMsg.pageIndex--;
if (this.comListMsg.pageIndex < 1) {
this.comListMsg.pageIndex = 1;
}
this.getCommitList();
},
//下一页
goAfter() {
if (this.comListMsg.pageIndex < this.compentTotal) {
this.comListMsg.pageIndex++;
}
this.getCommitList();
},
//删除评论
delCompent(item) {
this.request2(
{
url: "/api/AppletGoods/RemoveGoodsLeavemessage",
data: { Id: item.Id },
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "删除成功",
});
this.comListMsg.pageIndex = 1;
this.getCommitList();
}
}
);
}, },
//下一页
goAfter(){
if(this.comListMsg.pageIndex<this.compentTotal){
this.comListMsg.pageIndex++;
}
this.getCommitList();
},
//删除评论
delCompent(item){
this.request2(
{
url: "/api/AppletGoods/RemoveGoodsLeavemessage",
data: {Id:item.Id},
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "删除成功"
});
this.comListMsg.pageIndex=1;
this.getCommitList();
}
}
);
}
}, },
}; };
</script> </script>
...@@ -1149,42 +1453,42 @@ export default { ...@@ -1149,42 +1453,42 @@ export default {
border-radius: 4px; border-radius: 4px;
} }
.goods .screen-swiper { .goods .screen-swiper {
min-height: 375upx; min-height: 375upx;
} }
.goods .screen-swiper image, .goods .screen-swiper image,
.goods .screen-swiper video{ .goods .screen-swiper video {
width: 100%; width: 100%;
display: block; display: block;
height: 100%; height: 100%;
margin: 0; margin: 0;
pointer-events: none; pointer-events: none;
} }
.koarea_Country{ .koarea_Country {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding-bottom:10px; padding-bottom: 10px;
border-bottom:1px solid #F2F3F6; border-bottom: 1px solid #f2f3f6;
} }
.commontList{ .commontList {
display:flex; display: flex;
padding:0 10px; padding: 0 10px;
margin-bottom:10px; margin-bottom: 10px;
} }
.goodComentBtn{ .goodComentBtn {
width:100%; width: 100%;
height:40px; height: 40px;
text-align: center; text-align: center;
line-height: 40px; line-height: 40px;
background-color: #0b0052; background-color: #0b0052;
color:#fff; color: #fff;
margin-top:10px; margin-top: 10px;
font-size:16px; font-size: 16px;
} }
.fenyeBtn{ .fenyeBtn {
padding:3px 6px; padding: 3px 6px;
background-color: #00BFFF; background-color: #00bfff;
color:#fff; color: #fff;
font-size:12px; font-size: 12px;
margin:0 10px 20px 0; margin: 0 10px 20px 0;
} }
</style> </style>
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="jz_TripDays" style="display:none;"> <view class="jz_TripDays" style="display: none">
<span style="display: inline-block; position: relative"> <span style="display: inline-block; position: relative">
<text <text
style=" style="
...@@ -1423,7 +1423,7 @@ export default { ...@@ -1423,7 +1423,7 @@ export default {
imageUrl: imageUrl, imageUrl: imageUrl,
}; };
}, },
// #endif
//分享给朋友 //分享给朋友
onShareAppMessage(res) { onShareAppMessage(res) {
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
...@@ -1452,13 +1452,13 @@ export default { ...@@ -1452,13 +1452,13 @@ export default {
this.delMsg.configId + this.delMsg.configId +
"&cityId=" + "&cityId=" +
this.delMsg.cityId, this.delMsg.cityId,
imageUrl: imageUrl: "",
this.dataList.tempImgCover && this.dataList.tempImgCover.length > 0 // imageUrl:
? this.dataList.tempImgCover[0] // this.dataList.tempImgCover && this.dataList.tempImgCover.length > 0
: "", // ? this.dataList.tempImgCover[0]
// : "",
}; };
}, },
// #endif
}, },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment