更新功能

This commit is contained in:
weipengfei 2023-11-11 18:40:57 +08:00
parent 2df7fe1658
commit 9126f44765
7 changed files with 1912 additions and 1733 deletions

View File

@ -3,6 +3,10 @@ import request from "@/utils/requesta.js";
export function getCityCloundShop(data) {
return request.get("city/get_cloud_shop", data);
}
export function getCategoryListLevel(data) {
return request.get("category/list_level", data);
}
export function cloudWarehouse(data) {
return request.get("store/product/cloudWarehouse", data);
}

175
components/shortPopup.vue Normal file
View File

@ -0,0 +1,175 @@
<template>
<view>
<uni-popup ref="popupRef" type="bottom">
<view class="pop">
<view class="image">
<image src="../static/images/f2.png"></image>
<view class="border"></view>
</view>
<view class="white_card">
<view class="flex">
<view class="price"><text class="pro">10</text>.00</view>
<view>订货价</view>
</view>
<view class="short_name">商品名称</view>
<view class="shop_name">店铺名称</view>
<u-line></u-line>
<view class="m_title">规格选中</view>
<view class="flex">
<view class="attr">规格1</view>
<view class="attr">规格2</view>
</view>
<view class="m_title num">
<view>购买数量</view>
<view>1</view>
</view>
<view>
商品库存 200
</view>
<view class="button">
<view class="b_icon">
<image src="@/static/images/icon/car.png"></image>
<view>采购车</view>
</view>
<view class="btn">加入采购清单</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
name: "shortPopup",
props: ['datas'],
data() {
return {
show: false
};
},
methods: {
open() {
this.$refs.popupRef.open();
},
close() {
this.$refs.popupRef.close();
}
}
}
</script>
<style lang="scss">
.pop {
background-color: #fff;
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
overflow: hidden;
position: relative;
.image{
height: 750rpx;
width: 750rpx;
position: relative;
image{
width: 100%;
height: 100%;
}
.border{
position: absolute;
bottom: 0;
left: 0;
background-color: #fff;
height: 40rpx;
width: 100%;
border-radius: 40rpx 40rpx 0 0;
}
}
.white_card{
border-radius: 31.54rpx 31.54rpx 0rpx 0rpx;
background-color: #fff;
margin: 0 28rpx;
padding-bottom: 30rpx;
color: #737373;
font-size: 26.29rpx;
.price{
font-size: 35rpx;
font-family: SF Pro Display-Semibold, SF Pro Display;
font-weight: 600;
color: #F84221;
.pro{
font-size: 49.07rpx;
}
}
.short_name{
font-size: 33rpx;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
}
.shop_name{
display: inline-block;
background: #FEF5F3;
padding: 0 16rpx;
border-radius: 26rpx 26rpx 26rpx 26rpx;
margin-top: 30rpx;
margin-bottom: 20rpx;
}
.m_title{
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 31rpx;
margin-bottom: 21rpx;
}
.attr{
background: #FEF5F3;
opacity: 1;
border: 1rpx solid #F84221;
padding: 15rpx 30rpx;
margin-right: 20rpx;
height: 63rpx;
border-radius: 63rpx;
display: flex;
align-items: center;
justify-content: center;
}
.num{
display: flex;
justify-content: space-between;
}
.button{
display: flex;
justify-content: space-around;
margin-top: 20rpx;
.b_icon{
display: flex;
flex-direction: column;
align-items: center;
font-size: 19rpx;
font-weight: 400;
color: #333333;
image{
width: 50.82rpx;
height: 50.82rpx;
}
}
.btn{
width: 575rpx;
height: 84rpx;
background: linear-gradient(270deg, #FF6D20 0%, #F84221 100%);
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
}
}
}
</style>

View File

@ -838,8 +838,7 @@
order: this.type,
keyword: this.keyword,
page: this.page_num,
location: this.location
location: this.location,
}).then(res => {
this.goodsList = res.data.list
this.showLoading = false
@ -937,7 +936,7 @@
townCloud({
street_code: this.street_code,
category_id: this.cloudList[this.current].category_id,
location: this.location
location: this.location
}).then(res => {
this.trnList = []
this.goodsList = res.data.list

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@
供销综合云市场
</view>
<view class=""
@click="navGoto(`/pages/nongKe/cloud_entrepot/indexb?street=${street_id}&townName=${street}&location=${latitude},${longitude}`)"
@click="navGoto(`/pages/nongKe/cloud_entrepot/indexb?street_id=${street_id}&townName=${street}&location=${latitude},${longitude}`)"
style="font-size: 31.54rpx;font-weight: 700;transform: skewX(-10deg);margin-left: 20rpx;">
供销综合云商品
</view>
@ -87,11 +87,11 @@
<view class="menu_cls">
<u-scroll-list indicatorActiveColor='#FF6D20' :indicator="true">
<view class="menu_li" @click="changeMerchant(item.merchant_category_id)" v-for="item,index in menuList"
<view class="menu_li" :class="{'menu_li_on': item.merchant_category_id==merchant_category_id}" @click="changeMerchant(item.merchant_category_id)" v-for="item,index in menuList"
:key="index">
<u--image :showLoading="true" :src="item.background" width="87.62rpx" height="87.62rpx" shape="circle"
<u--image class="image" :showLoading="true" :src="item.background" width="87.62rpx" height="87.62rpx" shape="circle"
></u--image>
<view style="display: block;font-size: 26.29rpx;margin-top: 10rpx;">{{item.category_name}}</view>
<view class="li_text" style="display: block;font-size: 26.29rpx;margin-top: 10rpx;">{{item.category_name}}</view>
</view>
</u-scroll-list>
</view>
@ -121,7 +121,7 @@
<text v-if="item.type_id==17"
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
</view>
<view class="li">
<view class="li" style="align-items: center;">
<view class="score">
<view class="star">
<view
@ -129,10 +129,9 @@
</view>
</view>
</view>
<text style="margin-left: 20rpx;color: #FF6D20; ">{{item.service_score}}</text>
<text>月销{{item.sales}}</text>
<text v-if="item.distance" style="font-size: 24rpx;color: #aaa;">{{item.distance}}</text>
<text style="margin-left: 20rpx;color: #FF6D20;font-size: 22.78rpx; ">{{item.service_score}}</text>
<text style="font-size: 24.53rpx;">月销{{item.sales}}</text>
<text v-if="item.distance" style="font-size: 21.03rpx;color: #aaa;">{{item.distance}}</text>
</view>
<view class="li" style="align-items: center;">
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
@ -307,6 +306,7 @@
},
storeKey: 0,
storeScroll: true,
merchant_category_id: '', // id
mer_id: '',
sortId: '',
price_on: '',
@ -342,29 +342,31 @@
this.storeParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
this.storeParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
this.storeList = [];
if (this.mer_location == 1) {
this.selfLocation()
}
this.storeMerchantList();
this.getClassfication();
this.getStoreType();
supMenuApi().then(res => {
this.menuList = res.data
})
this.Area()
let that = this
setTimeout(() => {
uni.createSelectorQuery()
.in(this)
.select('.flags')
.boundingClientRect(rect => {
// console.log(this.cartTagInfo, 6666)
// that.cartTagInfo = rect
that.headTop = rect.top
console.log(that.headTop)
})
.exec();
}, 100)
this.menuList = res.data;
this.merchant_category_id = this.menuList[0].merchant_category_id;
this.storeParam.category_id = this.merchant_category_id;
if (this.mer_location == 1) {
this.selfLocation()
}
// this.storeMerchantList();
this.getClassfication();
this.getStoreType();
this.Area()
let that = this
setTimeout(() => {
uni.createSelectorQuery()
.in(this)
.select('.flags')
.boundingClientRect(rect => {
// console.log(this.cartTagInfo, 6666)
// that.cartTagInfo = rect
that.headTop = rect.top
// console.log(that.headTop)
})
.exec();
}, 100)
})
},
computed: {
downMenus: function() {
@ -387,7 +389,6 @@
methods: {
selectLocation() {
this.isSelectPlace ? this.showPicker = true : ''
},
confirm(e) {
this.showPicker = false
@ -627,7 +628,10 @@
},
selfLocation() {
let self = this
if (uni.getStorageSync('RejectTarget')) return;
if (uni.getStorageSync('RejectTarget')) {
this.storeMerchantList();
return;
}
if(this.$store?.state?.storage?.location?.lat){
this.latitude = this.$store?.state?.storage?.location?.lat;
this.longitude = this.$store?.state?.storage?.location?.long;
@ -640,12 +644,14 @@
this.location_address = res.data.address;
this.recommend_address = res.data.address.length > 4 ? res.data.address
.slice(0, 4) + '...' :
res.data.address
res.data.address;
this.storeMerchantList();
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
this.storeMerchantList();
})
}
else uni.getLocation({
@ -671,11 +677,13 @@
this.recommend_address = res.data.address.length > 4 ? res.data.address
.slice(0, 4) + '...' :
res.data.address
this.storeMerchantList();
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
this.storeMerchantList();
})
},
fail: (res) => {
@ -684,6 +692,7 @@
icon: 'none',
duration: 1000
});
this.storeMerchantList();
},
});
},
@ -728,7 +737,7 @@
page: this.storeParam.page,
limit: 10,
order: this.storeParam.order,
category_id: this.storeParam.category_id,
// category_id: this.storeParam.category_id,
type_id: this.storeParam.type_id,
credit_buy: this.credit_buy,
}
@ -830,7 +839,10 @@
},
//
changeMerchant(id){
console.log(id);
this.merchant_category_id = id;
this.storeParam.category_id = this.merchant_category_id;
this.storeParam.page = 1;
this.storeMerchantList()
}
},
//
@ -930,20 +942,44 @@
// height: 199.77rpx;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
padding: 20rpx 20rpx 0 20rpx;
font-size: 26.29rpx;
height: 220rpx;
.menu_li {
margin-right: 30rpx;
margin-right: 20rpx;
// background-color: red;
// width: 50vw;
display: flex;
flex-direction: column;
align-items: center;
min-width: 15vw;
height: 140rpx;
min-width: 16vw;
height: auto;
// width: 120rpx;
// display: inline-block;
.image{
border: 5rpx solid #fff;
}
.li_text{
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
padding: 4rpx 10rpx;
}
}
.menu_li_on{
.image{
border: 5rpx solid #ff6d20;
border-radius: 50%;
}
.li_text{
background-color: #ff6d20;
border-radius: 2em;
color: #fff;
padding: 4rpx 10rpx;
}
}
}
@ -976,6 +1012,7 @@
padding: 20rpx;
// border-radius: 20rpx;
display: flex;
border-radius: 21rpx 21rpx 21rpx 21rpx;
// align-items: center;
.left {
@ -988,16 +1025,18 @@
.right {
flex: 1;
color: #737373;
.head {
font-weight: bold;
// color: red;
color: #333;
}
.li {
width: 100%;
display: flex;
font-size: 26.29rpx;
font-size: 28.04rpx;
margin-bottom: 10rpx;
align-items: center;

BIN
static/images/icon/car.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/images/icon/plus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB