gdpao
This commit is contained in:
		
							parent
							
								
									71e984b2ed
								
							
						
					
					
						commit
						502e020000
					
				@ -43,12 +43,15 @@ const install = (Vue, vm) => {
 | 
			
		||||
                                vm.$u.route('/pageA/login/login')
 | 
			
		||||
                            }, 500)
 | 
			
		||||
                        }
 | 
			
		||||
                        if (res.cancel) {
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                })
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        } else if (res.errCode == 1) {
 | 
			
		||||
            console.log(res.message);
 | 
			
		||||
            return res;
 | 
			
		||||
        } else {
 | 
			
		||||
            // 如果返回false,则会调用Promise的reject回调,
 | 
			
		||||
            // 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
 | 
			
		||||
 | 
			
		||||
@ -44,49 +44,57 @@
 | 
			
		||||
				this.$emit('tochange');
 | 
			
		||||
				let member_mobile = this.member_mobile;
 | 
			
		||||
				// 校验手机号
 | 
			
		||||
				let type_phone = this.$u.test.mobile(member_mobile)
 | 
			
		||||
				console.log(member_mobile)
 | 
			
		||||
				console.log(this.smslog_type)
 | 
			
		||||
				let type_phone = this.$u.test.mobile(member_mobile);
 | 
			
		||||
				// console.log(member_mobile);
 | 
			
		||||
				// console.log(this.smslog_type);
 | 
			
		||||
				// 判断是否有手机号为空
 | 
			
		||||
				if (type_phone == false) {
 | 
			
		||||
					this.$refs.uToast.show({
 | 
			
		||||
						title: '手机号格式不正确',
 | 
			
		||||
						type: 'error'
 | 
			
		||||
					})
 | 
			
		||||
                    this.$refs.uToast.show({
 | 
			
		||||
                    	title: "手机号格式不正确"
 | 
			
		||||
                    })
 | 
			
		||||
				} else {
 | 
			
		||||
					// 验证码倒计时
 | 
			
		||||
					if (this.$refs.uCode.canGetCode) {
 | 
			
		||||
						// 模拟向后端请求验证码
 | 
			
		||||
						uni.showLoading({
 | 
			
		||||
							title: '正在获取验证码'
 | 
			
		||||
						})
 | 
			
		||||
						setTimeout(() => {
 | 
			
		||||
							uni.hideLoading();
 | 
			
		||||
							// 这里此提示会被this.start()方法中的提示覆盖
 | 
			
		||||
							this.$u.toast('验证码已发送');
 | 
			
		||||
							// 通知验证码组件内部开始倒计时
 | 
			
		||||
							this.$refs.uCode.start();
 | 
			
		||||
						}, 2000);
 | 
			
		||||
                        uni.showLoading({
 | 
			
		||||
                        	title: '正在获取验证码'
 | 
			
		||||
                        })
 | 
			
		||||
                        // 请求接口
 | 
			
		||||
                        this.$u.api.sendSmsCode({
 | 
			
		||||
                        	member_mobile: this.member_mobile,
 | 
			
		||||
                        	smslog_type: this.smslog_type
 | 
			
		||||
                        }).then((res) => {
 | 
			
		||||
                            if (res.errCode == 0) {
 | 
			
		||||
                                console.log(res);
 | 
			
		||||
                                this.$refs.uToast.show({
 | 
			
		||||
                                	title: res.message,
 | 
			
		||||
                                })
 | 
			
		||||
                                setTimeout(() => {
 | 
			
		||||
                                	uni.hideLoading();
 | 
			
		||||
                                	// 这里此提示会被this.start()方法中的提示覆盖
 | 
			
		||||
                                	// this.$u.toast('验证码已发送');
 | 
			
		||||
                                	// 通知验证码组件内部开始倒计时
 | 
			
		||||
                                	this.$refs.uCode.start();
 | 
			
		||||
                                }, 100);
 | 
			
		||||
                            } else {
 | 
			
		||||
                                this.$refs.uToast.show({
 | 
			
		||||
                                	title: res.message,
 | 
			
		||||
                                })
 | 
			
		||||
                            }
 | 
			
		||||
                        })
 | 
			
		||||
					} else {
 | 
			
		||||
						// this.$u.toast('倒计时结束后再发送');
 | 
			
		||||
                        console.log("倒计时结束后再发送");
 | 
			
		||||
                        // console.log("倒计时结束后再发送");
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			},
 | 
			
		||||
			end() {
 | 
			
		||||
				this.$u.toast('倒计时结束');
 | 
			
		||||
				// this.$u.toast('倒计时结束');
 | 
			
		||||
			},
 | 
			
		||||
			start() {
 | 
			
		||||
				// this.$u.toast('倒计时开始');
 | 
			
		||||
				console.log(this.smslog_type)
 | 
			
		||||
				// console.log(this.smslog_type)
 | 
			
		||||
				// 倒计时请求
 | 
			
		||||
				this.$u.api.sendSmsCode({
 | 
			
		||||
					member_mobile: this.member_mobile,
 | 
			
		||||
					smslog_type: this.smslog_type
 | 
			
		||||
				}).then((res) => {
 | 
			
		||||
					console.log(res)
 | 
			
		||||
				})
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -297,17 +297,18 @@
 | 
			
		||||
				height: 560rpx;
 | 
			
		||||
 | 
			
		||||
				.protocol_content {
 | 
			
		||||
					display: block;
 | 
			
		||||
					width: 494rpx;
 | 
			
		||||
					height: 528rpx;
 | 
			
		||||
					margin: 10rpx auto 30rpx;
 | 
			
		||||
					font-size: 24rpx;
 | 
			
		||||
					font-weight: 400;
 | 
			
		||||
					color: rgba(51, 51, 51, 1);
 | 
			
		||||
					display: block;
 | 
			
		||||
					text-align: left;
 | 
			
		||||
					margin: 80rpx auto 33rpx;
 | 
			
		||||
					letter-spacing: 1rpx;
 | 
			
		||||
					text-align: justify;
 | 
			
		||||
					line-height: 36rpx;
 | 
			
		||||
					text-align: justify;
 | 
			
		||||
					letter-spacing: 1rpx;
 | 
			
		||||
                    text-indent: 2rem;
 | 
			
		||||
					color: rgba(51, 51, 51, 1);
 | 
			
		||||
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
@ -95,7 +95,7 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
		setSwiperHeight() {
 | 
			
		||||
			// height: 230px, margin-bottom: 13
 | 
			
		||||
			const height = Math.ceil(this.goodsList.length / 2) * (540 + 26);
 | 
			
		||||
			const height = Math.ceil(this.goodsList.length / 2) * (500 + 26);
 | 
			
		||||
			this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
 | 
			
		||||
			// this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (270 + 13) + 'px';
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
        <image :src="info.goods_image" mode="aspectFill" class="img"></image>
 | 
			
		||||
        <view class="info">
 | 
			
		||||
            <text class="title u-line-2">{{ info.goods_name }}</text>
 | 
			
		||||
            <text class="jianjie u-line-1">{{ info.goods_advword }}</text>
 | 
			
		||||
            <!-- <text class="jianjie u-line-1">{{ info.goods_advword }}</text> -->
 | 
			
		||||
            <text class="price">¥{{ info.goods_price }}</text>
 | 
			
		||||
        </view>
 | 
			
		||||
    </view>
 | 
			
		||||
@ -44,7 +44,7 @@ export default {
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.item{
 | 
			
		||||
    width: 330rpx;
 | 
			
		||||
	height: 520rpx;
 | 
			
		||||
	height: 480rpx;
 | 
			
		||||
    margin-bottom: 26rpx;
 | 
			
		||||
    background-color: #f8f8f8;
 | 
			
		||||
    border-radius: 10rpx 10rpx 0rpx 0rpx;
 | 
			
		||||
@ -62,10 +62,11 @@ export default {
 | 
			
		||||
        flex-direction: column;
 | 
			
		||||
        justify-content: space-around;
 | 
			
		||||
        .title{
 | 
			
		||||
			line-height: 40rpx;
 | 
			
		||||
            font-size: 30rpx;
 | 
			
		||||
			margin-bottom: 16rpx;
 | 
			
		||||
            font-size: 26rpx;
 | 
			
		||||
            font-weight: 600;
 | 
			
		||||
			line-height: 30rpx;
 | 
			
		||||
            color: #333;
 | 
			
		||||
			margin-bottom: 13rpx;
 | 
			
		||||
        }
 | 
			
		||||
        .jianjie{
 | 
			
		||||
            font-size: 26rpx;
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
        <view class="top">
 | 
			
		||||
            <text>今日秒杀推荐</text>
 | 
			
		||||
			<view class="more" @click="toOthersPage">
 | 
			
		||||
				<text>点击查看更多</text>
 | 
			
		||||
				<text>查看更多</text>
 | 
			
		||||
				<u-icon name="arrow-right" color="#999" size="22"></u-icon>
 | 
			
		||||
			</view>
 | 
			
		||||
        </view>
 | 
			
		||||
@ -68,6 +68,7 @@ export default {
 | 
			
		||||
			display: flex;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			color: #999;
 | 
			
		||||
            font-size: 20rpx;
 | 
			
		||||
		}
 | 
			
		||||
    }
 | 
			
		||||
    .connect{
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
        <view class="top">
 | 
			
		||||
            <text>今日拼团推荐</text>
 | 
			
		||||
			<view class="more" @click="toDetailsPage">
 | 
			
		||||
				<text>点击查看详情</text>
 | 
			
		||||
				<text>查看详情</text>
 | 
			
		||||
				<u-icon name="arrow-right" color="#999" size="22"></u-icon>
 | 
			
		||||
			</view>
 | 
			
		||||
        </view>
 | 
			
		||||
@ -23,7 +23,7 @@
 | 
			
		||||
                    <text>¥{{ info.goods_price }}</text>
 | 
			
		||||
                </view>
 | 
			
		||||
            </view>
 | 
			
		||||
            <image class="img" :src="info.pintuan_image" @click="toDetailsPage"></image>
 | 
			
		||||
            <image class="img" :src="info.pintuan_image" @click="toDetailsPage" mode="aspectFill"></image>
 | 
			
		||||
        </view>
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
@ -158,10 +158,11 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        .img{
 | 
			
		||||
            width: 213rpx;
 | 
			
		||||
            height: 160rpx;
 | 
			
		||||
            flex-shrink: 0;
 | 
			
		||||
            margin-left: 13rpx;
 | 
			
		||||
            width: 210rpx;
 | 
			
		||||
            height: 200rpx;
 | 
			
		||||
            margin-left: 10rpx;
 | 
			
		||||
            border-radius: 4rpx;
 | 
			
		||||
			background-color: antiquewhite;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@
 | 
			
		||||
                    <text class="num">00</text>
 | 
			
		||||
                    <text class="mah">:</text>
 | 
			
		||||
                    <text class="num">00</text>
 | 
			
		||||
					<text>-</text>
 | 
			
		||||
					<text class="heng">-</text>
 | 
			
		||||
					<text class="num">{{ time.bigHour }}</text>
 | 
			
		||||
                    <text class="mah">:</text>
 | 
			
		||||
                    <text class="num">00</text>
 | 
			
		||||
@ -47,10 +47,10 @@ export default {
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.seckill{
 | 
			
		||||
	background-color: #fff;
 | 
			
		||||
	padding: 30rpx;
 | 
			
		||||
	padding: 0 30rpx 30rpx;
 | 
			
		||||
	margin-bottom: 20rpx;
 | 
			
		||||
    .top{
 | 
			
		||||
        height: 60rpx;
 | 
			
		||||
        height: 90rpx;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
@ -66,13 +66,23 @@ export default {
 | 
			
		||||
                display: flex;
 | 
			
		||||
                align-items: center;
 | 
			
		||||
                font-size: 20rpx;
 | 
			
		||||
                .heng {
 | 
			
		||||
                    margin: 0 6rpx;
 | 
			
		||||
                }
 | 
			
		||||
                .num{
 | 
			
		||||
					box-sizing: content-box;
 | 
			
		||||
                    width: 25rpx;
 | 
			
		||||
                    height: 25rpx;
 | 
			
		||||
                    background-color: #bfbfbf;
 | 
			
		||||
                    margin: 0 10rpx;
 | 
			
		||||
					padding: 2rpx;
 | 
			
		||||
					padding: 2rpx 4rpx;
 | 
			
		||||
                    margin: 0 6rpx;
 | 
			
		||||
                    color: #fff;
 | 
			
		||||
                    text-align: center;
 | 
			
		||||
                    line-height: 25rpx;
 | 
			
		||||
                    border-radius: 4rpx;
 | 
			
		||||
					box-sizing: content-box;
 | 
			
		||||
                    background-color: #000;
 | 
			
		||||
                }
 | 
			
		||||
                .mah {
 | 
			
		||||
                    vertical-align: text-top;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@ -85,7 +95,7 @@ export default {
 | 
			
		||||
    }
 | 
			
		||||
    .list{
 | 
			
		||||
        display: flex;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        // justify-content: space-between;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -1,12 +1,12 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <view class="item" @click="spikeGoods">
 | 
			
		||||
        <image class="head" :src="item.groupbuy_image1"></image>
 | 
			
		||||
        <image class="head" :src="item.groupbuy_image1" mode="aspectFill"></image>
 | 
			
		||||
        <text class="title u-line-2">{{ item.goods_name }}</text>
 | 
			
		||||
        <view class="price">
 | 
			
		||||
            <text>¥{{ item.groupbuy_price }}</text>
 | 
			
		||||
            <text class="origin">¥{{ item.goods_price }}</text>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="info">
 | 
			
		||||
        <view class="info" v-if="0">
 | 
			
		||||
            <text>剩余{{ item.inventory | formatValue }}件</text>
 | 
			
		||||
            <text>立即购买</text>
 | 
			
		||||
        </view>
 | 
			
		||||
@ -55,23 +55,28 @@ export default {
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.item{
 | 
			
		||||
    width: 220rpx;
 | 
			
		||||
    width: 30%;
 | 
			
		||||
    margin-right: 50rpx;
 | 
			
		||||
    .head{
 | 
			
		||||
        width: 210rpx;
 | 
			
		||||
        height: 131rpx;
 | 
			
		||||
        width: 100%;
 | 
			
		||||
        height: 210rpx;
 | 
			
		||||
        border-radius: 6rpx;
 | 
			
		||||
		background-color: antiquewhite;
 | 
			
		||||
    }
 | 
			
		||||
    .title{
 | 
			
		||||
        width: 200rpx;
 | 
			
		||||
        height: 30rpx;
 | 
			
		||||
        margin-top: 6rpx;
 | 
			
		||||
        font-size: 26rpx;
 | 
			
		||||
        line-height: 30rpx;
 | 
			
		||||
        color: #333;
 | 
			
		||||
        margin-top: 16rpx;
 | 
			
		||||
        -webkit-line-clamp: 1 !important;
 | 
			
		||||
    }
 | 
			
		||||
    .price{
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        margin-top: 19rpx;
 | 
			
		||||
        margin-top: 10rpx;
 | 
			
		||||
        >text:first-child{
 | 
			
		||||
            font-size: 26rpx;
 | 
			
		||||
            color: #FF3131;
 | 
			
		||||
@ -88,7 +93,7 @@ export default {
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        font-size: 20rpx;
 | 
			
		||||
        margin-top: 19rpx;
 | 
			
		||||
        margin-top: 10rpx;
 | 
			
		||||
        >text:first-child{
 | 
			
		||||
            color: #666;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@
 | 
			
		||||
		</view>
 | 
			
		||||
		<u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="60" ></u-tabs-swiper>
 | 
			
		||||
		 <!-- :style="{ height: swiperHeight }" -->
 | 
			
		||||
		<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{height: swiperHeight}">
 | 
			
		||||
		<swiper class="box" :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{height: swiperHeight}">
 | 
			
		||||
			<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
 | 
			
		||||
				<!-- 最多显示四个 -->
 | 
			
		||||
				<view v-for="(coupon, index) in couponList.slice(0, 4)" :key="index" class="coupon-item">
 | 
			
		||||
@ -107,18 +107,21 @@ export default {
 | 
			
		||||
			color: rgba(51,51,51,1);
 | 
			
		||||
		}
 | 
			
		||||
		.view-more {
 | 
			
		||||
			font-size: 18rpx;
 | 
			
		||||
			font-size: 20rpx;
 | 
			
		||||
			color: rgba(153,153,153,1);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	.swiper-coupon-item {
 | 
			
		||||
		padding: 0 30rpx;
 | 
			
		||||
		box-sizing: border-box;
 | 
			
		||||
		background-color: #ffffff;
 | 
			
		||||
		.coupon-item {
 | 
			
		||||
            height: 200rpx;
 | 
			
		||||
			margin-bottom: 20rpx;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
    .box {
 | 
			
		||||
        padding-top: 20rpx;
 | 
			
		||||
        .swiper-coupon-item {
 | 
			
		||||
            padding: 0 30rpx;
 | 
			
		||||
            box-sizing: border-box;
 | 
			
		||||
            background-color: #ffffff;
 | 
			
		||||
            .coupon-item {
 | 
			
		||||
                height: 200rpx;
 | 
			
		||||
                margin-bottom: 20rpx;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -101,7 +101,7 @@
 | 
			
		||||
		},
 | 
			
		||||
		onLoad() {
 | 
			
		||||
			// 数据的请求
 | 
			
		||||
			this.apiwelcome();
 | 
			
		||||
			// this.apiwelcome();
 | 
			
		||||
		},
 | 
			
		||||
		onShow() {
 | 
			
		||||
			let pages = getCurrentPages();
 | 
			
		||||
@ -123,7 +123,9 @@
 | 
			
		||||
			...mapMutations(['loginIn']),
 | 
			
		||||
			apiwelcome() {
 | 
			
		||||
				this.$u.api.sendSmsCode({}).then((res) => {
 | 
			
		||||
					console.log(res)
 | 
			
		||||
                    if (res.errCode == 0) {
 | 
			
		||||
                        console.log(res)
 | 
			
		||||
                    }
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 协议跳转
 | 
			
		||||
@ -148,21 +150,18 @@
 | 
			
		||||
				if (this.member_mobile == '') {
 | 
			
		||||
					this.$refs.uToast.show({
 | 
			
		||||
						title: '手机号不能为空',
 | 
			
		||||
						type: 'error'
 | 
			
		||||
					})
 | 
			
		||||
					return false;
 | 
			
		||||
				}
 | 
			
		||||
				if (type_phone == false) {
 | 
			
		||||
					this.$refs.uToast.show({
 | 
			
		||||
						title: '手机号格式不正确',
 | 
			
		||||
						type: 'error'
 | 
			
		||||
					});
 | 
			
		||||
					return false;
 | 
			
		||||
				}
 | 
			
		||||
				if (this.sms_code == '') {
 | 
			
		||||
					this.$refs.uToast.show({
 | 
			
		||||
						title: '验证码不能为空',
 | 
			
		||||
						type: 'error'
 | 
			
		||||
					})
 | 
			
		||||
					return false;
 | 
			
		||||
				}
 | 
			
		||||
@ -176,7 +175,6 @@
 | 
			
		||||
						if (res.data == '') {
 | 
			
		||||
							this.$refs.uToast.show({
 | 
			
		||||
								title: res.message,
 | 
			
		||||
								type: 'error'
 | 
			
		||||
							})
 | 
			
		||||
							return false
 | 
			
		||||
						} else {
 | 
			
		||||
@ -205,7 +203,6 @@
 | 
			
		||||
					} else {
 | 
			
		||||
						this.$refs.uToast.show({
 | 
			
		||||
							title: res.message,
 | 
			
		||||
							type: 'error'
 | 
			
		||||
						})
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
 | 
			
		||||
@ -109,28 +109,24 @@
 | 
			
		||||
				if( this.member_mobile == ''){
 | 
			
		||||
					this.$refs.uToast.show({
 | 
			
		||||
						title: '手机号不能为空!',
 | 
			
		||||
						type: 'error'
 | 
			
		||||
					})
 | 
			
		||||
					return false;
 | 
			
		||||
				}
 | 
			
		||||
				if (type_phone == false) {
 | 
			
		||||
					this.$refs.uToast.show({
 | 
			
		||||
						title: '手机号格式不正确!',
 | 
			
		||||
						type: 'error'
 | 
			
		||||
					});
 | 
			
		||||
					return false;
 | 
			
		||||
				}
 | 
			
		||||
				if( this.sms_code == ''){
 | 
			
		||||
					this.$refs.uToast.show({
 | 
			
		||||
						title: '验证码不能为空!',
 | 
			
		||||
						type: 'error'
 | 
			
		||||
					})
 | 
			
		||||
					return false;
 | 
			
		||||
				}
 | 
			
		||||
                if (this.is_check) {
 | 
			
		||||
                    this.$refs.uToast.show({
 | 
			
		||||
                    	title: '请同意协议!',
 | 
			
		||||
                    	type: 'error'
 | 
			
		||||
                    })
 | 
			
		||||
                    return false;
 | 
			
		||||
                }
 | 
			
		||||
@ -138,10 +134,6 @@
 | 
			
		||||
					member_mobile: this.member_mobile,
 | 
			
		||||
					sms_code: this.sms_code
 | 
			
		||||
				}).then((res) => {
 | 
			
		||||
					console.log('3333333333',res);
 | 
			
		||||
					// 校验手机号
 | 
			
		||||
					
 | 
			
		||||
					// console.log(res)
 | 
			
		||||
					if(res.errCode == 0){
 | 
			
		||||
                        //存储一个字符传值
 | 
			
		||||
                        me.loginIn(res.data.token);
 | 
			
		||||
@ -159,20 +151,18 @@
 | 
			
		||||
						// 	type: 'success',
 | 
			
		||||
						// 	url: '/pageA/topick/topick'
 | 
			
		||||
						// })
 | 
			
		||||
					}
 | 
			
		||||
					if(res.errCode == 1){
 | 
			
		||||
						this.$refs.uToast.show({
 | 
			
		||||
							title: res.message,
 | 
			
		||||
							type: 'error'
 | 
			
		||||
						})
 | 
			
		||||
					}
 | 
			
		||||
					if(res.errCode == 2){
 | 
			
		||||
					} else if(res.errCode == 2){
 | 
			
		||||
						this.$refs.uToast.show({
 | 
			
		||||
							title: res.message,
 | 
			
		||||
							type: 'primary',
 | 
			
		||||
							url: '/pageA/login/login'
 | 
			
		||||
						})
 | 
			
		||||
					}
 | 
			
		||||
					} else {
 | 
			
		||||
                        this.$refs.uToast.show({
 | 
			
		||||
                        	title: res.message,
 | 
			
		||||
                        	type: 'primary'
 | 
			
		||||
                        })
 | 
			
		||||
                    }
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
			// 选中某个复选框时,由checkbox时触发
 | 
			
		||||
@ -196,7 +186,6 @@
 | 
			
		||||
				// console.log("调用父组件的方法")
 | 
			
		||||
				// console.log('2222',this._data.member_mobile)
 | 
			
		||||
				let member_mobile = this._data.member_mobile;
 | 
			
		||||
				
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		components: {
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,7 @@
 | 
			
		||||
		<!-- 评论 -->
 | 
			
		||||
        <view class="operat pinglun">
 | 
			
		||||
            <u-icon name="more-circle-fill" :color=" is_content ? '#FF7807' : '#ffffff' " :size="50" @click="editing()"></u-icon>
 | 
			
		||||
            <text>{{item.comment_num}}</text>
 | 
			
		||||
            <text>{{ comment_num }}</text>
 | 
			
		||||
        </view>
 | 
			
		||||
		<!-- 购物车 -->
 | 
			
		||||
        <view class="operat gouwu">
 | 
			
		||||
@ -74,7 +74,7 @@
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
    name:'userinfo',
 | 
			
		||||
	props:['list','cart','comment'],
 | 
			
		||||
	props:['list','cart','comment','num'],
 | 
			
		||||
    data(){
 | 
			
		||||
        return {
 | 
			
		||||
			is_follow: this.list.is_attention || false,
 | 
			
		||||
@ -82,6 +82,7 @@ export default {
 | 
			
		||||
			is_collect: this.list.is_collect || false,
 | 
			
		||||
			is_content: false,
 | 
			
		||||
			is_cart: false,
 | 
			
		||||
            comment_num: this.list.comment_num || 0,
 | 
			
		||||
			item: this.list || {}
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
@ -92,15 +93,21 @@ export default {
 | 
			
		||||
			this.is_follow = this.list.is_attention || false;
 | 
			
		||||
			this.is_like = this.list.is_like || false;
 | 
			
		||||
			this.is_collect = this.list.is_collect || false;
 | 
			
		||||
            this.comment_num = this.list.comment_num || 0;
 | 
			
		||||
		},
 | 
			
		||||
		cart(newValue,old) {
 | 
			
		||||
			// console.log(newValue,old);
 | 
			
		||||
			// console.log(newValue);
 | 
			
		||||
			this.is_cart = newValue;
 | 
			
		||||
		},
 | 
			
		||||
		comment(newValue,old) {
 | 
			
		||||
			// console.log(newValue,old);
 | 
			
		||||
			this.is_content = newValue;
 | 
			
		||||
		},
 | 
			
		||||
        num(newVal,old) {
 | 
			
		||||
            // console.log(newVal);
 | 
			
		||||
            this.comment_num = newVal;
 | 
			
		||||
            // this.item.comment_num = newVal;
 | 
			
		||||
        },
 | 
			
		||||
		deep: true
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
 | 
			
		||||
@ -102,7 +102,7 @@ export default {
 | 
			
		||||
                if (res.errCode == 0) {
 | 
			
		||||
                    // console.log(res);
 | 
			
		||||
                    this.listInfo = res.data.list;
 | 
			
		||||
                    console.log(this.listInfo);
 | 
			
		||||
                    // console.log(this.listInfo);
 | 
			
		||||
                } else {
 | 
			
		||||
                    console.log(res.message);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
@ -22,14 +22,14 @@
 | 
			
		||||
			</view>
 | 
			
		||||
        </view>
 | 
			
		||||
		<!-- 用户操作 -->
 | 
			
		||||
        <userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" @openCart="openPopup"></userinfo>
 | 
			
		||||
        <userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num" @openCart="openPopup"></userinfo>
 | 
			
		||||
		<!-- 评论 -->
 | 
			
		||||
		<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx">
 | 
			
		||||
			<view class="top">
 | 
			
		||||
				<text>评论</text>
 | 
			
		||||
				<u-icon name="arrow-down" color="#333" size="28" @click="is_comment=false"></u-icon>
 | 
			
		||||
			</view>
 | 
			
		||||
			<scroll-view class="scroll-box" scroll-y="true" @scrolltolower="scrollBottom">
 | 
			
		||||
			<scroll-view class="scroll-box" scroll-y="true" lower-threshold="50" @scrolltolower="scrollBottom">
 | 
			
		||||
				<block v-for="(item,index) in commentList" :key="index">
 | 
			
		||||
					<view class="box">
 | 
			
		||||
						<image :src="item.member_avatar" mode="aspectFill"></image>
 | 
			
		||||
@ -55,7 +55,8 @@
 | 
			
		||||
                        <view class="more-reply" v-if="item.reply_count" @click="getReplyList(item.id)">展开更多回复<u-icon name="arrow-down"></u-icon></view>
 | 
			
		||||
                    </view>
 | 
			
		||||
				</block>
 | 
			
		||||
				<!-- <view class="no-data" v-else>111</view> -->
 | 
			
		||||
                <view class="no-data" v-if="!commentList.length">还没有评论,快来评论吧!</view>
 | 
			
		||||
				<u-loadmore v-else :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
 | 
			
		||||
			</scroll-view>
 | 
			
		||||
			<view class="editing" @click="openKeyInput">
 | 
			
		||||
				<input type="text" value="" :placeholder="edit_text" disabled="disabled" />
 | 
			
		||||
@ -258,9 +259,11 @@
 | 
			
		||||
            }
 | 
			
		||||
		}
 | 
			
		||||
		.no-data {
 | 
			
		||||
			margin-top: 100rpx;
 | 
			
		||||
			margin-top: 200rpx;
 | 
			
		||||
            text-align: center;
 | 
			
		||||
		}
 | 
			
		||||
		.editing {
 | 
			
		||||
            z-index: 1000;
 | 
			
		||||
			position: fixed;
 | 
			
		||||
			bottom: 0;
 | 
			
		||||
			display: flex;
 | 
			
		||||
@ -411,10 +414,19 @@ export default {
 | 
			
		||||
			cartList: [],
 | 
			
		||||
			cart_len: 0,
 | 
			
		||||
			photo_len: 0,
 | 
			
		||||
            comment_num: 0,
 | 
			
		||||
			edit_text: "有爱评论,说点好听的 ~",
 | 
			
		||||
			edit_text_other: "有爱评论,说点好听的 ~",
 | 
			
		||||
			commentList: [], // 评论
 | 
			
		||||
            allList: [], // 全部子评论
 | 
			
		||||
            status: 'loadmore',
 | 
			
		||||
            iconType: 'circle',
 | 
			
		||||
            loadText: {
 | 
			
		||||
                loadmore: '轻轻上拉',
 | 
			
		||||
                loading: '努力加载中',
 | 
			
		||||
                nomore: '暂时没有更多了',
 | 
			
		||||
                no: '评论'
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
	onLoad(option){
 | 
			
		||||
@ -455,7 +467,7 @@ export default {
 | 
			
		||||
			this.is_comment = data.comment;
 | 
			
		||||
			if (this.is_comment) {
 | 
			
		||||
                this.page = 0;
 | 
			
		||||
				this.getComment(this.article_id,0);
 | 
			
		||||
				this.getComment();
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		// 获取评论
 | 
			
		||||
@ -464,13 +476,20 @@ export default {
 | 
			
		||||
				article_id: this.article_id,
 | 
			
		||||
				page: this.page,
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				console.log(res);
 | 
			
		||||
				if (res.errCode == 0 && this.page == 0) {
 | 
			
		||||
					this.commentList = res.data;
 | 
			
		||||
				} else if (res.errCode == 0 && this.page > 0) {
 | 
			
		||||
                    this.commentList = this.commentList.concat(res.data);
 | 
			
		||||
                } else {
 | 
			
		||||
                    
 | 
			
		||||
                this.status = "loading";
 | 
			
		||||
				// console.log(res);
 | 
			
		||||
                if (res.errCode == 0) {
 | 
			
		||||
                    if (this.commentList.length < 8) {
 | 
			
		||||
                        this.status = "nomore";
 | 
			
		||||
                    }
 | 
			
		||||
                    if (this.page == 0) {
 | 
			
		||||
                    	this.commentList = res.data;
 | 
			
		||||
                    } else if (res.data.length == 0 && this.page > 0) {
 | 
			
		||||
                        this.status = "nomore";
 | 
			
		||||
                    } else {
 | 
			
		||||
                        this.commentList = this.commentList.concat(res.data);
 | 
			
		||||
                    }
 | 
			
		||||
                    this.page++;
 | 
			
		||||
                }
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
@ -501,6 +520,8 @@ export default {
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				// console.log(res.data.data);
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
                    this.comment_num = res.data.num;
 | 
			
		||||
                    // console.log(this.comment_num);
 | 
			
		||||
					this.is_edit = false;
 | 
			
		||||
                    if (res.data.data.pid) {
 | 
			
		||||
                        this.commentList[this.comment_id].reply_count = true;
 | 
			
		||||
@ -540,7 +561,6 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
        // 评论滚动到底部
 | 
			
		||||
        scrollBottom(e) {
 | 
			
		||||
            this.page++;
 | 
			
		||||
            this.getComment();
 | 
			
		||||
        },
 | 
			
		||||
		// 跳转到商品
 | 
			
		||||
 | 
			
		||||
@ -20,20 +20,21 @@
 | 
			
		||||
			</view>
 | 
			
		||||
			<swiper class="card" @change="dianji" :current="num">
 | 
			
		||||
				<swiper-item>
 | 
			
		||||
					<scroll-view style="width:100%;height:100%" scroll-y="true">
 | 
			
		||||
					<scroll-view style="width:100%;height:100%" scroll-y="true" lower-threshold="200" @scrolltolower="swiperBottom">
 | 
			
		||||
						<view class="box">
 | 
			
		||||
							<!-- <indexad style="width:690rpx"></indexad> -->
 | 
			
		||||
							<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
 | 
			
		||||
							<view class="list">
 | 
			
		||||
								<view>
 | 
			
		||||
									<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
 | 
			
		||||
									<videoItem v-for="(item,id) in articleList.filter((_, index) => !(index&1))" :key="id" :item="item"
 | 
			
		||||
									 @getArticlelist="getArticlelist"></videoItem>
 | 
			
		||||
								</view>
 | 
			
		||||
								<view style="margin-left:20rpx">
 | 
			
		||||
									<videoItem v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id" :item="item"
 | 
			
		||||
									<videoItem v-for="(item,id) in articleList.filter((_, index) => index&1)" :key="id" :item="item"
 | 
			
		||||
									 @getArticlelist="getArticlelist"></videoItem>
 | 
			
		||||
								</view>
 | 
			
		||||
							</view>
 | 
			
		||||
                            <u-loadmore :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
 | 
			
		||||
						</view>
 | 
			
		||||
					</scroll-view>
 | 
			
		||||
				</swiper-item>
 | 
			
		||||
@ -55,7 +56,7 @@
 | 
			
		||||
					</scroll-view>
 | 
			
		||||
				</swiper-item>
 | 
			
		||||
				<swiper-item>
 | 
			
		||||
					<scroll-view style="width:100%;height:100%" scroll-y="true">
 | 
			
		||||
					<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="followBotton" lower-threshold="200">
 | 
			
		||||
						<view class="box">
 | 
			
		||||
							<view class="tuijian">
 | 
			
		||||
								<view class="title" @click="toSearchPage">
 | 
			
		||||
@ -74,9 +75,11 @@
 | 
			
		||||
							<view class="rec-list">
 | 
			
		||||
								<view class="rec-box">
 | 
			
		||||
                                    <!-- {{ fansList }} -->
 | 
			
		||||
									<videoItem isguanzhu="true" v-for="item in fansList" :key="item.article_id"
 | 
			
		||||
									 :item="item"></videoItem>
 | 
			
		||||
                                     <view class="no-data" v-show="!fansList.length">您还没有关注哦,赶紧去点点关注!</view>
 | 
			
		||||
                                    <view class="item">
 | 
			
		||||
                                        <videoItem isguanzhu="true" v-for="(item,id) in fansList" :key="id" :item="item"></videoItem>
 | 
			
		||||
                                    </view>
 | 
			
		||||
                                     <view class="no-data" v-if="!fansList.length">您还没有关注哦,赶紧去点点关注!</view>
 | 
			
		||||
                                     <u-loadmore v-else :status="status_1" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
 | 
			
		||||
								</view>
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
@ -182,15 +185,19 @@
 | 
			
		||||
        .rec-list {
 | 
			
		||||
            width: 100%;
 | 
			
		||||
            .rec-box {
 | 
			
		||||
                display: flex;
 | 
			
		||||
                flex-wrap: wrap;
 | 
			
		||||
                justify-content: space-between;
 | 
			
		||||
                .no-data {
 | 
			
		||||
                    margin: 200rpx auto 0;
 | 
			
		||||
                width: 100%;
 | 
			
		||||
                .item {
 | 
			
		||||
                    display: flex;
 | 
			
		||||
                    flex-wrap: wrap;
 | 
			
		||||
                    justify-content: space-between;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
	}
 | 
			
		||||
    .no-data {
 | 
			
		||||
        margin: 200rpx auto 0;
 | 
			
		||||
        text-align: center;
 | 
			
		||||
    }
 | 
			
		||||
</style>
 | 
			
		||||
<script>
 | 
			
		||||
    import { mapState } from 'vuex'
 | 
			
		||||
@ -215,12 +222,21 @@
 | 
			
		||||
				}],
 | 
			
		||||
				num: 0,
 | 
			
		||||
				page: 0, // 0即第一页
 | 
			
		||||
                follow_page: 0, //
 | 
			
		||||
				articleList: [],
 | 
			
		||||
				recommendList: [], // 推荐达人
 | 
			
		||||
				indexImageSwiper: [],
 | 
			
		||||
				zhiboImageSwiper: [],
 | 
			
		||||
				tabLiveLists: [],
 | 
			
		||||
                fansList: [], // 关注的发现列表
 | 
			
		||||
                status: 'loadmore',
 | 
			
		||||
                status_1: 'loadmore',
 | 
			
		||||
                iconType: 'circle',
 | 
			
		||||
                loadText: {
 | 
			
		||||
                    loadmore: '轻轻上拉',
 | 
			
		||||
                    loading: '努力加载中',
 | 
			
		||||
                    nomore: '实在没有了'
 | 
			
		||||
                }
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		components: {
 | 
			
		||||
@ -230,6 +246,8 @@
 | 
			
		||||
			darenItem
 | 
			
		||||
		},
 | 
			
		||||
		onShow() {
 | 
			
		||||
            this.articleList = [];
 | 
			
		||||
            this.page = 0;
 | 
			
		||||
			this.getArticlelist();
 | 
			
		||||
			this.getSwiper();
 | 
			
		||||
		},
 | 
			
		||||
@ -260,8 +278,9 @@
 | 
			
		||||
				this.$u.api.attentionMember({
 | 
			
		||||
					member_id: member_id
 | 
			
		||||
				}).then((res) => {
 | 
			
		||||
					console.log(res)
 | 
			
		||||
					this.getRecommendList();
 | 
			
		||||
					console.log(res);
 | 
			
		||||
                    this.follow_page = 0;
 | 
			
		||||
					this.getRecommendList(); // 关注列表
 | 
			
		||||
                    this.getFollowList(); // 刷新发现的列表
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
@ -282,12 +301,16 @@
 | 
			
		||||
				}
 | 
			
		||||
                // 状态请求
 | 
			
		||||
                if (this.num == 0) {
 | 
			
		||||
                    this.page = 0;
 | 
			
		||||
                    this.status = "loadmore";
 | 
			
		||||
                    this.getArticlelist();
 | 
			
		||||
                    this.getSwiper();
 | 
			
		||||
                } else if (this.num == 1) {
 | 
			
		||||
                    this.getZhiBoSwiper(); // 直播轮播
 | 
			
		||||
                    this.tabLiveList();
 | 
			
		||||
                } else if (this.num == 2) {
 | 
			
		||||
                    this.follow_page = 0;
 | 
			
		||||
                    this.status = "loadmore";
 | 
			
		||||
                    if (this.hasLogin) {
 | 
			
		||||
                        this.getFollowList(); // 关注列表
 | 
			
		||||
                    }
 | 
			
		||||
@ -300,13 +323,33 @@
 | 
			
		||||
					page: this.page,
 | 
			
		||||
					is_video_img: 0, // 查询视频1 图文2 都查0
 | 
			
		||||
				}).then(res => {
 | 
			
		||||
                    // uni.stopPullDownRefresh();
 | 
			
		||||
					// console.log('37647744ghj', res)
 | 
			
		||||
					if (res.errCode == 0) {
 | 
			
		||||
						this.articleList = res.data.list;
 | 
			
		||||
					}
 | 
			
		||||
                    this.status = "loading";
 | 
			
		||||
                    if (res.errCode == 0) {
 | 
			
		||||
                        // uni.stopPullDownRefresh();
 | 
			
		||||
                        // console.log('37647744ghj', res)
 | 
			
		||||
                        if (this.page == 0) {
 | 
			
		||||
                        	this.articleList = res.data.list;
 | 
			
		||||
                            this.status = "loadmore";
 | 
			
		||||
                        } else if (res.data.length == 0 && this.page > 0) {
 | 
			
		||||
                            this.status = "nomore";
 | 
			
		||||
                        } else {
 | 
			
		||||
                            this.articleList = this.articleList.concat(res.data.list);
 | 
			
		||||
                        }
 | 
			
		||||
                        this.page++;
 | 
			
		||||
                    } else {
 | 
			
		||||
                        this.status = "nomore"
 | 
			
		||||
                    }
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
            // 发现下拉加载
 | 
			
		||||
            swiperBottom(e) {
 | 
			
		||||
                this.getArticlelist();
 | 
			
		||||
                // console.log(e);
 | 
			
		||||
            },
 | 
			
		||||
            followBotton(e) {
 | 
			
		||||
                this.getFollowList();
 | 
			
		||||
              // console.log(e);
 | 
			
		||||
            },
 | 
			
		||||
            // 达人列表
 | 
			
		||||
			getRecommendList() {
 | 
			
		||||
				this.$u.api.getRecommendList().then(res => {
 | 
			
		||||
@ -319,12 +362,24 @@
 | 
			
		||||
            // 关注发现列表
 | 
			
		||||
            getFollowList() {
 | 
			
		||||
                this.$u.post("article/attentionArticleList",{
 | 
			
		||||
                    page: 0,
 | 
			
		||||
                    page: this.follow_page,
 | 
			
		||||
                }).then(res => {
 | 
			
		||||
                    this.status_1 = "loading";
 | 
			
		||||
                    if (res.errCode == 0) {
 | 
			
		||||
                        this.fansList = res.data.list;
 | 
			
		||||
                        // uni.stopPullDownRefresh();
 | 
			
		||||
                        // console.log('37647744ghj', res)
 | 
			
		||||
                        if (this.follow_page == 0) {
 | 
			
		||||
                            this.fansList = res.data.list;
 | 
			
		||||
                            this.status_1 = "loadmore";
 | 
			
		||||
                        } else if (res.data.list.length == 0 && this.follow_page > 0) {
 | 
			
		||||
                            this.status_1 = "nomore";
 | 
			
		||||
                        } else {
 | 
			
		||||
                            this.fansList = this.fansList.concat(res.data.list);
 | 
			
		||||
                        }
 | 
			
		||||
                        this.follow_page++;
 | 
			
		||||
                    } else {
 | 
			
		||||
                        this.status_1 = "nomore"
 | 
			
		||||
                    }
 | 
			
		||||
                    // console.log(res);
 | 
			
		||||
                })
 | 
			
		||||
            },
 | 
			
		||||
			toSearchPage() {
 | 
			
		||||
 | 
			
		||||
@ -226,9 +226,10 @@
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
	.shop {
 | 
			
		||||
		height: calc(100vh - var(--window-top));
 | 
			
		||||
		height: calc(100% - var(--window-top));
 | 
			
		||||
		box-sizing: border-box;
 | 
			
		||||
		background-color: #F0EDF1;
 | 
			
		||||
        overflow-y: scroll;
 | 
			
		||||
 | 
			
		||||
		.top {
 | 
			
		||||
			padding: 0 30rpx;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user