店铺详情下拉刷新优化,下载邀请图片功能添加
This commit is contained in:
@@ -120,7 +120,6 @@
|
||||
address_id : this.address.address_id,
|
||||
remark : this.remark || ''
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
this.$store.commit('setAddress', {})
|
||||
this.$Router.replace({
|
||||
name: 'Pay',
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
<view class="shopInfo-title-right" >全部商品 {{goods.shop.goods_count || 0}} <uni-icons type="right" color="grey"/></view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="imgs">
|
||||
<block v-for="(item, index) in goods.content" :key="index">
|
||||
<image :src="item" mode="widthFix"></image>
|
||||
@@ -74,8 +73,7 @@
|
||||
},
|
||||
methods:{
|
||||
getGoods(){
|
||||
goods(this.$Route.query.id || 55).then(res => {
|
||||
console.log(res);
|
||||
goods(this.$Route.query.id).then(res => {
|
||||
this.goods = res
|
||||
})
|
||||
},
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
methods:{
|
||||
getMeals(){
|
||||
meals(this.$Route.query.id, this.categoryId).then(res => {
|
||||
console.log(res)
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.meal.subtitle
|
||||
})
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
name: this.searchVlaue,
|
||||
page: this.page
|
||||
}).then(res => {
|
||||
console.log(res.page)
|
||||
|
||||
if(res.page.current === 1){
|
||||
this.goodsArr = []
|
||||
}
|
||||
|
||||
@@ -71,13 +71,13 @@
|
||||
classify : [],
|
||||
goods : [],
|
||||
has_more:true,
|
||||
page:1,
|
||||
page:1,
|
||||
ShopId:'',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ShopId = this.$Route.query.ShopId
|
||||
shopsDetail(this.ShopId).then(res => {
|
||||
console.log(res);
|
||||
this.classify = [{
|
||||
category_id: '',
|
||||
name: '全部商品',
|
||||
@@ -95,20 +95,19 @@
|
||||
onPullDownRefresh() {
|
||||
this.has_more = true;
|
||||
this.page = 1;
|
||||
this.goods = [];
|
||||
this.getGoods()
|
||||
},
|
||||
methods: {
|
||||
getGoods() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
uni.showLoading({
|
||||
title:'请求中~',
|
||||
mask:true,
|
||||
})
|
||||
shopsGoods(this.ShopId, this.category_id,this.page).then(res => {
|
||||
if(this.page = 1){
|
||||
this.goods = [];
|
||||
}
|
||||
this.goods = this.goods.concat(res.data);
|
||||
this.has_more = res.page.has_more;
|
||||
uni.hideLoading()
|
||||
uni.hideLoading();
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -118,9 +117,14 @@
|
||||
},
|
||||
lower(){
|
||||
if(this.has_more){
|
||||
this.page = this.page + 1;
|
||||
this.has_more = true;
|
||||
this.getGoods()
|
||||
this.page = this.page + 1
|
||||
this.getGoods();
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'没有更多~',
|
||||
icon:"none",
|
||||
mask:true,
|
||||
})
|
||||
}
|
||||
},
|
||||
selectClassify(id) {
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
methods: {
|
||||
getShops() {
|
||||
shops(this.categoryId, this.page).then(res => {
|
||||
console.log(res)
|
||||
if (this.page == 1) {
|
||||
this.shopsArr = [];
|
||||
this.classify = [{
|
||||
|
||||
Reference in New Issue
Block a user