更新功能,修复bug

This commit is contained in:
weipengfei 2023-11-15 17:05:21 +08:00
parent 3852b76375
commit cfbf1f93a7
9 changed files with 1966 additions and 70 deletions

View File

@ -18,9 +18,6 @@
<text class="tag-twob">满20包邮</text> <text class="tag-twob">满20包邮</text>
</view> </view>
</view> --> </view> -->
<view class="price">
<span></span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
</view>
<view class="relase"> <view class="relase">
<view class="relase-one"> <view class="relase-one">
{{item.rate}} {{item.rate}}
@ -31,9 +28,12 @@
<view class="relase-two"> <view class="relase-two">
{{item.merchant&&item.merchant.distance}} {{item.merchant&&item.merchant.distance}}
</view> </view>
<view class="relase-two"> <view class="relase-two">
{{item.merchant&&item.merchant.street_name}} {{item.merchant&&item.merchant.street_name}}
</view> </view>
</view>
<view class="price">
<span></span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
</view> </view>
<!-- <view class="item-info"> <!-- <view class="item-info">
<view class="info-title" style="margin-right: 10rpx;"> <view class="info-title" style="margin-right: 10rpx;">
@ -93,7 +93,8 @@
font-family: PingFang SC-Medium, PingFang SC; font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin: 12px 0; margin: 14rpx 0;
margin-bottom: 0;
padding-right: 12rpx; padding-right: 12rpx;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;

View File

