更新功能,修复bug
This commit is contained in:
parent
3852b76375
commit
cfbf1f93a7
@ -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}}
|
||||||
@ -35,6 +32,9 @@
|
|||||||
{{item.merchant&&item.merchant.street_name}}
|
{{item.merchant&&item.merchant.street_name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="price">
|
||||||
|
<span>¥</span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
|
||||||
|
</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;">
|
||||||
{{item.merchant.mer_name}}
|
{{item.merchant.mer_name}}
|
||||||
@ -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;
|
||||||
|
11
pages.json
11
pages.json
@ -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": {
|
||||||
|
@ -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
|
||||||
|
1863
pages/nongKe/cloud_entrepot/indexh.vue
Normal file
1863
pages/nongKe/cloud_entrepot/indexh.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -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.$u.throttle(()=>{
|
||||||
|
if(this.status == "nomore")return;
|
||||||
this.storeParam.page += 1
|
this.storeParam.page += 1
|
||||||
|
this.status = "loading"
|
||||||
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,
|
|
||||||
type_id: this.storeParam.type_id,
|
type_id: this.storeParam.type_id,
|
||||||
street_id: this.storeParam.street_id,
|
|
||||||
credit_buy: this.credit_buy
|
credit_buy: this.credit_buy
|
||||||
}
|
}
|
||||||
|
if(!this.storeParam.is_recommend){
|
||||||
|
rqData.store_category_id = this.storeParam.store_category_id;
|
||||||
|
rqData.street_id = this.storeParam.street_id;
|
||||||
|
}
|
||||||
if (this.latitude) {
|
if (this.latitude) {
|
||||||
rqData.location = this.latitude + ',' + this.longitude
|
rqData.location = this.latitude + ',' + this.longitude
|
||||||
}
|
}
|
||||||
// console.log(rqData)
|
// console.log(rqData)
|
||||||
storeMerchantList(rqData).then(res => {
|
storeMerchantList(rqData).then(res => {
|
||||||
console.log(res.data.list.length);
|
|
||||||
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.push(...res.data.list)
|
this.storeList.push(...res.data.list)
|
||||||
|
this.loading = false
|
||||||
|
this.loadingIcon = false
|
||||||
})
|
})
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -582,8 +582,11 @@
|
|||||||
if (this.isYunCang == 0) {
|
if (this.isYunCang == 0) {
|
||||||
return Toast('当前区域没有云仓库')
|
return Toast('当前区域没有云仓库')
|
||||||
}
|
}
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}&source=103&location=${this.latitude},${this.longitude}`
|
||||||
|
// })
|
||||||
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/indexh?street_id=${this.street_id}&townName=${this.town}&source=103&location=${this.latitude},${this.longitude}`
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user