更新
This commit is contained in:
parent
15265e8f87
commit
b0e2e385d0
@ -11,8 +11,8 @@ let httpApiFive
|
||||
let wsApi
|
||||
|
||||
// 在打包之前请检查当前环境是否正确
|
||||
// const env = 'dev'; // 开发
|
||||
const env = 'prod'; // 生产
|
||||
const env = 'dev'; // 开发
|
||||
// const env = 'prod'; // 生产
|
||||
// const env = 'prew'; // 预上线
|
||||
|
||||
switch (env) {
|
||||
|
@ -642,8 +642,8 @@
|
||||
this.longitude = e.longitude;
|
||||
this.latitude = e.latitude;
|
||||
this.$store.commit('setLocation', {
|
||||
lat: e.longitude,
|
||||
long: e.latitude,
|
||||
lat: e.latitude,
|
||||
long: e.longitude,
|
||||
});
|
||||
}
|
||||
this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code);
|
||||
|
@ -3,24 +3,13 @@
|
||||
<view class="circle_friends_wrapper">
|
||||
<view v-if="isFshow">
|
||||
<view class="site-box flex_a_c_j_sb" :style="{ opacity: backColor }">
|
||||
<view
|
||||
:class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']"
|
||||
@click="changeMap"
|
||||
>
|
||||
<view
|
||||
:class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']"
|
||||
style="margin-left: 20rpx"
|
||||
>
|
||||
<view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="changeMap">
|
||||
<view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']" style="margin-left: 20rpx">
|
||||
</view>
|
||||
<view class="town_name">{{ street||'定位中' }}</view>
|
||||
</view>
|
||||
<navigator
|
||||
url="/pages/chat/customer_list/index?type=0"
|
||||
hover-class="none"
|
||||
>
|
||||
<view
|
||||
:class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"
|
||||
></view>
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view>
|
||||
</navigator>
|
||||
</view>
|
||||
<!--<view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
|
||||
@ -34,7 +23,8 @@
|
||||
<view class="place_wrapper flex_a_c" @click="changeMap">
|
||||
<view class="iconfont icon-weizhi"></view>
|
||||
<view class="town_name">{{ street||'定位中' }}</view>
|
||||
<view class="town_name rotate-box" @click.stop="getPositionFn()"><uni-icons type="loop" color="#fff"></uni-icons></view>
|
||||
<view class="town_name rotate-box" @click.stop="getPositionFn()"><uni-icons type="loop"
|
||||
color="#fff"></uni-icons></view>
|
||||
<!-- <view class="" v-if="!street">
|
||||
获取定位失败,请手动选择
|
||||
</view> -->
|
||||
@ -42,23 +32,14 @@
|
||||
<!-- <view class="" @click="getPositionFn">
|
||||
获取定位失败,点击允许
|
||||
</view> -->
|
||||
<navigator
|
||||
url="/pages/chat/customer_list/index?type=0"
|
||||
hover-class="none"
|
||||
>
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view class="iconfont icon-xiaoxi" style="color: #fff"> </view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<zbpSwiper
|
||||
ref="list"
|
||||
:isSelectPlace="true"
|
||||
:town="street"
|
||||
:show="show"
|
||||
:location_Arr="locationArr"
|
||||
@change="dchange"
|
||||
>
|
||||
<zbpSwiper ref="list" :isSelectPlace="true" :town="street" :show="show" :location_Arr="locationArr"
|
||||
@change="dchange">
|
||||
</zbpSwiper>
|
||||
|
||||
<!-- <view class="zhibo" @click="zhibo">
|
||||
@ -73,15 +54,8 @@
|
||||
</view> -->
|
||||
|
||||
<view class="" style="width: 670rpx">
|
||||
<u-tabs
|
||||
:list="tabsData.list"
|
||||
@click="tabsChange"
|
||||
itemStyle=" height: 33px;"
|
||||
lineColor="#F84221"
|
||||
:current="current"
|
||||
keyName="cate_name"
|
||||
:activeStyle="activeStyle"
|
||||
></u-tabs>
|
||||
<u-tabs :list="tabsData.list" @click="tabsChange" itemStyle=" height: 33px;" lineColor="#F84221"
|
||||
:current="current" keyName="cate_name" :activeStyle="activeStyle"></u-tabs>
|
||||
</view>
|
||||
<view class="tabs_wrapper-img" @click="open">
|
||||
<image src="@/static/images/zk.png" mode=""></image>
|
||||
@ -91,35 +65,16 @@
|
||||
<view class="goodslist">
|
||||
<WaterfallsFlow :wfList="productList" @itemTap="itemTap" :type="1" />
|
||||
</view>
|
||||
<view
|
||||
class="loadingicon acea-row row-center-wrapper"
|
||||
v-if="productList.length > 0"
|
||||
>
|
||||
<text
|
||||
class="loading iconfont icon-jiazai"
|
||||
:hidden="loading == false"
|
||||
></text
|
||||
>{{ loadTitle }}
|
||||
<view class="loadingicon acea-row row-center-wrapper" v-if="productList.length > 0">
|
||||
<text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>{{ loadTitle }}
|
||||
</view>
|
||||
<view class="empty_wrapper" v-if="emptyShow">
|
||||
<u-empty
|
||||
:show="emptyShow"
|
||||
mode="list"
|
||||
icon="http://cdn.uviewui.com/uview/empty/list.png"
|
||||
></u-empty>
|
||||
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-picker
|
||||
:defaultIndex="[0, 0]"
|
||||
:show="showPicker"
|
||||
ref="uPicker"
|
||||
:columns="columnData"
|
||||
@confirm="confirm"
|
||||
@cancel="showPicker = false"
|
||||
@change="changeHandler"
|
||||
keyName="name"
|
||||
></u-picker>
|
||||
<u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
|
||||
<!-- <view class="bg_color"></view> -->
|
||||
|
||||
@ -142,24 +97,14 @@
|
||||
</view>
|
||||
<view class="classpage-two"> 点击进入分类 </view>
|
||||
<view class="classpage-three">
|
||||
<view
|
||||
class=""
|
||||
v-for="(item, i) in tabsData.list"
|
||||
:key="i"
|
||||
@click="tabsChange2(item, i)"
|
||||
>
|
||||
<view class="" v-for="(item, i) in tabsData.list" :key="i" @click="tabsChange2(item, i)">
|
||||
{{ item.cate_name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<authorize
|
||||
@onLoadFun="onLoadFun"
|
||||
:isAuto="isAuto"
|
||||
:isShowAuth="isShowAuth"
|
||||
@authColse="authColse"
|
||||
:isGoIndex="false"
|
||||
></authorize>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
|
||||
:isGoIndex="false"></authorize>
|
||||
<view class="location" v-if="isshow">
|
||||
<view class="locationa"> 位置权限使用说明 </view>
|
||||
<view class="locationb"> 用于向你推荐最近门店 </view>
|
||||
@ -169,40 +114,40 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
|
||||
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue'
|
||||
import authorize from '@/components/Authorize';
|
||||
import {
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
|
||||
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue'
|
||||
import authorize from '@/components/Authorize';
|
||||
import {
|
||||
getUserInfo
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
getSlideAPI
|
||||
} from '@/api/lihai.js'
|
||||
import {
|
||||
} from '@/api/lihai.js'
|
||||
import {
|
||||
graphicLstApi,
|
||||
getTopicList,
|
||||
graphicStartApi
|
||||
} from '@/api/community.js'
|
||||
import {
|
||||
} from '@/api/community.js'
|
||||
import {
|
||||
getIndexData,
|
||||
getDiy,
|
||||
getArticleList,
|
||||
getArticleCategoryLists
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
getGeocoder,
|
||||
merClassifly
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
getArea,
|
||||
getStreet
|
||||
} from '@/api/article.js';
|
||||
import {
|
||||
} from '@/api/article.js';
|
||||
import {
|
||||
Toast
|
||||
} from '@/libs/uniApi'
|
||||
export default {
|
||||
} from '@/libs/uniApi'
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper,
|
||||
@ -303,7 +248,7 @@ export default {
|
||||
onReachBottom() {
|
||||
|
||||
if (this.productList.length > 0) {
|
||||
this.$u.sleep(50).then(()=>{
|
||||
this.$u.sleep(50).then(() => {
|
||||
this.getGoods(false);
|
||||
})
|
||||
}
|
||||
@ -372,7 +317,7 @@ export default {
|
||||
methods: {
|
||||
getPositionFn() {
|
||||
this.street = '定位中'
|
||||
this.$store.commit('setLocation', {lat: null, long: null})
|
||||
this.$store.commit('setLocation', { lat: null, long: null })
|
||||
uni.removeStorageSync('RejectTarget')
|
||||
this.selfLocation()
|
||||
|
||||
@ -686,7 +631,7 @@ export default {
|
||||
this.isshow = true
|
||||
uni.setStorageSync('loction', true);
|
||||
}
|
||||
if(this.$store.state.storage.location.lat){
|
||||
if (this.$store.state.storage.location.lat) {
|
||||
this.isshow = false
|
||||
let latitude, longitude;
|
||||
latitude = this.$store.state.storage.location.lat.toString();
|
||||
@ -713,10 +658,9 @@ export default {
|
||||
// })
|
||||
this.uniLocation();
|
||||
})
|
||||
}
|
||||
else this.uniLocation();
|
||||
} else this.uniLocation();
|
||||
},
|
||||
uniLocation(){
|
||||
uniLocation() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
timeout: '1000',
|
||||
@ -853,19 +797,19 @@ export default {
|
||||
// #endif
|
||||
},
|
||||
// 选择位置
|
||||
changeMap(){
|
||||
changeMap() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/select_address/select_address_n`,
|
||||
success:()=> {
|
||||
uni.$once('changeAddress', (e)=>{
|
||||
success: () => {
|
||||
uni.$once('changeAddress', (e) => {
|
||||
// this.street_id = e.street.code;
|
||||
// this.street = e.street.name;
|
||||
if (e.longitude) {
|
||||
this.longitude = e.longitude;
|
||||
this.latitude = e.latitude;
|
||||
this.$store.commit('setLocation', {
|
||||
lat: e.longitude,
|
||||
long: e.latitude,
|
||||
lat: e.latitude,
|
||||
long: e.longitude,
|
||||
});
|
||||
}
|
||||
this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code);
|
||||
@ -874,26 +818,26 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
page {
|
||||
background-color: #f4f7fe;
|
||||
|
||||
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.zhibo {
|
||||
.zhibo {
|
||||
height: 130rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.location {
|
||||
.location {
|
||||
background-color: #f6f6f6;
|
||||
width: 680rpx;
|
||||
height: 150rpx;
|
||||
@ -919,22 +863,22 @@ page {
|
||||
color: #5a5a5a;
|
||||
}
|
||||
|
||||
.locationx{
|
||||
.locationx {
|
||||
color: #000;
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Circle_friends {
|
||||
.Circle_friends {
|
||||
position: relative;
|
||||
padding: 0 0 87.72rpx 0;
|
||||
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.classpage {
|
||||
.classpage {
|
||||
width: 100%;
|
||||
height: calc(100vh - 50px);
|
||||
background-color: #fff;
|
||||
@ -981,39 +925,39 @@ page {
|
||||
border: 2rpx solid #707070;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .bg-img {
|
||||
// position: absolute;
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// .bg-img {
|
||||
// position: absolute;
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
|
||||
// top: 0;
|
||||
// /* #ifdef MP || APP-PLUS */
|
||||
// z-index: -100;
|
||||
// /* #endif */
|
||||
// /* #ifdef H5 */
|
||||
// z-index: -100;
|
||||
// /* #endif */
|
||||
// z-index: -100;
|
||||
// filter: blur(0);
|
||||
// overflow: hidden;
|
||||
// top: 0;
|
||||
// /* #ifdef MP || APP-PLUS */
|
||||
// z-index: -100;
|
||||
// /* #endif */
|
||||
// /* #ifdef H5 */
|
||||
// z-index: -100;
|
||||
// /* #endif */
|
||||
// z-index: -100;
|
||||
// filter: blur(0);
|
||||
// overflow: hidden;
|
||||
|
||||
// img {
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// filter: blur(30rpx);
|
||||
// transform: scale(1.5);
|
||||
// }
|
||||
// }
|
||||
// img {
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// filter: blur(30rpx);
|
||||
// transform: scale(1.5);
|
||||
// }
|
||||
// }
|
||||
|
||||
.sitebox {
|
||||
.sitebox {
|
||||
animation-name: fadeIn;
|
||||
animation-duration: 3s;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
@ -1021,9 +965,9 @@ page {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.site-box1 {
|
||||
.site-box1 {
|
||||
width: 706rpx;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
height: 160rpx;
|
||||
@ -1053,9 +997,9 @@ page {
|
||||
.iconfont {
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.site-box {
|
||||
.site-box {
|
||||
width: 100%;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
height: 160rpx;
|
||||
@ -1099,40 +1043,40 @@ page {
|
||||
font-size: 30rpx;
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.circle_friends_wrapper {
|
||||
.circle_friends_wrapper {
|
||||
position: relative;
|
||||
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/.u-tabs__wrapper__nav__line {
|
||||
/deep/.u-tabs__wrapper__nav__line {
|
||||
width: 46rpx;
|
||||
margin-left: -2rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/.u-tabs__wrapper__nav__item {
|
||||
/deep/.u-tabs__wrapper__nav__item {
|
||||
// padding: 0 0px;
|
||||
padding-left: 0rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search_wrapper {
|
||||
.search_wrapper {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs_wrapper {
|
||||
.tabs_wrapper {
|
||||
width: 720rpx;
|
||||
|
||||
margin: 0 auto;
|
||||
margin-bottom: 21.05rpx;
|
||||
// margin-left: -20rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs_wrapper-img {
|
||||
.tabs_wrapper-img {
|
||||
width: 40rpx;
|
||||
height: 60rpx;
|
||||
position: absolute;
|
||||
@ -1147,15 +1091,15 @@ page {
|
||||
height: 40rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty_wrapper {
|
||||
.empty_wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.article_box {
|
||||
.article_box {
|
||||
height: 100%;
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
@ -1206,9 +1150,9 @@ page {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabs_wrapper {
|
||||
.tabs_wrapper {
|
||||
width: 723rpx;
|
||||
margin: 0rpx auto;
|
||||
margin-bottom: 21.05rpx;
|
||||
@ -1226,15 +1170,15 @@ page {
|
||||
margin-right: 7.02rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goodslist {
|
||||
.goodslist {
|
||||
// display: flex;
|
||||
margin: 0 auto;
|
||||
width: 725rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.goods {
|
||||
.goods {
|
||||
margin: 0 auto;
|
||||
width: 725rpx;
|
||||
|
||||
@ -1453,13 +1397,14 @@ page {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.rotate-box {
|
||||
}
|
||||
|
||||
.rotate-box {
|
||||
transform: rotate(0deg);
|
||||
transition: transform .5s ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
.rotate-box:active {
|
||||
.rotate-box:active {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -96,7 +96,7 @@
|
||||
<view class='pictrue' style="margin: 0 auto;">
|
||||
<!-- <image src='../../../static/images/noCart.png'></image> -->
|
||||
<image src='@/static/images/no_short.png'></image>
|
||||
<text>暂无商品,切换其他分类或地区试试</text>
|
||||
<text>暂无商品, 试试其他分类/位置</text>
|
||||
</view>
|
||||
</view>
|
||||
<block>
|
||||
@ -398,6 +398,12 @@
|
||||
type: 2
|
||||
})
|
||||
this.cloudList = data;
|
||||
this.cloudList.unshift({
|
||||
cate_name: '全部',
|
||||
children: [],
|
||||
pic: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/de2be202312151001024597.png",
|
||||
store_category_id: -1
|
||||
})
|
||||
this.cloudList.forEach((item)=>{
|
||||
item.children.unshift({
|
||||
cate_name: '全部',
|
||||
@ -732,7 +738,8 @@
|
||||
page: this.storeParam.page,
|
||||
location: this.latitude+','+this.longitude,
|
||||
}
|
||||
if(!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // 全部是查询一级分类pid
|
||||
if(this.storeParam.category_id==-1) null;
|
||||
else if(!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // 全部是查询一级分类pid
|
||||
else query.category_id = this.storeParam.category_id; // 否则查询二级分类
|
||||
townCloud(query).then(res => {
|
||||
this.goodsList = [...this.goodsList, ...res.data.list]
|
||||
@ -821,8 +828,8 @@
|
||||
this.longitude = e.longitude;
|
||||
this.latitude = e.latitude;
|
||||
this.$store.commit('setLocation', {
|
||||
lat: e.longitude,
|
||||
long: e.latitude,
|
||||
lat: e.latitude,
|
||||
long: e.longitude,
|
||||
});
|
||||
}
|
||||
this.getStoreList(true);
|
||||
|
@ -92,7 +92,7 @@
|
||||
<view class='pictrue' style="margin: 0 auto;">
|
||||
<!-- <image src='../../../static/images/noCart.png'></image> -->
|
||||
<image src='@/static/images/no_short.png'></image>
|
||||
<text>暂无商品,切换其他分类或地区试试</text>
|
||||
<text>暂无商品, 试试其他分类/位置</text>
|
||||
</view>
|
||||
</view>
|
||||
<block>
|
||||
@ -395,6 +395,18 @@
|
||||
type: 2
|
||||
})
|
||||
this.cloudList = data;
|
||||
this.cloudList.unshift({
|
||||
cate_name: '全部',
|
||||
children: [],
|
||||
pic: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/de2be202312151001024597.png",
|
||||
store_category_id: -1
|
||||
})
|
||||
this.cloudList.forEach((item)=>{
|
||||
item.children.unshift({
|
||||
cate_name: '全部',
|
||||
store_category_id: item.store_category_id,
|
||||
});
|
||||
})
|
||||
this.merchant = this.cloudList[0];
|
||||
this.merchantTow = this.merchant?.children[0];
|
||||
this.storeParam.category_id = this.merchantTow.store_category_id;
|
||||
@ -716,14 +728,20 @@
|
||||
this.storeParam.page = 1;
|
||||
this.goodsList = [];
|
||||
}
|
||||
cloudWarehouse({
|
||||
let query = {
|
||||
street_code: this.street_id,
|
||||
category_id: this.storeParam.category_id,
|
||||
// category_id: this.storeParam.category_id,
|
||||
order: this.storeParam.order,
|
||||
keyword: this.storeParam.keyword,
|
||||
page: this.storeParam.page,
|
||||
location: this.latitude+','+this.longitude,
|
||||
}).then(res => {
|
||||
}
|
||||
if(this.storeParam.category_id==-1){
|
||||
delete query.category_id;
|
||||
}
|
||||
else if(!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // 全部是查询一级分类pid
|
||||
else query.category_id = this.storeParam.category_id; // 否则查询二级分类
|
||||
cloudWarehouse(query).then(res => {
|
||||
// res.data.list = res.data.list.map(item=>{
|
||||
// item.product = item;
|
||||
// return item;
|
||||
@ -815,8 +833,8 @@
|
||||
this.longitude = e.longitude;
|
||||
this.latitude = e.latitude;
|
||||
this.$store.commit('setLocation', {
|
||||
lat: e.longitude,
|
||||
long: e.latitude,
|
||||
lat: e.latitude,
|
||||
long: e.longitude,
|
||||
});
|
||||
}
|
||||
this.getStoreList(true);
|
||||
|
@ -102,7 +102,7 @@
|
||||
<view class='pictrue' style="margin: 0 auto;background-color: #F5F5F5;">
|
||||
<!-- <image src='../../../static/images/noCart.png'></image> -->
|
||||
<image src='@/static/images/no_short.png'></image>
|
||||
<text>暂无店铺,切换其他位置试试</text>
|
||||
<text>暂无店铺,试试其他分类/位置</text>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="storeParam.is_recommend">
|
||||
@ -354,6 +354,11 @@
|
||||
this.storeList = [];
|
||||
merClassifly().then(res => {
|
||||
this.menuList = res.data;
|
||||
this.menuList.unshift({
|
||||
merchant_category_id: -1,
|
||||
category_name: '全部',
|
||||
background: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/de2be202312151001024597.png'
|
||||
})
|
||||
this.merchant_category_id = this.menuList[0].merchant_category_id;
|
||||
this.storeParam.merchant_category_id = this.merchant_category_id;
|
||||
if (this.mer_location == 1) {
|
||||
@ -713,7 +718,8 @@
|
||||
type_id: this.storeParam.type_id,
|
||||
credit_buy: this.credit_buy,
|
||||
}
|
||||
rqData.street_id = this.storeParam.street_id
|
||||
rqData.street_id = this.storeParam.street_id;
|
||||
if(rqData.merchant_category_id==-1) delete rqData.merchant_category_id;
|
||||
if (this.latitude) {
|
||||
rqData.location = this.latitude + ',' + this.longitude
|
||||
}
|
||||
@ -877,8 +883,8 @@
|
||||
this.longitude = e.longitude;
|
||||
this.latitude = e.latitude;
|
||||
this.$store.commit('setLocation', {
|
||||
lat: e.longitude,
|
||||
long: e.latitude,
|
||||
lat: e.latitude,
|
||||
long: e.longitude,
|
||||
});
|
||||
}
|
||||
this.storeMerchantList();
|
||||
|
@ -248,6 +248,7 @@
|
||||
latitude: this.latitude,
|
||||
longitude: this.longitude
|
||||
}
|
||||
console.log({...obj});
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
uni.$emit('changeAddress', obj)
|
||||
|
@ -132,7 +132,7 @@
|
||||
<block v-else>
|
||||
<view style="display: flex;flex-direction: column;align-items: center;">
|
||||
<image src='@/static/images/no_short.png' style="width: 500rpx; height: 180rpx;"></image>
|
||||
<text class="pictrue_tips">暂无商品,切换其他位置试试</text>
|
||||
<text class="pictrue_tips">暂无商品,试试其他位置</text>
|
||||
</view>
|
||||
<view class="common-hd">
|
||||
<view class="title">为你推荐</view>
|
||||
@ -708,8 +708,8 @@ import { data } from '../../uni_modules/uview-ui/libs/mixin/mixin';
|
||||
this.longitude = e.longitude;
|
||||
this.latitude = e.latitude;
|
||||
this.$store.commit('setLocation', {
|
||||
lat: e.longitude,
|
||||
long: e.latitude,
|
||||
lat: e.latitude,
|
||||
long: e.longitude,
|
||||
});
|
||||
}
|
||||
this.loadend = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user