Merge pull request 'zhy' (#36) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/36
@ -1,6 +1,16 @@
 | 
			
		||||
export default {
 | 
			
		||||
    init(vm){
 | 
			
		||||
        return {
 | 
			
		||||
			// 发现列表
 | 
			
		||||
			getArticlelist({ page, value, store_id, member_id, is_video_img }){
 | 
			
		||||
                return vm.$u.post('article/articlelist', {
 | 
			
		||||
					page: page,
 | 
			
		||||
					like: value, // 搜索内容
 | 
			
		||||
					store_id: store_id,
 | 
			
		||||
					member_id: member_id,
 | 
			
		||||
					is_video_img: is_video_img,
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			// 获取商城首页信息(顶部轮播图与商品分类)
 | 
			
		||||
			getShopTopList(){
 | 
			
		||||
                return vm.$u.post('Shop/getShopTopList');
 | 
			
		||||
@ -29,7 +39,13 @@ export default {
 | 
			
		||||
			// 购物车删除商品
 | 
			
		||||
			deleteCart({ id }) {
 | 
			
		||||
				return vm.$u.post('cart/cartDel', {
 | 
			
		||||
					cart_id: id
 | 
			
		||||
					cart_ids: id
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			// 商品详情
 | 
			
		||||
			getGoodsDetails({ id }) {
 | 
			
		||||
				return vm.$u.post('Goods/goodDetails', {
 | 
			
		||||
					goods_id: id
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -189,7 +189,12 @@ export default {
 | 
			
		||||
					sex: gender,
 | 
			
		||||
					avatar: avatar,
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
			},
 | 
			
		||||
			// 用户浏览记录
 | 
			
		||||
			getBrowseList() {
 | 
			
		||||
				return vm.$u.post('Member/BrowseList');
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -1,16 +1,33 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <view class="video-item">
 | 
			
		||||
        <image class="head">
 | 
			
		||||
 | 
			
		||||
        </image>
 | 
			
		||||
        <view class="title" v-if="!isguanzhu">这是标题这是标题这是标题</view>
 | 
			
		||||
    <view class="video-item" v-if="item">
 | 
			
		||||
        <image class="head" :src="item.article_pic"></image>
 | 
			
		||||
        <view class="title" v-if="!isguanzhu">{{ item.article_title }}</view>
 | 
			
		||||
        <view class="jianjie">这是简介这是简介这是简介</view>
 | 
			
		||||
        <view class="user">
 | 
			
		||||
            <view>
 | 
			
		||||
                <image></image>
 | 
			
		||||
                <text>这是名字</text>
 | 
			
		||||
            <view class="info">
 | 
			
		||||
                <image :src="item.member_avatar"></image>
 | 
			
		||||
                <text>{{ item.member_nickname }}</text>
 | 
			
		||||
            </view>
 | 
			
		||||
            <image></image>
 | 
			
		||||
            <image src="/static/image/common/4.png" @click="showAction"></image>
 | 
			
		||||
			<view class="action" v-if="show == item.article_id">
 | 
			
		||||
				<view class="bubble">
 | 
			
		||||
					<view>
 | 
			
		||||
						<image src="/static/image/common/5.png" v-if="item.is_like == 0"></image>
 | 
			
		||||
						<image src="/static/image/common/8.png" v-else></image>
 | 
			
		||||
						<text>点赞</text>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view>
 | 
			
		||||
						<image src="/static/image/common/6.png" v-if="item.is_collect == 0"></image>
 | 
			
		||||
						<image src="/static/image/common/9.png" v-else></image>
 | 
			
		||||
						<text>收藏</text>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view>
 | 
			
		||||
						<image src="/static/image/common/7.png"></image>
 | 
			
		||||
						<text>屏蔽用户</text>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="layer" v-if="show == item.article_id" @click.stop="show=-1"></view>
 | 
			
		||||
        </view>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
@ -33,7 +50,7 @@
 | 
			
		||||
        color: #333;
 | 
			
		||||
        font-weight: 500;
 | 
			
		||||
        line-height: 30rpx;
 | 
			
		||||
        width: 307rpx;
 | 
			
		||||
        width: 300rpx;
 | 
			
		||||
        overflow:hidden; 
 | 
			
		||||
        text-overflow:ellipsis;
 | 
			
		||||
        display:-webkit-box; 
 | 
			
		||||
@ -46,7 +63,7 @@
 | 
			
		||||
        font-size: 22rpx;
 | 
			
		||||
        color: #666;
 | 
			
		||||
        line-height: 30rpx;
 | 
			
		||||
        width: 307rpx;
 | 
			
		||||
        width: 300rpx;
 | 
			
		||||
        margin-left: 18rpx;
 | 
			
		||||
        overflow:hidden; 
 | 
			
		||||
        text-overflow:ellipsis;
 | 
			
		||||
@ -61,8 +78,9 @@
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        margin:0 auto;
 | 
			
		||||
        margin-top: 20rpx;
 | 
			
		||||
        width: 307rpx;
 | 
			
		||||
        >view{
 | 
			
		||||
        width: 300rpx;
 | 
			
		||||
		position: relative;
 | 
			
		||||
        .info {
 | 
			
		||||
            display: flex;
 | 
			
		||||
            align-items: center;
 | 
			
		||||
            >image{
 | 
			
		||||
@ -81,6 +99,70 @@
 | 
			
		||||
            width: 37rpx;
 | 
			
		||||
            height: 8rpx;
 | 
			
		||||
        }
 | 
			
		||||
		.action {
 | 
			
		||||
			z-index: 19;
 | 
			
		||||
			position: absolute;
 | 
			
		||||
			right: 0rpx;
 | 
			
		||||
			bottom: 55rpx;
 | 
			
		||||
			// width: 234rpx;
 | 
			
		||||
			background: rgba(255,255,255,1);
 | 
			
		||||
			box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
 | 
			
		||||
			border-radius: 6rpx;
 | 
			
		||||
			.bubble {
 | 
			
		||||
				position: relative;
 | 
			
		||||
				background-color: #fff;
 | 
			
		||||
				&::after {
 | 
			
		||||
					position: absolute;
 | 
			
		||||
					right: 10rpx;
 | 
			
		||||
					bottom: 0;
 | 
			
		||||
					content: '';
 | 
			
		||||
					width: 60rpx; 
 | 
			
		||||
					height: 40rpx;
 | 
			
		||||
					background-color: inherit;
 | 
			
		||||
					transform: rotate(45deg);
 | 
			
		||||
					margin-top: -10rpx;
 | 
			
		||||
					z-index: -1;
 | 
			
		||||
					box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
 | 
			
		||||
				}
 | 
			
		||||
				> view {
 | 
			
		||||
					padding: 9rpx 12rpx;
 | 
			
		||||
					display: flex;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
					&:not(:last-child) {
 | 
			
		||||
						border-bottom: 2rpx #ECECEC solid;
 | 
			
		||||
					}
 | 
			
		||||
					@mixin image-class($width, $height, $right) {
 | 
			
		||||
						width: $width;
 | 
			
		||||
						height: $height;
 | 
			
		||||
						margin-right: $right;
 | 
			
		||||
					}
 | 
			
		||||
					> image {
 | 
			
		||||
						&:first-child {
 | 
			
		||||
							@include image-class($width: 21rpx, $height: 22rpx, $right: 12rpx);
 | 
			
		||||
						}
 | 
			
		||||
						&:nth-child(2) {
 | 
			
		||||
							@include image-class($width: 22rpx, $height: 22rpx, $right: 12rpx);
 | 
			
		||||
						}
 | 
			
		||||
						&:last-child {
 | 
			
		||||
							@include image-class($width: 24rpx, $height: 20rpx, $right: 9rpx);
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					> text {
 | 
			
		||||
						font-size: 20rpx;
 | 
			
		||||
						color: rgba(51,51,51,1);
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.layer {
 | 
			
		||||
			position: fixed;
 | 
			
		||||
			top: 0;
 | 
			
		||||
			left: 0;
 | 
			
		||||
			width: 100%;
 | 
			
		||||
			height: 100%;
 | 
			
		||||
			z-index: 9;
 | 
			
		||||
			background-color: transparent;
 | 
			
		||||
		}
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -89,9 +171,18 @@ export default {
 | 
			
		||||
    name:"index-item",
 | 
			
		||||
    data(){
 | 
			
		||||
        return {
 | 
			
		||||
 | 
			
		||||
			show: -1,
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    props:["isguanzhu"]
 | 
			
		||||
	props:["isguanzhu", "item"],
 | 
			
		||||
	mounted() {
 | 
			
		||||
		// console.log(this.item);
 | 
			
		||||
		this.show = -1;
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		showAction() {
 | 
			
		||||
			this.show = this.show > 0 ? -1 : this.item.article_id;
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <view class="item" @click="addCart">
 | 
			
		||||
    <view class="item" @click="toDetailsPage">
 | 
			
		||||
        <image :src="info.goods_image" class="img"></image>
 | 
			
		||||
        <view class="info">
 | 
			
		||||
            <text class="title u-line-1">{{ info.goods_name }}</text>
 | 
			
		||||
@ -15,14 +15,11 @@ export default {
 | 
			
		||||
		info: Object
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		addCart() {
 | 
			
		||||
			console.log(1);
 | 
			
		||||
			
 | 
			
		||||
			this.$u.api.addCart({
 | 
			
		||||
				goods_id: this.info.goods_id,
 | 
			
		||||
				quantity: 1
 | 
			
		||||
			}).then((res)=>{
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
		toDetailsPage() {
 | 
			
		||||
			this.$u.route({
 | 
			
		||||
				url: 'pageB/sdetails/index',
 | 
			
		||||
				params: {
 | 
			
		||||
					id: this.info.goods_id
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@ -1,12 +1,15 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <view class="nav">
 | 
			
		||||
        <text>dsadasdas</text>
 | 
			
		||||
        <image></image>
 | 
			
		||||
        <text>{{ value }}</text>
 | 
			
		||||
        <image src="/static/image/common/1.png"></image>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
    name:"navs"    
 | 
			
		||||
	name:"navs",
 | 
			
		||||
	props: {
 | 
			
		||||
		value: String
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
 | 
			
		||||
@ -2,24 +2,40 @@
 | 
			
		||||
    <view class="tloos">
 | 
			
		||||
        <view class="navs">
 | 
			
		||||
            <image></image>
 | 
			
		||||
            123
 | 
			
		||||
            店铺
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="navs" style="margin-right:30rpx">
 | 
			
		||||
            <image></image>
 | 
			
		||||
            123
 | 
			
		||||
            客服
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="button" style="background:rgba(253,211,96,0.6);">试穿试送</view>
 | 
			
		||||
        <view class="button" style="background:rgba(253,211,96,1);">加入购物车</view>
 | 
			
		||||
        <view class="button" style="background:rgba(253,211,96,1);" @click="addCart">加入购物车</view>
 | 
			
		||||
        <view class="button" style="background:rgba(255,120,15,1);">立即购买</view>
 | 
			
		||||
		<u-toast ref="uToast" />
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
    name:"tloos"
 | 
			
		||||
	name:"tloos",
 | 
			
		||||
	props: ['id'],
 | 
			
		||||
	methods: {
 | 
			
		||||
		addCart() {
 | 
			
		||||
			this.$u.api.addCart({
 | 
			
		||||
				goods_id: this.id,
 | 
			
		||||
				quantity: 1,
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				this.$refs.uToast.show({
 | 
			
		||||
					title: res.message,
 | 
			
		||||
					type: res.errCode == 0 ? 'success' : 'warning',
 | 
			
		||||
				})
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.tloos{
 | 
			
		||||
	background-color: #fff;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    position: fixed;
 | 
			
		||||
    height: 98rpx;
 | 
			
		||||
 | 
			
		||||
@ -3,27 +3,27 @@
 | 
			
		||||
        <u-swiper :list="list" height="500" border-radius="0"></u-swiper>
 | 
			
		||||
        <view class="info">
 | 
			
		||||
            <view class="title">
 | 
			
		||||
                <text>萨的环境</text>
 | 
			
		||||
 | 
			
		||||
                                               套装新款小个子春季时尚韩版短袖衬衫套装
 | 
			
		||||
新款小个子春季时尚韩版...
 | 
			
		||||
                            
 | 
			
		||||
                <text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }}        
 | 
			
		||||
            </view>
 | 
			
		||||
            <view class="pic">
 | 
			
		||||
                <text>¥24</text>
 | 
			
		||||
                <s>¥12</s>
 | 
			
		||||
                <text>¥{{ goodsInfo.goods_price }}</text>
 | 
			
		||||
                <s>¥{{ goodsInfo.goods_marketprice }}</s>
 | 
			
		||||
            </view>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="hr"></view>
 | 
			
		||||
        <navs></navs>
 | 
			
		||||
        <navs></navs>
 | 
			
		||||
        <navs></navs>
 | 
			
		||||
		<!-- <navs :value="领券"></navs> -->
 | 
			
		||||
        <navs :value="产品规格"></navs>
 | 
			
		||||
		<navs :value="产品颜色"></navs>
 | 
			
		||||
		<navs :value="选择尺码"></navs>
 | 
			
		||||
        <view class="xiangqing">
 | 
			
		||||
            <view class="heng"></view>
 | 
			
		||||
            <view class="title">商品详情</view>
 | 
			
		||||
            <view class="heng"></view>
 | 
			
		||||
        </view>
 | 
			
		||||
        <tloos></tloos>
 | 
			
		||||
		<view class="rich">
 | 
			
		||||
			<rich-text :nodes="goodsInfo.mobile_body"></rich-text>
 | 
			
		||||
		</view>
 | 
			
		||||
        <tloos :id="goodsInfo.goods_commonid"></tloos>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
@ -31,38 +31,46 @@ import navs from "../components/sdetails/navs"
 | 
			
		||||
import tloos from "../components/sdetails/tloos"
 | 
			
		||||
export default {
 | 
			
		||||
    name:"sdetails",
 | 
			
		||||
    data() {
 | 
			
		||||
        return {
 | 
			
		||||
            list: [],
 | 
			
		||||
			goodsInfo: {},
 | 
			
		||||
        }
 | 
			
		||||
	},
 | 
			
		||||
    components:{
 | 
			
		||||
        navs,
 | 
			
		||||
        tloos
 | 
			
		||||
    },
 | 
			
		||||
    data() {
 | 
			
		||||
        return {
 | 
			
		||||
            list: [{
 | 
			
		||||
                    image: '/static/uView/swiper/swiper1.jpg',
 | 
			
		||||
                    title: '蒹葭苍苍,白露为霜。所谓伊人,在水一方'
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
                    image: '/static/uView/swiper/swiper2.jpg',
 | 
			
		||||
                    title: '溯洄从之,道阻且长。溯游从之,宛在水中央'
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
                    image: '/static/uView/swiper/swiper3.jpg',
 | 
			
		||||
                    title: '蒹葭萋萋,白露未晞。所谓伊人,在水之湄'
 | 
			
		||||
                }
 | 
			
		||||
            ]
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
	onLoad(option) {
 | 
			
		||||
		this.getGoodsDetails(option.id);
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		getGoodsDetails(id) {
 | 
			
		||||
			this.$u.api.getGoodsDetails({ id: 169 }).then((res)=>{
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
					this.goodsInfo = res.data;
 | 
			
		||||
					this.goodsInfo.goods_image_mobile.forEach(item => {
 | 
			
		||||
						let temp = {
 | 
			
		||||
							image: item
 | 
			
		||||
						}
 | 
			
		||||
						this.list.push(temp);
 | 
			
		||||
					})
 | 
			
		||||
					console.log(this.goodsInfo.mobile_body);
 | 
			
		||||
					
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.sdetails{
 | 
			
		||||
    /deep/image{
 | 
			
		||||
        background-color: #0f0;
 | 
			
		||||
    }
 | 
			
		||||
	padding-bottom: 98rpx;
 | 
			
		||||
    .info{
 | 
			
		||||
        padding: 30rpx;
 | 
			
		||||
        .title{
 | 
			
		||||
            flex-wrap: wrap;
 | 
			
		||||
			margin-bottom: 30rpx;
 | 
			
		||||
            >text{
 | 
			
		||||
                padding: 13rpx;
 | 
			
		||||
                font-size: 24rpx;
 | 
			
		||||
@ -109,5 +117,8 @@ export default {
 | 
			
		||||
            margin: 0 20rpx;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
	.rich {
 | 
			
		||||
		width: 100%;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -38,6 +38,7 @@
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="cart-btn" v-if="status == '编辑'" @click="settlement">结算</view>
 | 
			
		||||
			<view class="delete-btn" v-if="status == '完成'" @click="deleteGoods">删除</view>
 | 
			
		||||
			<u-toast ref="uToast" />
 | 
			
		||||
		</view>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
@ -62,7 +63,7 @@ export default {
 | 
			
		||||
					})
 | 
			
		||||
					checkedGoods = checkedGoods.concat(temp);
 | 
			
		||||
				})
 | 
			
		||||
				// console.log(checkedGoods);
 | 
			
		||||
				console.log(checkedGoods);
 | 
			
		||||
				this.checkedGoods = checkedGoods;
 | 
			
		||||
			},
 | 
			
		||||
			deep: true
 | 
			
		||||
@ -88,9 +89,23 @@ export default {
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		deleteGoods() {
 | 
			
		||||
			if(!this.checkedGoods.length) return false;
 | 
			
		||||
			let id = [];
 | 
			
		||||
			this.checkedGoods.forEach(item => {
 | 
			
		||||
				id.push(item.cart_id);
 | 
			
		||||
			})
 | 
			
		||||
			// console.log(id);
 | 
			
		||||
			
 | 
			
		||||
			this.$u.api.deleteCart({ id }).then(res => {
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
					if(!res.data.msg) {
 | 
			
		||||
						this.getCartList();
 | 
			
		||||
					} else {
 | 
			
		||||
						this.$refs.uToast.show({
 | 
			
		||||
							title: res.data.msg,
 | 
			
		||||
							type: 'error',
 | 
			
		||||
						})
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
@ -3,19 +3,20 @@
 | 
			
		||||
		<view class="history-box">
 | 
			
		||||
			<view v-for="(item, index) in historyList" :key="index" class="history-item">
 | 
			
		||||
				<view class="item-title">
 | 
			
		||||
					<img src="../static/mine/23.png" />
 | 
			
		||||
					<image src="../static/mine/23.png"></image>
 | 
			
		||||
					<view>小米店铺</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<!-- <view class="item-image">
 | 
			
		||||
					<img src="../static/mine/23.png" />
 | 
			
		||||
				</view> -->
 | 
			
		||||
				<img src="../static/mine/23.png" class="item-image" />
 | 
			
		||||
				<image src="../static/mine/23.png" class="item-image"></image>
 | 
			
		||||
				<view class="item-info">
 | 
			
		||||
					<view class="info-name">{{ item }}</view>
 | 
			
		||||
					<img src="../static/mine/22.png" />
 | 
			
		||||
					<image src="../static/mine/22.png"></image>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<u-empty text="暂无足迹" mode="list" color="#000" margin-top="240" v-if="!historyList.length"></u-empty>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@ -26,8 +27,18 @@ export default {
 | 
			
		||||
			historyList: [1, 2, 3, 6]
 | 
			
		||||
		};
 | 
			
		||||
    },
 | 
			
		||||
    onLoad() {},
 | 
			
		||||
    methods: {}
 | 
			
		||||
    onLoad() {
 | 
			
		||||
		this.getBrowseList();
 | 
			
		||||
	},
 | 
			
		||||
    methods: {
 | 
			
		||||
		getBrowseList () {
 | 
			
		||||
			this.$u.api.getBrowseList().then(res => {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					this.historyList = res.data.storeInfo;
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
@ -48,7 +59,7 @@ export default {
 | 
			
		||||
			.item-title {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
				> img {
 | 
			
		||||
				> image {
 | 
			
		||||
					width: 50rpx;
 | 
			
		||||
					height: 50rpx;
 | 
			
		||||
					border-radius: 50%;
 | 
			
		||||
@ -73,7 +84,7 @@ export default {
 | 
			
		||||
					font-size: 22rpx;
 | 
			
		||||
					color: rgba(51,51,51,1);
 | 
			
		||||
				}
 | 
			
		||||
				> img {
 | 
			
		||||
				> image {
 | 
			
		||||
					width: 37rpx;
 | 
			
		||||
					height: 8rpx;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
@ -23,14 +23,13 @@
 | 
			
		||||
                        <indexad style="width:690rpx"></indexad>
 | 
			
		||||
                        <view class="list">
 | 
			
		||||
                            <view >
 | 
			
		||||
                                <videoItem v-for="item in 10"></videoItem>
 | 
			
		||||
                                <videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"></videoItem>
 | 
			
		||||
                            </view>
 | 
			
		||||
                            <view style="margin-left:20rpx">
 | 
			
		||||
                                <videoItem v-for="item in 10"></videoItem>
 | 
			
		||||
                                <videoItem v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id" :item="item"></videoItem>
 | 
			
		||||
                            </view>
 | 
			
		||||
                        </view>
 | 
			
		||||
                    </view>
 | 
			
		||||
                    
 | 
			
		||||
                </scroll-view>
 | 
			
		||||
            </swiper-item>
 | 
			
		||||
            <swiper-item>
 | 
			
		||||
@ -178,7 +177,9 @@ export default {
 | 
			
		||||
					name: '关注'
 | 
			
		||||
				}
 | 
			
		||||
            ],
 | 
			
		||||
            num:0
 | 
			
		||||
			num:0,
 | 
			
		||||
			page: 0, // 0即第一页
 | 
			
		||||
			articleList: [],
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    components:{
 | 
			
		||||
@ -187,6 +188,9 @@ export default {
 | 
			
		||||
        indexad,
 | 
			
		||||
        darenItem
 | 
			
		||||
    },
 | 
			
		||||
    onLoad(){
 | 
			
		||||
       this.getArticlelist();
 | 
			
		||||
    },
 | 
			
		||||
    methods:{
 | 
			
		||||
        dianji(a){
 | 
			
		||||
            console.log(a)
 | 
			
		||||
@ -195,15 +199,17 @@ export default {
 | 
			
		||||
            }else{
 | 
			
		||||
                this.num = a
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
		},
 | 
			
		||||
		getArticlelist () {
 | 
			
		||||
			this.$u.api.getArticlelist({
 | 
			
		||||
				page: this.page,
 | 
			
		||||
				is_video_img: 0, // 查询视频1 图文2 都查0
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					this.articleList = res.data.list;
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
    },
 | 
			
		||||
    onLoad(){
 | 
			
		||||
        // this.$u.api.phoneLogin({
 | 
			
		||||
        //     member_mobile: 1,
 | 
			
		||||
        //     sms_code: 2
 | 
			
		||||
        // }).then((res)=>{
 | 
			
		||||
        //     console.log(res)
 | 
			
		||||
        // })
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
@ -128,7 +128,7 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
	filters: {
 | 
			
		||||
		phoneFormat(value) {
 | 
			
		||||
			return value.replace(/^(\d{3})\d*(\d{4})$/, '$1****$2');
 | 
			
		||||
			return value ? value.replace(/^(\d{3})\d*(\d{4})$/, '$1****$2') : '';
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	onLoad() {
 | 
			
		||||
 | 
			
		||||
@ -46,6 +46,9 @@
 | 
			
		||||
        <youhq></youhq>
 | 
			
		||||
        <view class="hr" style="margin-top:40rpx"></view>
 | 
			
		||||
        <list :classifyList="classifyList" :goodsList="goodsList"></list>
 | 
			
		||||
		<view class="cart" @click="toCartPage">
 | 
			
		||||
			<image src="/static/image/common/3.png"></image>
 | 
			
		||||
		</view>
 | 
			
		||||
		<u-picker mode="region" :params="areaParams" v-model="chooseArea" @confirm="setArea"></u-picker>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
@ -109,7 +112,6 @@ export default {
 | 
			
		||||
			this.$u.api.getGoodsRecommend({
 | 
			
		||||
				page: 1,
 | 
			
		||||
			}).then((res)=>{
 | 
			
		||||
				console.log(res);
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
					this.classifyList = res.data.classifyList;
 | 
			
		||||
					this.goodsList = res.data.goodsList;
 | 
			
		||||
@ -121,6 +123,11 @@ export default {
 | 
			
		||||
		setArea(e) {
 | 
			
		||||
			// console.log(e);
 | 
			
		||||
			this.area = e.city.label;
 | 
			
		||||
		},
 | 
			
		||||
		toCartPage() {
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url: '/pageC/cart/index'
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
@ -198,5 +205,22 @@ export default {
 | 
			
		||||
        margin-top: 29rpx;
 | 
			
		||||
        background-color: #ececec;
 | 
			
		||||
    }
 | 
			
		||||
	.cart {
 | 
			
		||||
		position: fixed;
 | 
			
		||||
		right: 30rpx;
 | 
			
		||||
		bottom: 300rpx;
 | 
			
		||||
		width: 100rpx;
 | 
			
		||||
		height: 100rpx;
 | 
			
		||||
		background: rgba(253, 211, 96, 1);
 | 
			
		||||
		box-shadow: 0rpx 10rpx 6rpx 0rpx rgba(253,211,96,0.34);
 | 
			
		||||
		border-radius: 50%;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		justify-content: center;
 | 
			
		||||
		> image {
 | 
			
		||||
			width: 56rpx;
 | 
			
		||||
			height: 54rpx;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}  
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								static/image/common/1.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/image/common/12.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 5.0 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/image/common/3.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/image/common/4.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1008 B  | 
							
								
								
									
										
											BIN
										
									
								
								static/image/common/5.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/image/common/6.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 1.9 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/image/common/7.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/image/common/8.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 8.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/image/common/9.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 7.6 KiB  |