update
This commit is contained in:
		
							parent
							
								
									f30c4f4922
								
							
						
					
					
						commit
						5b31193750
					
				@ -1,6 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<view class="notice">
 | 
						<view class="notice">
 | 
				
			||||||
		<view v-for="(item,index) in notice">
 | 
							<view v-for="(item,index) in notice" :key="index">
 | 
				
			||||||
			<view class="time_notice">2020-05-14 20:11</view>
 | 
								<view class="time_notice">2020-05-14 20:11</view>
 | 
				
			||||||
			<view class="notice_view">
 | 
								<view class="notice_view">
 | 
				
			||||||
				<image :src="item.url" mode="aspectFill" ></image>
 | 
									<image :src="item.url" mode="aspectFill" ></image>
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,7 @@
 | 
				
			|||||||
					<view class="page-section swiper">
 | 
										<view class="page-section swiper">
 | 
				
			||||||
						<view class="page-section-spacing">
 | 
											<view class="page-section-spacing">
 | 
				
			||||||
							<swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="1000">
 | 
												<swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="1000">
 | 
				
			||||||
								<swiper-item v-for="item in list" >
 | 
													<swiper-item v-for="(item,index) in list" :key="index">
 | 
				
			||||||
									<view class="swiper-item uni-bg-red">
 | 
														<view class="swiper-item uni-bg-red">
 | 
				
			||||||
										<image :src=" 'https://' + item.launch_path"></image>
 | 
															<image :src=" 'https://' + item.launch_path"></image>
 | 
				
			||||||
									</view>
 | 
														</view>
 | 
				
			||||||
 | 
				
			|||||||
@ -180,9 +180,15 @@
 | 
				
			|||||||
							return false
 | 
												return false
 | 
				
			||||||
						} else {
 | 
											} else {
 | 
				
			||||||
							me.loginIn(res.data.token); //存储一个字符传值
 | 
												me.loginIn(res.data.token); //存储一个字符传值
 | 
				
			||||||
							uni.navigateTo({
 | 
												if (res.data.member.has_labels) {
 | 
				
			||||||
								url: '/pageA/topick/topick'
 | 
													uni.switchTab({
 | 
				
			||||||
							})
 | 
														url: '/pages/index/index'
 | 
				
			||||||
 | 
													})
 | 
				
			||||||
 | 
												} else {
 | 
				
			||||||
 | 
													uni.navigateTo({
 | 
				
			||||||
 | 
														url: '/pageA/topick/topick'
 | 
				
			||||||
 | 
													})
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
							// 缓存用户的信息
 | 
												// 缓存用户的信息
 | 
				
			||||||
							// uni.setStorageSync({ 
 | 
												// uni.setStorageSync({ 
 | 
				
			||||||
							// 	key: 'user_info',
 | 
												// 	key: 'user_info',
 | 
				
			||||||
@ -198,7 +204,6 @@
 | 
				
			|||||||
						}
 | 
											}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						// 存储接口请求所需token
 | 
											// 存储接口请求所需token
 | 
				
			||||||
						me.loginIn(res.data.token); //存储一个字符传值
 | 
					 | 
				
			||||||
						// // 注册返回参数
 | 
											// // 注册返回参数
 | 
				
			||||||
						// this.$refs.uToast.show({
 | 
											// this.$refs.uToast.show({
 | 
				
			||||||
						// 	title: res.message,
 | 
											// 	title: res.message,
 | 
				
			||||||
 | 
				
			|||||||
