Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx
This commit is contained in:
		
						commit
						78769b8583
					
				@ -205,10 +205,18 @@ export default {
 | 
			
		||||
			getPinTuanDetails({ pintuan_id }) {
 | 
			
		||||
				return vm.$u.post('Specialci/pintuanInfo', { pintuan_id: pintuan_id });
 | 
			
		||||
			},
 | 
			
		||||
			// pintuanPush
 | 
			
		||||
			// 推荐拼团
 | 
			
		||||
			getPinTuanPush() {
 | 
			
		||||
				return vm.$u.post('Specialci/pintuanPush');
 | 
			
		||||
			},
 | 
			
		||||
			// 开团/参团
 | 
			
		||||
			withImmediate({ pintuan_id, pintuangroup_headid, pintuangroup_id}) {
 | 
			
		||||
				return vm.$u.post('Specialci/withImmediate', {
 | 
			
		||||
					pintuan_id: pintuan_id,
 | 
			
		||||
					pintuangroup_headid: pintuangroup_headid,
 | 
			
		||||
					pintuangroup_id: pintuangroup_id,
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			// 商品分类(拼团分类)
 | 
			
		||||
			getGoodsClass() {
 | 
			
		||||
				return vm.$u.post('Specialci/goodsClass');
 | 
			
		||||
 | 
			
		||||
@ -308,7 +308,6 @@ export default {
 | 
			
		||||
			delMessage({ type }) {
 | 
			
		||||
				return vm.$u.post('/message/readMessage', { type });
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			// 已读消息
 | 
			
		||||
			refreshToken({  }) {
 | 
			
		||||
				return vm.$u.post('/Auth/refreshToken', { });
 | 
			
		||||
@ -321,6 +320,12 @@ export default {
 | 
			
		||||
			articleDelShield({ id }) {
 | 
			
		||||
				return vm.$u.post('article/articleDelShield', { member_id: id });
 | 
			
		||||
			},
 | 
			
		||||
			// 配置
 | 
			
		||||
			getConfigInfo({ code }) {
 | 
			
		||||
				return vm.$u.post('Document/getConfigInfo', {
 | 
			
		||||
					code: code,
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -6,10 +6,17 @@ const store = new Vuex.Store({
 | 
			
		||||
	state: {
 | 
			
		||||
		cartInfo: {}, // 购物车数据
 | 
			
		||||
		orderAddress: {}, // 下单时选择的地址
 | 
			
		||||
		goodsDetails: {}, // 商品详情 1普通 2拼团 3秒杀 4优惠券
 | 
			
		||||
	},
 | 
			
		||||
	getters: {
 | 
			
		||||
		getOrderAddress(state) {
 | 
			
		||||
			return state.orderAddress;
 | 
			
		||||
		},
 | 
			
		||||
		getGoodsType(state) {
 | 
			
		||||
			return state.goodsDetails.type;
 | 
			
		||||
		},
 | 
			
		||||
		getGoodsInfo(state) {
 | 
			
		||||
			return state.goodsDetails.goods;
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	mutations: {
 | 
			
		||||
@ -18,7 +25,10 @@ const store = new Vuex.Store({
 | 
			
		||||
		},
 | 
			
		||||
		updateAddress(state, address) {
 | 
			
		||||
			state.orderAddress = address;
 | 
			
		||||
		}
 | 
			
		||||
		},
 | 
			
		||||
		setGoodsDetails(state, goods) {
 | 
			
		||||
			state.goodsDetails = goods;
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
})
 | 
			
		||||
export default store;
 | 
			
		||||
@ -4,7 +4,7 @@
 | 
			
		||||
        <text class="name">{{ info.member_nickname }}</text>
 | 
			
		||||
        <text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
 | 
			
		||||
        <view class="guanzhu"  @tap="changeType(info.member_id)" v-if="info.is_attention == 1">关注</view>
 | 
			
		||||
        <view class="guanzhu" @tap="changeType(info.member_id)" v-else>未关注</view>
 | 
			
		||||
        <view class="guanzhu action" @tap="changeType(info.member_id)" v-else >未关注</view>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
@ -32,6 +32,7 @@ export default {
 | 
			
		||||
			// })
 | 
			
		||||
		},
 | 
			
		||||
		changeType:function(type){
 | 
			
		||||
			console.log("111")
 | 
			
		||||
			this.$emit("pChangeType",type) 
 | 
			
		||||
		},
 | 
			
		||||
		
 | 
			
		||||
@ -77,5 +78,8 @@ export default {
 | 
			
		||||
        margin-top: 19rpx;
 | 
			
		||||
        border-radius: 25rpx;
 | 
			
		||||
    }
 | 
			
		||||
	.action{
 | 
			
		||||
		background: #f3f3f3;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
    <view class="video-item" v-if="item" @click="toDetailsPage(item.article_id)">
 | 
			
		||||
        <image class="head" :src="item.article_pic" v-if="item.type == 1" ></image>
 | 
			
		||||
		<view class="header_fist"  v-else>
 | 
			
		||||
			<view class="backes">111</view>
 | 
			
		||||
			<view class="backes"></view>
 | 
			
		||||
			<image class="head" :src="item.article_pic" ></image>
 | 
			
		||||
		</view>
 | 
			
		||||
        <view class="title" v-if="!isguanzhu">{{ item.article_title }}</view>
 | 
			
		||||
@ -172,7 +172,7 @@
 | 
			
		||||
		.backes{
 | 
			
		||||
			position: absolute;
 | 
			
		||||
			top: 0;
 | 
			
		||||
			background: #000000;
 | 
			
		||||
			background: rgba(0,0,0,0.6);
 | 
			
		||||
			width: 100%;
 | 
			
		||||
			height: 100%;
 | 
			
		||||
			color: #fff;
 | 
			
		||||
 | 
			
		||||
@ -26,7 +26,6 @@
 | 
			
		||||
/**
 | 
			
		||||
 * coupon 领取的优惠券 自己的优惠券
 | 
			
		||||
 * @description 优惠券组件
 | 
			
		||||
 * @property {Number} type 优惠券操作方式(可兑换的优惠券: 0 / 自己的优惠券: 1)
 | 
			
		||||
 * @property {Object} coupon-info 优惠券信息
 | 
			
		||||
 * @event {Function} use 使用优惠券
 | 
			
		||||
 */
 | 
			
		||||
@ -36,20 +35,18 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
	props: {
 | 
			
		||||
		status: Number,
 | 
			
		||||
		type: Number,
 | 
			
		||||
		couponInfo: Object,
 | 
			
		||||
		goodsClass: Array,
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		// console.log(this.couponInfo);
 | 
			
		||||
		// this.getGoodsClass();
 | 
			
		||||
	},
 | 
			
		||||
	filters: {
 | 
			
		||||
		showClass(value, classList) {
 | 
			
		||||
			const ids = classList.filter(element => {
 | 
			
		||||
				return element.gc_id == value;
 | 
			
		||||
			});
 | 
			
		||||
			console.log(ids);
 | 
			
		||||
			// console.log(ids);
 | 
			
		||||
			return ids.length ? ids[0].gc_name : '';
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
@ -5,16 +5,15 @@
 | 
			
		||||
            <text>查看更多></text>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="label">
 | 
			
		||||
            <text>sda</text>
 | 
			
		||||
            <text>asda</text>
 | 
			
		||||
            <text>dsad</text>
 | 
			
		||||
            <text>asdas</text>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="list">
 | 
			
		||||
            <sitem></sitem>
 | 
			
		||||
            <sitem></sitem>
 | 
			
		||||
            <sitem></sitem>
 | 
			
		||||
            <u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
 | 
			
		||||
        </view>
 | 
			
		||||
		<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 130px">
 | 
			
		||||
			<swiper-item class="swiper-item" v-for="(_, i) in classifyList" :key="i">
 | 
			
		||||
				<!-- 最多显示3个 -->
 | 
			
		||||
				<sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem>
 | 
			
		||||
				<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList.length"></u-empty>
 | 
			
		||||
			</swiper-item>
 | 
			
		||||
		</swiper>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
@ -23,12 +22,27 @@ export default {
 | 
			
		||||
    name:"group",
 | 
			
		||||
    components:{
 | 
			
		||||
        sitem
 | 
			
		||||
    },
 | 
			
		||||
	},
 | 
			
		||||
	props: {
 | 
			
		||||
		groupList: Array,
 | 
			
		||||
		classifyList: Array,
 | 
			
		||||
	},
 | 
			
		||||
    data(){
 | 
			
		||||
        return {
 | 
			
		||||
 | 
			
		||||
			current: 0,
 | 
			
		||||
			swiperCurrent: 0,
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		tabsChange(index) {
 | 
			
		||||
			this.swiperCurrent = index;
 | 
			
		||||
		},
 | 
			
		||||
		animationfinish(e) {
 | 
			
		||||
			let current = e.detail.current;
 | 
			
		||||
			this.swiperCurrent = current;
 | 
			
		||||
			this.current = current;
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
 | 
			
		||||
@ -1,17 +1,19 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <view class="item">
 | 
			
		||||
        <image class="head"></image>
 | 
			
		||||
        <text class="title">商品名</text>
 | 
			
		||||
        <image class="head" :src="info.pintuan_image"></image>
 | 
			
		||||
        <text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
 | 
			
		||||
        <view class="price">
 | 
			
		||||
            <text>¥99</text>
 | 
			
		||||
           <text>立即购买</text>
 | 
			
		||||
 | 
			
		||||
            <text>¥{{ info.pintuan_goods_price }}</text>
 | 
			
		||||
           	<text>立即购买</text>
 | 
			
		||||
        </view>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
    name:"item"
 | 
			
		||||
	name:"item",
 | 
			
		||||
	props: {
 | 
			
		||||
		info: Object
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
@ -24,6 +26,8 @@ export default {
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    .title{
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
		width: 100%;
 | 
			
		||||
        font-size: 26rpx;
 | 
			
		||||
        color: #333;
 | 
			
		||||
        margin-top: 16rpx;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										155
									
								
								components/shop/recommend/pintuan.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										155
									
								
								components/shop/recommend/pintuan.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,155 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <view class="recommend">
 | 
			
		||||
        <view class="top">
 | 
			
		||||
            <text>今日拼团推荐</text>
 | 
			
		||||
            <text @click="toDetailsPage">点击查看更多></text>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="connect">
 | 
			
		||||
            <view class="user">
 | 
			
		||||
                <view class="avatar">
 | 
			
		||||
					<image :src="info.member_avatar[0]"></image>
 | 
			
		||||
					<image :src="info.member_avatar[1]"></image>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="num">{{ info.pintuan_limit_number }}人团</view>
 | 
			
		||||
            </view>
 | 
			
		||||
            <view class="info">
 | 
			
		||||
                <text class="u-line-1">{{ info.groupbuy_name }}</text>
 | 
			
		||||
                <text class="u-line-2">{{ info.goods_name }}</text>
 | 
			
		||||
                <view>
 | 
			
		||||
                    <text>¥{{ info.groupbuy_price }}</text>
 | 
			
		||||
                    <text>¥{{ info.goods_price }}</text>
 | 
			
		||||
                </view>
 | 
			
		||||
            </view>
 | 
			
		||||
            <image class="img" :src="info.groupbuy_image1"></image>
 | 
			
		||||
        </view>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
	name:"recommend",
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			info: {}
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	props: ['recommendData', 'type'],
 | 
			
		||||
	created() {
 | 
			
		||||
		this.info = this.recommendData;
 | 
			
		||||
		console.log(this.recommendData);
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		toDetailsPage() {
 | 
			
		||||
			this.$u.api.getPinTuanDetails({
 | 
			
		||||
				pintuan_id: this.recommendData.pintuan_id
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					const goods = {
 | 
			
		||||
						goods: res.data.data,
 | 
			
		||||
						type: 2,
 | 
			
		||||
					}
 | 
			
		||||
					this.$store.commit('setGoodsDetails', goods);
 | 
			
		||||
					this.$u.route({
 | 
			
		||||
						url: 'pageB/sdetails/index',
 | 
			
		||||
						params: {
 | 
			
		||||
							id: this.recommendData.pintuan_id
 | 
			
		||||
						}
 | 
			
		||||
					})
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.recommend{
 | 
			
		||||
    .top{
 | 
			
		||||
        height: 90rpx;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        >text:first-child{
 | 
			
		||||
            font-size: 30rpx;
 | 
			
		||||
            color: #333;
 | 
			
		||||
        }
 | 
			
		||||
        >text:last-child{
 | 
			
		||||
            font-size: 18rpx;
 | 
			
		||||
            color: #999;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    .connect{
 | 
			
		||||
        display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
        .user {
 | 
			
		||||
			margin-right: 16px;
 | 
			
		||||
			.avatar {
 | 
			
		||||
				width: 96rpx;
 | 
			
		||||
				height: 64rpx;
 | 
			
		||||
				margin-bottom: 16rpx;
 | 
			
		||||
				position: relative;
 | 
			
		||||
				> image {
 | 
			
		||||
					position: absolute;
 | 
			
		||||
					width: 64rpx;
 | 
			
		||||
					height: 64rpx;
 | 
			
		||||
					border-radius: 50%;
 | 
			
		||||
					&:first-child {
 | 
			
		||||
						left: 0;
 | 
			
		||||
						top: 0;
 | 
			
		||||
						z-index: 8;
 | 
			
		||||
						background-color: aqua;
 | 
			
		||||
					}
 | 
			
		||||
					&:last-child {
 | 
			
		||||
						left: 32rpx;
 | 
			
		||||
						top: 0;
 | 
			
		||||
						z-index: 9;
 | 
			
		||||
						background-color: antiquewhite;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			.num {
 | 
			
		||||
				text-align: center;
 | 
			
		||||
				font-size: 28rpx;
 | 
			
		||||
				font-weight: 500;
 | 
			
		||||
				color: rgba(253,211,96,1);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
        .info{
 | 
			
		||||
			width: 340rpx;
 | 
			
		||||
            display: flex;
 | 
			
		||||
            flex-direction: column;
 | 
			
		||||
            >text:nth-child(1){
 | 
			
		||||
                font-size: 28rpx;
 | 
			
		||||
                color: #333;
 | 
			
		||||
            }
 | 
			
		||||
            >text:nth-child(2){
 | 
			
		||||
                margin-top: 17rpx;
 | 
			
		||||
                line-height: 36rpx;
 | 
			
		||||
                font-size: 24rpx;
 | 
			
		||||
                color: #666;
 | 
			
		||||
            }
 | 
			
		||||
            >view{
 | 
			
		||||
                margin-top: 24rpx;
 | 
			
		||||
                display: flex;
 | 
			
		||||
                align-items: flex-end;
 | 
			
		||||
                
 | 
			
		||||
                >text:first-child{
 | 
			
		||||
                    font-size: 27rpx;
 | 
			
		||||
                    color: #FF3131;
 | 
			
		||||
                }
 | 
			
		||||
                >text:last-child{
 | 
			
		||||
                    font-size: 24rpx;
 | 
			
		||||
                    color: #999;
 | 
			
		||||
                    margin-left: 33rpx;
 | 
			
		||||
					text-decoration: line-through;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        .img{
 | 
			
		||||
            width: 213rpx;
 | 
			
		||||
            height: 160rpx;
 | 
			
		||||
            flex-shrink: 0;
 | 
			
		||||
            margin-left: 13rpx;
 | 
			
		||||
			background-color: antiquewhite;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -74,7 +74,10 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
		setViewHeight() {
 | 
			
		||||
			// 一个优惠券的高度 97px, 下距离 10px
 | 
			
		||||
			const num = this.couponList.length;
 | 
			
		||||
			let num = 0;
 | 
			
		||||
			num = this.couponList.length 
 | 
			
		||||
				? this.couponList.length > 4 ? 4 : this.couponList.length
 | 
			
		||||
				: 1
 | 
			
		||||
			this.swiperHeight = (97 + 10) * num - 10 + 'px';
 | 
			
		||||
		},
 | 
			
		||||
		toCouponPage() {
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@
 | 
			
		||||
            <text>输入达人名称</text>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="list">
 | 
			
		||||
            <darenItem style="margin-top:20rpx;margin-right:23rpx" v-for="item in recommendList" :key="item.id" :info="item"></darenItem>
 | 
			
		||||
            <darenItem style="margin-top:20rpx;margin-right:23rpx" v-for="item in recommendList" :key="item.id" :info="item"  v-on:pChangeType="changeType" ></darenItem>
 | 
			
		||||
        </view>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
@ -64,6 +64,16 @@ export default {
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		changeType(member_id){
 | 
			
		||||
			console.log(member_id);
 | 
			
		||||
			this.$emit("pChangeType")
 | 
			
		||||
			this.$u.api.attentionMember({
 | 
			
		||||
				member_id: member_id
 | 
			
		||||
			}).then((res)=>{
 | 
			
		||||
				console.log(res)
 | 
			
		||||
				this.getRecommendList();
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		searchValue() {
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url: '/pageB/search/index'
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <view class="sdetails">
 | 
			
		||||
        <u-swiper :list="list" height="500" border-radius="0"></u-swiper>
 | 
			
		||||
        <u-swiper :list="list" height="500" border-radius="0" mode="dot"></u-swiper>
 | 
			
		||||
        <view class="info">
 | 
			
		||||
            <view class="title">
 | 
			
		||||
                <text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }}        
 | 
			
		||||
            <view class="title u-line-2">
 | 
			
		||||
                <text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }}
 | 
			
		||||
            </view>
 | 
			
		||||
            <view class="pic">
 | 
			
		||||
                <text>¥{{ goodsInfo.goods_price }}</text>
 | 
			
		||||
@ -15,6 +15,39 @@
 | 
			
		||||
        <navs :value="'产品规格'"></navs>
 | 
			
		||||
		<navs :value="'产品颜色'"></navs>
 | 
			
		||||
		<navs :value="'选择尺码'"></navs>
 | 
			
		||||
		<view class="hr"></view>
 | 
			
		||||
		<view class="group-user" v-if="groupUser.length">
 | 
			
		||||
			<view class="top">
 | 
			
		||||
				<view class="title">{{ groupUser.length }}人正在拼团,可直接参与</view>
 | 
			
		||||
				<view class="view-more">
 | 
			
		||||
					<text>查看全部</text>
 | 
			
		||||
					<image src="/static/image/common/1.png"></image>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="bottom">
 | 
			
		||||
				<view class="left">
 | 
			
		||||
					<view class="avatar">
 | 
			
		||||
						<image v-for="(user, i) in groupUser" :src="user[0].member_avatar" :key="i"></image>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="all">
 | 
			
		||||
						<text>查看全部</text>
 | 
			
		||||
						<image src="/static/image/common/1.png"></image>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="right">
 | 
			
		||||
					<view class="launch-user">
 | 
			
		||||
						<image :src="groupUser[0][0].member_avatar"></image>
 | 
			
		||||
						<text class="u-line-1">{{ groupUser[0][0].member_nickname }}</text>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="involvement-user">
 | 
			
		||||
						<view class="item" v-for="(user, i) in groupUser.slice(1)" :key="i">
 | 
			
		||||
							<image :src="user[0].member_avatar"></image>
 | 
			
		||||
							<text class="u-line-1">{{ user[0].member_nickname }}</text>
 | 
			
		||||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
        <view class="xiangqing">
 | 
			
		||||
            <view class="heng"></view>
 | 
			
		||||
            <view class="title">商品详情</view>
 | 
			
		||||
@ -23,22 +56,31 @@
 | 
			
		||||
		<view class="rich">
 | 
			
		||||
			<rich-text :nodes="goodsInfo.mobile_body"></rich-text>
 | 
			
		||||
		</view>
 | 
			
		||||
        <tloos @buy="buy" @xuanze="xuanze" :id="goodsInfo.goods_commonid" :info="info"></tloos>
 | 
			
		||||
		<!-- 拼团 tool -->
 | 
			
		||||
		<view class="group-tool" v-if="type==2">
 | 
			
		||||
			<view class="launch" @click="withImmediate">发起拼团</view>
 | 
			
		||||
			<view class="involvement">参与拼团</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<!-- 普通商品 tool -->
 | 
			
		||||
        <tloos @buy="buy" @xuanze="xuanze" :id="goodsInfo.goods_commonid" :info="info" v-if="type==1"></tloos>
 | 
			
		||||
        <u-toast ref="uToast" />
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import navs from "../components/sdetails/navs"
 | 
			
		||||
import tloos from "../components/sdetails/tloos"
 | 
			
		||||
export default { 
 | 
			
		||||
export default {
 | 
			
		||||
    name:"sdetails",
 | 
			
		||||
    data() {
 | 
			
		||||
        return {
 | 
			
		||||
            list: [],
 | 
			
		||||
            list: [], // 轮播图列表
 | 
			
		||||
            goodsInfo: {},
 | 
			
		||||
            info:{},
 | 
			
		||||
            glist:[],
 | 
			
		||||
            id:0
 | 
			
		||||
			id:0,
 | 
			
		||||
			type: '', // 商品类型
 | 
			
		||||
			groupUser: [], // 拼团用户
 | 
			
		||||
			avatarWidth: '',
 | 
			
		||||
        }
 | 
			
		||||
	},
 | 
			
		||||
    components:{
 | 
			
		||||
@ -46,10 +88,27 @@ export default {
 | 
			
		||||
        tloos
 | 
			
		||||
    },
 | 
			
		||||
	onLoad(option) {
 | 
			
		||||
        this.getGoodsDetails(option.id);
 | 
			
		||||
       
 | 
			
		||||
		this.id = option.id;
 | 
			
		||||
		this.init();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		init() {
 | 
			
		||||
			this.type = this.$store.getters.getGoodsType;
 | 
			
		||||
			const info = this.$store.getters.getGoodsInfo;
 | 
			
		||||
			console.log(info);
 | 
			
		||||
			this.goodsInfo = info.goods;
 | 
			
		||||
			this.groupUser = info.user;
 | 
			
		||||
			// 设置轮播图
 | 
			
		||||
			let list = [];
 | 
			
		||||
			info.goods_image[0].forEach(item => {
 | 
			
		||||
				let temp = {
 | 
			
		||||
					image: item
 | 
			
		||||
				}
 | 
			
		||||
				list.push(temp);
 | 
			
		||||
			})
 | 
			
		||||
			this.list = list;
 | 
			
		||||
			this.setTitle();
 | 
			
		||||
		},
 | 
			
		||||
        buy(info){
 | 
			
		||||
            if(info.type == 2){
 | 
			
		||||
                this.$u.api.addCart({
 | 
			
		||||
@ -80,15 +139,44 @@ export default {
 | 
			
		||||
				}
 | 
			
		||||
            })
 | 
			
		||||
            this.$u.api.goodsInfo({id}).then((res)=>{
 | 
			
		||||
                console.log(res)
 | 
			
		||||
                // console.log(res)
 | 
			
		||||
                this.info = res.data.goods;
 | 
			
		||||
                this.glist = res.data.spec_list;
 | 
			
		||||
            })
 | 
			
		||||
        },
 | 
			
		||||
		},
 | 
			
		||||
		withImmediate() {
 | 
			
		||||
			this.$u.api.withImmediate({
 | 
			
		||||
				pintuan_id: this.id,
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
        xuanze(id){
 | 
			
		||||
            console.log(id)
 | 
			
		||||
            // console.log(id)
 | 
			
		||||
            this.getGoodsDetails(this.glist[id])
 | 
			
		||||
        }
 | 
			
		||||
		},
 | 
			
		||||
		setTitle() {
 | 
			
		||||
			let title = '';
 | 
			
		||||
			switch (this.type) {
 | 
			
		||||
				case 1:
 | 
			
		||||
					
 | 
			
		||||
					break;
 | 
			
		||||
				case 2:
 | 
			
		||||
					title = '拼团商品详情';
 | 
			
		||||
					break;
 | 
			
		||||
				case 1:
 | 
			
		||||
					
 | 
			
		||||
					break;
 | 
			
		||||
				case 1:
 | 
			
		||||
					
 | 
			
		||||
					break;
 | 
			
		||||
				default:
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
			uni.setNavigationBarTitle({
 | 
			
		||||
				title: title
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
@ -128,6 +216,105 @@ export default {
 | 
			
		||||
        height: 20rpx;
 | 
			
		||||
        background-color: #ececec;
 | 
			
		||||
    }
 | 
			
		||||
	.group-user {
 | 
			
		||||
		padding: 30rpx;
 | 
			
		||||
		.top {
 | 
			
		||||
			margin-bottom: 28rpx;
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
			.title {
 | 
			
		||||
				font-size: 30rpx;
 | 
			
		||||
				color: rgba(51,51,51,1);
 | 
			
		||||
			}
 | 
			
		||||
			.view-more {
 | 
			
		||||
				font-size: 24rpx;
 | 
			
		||||
				color: rgba(153,153,153,1);
 | 
			
		||||
				> image {
 | 
			
		||||
					margin-left: 10rpx;
 | 
			
		||||
					width: 8rpx;
 | 
			
		||||
					height: 16rpx;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.bottom {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			font-size: 22rpx;
 | 
			
		||||
			color: rgba(153,153,153,1);
 | 
			
		||||
			.left {
 | 
			
		||||
				margin-right: 40rpx;
 | 
			
		||||
				.avatar {
 | 
			
		||||
					width: 120rpx;
 | 
			
		||||
					height: 60rpx;
 | 
			
		||||
					margin-bottom: 16rpx;
 | 
			
		||||
					position: relative;
 | 
			
		||||
					@mixin avatar($left, $index) {
 | 
			
		||||
						width: 60rpx;
 | 
			
		||||
						height: 60rpx;
 | 
			
		||||
						border-radius: 50%;
 | 
			
		||||
						position: absolute;
 | 
			
		||||
						top: 0;
 | 
			
		||||
						left: $left;
 | 
			
		||||
						z-index: $index;
 | 
			
		||||
					}
 | 
			
		||||
					> image {
 | 
			
		||||
						&:first-child {
 | 
			
		||||
							background-color: aliceblue;
 | 
			
		||||
							@include avatar($left: 0rpx, $index: 7);
 | 
			
		||||
						}
 | 
			
		||||
						&:nth-child(2) {
 | 
			
		||||
							background-color: aquamarine;
 | 
			
		||||
							@include avatar($left: 30rpx, $index: 8);
 | 
			
		||||
						}
 | 
			
		||||
						&:nth-child(3) {
 | 
			
		||||
							background-color: antiquewhite;
 | 
			
		||||
							@include avatar($left: 60rpx, $index: 9);
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				.all {
 | 
			
		||||
					> image {
 | 
			
		||||
						margin-left: 10rpx;
 | 
			
		||||
						width: 8rpx;
 | 
			
		||||
						height: 16rpx;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			.right {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				image {
 | 
			
		||||
					background-color: aquamarine;
 | 
			
		||||
					width: 60rpx;
 | 
			
		||||
					height: 60rpx;
 | 
			
		||||
					margin-bottom: 15rpx;
 | 
			
		||||
					border-radius: 50%;
 | 
			
		||||
				}
 | 
			
		||||
				.launch-user {
 | 
			
		||||
					margin-right: 40rpx;
 | 
			
		||||
					text-align: center;
 | 
			
		||||
					> text {
 | 
			
		||||
						width: 98rpx;
 | 
			
		||||
						display: block;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				.involvement-user {
 | 
			
		||||
					display: flex;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
					.item {
 | 
			
		||||
						text-align: center;
 | 
			
		||||
						> text {
 | 
			
		||||
							display: block;
 | 
			
		||||
							width: 72rpx;
 | 
			
		||||
						}
 | 
			
		||||
						&:not(:last-child) {
 | 
			
		||||
							margin-right: 30rpx;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
    .xiangqing{
 | 
			
		||||
        display: flex;
 | 
			
		||||
        height: 85rpx;
 | 
			
		||||
@ -149,5 +336,28 @@ export default {
 | 
			
		||||
	.rich {
 | 
			
		||||
		width: 100%;
 | 
			
		||||
	}
 | 
			
		||||
	.group-tool {
 | 
			
		||||
		position: fixed;
 | 
			
		||||
		bottom: 0;
 | 
			
		||||
		left: 0;
 | 
			
		||||
		width: 100%;
 | 
			
		||||
		height: 98rpx;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		font-size: 32rpx;
 | 
			
		||||
		color: rgba(255,255,255,1);
 | 
			
		||||
		z-index: 99;
 | 
			
		||||
		.launch {
 | 
			
		||||
			flex: 1;
 | 
			
		||||
			background: rgba(253,211,96,1);
 | 
			
		||||
			line-height: 98rpx;
 | 
			
		||||
			text-align: center;
 | 
			
		||||
		}
 | 
			
		||||
		.involvement {
 | 
			
		||||
			flex: 1;
 | 
			
		||||
			background: rgba(255,120,15,1);
 | 
			
		||||
			line-height: 98rpx;
 | 
			
		||||
			text-align: center;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -33,7 +33,7 @@
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="order-info">
 | 
			
		||||
					<view @click="showCoupon({type: 2, store_id: item[index].store_id})">
 | 
			
		||||
					<view @click="showCoupon({type: 2, store_id: item[0].store_id})">
 | 
			
		||||
						<view class="title">优惠券折扣</view>
 | 
			
		||||
						<view class="value">
 | 
			
		||||
							<view>¥{{ item.coupon_price ? item.coupon_price : '0.00' }}</view>
 | 
			
		||||
@ -69,7 +69,7 @@
 | 
			
		||||
			<scroll-view class="coupon-choose" style="height: 800rpx;">
 | 
			
		||||
				<view class="title">优惠券详情</view>
 | 
			
		||||
				<view class="text">使用优惠券</view>
 | 
			
		||||
				<Coupon :couponInfo="coupon" :status='0' :type="1" @use="useCoupon($event)" v-for="(coupon) in couponList" :key="coupon.vouchertemplate_id"></Coupon>
 | 
			
		||||
				<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in couponList" :key="index"></Coupon>
 | 
			
		||||
				<u-empty text="无可用优惠券" mode="coupon" v-if="!couponList.length"></u-empty>
 | 
			
		||||
			</scroll-view>
 | 
			
		||||
		</u-popup>
 | 
			
		||||
@ -87,7 +87,7 @@
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import Coupon from "@/components/mine/coupon/index";
 | 
			
		||||
import Coupon from "@/components/mine/coupon/mine";
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
@ -111,6 +111,7 @@ export default {
 | 
			
		||||
			couponList: [],
 | 
			
		||||
			couponStatus: false,
 | 
			
		||||
			choiceCoupon: {}, // 使用的平台优惠券
 | 
			
		||||
			goodsClass: [],
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	components: {
 | 
			
		||||
@ -135,6 +136,7 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
	onLoad(option) {
 | 
			
		||||
		this.orderInfo = this.$store.state.cartInfo;
 | 
			
		||||
		console.log(this.orderInfo);
 | 
			
		||||
	},
 | 
			
		||||
	onShow() {
 | 
			
		||||
		// 判断是不是从选择地址页面返回
 | 
			
		||||
@ -193,7 +195,7 @@ export default {
 | 
			
		||||
			})
 | 
			
		||||
			return res;
 | 
			
		||||
		},
 | 
			
		||||
		showCoupon({ type, store_id }) {
 | 
			
		||||
		showCoupon({ type, gc_id, store_id }) {
 | 
			
		||||
			// this.getCoupon({
 | 
			
		||||
			// 	type: type, // 优惠券类型: 1平台券, 2店铺券
 | 
			
		||||
			// 	store_id: store_id,
 | 
			
		||||
@ -201,11 +203,13 @@ export default {
 | 
			
		||||
			// }).then(res => {
 | 
			
		||||
			// 	this.couponStatus = true;
 | 
			
		||||
			// })
 | 
			
		||||
			this.$u.api.getMemberCouponList({
 | 
			
		||||
			let params = {
 | 
			
		||||
				type: type, // 优惠券类型: 1平台券, 2店铺券
 | 
			
		||||
				store_id: store_id,
 | 
			
		||||
				status: 1, // 代金券状态 1:未用 2:已用 3:过期 4:收回
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
			}
 | 
			
		||||
			if(store_id) Object.assign(params, 'store_id', store_id);
 | 
			
		||||
			if(gc_id) Object.assign(params, 'gc_id', gc_id);
 | 
			
		||||
			this.$u.api.getMemberCouponList(params).then(res => {
 | 
			
		||||
				this.couponList = res.data;
 | 
			
		||||
				this.couponStatus = true;
 | 
			
		||||
			})
 | 
			
		||||
@ -256,6 +260,11 @@ export default {
 | 
			
		||||
				url: '/pageE/order/Details'
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		getGoodsClass() {
 | 
			
		||||
			this.$u.api.getGoodsClass().then(res => {
 | 
			
		||||
				this.goodsClass = res.data;
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		changeAddress() {
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url: '/pageE/more/Address?type=choose'
 | 
			
		||||
 | 
			
		||||
@ -35,21 +35,25 @@ export default {
 | 
			
		||||
				minute: true,
 | 
			
		||||
				second: false
 | 
			
		||||
			},
 | 
			
		||||
			show: false
 | 
			
		||||
			show: false,
 | 
			
		||||
			addressInfo: {},
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	onLoad() {
 | 
			
		||||
		this.getConfigInfo();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		validateValue() {
 | 
			
		||||
			if(this.$u.test.isEmpty(this.name)) {
 | 
			
		||||
				this.showToast('姓名不能为空', 'warning');
 | 
			
		||||
				this.showToast('姓名不能为空', 'error');
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
			if(this.$u.test.isEmpty(this.time)) {
 | 
			
		||||
				this.showToast('日期不能为空', 'warning');
 | 
			
		||||
				this.showToast('日期不能为空', 'error');
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
			if(new Date() > new Date(this.time)) {
 | 
			
		||||
				this.showToast('日期错误', 'warning');	
 | 
			
		||||
				this.showToast('日期错误', 'error');	
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
			return true;
 | 
			
		||||
@ -74,6 +78,16 @@ export default {
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		getConfigInfo() {
 | 
			
		||||
			this.$u.api.getConfigInfo({
 | 
			
		||||
				code: 'manicure_address',
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					this.addressInfo = res.data.config;
 | 
			
		||||
					this.address = this.addressInfo.value;
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		chooseDate(e) {
 | 
			
		||||
			// let time = e.year + '年' + e.month + '月' + e.day + '日' + e.hour + '时' + e.minute + '分'
 | 
			
		||||
			let time = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute
 | 
			
		||||
@ -105,6 +119,19 @@ export default {
 | 
			
		||||
				font-size: 30rpx;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.order-name {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			> view {
 | 
			
		||||
				font-size: 30rpx;
 | 
			
		||||
				color: rgba(51,51,51,1);
 | 
			
		||||
			}
 | 
			
		||||
			> input {
 | 
			
		||||
				padding-left: 20rpx;
 | 
			
		||||
				flex: 1;
 | 
			
		||||
				font-size: 28rpx;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.order-address {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
 | 
			
		||||
@ -276,10 +276,10 @@
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			toSearchPage() {
 | 
			
		||||
				
 | 
			
		||||
				// uni.navigateTo({
 | 
			
		||||
				// 	url: '/pageB/follow/index'
 | 
			
		||||
				// })
 | 
			
		||||
			console.log("22");
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
			    url: '/pageB/follow/index'
 | 
			
		||||
			});
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -30,9 +30,6 @@
 | 
			
		||||
                <text>上门取件</text>
 | 
			
		||||
            </view>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="fenlei">
 | 
			
		||||
            <shopitem v-for="item in 5" class="item"></shopitem>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="fenlei">
 | 
			
		||||
            <shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
 | 
			
		||||
        </view>
 | 
			
		||||
@ -43,9 +40,9 @@
 | 
			
		||||
        <seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
 | 
			
		||||
        <view v-if="spikeList.length" class="hr" style="margin-top:40rpx"></view>
 | 
			
		||||
		<!-- 拼团 -->
 | 
			
		||||
        <recommend v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush" type='group'></recommend>
 | 
			
		||||
        <pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
 | 
			
		||||
        <view class="hr" style="margin-top:40rpx" v-if="JSON.stringify(pinTuanPush) != '{}'"></view>
 | 
			
		||||
        <group></group>
 | 
			
		||||
        <group :groupList="pinTuanList" :classifyList="couponGroupList"></group>
 | 
			
		||||
        <image class="lingquan"></image>
 | 
			
		||||
        <youhq></youhq>
 | 
			
		||||
        <view class="hr" style="margin-top:40rpx"></view>
 | 
			
		||||
@ -59,6 +56,7 @@
 | 
			
		||||
<script>
 | 
			
		||||
import shopitem from "@/components/shop/shop-item/index"
 | 
			
		||||
import recommend from "@/components/shop/recommend/index"
 | 
			
		||||
import pintuan from "@/components/shop/recommend/pintuan"
 | 
			
		||||
import seckill from "@/components/shop/seckill/index"
 | 
			
		||||
import group from "@/components/shop/group/index"
 | 
			
		||||
import youhq from "@/components/shop/youhq/index"
 | 
			
		||||
@ -72,7 +70,8 @@ export default {
 | 
			
		||||
        seckill,
 | 
			
		||||
        group,
 | 
			
		||||
        youhq,
 | 
			
		||||
        list
 | 
			
		||||
		list,
 | 
			
		||||
		pintuan
 | 
			
		||||
    },
 | 
			
		||||
    data(){
 | 
			
		||||
        return {
 | 
			
		||||
@ -274,6 +273,7 @@ export default {
 | 
			
		||||
        background-color: #ececec;
 | 
			
		||||
    }
 | 
			
		||||
	.cart {
 | 
			
		||||
		z-index: 9;
 | 
			
		||||
		position: fixed;
 | 
			
		||||
		right: 30rpx;
 | 
			
		||||
		bottom: 300rpx;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								static/image/common/16.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static/image/common/16.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 734 B  | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user