gdpaoup
This commit is contained in:
		
							parent
							
								
									529325e203
								
							
						
					
					
						commit
						6d4d8c5675
					
				@ -66,7 +66,7 @@
 | 
			
		||||
		<!-- 评论box -->
 | 
			
		||||
		<u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx">
 | 
			
		||||
			<view class="edit-box">
 | 
			
		||||
				<input type="text" focus :placeholder="edit_text_other" @focus="focus" v-model="send_value">
 | 
			
		||||
				<input type="text" :focus="is_focus" :placeholder="edit_text_other" @focus="focus" v-model="send_value">
 | 
			
		||||
				<text @click="sendComment">发送</text>
 | 
			
		||||
			</view>
 | 
			
		||||
		</u-popup>
 | 
			
		||||
@ -419,7 +419,7 @@ export default {
 | 
			
		||||
			edit_text: "有爱评论,说点好听的 ~",
 | 
			
		||||
			edit_text_other: "有爱评论,说点好听的 ~",
 | 
			
		||||
			commentList: [], // 评论
 | 
			
		||||
            allList: [], // 全部子评论
 | 
			
		||||
            allList: {}, // 全部子评论
 | 
			
		||||
            status: 'loadmore',
 | 
			
		||||
            iconType: 'circle',
 | 
			
		||||
            loadText: {
 | 
			
		||||
@ -433,6 +433,7 @@ export default {
 | 
			
		||||
	onLoad(option){
 | 
			
		||||
	    this.article_id = option.id;
 | 
			
		||||
	    this.articleInfo(this.article_id);
 | 
			
		||||
        this.allList = {};
 | 
			
		||||
	},
 | 
			
		||||
    // 监听返回按钮
 | 
			
		||||
    onBackPress() {
 | 
			
		||||
@ -491,18 +492,28 @@ export default {
 | 
			
		||||
                        this.commentList = this.commentList.concat(res.data);
 | 
			
		||||
                    }
 | 
			
		||||
                    this.page++;
 | 
			
		||||
                    let list = this.commentList;
 | 
			
		||||
                    // list.forEach((item,index) => {
 | 
			
		||||
                    //     console.log(item);
 | 
			
		||||
                    // })
 | 
			
		||||
                }
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		// 打开评论输入
 | 
			
		||||
		openKeyInput(data,index) {
 | 
			
		||||
			// console.log(data);
 | 
			
		||||
            let me = this;
 | 
			
		||||
			console.log(data);
 | 
			
		||||
			this.is_edit = true;
 | 
			
		||||
            setTimeout(() => {
 | 
			
		||||
                this.is_focus = true;
 | 
			
		||||
            }, 200)
 | 
			
		||||
            uni.onKeyboardHeightChange(function(res){
 | 
			
		||||
                if (res.height == 0) {
 | 
			
		||||
                    me.is_focus = false;
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
            this.comment_id = index;
 | 
			
		||||
            if (data.id) {
 | 
			
		||||
            if (data.content) {
 | 
			
		||||
                this.edit_text_other = "回复@" + data.member_nickname;
 | 
			
		||||
                this.pid = data.id;
 | 
			
		||||
                this.reply_id = data.member_id;
 | 
			
		||||
@ -525,7 +536,7 @@ export default {
 | 
			
		||||
				pid: this.pid,
 | 
			
		||||
				reply_id: this.reply_id,
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				// console.log(res.data.data);
 | 
			
		||||
				// console.log(res.data);
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
                    this.send_value = "";
 | 
			
		||||
                    this.comment_num = res.data.num;
 | 
			
		||||
@ -533,9 +544,11 @@ export default {
 | 
			
		||||
					this.is_edit = false;
 | 
			
		||||
                    console.log(res.data.data.reply_id);
 | 
			
		||||
                    if (res.data.data.reply_id) {
 | 
			
		||||
                        console.log(this.allList);
 | 
			
		||||
                        this.commentList[this.comment_id].reply_count = true;
 | 
			
		||||
                        this.allList[this.comment_id].unshift(res.data.data);
 | 
			
		||||
                        console.log(this.allList,111);
 | 
			
		||||
                        this.allList[this.comment_id] = [];
 | 
			
		||||
                        this.allList[this.comment_id].push(res.data.data);
 | 
			
		||||
                        console.log(this.allList);
 | 
			
		||||
                    } else {
 | 
			
		||||
                        this.commentList.unshift(res.data.data);
 | 
			
		||||
                    }
 | 
			
		||||
@ -546,14 +559,14 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
        // 发现回复列表
 | 
			
		||||
        getReplyList(id) {
 | 
			
		||||
            this.page_[id] = 0;            
 | 
			
		||||
            if (!this.page_[id] === 0) {
 | 
			
		||||
            }
 | 
			
		||||
            console.log(this.page_[id]);
 | 
			
		||||
            this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
 | 
			
		||||
                console.log(this.page_);
 | 
			
		||||
                console.log(res);
 | 
			
		||||
                if (res.errCode == 0) {
 | 
			
		||||
                    this.page_[id]++;
 | 
			
		||||
                    console.log(this.page_[id]);
 | 
			
		||||
                    this.allList[id] = res.data;
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
@ -585,7 +598,7 @@ export default {
 | 
			
		||||
				delta: 1
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		focus() {
 | 
			
		||||
		focus(e) {
 | 
			
		||||
			setTimeout(function(){
 | 
			
		||||
				uni.showSoftKeybord;
 | 
			
		||||
			}, 200)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <view>
 | 
			
		||||
    <view class="container">
 | 
			
		||||
        <video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing"
 | 
			
		||||
            @pause="pausing" @ended="videoEnd" @timeupdate="timeupdate" :show-play-btn="false" controls="false" @click="stoping"
 | 
			
		||||
            :enable-progress-gesture="false" :show-center-play-btn="false"></video>
 | 
			
		||||
@ -29,7 +29,7 @@
 | 
			
		||||
            </view>
 | 
			
		||||
        </cover-view>
 | 
			
		||||
        <!-- 单个商品 -->
 | 
			
		||||
        <cover-view class="good-one" v-if="cart_len == 1 && cart_type">
 | 
			
		||||
        <cover-view class="good-one" :style="{ bottom: fixTop - 100 }" v-if="cart_len == 1 && cart_type">
 | 
			
		||||
            <view class="one-list" v-for="(item,index) in list.goods" :key="index" @click="goGoodInfo(item.goods_id)">
 | 
			
		||||
                <image class="one-image" :src="item.goods_image" mode=""></image>
 | 
			
		||||
                <view class="one-box">
 | 
			
		||||
@ -75,10 +75,13 @@
 | 
			
		||||
                </scroller>
 | 
			
		||||
            </cover-view>
 | 
			
		||||
            <!-- 评论框 -->
 | 
			
		||||
            <cover-view class="edit-box" v-if="is_edit">
 | 
			
		||||
                <input class="edit-input" type="text" value="" :focus="is_focus" :placeholder="edit_text" placeholder-class="placeholder-class"
 | 
			
		||||
                    v-model="send_value" />
 | 
			
		||||
                <text class="btn-send" @click="sendComment">发送</text>
 | 
			
		||||
            <cover-view class="edit-box" :style="videoSize" v-if="is_edit">
 | 
			
		||||
                <view class="input-main" :style="{ bottom: editTop }">
 | 
			
		||||
                    <input class="edit-input" type="text" value="" :focus="is_focus" :placeholder=" edit_text_other ? edit_text_other : edit_text"
 | 
			
		||||
                        placeholder-class="placeholder-class" v-model="send_value" />
 | 
			
		||||
                    <text class="btn-send" @click="sendComment">发送</text>
 | 
			
		||||
                </view>
 | 
			
		||||
                <view></view>
 | 
			
		||||
            </cover-view>
 | 
			
		||||
            <!-- 购物车 -->
 | 
			
		||||
            <cover-view class="cart-box" v-if="cart_type">
 | 
			
		||||
@ -124,6 +127,7 @@
 | 
			
		||||
            return {
 | 
			
		||||
                videoSize: {},
 | 
			
		||||
                fixTop: 0,
 | 
			
		||||
                editTop: 0,
 | 
			
		||||
                list: {},
 | 
			
		||||
                labelLen: [],
 | 
			
		||||
                cart_len: 0, // 购物车个数
 | 
			
		||||
@ -238,6 +242,7 @@
 | 
			
		||||
                        Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
 | 
			
		||||
                    },
 | 
			
		||||
                    success: (res) => {
 | 
			
		||||
                        this.is_edit = false;
 | 
			
		||||
                        if (res.data.errCode == 0) {
 | 
			
		||||
                            this.send_value = "";
 | 
			
		||||
                            this.comment_num = res.data.num;
 | 
			
		||||
@ -249,6 +254,11 @@
 | 
			
		||||
                                this.commentList.unshift(res.data.data.data);
 | 
			
		||||
                            }
 | 
			
		||||
                            console.log(this.commentList);
 | 
			
		||||
                        } else if (res.data.errCode == 401) {
 | 
			
		||||
                            uni.showToast({
 | 
			
		||||
                                title: "您还没有登录,请先登录!",
 | 
			
		||||
                                icon: "none"
 | 
			
		||||
                            })
 | 
			
		||||
                        } else {
 | 
			
		||||
                            uni.showToast({
 | 
			
		||||
                                title: res.data.message,
 | 
			
		||||
@ -327,12 +337,21 @@
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            // 打开评论输入
 | 
			
		||||
            openKeyInput(data,index) {
 | 
			
		||||
            	console.log(this.is_focus);
 | 
			
		||||
            	this.is_edit = true;
 | 
			
		||||
            openKeyInput(data, index) {
 | 
			
		||||
                let me = this;
 | 
			
		||||
                this.is_focus = true;
 | 
			
		||||
                setTimeout(() => {
 | 
			
		||||
                    this.is_focus = true;
 | 
			
		||||
                }, 200)
 | 
			
		||||
                    this.is_edit = true;
 | 
			
		||||
                }, 500)
 | 
			
		||||
                uni.onKeyboardHeightChange(function(res) {
 | 
			
		||||
                    console.log(res);
 | 
			
		||||
                    if (res.height == 0) {
 | 
			
		||||
                        me.is_focus = false;
 | 
			
		||||
                        me.is_edit = false;
 | 
			
		||||
                    } else {
 | 
			
		||||
                        me.editTop = res.height;
 | 
			
		||||
                    }
 | 
			
		||||
                })
 | 
			
		||||
                this.comment_id = index;
 | 
			
		||||
                if (data.id) {
 | 
			
		||||
                    this.edit_text_other = "回复@" + data.member_nickname;
 | 
			
		||||
@ -347,7 +366,6 @@
 | 
			
		||||
            },
 | 
			
		||||
            blue() {
 | 
			
		||||
                this.is_focus = false;
 | 
			
		||||
                console.log(111);
 | 
			
		||||
            },
 | 
			
		||||
            // 关闭评论
 | 
			
		||||
            closeComment() {
 | 
			
		||||
@ -387,6 +405,10 @@
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style>
 | 
			
		||||
    .container {
 | 
			
		||||
        position: relative;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* 关闭 */
 | 
			
		||||
    .close {
 | 
			
		||||
        position: fixed;
 | 
			
		||||
@ -433,7 +455,6 @@
 | 
			
		||||
 | 
			
		||||
    .good-one {
 | 
			
		||||
        position: fixed;
 | 
			
		||||
        bottom: 260rpx;
 | 
			
		||||
        right: 160rpx;
 | 
			
		||||
        width: 420rpx;
 | 
			
		||||
        padding: 20rpx;
 | 
			
		||||
@ -576,8 +597,8 @@
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .btn-send {
 | 
			
		||||
        font-size: 30rpx;
 | 
			
		||||
        color: #303133;
 | 
			
		||||
        font-size: 28rpx;
 | 
			
		||||
        color: #666;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .close-down {
 | 
			
		||||
@ -588,25 +609,33 @@
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .edit-box {
 | 
			
		||||
        /* #ifdef H5 */
 | 
			
		||||
        display: flex;
 | 
			
		||||
        /* #endif */
 | 
			
		||||
        z-index: 10000;
 | 
			
		||||
        z-index: 1000;
 | 
			
		||||
        position: fixed;
 | 
			
		||||
        bottom: 0;
 | 
			
		||||
        left: 0;
 | 
			
		||||
        width: 750rpx;
 | 
			
		||||
        background-color: rgba(0, 0, 0, 0.8);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .input-main {
 | 
			
		||||
        position: fixed;
 | 
			
		||||
        left: 0;
 | 
			
		||||
        /* #ifdef H5 */
 | 
			
		||||
        display: flex;
 | 
			
		||||
        /* #endif */
 | 
			
		||||
        flex-direction: row;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        width: 750rpx;
 | 
			
		||||
        height: 88rpx;
 | 
			
		||||
        padding: 0 20rpx;
 | 
			
		||||
        line-height: 80rpx;
 | 
			
		||||
        background-color: #fff;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .edit-input {
 | 
			
		||||
        width: 600rpx;
 | 
			
		||||
        height: 88rpx;
 | 
			
		||||
        height: 80rpx;
 | 
			
		||||
        padding: 0 10rpx;
 | 
			
		||||
        font-size: 24rpx;
 | 
			
		||||
        color: #333;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -47,7 +47,7 @@
 | 
			
		||||
					<view class="title-text">我的订单</view>
 | 
			
		||||
					<view class="more" @click="toOtherPage('/order/Index')">
 | 
			
		||||
						<view class="title-text-more">查看全部订单</view>
 | 
			
		||||
						<image src="/static/image/mine/21.png"></image>
 | 
			
		||||
						<u-icon name="arrow-right" color="#999" size="22"></u-icon>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="content">
 | 
			
		||||
@ -180,7 +180,7 @@ export default {
 | 
			
		||||
    .mine-top {
 | 
			
		||||
		// width: 100%;
 | 
			
		||||
		height: 272rpx;
 | 
			
		||||
		background: #FF780F;
 | 
			
		||||
		background-color: #F0AD4E;
 | 
			
		||||
		.top {
 | 
			
		||||
			padding: 40rpx 0 0 30rpx;
 | 
			
		||||
			display: flex;
 | 
			
		||||
@ -242,13 +242,11 @@ export default {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.bottom {
 | 
			
		||||
			box-sizing: border-box;
 | 
			
		||||
			padding: 0 30rpx;
 | 
			
		||||
			display: flex;
 | 
			
		||||
			// justify-content: space-between;
 | 
			
		||||
			justify-content: flex-start;
 | 
			
		||||
			justify-content: space-around;
 | 
			
		||||
            padding: 0 10rpx;
 | 
			
		||||
			box-sizing: border-box;
 | 
			
		||||
			> view {
 | 
			
		||||
				margin-right: 80rpx;
 | 
			
		||||
				text-align: center;
 | 
			
		||||
				font-size: 26rpx;
 | 
			
		||||
                font-weight: 500;
 | 
			
		||||
@ -268,35 +266,35 @@ export default {
 | 
			
		||||
		}
 | 
			
		||||
		@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
 | 
			
		||||
			box-sizing: border-box;
 | 
			
		||||
			width: 690rpx;
 | 
			
		||||
			width: 750rpx;
 | 
			
		||||
			background: rgba(255,255,255,1);
 | 
			
		||||
			border-radius: 10rpx;
 | 
			
		||||
			margin: 30rpx auto 0;
 | 
			
		||||
			padding: 0 20rpx;
 | 
			
		||||
			// border-radius: 10rpx;
 | 
			
		||||
			margin: 20rpx auto 0;
 | 
			
		||||
			.title {
 | 
			
		||||
				height: 76rpx;
 | 
			
		||||
				font-size: 28rpx;
 | 
			
		||||
				color: #666;
 | 
			
		||||
				position: relative;
 | 
			
		||||
				display: flex;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
				&::after {
 | 
			
		||||
					content: "";
 | 
			
		||||
					position: absolute;
 | 
			
		||||
					width: 650rpx;
 | 
			
		||||
					height: 1rpx;
 | 
			
		||||
					background: rgba(234,234,234,1);
 | 
			
		||||
					bottom: 0;
 | 
			
		||||
					left: 50%;
 | 
			
		||||
    				transform: translate(-50%,0);
 | 
			
		||||
				}
 | 
			
		||||
				height: 76rpx;
 | 
			
		||||
                padding: 0 20rpx;
 | 
			
		||||
				font-size: 28rpx;
 | 
			
		||||
				color: #666;
 | 
			
		||||
                border-bottom: 1px solid #ececec;
 | 
			
		||||
				// &::after {
 | 
			
		||||
				// 	content: "";
 | 
			
		||||
				// 	position: absolute;
 | 
			
		||||
				// 	width: 650rpx;
 | 
			
		||||
				// 	height: 1rpx;
 | 
			
		||||
				// 	background: rgba(234,234,234,1);
 | 
			
		||||
				// 	bottom: 0;
 | 
			
		||||
				// 	left: 50%;
 | 
			
		||||
    // 				transform: translate(-50%,0);
 | 
			
		||||
				// }
 | 
			
		||||
			}
 | 
			
		||||
            .title-text-more {	
 | 
			
		||||
                font-size: 24rpx;
 | 
			
		||||
                color: #999;
 | 
			
		||||
            }
 | 
			
		||||
			.content {
 | 
			
		||||
				padding: $content-padding-top 0 $content-padding-bottom;
 | 
			
		||||
				padding: $content-padding-top 20rpx $content-padding-bottom;
 | 
			
		||||
				display: flex;
 | 
			
		||||
				> view {
 | 
			
		||||
					text-align: center;
 | 
			
		||||
 | 
			
		||||
@ -507,7 +507,11 @@ export default {
 | 
			
		||||
            },
 | 
			
		||||
            success(res){
 | 
			
		||||
              console.log(res)
 | 
			
		||||
              that.info = res.data.data
 | 
			
		||||
              that.info = res.data.data;
 | 
			
		||||
              uni.showToast({
 | 
			
		||||
                  title: res.data.message,
 | 
			
		||||
                  icon: "none"
 | 
			
		||||
              })
 | 
			
		||||
              // that.list= res.data.data
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user