| | |
| | | </view> |
| | | </view> |
| | | <view class="commodity-item-shou"> |
| | | <text>已售{{item.saleNum + item.realSaleNum}}</text> |
| | | <text>已售{{item.shou}}</text> |
| | | <view class="commodity-item-shou-add" @click.stop="addCard(item)">+</view> |
| | | </view> |
| | | </view> |
| | |
| | | data() { |
| | | return { |
| | | list: [], |
| | | labels: [ |
| | | [], |
| | | [] |
| | | ], |
| | | brand: [ |
| | | [], |
| | | [], |
| | | ], |
| | | labels: [], |
| | | brand: [], |
| | | specialZone: [], |
| | | goodsList: [], |
| | | page: 1, |
| | |
| | | }, |
| | | jumpShopZ(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/special-zone/special-zone?qualityId=' + item.id |
| | | url: '/pages/special-zone/special-zone?qualityId=' + item.id+'&title='+item.name |
| | | }) |
| | | }, |
| | | // 轮播图 |
| | |
| | | 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) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | 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; |