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