This commit is contained in:
2020-07-01 17:32:36 +08:00
parent dc69746320
commit dc72f79ee8
24 changed files with 268 additions and 127 deletions

View File

@@ -1,5 +1,5 @@
<template>
<view class="daren-item">
<view class="daren-item" @click="toDetailsPage">
<image class="head" :src="info.member_avatar"></image>
<text class="name">{{ info.member_nickname }}</text>
<text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
@@ -11,7 +11,17 @@ export default {
name:"daren-item",
props: {
info: Object,
}
},
methods: {
toDetailsPage() {
this.$u.route({
url: '',
params: {
name: 'lisa'
}
})
},
},
}
</script>
<style lang="scss" scoped>

View File

@@ -1,5 +1,5 @@
<template>
<view class="video-item" v-if="item">
<view class="video-item" v-if="item" @click="toDetailsPage">
<image class="head" :src="item.article_pic"></image>
<view class="title" v-if="!isguanzhu">{{ item.article_title }}</view>
<view class="jianjie">{{ item.article_content }}</view>
@@ -8,7 +8,7 @@
<image :src="item.member_avatar"></image>
<text>{{ item.member_nickname }}</text>
</view>
<image src="/static/image/common/4.png" @click="showAction"></image>
<image src="/static/image/common/4.png" @click.stop="showAction"></image>
<view class="action" v-if="show == item.article_id">
<view class="bubble">
<view @click="articleLike">
@@ -210,6 +210,9 @@ export default {
}
})
},
toDetailsPage() {
},
},
}
</script>

View File

@@ -6,7 +6,7 @@
:index='index'
:show="item.show"
:options="options"
@click="click"
@click="removeFavorite"
@open="open"
>
<view class="item u-border-bottom">
@@ -60,16 +60,20 @@ export default {
},
methods: {
getGoodsFavoritesList() {
this.$u.api.getGoodsFavoritesList().then(res => {
if(res.errCode == 0) {
}
this.$u.api.getFavoritesList().then(res => {
if(res.errCode == 0) {}
})
},
click(index) {
this.list.splice(index, 1);
this.$u.toast(`删除了第${index+1}个cell`);
removeFavorite(id) {
this.$u.api.removeFavorite({
id: id
}).then(res => {
if(res.errCode == 0) {
this.getGoodsFavoritesList();
} else {
this.$u.toast(res.message);
}
})
},
open(index) {
// 先将正在被操作的swipeAction标记为打开状态否则由于props的特性限制

View File

@@ -45,6 +45,7 @@
</template>
<script>
import common from '@/static/js/common.js'
export default {
data() {
return {
@@ -90,10 +91,6 @@
this.videoContext = uni.createVideoContext('myVideo')
},
methods: {
unescapeHTML(temp) {
temp = "" + temp;
return temp.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&apos;/g, "'");
},
apiwelcome() {
this.$u.api.documentInfo({
document_code: 'agreement'
@@ -101,7 +98,7 @@
if (res.errCode == 0) {
let agreement = res.data;
// console.log(agreement.document_content)
agreement.document_content = this.unescapeHTML(agreement.document_content);
agreement.document_content = common.unescapeHTML(agreement.document_content);
// console.log(agreement);
this.agreement = agreement;
}
@@ -307,4 +304,4 @@
}
}
}
</style>
</style>