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
// 在打包之前请检查当前环境是否正确
// const env = 'dev'; // 开发
const env = 'prod'; // 生产
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {

View File

@ -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);

View File

@ -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>
@ -713,8 +658,7 @@ export default {
// })
this.uniLocation();
})
}
else this.uniLocation();
} else this.uniLocation();
},
uniLocation() {
uni.getLocation({
@ -864,8 +808,8 @@ export default {
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);
@ -1454,6 +1398,7 @@ page {
}
}
}
.rotate-box {
transform: rotate(0deg);
transition: transform .5s ease-out;

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

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

View File

@ -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;