作者 倪静楠

2/26

... ... @@ -325,17 +325,29 @@
margin-right: 12rpx;
}
.goodImg {
.goodsPic {
width: 330rpx;
height: 282rpx;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
border-radius: 16rpx 16rpx 0rpx 0rpx;
}
.goodsPic image{
width: 100%;
}
.goodsDel {
margin-top: 16rpx;
font-size: 28rpx;
box-sizing: border-box;
padding: 0 18rpx;
margin-top: 16rpx;
font-size: 28rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0 18rpx;
max-width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.goodsPrice {
... ... @@ -414,12 +426,12 @@
}
.addressMask {
width: 250rpx;
width:100%;
height: 44rpx;
display: flex;
padding: 0 10rpx;
box-sizing: border-box;
opacity: 0.4;
opacity: 0.8;
background: #323233;
position: absolute;
top: 240rpx;
... ... @@ -428,7 +440,7 @@
}
.addressMask image {
width: 40rpx;
width: 30rpx;
height: 28rpx;
margin-right: 6rpx;
}
... ...
... ... @@ -72,7 +72,7 @@
<view class="sendBtn" v-if="inputText!==''" @click="send">
发送
</view>
<view class="sendBtn1" v-if="inputText==''" >
<view class="sendBtn1" v-if="inputText==''" style="margin-left: 20rpx;">
发送
</view>
</view>
... ...
... ... @@ -2,7 +2,7 @@
<view>
<view class="">
<scroll-view scroll-x="true" class="scroll">
<view class="scrollItem">
<view class="scrollItems">
<view :class="indexs==index?'active Item':'Item'" v-for="(item,index) in list" :key="index" @click="selectItem(item.id,index)">
{{item.name}}
</view>
... ... @@ -161,9 +161,10 @@
display: flex;
}
.scrollItem {
.scrollItems {
display: flex;
flex-wrap: nowrap;
width: auto !important;
}
.Item {
... ...
<template>
<view :class="shareBj||haibao?'minHeight':''" style="min-height: 100%;background-color: #F7F8FA;padding-top: 32rpx;box-sizing: border-box;">
<view class="goodDetailsBox" v-if="detailData">
<view class="goodDetailsBox" v-if="detailData.user.avatar">
<view class="detailsLeftBox" @click="goUserPage">
<image :src="detailData.user.avatar" mode="aspectFill"></image>
</view>
... ... @@ -128,9 +128,9 @@
<view class="maskAddress">
{{item.address}}
</view>
<!-- <view class="maskAddress">
{{item.dis}}km
</view> -->
<view class="maskAddress">
{{item.dis.toFixed(1)}}km
</view>
</view>
</view>
</view>
... ... @@ -155,8 +155,8 @@
</view>
</uni-popup>
<view class="btnBox" style="">
<view class="btnItem">
<view class="iconfont icon-fenxiang1" @click="open"></view>
<view class="btnItem" @click="open">
<view class="iconfont icon-fenxiang1"></view>
分享
</view>
<view class="btnItem" @click="collect">
... ... @@ -215,10 +215,13 @@
onLoad(options) {
this.id = options.id
this.goods_id = options.goos_id
if (options.id != undefined) {
this.needsDetail()
console.log(options,'optionss')
if (options.id==="undefined" || !options.id) {
console.log('111111111111111')
this.goodsDetail()
} else {
this.goodsDetail()
console.log('2222222222222222')
this.needsDetail()
}
},
... ... @@ -226,7 +229,7 @@
return {
token: false,
pageNum: 1,
id: '',
id: -1,
goods_id: '',
index: '', //tabIndex
classifyId: '', //商品一级分类
... ... @@ -256,16 +259,17 @@
},
//分享
onShareAppMessage: function(e) {
let title = '快来和我一起体验吧!'
let that =this
let title = '最火社区闲置二手信息平台'
return {
title: title,
path: '/pages/index/index?userId=' + uni.getStorageSync('userInfo').id
path: '/pages/index/good-details?userId=' + uni.getStorageSync('userInfo').id+'&goos_id='+that.goods_id+'&id='+that.id
}
},
onShareTimeline() {
let that = this
return {
title: '快来和我一起体验吧!',
title: '最火社区闲置二手信息平台',
query: 'goods_id=' + that.goos_id + '&id=' + that.id,
imageUrl: 'http://123.png',
}
... ... @@ -411,8 +415,8 @@
//发布商品详情
goodsDetail() {
request.get('/api/goods/maiDetail', {
lat2: uni.getStorageSync('lat'),
lng2: uni.getStorageSync('lot'),
lat2: uni.getStorageSync('lat')? uni.getStorageSync('lat'):'',
lng2: uni.getStorageSync('lot')? uni.getStorageSync('lot'):'',
goods_id: this.goods_id
}).then(res => {
this.detailData = res.data
... ...
... ... @@ -144,7 +144,7 @@
<view class="goodsBox" v-for="(item,index) in goodsList" :key="index" style="width: 330rpx; background: #fff; margin-bottom: 24rpx;padding-bottom: 18rpx;position: relative;border-radius: 16rpx 16rpx 0 0;"
@click="goGoodDetailXz(item.goods_id)">
<view class="goodsPic">
<image :src="item.images[0]" mode="" class="goodImg"></image>
<image :src="item.images[0]" class="goodImg" mode="aspectFill"></image>
</view>
<view class="goodsDel">
{{item.goods_name}}
... ... @@ -156,10 +156,10 @@
<view class="userInfo">
<view class="userLeft">
<view class="userHead">
<image :src="item.user.avatar" mode="" class="userHead"></image>
<image :src="item.user.avatar" class="userHead"></image>
</view>
<view class="userName">
{{item.user.nickname}}
{{item.user.nickname||''}}
</view>
</view>
<view class="userRight" style="display: flex;align-items: center;">
... ... @@ -172,12 +172,12 @@
</view>
<view class="addressMask">
<image src="/static/image/dingwei_icon_1@2x.png" mode=""></image>
<view class="maskAddress" style="max-width: 204rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<view class="maskAddress" style="max-width: 192rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
{{item.address}}
</view>
<!-- <view class="maskAddress">
{{item.distance}}km
</view> -->
<view class="maskAddress">
{{item.distance.toFixed(1)}}km
</view>
</view>
</view>
</view>
... ... @@ -188,7 +188,7 @@
<view class="goodsBox" v-for="(item,index) in goodsList1" :key="index" style="width: 330rpx; background: #fff; margin-bottom: 24rpx;padding-bottom: 18rpx;position: relative;border-radius: 16rpx 16rpx 0 0;"
@click="goGoodDetailFx(item.id)">
<view class="goodsPic">
<image :src="item.images[0]" mode="" class="goodImg"></image>
<image :src="item.images[0]" mode="" class="goodImg" mode="aspectFit"></image>
</view>
<view class="goodsDel">
{{item.need_name}}
... ... @@ -217,12 +217,12 @@
</view>
<view class="addressMask">
<image src="/static/image/dingwei_icon_1@2x.png" mode=""></image>
<view class="maskAddress" style="max-width: 204rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<view class="maskAddress" style="max-width: 192rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
{{item.address}}
</view>
<!-- <view class="maskAddress">
{{item.distance.toFixed(2)}}km
</view> -->
<view class="maskAddress">
{{item.distance.toFixed(1)}}km
</view>
</view>
</view>
</view>
... ...
... ... @@ -115,12 +115,12 @@
</view>
<view class="addressMask">
<image src="/static/image/dingwei_icon_1@2x.png" mode=""></image>
<view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<view class="maskAddress" style="max-width: 192rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
{{item.address}}
</view>
<!-- <view class="maskAddress">
{{item.dis}}km
</view> -->
<view class="maskAddress">
{{item.dis.toFixed(1)}}km
</view>
</view>
</view>
... ... @@ -154,12 +154,12 @@
</view>
<view class="addressMask">
<image src="/static/image/dingwei_icon_1@2x.png" mode=""></image>
<view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<view class="maskAddress" style="max-width: 192rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
{{item.address}}
</view>
<!-- <view class="maskAddress">
{{item.dis}}km
</view> -->
<view class="maskAddress">
{{item.dis.toFixed(1)}}km
</view>
</view>
</view>
... ... @@ -278,7 +278,9 @@
url: '/pages/index/good-details?goos_id=' + id
})
}
// uni.navigateTo({
// url: '/pages/index/good-details?goos_id=' + id
// })
},
//
tabchange(index) {
... ...
... ... @@ -25,7 +25,7 @@
<view class="mesBavRow" v-for="(item,index) in AnList" :key="index" @click="messageDetail(item.type,item.user_id)">
<view class="mesBavRowImg" style="position: relative;">
<image :src="item.user.avatar" style="width: 80rpx;height: 80rpx;border-radius: 50%;" mode=""></image>
<view class="redCircle" v-if="item.is_read==0">
<view class="redCircle" v-if="item.news.is_read==0">
</view>
</view>
... ...