gdpaoup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="daren-item" @click="toDetailsPage">
|
||||
<image class="head" :src="info.member_avatar"></image>
|
||||
<view class="daren-item">
|
||||
<image class="head" @click="toDetailsPage" :src="info.member_avatar"></image>
|
||||
<text class="name">{{ info.member_nickname }}</text>
|
||||
<text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
|
||||
<view class="guanzhu action" @tap="changeType(info.member_id)" v-if="info.is_attention == 1">已关注</view>
|
||||
@@ -8,17 +8,31 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
name:"daren-item",
|
||||
props: {
|
||||
info: Object,
|
||||
},
|
||||
computed: {
|
||||
...mapState(["login","hasLogin"]),
|
||||
},
|
||||
watch: {
|
||||
info(newVal, old) {
|
||||
// console.log(newVal);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
toDetailsPage() {
|
||||
// 判断是否登录
|
||||
const toke = uni.getStorageSync('token');
|
||||
if (toke) {
|
||||
console.log(toke);
|
||||
// console.log();
|
||||
if (this.hasLogin) {
|
||||
this.$u.route({
|
||||
url: "/pageB/details/index",
|
||||
params: {
|
||||
id: this.info.member_id
|
||||
}
|
||||
});
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pageA/login/login'
|
||||
@@ -32,8 +46,8 @@ export default {
|
||||
// })
|
||||
},
|
||||
changeType:function(type){
|
||||
console.log("111")
|
||||
this.$emit("pChangeType",type)
|
||||
// console.log("111")
|
||||
this.$emit("pChangeType",type);
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
@@ -37,12 +37,13 @@
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.video-item{
|
||||
margin-top: 20rpx;
|
||||
flex-shrink: 0;
|
||||
width: 335rpx;
|
||||
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
|
||||
padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 20rpx;
|
||||
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
|
||||
.head{
|
||||
width: 100%;
|
||||
height: 334rpx;
|
||||
@@ -195,29 +196,40 @@ export default {
|
||||
// console.log(this.item);
|
||||
this.show = -1;
|
||||
},
|
||||
watch: {
|
||||
item(newVal, old) {
|
||||
// console.log(newVal);
|
||||
this.item = newVal;
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
showAction() {
|
||||
this.show = this.show > 0 ? -1 : this.item.article_id;
|
||||
},
|
||||
// 点赞
|
||||
articleLike() {
|
||||
this.item.is_like = !this.item.is_like;
|
||||
this.$u.api.articleLike({
|
||||
article_id: this.item.article_id,
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if(res.errCode == 0) {
|
||||
this.$u.toast(res.message);
|
||||
this.$emit("getArticlelist");
|
||||
// this.$emit("getArticlelist");
|
||||
}
|
||||
})
|
||||
},
|
||||
// 收藏
|
||||
articleCollect() {
|
||||
this.item.is_collect = !this.item.is_collect;
|
||||
this.$u.api.articleCollect({
|
||||
article_id: this.item.article_id,
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if(res.errCode == 0) {
|
||||
this.$u.toast(res.message);
|
||||
this.$emit("getArticlelist");
|
||||
// this.$emit("getArticlelist");
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view id="info_title">
|
||||
<view>
|
||||
<view class="url_info" v-for="(item,index) in list" :key="index" @click="route_skip(index)">
|
||||
<view class="url_info" v-for="(item,index) in information" :key="index" @click="route_skip(index)">
|
||||
<image :src="item.url"></image>
|
||||
<text>{{item.text}}</text>
|
||||
</view>
|
||||
@@ -56,33 +56,15 @@
|
||||
props:['information'],
|
||||
name: "info_title",
|
||||
data() {
|
||||
|
||||
return {
|
||||
list: [{
|
||||
id: 0,
|
||||
url: '../../static/pageD/info(11).png',
|
||||
text: '公告/资讯'
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
url: '../../static/pageD/info(6).png',
|
||||
text: '活动消息'
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
url: '../../static/pageD/info(14).png',
|
||||
text: '交易物流'
|
||||
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
url: '../../static/pageD/info(15).png',
|
||||
text: '关注消息'
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
information(newVal, old) {
|
||||
console.log(newVal);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
// 点击顶部的标题模块跳转
|
||||
route_skip(index) {
|
||||
|
||||
@@ -187,19 +187,9 @@
|
||||
rgb.push(color)
|
||||
}
|
||||
return '#' + rgb.join('')
|
||||
},
|
||||
refreshToken_function(){
|
||||
this.$u.api.refreshToken({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.errCode == 0) {
|
||||
let token = res.data.token;
|
||||
uni.setStorageSync('token', token);//存储toke值
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.refreshToken_function();
|
||||
// 3秒倒计时调用
|
||||
this.remaining_time();
|
||||
this.apiwelcome();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="item" @click="toDetailsPage">
|
||||
<image class="head" :src="info.pintuan_image"></image>
|
||||
<image class="head" :src="info.pintuan_image" mode="widthFix"></image>
|
||||
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
|
||||
<view class="price">
|
||||
<view>¥{{ info.pintuan_goods_price }}</view>
|
||||
@@ -47,9 +47,9 @@ export default {
|
||||
width: 210rpx;
|
||||
overflow: hidden;
|
||||
.head{
|
||||
width: 210rpx;
|
||||
height: 131rpx;
|
||||
border-radius: 6rpx;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.title{
|
||||
display: inline-block;
|
||||
|
||||
Reference in New Issue
Block a user