This commit is contained in:
weipengfei 2023-12-15 18:40:50 +08:00
parent 15265e8f87
commit b0e2e385d0
8 changed files with 1254 additions and 1277 deletions

View File

@ -11,8 +11,8 @@ let httpApiFive
let wsApi let wsApi
// 在打包之前请检查当前环境是否正确 // 在打包之前请检查当前环境是否正确
// const env = 'dev'; // 开发 const env = 'dev'; // 开发
const env = 'prod'; // 生产 // const env = 'prod'; // 生产
// const env = 'prew'; // 预上线 // const env = 'prew'; // 预上线
switch (env) { switch (env) {

View File

@ -642,8 +642,8 @@
this.longitude = e.longitude; this.longitude = e.longitude;
this.latitude = e.latitude; this.latitude = e.latitude;
this.$store.commit('setLocation', { this.$store.commit('setLocation', {
lat: e.longitude, lat: e.latitude,
long: e.latitude, long: e.longitude,
}); });
} }
this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code); this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code);

View File

@ -3,24 +3,13 @@
<view class="circle_friends_wrapper"> <view class="circle_friends_wrapper">
<view v-if="isFshow"> <view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{ opacity: backColor }"> <view class="site-box flex_a_c_j_sb" :style="{ opacity: backColor }">
<view <view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="changeMap">
:class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" <view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']" style="margin-left: 20rpx">
@click="changeMap"
>
<view
:class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']"
style="margin-left: 20rpx"
>
</view> </view>
<view class="town_name">{{ street||'定位中' }}</view> <view class="town_name">{{ street||'定位中' }}</view>
</view> </view>
<navigator <navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
url="/pages/chat/customer_list/index?type=0" <view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view>
hover-class="none"
>
<view
:class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"
></view>
</navigator> </navigator>
</view> </view>
<!--<view class="site-box ','flex_a_c_j_sb'" v-if="ishshow"> <!--<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="place_wrapper flex_a_c" @click="changeMap">
<view class="iconfont icon-weizhi"></view> <view class="iconfont icon-weizhi"></view>
<view class="town_name">{{ street||'定位中' }}</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 class="" v-if="!street">
获取定位失败,请手动选择 获取定位失败,请手动选择
</view> --> </view> -->
@ -42,23 +32,14 @@
<!-- <view class="" @click="getPositionFn"> <!-- <view class="" @click="getPositionFn">
获取定位失败,点击允许 获取定位失败,点击允许
</view> --> </view> -->
<navigator <navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
url="/pages/chat/customer_list/index?type=0"
hover-class="none"
>
<view class="iconfont icon-xiaoxi" style="color: #fff"> </view> <view class="iconfont icon-xiaoxi" style="color: #fff"> </view>
</navigator> </navigator>
</view> </view>
</view> </view>
<zbpSwiper <zbpSwiper ref="list" :isSelectPlace="true" :town="street" :show="show" :location_Arr="locationArr"
ref="list" @change="dchange">
:isSelectPlace="true"
:town="street"
:show="show"
:location_Arr="locationArr"
@change="dchange"
>
</zbpSwiper> </zbpSwiper>
<!-- <view class="zhibo" @click="zhibo"> <!-- <view class="zhibo" @click="zhibo">
@ -73,15 +54,8 @@
</view> --> </view> -->
<view class="" style="width: 670rpx"> <view class="" style="width: 670rpx">
<u-tabs <u-tabs :list="tabsData.list" @click="tabsChange" itemStyle=" height: 33px;" lineColor="#F84221"
:list="tabsData.list" :current="current" keyName="cate_name" :activeStyle="activeStyle"></u-tabs>
@click="tabsChange"
itemStyle=" height: 33px;"
lineColor="#F84221"
:current="current"
keyName="cate_name"
:activeStyle="activeStyle"
></u-tabs>
</view> </view>
<view class="tabs_wrapper-img" @click="open"> <view class="tabs_wrapper-img" @click="open">
<image src="@/static/images/zk.png" mode=""></image> <image src="@/static/images/zk.png" mode=""></image>
@ -91,35 +65,16 @@
<view class="goodslist"> <view class="goodslist">
<WaterfallsFlow :wfList="productList" @itemTap="itemTap" :type="1" /> <WaterfallsFlow :wfList="productList" @itemTap="itemTap" :type="1" />
</view> </view>
<view <view class="loadingicon acea-row row-center-wrapper" v-if="productList.length > 0">
class="loadingicon acea-row row-center-wrapper" <text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>{{ loadTitle }}
v-if="productList.length > 0"
>
<text
class="loading iconfont icon-jiazai"
:hidden="loading == false"
></text
>{{ loadTitle }}
</view> </view>
<view class="empty_wrapper" v-if="emptyShow"> <view class="empty_wrapper" v-if="emptyShow">
<u-empty <u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
:show="emptyShow"
mode="list"
icon="http://cdn.uviewui.com/uview/empty/list.png"
></u-empty>
</view> </view>
</view> </view>
<u-picker <u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
:defaultIndex="[0, 0]" @cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
:show="showPicker"
ref="uPicker"
:columns="columnData"
@confirm="confirm"
@cancel="showPicker = false"
@change="changeHandler"
keyName="name"
></u-picker>
<!-- <view class="bg_color"></view> --> <!-- <view class="bg_color"></view> -->
@ -142,24 +97,14 @@
</view> </view>
<view class="classpage-two"> 点击进入分类 </view> <view class="classpage-two"> 点击进入分类 </view>
<view class="classpage-three"> <view class="classpage-three">
<view <view class="" v-for="(item, i) in tabsData.list" :key="i" @click="tabsChange2(item, i)">
class=""
v-for="(item, i) in tabsData.list"
:key="i"
@click="tabsChange2(item, i)"
>
{{ item.cate_name }} {{ item.cate_name }}
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<authorize <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
@onLoadFun="onLoadFun" :isGoIndex="false"></authorize>
:isAuto="isAuto"
:isShowAuth="isShowAuth"
@authColse="authColse"
:isGoIndex="false"
></authorize>
<view class="location" v-if="isshow"> <view class="location" v-if="isshow">
<view class="locationa"> 位置权限使用说明 </view> <view class="locationa"> 位置权限使用说明 </view>
<view class="locationb"> 用于向你推荐最近门店 </view> <view class="locationb"> 用于向你推荐最近门店 </view>
@ -169,40 +114,40 @@
</template> </template>
<script> <script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue' import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue'
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { import {
getUserInfo getUserInfo
} from '@/api/user.js'; } from '@/api/user.js';
import { import {
getSlideAPI getSlideAPI
} from '@/api/lihai.js' } from '@/api/lihai.js'
import { import {
graphicLstApi, graphicLstApi,
getTopicList, getTopicList,
graphicStartApi graphicStartApi
} from '@/api/community.js' } from '@/api/community.js'
import { import {
getIndexData, getIndexData,
getDiy, getDiy,
getArticleList, getArticleList,
getArticleCategoryLists getArticleCategoryLists
} from '@/api/api.js' } from '@/api/api.js'
import { import {
getGeocoder, getGeocoder,
merClassifly merClassifly
} from '@/api/store.js'; } from '@/api/store.js';
import { import {
getArea, getArea,
getStreet getStreet
} from '@/api/article.js'; } from '@/api/article.js';
import { import {
Toast Toast
} from '@/libs/uniApi' } from '@/libs/uniApi'
export default { export default {
components: { components: {
mTabbar, mTabbar,
zbpSwiper, zbpSwiper,
@ -303,7 +248,7 @@ export default {
onReachBottom() { onReachBottom() {
if (this.productList.length > 0) { if (this.productList.length > 0) {
this.$u.sleep(50).then(()=>{ this.$u.sleep(50).then(() => {
this.getGoods(false); this.getGoods(false);
}) })
} }
@ -372,7 +317,7 @@ export default {
methods: { methods: {
getPositionFn() { getPositionFn() {
this.street = '定位中' this.street = '定位中'
this.$store.commit('setLocation', {lat: null, long: null}) this.$store.commit('setLocation', { lat: null, long: null })
uni.removeStorageSync('RejectTarget') uni.removeStorageSync('RejectTarget')
this.selfLocation() this.selfLocation()
@ -686,7 +631,7 @@ export default {
this.isshow = true this.isshow = true
uni.setStorageSync('loction', true); uni.setStorageSync('loction', true);
} }
if(this.$store.state.storage.location.lat){ if (this.$store.state.storage.location.lat) {
this.isshow = false this.isshow = false
let latitude, longitude; let latitude, longitude;
latitude = this.$store.state.storage.location.lat.toString(); latitude = this.$store.state.storage.location.lat.toString();
@ -713,10 +658,9 @@ export default {
// }) // })
this.uniLocation(); this.uniLocation();
}) })
} } else this.uniLocation();
else this.uniLocation();
}, },
uniLocation(){ uniLocation() {
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
timeout: '1000', timeout: '1000',
@ -853,19 +797,19 @@ export default {
// #endif // #endif
}, },
// //
changeMap(){ changeMap() {
uni.navigateTo({ uni.navigateTo({
url: `/pages/select_address/select_address_n`, url: `/pages/select_address/select_address_n`,
success:()=> { success: () => {
uni.$once('changeAddress', (e)=>{ uni.$once('changeAddress', (e) => {
// this.street_id = e.street.code; // this.street_id = e.street.code;
// this.street = e.street.name; // this.street = e.street.name;
if (e.longitude) { if (e.longitude) {
this.longitude = e.longitude; this.longitude = e.longitude;
this.latitude = e.latitude; this.latitude = e.latitude;
this.$store.commit('setLocation', { this.$store.commit('setLocation', {
lat: e.longitude, lat: e.latitude,
long: e.latitude, long: e.longitude,
}); });
} }
this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code); this.$bus.$emit('value-updated', e.street.name + ',' + e.street.code);
@ -874,26 +818,26 @@ export default {
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page { page {
background-color: #f4f7fe; background-color: #f4f7fe;
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%); // background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
} }
.zhibo { .zhibo {
height: 130rpx; height: 130rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.location { .location {
background-color: #f6f6f6; background-color: #f6f6f6;
width: 680rpx; width: 680rpx;
height: 150rpx; height: 150rpx;
@ -919,22 +863,22 @@ page {
color: #5a5a5a; color: #5a5a5a;
} }
.locationx{ .locationx {
color: #000; color: #000;
position: absolute; position: absolute;
top: 10rpx; top: 10rpx;
right: 20rpx; right: 20rpx;
} }
} }
.Circle_friends { .Circle_friends {
position: relative; position: relative;
padding: 0 0 87.72rpx 0; padding: 0 0 87.72rpx 0;
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%); background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
} }
.classpage { .classpage {
width: 100%; width: 100%;
height: calc(100vh - 50px); height: calc(100vh - 50px);
background-color: #fff; background-color: #fff;
@ -981,39 +925,39 @@ page {
border: 2rpx solid #707070; border: 2rpx solid #707070;
} }
} }
} }
// .bg-img { // .bg-img {
// position: absolute; // position: absolute;
// width: 100%; // width: 100%;
// height: 100%; // height: 100%;
// top: 0; // top: 0;
// /* #ifdef MP || APP-PLUS */ // /* #ifdef MP || APP-PLUS */
// z-index: -100; // z-index: -100;
// /* #endif */ // /* #endif */
// /* #ifdef H5 */ // /* #ifdef H5 */
// z-index: -100; // z-index: -100;
// /* #endif */ // /* #endif */
// z-index: -100; // z-index: -100;
// filter: blur(0); // filter: blur(0);
// overflow: hidden; // overflow: hidden;
// img { // img {
// width: 100%; // width: 100%;
// height: 100%; // height: 100%;
// filter: blur(30rpx); // filter: blur(30rpx);
// transform: scale(1.5); // transform: scale(1.5);
// } // }
// } // }
.sitebox { .sitebox {
animation-name: fadeIn; animation-name: fadeIn;
animation-duration: 3s; animation-duration: 3s;
animation-fill-mode: forwards; animation-fill-mode: forwards;
} }
@keyframes fadeIn { @keyframes fadeIn {
from { from {
opacity: 0; opacity: 0;
} }
@ -1021,9 +965,9 @@ page {
to { to {
opacity: 1; opacity: 1;
} }
} }
.site-box1 { .site-box1 {
width: 706rpx; width: 706rpx;
/* #ifdef MP || APP-PLUS */ /* #ifdef MP || APP-PLUS */
height: 160rpx; height: 160rpx;
@ -1053,9 +997,9 @@ page {
.iconfont { .iconfont {
font-size: 35.09rpx; font-size: 35.09rpx;
} }
} }
.site-box { .site-box {
width: 100%; width: 100%;
/* #ifdef MP || APP-PLUS */ /* #ifdef MP || APP-PLUS */
height: 160rpx; height: 160rpx;
@ -1099,40 +1043,40 @@ page {
font-size: 30rpx; font-size: 30rpx;
font-size: 35.09rpx; font-size: 35.09rpx;
} }
} }
.circle_friends_wrapper { .circle_friends_wrapper {
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
/deep/.u-tabs__wrapper__nav__line { /deep/.u-tabs__wrapper__nav__line {
width: 46rpx; width: 46rpx;
margin-left: -2rpx; margin-left: -2rpx;
} }
/deep/.u-tabs__wrapper__nav__item { /deep/.u-tabs__wrapper__nav__item {
// padding: 0 0px; // padding: 0 0px;
padding-left: 0rpx; padding-left: 0rpx;
padding-right: 20rpx; padding-right: 20rpx;
} }
.search_wrapper { .search_wrapper {
width: 694.74rpx; width: 694.74rpx;
margin: 0 auto; margin: 0 auto;
} }
.tabs_wrapper { .tabs_wrapper {
width: 720rpx; width: 720rpx;
margin: 0 auto; margin: 0 auto;
margin-bottom: 21.05rpx; margin-bottom: 21.05rpx;
// margin-left: -20rpx; // margin-left: -20rpx;
position: relative; position: relative;
} }
.tabs_wrapper-img { .tabs_wrapper-img {
width: 40rpx; width: 40rpx;
height: 60rpx; height: 60rpx;
position: absolute; position: absolute;
@ -1147,15 +1091,15 @@ page {
height: 40rpx; height: 40rpx;
margin-top: 10rpx; margin-top: 10rpx;
} }
} }
.empty_wrapper { .empty_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.article_box { .article_box {
height: 100%; height: 100%;
width: 694.74rpx; width: 694.74rpx;
margin: 0 auto; margin: 0 auto;
@ -1206,9 +1150,9 @@ page {
} }
} }
} }
} }
.tabs_wrapper { .tabs_wrapper {
width: 723rpx; width: 723rpx;
margin: 0rpx auto; margin: 0rpx auto;
margin-bottom: 21.05rpx; margin-bottom: 21.05rpx;
@ -1226,15 +1170,15 @@ page {
margin-right: 7.02rpx; margin-right: 7.02rpx;
} }
} }
} }
.goodslist { .goodslist {
// display: flex; // display: flex;
margin: 0 auto; margin: 0 auto;
width: 725rpx; width: 725rpx;
} }
.goods { .goods {
margin: 0 auto; margin: 0 auto;
width: 725rpx; width: 725rpx;
@ -1453,13 +1397,14 @@ page {
} }
} }
} }
} }
.rotate-box {
.rotate-box {
transform: rotate(0deg); transform: rotate(0deg);
transition: transform .5s ease-out; transition: transform .5s ease-out;
} }
.rotate-box:active { .rotate-box:active {
transform: rotate(360deg); transform: rotate(360deg);
} }
</style> </style>

View File

@ -96,7 +96,7 @@
<view class='pictrue' style="margin: 0 auto;"> <view class='pictrue' style="margin: 0 auto;">
<!-- <image src='../../../static/images/noCart.png'></image> --> <!-- <image src='../../../static/images/noCart.png'></image> -->
<image src='@/static/images/no_short.png'></image> <image src='@/static/images/no_short.png'></image>
<text>暂无商品切换其他分类或地区试试</text> <text>暂无商品, 试试其他分类/位置</text>
</view> </view>
</view> </view>
<block> <block>
@ -398,6 +398,12 @@
type: 2 type: 2
}) })
this.cloudList = data; 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)=>{ this.cloudList.forEach((item)=>{
item.children.unshift({ item.children.unshift({
cate_name: '全部', cate_name: '全部',
@ -732,7 +738,8 @@
page: this.storeParam.page, page: this.storeParam.page,
location: this.latitude+','+this.longitude, 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; // else query.category_id = this.storeParam.category_id; //
townCloud(query).then(res => { townCloud(query).then(res => {
this.goodsList = [...this.goodsList, ...res.data.list] this.goodsList = [...this.goodsList, ...res.data.list]
@ -821,8 +828,8 @@
this.longitude = e.longitude; this.longitude = e.longitude;
this.latitude = e.latitude; this.latitude = e.latitude;
this.$store.commit('setLocation', { this.$store.commit('setLocation', {
lat: e.longitude, lat: e.latitude,
long: e.latitude, long: e.longitude,
}); });
} }
this.getStoreList(true); this.getStoreList(true);

View File

@ -92,7 +92,7 @@
<view class='pictrue' style="margin: 0 auto;"> <view class='pictrue' style="margin: 0 auto;">
<!-- <image src='../../../static/images/noCart.png'></image> --> <!-- <image src='../../../static/images/noCart.png'></image> -->
<image src='@/static/images/no_short.png'></image> <image src='@/static/images/no_short.png'></image>
<text>暂无商品切换其他分类或地区试试</text> <text>暂无商品, 试试其他分类/位置</text>
</view> </view>
</view> </view>
<block> <block>
@ -395,6 +395,18 @@
type: 2 type: 2
}) })
this.cloudList = data; 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.merchant = this.cloudList[0];
this.merchantTow = this.merchant?.children[0]; this.merchantTow = this.merchant?.children[0];
this.storeParam.category_id = this.merchantTow.store_category_id; this.storeParam.category_id = this.merchantTow.store_category_id;
@ -716,14 +728,20 @@
this.storeParam.page = 1; this.storeParam.page = 1;
this.goodsList = []; this.goodsList = [];
} }
cloudWarehouse({ let query = {
street_code: this.street_id, street_code: this.street_id,
category_id: this.storeParam.category_id, // category_id: this.storeParam.category_id,
order: this.storeParam.order, order: this.storeParam.order,
keyword: this.storeParam.keyword, keyword: this.storeParam.keyword,
page: this.storeParam.page, page: this.storeParam.page,
location: this.latitude+','+this.longitude, 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=>{ // res.data.list = res.data.list.map(item=>{
// item.product = item; // item.product = item;
// return item; // return item;
@ -815,8 +833,8 @@
this.longitude = e.longitude; this.longitude = e.longitude;
this.latitude = e.latitude; this.latitude = e.latitude;
this.$store.commit('setLocation', { this.$store.commit('setLocation', {
lat: e.longitude, lat: e.latitude,
long: e.latitude, long: e.longitude,
}); });
} }
this.getStoreList(true); this.getStoreList(true);

View File

@ -102,7 +102,7 @@
<view class='pictrue' style="margin: 0 auto;background-color: #F5F5F5;"> <view class='pictrue' style="margin: 0 auto;background-color: #F5F5F5;">
<!-- <image src='../../../static/images/noCart.png'></image> --> <!-- <image src='../../../static/images/noCart.png'></image> -->
<image src='@/static/images/no_short.png'></image> <image src='@/static/images/no_short.png'></image>
<text>暂无店铺切换其他位置试试</text> <text>暂无店铺试试其他分类/位置</text>
</view> </view>
</view> </view>
<block v-if="storeParam.is_recommend"> <block v-if="storeParam.is_recommend">
@ -354,6 +354,11 @@
this.storeList = []; this.storeList = [];
merClassifly().then(res => { merClassifly().then(res => {
this.menuList = res.data; 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.merchant_category_id = this.menuList[0].merchant_category_id;
this.storeParam.merchant_category_id = this.merchant_category_id; this.storeParam.merchant_category_id = this.merchant_category_id;
if (this.mer_location == 1) { if (this.mer_location == 1) {
@ -713,7 +718,8 @@
type_id: this.storeParam.type_id, type_id: this.storeParam.type_id,
credit_buy: this.credit_buy, 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) { if (this.latitude) {
rqData.location = this.latitude + ',' + this.longitude rqData.location = this.latitude + ',' + this.longitude
} }
@ -877,8 +883,8 @@
this.longitude = e.longitude; this.longitude = e.longitude;
this.latitude = e.latitude; this.latitude = e.latitude;
this.$store.commit('setLocation', { this.$store.commit('setLocation', {
lat: e.longitude, lat: e.latitude,
long: e.latitude, long: e.longitude,
}); });
} }
this.storeMerchantList(); this.storeMerchantList();

View File

@ -248,6 +248,7 @@
latitude: this.latitude, latitude: this.latitude,
longitude: this.longitude longitude: this.longitude
} }
console.log({...obj});
uni.navigateBack({ uni.navigateBack({
success: () => { success: () => {
uni.$emit('changeAddress', obj) uni.$emit('changeAddress', obj)

View File

@ -132,7 +132,7 @@
<block v-else> <block v-else>
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;align-items: center;">
<image src='@/static/images/no_short.png' style="width: 500rpx; height: 180rpx;"></image> <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>
<view class="common-hd"> <view class="common-hd">
<view class="title">为你推荐</view> <view class="title">为你推荐</view>
@ -708,8 +708,8 @@ import { data } from '../../uni_modules/uview-ui/libs/mixin/mixin';
this.longitude = e.longitude; this.longitude = e.longitude;
this.latitude = e.latitude; this.latitude = e.latitude;
this.$store.commit('setLocation', { this.$store.commit('setLocation', {
lat: e.longitude, lat: e.latitude,
long: e.latitude, long: e.longitude,
}); });
} }
this.loadend = false; this.loadend = false;