小程序/链接
This commit is contained in:
@@ -81,6 +81,30 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-info" v-if="item.msgType == 'weapp'" @click="openApp(item)">
|
||||
<div class="top">
|
||||
<div class="card-left">
|
||||
<h3>{{item.description}}</h3>
|
||||
<p>{{item.title}}</p>
|
||||
<div>{{item.username}}{{item.displayname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">小程序</div>
|
||||
</div>
|
||||
|
||||
<div class="card-info" v-if="item.msgType == 'link'" @click="openLink(item)">
|
||||
<div class="top">
|
||||
<div class="card-left">
|
||||
<p>{{item.title}}</p>
|
||||
<div>{{item.username}}</div>
|
||||
</div>
|
||||
<div class="card-right" v-if="item.imageUrl">
|
||||
<img :src="item.imageUrl" alt="" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">分享链接</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId == user.wxUserId">
|
||||
|
||||
@@ -203,16 +227,6 @@ export default {
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
// res.data.records.map((item) => {
|
||||
// if(item.msgType == 'voice'){
|
||||
// //amr对象不能共用,所以要为每条语音消息初始化一个amr对象
|
||||
// var amr = new BenzAMRRecoder();
|
||||
// amr.initWithUrl(`请求的amr地址`).then(() => {
|
||||
// item.amrTime = Math.ceil(amr.getDuration()); //获取音频总时长
|
||||
// });
|
||||
// item.amr = amr; //将初始化好的amr赋值到当前消息对象data中
|
||||
// }
|
||||
// })
|
||||
res.data.records.map((item) => {
|
||||
if(item.msgType == 'location') {
|
||||
item.covers = [{
|
||||
@@ -245,6 +259,15 @@ export default {
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
openLink(row) {
|
||||
window.open(row.linkUrl);
|
||||
},
|
||||
openApp(row) {
|
||||
uni.navigateToMiniProgram({
|
||||
// appId: row.goodsJdAppid,
|
||||
// path: row.goodsJdUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.current ++
|
||||
@@ -349,13 +372,14 @@ export default {
|
||||
}
|
||||
.img-list {
|
||||
img {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
max-width: 400px;
|
||||
margin: 0 16px 16px 0;
|
||||
}
|
||||
}
|
||||
::v-deep .uni-audio-default {
|
||||
height: 72px;
|
||||
width: 280px!important;
|
||||
min-width: 0!important;
|
||||
}
|
||||
::v-deep .uni-audio-left {
|
||||
height: 72px;
|
||||
|
||||
Reference in New Issue
Block a user