@ -59,25 +59,35 @@
 | 
				
			|||||||
			},
 | 
								},
 | 
				
			||||||
			// 点击切换颜色
 | 
								// 点击切换颜色
 | 
				
			||||||
			tapClick(index, id) {
 | 
								tapClick(index, id) {
 | 
				
			||||||
				// console.log(id);
 | 
									// console.log(index);
 | 
				
			||||||
				if (this.rSelect.indexOf(index) == -1) {
 | 
									if (this.rSelect.indexOf(index) == -1) {
 | 
				
			||||||
					this.rSelect.push(index); // 选中状态
 | 
					 | 
				
			||||||
					this.list.push(id); //选中添加到数组里
 | 
					 | 
				
			||||||
					if (this.rSelect.length > 9) {
 | 
										if (this.rSelect.length > 9) {
 | 
				
			||||||
						this.$u.toast("只能选择10个标签!");
 | 
											this.$u.toast("只能选择10个标签!");
 | 
				
			||||||
						return false;
 | 
											return false;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
										this.rSelect.push(index); // 选中状态
 | 
				
			||||||
 | 
										this.list.push(id); //选中添加到数组里
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					this.rSelect.splice(this.rSelect.indexOf(index), 1); //取消
 | 
										this.rSelect.splice(this.rSelect.indexOf(index), 1); //取消
 | 
				
			||||||
					this.list.splice(this.rSelect.indexOf(id), 1); //取消
 | 
										this.list.splice(this.rSelect.indexOf(id), 1); //取消
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				// console.log(this.rSelect);
 | 
									// console.log(this.rSelect);
 | 
				
			||||||
				// console.log(this.list);
 | 
									console.log(this.list);
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			toHomePage() {
 | 
								toHomePage() {
 | 
				
			||||||
				uni.switchTab({
 | 
									this.$u.post("StartUp/addLabel", {
 | 
				
			||||||
					url: '/pages/index/index'
 | 
										label_ids: this.list
 | 
				
			||||||
				});
 | 
									}).then(res => {
 | 
				
			||||||
 | 
										// console.log(res);
 | 
				
			||||||
 | 
										if (res.errCode == 0) {
 | 
				
			||||||
 | 
											// this.$u.toast(res.message);
 | 
				
			||||||
 | 
											uni.switchTab({
 | 
				
			||||||
 | 
												url: '/pages/index/index'
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											this.$u.toast(res.message);
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
@ -2,10 +2,17 @@
 | 
				
			|||||||
    <u-popup v-model="show" mode="bottom" length="782" border-radius="20">
 | 
					    <u-popup v-model="show" mode="bottom" length="782" border-radius="20">
 | 
				
			||||||
		<view class="top">
 | 
							<view class="top">
 | 
				
			||||||
			<text>全部商品</text>
 | 
								<text>全部商品</text>
 | 
				
			||||||
            <image></image>
 | 
					            <u-icon name="close" color="#999999" :size="30" @click="toggerList"></u-icon>
 | 
				
			||||||
		</view>
 | 
							</view>
 | 
				
			||||||
        <scroll-view :scroll-y="true" style="padding:0 30rpx;height:692rpx">
 | 
					        <scroll-view :scroll-y="true" class="scroll-box">
 | 
				
			||||||
            <sitem v-for="i in 10"></sitem>
 | 
					            <view v-for="(item,index) in cartList" :key="index" class="item">
 | 
				
			||||||
 | 
									<image :src="item.goods_image" mode="aspectFill"></image>
 | 
				
			||||||
 | 
									<view>
 | 
				
			||||||
 | 
										<text class="title">{{ item.goods_advword }}</text>
 | 
				
			||||||
 | 
										<text class="name">{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}</text>
 | 
				
			||||||
 | 
										<text class="price">{{ item.goods_promotion_price }}</text>
 | 
				
			||||||
 | 
									</view>
 | 
				
			||||||
 | 
								</view>
 | 
				
			||||||
        </scroll-view>
 | 
					        </scroll-view>
 | 
				
			||||||
	</u-popup>
 | 
						</u-popup>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@ -13,20 +20,30 @@
 | 
				
			|||||||
import sitem from "./item"
 | 
					import sitem from "./item"
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
    name:'shoplist',
 | 
					    name:'shoplist',
 | 
				
			||||||
 | 
						props: ['list'],
 | 
				
			||||||
    components:{
 | 
					    components:{
 | 
				
			||||||
        sitem
 | 
					        sitem
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    data(){
 | 
					    data(){
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            show: true
 | 
					            show: true,
 | 
				
			||||||
 | 
								cartList: this.list || [],
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
 | 
						watch: {
 | 
				
			||||||
 | 
							list() {
 | 
				
			||||||
 | 
								this.cartList = this.list;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							toggerList() {
 | 
				
			||||||
 | 
								this.show = false;
 | 
				
			||||||
 | 
								this.$emit("hideCart",this.show);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
image{
 | 
					 | 
				
			||||||
    background-color: #0f0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.top{
 | 
					.top{
 | 
				
			||||||
    height: 88rpx;
 | 
					    height: 88rpx;
 | 
				
			||||||
    width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
@ -39,9 +56,41 @@ image{
 | 
				
			|||||||
        font-size: 30rpx;
 | 
					        font-size: 30rpx;
 | 
				
			||||||
        color: #333;
 | 
					        color: #333;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    >image{
 | 
					}
 | 
				
			||||||
        width: 33rpx;
 | 
					.scroll-box {
 | 
				
			||||||
        height: 33rpx;
 | 
						.item {
 | 
				
			||||||
    }
 | 
							display: flex;
 | 
				
			||||||
 | 
							padding: 20rpx;
 | 
				
			||||||
 | 
							border-bottom: 1px solid #ECECEC;
 | 
				
			||||||
 | 
							& > image {
 | 
				
			||||||
 | 
								flex-shrink: 0;
 | 
				
			||||||
 | 
								width: 160rpx;
 | 
				
			||||||
 | 
								height: 160rpx;
 | 
				
			||||||
 | 
								margin-right: 14rpx;
 | 
				
			||||||
 | 
								border-radius: 10rpx;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							& > view {
 | 
				
			||||||
 | 
								display: flex;
 | 
				
			||||||
 | 
								flex-direction: column;
 | 
				
			||||||
 | 
								justify-content: space-between;
 | 
				
			||||||
 | 
								color: #333;
 | 
				
			||||||
 | 
								font-size: 28rpx;
 | 
				
			||||||
 | 
								.title {
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								.name {
 | 
				
			||||||
 | 
									width: 500rpx;
 | 
				
			||||||
 | 
									height: 80rpx;
 | 
				
			||||||
 | 
									font-size: 24rpx;
 | 
				
			||||||
 | 
									overflow: hidden;
 | 
				
			||||||
 | 
									text-overflow: ellipsis;
 | 
				
			||||||
 | 
									display: -webkit-box;
 | 
				
			||||||
 | 
									-webkit-box-orient: vertical;
 | 
				
			||||||
 | 
									-webkit-line-clamp: 2;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								.price {
 | 
				
			||||||
 | 
									color: #FF3131;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
@ -9,16 +9,13 @@
 | 
				
			|||||||
    </view>
 | 
					    </view>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
image{
 | 
					 | 
				
			||||||
    background-color: #0f0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.shopone{
 | 
					.shopone{
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
    width: 442rpx;
 | 
					    width: 442rpx;
 | 
				
			||||||
    height: 200rpx;
 | 
					    height: 200rpx;
 | 
				
			||||||
    background:rgba(0,0,0,0.4);
 | 
					 | 
				
			||||||
    padding: 20rpx;
 | 
					    padding: 20rpx;
 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    border-radius: 10rpx;
 | 
					    border-radius: 10rpx;
 | 
				
			||||||
 | 
					    background:rgba(0,0,0,0.4);
 | 
				
			||||||
    >image{
 | 
					    >image{
 | 
				
			||||||
        width: 160rpx;
 | 
					        width: 160rpx;
 | 
				
			||||||
        height: 160rpx;
 | 
					        height: 160rpx;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,30 +1,32 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
    <view class="userinfo">
 | 
					    <view class="userinfo">
 | 
				
			||||||
        <view class="userhead">
 | 
					        <view class="userhead">
 | 
				
			||||||
            <image :src="list.member_avatar"></image>
 | 
					            <image :src="item.member_avatar"></image>
 | 
				
			||||||
            <text>+</text>
 | 
					            <text class="follow" v-if="!is_follow" @click="following(item.member_id)">+</text>
 | 
				
			||||||
 | 
								<u-icon v-else name="checkbox-mark" color="#ffffff" :size="28" class="follow"  @click="following(item.member_id)"></u-icon>
 | 
				
			||||||
        </view>
 | 
					        </view>
 | 
				
			||||||
        <view class="zan">
 | 
							<!-- 点赞 -->
 | 
				
			||||||
            <image></image>
 | 
					        <view class="operat zan">
 | 
				
			||||||
            <text>{{list.like_num}}</text>
 | 
					            <u-icon name="thumb-up-fill" :color=" is_like ? '#FF7807' : '#ffffff' " :size="50" @click="likeType(item.article_id)"></u-icon>
 | 
				
			||||||
 | 
					            <text>{{item.like_num}}</text>
 | 
				
			||||||
        </view>
 | 
					        </view>
 | 
				
			||||||
        <view class="shoucang">
 | 
							<!-- 收藏 -->
 | 
				
			||||||
            <image></image>
 | 
					        <view class="operat shoucang">
 | 
				
			||||||
            <text>{{list.collect_num}}</text>
 | 
					            <u-icon name="star-fill" :color=" is_collect ? '#FF7807' : '#ffffff' " :size="50" @click="collecting(item.article_id)"></u-icon>
 | 
				
			||||||
 | 
					            <text>{{item.collect_num}}</text>
 | 
				
			||||||
        </view>
 | 
					        </view>
 | 
				
			||||||
        <view class="pinglun">
 | 
							<!-- 评论 -->
 | 
				
			||||||
            <image></image>
 | 
					        <view class="operat pinglun">
 | 
				
			||||||
            <text>{{list.comment_num}}</text>
 | 
					            <u-icon name="more-circle-fill" color="#ffffff" :size="50" @click="editing()"></u-icon>
 | 
				
			||||||
 | 
					            <text>{{item.comment_num}}</text>
 | 
				
			||||||
        </view>
 | 
					        </view>
 | 
				
			||||||
        <view class="gouwu">
 | 
							<!-- 购物车 -->
 | 
				
			||||||
            <image></image>
 | 
					        <view class="operat gouwu">
 | 
				
			||||||
 | 
					           <u-icon name="shopping-cart-fill" :color=" is_cart ? '#FF7807' : '#ffffff' " :size="50" @click="carting()"></u-icon>
 | 
				
			||||||
        </view>
 | 
					        </view>
 | 
				
			||||||
    </view>
 | 
					    </view>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
image{
 | 
					 | 
				
			||||||
    background-color: #0f0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.userinfo{
 | 
					.userinfo{
 | 
				
			||||||
    width: 110rpx;
 | 
					    width: 110rpx;
 | 
				
			||||||
    height: 570rpx;
 | 
					    height: 570rpx;
 | 
				
			||||||
@ -32,53 +34,110 @@ image{
 | 
				
			|||||||
    flex-direction: column;
 | 
					    flex-direction: column;
 | 
				
			||||||
    justify-content: space-between;
 | 
					    justify-content: space-between;
 | 
				
			||||||
    align-items: center;
 | 
					    align-items: center;
 | 
				
			||||||
    >view{
 | 
					    .userhead{
 | 
				
			||||||
        display: flex;
 | 
							position: relative;
 | 
				
			||||||
        flex-direction: column;
 | 
					 | 
				
			||||||
        align-items: center;
 | 
					 | 
				
			||||||
        font-size: 28rpx;
 | 
					 | 
				
			||||||
        color: #fff;
 | 
					 | 
				
			||||||
        >text{
 | 
					 | 
				
			||||||
            margin-top: 17rpx;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        >image{
 | 
					 | 
				
			||||||
            width: 50rpx;
 | 
					 | 
				
			||||||
            height: 50rpx;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    >view:first-child{
 | 
					 | 
				
			||||||
        display: flex;
 | 
					        display: flex;
 | 
				
			||||||
        position: relative;
 | 
					        position: relative;
 | 
				
			||||||
        align-items: center;
 | 
					        align-items: center;
 | 
				
			||||||
        >image{
 | 
							&>image{
 | 
				
			||||||
            width: 110rpx;
 | 
							    width: 110rpx;
 | 
				
			||||||
            height: 110rpx;
 | 
							    height: 110rpx;
 | 
				
			||||||
            border-radius: 50%;
 | 
							    border-radius: 50%;
 | 
				
			||||||
            border: 2rpx solid #fff;
 | 
							    border: 2rpx solid #fff;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
        }
 | 
							.follow {
 | 
				
			||||||
        >text{
 | 
								position: absolute;
 | 
				
			||||||
            width: 36rpx;
 | 
								top: 90rpx;
 | 
				
			||||||
            height: 36rpx;
 | 
								left: 35%;
 | 
				
			||||||
            font-size: 36rpx;
 | 
								width: 36rpx;
 | 
				
			||||||
            background-color: #FF780F;
 | 
								height: 36rpx;
 | 
				
			||||||
            position: absolute;
 | 
								text-align: center;
 | 
				
			||||||
            top: 75rpx;
 | 
								line-height: 36rpx;
 | 
				
			||||||
            border-radius: 50%;
 | 
								font-size: 36rpx;
 | 
				
			||||||
            line-height: 36rpx;
 | 
								border-radius: 50%;
 | 
				
			||||||
            text-align: center;
 | 
								color: #fff;
 | 
				
			||||||
        }
 | 
								background-color: #FF780F;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
						.operat {
 | 
				
			||||||
 | 
							display: flex;
 | 
				
			||||||
 | 
							align-items: center;
 | 
				
			||||||
 | 
							flex-direction: column;
 | 
				
			||||||
 | 
							& > text {
 | 
				
			||||||
 | 
								margin-top: 10rpx;
 | 
				
			||||||
 | 
								font-size: 28rpx;
 | 
				
			||||||
 | 
								color: #fff;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
    name:'userinfo',
 | 
					    name:'userinfo',
 | 
				
			||||||
 | 
						props:['list','cart'],
 | 
				
			||||||
    data(){
 | 
					    data(){
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
 | 
								is_follow: this.list.is_attention || false,
 | 
				
			||||||
 | 
								is_like: this.list.is_like || false,
 | 
				
			||||||
 | 
								is_collect: this.list.is_collect || false,
 | 
				
			||||||
 | 
								is_content: false,
 | 
				
			||||||
 | 
								is_cart: this.cart || false,
 | 
				
			||||||
 | 
								item: this.list || []
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    props:['list']
 | 
						watch: {
 | 
				
			||||||
 | 
							list(newValue,old) {
 | 
				
			||||||
 | 
								console.log(newValue,old);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							cart(newValue,old) {
 | 
				
			||||||
 | 
								// console.log(newValue,old);
 | 
				
			||||||
 | 
								this.is_cart = newValue;
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							deep: true
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							// 关注
 | 
				
			||||||
 | 
							following(id) {
 | 
				
			||||||
 | 
								this.is_follow = !this.is_follow;
 | 
				
			||||||
 | 
								this.$u.api.attentionMember({member_id: id}).then(res => {
 | 
				
			||||||
 | 
									if (res.errCode == 0) {
 | 
				
			||||||
 | 
										this.$u.toast(res.message);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 点赞
 | 
				
			||||||
 | 
							likeType(id) {
 | 
				
			||||||
 | 
								// console.log(id);
 | 
				
			||||||
 | 
								this.is_like = !this.is_like;
 | 
				
			||||||
 | 
								this.$u.post("article/articleLike",{article_id: id}).then(res => {
 | 
				
			||||||
 | 
									if (res.errCode == 0) {
 | 
				
			||||||
 | 
										// console.log(res);
 | 
				
			||||||
 | 
										this.list.like_num = res.data.num;
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										this.$u.toast(res.message);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 收藏
 | 
				
			||||||
 | 
							collecting(id) {
 | 
				
			||||||
 | 
								this.is_collect = !this.is_collect;
 | 
				
			||||||
 | 
								this.$u.post("article/articleCollect",{article_id: id}).then(res => {
 | 
				
			||||||
 | 
									if (res.errCode == 0) {
 | 
				
			||||||
 | 
										// console.log(res);
 | 
				
			||||||
 | 
										this.list.collect_num = res.data.num;
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										this.$u.toast(res.message);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 评论
 | 
				
			||||||
 | 
							editing() {},
 | 
				
			||||||
 | 
							// 购物车
 | 
				
			||||||
 | 
							carting() {
 | 
				
			||||||
 | 
								this.is_cart = !this.is_cart;
 | 
				
			||||||
 | 
								// console.log(this.is_cart);
 | 
				
			||||||
 | 
								this.$emit("openCart",this.is_cart);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
@ -20,10 +20,10 @@
 | 
				
			|||||||
                    <view class="box">
 | 
					                    <view class="box">
 | 
				
			||||||
                        <view class="list">
 | 
					                        <view class="list">
 | 
				
			||||||
                            <view >
 | 
					                            <view >
 | 
				
			||||||
                                <videoItem v-for="item in 10"></videoItem>
 | 
					                                <videoItem v-for="item in 10" :key="index"></videoItem>
 | 
				
			||||||
                            </view>
 | 
					                            </view>
 | 
				
			||||||
                            <view style="margin-left:20rpx">
 | 
					                            <view style="margin-left:20rpx">
 | 
				
			||||||
                                <videoItem v-for="item in 10"></videoItem>
 | 
					                                <videoItem v-for="item in 10" :key="index"></videoItem>
 | 
				
			||||||
                            </view>
 | 
					                            </view>
 | 
				
			||||||
                        </view>
 | 
					                        </view>
 | 
				
			||||||
                    </view>
 | 
					                    </view>
 | 
				
			||||||
@ -35,10 +35,10 @@
 | 
				
			|||||||
                    <view class="box">
 | 
					                    <view class="box">
 | 
				
			||||||
                        <view class="list">
 | 
					                        <view class="list">
 | 
				
			||||||
                            <view >
 | 
					                            <view >
 | 
				
			||||||
                                <zhiboItem v-for="item in 10"></zhiboItem>
 | 
					                                <zhiboItem v-for="item in 10" :key="index"></zhiboItem>
 | 
				
			||||||
                            </view>
 | 
					                            </view>
 | 
				
			||||||
                            <view style="margin-left:20rpx">
 | 
					                            <view style="margin-left:20rpx">
 | 
				
			||||||
                                <zhiboItem v-for="item in 10"></zhiboItem>
 | 
					                                <zhiboItem v-for="item in 10" :key="index"></zhiboItem>
 | 
				
			||||||
                            </view>
 | 
					                            </view>
 | 
				
			||||||
                        </view>
 | 
					                        </view>
 | 
				
			||||||
                    </view>
 | 
					                    </view>
 | 
				
			||||||
 | 
				
			|||||||
@ -3,27 +3,26 @@
 | 
				
			|||||||
        <view class="back">
 | 
					        <view class="back">
 | 
				
			||||||
            <u-icon name="close" color="#999999" :size="30" @click="goBack"></u-icon>
 | 
					            <u-icon name="close" color="#999999" :size="30" @click="goBack"></u-icon>
 | 
				
			||||||
        </view>
 | 
					        </view>
 | 
				
			||||||
        <swiper class="swiper">
 | 
					        <swiper class="swiper" circular autoplay @change="changeSwiper">
 | 
				
			||||||
            <swiper-item>
 | 
					            <swiper-item v-for="(simg,sindex) in list.photo" :key="sindex">
 | 
				
			||||||
                <image :src="list.article_pic"></image>
 | 
					                <image :src="simg.url" mode="aspectFill" @tap="viewImage" :data-index="sindex"></image>
 | 
				
			||||||
            </swiper-item>
 | 
					            </swiper-item>
 | 
				
			||||||
            <!-- <swiper-item>
 | 
					 | 
				
			||||||
                <image></image>
 | 
					 | 
				
			||||||
            </swiper-item> -->
 | 
					 | 
				
			||||||
            
 | 
					 | 
				
			||||||
        </swiper>
 | 
					        </swiper>
 | 
				
			||||||
        <view class="bottom">
 | 
					        <scroll-view scroll-y="true" class="bottom">
 | 
				
			||||||
            <view class="item">
 | 
					            <view class="item">
 | 
				
			||||||
                <text>图片</text>
 | 
					                <text>图片</text>
 | 
				
			||||||
                <view v-for="(item,index) in 4" :key="index" :style="{'background-color':index == 2 ? '#fff' : '#ede8e8'}"></view>
 | 
					                <view v-for="(item,index) in list.photo" :key="index" :style="{'background-color':index == swiper_id ? '#fff' : '#ede8e8'}"></view>
 | 
				
			||||||
            </view>
 | 
					            </view>
 | 
				
			||||||
            <view class="username">自己黑的哈万岁哦划u将</view>
 | 
					            <view class="username">{{ list.member_nickname }}</view>
 | 
				
			||||||
            <view class="title">hasjdhajskhj</view>
 | 
					            <view class="title">{{ list.article_title }}</view>
 | 
				
			||||||
            <view class="info u-line-2">asdjhasjdkasljdklasjkl</view>
 | 
					            <view class="info">{{ list.article_content }}</view>
 | 
				
			||||||
        </view>
 | 
								<view class="box">
 | 
				
			||||||
        <userinfo class="userinfo" :list="list"></userinfo>
 | 
									<view class="label" v-for="(label,id) in list.label" :key="id">{{ label.name }}</view>
 | 
				
			||||||
        <shpoone class="shpoone"></shpoone>
 | 
								</view>
 | 
				
			||||||
        <shoplist></shoplist>
 | 
					        </scroll-view>
 | 
				
			||||||
 | 
					        <userinfo class="userinfo" :list="list" :cart="cart_type" @openCart="openCart"></userinfo>
 | 
				
			||||||
 | 
					        <shpoone class="shpoone" v-show="list.goods.length == 1 && cart_type"></shpoone>
 | 
				
			||||||
 | 
					        <shoplist :list="list.goods" v-show="list.goods.length > 1 && cart_type" @hideCart="hideCart"></shoplist>
 | 
				
			||||||
    </view>
 | 
					    </view>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
@ -46,23 +45,23 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    .bottom{
 | 
					    .bottom{
 | 
				
			||||||
        width: 100%;
 | 
					 | 
				
			||||||
        height: 270rpx;
 | 
					 | 
				
			||||||
        background-color: #fff;
 | 
					 | 
				
			||||||
        position: fixed;
 | 
					        position: fixed;
 | 
				
			||||||
        bottom: 0;
 | 
					        bottom: 0;
 | 
				
			||||||
        display: flex;
 | 
					        display: flex;
 | 
				
			||||||
        flex-direction: column;
 | 
					        flex-direction: column;
 | 
				
			||||||
        align-items: flex-start;
 | 
					        align-items: flex-start;
 | 
				
			||||||
 | 
					        width: 700rpx;
 | 
				
			||||||
 | 
					        height: 300rpx;
 | 
				
			||||||
        padding: 20rpx 30rpx;
 | 
					        padding: 20rpx 30rpx;
 | 
				
			||||||
 | 
					        background-color: #fff;
 | 
				
			||||||
        .item{
 | 
					        .item{
 | 
				
			||||||
 | 
					            display: flex;
 | 
				
			||||||
 | 
					            align-items: center;
 | 
				
			||||||
            padding: 8rpx 16rpx;
 | 
					            padding: 8rpx 16rpx;
 | 
				
			||||||
            font-size: 24rpx;
 | 
					            font-size: 24rpx;
 | 
				
			||||||
            color: #fff;
 | 
					            color: #fff;
 | 
				
			||||||
            background-color: #999;
 | 
					 | 
				
			||||||
            display: flex;
 | 
					 | 
				
			||||||
            align-items: center;
 | 
					 | 
				
			||||||
            border-radius: 10rpx;
 | 
					            border-radius: 10rpx;
 | 
				
			||||||
 | 
					            background-color: #999;
 | 
				
			||||||
            >view{
 | 
					            >view{
 | 
				
			||||||
                width: 12rpx;
 | 
					                width: 12rpx;
 | 
				
			||||||
                height: 12rpx;
 | 
					                height: 12rpx;
 | 
				
			||||||
@ -71,46 +70,61 @@
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .username{
 | 
					        .username{
 | 
				
			||||||
 | 
								margin: 20rpx 0;
 | 
				
			||||||
            font-size: 36rpx;
 | 
					            font-size: 36rpx;
 | 
				
			||||||
            color: #333;
 | 
					            color: #333;
 | 
				
			||||||
            margin-top: 20rpx;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .title{
 | 
					        .title{
 | 
				
			||||||
            font-size: 26rpx;
 | 
					            font-size: 26rpx;
 | 
				
			||||||
            color: #333;
 | 
					            color: #333;
 | 
				
			||||||
            margin-top: 23rpx;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        .info{
 | 
					        .info{
 | 
				
			||||||
 | 
								margin: 20rpx 0;
 | 
				
			||||||
 | 
								display: -webkit-box;
 | 
				
			||||||
 | 
								-webkit-box-orient: vertical;
 | 
				
			||||||
 | 
								-webkit-line-clamp: 2;
 | 
				
			||||||
 | 
								overflow: hidden;
 | 
				
			||||||
            font-size: 28rpx;
 | 
					            font-size: 28rpx;
 | 
				
			||||||
            line-height: 42rpx;
 | 
					 | 
				
			||||||
            margin-top: 20rpx;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
							.box {
 | 
				
			||||||
 | 
								display: flex;
 | 
				
			||||||
 | 
								flex-wrap: wrap;
 | 
				
			||||||
 | 
								.label {
 | 
				
			||||||
 | 
									padding: 6rpx 10rpx;
 | 
				
			||||||
 | 
									margin: 0 10rpx 10rpx 0;
 | 
				
			||||||
 | 
									font-size: 24rpx;
 | 
				
			||||||
 | 
									color: #fff;
 | 
				
			||||||
 | 
									border-radius: 6rpx;
 | 
				
			||||||
 | 
									background-color: #000000;
 | 
				
			||||||
 | 
									opacity: 0.5;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    .userinfo{
 | 
					    .userinfo{
 | 
				
			||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        right: 30rpx;
 | 
				
			||||||
        top: 50%;
 | 
					        top: 50%;
 | 
				
			||||||
        transform: translateY(-285rpx);
 | 
					        transform: translateY(-285rpx);
 | 
				
			||||||
        right: 30rpx;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    .shpoone{
 | 
					    .shpoone{
 | 
				
			||||||
        position: absolute;
 | 
					 | 
				
			||||||
        top: 50%;
 | 
					 | 
				
			||||||
        z-index: 999;
 | 
					        z-index: 999;
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
        right: 139rpx;
 | 
					        right: 139rpx;
 | 
				
			||||||
 | 
					        top: 54%;
 | 
				
			||||||
        transform: translateY(100rpx);
 | 
					        transform: translateY(100rpx);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import userinfo from "../components/userinfo/index"
 | 
					import userinfo from "../components/userinfo/index" // 点赞组件
 | 
				
			||||||
import shpoone from "../components/shpoone/index"
 | 
					import shpoone from "../components/shpoone/index" // 
 | 
				
			||||||
import shoplist from "../components/shoplist/index"
 | 
					import shoplist from "../components/shoplist/index" // 商品列表
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
    name:"photo",
 | 
					    name:"photo",
 | 
				
			||||||
	onLoad(e) {
 | 
						onLoad(option) {
 | 
				
			||||||
		console.log('dhdhdhdhd',e)
 | 
							console.log(option);
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
    components:{
 | 
					    components:{
 | 
				
			||||||
        userinfo,
 | 
					        userinfo,
 | 
				
			||||||
@ -119,16 +133,36 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    data(){
 | 
					    data(){
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            list:{}
 | 
					            list:{},
 | 
				
			||||||
 | 
								swiper_id: "",
 | 
				
			||||||
 | 
								cart_type: false,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    methods:{
 | 
					    methods:{
 | 
				
			||||||
 | 
							// 发现详情
 | 
				
			||||||
        articleInfo(article_id){
 | 
					        articleInfo(article_id){
 | 
				
			||||||
            this.$u.api.articleInfo({article_id}).then((res)=>{
 | 
					            this.$u.api.articleInfo({article_id}).then((res)=>{
 | 
				
			||||||
                console.log(res)
 | 
					                this.list = res.data.info;
 | 
				
			||||||
                this.list = res.data.info
 | 
					 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
							// 改变swiper
 | 
				
			||||||
 | 
							changeSwiper(e) {
 | 
				
			||||||
 | 
								// console.log(e.detail.current);
 | 
				
			||||||
 | 
								this.swiper_id = e.detail.current; // 储存swiper id
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 更改购物车状态
 | 
				
			||||||
 | 
							openCart(data) {
 | 
				
			||||||
 | 
								console.log(data);
 | 
				
			||||||
 | 
								this.cart_type = data;
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							hideCart(data) {
 | 
				
			||||||
 | 
								// console.log(data);
 | 
				
			||||||
 | 
								this.cart_type = data;
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 预览图片
 | 
				
			||||||
 | 
							viewImage(e) {
 | 
				
			||||||
 | 
								console.log(e);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		goBack() {
 | 
							goBack() {
 | 
				
			||||||
			uni.navigateBack({
 | 
								uni.navigateBack({
 | 
				
			||||||
				delta: 1
 | 
									delta: 1
 | 
				
			||||||
 | 
				
			|||||||
@ -13,7 +13,7 @@
 | 
				
			|||||||
      <view class="guanzhu" @click="guanzhu"><text style="color:#fff;font-size:24rpx">{{info.is_attention == 1 ? '已关注' : '关注'}}</text></view>
 | 
					      <view class="guanzhu" @click="guanzhu"><text style="color:#fff;font-size:24rpx">{{info.is_attention == 1 ? '已关注' : '关注'}}</text></view>
 | 
				
			||||||
    </view>
 | 
					    </view>
 | 
				
			||||||
    <view class="userlist" :style="{'top': top + 10 * rpx}">
 | 
					    <view class="userlist" :style="{'top': top + 10 * rpx}">
 | 
				
			||||||
        <image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}"></image>
 | 
					        <image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}" :key="j"></image>
 | 
				
			||||||
    </view>
 | 
					    </view>
 | 
				
			||||||
    <view class="hot" :style="{'top': top + 10 * rpx}">
 | 
					    <view class="hot" :style="{'top': top + 10 * rpx}">
 | 
				
			||||||
      <text class="hottext">2.8w</text>
 | 
					      <text class="hottext">2.8w</text>
 | 
				
			||||||
@ -36,7 +36,7 @@
 | 
				
			|||||||
              </div> -->
 | 
					              </div> -->
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <list class="list">
 | 
					          <list class="list">
 | 
				
			||||||
            <cell class="item" v-for="(i,j) in list" @click="xuanzhong(j)">
 | 
					            <cell class="item" v-for="(i,j) in list" :key="j" @click="xuanzhong(j)">
 | 
				
			||||||
                <image class="shopimg" :src="i.goods_image"></image>
 | 
					                <image class="shopimg" :src="i.goods_image"></image>
 | 
				
			||||||
                <div class="infos">
 | 
					                <div class="infos">
 | 
				
			||||||
                  <div>
 | 
					                  <div>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user