| | |
| | | </view> |
| | | </view> |
| | | <view class="search" @click="jumpSearch"> |
| | | <u-search placeholder="请输入商 品名称搜索" disabled height="36" searchIconColor="#999999" borderColor="#eeeeee" |
| | | <u-search placeholder="请输入商品名称搜索" disabled height="36" searchIconColor="#999999" borderColor="#eeeeee" |
| | | bgColor="rgba(255,255,255,0.9)" :showAction="false" /> |
| | | </view> |
| | | <view class="banner"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="commodity-item-shou"> |
| | | <text>已售{{item.saleNum + item.realSaleNum}}</text> |
| | | <<<<<<< HEAD |
| | | <text>已售{{item.shou}}</text> |
| | | ======= |
| | | <text>已售{{(item.saleNum||0) + (item.realSaleNum||0)}}</text> |
| | | >>>>>>> 7b09a9950f13521190a4aef9bbc2a6163445566c |
| | | <view class="commodity-item-shou-add" @click.stop="addCard(item)">+</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="dingwei" v-if="isShow"> |
| | | <view class="dingwei" v-if="!position"> |
| | | <view class="dingwei-left"> |
| | | <text>未授权定位</text> |
| | | <text>未获取定位信息</text> |
| | | <text>我们无法获得您当前位置信息为您推荐附近经销商</text> |
| | | </view> |
| | | <view class="dingwei-btn" @click="goToAppSetting">开启定位</view> |
| | |
| | | data() { |
| | | return { |
| | | list: [], |
| | | labels: [ |
| | | [], |
| | | [] |
| | | ], |
| | | brand: [ |
| | | [], |
| | | [], |
| | | ], |
| | | labels: [], |
| | | brand: [], |
| | | specialZone: [], |
| | | goodsList: [], |
| | | page: 1, |
| | |
| | | if (res.code === 200) { |
| | | res.data.records.forEach(item => { |
| | | item.minPrice = item.minPrice.toFixed(2).split('.') |
| | | item.shou = (item.salenum || 0) + (item.realSaleNum || 0) |
| | | }) |
| | | this.goodsList.push(...res.data.records) |
| | | this.page++ |
| | |
| | | openLoacing() { |
| | | var that = this; |
| | | uni.chooseLocation({ |
| | | success(res1) { |
| | | const locParam = { |
| | | latitude: res1.latitude, |
| | | longitude: res1.longitude |
| | | }; |
| | | const qqmapsdk = new QQMapWX({ |
| | | key: 'HEIBZ-QJLLM-SZ36X-6ZBHI-S6Y2J-S6FND' |
| | | }); |
| | | // 腾讯地图逆地理编码 |
| | | qqmapsdk.reverseGeocoder({ |
| | | locParam, |
| | | success: function(res) { |
| | | console.log(res, '==================index获取地址') |
| | | console.log(locParam) |
| | | that.$store.commit('setPosition', res.result) |
| | | success(res) { |
| | | let obj = { |
| | | formatted_addresses: { |
| | | recommend: res.name |
| | | }, |
| | | fail: (err) => { |
| | | console.error('获取位置失败===========', err); |
| | | location: { |
| | | lat: res.latitude, |
| | | lng: res.longitude |
| | | } |
| | | }); |
| | | } |
| | | that.$store.commit('setPosition', obj) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | image { |
| | | width: 100%; |
| | | width: 100%; |
| | | height: 330rpx; |
| | | } |
| | | } |
| | | |
| | |
| | | box-sizing: border-box; |
| | | |
| | | .commodity-item-box-title { |
| | | width: 100%; |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 2; |
| | | overflow: hidden; |
| | | font-weight: 600; |
| | | font-size: 30rpx; |
| | | color: #222222; |