修正错误

This commit is contained in:
luyuan 2020-07-31 09:40:06 +08:00
parent ee08038a64
commit b9b8384011
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
8 changed files with 272 additions and 14 deletions

View File

@ -291,6 +291,10 @@ export default {
appointment_time: appointment_time,
})
},
// 达人上架商品
goodsShelves({live_id}){
return vm.$u.post('Specialci/goodsShelves',{live_id})
}
}
}

View File

@ -76,11 +76,12 @@ export default {
this.$u.route({
url:"/pageB/zhibo/index",
params:{
url:this.url
url:this.url,
id:this.zid
}
})
}
},
props:['name','image','url']
props:['name','image','url','zid']
}
</script>

BIN
pageB/static/cart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -5,27 +5,161 @@
</video>
<view class="user" :style="{'top': top}">
<view class="back"></view>
<image class="head"></image>
<image class="head" :src="info.member_avatar"></image>
<view class="userinfo">
<text class="name">萨和登</text>
<text class="info">萨大赛大赛大赛大赛大</text>
<text class="name">{{info.member_nickname}}</text>
<text class="info">{{info.live_desc}}</text>
</view>
<view class="guanzhu"><text style="color:#fff;font-size:24rpx">关注</text></view>
<view class="guanzhu" @click="guanzhu"><text style="color:#fff;font-size:24rpx">{{info.is_attention == 1 ? '已关注' : '关注'}}</text></view>
</view>
<view class="userlist" :style="{'top': top + 10 * rpx}">
<image class="userlistitem" v-for="(i,j) in [0,2]" :style="{'right': (-j * 15 * rpx) + 'px'}"></image>
<image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}"></image>
</view>
<view class="hot" :style="{'top': top + 10 * rpx}">
<text class="hottext">2.8w</text>
</view>
<image class="cart" src="../../static/cart.png" @click="show = true">
</image>
<image class="liketap" src="../../static/like.png" @click="">
<image class="closeimg" src="../../static/close.png" :style="{'top': top + 30 * rpx}" @click="back"></image>
</image>
<div class="bottom" :style="{'height':height + 'px'}" v-if="show" @click="show = false">
<div class="tanchuceng" @click="zuzhi">
<div class="heads">
<div style="flex-direction: row;align-items:center">
<text class="title">全部商品</text>
<text class="num">{{list.length}}件</text>
</div>
<!-- <div class="add">
<text style="font-size:28rpx;color: #fff;text-align:center">添加/管理商品</text>
</div> -->
</div>
<list class="list">
<cell class="item" v-for="(i,j) in list" @click="xuanzhong(j)">
<image class="shopimg" :src="i.goods_image"></image>
<div class="infos">
<div>
<text style="font-size:26rpx;colro:#333;margin-top:12rpx;lines:1;text-overflow:ellipsis">{{i.goods_name}}</text>
<text style="font-size:24rpx;color:#333;margin-top:14rpx;lines:1;text-overflow:ellipsis">{{i.goods_advword}}</text>
</div>
<div style="flex-direction: row; align-items: flex-end;">
<text style="font-size:28rpx;color:#FF3131">¥{{i.goods_price}}</text>
<text style="font-size:26rpx;color:#999">¥{{i.goods_marketprice}}</text>
</div>
</div>
<!-- <image :src="'../../static/image/release/' + (i.putaway == 1 ? 'on' : 'off') + '.png'" style="width:55rpx;height:35rpx;margin-top:120rpx;margin-left:150rpx"></image> -->
</cell>
</list>
</div>
</div>
</view>
</template>
<style lang="scss" scoped>
.infos{
height: 160rpx;
justify-content: space-between;
margin-left: 10rpx;
width: 404rpx;
}
.shopimg{
width: 160rpx;
height: 160rpx;
background-color: #0f0;
}
.heads{
width: 750rpx;
height: 88rpx;
border-bottom-width: 2rpx;
border-style: solid;
border-color: #ECECEC;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.title{
font-size: 30rpx;
color:#333;
margin-left: 30rpx;
}
.tanchuceng{
width: 750rpx;
height: 782rpx;
position: fixed;
bottom: 0;
border-top-left-radius:20rpx;
border-top-left-radius:20rpx;
background-color: #fff;
transition: bottom 0.5s;
z-index: 20;
}
.item{
width: 690rpx;
height: 200rpx;
border-bottom-width: 2rpx;
border-style: solid;
border-color: #ECECEC;
display: flex;
flex-direction: row;
align-items: center;
}
.list{
width: 750rpx;
height: 694rpx;
padding-left: 30rpx;
padding-right: 30rpx;
}
.add{
width: 221rpx;
height: 40rpx;
background-color: #FF780F;
border-radius: 20rpx;
justify-content: center;
margin-right: 30rpx;
}
.num{
font-size: 26rpx;
color: #FF3131;
margin-left: 30rpx;
}
.bottom{
width: 750rpx;
position: fixed;
top:0;
z-index: 10;
}
.cart{
width: 50rpx;
height: 46rpx;
position: fixed;
bottom: 36rpx;
right: 154rpx;
}
.hottext{
font-size: 20rpx;
color: #fff;
}
.hot{
width: 60rpx;
height: 60rpx;
background-color: rgb(104, 104, 104);
position: fixed;
border-radius: 30rpx;
right: 86rpx;
align-items: center;
justify-content: center;
}
.userlistitem{
width: 60rpx;
height: 60rpx;
position: relative;
background-color: #0f0;
border-radius: 30rpx;
background-color: #0f0;
}
.userlist{
display: flex;
@ -69,7 +203,6 @@
width: 70rpx;
height: 70rpx;
border-radius: 35rpx;
background-color: #0f0;
}
.back {
position: absolute;
@ -95,6 +228,20 @@
.video {
width: 750rpx;
}
.liketap{
width: 55rpx;
height: 57rpx;
position: fixed;
bottom: 30rpx;
right: 54rpx;
}
.closeimg{
width: 31rpx;
height: 31rpx;
position: fixed;
right: 31rpx;
background-color: #0f0;
}
</style>
<script>
export default {
@ -104,11 +251,16 @@ export default {
url: "",
top: 0,
height: 0,
rpx:0
rpx:0,
show:false,
list:[],
id:0,
info:{}
};
},
onLoad(a) {
this.url = a.url;
this.id = a.id
console.log(this.url);
let that = this;
uni.getSystemInfo({
@ -121,6 +273,107 @@ export default {
console.log(that.rpx)
},
});
// this.$u.api.goodsShelves({live_id:this.id}).then((res)=>{
// console.log(res)
// })
const token = uni.getStorageSync('token');
console.log(token,that.id)
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/goodsShelves",
data:{
live_id:that.id
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
that.list= res.data.data
}
})
setInterval(function(){
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/goodsShelves",
data:{
live_id:that.id
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
that.list= res.data.data
}
})
},6 * 1000)
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo",
data:{
live_id:that.id
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
that.info = res.data.data
// that.list= res.data.data
}
})
},
methods:{
back(){
uni.navigateBack({
delta: 1
});
},
guanzhu(){
const token = uni.getStorageSync('token');
let that = this
console.log(token)
uni.request({
url:"https://dmmall.sdbairui.com/api/member/attentionMember",
data:{
member_id:that.info.user_id
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo",
data:{
live_id:that.id
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
that.info = res.data.data
// that.list= res.data.data
}
})
// that.list= res.data.data
}
})
},
xuanzhong(i){
let that = this
uni.navigateTo({
url: `/pageB/sdetails/index?id=${that.list[i].goods_id}&type=1`
});
},
zuzhi(event){
event.stopPropagation();
},
}
};
</script>

View File

@ -39,10 +39,10 @@
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code"></u-swiper>
<view class="list">
<view>
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :zid="item.live_id" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
</view>
<view style="margin-left:20rpx">
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :zid="item.live_id" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
</view>
</view>
</view>

BIN
static/cart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
static/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/like.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB