3.26
This commit is contained in:
@@ -8,6 +8,36 @@ export function getDetailAPI(noteId) {
|
||||
})
|
||||
}
|
||||
|
||||
//热门搜索记录
|
||||
export function getHistoryListAll(noteId) {
|
||||
return request({
|
||||
url: `/api/front/hot/history/list/all`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//添加搜索历史 /api/front/personal/search/history/search/{searchKey}
|
||||
export function getHistoryListSearch(searchKey) {
|
||||
return request({
|
||||
url: `/api/front/personal/search/history/search/${searchKey}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//搜索历史 /api/front/personal/search/history/list/page
|
||||
export function getHistoryListPage(searchKey) {
|
||||
return request({
|
||||
url: `/api/front/personal/search/history/list/page`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//删除历史记 /api/front/personal/search/history/del
|
||||
export function getHistoryListDel(data) {
|
||||
return request({
|
||||
url: `/api/front/personal/search/history/del`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//分享社区笔记 api/front/community/note/share/{noteId}
|
||||
export function getNoteShare(noteId) {
|
||||
return request({
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
module.exports = {
|
||||
//正式
|
||||
// baseUrl: 'https://wxapp.diyouzhijia.com/car_app_api',
|
||||
baseUrl: 'https://wxapp.diyouzhijia.com/car_app_api',
|
||||
TOKENNAME: 'Authori-zation',
|
||||
//薛磊测试
|
||||
baseUrl: 'http://192.168.31.226:8081/car_app_api',
|
||||
// baseUrl: 'http://192.168.31.226:8081/car_app_api',
|
||||
fileUploadUrl: 'https://wxapp.diyouzhijia.com/car_app_api/api/front/upload/image',
|
||||
WebSocketUrl: 'ws://121.199.24.205:9107/lxk/websocket',
|
||||
WebSocketOpen: false,
|
||||
|
||||
@@ -113,7 +113,7 @@ export const tabsList7 = [{
|
||||
}]
|
||||
|
||||
export const indexTabList = [{
|
||||
name: '此时',
|
||||
name: '推荐',
|
||||
value: 1,
|
||||
type: 'true'
|
||||
}, {
|
||||
|
||||
@@ -682,6 +682,14 @@
|
||||
"navigationBarTitleText": "我的评价", //租车订单
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/search/search",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "搜索",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
|
||||
@@ -43,66 +43,41 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="up_r" @click="addLike" v-if="!detailObj.isConcerned">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image class="r_img" :src="`${config.aliyunOssUrl}/static/images/app/icon/add.png`" mode=""></image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<image class="r_img" src="@/static/images/app/icon/add.png" mode=""></image>
|
||||
<!-- #endif -->
|
||||
<view class="r_txt"> 关注 </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="con_txt">
|
||||
<view v-if="type==2">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image class="ads" style="width: 44rpx;height: 44rpx;top: 12rpx;left: 0;"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/mine/ask.png`" mode=""></image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<image class="ads mr-2" style="width: 44rpx;height: 44rpx;top: 12rpx;left: 0;"
|
||||
src="@/static/images/app/mine/ask.png" mode="">
|
||||
</image>
|
||||
<!-- #endif -->
|
||||
<text class="questions-and-answers-text-color">
|
||||
<text class="" v-for="(topic) in detailObj.topicList" :key="topic.id"> #{{topic.name}}#
|
||||
</text>
|
||||
<text class="" v-for="(topic) in detailObj.topicList" :key="topic.id"> #{{topic.name}}# </text>
|
||||
</text>
|
||||
</view>
|
||||
{{ detailObj.content }}
|
||||
</view>
|
||||
<video v-if="detailObj.video" style="position: relative;" :src="detailObj.video" initial-time="1s"
|
||||
class="video-box">
|
||||
<!-- poster="https://qicheoss.oss-cn-shanghai.aliyuncs.com/crmebimage/public/product/2024/01/24/c70ad2284470406280fb0e06200a63e2g4ht7zante.png" -->
|
||||
</cover-view>
|
||||
class="video-box1" :style="{width:`${detailObj.wide}`,height:`${detailObj.high}`}" >
|
||||
<!-- </cover-view> -->
|
||||
</video>
|
||||
<view class="image-list-box " v-if="detaImage.length">
|
||||
<view v-if="detaImage.length==1">
|
||||
<view v-for="(itemImage,imageIndex) in detaImage" :key="imageIndex">
|
||||
<image class="image-one" :src="itemImage" mode="cover" @click="examineFn(detaImage,imageIndex)"></image>
|
||||
<image class="image-one" :src="itemImage" mode="widthFix" @click="examineFn(detaImage,imageIndex)">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="detaImage.length==2" style="width: 100%;" class="flex justify-between">
|
||||
<view v-if="detaImage.length>1" class="flex-wrap flex justify-between">
|
||||
<view v-for="(itemImage,imageIndex) in detaImage" :key="imageIndex">
|
||||
<image class="image-two" :src="itemImage" mode="cover" @click="examineFn(detaImage,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="detaImage.length==4" style="width: 100%;" class="flex justify-between flex-wrap">
|
||||
<view v-for="(itemImage,imageIndex) in detaImage" :key="imageIndex">
|
||||
<image class="image-two" :src="itemImage" mode="cover" @click="examineFn(detaImage,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="detaImage.length>2&&detaImage.length!=4" class="flex-wrap flex justify-between">
|
||||
<view v-for="(itemImage,imageIndex) in detaImage" :key="imageIndex">
|
||||
<image class="image-three" :src="itemImage" mode="cover" @click="examineFn(detaImage,imageIndex)"></image>
|
||||
<image class="image-three" :src="itemImage" mode="aspectFill"
|
||||
@click="examineFn(detaImage,imageIndex)"></image>
|
||||
</view>
|
||||
<view v-for="(a,b) in (detaImage.length%3-1)<0?0:(detaImage.length%3-1)">
|
||||
<view class="image-three"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="con_img">
|
||||
<image src="@/static/images/app/serve/repair_refund.png" mode=""></image>
|
||||
</view> -->
|
||||
<view class="con_foot">
|
||||
<view class="foot_l"> IP {{ detailObj.city || "未知" }} </view>
|
||||
<view class="foot_r">
|
||||
@@ -124,7 +99,7 @@
|
||||
</u-tabs>
|
||||
</view>
|
||||
<z-paging use-page-scroll ref="paging" v-model="replyListAll" @query="queryList">
|
||||
<view class="com_content" v-for="item in replyListAll" :key="item.id">
|
||||
<view class="com_content" v-for="(item,replyIndex) in replyListAll" :key="item.id">
|
||||
<view class="con_title">
|
||||
<view class="title_l">
|
||||
<image :src="item.avatar" class="imgRadius"></image>
|
||||
@@ -139,7 +114,12 @@
|
||||
style="width: 32rpx;height: 32rpx;"></image>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="con_txt" @click="replyToComments(item,1)"> {{ item.content }} </view>
|
||||
<view class="con_txt" @click="replyToComments(item,2)">
|
||||
<view style="margin-bottom: 8rpx;">
|
||||
{{ item.content }}
|
||||
</view>
|
||||
<image @click.stop="examineFn1(item.image)" v-if="item.image" :src="item.image" style="width: 100rpx; height: 100rpx;"></image>
|
||||
</view>
|
||||
<view class="con_info">
|
||||
<view class="info_l"> {{ item.diffDays }} 浙江杭州 </view>
|
||||
<view class="info_r">
|
||||
@@ -179,7 +159,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="view_down">
|
||||
<view class="down_l"> {{ el.content }} </view>
|
||||
<view class="down_l">
|
||||
<view style="margin-bottom: 8rpx;">
|
||||
{{ el.content }}
|
||||
</view>
|
||||
<image @click.stop="examineFn1(el.image)" v-if="el.image" :src="el.image" style="width: 100rpx; height: 100rpx;"></image>
|
||||
</view>
|
||||
<view class="down_r" @click.stop="likeNo(el)">
|
||||
<!-- #ifdef APP -->
|
||||
<image v-if="!el.isLike" src="@/static/images/app/icon/like_no.png" class="imgSize" ></image>
|
||||
@@ -207,22 +192,10 @@
|
||||
<!-- 底部输入框 -->
|
||||
<view class="bottom_up">
|
||||
<view class="bottom_l">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view @click.stop="openPinglun">
|
||||
<u--textarea autoHeight fixed :showConfirmBar="true" border="none" confirmHold
|
||||
:placeholder="placeholder" maxlength="100" :disabled="disabled"
|
||||
:cursor-spacing="20" v-model="replyAddData.content" @blur="blur" @linechange="linechange"
|
||||
<view @click.stop="replyToComments(detailObj,1)">
|
||||
<u--textarea autoHeight fixed border="none" :placeholder="placeholder" maxlength="100" :cursor-spacing="20"
|
||||
:customStyle="'background-color: #f2f0f4;'"/>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<view @click.stop="openPinglun">
|
||||
<u--textarea autoHeight fixed :showConfirmBar="true" border="none" confirmHold
|
||||
:placeholder="placeholder" maxlength="100" :disabled="disabled"
|
||||
:cursor-spacing="20" v-model="replyAddData.content" @linechange="linechange"
|
||||
:customStyle="'background-color: #f2f0f4;'" @confirm='confirm'/>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="bottom_r">
|
||||
<view class="r_img_txt">
|
||||
@@ -384,7 +357,7 @@
|
||||
<u-popup :show="showMore" :round="10" mode="bottom" @close="showMore=false" zIndex='11000'>
|
||||
<view class="more_view">
|
||||
<view class="txt" @click="toReportPages"> 举报 </view>
|
||||
<view class="txt" @click="replyToComments(moreItem,1)"> 回复 </view>
|
||||
<view class="txt" @click="replyToComments(moreItem,2)"> 回复 </view>
|
||||
<view class="txt" @click="cloneFn(moreItem)"> 复制 </view>
|
||||
<view class="foot" @click="showMore=false"> 取消 </view>
|
||||
</view>
|
||||
@@ -419,7 +392,12 @@
|
||||
<image @click="moreBtn(itemObj)" src="@/static/images/app/icon/more.png" style="width: 32rpx;height: 32rpx;"></image>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="con_txt" @click="replyToComments(itemObj,1)"> {{ itemObj.content }} </view>
|
||||
<view class="con_txt" @click="replyToComments(itemObj,2)">
|
||||
<view style="margin-bottom: 8rpx;">
|
||||
{{ itemObj.content }}
|
||||
</view>
|
||||
<image @click.stop="examineFn1(itemObj.image)" v-if="itemObj.image" :src="itemObj.image" style="width: 100rpx; height: 100rpx;"></image>
|
||||
</view>
|
||||
<view class="con_info">
|
||||
<view class="info_l"> {{ itemObj.diffDays }} 浙江杭州 </view>
|
||||
<view class="info_r">
|
||||
@@ -455,8 +433,14 @@
|
||||
<!-- 点击回复 ??? -->
|
||||
<view class="con_txt1" @click="replyToComments(ele,2)">
|
||||
<text class="txt_a">回复</text>
|
||||
<text class="txt_b"> {{ele.reviewUid !==0 ? ele.reviewUserNickname : itemObj.nickname}} </text>
|
||||
<text class="txt_d"> : {{ ele.content }} </text>
|
||||
<text class="txt_b"> {{ele.reviewUid !==0 ? ele.reviewUserNickname : itemObj.nickname}} </text> :
|
||||
<view class="txt_d" v-if="ele.image">
|
||||
<view style="margin-bottom: 8rpx;">
|
||||
{{ ele.content }}
|
||||
</view>
|
||||
<image @click.stop="examineFn1(ele.image)" :src="ele.image" style="width: 100rpx; height: 100rpx;"></image>
|
||||
</view>
|
||||
<text class="txt_d" v-else> {{ ele.content }} </text>
|
||||
</view>
|
||||
<view class="con_info">
|
||||
<view class="info_l"> {{ele.diffDays}} 浙江杭州 </view>
|
||||
@@ -488,7 +472,7 @@
|
||||
</u-popup>
|
||||
|
||||
<!-- 写或回复评论 -->
|
||||
<u-popup :show="showReply" mode="bottom" @close="closeBtn" zIndex='11000'>
|
||||
<u-popup :show="showReply" mode="bottom" @close="closeBtn" zIndex='11000' :safeAreaInsetBottom='false'>
|
||||
<view class="reply_pop" >
|
||||
<u--textarea v-model="replyAddData.content" :placeholder="placeholderReply" :showConfirmBar="false" :customStyle="'background-color: #F8F9FA;'" height="60"
|
||||
border="none" :cursor-spacing="20" @linechange="linechange" @focus="emojiShow=false,more=false"></u--textarea>
|
||||
@@ -514,6 +498,10 @@
|
||||
</view>
|
||||
<view class="btn_r" @click="sendBtn"> 发送 </view>
|
||||
</view>
|
||||
<view class="img-box rel" style="margin-top: 8rpx;">
|
||||
<image :src="replyAddData.image" style="width: 80rpx;height: 80rpx;"></image>
|
||||
<image v-if="replyAddData.image" class="clear abs" :src="`${config.aliyunOssUrl}/static/images/app/serve/realname_clea.png`" @click="replyAddData.image=''" mode=""></image>
|
||||
</view>
|
||||
<!-- 表情 -->
|
||||
<template v-if='emojiShow'>
|
||||
<view>
|
||||
@@ -552,7 +540,7 @@
|
||||
import { userInfo } from "@/api/user/index"
|
||||
import { userCenterPersonalInfo , getUserInfo } from "@/api/system/user.js"
|
||||
import utils from "@/utils/util.js";
|
||||
import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
export default {
|
||||
components: {
|
||||
chatInputBar
|
||||
@@ -622,7 +610,8 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
content: '',
|
||||
noteId: null,
|
||||
replyId: 0,
|
||||
userId: null
|
||||
userId: null,
|
||||
image:''
|
||||
},
|
||||
//type==2 问答,话题
|
||||
type: 1,
|
||||
@@ -660,20 +649,30 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
// channel:''
|
||||
};
|
||||
},
|
||||
|
||||
watch:{
|
||||
replyAddData:{
|
||||
handler(nV,oV){
|
||||
// this.cardType=nV
|
||||
this.replyAddData.image=nV.image
|
||||
},
|
||||
deep:true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//评论 发图
|
||||
gridItemTap(index){
|
||||
this.$toast('开发中~')
|
||||
// this.$toast('开发中~')
|
||||
// // 从相册选择图片
|
||||
// utils.uploadImageOne({
|
||||
// count: 1,
|
||||
// sizeType: ['original'],
|
||||
// sourceType:['album', 'camera'],
|
||||
// dir:'crmebimage/public/product/'
|
||||
// },null,(res)=>{
|
||||
// // this.sendSMS(res.data,1);
|
||||
// this.sendBtn()
|
||||
// });
|
||||
utils.uploadImageOne({
|
||||
count: 1,
|
||||
sizeType: ['original'],
|
||||
sourceType:['album', 'camera'],
|
||||
dir:'crmebimage/public/product/'
|
||||
},null,(res)=>{
|
||||
// console.log(res,'评论 发图');
|
||||
this.replyAddData.image=res.data
|
||||
});
|
||||
},
|
||||
|
||||
shareBtnInfo(item,num){
|
||||
@@ -711,6 +710,15 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
loop:true
|
||||
})
|
||||
},
|
||||
//查看
|
||||
examineFn1(urlList,index){
|
||||
// console.log(urlList,index);
|
||||
uni.previewImage({
|
||||
urls:[urlList],
|
||||
current:index,
|
||||
loop:true
|
||||
})
|
||||
},
|
||||
getUserInfo1() {
|
||||
// userCenterPersonalInfo().then(res => {
|
||||
// console.log(res,'55555555555555555');
|
||||
@@ -811,6 +819,16 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
this.detaImage=[]
|
||||
}
|
||||
// console.log(this.detaImage,'tupian图片');
|
||||
if(Number(this.detailObj.wide)>Number(this.detailObj.high)){
|
||||
let num= 686 / uni.$u.getPx(`${this.detailObj.wide}rpx`)
|
||||
this.detailObj.wide = uni.$u.getPx(`${this.detailObj.wide}rpx`)*num +'rpx'
|
||||
this.detailObj.high=uni.$u.getPx(`${this.detailObj.high}rpx`)*num +'rpx'
|
||||
}else{
|
||||
let num= 686 / uni.$u.getPx(`${this.detailObj.wide}rpx`)
|
||||
this.detailObj.wide = uni.$u.getPx(`${this.detailObj.wide}rpx`)*num +'rpx'
|
||||
this.detailObj.high=uni.$u.getPx(`${this.detailObj.high}rpx`)*num +'rpx'
|
||||
}
|
||||
console.log(this.detailObj.wide,this.detailObj.high,'111111111111111');
|
||||
this.replyAddData.noteId=res.data.id
|
||||
this.replyAddData.authorUserId=res.data.authorId
|
||||
let data=this.$store.state.pageManager.trendsData
|
||||
@@ -818,10 +836,7 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
this.$store.dispatch('changeTrendsData', data)
|
||||
})
|
||||
},
|
||||
// 评论弹层里面 发表评论
|
||||
openReply(){
|
||||
this.showReply=true
|
||||
},
|
||||
|
||||
// 打开评论弹层
|
||||
openShowComment(item) {
|
||||
this.showComment = true
|
||||
@@ -909,35 +924,6 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
this.borderRadius = 10
|
||||
}
|
||||
},
|
||||
//打开输入框
|
||||
openPinglun() {
|
||||
this.getDetail(this.noteId)
|
||||
this.emojiShow = false;
|
||||
this.more = false;
|
||||
// #ifndef APP-PLUS
|
||||
this.open = false;
|
||||
uni.$u.debounce(() => {
|
||||
this.autoFocus = true;
|
||||
}, 50);
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
if (plus.os.name == "iOS") {
|
||||
this.open = false;
|
||||
this.disabled = false;
|
||||
uni.$u.debounce(() => {
|
||||
this.autoFocus = true;
|
||||
}, 50);
|
||||
} else {
|
||||
this.focus = true;
|
||||
this.$nextTick(() => {
|
||||
this.open = false;
|
||||
if (!this.open) {
|
||||
plus.key.showSoftKeybord();
|
||||
}
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
// 底部评论
|
||||
confirm(){
|
||||
replyAddAPI(this.replyAddData).then(res=>{
|
||||
@@ -948,32 +934,6 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
})
|
||||
this.showReply=false
|
||||
},
|
||||
//失去焦点
|
||||
blur() {
|
||||
if(this.replyAddData.content!==''){
|
||||
replyAddAPI(this.replyAddData).then(res=>{
|
||||
this.replyAddData.content=''
|
||||
res.data.replyList=[]
|
||||
this.replyListAll.push(res.data)
|
||||
this.getDetail(this.noteId)
|
||||
})
|
||||
}else{
|
||||
this.$toast('不能为空')
|
||||
}
|
||||
// this.showReply=false
|
||||
// #ifdef APP-PLUS
|
||||
if (plus.os.name == "iOS") {
|
||||
this.disabled = true;
|
||||
// this.autoFocus = false;
|
||||
}
|
||||
this.open = true;
|
||||
plus.key.hideSoftKeybord();
|
||||
// #endif
|
||||
|
||||
// #ifndef APP-PLUS
|
||||
this.open = true;
|
||||
// #endif
|
||||
},
|
||||
//复制
|
||||
cloneFn(item) {
|
||||
uni.setClipboardData({
|
||||
@@ -992,21 +952,30 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
// console.log(ele,'数据数据',num,'数字1或2');
|
||||
if(num==2){
|
||||
this.placeholderReply='回复'+' '+ ele.nickname +' ' + ':'
|
||||
this.showMore = false
|
||||
this.showReply=true
|
||||
this.replyAddData.replyId=ele.id
|
||||
this.replyAddData.userId=this.myInfo.id
|
||||
this.getDetail(this.noteId)
|
||||
}else{
|
||||
this.showMore = false
|
||||
this.showReply=true
|
||||
this.replyAddData.replyId=0
|
||||
this.replyAddData.userId=this.myInfo.id
|
||||
this.getDetail(this.noteId)
|
||||
}
|
||||
this.showMore = false
|
||||
this.showReply=true
|
||||
this.replyAddData.replyId=ele.id
|
||||
this.replyAddData.userId=this.myInfo.id
|
||||
this.getDetail(this.noteId)
|
||||
},
|
||||
// 发送按钮
|
||||
sendBtn(){
|
||||
// console.log(this.replyAddData,' this.replyAddData -- 发送按钮 ');
|
||||
// this.replyAddData.content='https://qicheoss.oss-cn-shanghai.aliyuncs.com/crmebimage/public/store/2024/03/11/8205e641ce8d497dbbd9d8bf1c2a2d63raktuto4ah.png'
|
||||
replyAddAPI(this.replyAddData).then(res=>{
|
||||
this.replyListAll.forEach(item => {
|
||||
if (this.replyAddData.replyId == item.id) {
|
||||
item.replyList.push(res.data)
|
||||
}
|
||||
})
|
||||
this.$refs.paging.reload()
|
||||
this.resetData()
|
||||
})
|
||||
this.showReply=false
|
||||
@@ -1019,7 +988,8 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
content: '',
|
||||
noteId: null,
|
||||
replyId: 0,
|
||||
userId: null
|
||||
userId: null,
|
||||
image:''
|
||||
}
|
||||
},
|
||||
closeBtn(){
|
||||
@@ -1039,12 +1009,24 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.clear {
|
||||
top: -4rpx;
|
||||
left: 60rpx;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
//视频
|
||||
.video-box {
|
||||
width: 686rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.video-box1 {
|
||||
width: 100%;
|
||||
// width: 450rpx;
|
||||
margin-top: 24rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
#shareBtn {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
@@ -1585,25 +1567,26 @@ import notify from "../../uni_modules/uview-ui/libs/config/props/notify";
|
||||
|
||||
.image-one {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
// height: 686rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.image-two {
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
width: 338rpx;
|
||||
height: 338rpx;
|
||||
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.09);
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.image-three {
|
||||
width: 218rpx;
|
||||
height: 218rpx;
|
||||
width: 222rpx;
|
||||
height: 222rpx;
|
||||
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.09);
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom_up {
|
||||
// border: 1px solid red;
|
||||
border-top: 1rpx solid #EDEDED;
|
||||
|
||||
@@ -1,76 +1,60 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<z-paging ref="paging" v-model="dataList" @query="queryList" @scroll="scrollFn"
|
||||
<z-paging ref="paging" v-model="dataList" @query="queryList"
|
||||
:hide-empty-view="userInfo.concernedNum==0 && actTabType == 5">
|
||||
<!-- <u-sticky> -->
|
||||
<view slot="top">
|
||||
<cover-view class="navbar-box fixed-top bg-white">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<cover-view :style="{height: `${$u.sys().statusBarHeight}px;`}" />
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<cover-view :style="`height: ${$u.sys().statusBarHeight}px;`" />
|
||||
<!-- #endif -->
|
||||
<cover-view v-if="showElement" class="navbar-top flex align-center justify-between element">
|
||||
<!-- #ifdef APP -->
|
||||
<cover-view class="messgage-icon">
|
||||
<cover-image class="messgage-icon-image" src="@/static/images/app/serve/serve_message.png"
|
||||
mode="" @click="$tab.navigateTo('/pages/message/message')"></cover-image>
|
||||
<cover-view v-if="unreadNum>0" class="num">
|
||||
{{unreadNum}}
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<cover-view class="messgage-icon1">
|
||||
<cover-image class="messgage-icon-image1"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/serve/serve_message.png`" mode=""
|
||||
@click="$tab.navigateTo('/pages/message/message')"></cover-image>
|
||||
<cover-view v-if="unreadNum>0" class="num1">
|
||||
{{unreadNum}}
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<!-- #endif -->
|
||||
<cover-view class="search-box flex align-center">
|
||||
<!-- #ifdef APP -->
|
||||
<cover-image class="search-box-image" src="@/static/images/app/icon/search.png"
|
||||
mode=""></cover-image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<cover-image class="search-box-image"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/icon/search.png`" mode=""></cover-image>
|
||||
<!-- #endif -->
|
||||
<cover-view class="search-box-search">搜索</cover-view>
|
||||
</cover-view>
|
||||
<cover-image class="issue-image" :style="{'margin-right': `${menuWidth}px`}"
|
||||
src="https://qicheoss.oss-cn-shanghai.aliyuncs.com/static/images/app/icon/issue.png" mode=""
|
||||
@click="issueFn"></cover-image>
|
||||
</cover-view>
|
||||
<!-- tab蓝 -->
|
||||
<cover-view class="tab-box flex align-center justify-between"
|
||||
:style="{background: '#fff',width:showElement?'684rpx':'490rpx'}">
|
||||
<cover-view :class="['tab-item', actTabType==item.value && 'tab-item-active']"
|
||||
v-for="(item,index) in indexTabList">
|
||||
<cover-view class="" style="height: 80rpx;"
|
||||
@click="tabClick(item)">{{item.name}}</cover-view>
|
||||
<cover-view class="tab-item-act"></cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<!-- </u-sticky> -->
|
||||
<view class="">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view :style="{height: `${$u.sys().statusBarHeight}px;`}" />
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<view :style="`height: ${$u.sys().statusBarHeight}px;`" />
|
||||
<!-- #endif -->
|
||||
<view :style="{height: `${$u.sys().statusBarHeight}px;`}" />
|
||||
<view class="navbar-top flex align-center justify-between element">
|
||||
<view class="messgage-icon rel flex align-center">
|
||||
<image class="messgage-icon-image"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/serve/serve_message.png`" mode=""
|
||||
@click="$tab.navigateTo('/pages/message/message')"></image>
|
||||
<view v-if="unreadNum>0" class="num abs bg-primary">
|
||||
{{unreadNum}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-box" @click="$tab.navigateTo('/pages/search/search')">
|
||||
<view class="search-box-c flex align-center">
|
||||
<image class="search-box-image"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/icon/search.png`" mode=""></image>
|
||||
<view class="search-box-search">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="issue-image" :style="{'margin-right': `${menuWidth}px`}"
|
||||
src="https://qicheoss.oss-cn-shanghai.aliyuncs.com/static/images/app/icon/issue.png" mode=""
|
||||
@click="issueFn"></image>
|
||||
</view>
|
||||
<view v-if="showElement" style="height: 200rpx;" />
|
||||
<u-overlay :show="postFlag" @click="postFlag = false" opacity="0.2" zIndex="555"></u-overlay>
|
||||
<view style="position: relative;height: 0;">
|
||||
<image class="search-issue-image" :src="`${config.aliyunOssUrl}/static/images/app/icon/top_shang.png`" mode=""></image>
|
||||
<view class="search-issue-list" :style="{height:postFlag?'304rpx':'0rpx'}">
|
||||
<view class="list-s flex align-center" @click="navPostFn(2)">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/icon/text.png`" mode=""></image>
|
||||
写心情
|
||||
</view>
|
||||
<view class="list-s flex align-center" @click="navPostFn(1)">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/icon/image.png`" mode=""></image>
|
||||
图片
|
||||
</view>
|
||||
<view class="list-s flex align-center" @click="navPostFn(0)">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/icon/video.png`" mode=""></image>
|
||||
视频
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- tab蓝 -->
|
||||
<view class="tab-box flex align-center justify-between" style="background: '#fff'">
|
||||
<view :class="['tab-item', actTabType==item.value && 'tab-item-active']"
|
||||
v-for="(item,index) in indexTabList" @click="tabClick(item)">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view v-if="showElement" style="height: 200rpx;" /> -->
|
||||
</view>
|
||||
<view class="swiper-box" v-if="actTabType != 5">
|
||||
<u-swiper keyName="image" :list="brannerList" height="560rpx" @change="brannerChange"
|
||||
@click="brannerClick" radius='0'></u-swiper>
|
||||
@click="brannerClick" radius='0'></u-swiper>
|
||||
</view>
|
||||
<view class="list-box">
|
||||
<view v-for="(item,index) in dataList" :key="index">
|
||||
@@ -107,9 +91,6 @@
|
||||
@click.stop="examineFn(item.image,imageIndex)" :src="itemImage" mode="">
|
||||
</image>
|
||||
</block>
|
||||
<!-- <view v-for="(a,b) in (item.image.length%3-1)<0?0:(item.image.length%3-1)">
|
||||
<view class="consult-image-three"></view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="consult-list-name flex justify-between">
|
||||
<text>{{item.authorName}}</text>
|
||||
@@ -133,46 +114,35 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="image-box" @click.stop="reportFn(item)">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/icon/more.png`" mode="">
|
||||
</image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<image src="@/static/images/app/icon/more.png" mode=""></image>
|
||||
<!-- #endif -->
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/icon/more.png`" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-title line-two" @click="toDetailPages(item,index)">
|
||||
{{item.content?item.content:'分享图片'}}
|
||||
</view>
|
||||
<video v-if="item.video" :id="'refVideo'+item.id" :src="item.video" initial-time="1s"
|
||||
class="video-box" :poster="item.cover" @play="handleVideoClick(index)">
|
||||
|
||||
|
||||
<video :id="'refVideo'+item.id" v-if="item.video" :src="item.video" initial-time="1s"
|
||||
:poster="item.cover" class="video-box1" @play="handleVideoClick(index)" :style="{width:`${item.wide}`,height:`${item.high}`}"
|
||||
@pause="currentVideoIndex = -1" >
|
||||
</video>
|
||||
<view v-else class="image-list-box ">
|
||||
|
||||
<!-- <view class="video-box" :style="{width:`${item.wide}`,height:`${item.high}`}" v-if="item.video" @click="actTabTypeVideoFn(item,index)" id="video1" ref="video1">
|
||||
<image class="video-box-bo" :src="`${config.aliyunOssUrl}/static/images/app/mine/bo_fang.png`" mode=""></image>
|
||||
<image :style="{width:`${item.wide}`}" class="video-box-bg" :src="item.cover" mode="widthFix"></image>
|
||||
</view> -->
|
||||
|
||||
<view v-if="item.image" class="image-list-box ">
|
||||
<view v-if="item.image.length==1">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-one" :src="itemImage" mode="aspectFill"
|
||||
<view class="image-one" v-for="(itemImage,imageIndex) in item.image"
|
||||
:key="imageIndex">
|
||||
<image :src="itemImage" mode="widthFix"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.image.length==2" style="width: 100%;" class="flex justify-between">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-two" :src="itemImage" mode="aspectFill"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.image.length==4" style="width: 100%;"
|
||||
class="flex justify-between flex-wrap">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-two" :src="itemImage" mode="aspectFill"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.image.length>2&&item.image.length!=4"
|
||||
class="flex-wrap flex justify-between">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-three" :src="itemImage" mode="aspectFill"
|
||||
<view v-if="item.image.length>1" class="flex-wrap flex justify-between">
|
||||
<view class="image-three" v-for="(itemImage,imageIndex) in item.image"
|
||||
:key="imageIndex">
|
||||
<image :src="itemImage" mode="aspectFill"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
<view v-for="(a,b) in (item.image.length%3-1)<0?0:(item.image.length%3-1)">
|
||||
@@ -324,6 +294,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//发布box
|
||||
postFlag: false,
|
||||
menuWidth: getApp().globalData.menuWidth,
|
||||
content: '',
|
||||
//未关注列表
|
||||
@@ -362,7 +334,7 @@
|
||||
},
|
||||
onHide() {
|
||||
this.dataList.forEach((item, i) => {
|
||||
uni.createVideoContext('refVideo' + item.id, this).pause();
|
||||
uni.createVideoContext('video1' + item.id, this).pause();
|
||||
});
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
@@ -376,6 +348,22 @@
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//全屏播放视频
|
||||
actTabTypeVideoFn(item) {
|
||||
console.log(item,'点击123');
|
||||
// this.currentVideo = item.video
|
||||
// let videoContext = uni.createVideoContext('video1', this);
|
||||
// console.log(videoContext,'点击videoContext');
|
||||
// videoContext.getVideoInfo().then(res => {
|
||||
// console.log('视频宽高', res);
|
||||
// })
|
||||
// videoContext.requestFullScreen({
|
||||
// direction: '0'
|
||||
// })
|
||||
// setInterval(() => {
|
||||
// videoContext.play()
|
||||
// }, 500)
|
||||
},
|
||||
//监听滚动
|
||||
scrollFn(e) {
|
||||
const scrollTop = e.target.scrollTop;
|
||||
@@ -395,17 +383,23 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
navPostFn(index) {
|
||||
this.$tab.navigateTo(`./post?type=${1}&issueType=${index}`)
|
||||
this.postFlag = false
|
||||
},
|
||||
//发布
|
||||
issueFn() {
|
||||
uni.showActionSheet({
|
||||
itemList: ['视频', '图片'],
|
||||
success: (res) => {
|
||||
this.$tab.navigateTo(`./post?type=${1}&issueType=${res.tapIndex}`)
|
||||
},
|
||||
fail: function(res) {
|
||||
}
|
||||
});
|
||||
// issueFn() {
|
||||
// uni.showActionSheet({
|
||||
// itemList: ['视频', '图片'],
|
||||
// success: (res) => {
|
||||
// this.$tab.navigateTo(`./post?type=${1}&issueType=${res.tapIndex}`)
|
||||
// },
|
||||
// fail: function(res) {}
|
||||
// });
|
||||
|
||||
// },
|
||||
issueFn() {
|
||||
this.postFlag = !this.postFlag
|
||||
},
|
||||
|
||||
shareBtnInfo(item) {
|
||||
@@ -420,8 +414,7 @@
|
||||
summary: item.content ? item.content : '分享图片'
|
||||
}
|
||||
shareApi('WXSceneSession', shareData).then(res => {
|
||||
getNoteShare(item.id).then(res => {
|
||||
})
|
||||
getNoteShare(item.id).then(res => {})
|
||||
})
|
||||
},
|
||||
//三个点
|
||||
@@ -554,6 +547,13 @@
|
||||
this.brannerList = res.data.list
|
||||
})
|
||||
},
|
||||
pxToRpx(px) {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
const screenWidth = systemInfo.screenWidth;
|
||||
const ratio = 730 / screenWidth; // 750是rpx的参考宽度,根据实际情况进行调整
|
||||
const rpx = px / ratio;
|
||||
return rpx;
|
||||
},
|
||||
queryList(page, limit) {
|
||||
// 此处请求仅为演示,请替换为自己项目中的请求
|
||||
if (this.actTabType == 1 || this.actTabType == 2 || this.actTabType == 3) {
|
||||
@@ -568,6 +568,15 @@
|
||||
} else {
|
||||
item.image = []
|
||||
}
|
||||
|
||||
if(Number(item.wide)>Number(item.high)){
|
||||
item.wide=686+'rpx'
|
||||
item.high=this.pxToRpx(item.high)+'rpx'
|
||||
}else{
|
||||
item.wide=this.pxToRpx(item.wide)+'rpx'
|
||||
item.high=this.pxToRpx(item.high)+'rpx'
|
||||
}
|
||||
|
||||
const date1 = new Date();
|
||||
const date2 = new Date(item.createTime);
|
||||
// 计算相差的毫秒数
|
||||
@@ -591,6 +600,15 @@
|
||||
} else {
|
||||
item.image = []
|
||||
}
|
||||
|
||||
if(Number(item.wide)>Number(item.high)){
|
||||
item.wide=686+'rpx'
|
||||
item.high=this.pxToRpx(item.high)+'rpx'
|
||||
}else{
|
||||
item.wide=this.pxToRpx(item.wide)+'rpx'
|
||||
item.high=this.pxToRpx(item.high)+'rpx'
|
||||
}
|
||||
|
||||
const date1 = new Date();
|
||||
const date2 = new Date(item.createTime);
|
||||
// 计算相差的毫秒数
|
||||
@@ -623,6 +641,15 @@
|
||||
} else {
|
||||
item.image = []
|
||||
}
|
||||
|
||||
if(Number(item.wide)>Number(item.high)){
|
||||
item.wide=686+'rpx'
|
||||
item.high=this.pxToRpx(item.high)+'rpx'
|
||||
}else{
|
||||
item.wide=this.pxToRpx(item.wide)+'rpx'
|
||||
item.high=this.pxToRpx(item.high)+'rpx'
|
||||
}
|
||||
|
||||
const date1 = new Date();
|
||||
const date2 = new Date(item.createTime);
|
||||
// 计算相差的毫秒数
|
||||
@@ -663,137 +690,132 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.video-flex {
|
||||
position: fixed;
|
||||
right: -750rpx;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-bottom: 120rpx;
|
||||
.search-issue-image {
|
||||
position: absolute;
|
||||
width: 26rpx;
|
||||
height: 16rpx;
|
||||
right: 200rpx;
|
||||
top: -14rpx;
|
||||
// background: #13AFA8;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.navbar-box {
|
||||
width: calc(750rpx);
|
||||
.search-issue-list {
|
||||
width: 224rpx;
|
||||
// height: 304rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 8rpx;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
transition: all 0.3s;
|
||||
|
||||
.navbar-top {
|
||||
padding: 0 24rpx;
|
||||
height: 88rpx;
|
||||
.list-s {
|
||||
height: 100rpx;
|
||||
width: 224rpx;
|
||||
font-size: 32rpx;
|
||||
color: #000;
|
||||
padding: 32rpx 24rpx;
|
||||
|
||||
// border: 1px solid orangered;
|
||||
.messgage-icon {
|
||||
// border: 1px solid orangered;
|
||||
width: 70rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.num {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 0rpx;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
color: #fff;
|
||||
background-color: #13AFA8;
|
||||
text-align: center;
|
||||
line-height: 30rpx;
|
||||
z-index: 99;
|
||||
font-size: 18rpx;
|
||||
}
|
||||
|
||||
.messgage-icon-image {
|
||||
margin-left: 12rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.messgage-icon1 {
|
||||
// border: 1px solid orangered;
|
||||
width: 85rpx;
|
||||
height: 70rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.num1 {
|
||||
position: absolute;
|
||||
top: 2rpx;
|
||||
right: 0rpx;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
color: #fff;
|
||||
background-color: #13AFA8;
|
||||
text-align: center;
|
||||
line-height: 30rpx;
|
||||
z-index: 99;
|
||||
font-size: 18rpx;
|
||||
}
|
||||
|
||||
.messgage-icon-image1 {
|
||||
margin-left: 12rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.issue-image {
|
||||
image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-right: 10rpx;
|
||||
// border: 1px solid red;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// padding-bottom: 120rpx;
|
||||
.navbar-top {
|
||||
padding: 0 24rpx;
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
|
||||
.messgage-icon {
|
||||
width: 80rpx;
|
||||
height: 88rpx;
|
||||
|
||||
.num {
|
||||
top: 16rpx;
|
||||
right: 0rpx;
|
||||
min-width: 32rpx;
|
||||
font-size: 18rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 32rpx;
|
||||
z-index: 399;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
// border: 1px solid blue;
|
||||
margin: 0 15rpx;
|
||||
padding: 0 15rpx;
|
||||
// #ifdef MP-WEIXIN
|
||||
width: 480rpx;
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
width: 550rpx;
|
||||
// #endif
|
||||
.messgage-icon-image {
|
||||
margin-left: 12rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.issue-image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
margin: 0 20rpx;
|
||||
// padding: 0 24rpx;
|
||||
width: 566rpx;
|
||||
height: 64rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 32rpx;
|
||||
|
||||
.search-box-c {
|
||||
height: 64rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 32rpx;
|
||||
padding: 0;
|
||||
|
||||
.search-box-search {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
height: 84rpx;
|
||||
// background: red;
|
||||
width: 120rpx;
|
||||
// text-align: center;
|
||||
line-height: 78rpx;
|
||||
}
|
||||
|
||||
.search-box-image {
|
||||
margin: 0 12rpx;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
width: 25rpx;
|
||||
height: 25rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab-box {
|
||||
height: 88rpx;
|
||||
padding: 0rpx 32rpx 0rpx 32rpx;
|
||||
width: calc(750rpx - 64rpx);
|
||||
|
||||
.tab-item {
|
||||
}
|
||||
|
||||
font-size: 34rpx;
|
||||
line-height: 110rpx;
|
||||
color: #666;
|
||||
}
|
||||
.tab-box {
|
||||
// padding:0;
|
||||
width: calc(750rpx - 64rpx);
|
||||
margin-left: 32rpx;
|
||||
margin-bottom: 24rpx;
|
||||
margin-top: 14rpx;
|
||||
|
||||
.tab-item-active {
|
||||
font-size: 36rpx;
|
||||
color: #111;
|
||||
position: relative;
|
||||
.tab-item {
|
||||
font-size: 34rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.tab-item-act {
|
||||
width: 32rpx;
|
||||
height: 6rpx;
|
||||
background: #13AFA8;
|
||||
position: absolute;
|
||||
bottom: 20rpx;
|
||||
left: calc(50% - 16rpx);
|
||||
}
|
||||
}
|
||||
.tab-item-active {
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -834,31 +856,73 @@
|
||||
color: #111111;
|
||||
line-height: 43rpx;
|
||||
}
|
||||
|
||||
.video-box1 {
|
||||
width: 450rpx;
|
||||
margin-top: 24rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
|
||||
.video-box {
|
||||
// width: 686rpx;
|
||||
// height: 686rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-top: 24rpx;
|
||||
position: relative;
|
||||
|
||||
.video-box-bg {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.video-box-bo {
|
||||
position: absolute;
|
||||
top: calc(50% - 60rpx);
|
||||
left: calc(50% - 60rpx);
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
|
||||
.image-list-box {
|
||||
width: 100%;
|
||||
margin-top: 24rpx;
|
||||
|
||||
|
||||
.image-one {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
width: 454rpx;
|
||||
max-height: 666rpx;
|
||||
overflow: hidden;
|
||||
// height: 686rpx;
|
||||
border-radius: 8rpx;
|
||||
image{
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.image-two {
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
width: 338rpx;
|
||||
height: 338rpx;
|
||||
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.09);
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
// margin-top: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.image-three {
|
||||
width: 218rpx;
|
||||
height: 218rpx;
|
||||
width: 222rpx;
|
||||
height: 222rpx;
|
||||
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.09);
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
image{
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1054,15 +1118,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
//视频
|
||||
.video-box {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.cover-view-video {
|
||||
.view-video {
|
||||
width: 100%;
|
||||
height: 686rpx;
|
||||
// background-color: #fff;
|
||||
|
||||
@@ -29,10 +29,8 @@
|
||||
<view class="" style="height: 88rpx;" />
|
||||
</view>
|
||||
<view class="textarea-box">
|
||||
<u-textarea border="none" v-model="content" placeholder="请输入你的内容"></u-textarea>
|
||||
<u-textarea border="none" v-model="content" :placeholder="issueType==2?'请书写您的心情!!!':'请输入您的内容'"></u-textarea>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="upload-image-box flex-wrap align-center" v-if="issueType==1">
|
||||
<view class="upload-image-item rel" :style="{marginRight: index%3==2 ? '0' : '24rpx'}"
|
||||
v-for="(item,index) in picList" :key="index">
|
||||
@@ -44,30 +42,12 @@
|
||||
<image class="upload-image" :src="`${config.aliyunOssUrl}/static/images/app/serve/realname_upload.png`" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="video rel">
|
||||
<image class="video-image" v-if="!videoImage" :src="`${config.aliyunOssUrl}/static/images/app/icon/plus_box.png`" mode="" @click="getVideo"></image>
|
||||
<video v-else :src="videoImage" ></video>
|
||||
<view v-else-if='issueType==0' class="video rel">
|
||||
<view style="margin-bottom: 16rpx;">上传视频</view>
|
||||
<image v-if="!videoImage" class="video-image" :src="`${config.aliyunOssUrl}/static/images/app/icon/plus_box.png`" mode="" @click="getVideo"></image>
|
||||
<video v-else :src="videoImage" :poster="`${videoImage}?x-oss-process=video/snapshot,t_1000,m_fast`"></video>
|
||||
<image v-if="videoImage" @click="videoImage=''" class="clear abs" :src="`${config.aliyunOssUrl}/static/images/app/serve/realname_clea.png`" mode=""></image>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<view class="upload-image-box flex-wrap align-center" v-if="issueType==1">
|
||||
<view class="upload-image-item rel" :style="{marginRight: index%3==2 ? '0' : '24rpx'}"
|
||||
v-for="(item,index) in picList" :key="index">
|
||||
<image class="upload-image" :src="item" mode=""></image>
|
||||
<image class="clear abs" src="@/static/images/app/serve/realname_clea.png" @click="DelPic('faultImage')"
|
||||
mode=""></image>
|
||||
</view>
|
||||
<view class="upload-image-item" @click="getImage">
|
||||
<image class="upload-image" src="@/static/images/app/serve/realname_upload.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="video rel">
|
||||
<image class="video-image" v-if="!videoImage" src="@/static/images/app/icon/plus_box.png" mode="" @click="getVideo"></image>
|
||||
<video v-else :src="videoImage" ></video>
|
||||
<image v-if="videoImage" @click="videoImage=''" class="clear abs" src="@/static/images/app/serve/realname_clea.png" mode=""></image>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -88,7 +68,9 @@
|
||||
//issueType 0:视频 1:图片
|
||||
issueType: 0,
|
||||
//视频
|
||||
videoImage:''
|
||||
videoImage:'',
|
||||
//视频宽高
|
||||
videoInfo:{},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -103,8 +85,12 @@
|
||||
replyStatus: 1,
|
||||
type: 1,
|
||||
categoryId: this.categoryId,
|
||||
video:this.videoImage
|
||||
video:this.videoImage,
|
||||
cover:this.videoImage,
|
||||
wide:this.videoInfo.width,
|
||||
high:this.videoInfo.height,
|
||||
}).then(res => {
|
||||
uni.setStorageSync('video_info', {});
|
||||
uni.hideLoading();
|
||||
uni.navigateBack()
|
||||
})
|
||||
@@ -116,6 +102,8 @@
|
||||
true,
|
||||
res => {
|
||||
uni.hideLoading();
|
||||
this.videoInfo = uni.getStorageSync('video_info');
|
||||
console.log('视频信息',this.videoInfo);
|
||||
this.videoImage = res.data
|
||||
});
|
||||
},
|
||||
@@ -141,6 +129,7 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
this.categoryId = options.type
|
||||
// console.log(options.issueType == 0 ? '视频' : '图片');
|
||||
this.issueType = options.issueType
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<view>
|
||||
<z-paging ref="paging" v-model="dataList" @query="queryList">
|
||||
<u-navbar safeAreaInsetTop placeholder bgColor="#f5f5f5">
|
||||
<view class="u-nav-slot" slot="left" @click="$tab.navigateBack">
|
||||
<u-icon name="arrow-left" size="19"></u-icon>
|
||||
@@ -16,6 +16,7 @@
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</u-navbar>
|
||||
|
||||
<view class="personal-header f-a-i">
|
||||
<view>
|
||||
<image :src="userDetail.avatar" mode=""></image>
|
||||
@@ -64,12 +65,11 @@
|
||||
<text :class="actTab==2?'data-list-tab-cont-act':''"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<z-paging use-page-scroll ref="paging" v-model="dataList" @query="queryList">
|
||||
|
||||
<view v-for="(item,index) in dataList" :key="index">
|
||||
<view v-if="actTab==1">
|
||||
<view class="list-cont-dynamic">
|
||||
<view class="dynamic-condition" @click.stop="toDetailPages(item.id)">
|
||||
<view class="dynamic-condition">
|
||||
<view class="dynamic-condition-header f-jcsb f-a-i">
|
||||
<view class="f-a-i">
|
||||
<image :src="item.authorAvatar" mode=""></image>
|
||||
@@ -87,37 +87,30 @@
|
||||
<u-icon name="more-dot-fill" color="#999" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin: 24rpx 0;width: 100%;">
|
||||
<view style="margin: 24rpx 0;width: 100%;" @click.stop="toDetailPages(item.id)">
|
||||
<u--text :lines="2" bold size="14" :text="item.content"></u--text>
|
||||
</view>
|
||||
<video v-if="item.video" :src="item.video" initial-time="1s"
|
||||
:poster="item.cover"
|
||||
class="video-box">
|
||||
|
||||
<!-- <view class="video-box" v-if="item.video" @click="toDetailPages(item.id)">
|
||||
<image class="video-box-bo" :src="`${config.aliyunOssUrl}/static/images/app/mine/bo_fang.png`" mode=""></image>
|
||||
<image class="video-box-bg" :src="item.cover" mode=""></image>
|
||||
</view> -->
|
||||
|
||||
<video v-if="item.video" :id="'refVideo'+item.id" :src="item.video" initial-time="1s"
|
||||
class="video-box1" :poster="item.cover" @play="handleVideoClick(index)" :style="{width:`${item.wide}`,height:`${item.high}`}" >
|
||||
</video>
|
||||
|
||||
<view v-else class="image-list-box ">
|
||||
<view v-show="item.image.length==1">
|
||||
<view v-if="item.image.length==1">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-one" :src="itemImage" mode="cover"
|
||||
<image class="image-one" :src="itemImage" mode="widthFix"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="item.image.length==2" style="width: 100%;" class="flex justify-between">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-two" :src="itemImage" mode="cover"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="item.image.length==4" style="width: 100%;"
|
||||
class="flex justify-between flex-wrap">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-two" :src="itemImage" mode="cover"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="item.image.length>2&&item.image.length!=4"
|
||||
<view v-if="item.image.length>1"
|
||||
class="flex-wrap flex justify-between">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-three" :src="itemImage" mode="cover"
|
||||
<image class="image-three" :src="itemImage" mode="aspectFill"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
<view v-for="(a,b) in (item.image.length%3-1)<0?0:(item.image.length%3-1)">
|
||||
@@ -125,6 +118,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="dynamic-condition-operate flex align-center justify-end">
|
||||
|
||||
<!-- #ifdef APP -->
|
||||
@@ -337,6 +331,13 @@
|
||||
toUid: obj.id,
|
||||
});
|
||||
},
|
||||
handleVideoClick(index) {
|
||||
this.dataList.forEach((item, i) => {
|
||||
if (index != i) {
|
||||
uni.createVideoContext('refVideo' + item.id, this).pause();
|
||||
}
|
||||
});
|
||||
},
|
||||
//详情
|
||||
toDetailPages(id, type) {
|
||||
uni.navigateTo({
|
||||
@@ -438,6 +439,13 @@
|
||||
},
|
||||
cancel(){
|
||||
|
||||
},
|
||||
pxToRpx(px) {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
const screenWidth = systemInfo.screenWidth;
|
||||
const ratio = 730 / screenWidth;
|
||||
const rpx = px / ratio;
|
||||
return rpx;
|
||||
},
|
||||
//数据列表
|
||||
queryList(page, limit) {
|
||||
@@ -454,6 +462,13 @@
|
||||
} else {
|
||||
item.image = []
|
||||
}
|
||||
if(Number(item.wide)>Number(item.high)){
|
||||
item.wide=686+'rpx'
|
||||
item.high=this.pxToRpx(item.high)+'rpx'
|
||||
}else{
|
||||
item.wide=this.pxToRpx(item.wide)+'rpx'
|
||||
item.high=this.pxToRpx(item.high)+'rpx'
|
||||
}
|
||||
const date1 = new Date();
|
||||
const date2 = new Date(item.createTime);
|
||||
// 计算相差的毫秒数
|
||||
@@ -718,12 +733,37 @@
|
||||
.administration {
|
||||
margin-right: 180rpx;
|
||||
}
|
||||
|
||||
.video-box1 {
|
||||
width: 450rpx;
|
||||
// margin-top: 24rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.video-box {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-top: 24rpx;
|
||||
position: relative;
|
||||
|
||||
.video-box-bg {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.video-box-bo {
|
||||
position: absolute;
|
||||
top: calc(50% - 60rpx);
|
||||
left: calc(50% - 60rpx);
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
|
||||
.image-list-box {
|
||||
@@ -731,23 +771,27 @@
|
||||
margin-top: 24rpx;
|
||||
|
||||
.image-one {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
width: 454rpx;
|
||||
max-height: 666rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
|
||||
.image-two {
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
width: 338rpx;
|
||||
height: 338rpx;
|
||||
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.09);
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 10rpx;
|
||||
// margin-top: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.image-three {
|
||||
width: 218rpx;
|
||||
height: 218rpx;
|
||||
width: 222rpx;
|
||||
height: 222rpx;
|
||||
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.09);
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.image-three-no {
|
||||
|
||||
440
pages/search/search.vue
Normal file
440
pages/search/search.vue
Normal file
@@ -0,0 +1,440 @@
|
||||
<template>
|
||||
<z-paging ref="paging" v-model="dataList" @query="queryList" :auto="false">
|
||||
<view slot="top" class="search">
|
||||
<u-search :showAction="true" placeholder="亲输入搜索内容" v-model="searchWord" actionText="搜索" :animation="true"
|
||||
@custom="customFn"></u-search>
|
||||
</view>
|
||||
<view class="search" v-if="!dataList.length">
|
||||
<view class="search-title f-36 c222">热门搜索</view>
|
||||
<view class="search-label f-24 c111 flex align-center flex-wrap">
|
||||
<view class="search-label-list" v-for="(item,index) in labelList" :key="index" @click="searchFn(item.searchTerm)">
|
||||
{{item.searchTerm}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-title f-36 c222 flex justify-between align-center">
|
||||
<view>近期搜索</view>
|
||||
<image @click="delSearchFn(false)" :src="`${config.aliyunOssUrl}/static/images/icon/del.png`" mode=""></image>
|
||||
</view>
|
||||
<view class="search-history">
|
||||
<view class="search-history-list f-28 c111 flex justify-between align-center"
|
||||
v-for="(item,index) in historyList" :key="index" @click="searchFn(item.searchQuery)">
|
||||
<view>{{item.searchQuery}}</view>
|
||||
<image @click.stop="delSearchFn(item.id)" :src="`${config.aliyunOssUrl}/static/images/icon/x_2.png`" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-box">
|
||||
<view v-for="(item,index) in dataList" :key="index">
|
||||
<view class="user-item border-bottom border-eee">
|
||||
<view class="user-info flex align-center justify-between">
|
||||
<view class="left flex align-center" @click.stop="linkPersonalCenter(item.authorId)">
|
||||
<image :src="item.authorAvatar" mode=""></image>
|
||||
<view class="">
|
||||
<view class="f-28 c666">
|
||||
{{item.authorName}}
|
||||
</view>
|
||||
<view class="f-24 c666">
|
||||
IP {{item.city || "未知"}} {{item.diffDays}}天前
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="image-box" @click.stop="reportFn(item)">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/icon/more.png`" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-title line-two" @click="toDetailPages(item,index)">
|
||||
{{item.content?item.content:'分享图片'}}
|
||||
</view>
|
||||
<!-- <video :id="'refVideo'+item.id" v-if="item.video" :src="item.video" initial-time="1s"
|
||||
:poster="item.cover" class="video-box" @play="handleVideoClick(index)"
|
||||
@pause="currentVideoIndex = -1">
|
||||
</video> -->
|
||||
<view class="video-box" v-if="item.video" @click="toDetailPages(item,index)">
|
||||
<image class="video-box-bo" :src="`${config.aliyunOssUrl}/static/images/app/mine/bo_fang.png`" mode=""></image>
|
||||
<image class="video-box-bg" :src="item.cover" mode=""></image>
|
||||
</view>
|
||||
<view v-if="item.image" class="image-list-box ">
|
||||
<view v-if="item.image.length==1">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-one" :src="itemImage" mode="cover"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.image.length==2" style="width: 100%;" class="flex justify-between">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-two" :src="itemImage" mode="cover"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.image.length==4" style="width: 100%;" class="flex justify-between flex-wrap">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-two" :src="itemImage" mode="cover"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.image.length>2&&item.image.length!=4" class="flex-wrap flex justify-between">
|
||||
<view v-for="(itemImage,imageIndex) in item.image" :key="imageIndex">
|
||||
<image class="image-three" :src="itemImage" mode="cover"
|
||||
@click.stop="examineFn(item.image,imageIndex)"></image>
|
||||
</view>
|
||||
<view v-for="(a,b) in (item.image.length%3-1)<0?0:(item.image.length%3-1)">
|
||||
<view class="image-three"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="faceback-box flex align-center justify-between">
|
||||
<view class="" @click.stop="delCommFn(item, index)">
|
||||
<!-- <text class="red" v-if="userInfo.id == item.authorId">删除</text> -->
|
||||
</view>
|
||||
<view class="flex align-center justify-end">
|
||||
<!-- <view class="faceback-box-item flex align-center" @click.stop="shareFn(item)">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/mine/share.png`"></image>
|
||||
{{item.shareNum}}
|
||||
</view> -->
|
||||
<view class="faceback-box-item flex align-center" style="position:relative;">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/mine/share.png`"></image>
|
||||
{{item.shareNum}}
|
||||
<button id="shareBtn" @click="shareBtnInfo(item)" open-type="share"></button>
|
||||
</view>
|
||||
<view class="faceback-box-item flex align-center" @click="toDetailPages(item,index)">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/mine/information.png`"></image>
|
||||
{{item.replyNum}}
|
||||
</view>
|
||||
<view class="faceback-box-item flex align-center" @click="Like(item)">
|
||||
<image v-if="!item.userIsLike" :src="`${config.aliyunOssUrl}/static/images/app/mine/like.png`">
|
||||
</image>
|
||||
<image v-if="item.userIsLike" :src="`${config.aliyunOssUrl}/static/images/app/icon/like.png`"></image>
|
||||
{{item.likeNum}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPlazaList,
|
||||
getHistoryListAll,
|
||||
getHistoryListSearch,
|
||||
getHistoryListDel,
|
||||
getHistoryListPage,
|
||||
like,
|
||||
} from "@/api/discover/discover.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config: getApp().globalData.config,
|
||||
//搜索框
|
||||
searchWord: '',
|
||||
labelList: [{
|
||||
name: '新能源'
|
||||
},
|
||||
{
|
||||
name: 'BYD'
|
||||
},
|
||||
{
|
||||
name: '轮胎常年不修会有什么隐患?应该如何避免?'
|
||||
}
|
||||
],
|
||||
historyList: [{
|
||||
name: '轮胎保质期',
|
||||
id:1
|
||||
},
|
||||
{
|
||||
name: '左转灯不亮',
|
||||
id:2
|
||||
},
|
||||
{
|
||||
name: '轮胎常年不修会有什么隐患?应该如何避免?',
|
||||
id:3
|
||||
}
|
||||
],
|
||||
dataList: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
//获取热门搜索
|
||||
getHistoryListAll().then(res => {
|
||||
console.log(res);
|
||||
this.labelList=res.data
|
||||
})
|
||||
//搜索历史记录
|
||||
this.getHistoryListPageFn()
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
if (res.from === 'button') {
|
||||
// 来自页面内分享按钮
|
||||
}
|
||||
return {
|
||||
title: this.shareItem.content, //分享的名称
|
||||
path: '/pages/index/index',
|
||||
imageUrl: this.shareItem.image.length ? this.shareItem.image[0] : '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
shareBtnInfo(item) {
|
||||
this.shareItem = item
|
||||
},
|
||||
// 去主页
|
||||
linkPersonalCenter(id) {
|
||||
if (id) {
|
||||
this.$tab.navigateTo(`/pages/mine/personal_center/personal_center?uid=${id}`)
|
||||
}
|
||||
},
|
||||
// 点赞
|
||||
Like(item) {
|
||||
like(item.id).then(res => {
|
||||
if (item.userIsLike) item.likeNum -= 1
|
||||
else item.likeNum += 1
|
||||
item.userIsLike = !item.userIsLike
|
||||
})
|
||||
},
|
||||
//三个点
|
||||
reportFn(item) {
|
||||
uni.showActionSheet({
|
||||
itemList: ['举报'],
|
||||
success: (res) => {
|
||||
if (res.tapIndex == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/report?id=' + item.id
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (res) => {}
|
||||
});
|
||||
},
|
||||
//删除
|
||||
delSearchFn(id) {
|
||||
let ids = []
|
||||
if (id) {
|
||||
ids = [id]
|
||||
} else {
|
||||
this.historyList.forEach(item => {
|
||||
ids.push(item.id)
|
||||
})
|
||||
}
|
||||
getHistoryListDel({
|
||||
ids: ids
|
||||
}).then(res => {
|
||||
this.getHistoryListPageFn()
|
||||
console.log('删除成功', res.data);
|
||||
})
|
||||
},
|
||||
//搜索历史
|
||||
getHistoryListPageFn() {
|
||||
getHistoryListPage().then(res => {
|
||||
console.log(res);
|
||||
this.historyList=res.data
|
||||
})
|
||||
},
|
||||
//点击热门,近期
|
||||
searchFn(item) {
|
||||
this.searchWord = item
|
||||
this.$refs.paging.reload()
|
||||
},
|
||||
//搜索
|
||||
customFn() {
|
||||
if (this.searchWord) {
|
||||
getHistoryListSearch(this.searchWord).then(res => {
|
||||
console.log('添加成功');
|
||||
})
|
||||
}
|
||||
this.$refs.paging.reload()
|
||||
},
|
||||
toDetailPages(item, index) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/index/detail?id=${item.id}`
|
||||
})
|
||||
},
|
||||
//查看
|
||||
examineFn(urlList, index) {
|
||||
uni.previewImage({
|
||||
urls: urlList,
|
||||
current: index,
|
||||
loop: true
|
||||
})
|
||||
},
|
||||
//列表
|
||||
queryList(page, limit) {
|
||||
getPlazaList({
|
||||
searchWord: this.searchWord,
|
||||
categoryId: 1,
|
||||
page,
|
||||
limit
|
||||
}).then(res => {
|
||||
console.log(res.data.list);
|
||||
res.data.list.forEach(item => {
|
||||
if (item.image != '') {
|
||||
item.image = item.image.split(",")
|
||||
} else {
|
||||
item.image = []
|
||||
}
|
||||
const date1 = new Date();
|
||||
const date2 = new Date(item.createTime);
|
||||
// 计算相差的毫秒数
|
||||
const diffTime = Math.abs(date2 - date1);
|
||||
// 将毫秒数转换为天数
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
item.diffDays = diffDays
|
||||
})
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
}).catch(err => {
|
||||
this.$refs.paging.complete(false)
|
||||
})
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
#shareBtn {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.search {
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.search-title {
|
||||
margin: 48rpx 0 24rpx 0;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search-history {
|
||||
.search-history-list {
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-label {
|
||||
|
||||
.search-label-list {
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
background: #F3F3F3;
|
||||
margin-right: 32rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-box {
|
||||
padding: 0 32rpx;
|
||||
|
||||
.user-item {
|
||||
padding-top: 48rpx;
|
||||
|
||||
.user-info {
|
||||
.left {
|
||||
image {
|
||||
margin-right: 16rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.image-box {
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-title {
|
||||
margin-top: 16rpx;
|
||||
max-height: 86rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #111111;
|
||||
line-height: 43rpx;
|
||||
}
|
||||
|
||||
|
||||
.video-box {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-top: 24rpx;
|
||||
position: relative;
|
||||
|
||||
.video-box-bg {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.video-box-bo {
|
||||
position: absolute;
|
||||
top: calc(50% - 60rpx);
|
||||
left: calc(50% - 60rpx);
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.image-list-box {
|
||||
width: 100%;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.image-one {
|
||||
width: 686rpx;
|
||||
height: 686rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.image-two {
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.09);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.image-three {
|
||||
width: 218rpx;
|
||||
height: 218rpx;
|
||||
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.09);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.faceback-box {
|
||||
padding: 34rpx 0;
|
||||
|
||||
.faceback-box-item {
|
||||
margin-left: 48rpx;
|
||||
|
||||
}
|
||||
|
||||
image {
|
||||
margin: 0 16rpx;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -18,6 +18,20 @@
|
||||
</view>
|
||||
</u-navbar>
|
||||
<view class="tabs-box bg-white">
|
||||
<view class="power flex align-center justify-between">
|
||||
<view class="title">
|
||||
类型
|
||||
</view>
|
||||
<view class="select-content">
|
||||
<view class="content-box">
|
||||
<!-- <view :class="['content-item', typeId == -1 && 'active-item']" @click="typeFn(-1)">全部</view> -->
|
||||
<view :class="['content-item', type == item.value && 'active-item']" @click="typeFn(item.value)"
|
||||
v-for="(item) in typeList" :key="item.value">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="power flex align-center justify-between">
|
||||
<view class="title">
|
||||
品牌
|
||||
@@ -220,8 +234,23 @@
|
||||
priceId: -1,
|
||||
//商家
|
||||
storeShow: false,
|
||||
type: 0,
|
||||
type: -1,
|
||||
carList: [],
|
||||
//类型
|
||||
// typeId: -1,
|
||||
typeList :[{
|
||||
name: '全部',
|
||||
value: -1
|
||||
}, {
|
||||
name: '买车',
|
||||
value: 0
|
||||
}, {
|
||||
name: '租车',
|
||||
value: 2
|
||||
}, {
|
||||
name: '租买灵活',
|
||||
value: 1
|
||||
}],
|
||||
//搜索数量
|
||||
allNum: 0,
|
||||
//车商列表
|
||||
@@ -270,6 +299,11 @@
|
||||
this.storeShow = false
|
||||
this.$refs.paging.reload()
|
||||
},
|
||||
typeFn(value){
|
||||
// this.typeId = value
|
||||
this.type = value
|
||||
this.$refs.paging.reload()
|
||||
},
|
||||
//品牌
|
||||
brandFn(value) {
|
||||
if (value == -1) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-overlay :show="show" @click="show = false;" z-index="777"></u-overlay>
|
||||
<z-paging ref="paging" v-model="carList" @query="queryList" @scroll="scrollFn">
|
||||
<!-- <u-overlay :show="show" @click="show = false;" z-index="777"></u-overlay> -->
|
||||
<!-- <view :class="['nav-box', 'fixed-top', 'rel', showNavImg && 'bg-white']">
|
||||
#ifdef MP-WEIXIN
|
||||
<view :style="{height: `${$u.sys().statusBarHeight}px;`}" />
|
||||
@@ -41,20 +41,11 @@
|
||||
{{item.text}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="icons flex align-center">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/icon/search-black.png`" mode="" @click="toCarListPages"></image>
|
||||
<!-- <image @click="show = !show" :src="`${config.aliyunOssUrl}/static/images/app/icon/mune.png`" mode=""></image> -->
|
||||
<!-- <image @click="isshow" :src="`${config.aliyunOssUrl}/static/images/app/icon/mune.png`" mode=""></image> -->
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<view class="icons flex align-center">
|
||||
<image src="@/static/images/app/icon/search-black.png" mode=""></image>
|
||||
<!-- <image @click="show = !show" src="@/static/images/app/icon/mune.png" mode=""></image> -->
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view id='titleBox' :class="['select-box', 'bg-white', 'abs']" :style="show && `height: ${form.type == 1 ? 800 : 1000}rpx; transition: 0.5s;`">
|
||||
<view class="select-car-box">
|
||||
@@ -169,7 +160,7 @@
|
||||
</view>
|
||||
</u-sticky>
|
||||
<view class="content">
|
||||
<z-paging use-page-scroll ref="paging" v-model="carList" @query="queryList">
|
||||
<!-- <z-paging use-page-scroll ref="paging" v-model="carList" @query="queryList"> -->
|
||||
<view class="car-info flex align-center" v-for="(item,index) in carList" @click="link(item)">
|
||||
<image v-if="form.type==2" :src="item.image" mode=""></image>
|
||||
<image v-else :src="item.mainImage" mode=""></image>
|
||||
@@ -195,12 +186,11 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="show" style="height: 600rpx;"></view>
|
||||
</z-paging>
|
||||
<!-- <view v-if="show" style="height: 600rpx;"></view> -->
|
||||
</view>
|
||||
<tabbar-driver class="fixed-bottom" current="/pages/showroom/index"></tabbar-driver>
|
||||
<view style="height: 112rpx;" />
|
||||
</view>
|
||||
</z-paging>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -254,13 +244,13 @@
|
||||
type: 0
|
||||
},
|
||||
branner: [],
|
||||
tabList: [{
|
||||
text: '租车',
|
||||
type: 2
|
||||
}, {
|
||||
tabList: [ {
|
||||
text: '买车',
|
||||
type: 0
|
||||
}, {
|
||||
text: '租车',
|
||||
type: 2
|
||||
},{
|
||||
text: '租买灵活',
|
||||
type: 1
|
||||
}],
|
||||
@@ -272,23 +262,41 @@
|
||||
computed: {
|
||||
...mapGetters(['selectCity'])
|
||||
},
|
||||
onPageScroll(e) {
|
||||
if (e.scrollTop >= (this.$u.sys().statusBarHeight - 42)) {
|
||||
this.showNavImg = true
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#000000',
|
||||
backgroundColor: '#ffffff',
|
||||
})
|
||||
} else {
|
||||
this.showNavImg = false
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: '#000000'
|
||||
})
|
||||
}
|
||||
},
|
||||
// onPageScroll(e) {
|
||||
// if (e.scrollTop >= (this.$u.sys().statusBarHeight - 42)) {
|
||||
// this.showNavImg = true
|
||||
// uni.setNavigationBarColor({
|
||||
// frontColor: '#000000',
|
||||
// backgroundColor: '#ffffff',
|
||||
// })
|
||||
// } else {
|
||||
// this.showNavImg = false
|
||||
// uni.setNavigationBarColor({
|
||||
// frontColor: '#ffffff',
|
||||
// backgroundColor: '#000000'
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
|
||||
methods: {
|
||||
//监听
|
||||
scrollFn(e) {
|
||||
// console.log(e,'1111');
|
||||
if (e.target.scrollTop >= (this.scrollTop - this.$u.sys().statusBarHeight - 42)) {
|
||||
this.showNavImg = true
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#000000',
|
||||
backgroundColor: '#ffffff',
|
||||
})
|
||||
} else {
|
||||
this.showNavImg = false
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: '#000000'
|
||||
})
|
||||
}
|
||||
// console.log(this.showNavImg);
|
||||
},
|
||||
isshow(){
|
||||
this.show = !this.show
|
||||
if(this.show){
|
||||
@@ -307,6 +315,11 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
fixed(e) {
|
||||
if (!this.scrollTop) {
|
||||
this.scrollTop = e
|
||||
}
|
||||
},
|
||||
//筛选
|
||||
navCarList() {
|
||||
// console.log('类型', this.form.type);
|
||||
@@ -580,10 +593,11 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
// border: 1px solid red;
|
||||
margin: 0 auto;
|
||||
padding: 0 24rpx;
|
||||
padding-bottom: 24rpx;
|
||||
width: 702rpx;
|
||||
// width: 702rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 0 0 16rpx 16rpx;
|
||||
z-index: 0;
|
||||
|
||||
@@ -135,6 +135,8 @@ export default {
|
||||
sourceType: ['album', 'camera'],
|
||||
compressed:false,
|
||||
success: (res) => {
|
||||
console.log(res,'上传视频信息');
|
||||
uni.setStorageSync('video_info', res);
|
||||
if(isShowLoading)uni.showLoading({mask:true,title:'上传中...'});
|
||||
ossUpload(res.tempFilePath,res.tempFilePath,opt.dir||'crmebimage/public/product/',(p)=>{
|
||||
if (progress != null && typeof(progress) === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user