@ -301,7 +301,8 @@
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#e93323", "navigationBarBackgroundColor": "#e93323",
"navigationStyle": "custom" "navigationStyle": "custom",
"onReachBottomDistance": 300
} }
}, },
@ -367,6 +368,14 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{
"path": "cloud_entrepot/indexh",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "里海云仓",
"enablePullDownRefresh": true
}
}, { }, {
"path": "teach_video/teach_video", "path": "teach_video/teach_video",
"style": { "style": {

View File

@ -352,7 +352,7 @@
if (this.mer_location == 1) { if (this.mer_location == 1) {
this.selfLocation() this.selfLocation()
} }
this.getClassfication(); // this.getClassfication();
this.getStoreType(); this.getStoreType();
this.Area() this.Area()
let that = this let that = this

File diff suppressed because it is too large Load Diff

View File

@ -89,11 +89,11 @@
<view class="menu_cls"> <view class="menu_cls">
<u-scroll-list indicatorActiveColor='#FF6D20' :indicator="true"> <u-scroll-list indicatorActiveColor='#FF6D20' :indicator="true">
<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" <view class="menu_li" :class="{'menu_li_on': item.store_category_id==store_category_id}" @click="changeMerchant(item.store_category_id)" v-for="item,index in menuList"
:key="index"> :key="index">
<u--image class="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> ></u--image>
<view class="li_text" 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.cate_name}}</view>
</view> </view>
</u-scroll-list> </u-scroll-list>
</view> </view>
@ -190,7 +190,8 @@
getGeocoder, getGeocoder,
} from '@/api/store.js'; } from '@/api/store.js';
import { import {
supMenuApi supMenuApi,
getCategoryListLevel
} from '@/api/requesta.js'; } from '@/api/requesta.js';
import recommend from './component/recommend'; import recommend from './component/recommend';
import rightSlider from './component/rightSlider'; import rightSlider from './component/rightSlider';
@ -307,14 +308,15 @@
page: 1, page: 1,
limit: 10, limit: 10,
order: 'location', order: 'location',
category_id: '', store_category_id: '', //id
category_id: '', //id
type_id: '', type_id: '',
street_id: '', street_id: '',
is_recommend: false, // is_recommend: false, //
}, },
storeKey: 0, storeKey: 0,
storeScroll: true, storeScroll: true,
merchant_category_id: '', // id store_category_id: '', // id
mer_id: '', mer_id: '',
sortId: '', sortId: '',
price_on: '', price_on: '',
@ -348,17 +350,17 @@
this.credit_buy = options.credit_buy this.credit_buy = options.credit_buy
this.storeParam.type_id = options.type_id this.storeParam.type_id = options.type_id
this.storeParam.type_id = options.type_id && options.type_id.split(',').toString() || '' 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.storeParam.store_category_id = options.cate_id && options.cate_id.split(',').toString() || ''
this.storeList = []; this.storeList = [];
supMenuApi().then(res => { getCategoryListLevel().then(res => {
this.menuList = res.data; this.menuList = res.data;
this.merchant_category_id = this.menuList[0].merchant_category_id; this.store_category_id = this.menuList[0].store_category_id;
this.storeParam.category_id = this.merchant_category_id; this.storeParam.store_category_id = this.store_category_id;
if (this.mer_location == 1) { if (this.mer_location == 1) {
this.selfLocation() this.selfLocation()
} }
// this.storeMerchantList(); // this.storeMerchantList();
this.getClassfication(); // this.getClassfication();
this.getStoreType(); this.getStoreType();
this.Area() this.Area()
let that = this let that = this
@ -403,13 +405,14 @@
this.$emit('selectPlce', e) this.$emit('selectPlce', e)
this.$emit('change', e) this.$emit('change', e)
this.street = e.value[1].name this.street = e.value[1].name
this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
})
this.storeParam.street_id = e.value[1].code this.storeParam.street_id = e.value[1].code
this.street_id = e.value[1].code this.street_id = e.value[1].code
this.storeMerchantList() this.storeParam.page = 1;
this.status = 'loadmore';
this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
this.storeMerchantList();
})
}, },
changeHandler(e) { changeHandler(e) {
const { const {
@ -536,8 +539,8 @@
check: false check: false
} }
}) })
if (this.storeParam.category_id.length > 0) { if (this.storeParam.store_category_id.length > 0) {
this.storeParam.category_id.forEach((ids, index) => { this.storeParam.store_category_id.forEach((ids, index) => {
temp.forEach(el => { temp.forEach(el => {
if (ids == el.merchant_category_id) { if (ids == el.merchant_category_id) {
el.check = true el.check = true
@ -707,13 +710,14 @@
// //
storeMerchantList() { storeMerchantList() {
if (this.loading) return if (this.loading) return
this.status = "loading"
this.loading = true this.loading = true
let rqData = { let rqData = {
keyword: this.storeParam.keyword, keyword: this.storeParam.keyword,
page: this.storeParam.page, page: this.storeParam.page,
limit: 10, limit: 10,
order: this.storeParam.order, order: this.storeParam.order,
category_id: this.storeParam.category_id, store_category_id: this.storeParam.store_category_id,
type_id: this.storeParam.type_id, type_id: this.storeParam.type_id,
credit_buy: this.credit_buy, credit_buy: this.credit_buy,
} }
@ -725,7 +729,7 @@
storeMerchantList(rqData).then(res => { storeMerchantList(rqData).then(res => {
if (res.data.list.length < rqData.limit) { if (res.data.list.length < rqData.limit) {
this.status = "nomore" this.status = "nomore"
} }else this.status = "loadmore"
this.count = res.data.count this.count = res.data.count
this.storeList = (res.data.list) this.storeList = (res.data.list)
this.loading = false this.loading = false
@ -739,13 +743,14 @@
// //
storeMerchantList2() { storeMerchantList2() {
if (this.loading) return if (this.loading) return
this.status = "loading"
this.loading = true this.loading = true
let rqData = { let rqData = {
keyword: this.storeParam.keyword, keyword: this.storeParam.keyword,
page: this.storeParam.page, page: this.storeParam.page,
limit: 10, limit: 10,
order: this.storeParam.order, order: this.storeParam.order,
// category_id: this.storeParam.category_id, // store_category_id: this.storeParam.store_category_id,
type_id: this.storeParam.type_id, type_id: this.storeParam.type_id,
credit_buy: this.credit_buy, credit_buy: this.credit_buy,
} }
@ -753,6 +758,9 @@
rqData.location = this.latitude + ',' + this.longitude rqData.location = this.latitude + ',' + this.longitude
} }
storeMerchantList(rqData).then(res => { storeMerchantList(rqData).then(res => {
if (res.data.list.length < rqData.limit) {
this.status = "nomore"
}else this.status = "loadmore"
this.storeParam.is_recommend = true; this.storeParam.is_recommend = true;
this.count = res.data.count this.count = res.data.count
this.storeList = (res.data.list) this.storeList = (res.data.list)
@ -798,12 +806,12 @@
this.storeParam.type_id = arr1.toString(); this.storeParam.type_id = arr1.toString();
} }
if (data.merList.length == 0) { if (data.merList.length == 0) {
this.storeParam.category_id = '' this.storeParam.store_category_id = ''
} else { } else {
data.merList.forEach(item => { data.merList.forEach(item => {
arr2.push(item.merchant_category_id) arr2.push(item.merchant_category_id)
}) })
this.storeParam.category_id = arr2.toString(); this.storeParam.store_category_id = arr2.toString();
} }
this.rightBox = data.status this.rightBox = data.status
this.loadend = false; this.loadend = false;
@ -847,8 +855,8 @@
}, },
// //
changeMerchant(id){ changeMerchant(id){
this.merchant_category_id = id; this.store_category_id = id;
this.storeParam.category_id = this.merchant_category_id; this.storeParam.store_category_id = this.store_category_id;
this.storeParam.page = 1; this.storeParam.page = 1;
this.storeMerchantList() this.storeMerchantList()
}, },
@ -873,30 +881,36 @@
}, },
// //
onReachBottom() { onReachBottom() {
this.storeParam.page += 1 this.$u.throttle(()=>{
if(this.status == "nomore")return;
let rqData = { this.storeParam.page += 1
keyword: this.storeParam.keyword, this.status = "loading"
page: this.storeParam.page, let rqData = {
limit: 10, keyword: this.storeParam.keyword,
order: this.storeParam.order, page: this.storeParam.page,
category_id: this.storeParam.category_id, limit: 10,
type_id: this.storeParam.type_id, order: this.storeParam.order,
street_id: this.storeParam.street_id, type_id: this.storeParam.type_id,
credit_buy: this.credit_buy credit_buy: this.credit_buy
} }
if (this.latitude) { if(!this.storeParam.is_recommend){
rqData.location = this.latitude + ',' + this.longitude rqData.store_category_id = this.storeParam.store_category_id;
} rqData.street_id = this.storeParam.street_id;
// console.log(rqData) }
storeMerchantList(rqData).then(res => { if (this.latitude) {
console.log(res.data.list.length); rqData.location = this.latitude + ',' + this.longitude
if (res.data.list.length < rqData.limit) { }
this.status = "nomore" // console.log(rqData)
} storeMerchantList(rqData).then(res => {
this.count = res.data.count if (res.data.list.length < rqData.limit) {
this.storeList.push(...res.data.list) this.status = "nomore"
}) }else this.status = "loadmore"
this.count = res.data.count
this.storeList.push(...res.data.list)
this.loading = false
this.loadingIcon = false
})
}, 500)
} }
} }

View File

@ -676,7 +676,10 @@
}, },
getCartNum: function() { getCartNum: function() {
let that = this; let that = this;
getCartCounts().then(res => { let params = {};
if(this.product_type) params.product_type = this.product_type;
if(this.source) params.source = this.source;
getCartCounts(params).then(res => {
that.cartTotalCount = res.data[0].count || 0; that.cartTotalCount = res.data[0].count || 0;
}); });
}, },

View File

@ -582,9 +582,12 @@
if (this.isYunCang == 0) { if (this.isYunCang == 0) {
return Toast('当前区域没有云仓库') return Toast('当前区域没有云仓库')
} }
uni.navigateTo({ // uni.navigateTo({
url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}&source=103&location=${this.latitude},${this.longitude}` // url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}&source=103&location=${this.latitude},${this.longitude}`
}) // })
uni.navigateTo({
url: `/pages/nongKe/cloud_entrepot/indexh?street_id=${this.street_id}&townName=${this.town}&source=103&location=${this.latitude},${this.longitude}`
})
}, },
navgo(url) { navgo(url) {

View File

@ -1049,14 +1049,14 @@
}) })
}) })
that.subCoupon['0'] = [] that.subCoupon['0'] = []
if (res.data.platformCoupon.length > 0) { if (res.data.platformCoupon?.length > 0) {
res.data.platformCoupon.forEach(el => { res.data.platformCoupon.forEach(el => {
if (el.checked) { if (el.checked) {
that.subCoupon[el.mer_id] = [] that.subCoupon[el.mer_id] = []
that.subCoupon[el.mer_id].push(el.coupon_user_id) that.subCoupon[el.mer_id].push(el.coupon_user_id)
} }
}) })
} }else res.data.platformCoupon = [];
that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data
.order[that.couponIndex].coupon); .order[that.couponIndex].coupon);
that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds

View File

@ -269,7 +269,7 @@
<text class="iconfont icon-fabu"></text> <text class="iconfont icon-fabu"></text>
发布种草 发布种草
</navigator> --> </navigator> -->
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价 <view class='bnt b-color' @click='goOrderDetails_Evaluation(item)'>去评价
</view> </view>
</block> </block>
<block v-if="item.status == 3"> <block v-if="item.status == 3">
@ -343,6 +343,7 @@
import { import {
HTTP_REQUEST_URL HTTP_REQUEST_URL
} from '@/config/app'; } from '@/config/app';
import { Toast } from '../../../libs/uniApi';
export default { export default {
components: { components: {
payment, payment,
@ -619,30 +620,32 @@
/** /**
* 点击去评价 * 点击去评价
*/ */
goOrderDetails_Evaluation: function(order_id) { goOrderDetails_Evaluation: function(item) {
let self = this let self = this
if (!order_id) return that.$util.Tips({ if (!item.order_id) return that.$util.Tips({
title: '缺少订单号无法查看订单详情和评价' title: '缺少订单号无法查看订单详情和评价'
}); });
// #ifdef MP // #ifdef MP
if (self.orderStatus == 0) { if (self.orderStatus == 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + item.order_id
}) })
} else { } else {
if(!item.orderProduct[0]?.order_product_id) return Toast('无法评价该商品')
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: `/pages/users/goods_comment_con/index?uni=${item.orderProduct[0].order_product_id}&order_id=${item.order_id}`
}) })
} }
// #endif // #endif
// #ifndef MP // #ifndef MP
if (self.orderStatus == 0) { if (self.orderStatus == 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + item.order_id
}) })
} else { } else {
if(!item.orderProduct[0]?.order_product_id) return Toast('无法评价该商品')
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: `/pages/users/goods_comment_con/index?uni=${item.orderProduct[0].order_product_id}&order_id=${item.order_id}`
}) })
} }
// #endif // #endif