1232 lines
43 KiB
Vue
1232 lines
43 KiB
Vue
<template>
|
||
<view>
|
||
<!-- 产品封面 -->
|
||
<view class="goods-swiper">
|
||
<swiper :indicator-dots="false" @change="current = $event.detail.current + 1">
|
||
<swiper-item v-for="(item, index) in goods.pictures" :key="index+1">
|
||
<view class="swiper-cover">
|
||
<image :src="item" mode="aspectFill" />
|
||
</view>
|
||
</swiper-item>
|
||
</swiper>
|
||
<view class="swiper-pages"> {{current}}/{{goods.pictures.length}}</view>
|
||
<!-- vip 商品提示 -->
|
||
<view class="vipGoodsInfo" v-if="shop_vip.status">{{shop_vip.message}} </view>
|
||
<!-- 拼团 商品标题上面提示 -->
|
||
<view class="vipGoodsInfo" v-if="goods.is_active ">拼团商品</view>
|
||
</view>
|
||
<!-- 详情 -->
|
||
<view class="main">
|
||
<view class="title"> {{goods.name}} </view>
|
||
<view class="sub-title">
|
||
<!-- vip 商品前边 tags -->
|
||
<span class='vipType'
|
||
v-if="shop_vip.messageTitle != ''">{{shop_vip.messageTitle}}</span>{{goods.description}}
|
||
</view>
|
||
<view class="box-flex">
|
||
<!-- vip 商品展示原价 -->
|
||
<view class="price">
|
||
{{goods.price.show}}<text>DT积分</text>
|
||
<span class='del' v-if="shop_vip.status">{{goods.original_price}} DT积分</span>
|
||
</view>
|
||
<!-- vip 商品及普通商品展示库存量 -->
|
||
<view class="sales" v-if="goods.skus && !goods.is_active">库存量{{goods.skus[0].stock}}件</view>
|
||
<!-- 拼团商品展示已拼数量及参团数 -->
|
||
<view class="_pin" v-if="goods.is_active">
|
||
<view class="_has" v-if="goods.active.count>0">
|
||
<image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已拼{{goods.active.count}}件
|
||
</view>
|
||
<view class="tuan">{{goods.active.number}}人团</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- vip 商品规格 -->
|
||
<view class="vipInfo" v-if="shop_vip.card">
|
||
<image src="/static/store/vip-line-bg.png" mode="widthFix" />
|
||
<view class="title">
|
||
{{shop_vip.card.name}}
|
||
<view class=" des"> {{shop_vip.card.description}} </view>
|
||
</view>
|
||
<view class="btn" @click="toVip">
|
||
<!-- 1 开通 2续费 3升级 number 类型 -->
|
||
查看详情
|
||
<!-- {{shop_vip.card.state === 1 ?'立即开通':shop_vip.card.state === 2 ?'立即续费':'立即升级'}} -->
|
||
</view>
|
||
</view>
|
||
<!-- 普通商品及 VIP 商品规格 -->
|
||
<view class="unit" v-if="goods.skus && goods.skus[0].unit !== '' && !goods.is_active" @click="open()">
|
||
<span>规格:{{selectSkusValues.unit_text}}</span>
|
||
<uni-icons type="right" color="#cacaca" />
|
||
</view>
|
||
|
||
<!-- 可拼团列表 -->
|
||
<view class="is_active" v-if="goods.is_active && collages.length>0 && shareId == ''">
|
||
<view class="title" v-if="collages.length > 2">
|
||
这些人刚刚拼单成功,可参与拼单
|
||
<span @click="getMorePin = true">查看更多
|
||
<uni-icons type="right" color="#cacaca" />
|
||
</span>
|
||
</view>
|
||
<view class="title" v-if="collages.length <= 2"> {{collages.length}}人正在拼单,可参与拼单 </view>
|
||
<view class="content">
|
||
<block v-for="(item,index) in collages" :key="index">
|
||
<view class="content-item" v-if="index < 2">
|
||
<view class="info">
|
||
<u-avatar-group :urls="item.covers" size="34" gap="0.6" class="avatar-group" />
|
||
<view class="nickname"> {{item.names}}</view>
|
||
</view>
|
||
<view class="btn" v-if="goods.active.can_join || item.can_share" @click="toPin(item)">
|
||
{{ item.can_share?'去分享':'去拼单'}}</view>
|
||
<view class="noneBtn" v-else @click="showPinToast">去拼单</view>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 店铺信息 -->
|
||
<view class="shopInfo" @click="toShop(goods.shop.shop_id)" v-if="goods.shop">
|
||
<view class="shopInfo-title-left">
|
||
<image class="shop-logo" :src="goods.shop.cover" mode="aspectFill" />
|
||
<view class="shop-title">
|
||
<view class="shop-titl">{{goods.shop.name}}</view>
|
||
<view> 店铺评分:
|
||
<span class='no'>5.0</span>
|
||
<text style="padding-left: 20rpx;"> 服务态度: <span class='no'>5.0</span> </text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="shopInfo-title-right">全部商品 {{goods.shop.goods_count || 0}}
|
||
<uni-icons type="right" color="grey" />
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 商品详情 -->
|
||
<view class="imgs">
|
||
<u-notice-bar v-if="shop_vip.status" text="戒指尺寸有大小,请在购买戒指时参照详情介绍备注所选尺寸" fontSize='14' />
|
||
<block v-for="(item, index) in goods.content" :key="index">
|
||
<image :src="item" mode="widthFix" />
|
||
</block>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 立即购买 shop_vip.status 区分是否是 vip 商品 否则的就却分是拼团商品还是普通商品 -->
|
||
<view class="footer">
|
||
<view @click="toShop(goods.shop.shop_id)" class="shop">
|
||
<uni-icons type="shop" size="26" color="grey" />店铺
|
||
</view>
|
||
<!-- vip 规格弹窗立即领取 -->
|
||
<button type="default" v-if="shop_vip.status" hover-class="none" @click="vipBuy">立即领取</button>
|
||
<!-- 非vip 规格弹窗 普通商品立即购买,拼单商品立即拼单 -->
|
||
<block v-else>
|
||
<block v-if="goods.is_active">
|
||
<button type="default" v-if="goods.active.can_join" hover-class="none" @click="buy"> 立即拼单 </button>
|
||
<button type="default" v-else hover-class="none" @click="share"> 立即分享 </button>
|
||
</block>
|
||
<button v-else type="default" hover-class="none" @click="buy">立即购买</button>
|
||
</block>
|
||
</view>
|
||
<!-- 更多拼单弹窗 -->
|
||
<u-popup :show="getMorePin" :round="10" mode="center" @close="close" :closeable='true' zIndex="1229930">
|
||
<view class="getPinTitle"> 可参与拼单 </view>
|
||
<scroll-view scroll-y="true" class="getPinList">
|
||
<view class="content">
|
||
<block v-for="(item,index) in collages" :key="index">
|
||
<view class="content-item">
|
||
<view class="info">
|
||
<u-avatar-group :urls="item.covers" size="34" gap="0.6" class="avatar-group" />
|
||
<view class="nickname"> {{item.names}}</view>
|
||
</view>
|
||
<view class="btn" v-if="goods.active.can_join || item.can_share" @click="toPin(item)">
|
||
{{ item.can_share?'去分享':'去拼单'}}</view>
|
||
<view class="noneBtn" v-else @click="showPinToast">去拼单</view>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
</scroll-view>
|
||
</u-popup>
|
||
|
||
<!-- 与谁谁的拼团 -->
|
||
<u-popup :show="pinShow" :round="10" mode="center" @close="close" :closeable='true' zIndex="1229930">
|
||
<view scroll-y="true" class="content-2">
|
||
<view class="title"> 参与{{collageitem.names}}的拼单 </view>
|
||
<view class="number">仅剩<span>{{collageitem.surplus}}</span>个名额</view>
|
||
<view class="avatars" v-for="(item,index) in collageitem.details" :key='index'>
|
||
<image :class="['avatar',item.master?'pin':'']" :src="item.cover" mode="aspectFill" />
|
||
<image class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||
</view>
|
||
<view class="applyPin" @click="applyPin"> 参与拼单 </view>
|
||
</view>
|
||
</u-popup>
|
||
|
||
<!-- 多规格弹窗 -->
|
||
<u-popup :show="skuShow" :round="10" mode="bottom" @close="close" @open="open">
|
||
<scroll-view class="skuView" scroll-y="true">
|
||
<view class="goods-info">
|
||
<image class="goods-cover" :src="selectSkusValues.cover" mode="aspectFill" />
|
||
<view class="baseInfo">
|
||
<view class="money"> {{selectSkusValues.price}}<span>DT积分</span> </view>
|
||
<view class="shop-name" v-if="goods.shop"> {{goods.shop.name}} </view>
|
||
<view class="sku-text"> 商品规格:{{selectSkusValues.unit_text}} </view>
|
||
<view class="stock" v-if="selectSkusValues.stock>0"> 剩余库存:{{selectSkusValues.stock}} 件</view>
|
||
<view class="stock" v-else> 当前商品库存不足</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="sku" v-for="(item,index) in specs" :key="item.spec_id">
|
||
<view class="sku-title">{{item.name}}</view>
|
||
<view class="sku-list">
|
||
<block v-for="it in item.values" :key='it.value_id'>
|
||
<view :class="['sku-item',specselect[index] == it.value_id ? 'sku-active':'']"
|
||
@click="clickSkus(index,it.value_id)">
|
||
{{it.value}}
|
||
</view>
|
||
</block>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="buy-number">
|
||
<view class="buy-title">数量</view>
|
||
<uni-number-box :min="1" :max="selectSkusValues.stock" :disabled="selectSkusValues.stock == 0"
|
||
@change="qty = $event" />
|
||
</view>
|
||
|
||
<!-- 立即购买 shop_vip.status 区分是否是 vip 商品 只支持单规格php 规定不支持多规格 否则的就却分是拼团商品还是普通商品 -->
|
||
<!-- vip 规格弹窗立即领取 -->
|
||
<button class="now-buy" type="default" v-if="shop_vip.status" hover-class="none"
|
||
@click="vipBuy">立即领取</button>
|
||
<!-- 非vip 规格弹窗 普通商品立即购买,拼单商品立即拼单 -->
|
||
<block v-else>
|
||
<button class="now-buy" type="default" hover-class="none"
|
||
@click="buy2(selectSkusValues)">立即购买</button>
|
||
</block>
|
||
</scroll-view>
|
||
</u-popup>
|
||
|
||
<!-- 分享 -->
|
||
<uni-popup ref="popupShare" type="share" background-color="#fff">
|
||
<uni-popup-share title="立即分享到" @select="select" />
|
||
</uni-popup>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
goods
|
||
} from '@/apis/interfaces/store'
|
||
import userAuth from '@/public/userAuth'
|
||
export default {
|
||
data() {
|
||
return {
|
||
current: 1,
|
||
goods: {
|
||
pictures: [],
|
||
name: "",
|
||
description: "",
|
||
content: [],
|
||
price: {
|
||
show: 0
|
||
}
|
||
},
|
||
skus: [],
|
||
skuid: '',
|
||
skuShow: false,
|
||
specs: [],
|
||
unitText: '',
|
||
specselect: [],
|
||
selectSkusValues: {},
|
||
qty: 1,
|
||
collages: [], // 可拼单列表
|
||
getMorePin: false, // 更多可拼团列表是否显示
|
||
pinShow: false, // 与谁谁谁的拼团是否显示
|
||
shop_vip: {
|
||
// "status": true, // 当前店铺是否是会员制店铺 true 是 false 否
|
||
// "is_vip": true, // 当前会员是否是 vip true 是会员 false 非会员
|
||
// "is_receive": false // 当前会员是否已领取过 false 未领取 true 已领取
|
||
},
|
||
// collageid:'' ,// 拼团 id
|
||
collageitem: '', // 已选择的拼团的 item
|
||
shareId: '', // 从分享页带过来的 id 区分是否能展示可拼团列表及底部按钮直接拼!
|
||
};
|
||
},
|
||
onShow() {
|
||
this.getGoods()
|
||
if (this.$Route.query.shareId) {
|
||
this.shareId = this.$Route.query.shareId;
|
||
console.log(this.shareId)
|
||
}
|
||
},
|
||
methods: {
|
||
getGoods() {
|
||
let id = this.$Route.query.id;
|
||
// let id = 61; // 普通商品
|
||
// let id = 95; // 拼团商品
|
||
goods(id).then(res => {
|
||
this.goods = res
|
||
this.specs = res.specs
|
||
this.skus = res.skus
|
||
this.skuid = res.skus[0].sku_id
|
||
this.unitText = res.skus[0].unit_text
|
||
this.specselect = res.skus[0].unit.split('|')
|
||
this.selectSkusValues = res.skus[0]
|
||
this.shop_vip = res.shop_vip
|
||
this.collages = res.active.collages
|
||
})
|
||
},
|
||
open() {
|
||
this.skuShow = true
|
||
this.qty = 1;
|
||
},
|
||
close() {
|
||
this.skuShow = false
|
||
this.getMorePin = false
|
||
this.pinShow = false
|
||
this.qty = 1;
|
||
// this.specselect = this.skus[0].unit.split('|')
|
||
// this.selectSkusValues = this.skus[0]
|
||
},
|
||
// 去拼单
|
||
toPin(item) {
|
||
this.close();
|
||
this.collageitem = item
|
||
if (item.can_share) {
|
||
this.share(item)
|
||
} else {
|
||
this.pinShow = true;
|
||
}
|
||
},
|
||
// 分享
|
||
share() {
|
||
this.$refs.popupShare.open();
|
||
},
|
||
// 分享
|
||
onShare() {},
|
||
|
||
// 分享选项
|
||
select(e) {
|
||
console.log(this.collageitem)
|
||
switch (e.item.name) {
|
||
case 'wxchum':
|
||
uni.share({
|
||
provider: 'weixin',
|
||
scene: 'WXSceneSession',
|
||
type: 0,
|
||
href: this.collageitem.url + this.collageitem.collage_id + 'invitation' + this
|
||
.collageitem.invite,
|
||
title: '【仅剩' + this.collageitem.surplus + '个名额】邀请您一起拼团',
|
||
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
|
||
imageUrl: this.goods.cover,
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: err.errMsg,
|
||
icon: 'none'
|
||
})
|
||
},
|
||
success: (res) => {
|
||
this.collageitem = {}
|
||
}
|
||
})
|
||
break;
|
||
case 'wxcircle':
|
||
uni.share({
|
||
provider: 'weixin',
|
||
scene: 'WXSceneTimeline',
|
||
type: 0,
|
||
href: this.collageitem.url + this.collageitem.collage_id + 'invitation' + this
|
||
.collageitem.invite,
|
||
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
|
||
imageUrl: this.goods.cover,
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: err.errMsg,
|
||
icon: 'none'
|
||
})
|
||
},
|
||
success: (res) => {
|
||
this.collageitem = {}
|
||
}
|
||
})
|
||
break;
|
||
}
|
||
},
|
||
|
||
// 弹出 拼团不可点
|
||
showPinToast() {
|
||
uni.showToast({
|
||
title: this.goods.active.message,
|
||
icon: 'none',
|
||
mask: true,
|
||
})
|
||
},
|
||
clickSkus(index, id) {
|
||
this.skuid = ''
|
||
this.specselect[index] = id;
|
||
let newlist = []
|
||
let str = ''
|
||
for (var i in this.specselect) {
|
||
if (i == index) {
|
||
newlist.push(id);
|
||
if (i == 0) {
|
||
str = id
|
||
} else {
|
||
str = str + '|' + id
|
||
}
|
||
} else {
|
||
newlist.push(this.specselect[i])
|
||
if (i == 0) {
|
||
str = this.specselect[i]
|
||
} else {
|
||
str = str + '|' + this.specselect[i]
|
||
}
|
||
}
|
||
|
||
}
|
||
for (var i in this.skus) {
|
||
if (this.skus[i].unit == str) {
|
||
this.selectSkusValues = this.skus[i];
|
||
break;
|
||
}
|
||
}
|
||
this.specselect = newlist
|
||
},
|
||
toVip(){
|
||
uni.navigateTo({
|
||
url: '/pages/store/vip/index/index?id=' + this.goods.shop.shop_id + '&identityId=' + this.goods.shop_vip.card.identity_id,
|
||
})
|
||
},
|
||
// 会员商品领取
|
||
vipBuy() {
|
||
if (this.shop_vip.is_vip) {
|
||
if (this.shop_vip.is_receive) {
|
||
uni.showModal({
|
||
title: '温馨提示',
|
||
content: this.shop_vip.alert_text + '请联系线下商家:' + this.goods.shop.mobile,
|
||
cancelText: '再看看',
|
||
cancelColor: '#999',
|
||
showCancel: false,
|
||
confirmColor: '#34ce98',
|
||
confirmText: ' 知道了',
|
||
success: (res) => {
|
||
// if (res.confirm) {
|
||
// //#ifdef MP-WEIXIN
|
||
// uni.makePhoneCall({
|
||
// phoneNumber: '18354789632'
|
||
// });
|
||
// //#endif
|
||
// //#ifdef APP-PLUS
|
||
// plus.device.dial('18354789632', true);
|
||
// //#endif
|
||
// }
|
||
}
|
||
})
|
||
} else {
|
||
console.log('已经是会员,且未领取领取了商品,')
|
||
this.goUrl();
|
||
}
|
||
} else {
|
||
uni.showModal({
|
||
title: '温馨提示',
|
||
content: '您还不是该店铺的会员',
|
||
cancelColor: '#999',
|
||
cancelText: '再想想',
|
||
confirmColor: "#34ce98",
|
||
confirmText: '立即开通',
|
||
success: (res) => {
|
||
if (res.confirm) {
|
||
this.close();
|
||
uni.navigateTo({
|
||
url: '/pages/store/vip/index/index?id=' + this.goods.shop
|
||
.shop_id
|
||
})
|
||
}
|
||
}
|
||
})
|
||
}
|
||
},
|
||
buy() {
|
||
if (this.$store.state.token === '') {
|
||
const Auth = new userAuth()
|
||
Auth.Login()
|
||
return
|
||
}
|
||
if (this.goods.type === 2) {
|
||
this.open();
|
||
return
|
||
}
|
||
this.goUrl();
|
||
},
|
||
buy2(value) {
|
||
let {
|
||
sku_id,
|
||
stock
|
||
} = value;
|
||
if (stock > 0) {
|
||
this.skuid = sku_id;
|
||
this.goUrl()
|
||
} else {
|
||
uni.showToast({
|
||
title: '当前商品库存不足',
|
||
icon: 'none',
|
||
mask: true,
|
||
duration: 2000
|
||
})
|
||
}
|
||
},
|
||
goUrl() {
|
||
let params = {
|
||
skuId: this.skuid,
|
||
qty: this.qty
|
||
}
|
||
if (this.goods.is_active) {
|
||
params.type = 'pin';
|
||
params.collageid = this.collageitem.collage_id || '';
|
||
}
|
||
if (this.shareId != '') {
|
||
params.collageid = this.shareId || '';
|
||
}
|
||
console.log(params)
|
||
this.$Router.push({
|
||
name: 'StoreBuy',
|
||
params: params
|
||
})
|
||
this.close()
|
||
},
|
||
toShop(id) {
|
||
this.$Router.push({
|
||
name: 'ShopDetail',
|
||
params: {
|
||
ShopId: id
|
||
}
|
||
})
|
||
},
|
||
// 参与别人的拼团
|
||
applyPin() {
|
||
if (this.$store.state.token === '') {
|
||
const Auth = new userAuth()
|
||
Auth.Login()
|
||
return
|
||
}
|
||
this.goUrl();
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
.goods-swiper {
|
||
position: relative;
|
||
width: 100%;
|
||
padding-top: 110%;
|
||
background: $window-color;
|
||
|
||
&>swiper {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
|
||
.swiper-cover {
|
||
width: 100%;
|
||
height: 100%;
|
||
|
||
image {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
}
|
||
}
|
||
|
||
.swiper-pages {
|
||
position: absolute;
|
||
bottom: 20rpx;
|
||
left: 0;
|
||
right: 0;
|
||
z-index: 9;
|
||
line-height: 90rpx;
|
||
text-align: center;
|
||
color: white;
|
||
font-size: $title-size-m;
|
||
text-shadow: 0 5rpx 5rpx rgba($color: #000000, $alpha: .02);
|
||
}
|
||
|
||
.vipGoodsInfo {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
z-index: 10;
|
||
background-color: #d81e06;
|
||
color: #fff;
|
||
font-size: 30rpx;
|
||
padding: 4rpx 30rpx;
|
||
border-radius: 0 0 40rpx 0;
|
||
}
|
||
}
|
||
|
||
// 详情
|
||
.main {
|
||
position: relative;
|
||
z-index: 9;
|
||
margin-top: -20rpx;
|
||
background: white;
|
||
border-radius: $radius $radius 0 0;
|
||
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
|
||
padding-bottom: ($padding*2) + 90;
|
||
|
||
.vipType {
|
||
color: #fff;
|
||
font-size: 28rpx;
|
||
margin-right: 10rpx;
|
||
padding: 2rpx 20rpx;
|
||
background-color: #e5c175;
|
||
border-radius: 20rpx 0 20rpx 0;
|
||
}
|
||
|
||
.hr {
|
||
position: relative;
|
||
min-height: 1rpx;
|
||
margin: 0 $margin;
|
||
text-align: center;
|
||
|
||
text {
|
||
position: relative;
|
||
z-index: 1;
|
||
color: $text-gray;
|
||
font-size: $title-size-m;
|
||
background: white;
|
||
padding: 0 $padding;
|
||
}
|
||
|
||
&::after {
|
||
content: " ";
|
||
background: $border-color;
|
||
width: 100%;
|
||
height: 1rpx;
|
||
position: absolute;
|
||
left: 0;
|
||
top: 50%;
|
||
}
|
||
}
|
||
|
||
.title {
|
||
padding: $padding;
|
||
font-weight: bold;
|
||
font-size: $title-size + 14;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
flex-wrap: wrap;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.sub-title {
|
||
padding: 0 $padding;
|
||
font-size: $title-size-m;
|
||
color: $text-gray;
|
||
}
|
||
|
||
.box-flex {
|
||
padding: $padding;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
|
||
.price {
|
||
font-weight: bold;
|
||
color: $text-price;
|
||
font-size: $title-size + 10;
|
||
|
||
text {
|
||
font-size: 60%;
|
||
margin-left: 10rpx;
|
||
}
|
||
|
||
.del {
|
||
text-decoration: line-through;
|
||
margin-left: 20rpx;
|
||
font-size: 26rpx;
|
||
color: #999;
|
||
font-weight: normal;
|
||
}
|
||
}
|
||
|
||
.sales {
|
||
font-size: $title-size-m;
|
||
color: $text-gray;
|
||
}
|
||
|
||
._pin {
|
||
font-size: 26rpx;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
box-sizing: border-box;
|
||
color: $text-gray;
|
||
|
||
._has {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
box-sizing: border-box;
|
||
color: #d81e06;
|
||
background-color: rgba($color: $text-price, $alpha: 0.1);
|
||
padding: 4rpx 10rpx;
|
||
border-radius: 30rpx;
|
||
|
||
image {
|
||
width: 24rpx;
|
||
height: 24rpx;
|
||
margin-right: 10rpx;
|
||
}
|
||
}
|
||
|
||
.tuan {
|
||
margin-left: $margin;
|
||
}
|
||
}
|
||
}
|
||
|
||
.unit {
|
||
padding: 30rpx;
|
||
font-size: $title-size;
|
||
color: #333;
|
||
border-top: solid 20rpx #f9f9f9;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
box-sizing: border-box;
|
||
|
||
}
|
||
|
||
.vipInfo {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
box-sizing: border-box;
|
||
background-image: linear-gradient(to right, #38353c, #5f585f);
|
||
padding: 0 $padding;
|
||
margin: 0 $margin;
|
||
border-radius: 20rpx 20rpx 0 0;
|
||
position: relative;
|
||
height: 140rpx;
|
||
overflow: hidden;
|
||
|
||
.title {
|
||
color: rgba($color: #fff, $alpha: 0.8);
|
||
font-size: 40rpx;
|
||
font-weight: bold;
|
||
flex: 1;
|
||
|
||
.des {
|
||
font-size: 24rpx;
|
||
color: rgba($color: #fff, $alpha: 0.7);
|
||
font-weight: normal;
|
||
}
|
||
|
||
}
|
||
|
||
image {
|
||
width: 500rpx;
|
||
height: 400rpx;
|
||
position: absolute;
|
||
left: 100rpx;
|
||
z-index: 0;
|
||
}
|
||
|
||
.btn {
|
||
color: rgba($color: #fff, $alpha: 0.8);
|
||
background-color: #38353c;
|
||
opacity: 1 !important;
|
||
padding: 10rpx 30rpx;
|
||
border-radius: 20rpx;
|
||
position: relative;
|
||
z-index: 10;
|
||
font-size: 26rpx;
|
||
}
|
||
}
|
||
|
||
.is_active {
|
||
border-top: solid 20rpx #f9f9f9;
|
||
|
||
.title {
|
||
font-size: 30rpx;
|
||
color: #333;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
box-sizing: border-box;
|
||
border-bottom: solid 1rpx #f9f9f9;
|
||
|
||
span {
|
||
font-size: 26rpx;
|
||
color: #666;
|
||
font-weight: normal;
|
||
}
|
||
}
|
||
|
||
.content {
|
||
padding: 0 $padding;
|
||
|
||
.content-item {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
box-sizing: border-box;
|
||
font-size: 28rpx;
|
||
padding-bottom: $padding - 10;
|
||
padding-top: $padding - 10;
|
||
border-bottom: solid 1rpx #f9f9f9;
|
||
|
||
.info {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
|
||
|
||
.avatar-group {
|
||
margin-right: 30rpx;
|
||
}
|
||
|
||
.nickname {
|
||
width: 300rpx;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
}
|
||
|
||
.btn {
|
||
background-color: $main-color;
|
||
color: white;
|
||
padding: 6rpx 20rpx;
|
||
border-radius: 10rpx;
|
||
}
|
||
|
||
.noneBtn {
|
||
border: #999 1rpx solid;
|
||
color: #999;
|
||
padding: 6rpx 20rpx;
|
||
border-radius: 10rpx;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.imgs {
|
||
image {
|
||
vertical-align: top;
|
||
width: 100%;
|
||
}
|
||
}
|
||
|
||
.shopInfo {
|
||
border-top: solid $padding #f9f9f9;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
padding: $padding $padding - 10;
|
||
border-bottom: solid 10rpx #f9f9f9;
|
||
|
||
.shopInfo-title-left {
|
||
width: 500rpx;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
box-sizing: border-box;
|
||
|
||
.shop-logo {
|
||
width: 100rpx;
|
||
height: 100rpx;
|
||
border-radius: 10rpx;
|
||
border: solid 1rpx #f9f9f9;
|
||
}
|
||
|
||
.shop-title {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
justify-content: flex-start;
|
||
box-sizing: border-box;
|
||
font-size: 26rpx;
|
||
margin-left: $margin;
|
||
color: #999;
|
||
width: 370rpx;
|
||
|
||
.no {
|
||
color: $text-price;
|
||
padding-left: 4rpx;
|
||
}
|
||
|
||
.shop-titl {
|
||
font-size: 34rpx;
|
||
color: #333;
|
||
font-weight: bold;
|
||
margin-bottom: 6rpx;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
width: 100%;
|
||
}
|
||
}
|
||
}
|
||
|
||
.shopInfo-title-right {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
font-size: 26rpx;
|
||
color: #222;
|
||
}
|
||
|
||
}
|
||
|
||
}
|
||
|
||
// 购买
|
||
.footer {
|
||
position: fixed;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
padding: $padding;
|
||
z-index: 98;
|
||
background: white;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
|
||
// linear-gradient(to top, white 86%, rgba(255,255,255,.0))
|
||
.shop {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
font-size: 24rpx;
|
||
color: $text-gray;
|
||
}
|
||
|
||
button {
|
||
background: $main-color;
|
||
margin-left: 60rpx;
|
||
flex: 1;
|
||
color: white;
|
||
border-radius: $radius-lg;
|
||
height: 90rpx;
|
||
line-height: 90rpx;
|
||
font-weight: bold;
|
||
font-size: $title-size;
|
||
|
||
&::after {
|
||
display: none;
|
||
}
|
||
}
|
||
}
|
||
|
||
.getPinTitle {
|
||
text-align: center;
|
||
font-size: 34rpx;
|
||
color: #333333;
|
||
font-weight: bold;
|
||
padding: $padding - 10 0;
|
||
border-bottom: solid 1rpx #f9f9f9;
|
||
position: absolute;
|
||
top: 0;
|
||
width: 100%;
|
||
background-color: #fff !important;
|
||
border-radius: 20rpx 20rpx 0 0;
|
||
z-index: 1000000000000000;
|
||
}
|
||
|
||
.content-2 {
|
||
width: 70vw;
|
||
|
||
.title {
|
||
font-size: 34rpx;
|
||
color: #333333;
|
||
font-weight: bold;
|
||
padding-top: 50rpx;
|
||
text-align: center;
|
||
}
|
||
|
||
.number {
|
||
color: #333333;
|
||
font-size: 28rpx;
|
||
text-align: center;
|
||
color: #999;
|
||
padding-top: 20rpx;
|
||
}
|
||
|
||
.avatars {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
padding-top: $padding * 2;
|
||
position: relative;
|
||
|
||
image {
|
||
width: 90rpx;
|
||
height: 90rpx;
|
||
margin: 10rpx 20rpx;
|
||
border-radius: 50%;
|
||
border: solid 2rpx #f9f9f9;
|
||
}
|
||
|
||
.me {
|
||
position: relative;
|
||
|
||
&::after {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
content: '我';
|
||
border-radius: 20rpx;
|
||
background: $main-color;
|
||
padding: 4rpx 34rpx;
|
||
text-align: center;
|
||
font-size: 24rpx;
|
||
color: #fff;
|
||
}
|
||
}
|
||
|
||
.pin {
|
||
position: relative;
|
||
|
||
&::after {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
content: '拼主';
|
||
background: orange;
|
||
padding: 4rpx 0;
|
||
width: 100%;
|
||
text-align: center;
|
||
font-size: 20rpx;
|
||
color: #fff;
|
||
}
|
||
}
|
||
}
|
||
|
||
.applyPin {
|
||
margin: $margin;
|
||
background-color: $main-color;
|
||
color: #fff;
|
||
padding: $padding - 10;
|
||
text-align: center;
|
||
margin-top: 50rpx;
|
||
border-radius: 10rpx;
|
||
}
|
||
|
||
}
|
||
|
||
|
||
.getPinList {
|
||
width: 80vw;
|
||
max-height: 60vh;
|
||
color: $text-color;
|
||
position: relative;
|
||
|
||
.content {
|
||
padding: 0 $padding;
|
||
padding-top: $padding * 3;
|
||
|
||
.content-item {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
box-sizing: border-box;
|
||
font-size: 28rpx;
|
||
padding-bottom: $padding - 10;
|
||
padding-top: $padding - 10;
|
||
border-bottom: solid 1rpx #f9f9f9;
|
||
|
||
.info {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
|
||
|
||
.avatar-group {
|
||
margin-right: 30rpx;
|
||
}
|
||
|
||
.nickname {
|
||
width: 240rpx;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
}
|
||
|
||
.btn {
|
||
background-color: $main-color;
|
||
color: white;
|
||
padding: 6rpx 20rpx;
|
||
border-radius: 10rpx;
|
||
}
|
||
|
||
.noneBtn {
|
||
border: #999 1rpx solid;
|
||
color: #999;
|
||
padding: 6rpx 20rpx;
|
||
border-radius: 10rpx;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// 规格弹窗
|
||
.skuView {
|
||
min-height: 30vh;
|
||
max-height: 60vh;
|
||
padding: $padding + 10 $padding;
|
||
color: $text-color;
|
||
box-sizing: border-box;
|
||
|
||
// 商品信息
|
||
.goods-info {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
border-bottom: solid 1rpx #f9f9f9;
|
||
padding-bottom: 20rpx;
|
||
|
||
.goods-cover {
|
||
width: 200rpx;
|
||
height: 200rpx;
|
||
border-radius: 20rpx;
|
||
}
|
||
|
||
.baseInfo {
|
||
flex: 1;
|
||
padding-left: $padding;
|
||
box-sizing: border-box;
|
||
|
||
.money {
|
||
font-size: $title-size + 14;
|
||
font-weight: bold;
|
||
color: $text-price;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
box-sizing: border-box;
|
||
|
||
span {
|
||
font-weight: normal;
|
||
font-size: $title-size-m - 4;
|
||
padding-left: 10rpx;
|
||
padding-top: 12rpx;
|
||
display: inline-block;
|
||
}
|
||
}
|
||
|
||
.shop-name {
|
||
background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba($color: $text-price, $alpha: 0.5));
|
||
display: inline-block;
|
||
padding: 4rpx 20rpx 4rpx 0;
|
||
color: #71440b;
|
||
font-size: $title-size-m - 2;
|
||
}
|
||
|
||
.sku-text {
|
||
font-size: $title-size-m - 2;
|
||
padding-top: 10rpx;
|
||
color: $text-gray;
|
||
}
|
||
|
||
.stock {
|
||
font-size: $title-size-m - 2;
|
||
padding-top: 6rpx;
|
||
color: $text-gray;
|
||
}
|
||
}
|
||
}
|
||
|
||
.buy-number {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
box-sizing: border-box;
|
||
padding: $padding + 20 0 $padding 0;
|
||
|
||
.buy-title {
|
||
font-size: 32rpx;
|
||
font-weight: bold;
|
||
}
|
||
}
|
||
|
||
// 规格
|
||
.sku {
|
||
.sku-title {
|
||
font-size: 32rpx;
|
||
font-weight: bold;
|
||
padding-top: 30rpx;
|
||
}
|
||
|
||
.sku-list {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
box-sizing: border-box;
|
||
flex-wrap: wrap;
|
||
|
||
.sku-item {
|
||
padding: 10rpx 30rpx;
|
||
border: solid 1rpx #f9f9f9;
|
||
margin-right: 20rpx;
|
||
margin-top: 20rpx;
|
||
border-radius: 40rpx;
|
||
background-color: #f9f9f9;
|
||
font-size: 30rpx;
|
||
min-width: 70rpx;
|
||
text-align: center;
|
||
}
|
||
|
||
.sku-active {
|
||
background-color: rgba($color: $main-color, $alpha: 0.2);
|
||
color: $main-color;
|
||
font-weight: bold;
|
||
}
|
||
}
|
||
}
|
||
|
||
.now-buy {
|
||
background-color: #34ce98;
|
||
color: #fff;
|
||
border: none;
|
||
margin-top: $margin;
|
||
}
|
||
}
|
||
</style>
|