作者 倪静楠

2/25

... ... @@ -162,7 +162,7 @@
<image src="../../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image>
<text class="botText">消息</text>
<view class="num">
<view class="num" v-if="messageNum!==0">
{{messageNum>99?'99+':messageNum}}
</view>
</li>
... ...
... ... @@ -86,7 +86,7 @@
<li @click="goMessage" style="position: relative;">
<image src="../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image>
<text class="botText">消息</text>
<view class="num">
<view class="num" v-if="messageNum!==0">
{{messageNum>99?'99+':messageNum}}
</view>
</li>
... ...
... ... @@ -26,7 +26,8 @@
</view>
<image :src="item.avatar1" mode="" :class="item.datetime?'headImg1':'headImg'" v-if="item.type==1"></image>
<image :src="item.avatar1" mode="" :class="item.datetime?'headImg1':'headImg'" v-if="item.type==0"></image>
<view :class="item.type==1&&item.datetime?'leftContent1':item.type==1&&!item.datetime?'leftContent':item.type==0&&item.datetime?'rightContent1':'rightContent'" style="position: relative;">
<view :class="item.type==1&&item.datetime?'leftContent1':item.type==1&&!item.datetime?'leftContent':item.type==0&&item.datetime?'rightContent1':'rightContent'"
style="position: relative;">
{{item.content}}
<view class="" style="width: 20rpx;height: 20rpx;background-color: #fff;transform: rotate(45deg);position: absolute;top: 36rpx;left: -10rpx;"
v-if="item.type==1">
... ... @@ -435,12 +436,13 @@
.dateTime{
position: absolute;
top:-44rpx;
left: 44%;
left: 50%;
opacity: 1;
background: #cccccc;
border-radius: 16px;
padding: 0 30rpx;
font-size: 20rpx;
color: #fff;
transform: translate(-50%, 0);
}
</style>
... ...
... ... @@ -264,7 +264,7 @@
<li @click="goMessage" style="position: relative;">
<image src="../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image>
<text class="botText">消息</text>
<view class="num" >
<view class="num" v-if="messageNum!==0">
{{messageNum>99?'99+':messageNum}}
</view>
</li>
... ... @@ -401,6 +401,8 @@
success(r) {
uni.setStorageSync('lat', r.latitude)
uni.setStorageSync('lot', r.longitude)
wx.setStorageSync('nowLat', r.longitude)
wx.setStorageSync('nowLot', r.longitude)
uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1',
data: {
... ... @@ -408,7 +410,9 @@
location: (r.latitude + "," + r.longitude)
},
success: res => {
wx.setStorageSync('City', res.data.result.address_component.city)
wx.setStorageSync('City', res.data.result.address_component.district+ res.data.result.address_component.street)
wx.setStorageSync('nowAddres', res.data.result.address_component.district+ res.data.result.address_component.street)
if (that.addressText == '') {
if (uni.getStorageSync("City") == "") {
that.addressText = res.data.result.address_component.city
... ...
... ... @@ -8,7 +8,7 @@
{{item.name}}
</view>
<!-- <view class="secondBox" v-if="show&&!!secondList"> -->
<view class="secondBox" v-if="secondList.length>0">
<view class="secondBox" v-if="secondListShow">
<view :class="secondIndex==indexs?'secondItem activeSecond':'secondItem'" v-for="(items,indexs) in secondList"
:key="indexs" @click="selectSecond(indexs,items.id)">
{{items.name}}
... ... @@ -39,6 +39,7 @@
show: false, //二级分类
list: [], //一级分类
secondList: [], //二级分类
secondListShow:false,
secondId: '',
goodListLength: '',
//地图
... ... @@ -86,13 +87,11 @@
request.get('/api/index/cang', {
sort2_id:''
}).then(res => {
console.log(res)
that.goodListLength = res.data.length
let tempData = res.data;
that.goodList = res.data;
that.covers = [];
for (let obj of tempData) {
console.log(obj,'temp')
let tempInfo = JSON.parse(JSON.stringify(that.obj));
tempInfo.id = Number(obj.goods_id);
// tempInfo.callout.content = obj.goods_name;
... ... @@ -137,6 +136,9 @@
request.get('/api/push/fenLei', {
id: ids.id
}).then(res => {
if(res.data.info.length>0){
this.secondListShow=true
}
this.secondList = res.data.info
this.secondId=this.secondList[0].id
this.goodData()
... ... @@ -150,6 +152,7 @@
this.secondIndex = index;
this.secondId = id;
this.goodData()
this.secondListShow=false
},
//商品
goodData() {
... ...
... ... @@ -9,6 +9,14 @@
</view>
<input type="text" @input="keywordTyping" @blur="keywordTitle" placeholder="请输入地址" placeholder-class="placeholder-class" />
</view>
<view class="header">当前位置</view>
<view class="current">
<!-- <text @click="geoTapped">{{address}}</text>
<image @click="reloadCurrent" src="../../images/geo.png" /> -->
<view class="" @click="getNowAdd" style="color: #007AFF;">
{{nowAddres}}
</view>
</view>
<view class="header">历史位置</view>
<view class="current">
<!-- <text @click="geoTapped">{{address}}</text>
... ... @@ -46,9 +54,15 @@
},
onShow() {
this.getAdress()
this.nowAddres=uni.getStorageSync('nowAddres')
this.lat=uni.getStorageSync('nowLat')
this.lot=uni.getStorageSync('nowLot')
},
data() {
return {
nowAddres:'', //当前位置
lat:'', //当前维度
lot:'', //当前经度
list: [], //历史位置
qqmapsdk: '',
value: '',
... ... @@ -60,6 +74,12 @@
},
methods: {
//使用当前位置
getNowAdd(){
uni.redirectTo({
url: '/pages/index/index?address=' +this.nowAddres + '&lat=' + this.lat + '&lot=' + this.lot
})
},
//获取历史位置
getAdress() {
request.get('/api/index/addressList', {}).then(res => {
... ...
... ... @@ -159,7 +159,7 @@
<li @click="goMessage">
<image src="../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image>
<text class="botText">消息</text>
<text class="botText" >消息</text>
</li>
<li @click="goMe">
<image src="../../static/image/wode_icon_7@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image>
... ...
... ... @@ -108,7 +108,7 @@
<li @click="goMessage" style="position: relative;">
<image src="../../static/image/xioaxi_icon_1@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image>
<text class="botTextXX">消息</text>
<view class="num">
<view class="num" v-if="messageNum!==0">
{{messageNum>99?'99+':messageNum}}
</view>
</li>
... ...