Commit 604b2865 authored by Mac's avatar Mac

1

parent 68468494
...@@ -252,22 +252,22 @@ ...@@ -252,22 +252,22 @@
list: [{ list: [{
name: '文本', name: '文本',
type: 0, type: 0,
url: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Sound.png' url: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friendwenben.png'
}, },
{ {
name: '图文', name: '图文',
type: 1, type: 1,
url: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Sound.png' url: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friendtuwen.png'
}, },
{ {
name: '视频', name: '视频',
type: 2, type: 2,
url: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Sound.png' url: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friendsp.png'
}, },
{ {
name: '语音', name: '语音',
type: 3, type: 3,
url: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Sound.png' url: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/friendyyin.png'
}, },
], ],
nowbofo: false, nowbofo: false,
...@@ -311,7 +311,9 @@ ...@@ -311,7 +311,9 @@
} }
}, },
onUnload(){
innerAudioContext.stop();
},
methods: { methods: {
init() { init() {
this.loading = true; this.loading = true;
......
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
<template> <template>
<view class="mydetails"> <view class="mydetails">
<u-empty v-if="loading==true" text="网络出现故障" mode="wifi"></u-empty> <u-empty v-if="loading==true" text="网络出现故障" mode="wifi"></u-empty>
<view class="box" v-if="loading==false"> <view class="box" v-if="loading==false" @click="blurc">
<view class="ftBox" > <view class="ftBox" >
<view class="ftBox-left"> <view class="ftBox-left">
<u-avatar :src="detial.crearteEmPhoto" size='80' mode="square"></u-avatar> <u-avatar :src="detial.crearteEmPhoto" size='80' mode="square"></u-avatar>
...@@ -202,14 +202,14 @@ ...@@ -202,14 +202,14 @@
<view class="text2" style="font-size: 14px;margin-bottom: 5px;">{{detial.content}}</view> <view class="text2" style="font-size: 14px;margin-bottom: 5px;">{{detial.content}}</view>
<!-- 图片模式 --> <!-- 图片模式 -->
<view class="imgmode" v-if="detial.fileType==1"> <view class="imgmode" v-if="detial.fileType==1">
<view v-if="detial.files.length==1" style="width: 150px;height:200px;margin-bottom: 6px;" @click="previewImage(0,detial.files)"> <view v-if="detial.files.length==1" style="width: 150px;height:200px;margin-bottom: 6px;" @click.stop="previewImage(0,detial.files)">
<image :src="detial.files[0]" mode="aspectFill" class="fileimg"></image> <image :src="detial.files[0]" mode="aspectFill" class="fileimg"></image>
</view> </view>
<view v-if="detial.files.length==2 || detial.files.length==4" v-for="(item, iq) in detial.files" :key="iq" @click="previewImage(iq,detial.files)" <view v-if="detial.files.length==2 || detial.files.length==4" v-for="(item, iq) in detial.files" :key="iq" @click.stop="previewImage(iq,detial.files)"
style="width: 240rpx;height:240rpx;margin-bottom: 6px;margin-right: 6px;"> style="width: 240rpx;height:240rpx;margin-bottom: 6px;margin-right: 6px;">
<image :src="item" mode="aspectFill" class="fileimg"></image> <image :src="item" mode="aspectFill" class="fileimg"></image>
</view> </view>
<view v-if="(detial.files.length==3 || detial.files.length>4) && iq<9" v-for="(item, iq) in detial.files" :key="iq" @click="previewImage(iq,detial.files)" <view v-if="(detial.files.length==3 || detial.files.length>4) && iq<9" v-for="(item, iq) in detial.files" :key="iq" @click.stop="previewImage(iq,detial.files)"
style="width: 160rpx;height:160rpx;margin-bottom: 6px;margin-right: 6px;position: relative;"> style="width: 160rpx;height:160rpx;margin-bottom: 6px;margin-right: 6px;position: relative;">
<image :src="item" mode="aspectFill" class="fileimg"></image> <image :src="item" mode="aspectFill" class="fileimg"></image>
<view class="imgc" v-if="iq==8 && detial.files.length>9"> <view class="imgc" v-if="iq==8 && detial.files.length>9">
...@@ -221,34 +221,35 @@ ...@@ -221,34 +221,35 @@
<view style="width: 100px;height:120px;margin-bottom: 6px;position: relative;"> <view style="width: 100px;height:120px;margin-bottom: 6px;position: relative;">
<video id="myVideo" :src="detial.files[0]" style="width: 100%;height: 100%;" :controls='false' :show-center-play-btn='false'></video> <video id="myVideo" :src="detial.files[0]" style="width: 100%;height: 100%;" :controls='false' :show-center-play-btn='false'></video>
<view style="width: 100%;height: 100%;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: center;" <view style="width: 100%;height: 100%;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: center;"
@click="enlarge(detial.files[0])"> @click.stop="enlarge(detial.files[0])">
<u-icon name="play-circle-o" :size="50" color="#FFF"></u-icon> <u-icon name="play-circle-o" :size="50" color="#FFF"></u-icon>
</view> </view>
</view> </view>
</view> </view>
<view v-if="detial.fileType==3" class="audios"> <view v-if="detial.fileType==3" class="audios" @click.stop="playVoice(detial)">
<view class="andiostyle" @click.stop="playVoice(detial)"> <view class="andiostyle" >
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Sound.png" mode="widthFix" style="width: 19px;height: auto;"></image> <image v-if="nowbofo==false" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Sound.png" mode="widthFix" style="width: 19px;height: auto;"></image>
<image v-if="nowbofo==true" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/bofanggif.gif" mode="widthFix" style="width: 19px;height: auto;"></image>
</view> </view>
</view> </view>
<view class="text" style="font-size: 11px;" v-if="detial.address && detial.address!=''"> <view class="text" style="font-size: 11px;margin-top: 5px;" v-if="detial.address && detial.address!=''">
{{detial.address}} {{detial.address}}
</view> </view>
<view class="r-sj"> <view class="r-sj">
<text>{{detial.createTime}}</text> <text>{{detial.createTime}}</text>
<view class="r-sj-d" @click="getdian(detial)"> <view class="r-sj-d" @click.stop="getdian(detial)">
<view class="dian"></view> <view class="dian"></view>
<view class="dian"></view> <view class="dian"></view>
</view> </view>
<view class="diancaoz" v-if="detial.dianshow==true"> <view class="diancaoz" v-if="detial.dianshow==true">
<view class="dianrow" @click="dianzan(detial)"> <view class="dianrow" @click.stop="dianzan(detial)">
<u-icon name="like-o" :size="30" color="#FFF"></u-icon> <u-icon name="like-o" :size="30" color="#FFF"></u-icon>
<text> <text>
{{detial.hasLike==false ?'赞':'取消'}} {{detial.hasLike==false ?'赞':'取消'}}
</text> </text>
</view> </view>
<view class="dianrow" @click="pinglun(detial)"> <view class="dianrow" @click.stop="pinglun(detial)">
<u-icon name="comment-o" :size="30" color="#FFF"></u-icon> <u-icon name="comment-o" :size="30" color="#FFF"></u-icon>
<text> <text>
评论 评论
...@@ -270,7 +271,7 @@ ...@@ -270,7 +271,7 @@
<view class="areagood" v-if=" detial.commentList.length>0"> <view class="areagood" v-if=" detial.commentList.length>0">
<u-icon name="comment-o" :size="30" color="#737373" style='margin-top: 2px;'></u-icon> <u-icon name="comment-o" :size="30" color="#737373" style='margin-top: 2px;'></u-icon>
<view class="areagood-r"> <view class="areagood-r">
<view v-for="(item, iq) in detial.commentList" :key="iq" style="width: 100%;margin-bottom: 7px;" @click="huifu(detial,item,iq)"> <view v-for="(item, iq) in detial.commentList" :key="iq" style="width: 100%;margin-bottom: 7px;" @click.stop="huifu(detial,item,iq)">
<view class="text comment-list"> <view class="text comment-list">
{{item.empName}} {{item.empName}}
<text style="color: #333333;margin: 0 3px;" v-if="item.byReplayEmpId>0">回复</text> <text style="color: #333333;margin: 0 3px;" v-if="item.byReplayEmpId>0">回复</text>
...@@ -287,8 +288,8 @@ ...@@ -287,8 +288,8 @@
</view> </view>
<!-- 输入框 --> <!-- 输入框 -->
<view class="comment" > <view class="comment" >
<input type="text" v-model="commentMsg.Content" :placeholder='placeholder' class="commentinput" @blur='blurc' :focus='focu'> <input type="text" v-model="commentMsg.Content" :placeholder='placeholder' class="commentinput" :focus='focu'>
<view class="comment-pl" :style="{background:mainColor}" @click="addComment">评论</view> <view class="comment-pl" :style="{background:mainColor}" @click.stop="addComment">评论</view>
</view> </view>
</view> </view>
...@@ -339,12 +340,12 @@ ...@@ -339,12 +340,12 @@
onLoad(options) { onLoad(options) {
if(options && options.ID){ if(options && options.ID){
this.articleId = options.ID; this.articleId = options.ID;
this.commentMsg.ArticleId = options.ID
this.init(1) this.init(1)
} }
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '详情', title: '详情',
}); });
innerAudioContext.loop = true;
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
this.pricecolor = this.$uiConfig.pricecolor; this.pricecolor = this.$uiConfig.pricecolor;
...@@ -368,7 +369,6 @@ ...@@ -368,7 +369,6 @@
this.loading = false; this.loading = false;
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.detial = res.data; this.detial = res.data;
this.detial.nowbofo = false;
this.detial.dianshow = false; this.detial.dianshow = false;
} }
} }
...@@ -396,6 +396,10 @@ ...@@ -396,6 +396,10 @@
if (this.nowbofo == false) { if (this.nowbofo == false) {
innerAudioContext.play() innerAudioContext.play()
this.nowbofo = true this.nowbofo = true
innerAudioContext.onEnded(()=>{
innerAudioContext.stop()
this.nowbofo = false
})
} else { } else {
innerAudioContext.pause(); innerAudioContext.pause();
this.nowbofo = false this.nowbofo = false
...@@ -435,6 +439,7 @@ ...@@ -435,6 +439,7 @@
item:item, item:item,
iq:iq, iq:iq,
} }
this.focu=false
if(this.UserId == this.user.item.empId){//自己点自己的时候处理 if(this.UserId == this.user.item.empId){//自己点自己的时候处理
this.show=true this.show=true
}else{ }else{
...@@ -462,6 +467,7 @@ ...@@ -462,6 +467,7 @@
} }
}, },
addComment() { addComment() {
console.log(this.commentMsg)
if (this.commentMsg.Content == '') { if (this.commentMsg.Content == '') {
uni.showToast({ uni.showToast({
title: '请输入评论', title: '请输入评论',
...@@ -485,6 +491,7 @@ ...@@ -485,6 +491,7 @@
); );
}, },
blurc(){ blurc(){
this.focu=false
this.commentMsg.Content = ''; this.commentMsg.Content = '';
this.placeholder = '评论'; this.placeholder = '评论';
}, },
......
...@@ -330,6 +330,9 @@ ...@@ -330,6 +330,9 @@
created () { created () {
// 监听 // 监听
this.onMonitorEvents() this.onMonitorEvents()
},
onUnload(){
innerAudioContext.stop();
}, },
methods: { methods: {
publish() { //发布 publish() { //发布
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment