首页分类可滑动
parent
bfc54c0006
commit
df73406429
|
@ -38,7 +38,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<pitera v-if="total==dataList.length"></pitera>
|
<pitera v-if="total==dataList.length || dataList.length==0"></pitera>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<!-- 底部导航 -->
|
<!-- 底部导航 -->
|
||||||
<view class="display-between-center cart-foot-box">
|
<view class="display-between-center cart-foot-box">
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
touchBottomEv(){// scroll-view触底事件
|
touchBottomEv(){// scroll-view触底事件
|
||||||
if(this.total != this.dataList.length){
|
if(this.total != this.dataList.length && this.dataList.length!=0){
|
||||||
this.page++;
|
this.page++;
|
||||||
this.checkList();
|
this.checkList();
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,6 @@
|
||||||
this.total = res.data.total;
|
this.total = res.data.total;
|
||||||
if(res.data.list.length){
|
if(res.data.list.length){
|
||||||
res.data.list.forEach(item=>{
|
res.data.list.forEach(item=>{
|
||||||
console.log(item,286);
|
|
||||||
// let newspec = [];
|
// let newspec = [];
|
||||||
// if(item.sku.spec_text.length){
|
// if(item.sku.spec_text.length){
|
||||||
// item.sku.spec_text.forEach(itemspec=>{
|
// item.sku.spec_text.forEach(itemspec=>{
|
||||||
|
@ -292,19 +291,21 @@
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
let obj = {
|
if(item.sku!=null){
|
||||||
id:item.id,
|
let obj = {
|
||||||
coding:item.sku.coding,
|
id:item.id,
|
||||||
isActive:false,
|
coding:item.sku.coding,
|
||||||
imgSrc:item.spu.spu_cover,
|
isActive:false,
|
||||||
title:item.spu_name,
|
imgSrc:item.spu.spu_cover,
|
||||||
specs:item.sku.spec_text,
|
title:item.spu_name,
|
||||||
// price:this.$toolAll.tools.changeNum(item.price*1),
|
specs:item.sku.spec_info,
|
||||||
price:item.price,
|
// price:this.$toolAll.tools.changeNum(item.price*1),
|
||||||
reckonPrice:item.price,
|
price:item.price,
|
||||||
num:item.num
|
reckonPrice:item.price,
|
||||||
|
num:item.num
|
||||||
|
}
|
||||||
|
this.dataList.push(obj);
|
||||||
}
|
}
|
||||||
this.dataList.push(obj);
|
|
||||||
})
|
})
|
||||||
this.dataList.concat(this.dataList);
|
this.dataList.concat(this.dataList);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -373,5 +373,11 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
scroll-view ::-webkit-scrollbar {
|
||||||
|
display: none !important;
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if(this.total!=this.dataList){
|
if(this.total!=this.dataList.length){
|
||||||
this.page++;
|
this.page++;
|
||||||
// 调取查询分享信息事件
|
// 调取查询分享信息事件
|
||||||
this.checkCommissionEv();
|
this.checkCommissionEv();
|
||||||
|
@ -156,11 +156,11 @@
|
||||||
this.distributionInfo.withdrawal_total = this.$toolAll.tools.addXiaoShu(this.distributionInfo.withdrawal_total);
|
this.distributionInfo.withdrawal_total = this.$toolAll.tools.addXiaoShu(this.distributionInfo.withdrawal_total);
|
||||||
// 我的佣金
|
// 我的佣金
|
||||||
this.commission = this.distributionInfo.commission;
|
this.commission = this.distributionInfo.commission;
|
||||||
// 设置列表
|
|
||||||
this.dataList = this.dataList.concat(this.distributionInfo.log.list);
|
|
||||||
// 设置总数
|
// 设置总数
|
||||||
this.total = this.distributionInfo.log.total;
|
this.total = this.distributionInfo.log.total;
|
||||||
this.log(this.total,this.dataList.length)
|
// 设置列表
|
||||||
|
this.dataList = this.dataList.concat(this.distributionInfo.log.list);
|
||||||
|
// this.log(this.total,this.dataList.length)
|
||||||
} else {
|
} else {
|
||||||
this.$toolAll.tools.showToast(err.msg);
|
this.$toolAll.tools.showToast(err.msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,18 +78,6 @@
|
||||||
</container-subgroup>
|
</container-subgroup>
|
||||||
<!-- 底部导航 -->
|
<!-- 底部导航 -->
|
||||||
<payment :totalPrice="totalPrice" @immediatePayment="goPayment"></payment>
|
<payment :totalPrice="totalPrice" @immediatePayment="goPayment"></payment>
|
||||||
<!-- 支付成功 -->
|
|
||||||
<view v-if="isSuccess" class="posAll" style="z-index: 3;background-color: #F5F5F5;">
|
|
||||||
<view class="bacf radius20 mar-s20 mar-zy20 success-box">
|
|
||||||
<image src="/static/public/pay-success.png" mode=""></image>
|
|
||||||
<view class="fon28 col3 pad-s20 pad-x40">支付成功</view>
|
|
||||||
<view class="success-hj"><span>¥{{jsPrice<0?0:jsPrice}}</span></view>
|
|
||||||
<view class="disja success-btn">
|
|
||||||
<view @tap="goDetail">查看订单</view>
|
|
||||||
<view @tap="goShop" class="colf" :style="{background:publicColor}">再逛一逛</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -110,9 +98,7 @@
|
||||||
addressInfo:'',//地址信息
|
addressInfo:'',//地址信息
|
||||||
zPhone:'',//自提时的手机号
|
zPhone:'',//自提时的手机号
|
||||||
isFocus:false,
|
isFocus:false,
|
||||||
isSuccess:false,//支付成功
|
|
||||||
times:0,//点击次数
|
times:0,//点击次数
|
||||||
checkGrounpId:0,
|
|
||||||
expressInfo:{
|
expressInfo:{
|
||||||
code:'',//快递编号
|
code:'',//快递编号
|
||||||
default_price:0 //快递费
|
default_price:0 //快递费
|
||||||
|
|
|
@ -95,26 +95,25 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
statusHNH:uni.getStorageSync('statusHNH'),
|
|
||||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||||
dataList:[],
|
dataList:[],
|
||||||
idEdit:false,
|
idEdit:false,
|
||||||
userName:'',
|
userName:'',//名字
|
||||||
userPhone:'',
|
userPhone:'',//电话
|
||||||
userProvince:'',
|
userProvince:'',//省份
|
||||||
userCity:'',
|
userCity:'',//城市
|
||||||
userCounty:'',
|
userCounty:'',//区县
|
||||||
userAddress:'',
|
userAddress:'',//详细地址
|
||||||
isChoose:'',//选中的id
|
isChoose:'',//选中的id
|
||||||
delNum:0,//删除条件
|
delNum:0,//删除条件
|
||||||
loading:false,
|
loading:false,
|
||||||
provinceArr:[],
|
provinceArr:[],//省份列表
|
||||||
cityArr:[],
|
cityArr:[],//城市列表
|
||||||
countyArr:[],
|
countyArr:[],//区县列表
|
||||||
isAddress:0,
|
isAddress:0,//选中的是哪个地址选项
|
||||||
isWhere:1,
|
isWhere:1,//来自哪个页面
|
||||||
isMo:0,
|
isMo:0,//是否是默认地址
|
||||||
flag:true
|
flag:true//允许点击
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -228,7 +227,7 @@
|
||||||
this.userCounty = this.countyArr[index].name;
|
this.userCounty = this.countyArr[index].name;
|
||||||
},
|
},
|
||||||
async checkList(){//查询地址列表
|
async checkList(){//查询地址列表
|
||||||
this.$requst.post('/api/user/address').then(res=>{
|
this.$requst.post('/api/user/address',{page:1,size:100}).then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.flag = true;
|
this.flag = true;
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
|
@ -256,8 +255,8 @@
|
||||||
uni.removeStorageSync('chooseAddress');
|
uni.removeStorageSync('chooseAddress');
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
}
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
},
|
},
|
||||||
checkActive(){//把默认地址放到第一位
|
checkActive(){//把默认地址放到第一位
|
||||||
let have = this.dataList.findIndex((res)=>{
|
let have = this.dataList.findIndex((res)=>{
|
||||||
|
@ -339,8 +338,8 @@
|
||||||
this.dataList[index].isActive = true;
|
this.dataList[index].isActive = true;
|
||||||
this.dataList[index].is_default = 1;
|
this.dataList[index].is_default = 1;
|
||||||
this.checkActive();
|
this.checkActive();
|
||||||
}
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
},
|
},
|
||||||
editAddress(index){//编辑按钮
|
editAddress(index){//编辑按钮
|
||||||
this.idEdit = true;
|
this.idEdit = true;
|
||||||
|
|
|
@ -204,8 +204,8 @@
|
||||||
this.orderList[this.current].push(obj);
|
this.orderList[this.current].push(obj);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
},
|
},
|
||||||
payMentEv(coding){//付款
|
payMentEv(coding){//付款
|
||||||
if(this.times==0){
|
if(this.times==0){
|
||||||
|
@ -228,7 +228,7 @@
|
||||||
this.implementListEv();
|
this.implementListEv();
|
||||||
} else this.$toolAll.tools.showToast(res.msg);
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
|
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
},
|
},
|
||||||
fail:()=> {
|
fail:()=> {
|
||||||
this.$toolAll.tools.showToast('取消支付');
|
this.$toolAll.tools.showToast('取消支付');
|
||||||
|
@ -264,7 +264,7 @@
|
||||||
// 调用查询列表事件
|
// 调用查询列表事件
|
||||||
this.implementListEv();
|
this.implementListEv();
|
||||||
} else this.$toolAll.tools.showToast(res.msg);
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirmReceipt(id){//确认收货事件
|
confirmReceipt(id){//确认收货事件
|
||||||
|
@ -274,7 +274,7 @@
|
||||||
// 调用查询列表事件
|
// 调用查询列表事件
|
||||||
this.implementListEv();
|
this.implementListEv();
|
||||||
} else this.$toolAll.tools.showToast(res.msg);
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
},
|
},
|
||||||
goDetail(id){//去订单详情
|
goDetail(id){//去订单详情
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
this.$toolAll.tools.showToast('收货成功');
|
this.$toolAll.tools.showToast('收货成功');
|
||||||
this.checkInfo(this.orderInfo.id);
|
this.checkInfo(this.orderInfo.id);
|
||||||
} else this.$toolAll.tools.showToast(res.msg);
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
},
|
},
|
||||||
make(index){
|
make(index){
|
||||||
this.isHeyan = true;
|
this.isHeyan = true;
|
||||||
|
@ -195,8 +195,8 @@
|
||||||
this.checkInfo(this.orderInfo.id);
|
this.checkInfo(this.orderInfo.id);
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
}
|
}
|
||||||
}
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
},3000)
|
},3000)
|
||||||
},
|
},
|
||||||
cancleEv(){//取消订单
|
cancleEv(){//取消订单
|
||||||
|
@ -207,8 +207,8 @@
|
||||||
this.$toolAll.tools.showToast('取消订单成功');
|
this.$toolAll.tools.showToast('取消订单成功');
|
||||||
this.checkInfo(this.orderInfo.id);
|
this.checkInfo(this.orderInfo.id);
|
||||||
this.times = 0;
|
this.times = 0;
|
||||||
}
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
} else {
|
} else {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.times = 0;
|
this.times = 0;
|
||||||
|
@ -241,8 +241,8 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkInfo(id){//查询订单信息
|
checkInfo(id){//查询订单信息
|
||||||
|
|
|
@ -198,9 +198,7 @@
|
||||||
this.discountPrice = this.detailObj.price;
|
this.discountPrice = this.detailObj.price;
|
||||||
// 设置富文本
|
// 设置富文本
|
||||||
this.shopRich = this.$toolAll.tools.escape2Html(res.data.detail.content);
|
this.shopRich = this.$toolAll.tools.escape2Html(res.data.detail.content);
|
||||||
} else {
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
|
|
||||||
}
|
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
this.$toolAll.tools.showToast(err.msg);
|
this.$toolAll.tools.showToast(err.msg);
|
||||||
})
|
})
|
||||||
|
@ -245,8 +243,8 @@
|
||||||
this.$toolAll.tools.showToast('添加购物车成功(*^▽^*)');
|
this.$toolAll.tools.showToast('添加购物车成功(*^▽^*)');
|
||||||
this.csNum = 0;
|
this.csNum = 0;
|
||||||
}
|
}
|
||||||
}
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
})
|
}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$toolAll.tools.showToast('请选择商品参数')
|
this.$toolAll.tools.showToast('请选择商品参数')
|
||||||
|
|
Loading…
Reference in New Issue