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