| | |
| | | <view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view> |
| | | <view class="head-bar-nav" :style="{ height: navHeight + 'px' }" @click="openLoacing"> |
| | | <image src="/static/icon/home_ic_location@2x.png" mode="widthFix"></image> |
| | | <text>莲花科技创新产业园F座</text> |
| | | <text>{{position.formatted_addresses.recommend}}</text> |
| | | <u-icon name="arrow-right" color="#222222" size="13"></u-icon> |
| | | </view> |
| | | </view> |
| | |
| | | <u-scroll-list indicatorActiveColor="#004096"> |
| | | <view class="scroll-list"> |
| | | <view class="scroll-list__line" v-for="(item, index) in labels" :key="index"> |
| | | <view class="cate-item" v-for="(child, index) in item" :key="index"> |
| | | <view class="cate-item" v-for="(child, index) in item" :key="index" @click="jumpSearch(child, 1)"> |
| | | <view class="cate-item-image"> |
| | | <image :src="child.imgUrl" mode="widthFix"></image> |
| | | </view> |
| | |
| | | <u-scroll-list indicatorActiveColor="#004096"> |
| | | <view class="scroll-list" style="padding: 0;"> |
| | | <view class="scroll-list__line" v-for="(item, index) in brand" :key="index"> |
| | | <view class="cate-item1" v-for="(child, index) in item" :key="index"> |
| | | <view class="cate-item1" v-for="(child, index) in item" :key="index" @click="jumpSearch(child, 2)"> |
| | | <image :src="child.imgUrl" mode="widthFix"></image> |
| | | <text>{{child.name}}</text> |
| | | </view> |
| | |
| | | </u-scroll-list> |
| | | <view class="title"> |
| | | <view class="title-left">品质专区</view> |
| | | <view class="title-right"> |
| | | <view class="title-right" @click="toZhuanqu"> |
| | | <text>更多</text> |
| | | <u-icon name="arrow-right" color="#AAAAAA" size="10"></u-icon> |
| | | </view> |
| | |
| | | this.getGoodsList() |
| | | }, |
| | | methods: { |
| | | toZhuanqu() { |
| | | uni.navigateTo({ |
| | | url: '/pages/zhuanqu/zhuanqu' |
| | | }) |
| | | }, |
| | | addCard(e) { |
| | | this.$u.api.addCart({ |
| | | goodsId: e.id, |
| | |
| | | highAccuracyExpireTime: 3000, |
| | | isHighAccuracy: true, |
| | | success: function(addr) { |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | openLoacing() { |
| | | var that = this; |
| | | uni.chooseLocation({ |
| | | success(res1) { |
| | | const locParam = { |
| | | latitude: addr.latitude, |
| | | longitude: addr.longitude |
| | | latitude: res1.latitude, |
| | | longitude: res1.longitude |
| | | }; |
| | | console.log(locParam) |
| | | const qqmapsdk = new QQMapWX({ |
| | | key: 'HEIBZ-QJLLM-SZ36X-6ZBHI-S6Y2J-S6FND' |
| | | }); |
| | |
| | | qqmapsdk.reverseGeocoder({ |
| | | locParam, |
| | | success: function(res) { |
| | | console.log(res, '==================获取地址'); |
| | | console.log(res, '==================index获取地址') |
| | | that.$store.commit('setPosition', res.result) |
| | | }, |
| | | fail: (err) => { |
| | | console.error('获取位置失败===========', err); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | openLoacing() { |
| | | uni.chooseLocation({ |
| | | success(res) { |
| | | console.log(res) |
| | | jumpSearch(row, type) { |
| | | if (row) { |
| | | if (type === 1) { |
| | | uni.navigateTo({ |
| | | url: '/pages/search/search?categoryId=' + row.id |
| | | }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '/pages/search/search?applicableBrandId=' + row.id |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | jumpSearch() { |
| | | uni.navigateTo({ |
| | | url: '/pages/search/search' |
| | | }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '/pages/search/search' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | text { |
| | | max-width: 400rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #111111; |
| | | margin-right: 8rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | } |
| | | } |