xuhaolan 4 years ago
parent
commit
ba1b401e64

+ 19 - 0
api/index.js

@@ -1,5 +1,23 @@
 import request from '@/utils/request'
 import request from '@/utils/request'
 
 
+// 首页产品
+export function groom(data,type) {
+	return request({
+		url: '/api/groom/list/'+type,
+		method: 'get',
+		data
+	});
+}
+
+// 为你推荐
+export function getHot(data) {
+	return request({
+		url: '/api/product/hot',
+		method: 'get',
+		data
+	});
+}
+
 // 促销商品
 // 促销商品
 export function groom4(data) {
 export function groom4(data) {
 	return request({
 	return request({
@@ -16,6 +34,7 @@ export function groom1(data) {
 		data
 		data
 	});
 	});
 }
 }
+
 // 新品首发
 // 新品首发
 export function groom3(data) {
 export function groom3(data) {
 	return request({
 	return request({

+ 0 - 1
api/user.js

@@ -101,4 +101,3 @@ export function delcollect(data) {
 	});
 	});
 }
 }
 
 
-

+ 9 - 1
api/wallet.js

@@ -88,7 +88,6 @@ export function setBankInfo(data) {
 	});
 	});
 }
 }
 
 
-
 // 账户余额
 // 账户余额
 export function balance(data) {
 export function balance(data) {
 	return request({
 	return request({
@@ -98,5 +97,14 @@ export function balance(data) {
 	});
 	});
 }
 }
 
 
+// 账户余额
+export function exchange(data) {
+	return request({
+		url: '/api/exchange/list',
+		method: 'get',
+		data
+	});
+}
+
 
 
 
 

+ 11 - 13
manifest.json

@@ -70,19 +70,17 @@
             "base" : "/index/",
             "base" : "/index/",
             "mode" : "history"
             "mode" : "history"
         },
         },
-        "devServer" : {
-            "proxy" : {
-                "/api" : {
-                    "target" : "http://ls.frp.liuniu946.com/api",
-                    // "changeOrigin" : true,
-                    // "secure" : false,
-                    "pathRewrite" : {
-                        "/api" : "" // rewrite path
-                    }
-                }
-            },
-			"https": false
-        }
+		"devServer" : {
+		    "proxy" : {
+		        "/api" : {
+		            "target" : "http://ls.frp.liuniu946.com/api",
+		            // "changeOrigin": true,
+		            "pathRewrite" : {
+		                "/api" : "" // rewrite path
+		            }
+		        }
+		    }
+		}
     }
     }
 }
 }
 // rewrite path
 // rewrite path

+ 41 - 12
pages.json

@@ -347,15 +347,14 @@
 		{
 		{
 			"path": "pages/user/scoreAccumulate",
 			"path": "pages/user/scoreAccumulate",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "我的积分",
 				"navigationBarBackgroundColor": "transparent",
 				"navigationBarBackgroundColor": "transparent",
 				"navigationBarTextStyle": "white",
 				"navigationBarTextStyle": "white",
-					"app-plus": {
-						"titleNView": {
-							"type": "float",
-							"titleText": "我的积分"
-						}
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的积分"
 					}
 					}
+				}
 			}
 			}
 		},
 		},
 		{
 		{
@@ -626,15 +625,20 @@
       
       
         ,{
         ,{
             "path" : "pages/user/jifen",
             "path" : "pages/user/jifen",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的购物积分",
-                "enablePullDownRefresh": false
-            }
-            
+			"style": {
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的购物积分"
+					}
+				}
+			}
         }
         }
         ,{
         ,{
             "path" : "pages/user/yongjin",
             "path" : "pages/user/yongjin",
+<<<<<<< HEAD
                                                                                              
                                                                                              
            "style": {
            "style": {
            	"navigationBarTitleText": "我的佣金",
            	"navigationBarTitleText": "我的佣金",
@@ -666,6 +670,31 @@
                 "enablePullDownRefresh": false
                 "enablePullDownRefresh": false
             }
             }
             
             
+=======
+			"style": {
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的佣金"
+					}
+				}
+			}
+        }
+        ,{
+            "path" : "pages/user/balance",
+			"style": {
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的余额"
+					}
+				}
+			}
+>>>>>>> 816ece1ef8c8e0e56644f3a87f788448870be352
         }
         }
     ],
     ],
 	"subPackages": [
 	"subPackages": [

+ 10 - 3
pages/cart/cart.vue

@@ -15,7 +15,7 @@
 		<view v-else>
 		<view v-else>
 			<view class="header">
 			<view class="header">
 				<view class="">
 				<view class="">
-					购物车共3件商品
+					购物车共{{cartList.length}}件商品
 				</view>
 				</view>
 				<view class=""  @click="allChecked ? clearCart() : ''">
 				<view class=""  @click="allChecked ? clearCart() : ''">
 					清空购物车
 					清空购物车
@@ -224,9 +224,16 @@ export default {
 				cartList.cart_num >= cartList.trueStock || cartList.cart_num++
 				cartList.cart_num >= cartList.trueStock || cartList.cart_num++
 			}else if(type == "del") {
 			}else if(type == "del") {
 				if(cartList.cart_num <=1) {
 				if(cartList.cart_num <=1) {
-					this.deleteCartItem(index)
-					// this.cartList.splice(index, 1);
+						uni.showModal({
+							content: '删除该商品?',
+							success: e => {
+								if (e.confirm) {
+									this.deleteCartItem(index)
+								}
+							}
+						});
 				}
 				}
+				
 				cartList.cart_num <= 1 || cartList.cart_num--
 				cartList.cart_num <= 1 || cartList.cart_num--
 			}
 			}
 			const data = {
 			const data = {

+ 114 - 97
pages/category/category.vue

@@ -1,31 +1,19 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
 		<scroll-view scroll-y class="left-aside">
 		<scroll-view scroll-y class="left-aside">
-			<view v-for="item in flist" :key="item.id" class="f-item b-b" :class="{ active: item.id === currentId }" @click="tabtap(item)">
-				{{ item.cate_name }}
-			</view>
+			<view v-for="(item,index) in flist" :key="item.id" class="f-item b-b" :class="{ active: index === currentId }" @click="tabtap(item,index)">{{ item.cate_name }}</view>
 		</scroll-view>
 		</scroll-view>
-		<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop">
-			<view v-for="item in flist" :key="item.id" class="s-list" :id="'main-' + item.id">
-				<text class="s-item">{{ item.cate_name }}</text>
-				<view class="t-list ">
-					<view @click="navToList(item.id, titem.id)" class="t-item" v-for="titem in item.children" :key="titem.id">
-						<view class="">
-							<image :src="titem.pic"></image>
-						</view>
-						
-						<view class="titem-right">
-							<text>{{ titem.cate_name }}<br><text>跨店联盟洗护专属礼包</text></text>
-							<view class="titem-right-d">
-								<view class="price">
-									¥138
-								</view>
-								<view class="button">
-									马上购
-								</view>
-							</view>
+		<scroll-view :scroll-with-animation="scrollAnimation" scroll-y class="right-aside" :scroll-top="tabScrollTop" @scrolltolower="getProductsList(flist[currentId])">
+			<view class="t-list">
+				<view @click="navToList(item.id, titem.id)" class="t-item"  v-for="titem in flist[currentId].list" :key="titem.id">
+					<view class=""><image :src="titem.pic"></image></view>
+
+					<view class="titem-right">
+						<text class="clamp">{{ titem.store_name }}</text>
+						<view class="titem-right-d">
+							<view class="price">¥{{ titem.price }}</view>
+							<view class="button">马上购</view>
 						</view>
 						</view>
-						
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -34,14 +22,15 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { getCategoryList } from '@/api/product.js';
+import { getCategoryList, getProducts } from '@/api/product.js';
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
 			sizeCalcState: false,
 			sizeCalcState: false,
 			tabScrollTop: 0,
 			tabScrollTop: 0,
-			currentId: 1,
-			flist: [],
+			currentId: 0,
+			flist: ['list'],
+			scrollAnimation: true //是否开启动画
 		};
 		};
 	},
 	},
 	onLoad() {
 	onLoad() {
@@ -55,86 +44,113 @@ export default {
 	},
 	},
 	methods: {
 	methods: {
 		// 载入数据
 		// 载入数据
-		async loadData() {
+		loadData() {
 			let obj = this;
 			let obj = this;
 			getCategoryList({})
 			getCategoryList({})
 				.then(({ data }) => {
 				.then(({ data }) => {
+					console.log(data);
 					obj.flist = data.map(function(s) {
 					obj.flist = data.map(function(s) {
+						s.list = []; //用于保存当前分类下商品对象的数据
+						s.loadingType = 'more'; //判断当前商品分类数据是否已经加载完毕
+						s.page = 1; //当前商品分类加载的商品页数
+						s.limit = 10; //每次家在数据加载的数据条数
 						return s;
 						return s;
 					});
 					});
+					// console.log(obj.flist,"123456789")
+					obj.currentId = 0;
+					obj.getProductsList(obj.flist[0]);
 				})
 				})
 				.catch(err => {
 				.catch(err => {
 					console.log(err);
 					console.log(err);
 				});
 				});
 		},
 		},
-		//一级分类点击
-		tabtap(item) {
-			console.log(item);
-			// 判断有没有初始化页面高度对象数据
-			if (!this.sizeCalcState) {
-				this.calcSize();
-			}
-			// 获取当前点击的id
-			this.currentId = item.id;
-			this.tabScrollTop = item.top;
-		},
-		//右侧栏滚动
-		asideScroll(e) {
-			// 判断有没有初始化页面高度对象数据
-			if (!this.sizeCalcState) {
-				this.calcSize();
+		getProductsList(item, type = 'add') {
+			if (type === 'tabChange' && item.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
 			}
 			}
-			let scrollTop = e.detail.scrollTop;
-			let box = 0; //列表包裹框高度初始化
-			let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
-			// 查询当前页面对象
-			let view = uni.createSelectorQuery().select('.content');
-			view.fields(
-				{
-					id: true,
-					dataset: true,
-					rect: true,
-					size: true,
-					scrollOffset: true
-				},
-				function(e) {
-					// 保存包裹框高度
-					box = e.height;
-				}
-			).exec();
-			// 获取所有距离顶部大于滚轮距离页面高度的所有分类
-			let tabs = this.flist.filter(item =>( item.top-10) <= scrollTop).reverse();
-			if (tabs.length > 0) {
-				// 判断是否已经到达滚轮底部
-				if (box + scrollTop + bottom >= e.detail.scrollHeight) {
-					this.currentId = this.flist[this.flist.length - 1].id;
-				} else {
-					this.currentId = tabs[0].id;
-				}
+			if (item.loadingType === 'noMore' || item.loadingType === 'loading') {
+				//防止重复加载
+				return;
 			}
 			}
-		},
-		//计算右侧栏每个tab的高度等信息
-		calcSize() {
-			let h = 0;
-			this.flist.forEach(item => {
-				let view = uni.createSelectorQuery().select('#main-' + item.id);
-				view.fields(
-					{
-						size: true
-					},
-					data => {
-						item.top = h;
-						h += data.height;
-						item.bottom = h;
-					}
-				).exec();
+			item.loadingType = 'loading';
+			const obj = this;
+			const requestData = {
+				page: item.page,
+				limit: item.limit,
+				cid: item.id
+			};
+			return new Promise((ok, erro) => {
+				getProducts(requestData)
+					.then(({ data }) => {
+						item.list = item.list.concat(data);
+						item.page ++
+						if(item.limit != data.length){
+							item.loadingType = 'noMore'
+						}else {
+							item.loadingType = 'more'
+						}
+						this.$set(item, 'loaded', true);
+						obj.$nextTick(e => {
+							// 重新开启动画效果
+							uni.hideLoading();
+							// 数据加载完成后重新计算高度
+							obj.scrollAnimation = true;
+						});
+						ok(data);
+					})
+					.catch(err => {
+						erro(err);
+						console.log(err);
+					});
 			});
 			});
-			this.sizeCalcState = true;
 		},
 		},
+		//一级分类点击
+		tabtap(item,index) {
+			let obj = this;
+			// 获取当前点击的id
+			this.currentId = index;
+			obj.getProductsList(item);
+		},
+		//右侧栏滚动
+		// asideScroll(e) {
+		// 	// 判断有没有初始化页面高度对象数据
+		// 	if (!this.sizeCalcState) {
+		// 		this.calcSize();
+		// 	}
+		// 	let scrollTop = e.detail.scrollTop;
+		// 	let box = 0; //列表包裹框高度初始化
+		// 	let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
+		// 	// 查询当前页面对象
+		// 	let view = uni.createSelectorQuery().select('.content');
+		// 	view.fields(
+		// 		{
+		// 			id: true,
+		// 			dataset: true,
+		// 			rect: true,
+		// 			size: true,
+		// 			scrollOffset: true
+		// 		},
+		// 		function(e) {
+		// 			// 保存包裹框高度
+		// 			box = e.height;
+		// 		}
+		// 	).exec();
+		// 	// 获取所有距离顶部大于滚轮距离页面高度的所有分类
+		// 	let tabs = this.flist.filter(item =>( item.top-10) <= scrollTop).reverse();
+		// 	if (tabs.length > 0) {
+		// 		// 判断是否已经到达滚轮底部
+		// 		if (box + scrollTop + bottom >= e.detail.scrollHeight) {
+		// 			this.currentId = this.flist[this.flist.length - 1].id;
+		// 		} else {
+		// 			this.currentId = tabs[0].id;
+		// 		}
+		// 	}
+		// },
 		navToList(sid, tid) {
 		navToList(sid, tid) {
 			// 点击导航跳转到详细页面
 			// 点击导航跳转到详细页面
 			uni.navigateTo({
 			uni.navigateTo({
-				url: '/pages/product/list?fid='+this.currentId+'&sid='+sid+'&tid='+tid
+				url: '/pages/product/product?fid=' + this.currentId + '&sid=' + sid + '&tid=' + tid
 			});
 			});
 		}
 		}
 	}
 	}
@@ -155,8 +171,7 @@ page,
 	flex-shrink: 0;
 	flex-shrink: 0;
 	width: 200rpx;
 	width: 200rpx;
 	height: 100%;
 	height: 100%;
-	background-color: #F2F2F2;
-	
+	background-color: #f2f2f2;
 }
 }
 .f-item {
 .f-item {
 	display: flex;
 	display: flex;
@@ -179,7 +194,7 @@ page,
 			transform: translateY(-50%);
 			transform: translateY(-50%);
 			height: 100%;
 			height: 100%;
 			width: 4rpx;
 			width: 4rpx;
-			background-color: #1075FF;
+			background-color: #1075ff;
 			border-radius: 0 4px 4px 0;
 			border-radius: 0 4px 4px 0;
 			opacity: 0.8;
 			opacity: 0.8;
 		}
 		}
@@ -222,7 +237,7 @@ page,
 	margin-top: 20rpx;
 	margin-top: 20rpx;
 	flex-shrink: 0;
 	flex-shrink: 0;
 	display: flex;
 	display: flex;
-	border-bottom: solid 1rpx #F2F2F2;
+	border-bottom: solid 1rpx #f2f2f2;
 	// justify-content: center;
 	// justify-content: center;
 	// align-items: center;
 	// align-items: center;
 	// flex-direction: column;
 	// flex-direction: column;
@@ -238,11 +253,13 @@ page,
 		margin: 0 20rpx;
 		margin: 0 20rpx;
 		border-radius: 10rpx;
 		border-radius: 10rpx;
 	}
 	}
-	
+
 	.titem-right {
 	.titem-right {
+		width: 100%;
 		display: grid;
 		display: grid;
 		align-content: space-between;
 		align-content: space-between;
 		text:nth-child(1) {
 		text:nth-child(1) {
+			width: 100%;
 			color: #333333;
 			color: #333333;
 			font-size: 32rpx;
 			font-size: 32rpx;
 		}
 		}
@@ -253,13 +270,14 @@ page,
 		.titem-right-d {
 		.titem-right-d {
 			display: flex;
 			display: flex;
 			justify-content: space-between;
 			justify-content: space-between;
+			padding-right: 20rpx;
 			.price {
 			.price {
-				color: #FB3A2F;
+				color: #fb3a2f;
 				font-size: 32rpx;
 				font-size: 32rpx;
 			}
 			}
 			.button {
 			.button {
-				background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
-				background-color: #438BED;
+				background: linear-gradient(90deg, #438bed 0%, #44bfec 100%);
+				background-color: #438bed;
 				height: 50rpx;
 				height: 50rpx;
 				line-height: 50rpx;
 				line-height: 50rpx;
 				border-radius: 25rpx;
 				border-radius: 25rpx;
@@ -268,7 +286,6 @@ page,
 				font-size: 25rpx;
 				font-size: 25rpx;
 			}
 			}
 		}
 		}
-		
 	}
 	}
 }
 }
 </style>
 </style>

+ 23 - 6
pages/index/child/recommend.vue

@@ -30,22 +30,38 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import { getHot } from '@/api/index.js';
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
 				defaultImg: 'this.src="' + require('@/static/error/errorImage.jpg') + '"',
 				defaultImg: 'this.src="' + require('@/static/error/errorImage.jpg') + '"',
+				page: 1,
+				limit: 10,
+				bastList: []
 			}
 			}
 		},
 		},
+		mounted() {
+			this.loadData()
+		},
 		methods: {
 		methods: {
 			//详情页
 			//详情页
 			navToDetailPage(item) {
 			navToDetailPage(item) {
 				this.$parent.$parent.$parent.navToDetailPage(item)
 				this.$parent.$parent.$parent.navToDetailPage(item)
 			},
 			},
-		},
-		mounted() {
-			// this.getList()
-		},
-		props: ["bastList"]
+			// 为你推荐
+			async loadData() {
+				let obj = this;
+				let data = {
+					page: obj.page,
+					limit: obj.limit
+				}
+				getHot({data}).then(res => {
+					console.log(res.data)
+					this.bastList = res.data
+				})
+			}
+			
+		}
 	}
 	}
 </script>
 </script>
 
 
@@ -112,13 +128,14 @@
 					.ot-price {
 					.ot-price {
 						color: #999999;
 						color: #999999;
 						text-decoration: line-through;
 						text-decoration: line-through;
-						margin-right: 15rpx;
+						margin-right: 5rpx;
 					}
 					}
 					.price {
 					.price {
 						color: #EF3A55;
 						color: #EF3A55;
 						font-size: 35rpx;
 						font-size: 35rpx;
 					}
 					}
 					.button {
 					.button {
+						min-width: 125rpx;
 						background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
 						background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
 						background-color: #438BED;
 						background-color: #438BED;
 						height: 50rpx;
 						height: 50rpx;

+ 53 - 337
pages/index/index.vue

@@ -7,17 +7,12 @@
 				<view class="iconfont iconsearch"></view>
 				<view class="iconfont iconsearch"></view>
 				<view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
 				<view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
 			</view>
 			</view>
-		</view>
-		<view class="mp-height"></view> -->
+		</view> -->
 		<!-- #endif -->
 		<!-- #endif -->
 		<!-- 头部轮播 -->
 		<!-- 头部轮播 -->
-		<!-- <view class="headerInput" >
-			<input type="text" placeholder="请输入搜索内容"/>
-		</view> -->
 		<view class="carousel-section" style="background-color: #fff;">
 		<view class="carousel-section" style="background-color: #fff;">
 			<view class="headerInput" @click="clickSearch">
 			<view class="headerInput" @click="clickSearch">
 				<image src="../../static/img/is.png" mode=""></image>请输入搜索内容
 				<image src="../../static/img/is.png" mode=""></image>请输入搜索内容
-				<!-- <input type="text" value="" placeholder="请输入搜索内容" /> -->
 			</view>
 			</view>
 			<!-- 标题栏和状态栏占位符 -->
 			<!-- 标题栏和状态栏占位符 -->
 			<view class="titleNview-placing"></view>
 			<view class="titleNview-placing"></view>
@@ -28,12 +23,6 @@
 			<swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
 			<swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
 				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
 				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
 			</swiper>
 			</swiper>
-			<!-- 自定义swiper指示器 -->
-			<!-- <view class="swiper-dots">
-				<text class="num">{{ swiperCurrent + 1 }}</text>
-				<text class="sign">/</text>
-				<text class="num">{{ swiperLength }}</text>
-			</view> -->
 		</view>
 		</view>
 		<!-- 分类 -->
 		<!-- 分类 -->
 		<view class="cate-section">
 		<view class="cate-section">
@@ -53,290 +42,19 @@
 					<text>充值送积分</text>
 					<text>充值送积分</text>
 				</view>
 				</view>
 			</navigator>
 			</navigator>
-			<!-- <navigator url="/pages/index/sign"> -->
 				<view class="cate-item" @click="Toshare">
 				<view class="cate-item" @click="Toshare">
 					<image src="/static/icon/in4.png"></image>
 					<image src="/static/icon/in4.png"></image>
 					<text>邀请有礼</text>
 					<text>邀请有礼</text>
 				</view>
 				</view>
-			<!-- </navigator> -->
 		</view>
 		</view>
-		
 		<!-- 精选好物 -->
 		<!-- 精选好物 -->
 		<view class="goods">
 		<view class="goods">
 			<hot-goods :goodsList="goodsList"></hot-goods>
 			<hot-goods :goodsList="goodsList"></hot-goods>
 		</view>
 		</view>
-		<!-- <br> -->
 		<!-- 为你推荐 -->
 		<!-- 为你推荐 -->
 		<view class="recommend-h">
 		<view class="recommend-h">
 			<recommend :bastList="bastList"></recommend>
 			<recommend :bastList="bastList"></recommend>
 		</view>
 		</view>
-		<!-- <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view> -->
-		<!-- 可领取优惠券 -->
-		<!-- <scroll-view class="coupon-box clamp" :scroll-x="true">
-			<view v-for="(item, index) in couponArray" :key="item.id" class="coupon-list">
-				<view class="row flex">
-					<view class="list-money flex">
-						<image :src="item.is_use ? '/static/img/img02.png' : '/static/img/img03.png'" mode="scaleToFill"></image>
-						<view class="list-money-text">
-							<view class="tit" :class="{ noAction: item.is_use }">
-								<text>{{ item.coupon_price }}</text>
-							</view>
-						</view>
-					</view>
-					<view class="list-interval position-relative">
-						<view class="bottom"></view>
-						<view class="top"></view>
-					</view>
-					<view class="row_list_right">
-						<view class="right_top"><text class="right_title" :class="{ noAction: item.is_use }">满减券</text></view>
-						<view class="right_time">
-							<text>满{{ item.use_min_price }}使用</text>
-						</view>
-					</view>
-					<view class="right_use" :class="{ noAction: item.is_use }" @click="setCoupons(item)">
-						<text>{{ item.is_use ? '已领取' : '立即领取' }}</text>
-					</view>
-				</view>
-			</view>
-		</scroll-view>
- -->
-		<!-- 秒杀楼层 -->
-		<!-- <seckill></seckill> -->
-		<!-- 砍价 -->
-		<!-- <view class="hot-goods"> -->
-			<!-- <view class="hot-headers flex-upDown-center"> -->
-				<!-- <image class="img" src="../../static/img/img44.png"></image> -->
-				<!-- <view class="hot-title">超值砍价</view>
-				<view><view class="more" @click.stop="navTo('/pages/activity/goods_bargain/index')">更多</view></view>
-			</view> -->
-			<!-- <view class="hot-lists" v-for="(baritem, barindex) in bargainlist" :key="barindex" @click.stop="navToDetailPages(baritem)">
-				<view class="hot-produce">
-					<view class="produce-image"><image :src="baritem.image"></image></view>
-					<view class="produce-content">
-						<view class="produce-price1 ">
-							<view class="produce-name line2">{{ baritem.title }}</view>
-							<view class="produce-info">
-								已抢
-								<text style="color: #FF383E">{{ baritem.sales }}</text>
-								箱/仅剩
-								<text style="color:#FF383E">{{ baritem.stock }}</text>
-								箱
-							</view>
-							<view class="produce-center">
-								<view class="kanjia_word">
-									<view class="word-1">原价:¥{{ baritem.price }}</view>
-									<view class="word-2">
-										砍后价
-										<text style="font-size: 24rpx;">¥</text>
-										<text style="font-size: 36rpx;">{{ baritem.min_price }}</text>
-									</view>
-								</view>
-								<view
-									class="kanjia_button flex-center"
-									@tap.stop="openSubscribe('/pages/activity/goods_bargain_details/index?id=' + baritem.id + '&bargain=' + userInfo.uid)"
-								>
-									<view>查看详情</view>
-								</view>
-							</view>
-						</view>
-					</view>
-				</view> -->
-			<!-- </view> -->
-		<!-- </view> -->
-		<!-- 拼团楼层 -->
-
-		<!-- <view class="recommend flex">
-			<view class="recommend_list" @click="change(ls.id)" v-for="ls in recommend">
-				<view class="re_title" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_title }}</view>
-				<view class="re_name" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_name }}</view>
-				<image class="selected_icon" v-bind:class="{ active: ls.id == checkid }" src="/static/img/img04.png"></image>
-			</view>
-		</view>
-		<swiper id="list-box" @change="listChange" :style="{ height: swiperHeight + 'px' }" :current="checkid">
-			<swiper-item> -->
-				<!-- <scroll-view scroll-y="true" class="list-box-h"> -->
-				<!-- <view class="guess-section">
-					<view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-						<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-						<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-						<view class="cmy-hr"></view>
-						<view class="price margin-c-20 flex">
-							<view>
-								<text class="font-size-sm ">¥</text>
-								{{ item.price }}
-							</view>
-							<view class="font-size-sm">
-								<text class="font-color-gray">{{ item.sales }}人购买</text>
-							</view>
-						</view>
-					</view>
-				</view> -->
-				<!-- </scroll-view> -->
-			<!-- </swiper-item> -->
-			<!-- <swiper-item>
-				<scroll-view scroll-y="true" class="list-box-h">
-					<view class="guess-section">
-						<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-							<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-							<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-							<view class="cmy-hr"></view>
-							<view class="price margin-c-20 flex">
-								<view>
-									<text class="font-size-sm ">¥</text>
-									{{ item.price }}
-								</view>
-								<view class="font-size-sm">
-									<text class="font-color-gray">{{ item.sales }}人购买</text>
-								</view>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</swiper-item>
-			<swiper-item>
-				<scroll-view scroll-y="true">
-					<view class="guess-section">
-						<view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
-							<navigator :url="item.link">
-								<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-								<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-								<view class="cmy-hr"></view>
-								<view class="price margin-c-20 flex">
-									<view>
-										<text class="font-size-sm ">¥</text>
-										{{ item.price }}
-									</view>
-									<view class="font-size-sm">
-										<text class="font-color-gray">库存{{ item.stock + item.unit_name }}</text>
-									</view>
-								</view>
-							</navigator>
-						</view>
-					</view>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
- -->
-		<!-- 精品 商品 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">精品推荐</text></view>
-			<navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<!-- 最新 商品 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">最新商品</text></view>
-			<navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<!-- 促销 商品 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">促销商品</text></view>
-			<navigator url="/pages/product/classify?type=4"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<!-- 会员升级专区 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">会员升级专区</text></view>
-			<text class="iconfont iconenter">更多</text>
-		</view> -->
-		<!-- <view class="uservip flex">
-			<image @error="onImageError('userServant', 0)" lazy-load :src="userServant[0].image" mode="aspectFill"></image>
-			<view class="detail">
-				<view class="title">满园春1999元会员升级礼包</view>
-				<view class="icon">自营</view>
-				<view class="flex price-box">
-					<view class="price">
-						<text class="font-size-sm">¥</text>
-						18888
-					</view>
-					<view class="text">115人购买</view>
-				</view>
-			</view>
-		</view> -->
-
-		<!-- 精品推荐 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">精品推荐</text></view>
-			<text class="iconfont iconenter">更多</text>
-		</view> -->
-		<!-- <view class="guess-section">
-			<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image @error="onImageError('goodsList', index)" lazy-load :src="item.image" mode="aspectFill"></image></view>
-				<text class="title clamp margin-c-20">
-					<text class="icon">自营</text>
-					{{ item.title }}
-				</text>
-				<view class="hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<view class='detail'>
-							<text class="icon">代理价</text>
-							<text></text>
-						</view>
-						<view class="detail">
-							<text class="font-color-yellow">会员价</text>
-							<text class="font-color-yellow">7.5折</text>
-						</view>
-					</view>
-				</view>
-				<view class="tip">兑换价¥44+44积分</view>
-			</view>
-		</view> -->
 		<view class="Mask" v-show="shareShow">
 		<view class="Mask" v-show="shareShow">
 			<image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
 			<image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
 			<view class="Toshare" @click="Toshare"></view>
 			<view class="Toshare" @click="Toshare"></view>
@@ -349,7 +67,7 @@
 import seckill from '../../components/seckill/seckill.vue';
 import seckill from '../../components/seckill/seckill.vue';
 import hotGoods from './child/hotGoods.vue';
 import hotGoods from './child/hotGoods.vue';
 import recommend from './child/recommend.vue'
 import recommend from './child/recommend.vue'
-import { loadIndexs } from '@/api/index.js';
+import { loadIndexs,getHot } from '@/api/index.js';
 import { getUserInfo } from '@/api/user.js';
 import { getUserInfo } from '@/api/user.js';
 import { setCoupons } from '@/api/functionalUnit.js';
 import { setCoupons } from '@/api/functionalUnit.js';
 import { getBargainList } from '@/api/product.js';
 import { getBargainList } from '@/api/product.js';
@@ -470,7 +188,7 @@ export default {
 			interceptor();
 			interceptor();
 		}
 		}
 		this.loadData();
 		this.loadData();
-		this.getBargainList();
+		// this.getBargainList();
 	},
 	},
 	//下拉刷新
 	//下拉刷新
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -478,29 +196,29 @@ export default {
 	},
 	},
 	// #ifndef MP
 	// #ifndef MP
 	// 监听导航栏输入框点击事件
 	// 监听导航栏输入框点击事件
-	onNavigationBarSearchInputClicked(e) {
-		//跳转到搜索页面
-		this.clickSearch();
-	},
+	// onNavigationBarSearchInputClicked(e) {
+	// 	//跳转到搜索页面
+	// 	this.clickSearch();
+	// },
 	//点击导航栏 buttons 时触发
 	//点击导航栏 buttons 时触发
-	onNavigationBarButtonTap(e) {
-		const index = e.index;
-		if (index === 0) {
-			this.$api.msg('点击了扫描');
-		} else if (index === 1) {
-			// #ifdef APP-PLUS
-			const pages = getCurrentPages();
-			const page = pages[pages.length - 1];
-			const currentWebview = page.$getAppWebview();
-			currentWebview.hideTitleNViewButtonRedDot({
-				index
-			});
-			// #endif
-			uni.navigateTo({
-				url: '/pages/user/notice'
-			});
-		}
-	},
+	// onNavigationBarButtonTap(e) {
+	// 	const index = e.index;
+	// 	if (index === 0) {
+	// 		this.$api.msg('点击了扫描');
+	// 	} else if (index === 1) {
+	// 		// #ifdef APP-PLUS
+	// 		const pages = getCurrentPages();
+	// 		const page = pages[pages.length - 1];
+	// 		const currentWebview = page.$getAppWebview();
+	// 		currentWebview.hideTitleNViewButtonRedDot({
+	// 			index
+	// 		});
+	// 		// #endif
+	// 		uni.navigateTo({
+	// 			url: '/pages/user/notice'
+	// 		});
+	// 	}
+	// },
 	// #endif
 	// #endif
 	methods: {
 	methods: {
 		//跳转
 		//跳转
@@ -541,20 +259,20 @@ export default {
 				});
 				});
 			// #endif
 			// #endif
 		},
 		},
-		getBargainList() {
-			let that = this;
+		// getBargainList() {
+		// 	let that = this;
 		
 		
-			getBargainList({
-				page: that.page,
-				limit: that.limit
-			})
-				.then(function(res) {
-					that.$set(that, 'bargainlist', res.data.slice(0, 2));
-				})
-				.catch(res => {
-					console.log(res, 'getBargainList');
-				});
-		},
+		// 	getBargainList({
+		// 		page: that.page,
+		// 		limit: that.limit
+		// 	})
+		// 		.then(function(res) {
+		// 			that.$set(that, 'bargainlist', res.data.slice(0, 2));
+		// 		})
+		// 		.catch(res => {
+		// 			console.log(res, 'getBargainList');
+		// 		});
+		// },
 		Mask() {
 		Mask() {
 			this.MaskShow = false;
 			this.MaskShow = false;
 			this.shareShow = true;
 			this.shareShow = true;
@@ -616,19 +334,19 @@ export default {
 			});
 			});
 		},
 		},
 		//商品种类切换
 		//商品种类切换
-		change(item) {
-			let id = item;
-			this.checkid = id;
-			if (this.checkid == 1) {
-				// console.log(1);
-				this.detail = this.selected_detail;
-			} else if (this.checkid == 2) {
-				// console.log(2);
-				this.detail = this.new_product;
-			} else {
-				this.detail = this.cheap_good;
-			}
-		},
+		// change(item) {
+		// 	let id = item;
+		// 	this.checkid = id;
+		// 	if (this.checkid == 1) {
+		// 		// console.log(1);
+		// 		this.detail = this.selected_detail;
+		// 	} else if (this.checkid == 2) {
+		// 		// console.log(2);
+		// 		this.detail = this.new_product;
+		// 	} else {
+		// 		this.detail = this.cheap_good;
+		// 	}
+		// },
 		// 监听图片加载完成
 		// 监听图片加载完成
 		onImageError(key, index) {
 		onImageError(key, index) {
 			this[key][index].image = '/static/error/errorImage.jpg';
 			this[key][index].image = '/static/error/errorImage.jpg';
@@ -638,13 +356,11 @@ export default {
 			loadIndexs({})
 			loadIndexs({})
 				.then(({ data }) => {
 				.then(({ data }) => {
 					let goods = data.info;
 					let goods = data.info;
+					console.log(goods)
 					this.carouselList = data.banner;
 					this.carouselList = data.banner;
 					this.swiperLength = this.carouselList.length;
 					this.swiperLength = this.carouselList.length;
-					this.menusList = data.menus;
 					this.goodsList = goods.firstList; //最新商品
 					this.goodsList = goods.firstList; //最新商品
-					console.log(goods.firstList)
-					this.bastList = goods.bastList; //精品推荐
-					this.bastBanner = data.benefit; //促销单品
+					// this.bastList = goods.bastList; //精品推荐
 					this.$set(this, 'couponArray', data.couponList); //保存卡包券
 					this.$set(this, 'couponArray', data.couponList); //保存卡包券
 
 
 					uni.stopPullDownRefresh();
 					uni.stopPullDownRefresh();

+ 16 - 37
pages/money/USDT.vue

@@ -40,7 +40,7 @@
 <script>
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import { getMoneyStyle } from '@/utils/rocessor.js';
 // #ifdef H5
 // #ifdef H5
-import { rechargeWechat } from '@/api/wallet.js';
+import { rechargeWechat,exchange } from '@/api/wallet.js';
 // #endif
 // #endif
 // #ifdef MP
 // #ifdef MP
 import { rechargeRoutine } from '@/api/wallet.js';
 import { rechargeRoutine } from '@/api/wallet.js';
@@ -59,42 +59,9 @@ export default {
 				type: "充币",
 				type: "充币",
 				time: "2018-05-12 16:24:45",
 				time: "2018-05-12 16:24:45",
 				money: 9898,
 				money: 9898,
-			},
-			{
-				type: "提币",
-				time: "2020-05-12 16:24:45",
-				money: 99,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			}]
+			}],
+			page: 1,
+			limit: 10
 		};
 		};
 	},
 	},
 	onLoad(options) {},
 	onLoad(options) {},
@@ -103,6 +70,9 @@ export default {
 		...mapState(['weichatObj'])
 		...mapState(['weichatObj'])
 		// #endif
 		// #endif
 	},
 	},
+	mounted() {
+		this.getExchange()
+	},
 	methods: {
 	methods: {
 		// 跳转
 		// 跳转
 		navTo(url) {
 		navTo(url) {
@@ -110,6 +80,15 @@ export default {
 				url: url
 				url: url
 			});
 			});
 		},
 		},
+		getExchange() {
+			let data = {
+				page: this.page,
+				limit: this.limit
+			}
+			exchange( data ).then(res => {
+				console.log(res.data)
+			})
+		},
 		// 切换选中对象
 		// 切换选中对象
 		tabRadio(e) {
 		tabRadio(e) {
 			this.type = e;
 			this.type = e;

+ 0 - 2
pages/money/USDThuzhuan.vue

@@ -109,9 +109,7 @@
 			margin: 0 auto;
 			margin: 0 auto;
 			text-align: center;
 			text-align: center;
 			border: 1rpx solid #44BFEC;
 			border: 1rpx solid #44BFEC;
-			background: linear-gradient(90deg, #44BFEC, #438BED);
 			border-radius: 10rpx;
 			border-radius: 10rpx;
-			font-size: 36rpx;
 			font-family: PingFang SC;
 			font-family: PingFang SC;
 			font-weight: bold;
 			font-weight: bold;
 			color: #FFFFFF;
 			color: #FFFFFF;

+ 2 - 2
pages/order/order.vue

@@ -298,7 +298,7 @@ export default {
 		//订单状态文字和颜色
 		//订单状态文字和颜色
 		orderStateExp(state) {
 		orderStateExp(state) {
 			let stateTip = '',
 			let stateTip = '',
-				stateTipColor = '#fa436a';
+				stateTipColor = '#438BED';
 			switch (+state) {
 			switch (+state) {
 				case 0:
 				case 0:
 					stateTip = '待付款';
 					stateTip = '待付款';
@@ -520,7 +520,7 @@ page,
 		text-align: center;
 		text-align: center;
 		line-height: 60rpx;
 		line-height: 60rpx;
 		font-size: $font-sm + 2rpx;
 		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
+		color: $font-color-base;
 		background: #fff;
 		background: #fff;
 		border-radius: 100px;
 		border-radius: 100px;
 		&:after {
 		&:after {

+ 44 - 38
pages/product/classify.vue

@@ -8,20 +8,9 @@
 				</swiper-item>
 				</swiper-item>
 			</swiper>
 			</swiper>
 		</view> -->
 		</view> -->
-		<!-- <view class="type-title-box flex">
-			<view class="title-border"></view>
-			<view class="title-content">
-				<text v-if="type == 1">精品推荐</text>
-				<text v-if="type == 2">热门榜单</text>
-				<text v-if="type == 3">首发新品</text>
-				<text v-if="type == 4">促销单品</text>
-			</view>
-			<view class="title-border"></view>
-		</view> -->
-
 		<view class="goodsList-box">
 		<view class="goodsList-box">
 			<view class="goodsList-item flex" :key="ind" v-for="(ls, ind) in list">
 			<view class="goodsList-item flex" :key="ind" v-for="(ls, ind) in list">
-				<image :src="ls.image || errImg" mode=" scaleToFill"></image>
+				<image :src="ls.image" mode=" scaleToFill"></image>
 				<view class="goodsList-content">
 				<view class="goodsList-content">
 					<view class="title">
 					<view class="title">
 						<text class="clamp2">{{ ls.store_name }}</text>
 						<text class="clamp2">{{ ls.store_name }}</text>
@@ -38,7 +27,6 @@
 							<!-- </view> -->
 							<!-- </view> -->
 						</view>
 						</view>
 						<view class="button" @click="navTo(ls)">立即购买</view>
 						<view class="button" @click="navTo(ls)">立即购买</view>
-						<!-- <view @click="navTo(ls)" class="cart iconfont iconcart"></view> -->
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -47,14 +35,16 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { groomList } from '@/api/product.js';
+import { loadIndexs,groom } from '@/api/index.js';
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
 			list: [],
 			list: [],
 			bannerImg: [],
 			bannerImg: [],
 			title: '',
 			title: '',
-			errImg: require('@/static/error/errorImage.jpg')
+			goods: [],
+			page: 1,
+			limit: 10
 		};
 		};
 	},
 	},
 	onLoad(option) {
 	onLoad(option) {
@@ -64,7 +54,7 @@ export default {
 		this.loadData();
 		this.loadData();
 	},
 	},
 	created() {
 	created() {
-		this.getTitle()
+		
 	},
 	},
 	mounted() {
 	mounted() {
 		
 		
@@ -75,8 +65,10 @@ export default {
 			let title = ''
 			let title = ''
 			if(this.type == 1) {
 			if(this.type == 1) {
 				title = "精选好货"
 				title = "精选好货"
+				// this.list = this.goods.bastList
 			}else if(this.type == 2) {
 			}else if(this.type == 2) {
 				title = "热销专区"
 				title = "热销专区"
+				// this.list = this.goods.likeInfo
 			}else if(this.type == 3) {
 			}else if(this.type == 3) {
 				title = "收藏夹"
 				title = "收藏夹"
 			}else {
 			}else {
@@ -93,30 +85,44 @@ export default {
 		},
 		},
 		// 请求载入数据
 		// 请求载入数据
 		async loadData() {
 		async loadData() {
-			groomList({}, this.type)
-				.then(({ data }) => {
-					// 保存轮播图
-					this.bannerImg = data.banner;
-					// 保存商品信息
-					this.list = data.list;
-				})
-				.catch(e => {
-					console.log(e);
-				});
+			// loadIndexs({})
+			// 	.then(({ data }) => {
+			// 		let goods = data.info;
+			// 		console.log(data)
+			// 		this.goods = goods
+			// 		this.goods.likeInfo = data.likeInfo
+			// 		// this.goodsList = goods.firstList; //最新商品
+			// 		// this.bastList = goods.bastList; //精品推荐
+			// 		this.getTitle()
+			// 		uni.stopPullDownRefresh();
+			// 	})
+			// 	.catch(e => {
+			// 		uni.stopPullDownRefresh();
+			// 	});
+			let data = {
+				page: this.page,
+				limit: this.limit
+			}
+			let type = this.type
+			groom(data,type).then(res => {
+				this.list = res.data.list
+				this.getTitle()
+				console.log(res.data)
+			})
 		},
 		},
 		// 轮播图跳转
 		// 轮播图跳转
-		bannerNavToUrl(item) {
-			// #ifdef H5
-			if (item.wap_link.indexOf('http') > 0) {
-				window.location.href = item.wap_link;
-			}
-			// #endif
-			if (item.wap_link) {
-				uni.navigateTo({
-					url: item.wap_link
-				});
-			}
-		}
+		// bannerNavToUrl(item) {
+		// 	// #ifdef H5
+		// 	if (item.wap_link.indexOf('http') > 0) {
+		// 		window.location.href = item.wap_link;
+		// 	}
+		// 	// #endif
+		// 	if (item.wap_link) {
+		// 		uni.navigateTo({
+		// 			url: item.wap_link
+		// 		});
+		// 	}
+		// }
 	}
 	}
 };
 };
 </script>
 </script>

+ 2 - 0
pages/user/jifen.vue

@@ -116,8 +116,10 @@ export default {
 				state
 				state
 			)
 			)
 				.then(({ data }) => {
 				.then(({ data }) => {
+					console.log(data)
 					if (data.length > 0) {
 					if (data.length > 0) {
 						navItem.orderList = navItem.orderList.concat(data);
 						navItem.orderList = navItem.orderList.concat(data);
+						console.log(navItem.orderList)
 						navItem.page++;
 						navItem.page++;
 					}
 					}
 					if (navItem.limit == data.length) {
 					if (navItem.limit == data.length) {

+ 419 - 498
pages/user/user.vue

@@ -3,31 +3,20 @@
 		<view class="vheigh"></view>
 		<view class="vheigh"></view>
 		<scroll-view class="content-box" scroll-y="true">
 		<scroll-view class="content-box" scroll-y="true">
 			<view class="user-section">
 			<view class="user-section">
-				<view class="bg">
-					<image src="../../static/user/bg.png" mode=""></image>
-				</view>
+				<view class="bg"><image src="../../static/user/bg.png" mode=""></image></view>
 				<view class="user-info-box ">
 				<view class="user-info-box ">
 					<view class="detail flex" @click="navTo('/pages/set/userinfo')">
 					<view class="detail flex" @click="navTo('/pages/set/userinfo')">
-						<view class="portrait-box">
-							<image class="portrait" :src="userInfo.avatar || '/static/error/missing-face.png'"></image>
-						</view>
+						<view class="portrait-box"><image class="portrait" :src="userInfo.avatar || '/static/error/missing-face.png'"></image></view>
 						<view class="info-box">
 						<view class="info-box">
-							<view class="username">{{ userInfo.nickname || '游客' }}111111</view>
-							<view class="phone">
-								18952592739
-							</view>
+							<view class="username">{{ userInfo.nickname || '游客' }}</view>
+							<view class="phone">{{ userInfo.phone }}</view>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="config iconfont">
 					<view class="config iconfont">
-						<view class="config-img">
-							<image src="../../static/user/set.png" mode=""></image>
-						</view>
+						<view class="config-img"><image src="../../static/user/set.png" mode=""></image></view>
 						<text class="setting " @click="navTo('/pages/set/set')">设置</text>
 						<text class="setting " @click="navTo('/pages/set/set')">设置</text>
-
 					</view>
 					</view>
 				</view>
 				</view>
-
-
 			</view>
 			</view>
 			<view class="order-box">
 			<view class="order-box">
 				<view class="order">
 				<view class="order">
@@ -36,107 +25,67 @@
 				</view>
 				</view>
 				<view class="order1">
 				<view class="order1">
 					<view class="order-content1">
 					<view class="order-content1">
-						<view class="order-item1" @click="navTo('/pages/money/wallet')" hover-class="common-hover"
-							:hover-stay-time="50">
-							<view class="icon1">
-								<image class="icon-img1" src="/static/user/user01.png" mode="aspectFit"></image>
-							</view>
+						<view class="order-item1" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon1"><image class="icon-img1" src="/static/user/user01.png" mode="aspectFit"></image></view>
 							<text>待付款</text>
 							<text>待付款</text>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="order-content1">
 					<view class="order-content1">
-						<view class="order-item1" @click="navTo('/pages/money/wallet')" hover-class="common-hover"
-							:hover-stay-time="50">
-							<view class="icon1">
-								<image class="icon-img1" src="/static/user/user02.png" mode="aspectFit"></image>
-							</view>
+						<view class="order-item1" @click="navTo('/pages/order/order?state=1')" hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon1"><image class="icon-img1" src="/static/user/user02.png" mode="aspectFit"></image></view>
 							<text>待发货</text>
 							<text>待发货</text>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="order-content1">
 					<view class="order-content1">
-						<view class="order-item1" @click="navTo('/pages/money/wallet')" hover-class="common-hover"
-							:hover-stay-time="50">
-							<view class="icon1">
-								<image class="icon-img1" src="/static/user/user03.png" mode="aspectFit"></image>
-							</view>
+						<view class="order-item1" @click="navTo('/pages/order/order?state=2')" hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon1"><image class="icon-img1" src="/static/user/user03.png" mode="aspectFit"></image></view>
 							<text>待收货</text>
 							<text>待收货</text>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="order-content1">
 					<view class="order-content1">
-						<view class="order-item1" @click="navTo('/pages/money/wallet')" hover-class="common-hover"
-							:hover-stay-time="50">
-							<view class="icon1">
-								<image class="icon-img1" src="/static/user/user04.png" mode="aspectFit"></image>
-							</view>
+						<view class="order-item1" @click="navTo('/pages/order/order?state=4')" hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon1"><image class="icon-img1" src="/static/user/user04.png" mode="aspectFit"></image></view>
 							<text>已完成</text>
 							<text>已完成</text>
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 
 
-			<view class="cover-container" @touchstart="coverTouchstart" @touchmove="coverTouchmove"
-				@touchend="coverTouchend">
+			<view class="cover-container" @touchstart="coverTouchstart" @touchmove="coverTouchmove" @touchend="coverTouchend">
 				<!-- <image class="arc" src="/static/img/arc.png"></image> -->
 				<!-- <image class="arc" src="/static/img/arc.png"></image> -->
 
 
-
-
-
-
 				<view class="item-box">
 				<view class="item-box">
 					<!-- <view class="box-title flex borde-b">
 					<!-- <view class="box-title flex borde-b">
 						<view class="title"><text>我的资产</text></view>
 						<view class="title"><text>我的资产</text></view>
 					</view> -->
 					</view> -->
 					<view class="order-section">
 					<view class="order-section">
-						<view class="order-item" @click="navTo('/pages/user/balance')" hover-class="common-hover"
-							:hover-stay-time="50">
-							<view class="icon">
-								<image class="icon-img" src="/static/user/user09.png" mode="aspectFit"></image>
-							</view>
+						<view class="order-item" @click="navTo('/pages/user/balance')" hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon"><image class="icon-img" src="/static/user/user09.png" mode="aspectFit"></image></view>
 							<text>我的余额</text>
 							<text>我的余额</text>
 						</view>
 						</view>
-						<view class="order-item" @click="navTo('/pages/user/yongjin')" hover-class="common-hover"
-							:hover-stay-time="50">
-							<view class="icon">
-								<image class="icon-img" src="/static/user/user06.png" mode="aspectFit"></image>
-							</view>
+						<view class="order-item" @click="navTo('/pages/user/yongjin')" hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon"><image class="icon-img" src="/static/user/user06.png" mode="aspectFit"></image></view>
 							<text>我的佣金</text>
 							<text>我的佣金</text>
 						</view>
 						</view>
-						<view class="order-item" @click="navTo('/pages/user/scoreAccumulate')" hover-class="common-hover"
-							:hover-stay-time="50">
-							<view class="icon">
-								<image class="icon-img" src="/static/user/user18.png" mode="aspectFit"></image>
-							</view>
+						<view class="order-item" @click="navTo('/pages/user/scoreAccumulate')" hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon"><image class="icon-img" src="/static/user/user18.png" mode="aspectFit"></image></view>
 							<text>我的积分</text>
 							<text>我的积分</text>
 						</view>
 						</view>
-						<view class="order-item" @click="navTo('/pages/user/jifen')" hover-class="common-hover"
-							:hover-stay-time="50">
-							<view class="icon">
-								<image class="icon-img" src="/static/user/user07.png" mode="aspectFit"></image>
-							</view>
+						<view class="order-item" @click="navTo('/pages/user/jifen')" hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon"><image class="icon-img" src="/static/user/user07.png" mode="aspectFit"></image></view>
 							<text>购物积分</text>
 							<text>购物积分</text>
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
 
 
-
 				<view class="history-section icon">
 				<view class="history-section icon">
-
-
 					<uni-list>
 					<uni-list>
-						<uni-list-item title="我的推广" @click="navTo('/pages/money/wallet')"
-							thumb="/static/user/user12.png"></uni-list-item>
-						<uni-list-item title="USDT专区" @click="navTo('/pages/money/USDT')"
-							thumb="/static/user/user16.png">
-						</uni-list-item>
-						<uni-list-item title="收款方式" @click="navTo('/pages/collection/collection')"
-							thumb="/static/user/user15.png"></uni-list-item>
-						<uni-list-item title="邀请好友" @click="navTo('/pages/user/invite')"
-							thumb="/static/user/user11.png">
-						</uni-list-item>
-						<uni-list-item title="我的收藏" @click="navTo('/pages/user/favorites')"
-							thumb="/static/user/user14.png"></uni-list-item>
-						<uni-list-item title="收货地址" @click="navTo('/pages/set/address')"
-							thumb="/static/user/user13.png"></uni-list-item>
+						<uni-list-item title="我的推广" @click="navTo('/pages/money/wallet')" thumb="/static/user/user12.png"></uni-list-item>
+						<uni-list-item title="USDT专区" @click="navTo('/pages/money/USDT')" thumb="/static/user/user16.png"></uni-list-item>
+						<uni-list-item title="收款方式" @click="navTo('/pages/collection/collection')" thumb="/static/user/user15.png"></uni-list-item>
+						<uni-list-item title="邀请好友" @click="navTo('/pages/user/invite')" thumb="/static/user/user11.png"></uni-list-item>
+						<uni-list-item title="我的收藏" @click="navTo('/pages/user/favorites')" thumb="/static/user/user14.png"></uni-list-item>
+						<uni-list-item title="收货地址" @click="navTo('/pages/set/address')" thumb="/static/user/user13.png"></uni-list-item>
 					</uni-list>
 					</uni-list>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -144,505 +93,477 @@
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import uniList from '@/components/uni-list/uni-list.vue';
-	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-	import {
-		orderData,
-		userinfo
-	} from '@/api/user.js';
-	import {
-		saveUrl,
-		interceptor
-	} from '@/utils/loginUtils.js';
-	let startY = 0,
-		moveY = 0,
-		pageAtTop = true;
-	export default {
-		components: {
-			uniList,
-			uniListItem
-		},
-		data() {
-			return {
-				coverTransform: 'translateY(0px)',
-				coverTransition: '0s',
-				moving: false,
-				userDowm: 0, //卡片升级专属高度
-				userMaxDowm: 0 //卡片最高高度
-			};
+import { mapState, mapMutations } from 'vuex';
+import uniList from '@/components/uni-list/uni-list.vue';
+import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+import { orderData, userinfo } from '@/api/user.js';
+import { saveUrl, interceptor } from '@/utils/loginUtils.js';
+let startY = 0,
+	moveY = 0,
+	pageAtTop = true;
+export default {
+	components: {
+		uniList,
+		uniListItem
+	},
+	data() {
+		return {
+			coverTransform: 'translateY(0px)',
+			coverTransition: '0s',
+			moving: false,
+			userDowm: 0, //卡片升级专属高度
+			userMaxDowm: 0 //卡片最高高度
+		};
+	},
+	onShow() {
+		// 判断是否已经登录
+		if (this.hasLogin) {
+			this.loadBaseData();
+		}
+	},
+	onReady() {
+		// 初始化获取页面宽度
+		uni.createSelectorQuery()
+			.select('.container')
+			.fields(
+				{
+					size: true
+				},
+				data => {
+					// 计算最多下拉的高度
+					this.userDowm = Math.floor((data.width / 750) * 185);
+					// 计算最大触发修改高度事件
+					this.userMaxDowm = Math.floor((data.width / 750) * 250);
+				}
+			)
+			.exec();
+	},
+	// #ifndef MP
+	// onNavigationBarButtonTap(e) {
+	// 	const index = e.index;
+	// 	if (index === 0) {
+	// 		this.navTo('/pages/set/set');
+	// 	} else if (index === 1) {
+	// 		// #ifdef APP-PLUS
+	// 		const pages = getCurrentPages();
+	// 		const page = pages[pages.length - 1];
+	// 		const currentWebview = page.$getAppWebview();
+	// 		currentWebview.hideTitleNViewButtonRedDot({
+	// 			index
+	// 		});
+	// 		// #endif
+	// 		uni.navigateTo({
+	// 			url: '/pages/user/notice'
+	// 		});
+	// 	}
+	// },
+	// #endif
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+		// 加载初始数据
+		loadBaseData() {
+			userinfo({})
+				.then(({ data }) => {
+					this.setUserInfo(data);
+					// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
+					orderData({})
+						.then(({ data }) => {
+							this.setOrderInfo(data);
+						})
+						.catch(e => {
+							this.setOrderInfo({
+								complete_count: 0, //完成
+								received_count: 0, //待收货
+								unshipped_count: 0, //待发货
+								order_count: 0, //订单总数
+								unpaid_count: 0 //待付款
+							});
+						});
+				})
+				.catch(e => {
+					console.log(e);
+				});
 		},
 		},
-		onShow() {
-			// 判断是否已经登录
-			if (this.hasLogin) {
-				this.loadBaseData();
+		/**
+		 * 统一跳转接口,拦截未登录路由
+		 * navigator标签现在默认没有转场动画,所以用view
+		 */
+		navTo(url) {
+			if (!this.hasLogin) {
+				// 保存地址
+				saveUrl();
+				// 登录拦截
+				interceptor();
+			} else {
+				uni.navigateTo({
+					url
+				});
 			}
 			}
 		},
 		},
-		onReady() {
-			// 初始化获取页面宽度
-			uni.createSelectorQuery()
-				.select('.container')
-				.fields({
-						size: true
-					},
-					data => {
-						// 计算最多下拉的高度
-						this.userDowm = Math.floor((data.width / 750) * 185);
-						// 计算最大触发修改高度事件
-						this.userMaxDowm = Math.floor((data.width / 750) * 250);
-					}
-				)
-				.exec();
-		},
-		// #ifndef MP
-		// onNavigationBarButtonTap(e) {
-		// 	const index = e.index;
-		// 	if (index === 0) {
-		// 		this.navTo('/pages/set/set');
-		// 	} else if (index === 1) {
-		// 		// #ifdef APP-PLUS
-		// 		const pages = getCurrentPages();
-		// 		const page = pages[pages.length - 1];
-		// 		const currentWebview = page.$getAppWebview();
-		// 		currentWebview.hideTitleNViewButtonRedDot({
-		// 			index
-		// 		});
-		// 		// #endif
-		// 		uni.navigateTo({
-		// 			url: '/pages/user/notice'
-		// 		});
-		// 	}
-		// },
-		// #endif
-		computed: {
-			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-		},
-		methods: {
-			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
-			// 加载初始数据
-			loadBaseData() {
-				userinfo({})
-					.then(({
-						data
-					}) => {
-						this.setUserInfo(data);
-						// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
-						orderData({})
-							.then(({
-								data
-							}) => {
-								this.setOrderInfo(data);
-							})
-							.catch(e => {
-								this.setOrderInfo({
-									complete_count: 0, //完成
-									received_count: 0, //待收货
-									unshipped_count: 0, //待发货
-									order_count: 0, //订单总数
-									unpaid_count: 0 //待付款
-								});
-							});
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			/**
-			 * 统一跳转接口,拦截未登录路由
-			 * navigator标签现在默认没有转场动画,所以用view
-			 */
-			navTo(url) {
-				if (!this.hasLogin) {
-					// 保存地址
-					saveUrl();
-					// 登录拦截
-					interceptor();
-				} else {
-					uni.navigateTo({
-						url
-					});
-				}
-			},
-
-			/**
-			 *  会员卡下拉和回弹
-			 *  1.关闭bounce避免ios端下拉冲突
-			 *  2.由于touchmove事件的缺陷(以前做小程序就遇到,比如20跳到40,h5反而好很多),下拉的时候会有掉帧的感觉
-			 *    transition设置0.1秒延迟,让css来过渡这段空窗期
-			 *  3.回弹效果可修改曲线值来调整效果,推荐一个好用的bezier生成工具 http://cubic-bezier.com/
-			 */
-			coverTouchstart(e) {
-				// console.log(e);
-				if (pageAtTop === false) {
-					return;
-				}
 
 
-				this.coverTransition = 'transform .1s linear';
-				startY = e.touches[0].clientY;
-			},
-			coverTouchmove(e) {
-				// console.log(e);
-				moveY = e.touches[0].clientY;
-				let moveDistance = moveY - startY;
-				let maxDowm = this.userMaxDowm;
-				let Dowm = this.userDowm;
-				if (moveDistance < 0) {
-					this.moving = false;
-					return;
-				}
-				this.moving = true;
-				if (moveDistance >= Dowm && moveDistance < maxDowm) {
-					moveDistance = Dowm;
-				}
+		/**
+		 *  会员卡下拉和回弹
+		 *  1.关闭bounce避免ios端下拉冲突
+		 *  2.由于touchmove事件的缺陷(以前做小程序就遇到,比如20跳到40,h5反而好很多),下拉的时候会有掉帧的感觉
+		 *    transition设置0.1秒延迟,让css来过渡这段空窗期
+		 *  3.回弹效果可修改曲线值来调整效果,推荐一个好用的bezier生成工具 http://cubic-bezier.com/
+		 */
+		coverTouchstart(e) {
+			// console.log(e);
+			if (pageAtTop === false) {
+				return;
+			}
 
 
-				if (moveDistance > 0 && moveDistance <= Dowm) {
-					this.coverTransform = `translateY(${moveDistance}px)`;
-				}
-			},
-			coverTouchend() {
-				if (this.moving === false) {
-					return;
-				}
+			this.coverTransition = 'transform .1s linear';
+			startY = e.touches[0].clientY;
+		},
+		coverTouchmove(e) {
+			// console.log(e);
+			moveY = e.touches[0].clientY;
+			let moveDistance = moveY - startY;
+			let maxDowm = this.userMaxDowm;
+			let Dowm = this.userDowm;
+			if (moveDistance < 0) {
 				this.moving = false;
 				this.moving = false;
-				this.coverTransition = 'transform 0.3s cubic-bezier(.21,1.93,.53,.64)';
-				this.coverTransform = 'translateY(0px)';
+				return;
 			}
 			}
+			this.moving = true;
+			if (moveDistance >= Dowm && moveDistance < maxDowm) {
+				moveDistance = Dowm;
+			}
+
+			if (moveDistance > 0 && moveDistance <= Dowm) {
+				this.coverTransform = `translateY(${moveDistance}px)`;
+			}
+		},
+		coverTouchend() {
+			if (this.moving === false) {
+				return;
+			}
+			this.moving = false;
+			this.coverTransition = 'transform 0.3s cubic-bezier(.21,1.93,.53,.64)';
+			this.coverTransform = 'translateY(0px)';
 		}
 		}
-	};
+	}
+};
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
-	page {
-		height: 100%;
-	}
-
-	%flex-center {
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
+page {
+	height: 100%;
+}
+
+%flex-center {
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+}
+
+%section {
+	display: flex;
+	justify-content: space-around;
+	align-content: center;
+	background: #fff;
+	border-radius: 10rpx;
+}
+
+.container {
+	height: 100%;
+	background-color: $page-color-base;
+}
+
+.user-section {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	position: relative;
+	top: 0;
+	left: 0;
+	right: 0;
+
+	.bg {
+		width: 100%;
+		height: 400rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
 	}
 	}
 
 
-	%section {
-		display: flex;
-		justify-content: space-around;
-		align-content: center;
-		background: #fff;
-		border-radius: 10rpx;
-	}
+	.user-info-box {
+		width: 100%;
 
 
-	.container {
-		height: 100%;
-		background-color: $page-color-base;
-	}
+		position: absolute;
 
 
-	.user-section {
 		display: flex;
 		display: flex;
-		align-items: center;
 		justify-content: space-between;
 		justify-content: space-between;
-		position: relative;
-		top: 0;
-		left: 0;
-		right: 0;
-
-		.bg {
-
-			width: 100%;
-			height: 400rpx;
-
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-
-		.user-info-box {
-			width: 100%;
-
-			position: absolute;
-
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
+		align-items: center;
 
 
+		.detail {
+			margin-left: 20rpx;
 
 
-			.detail {
-				margin-left: 20rpx;
+			.portrait-box {
+				width: 127rpx;
+				height: 127rpx;
+				border-radius: 50%;
 
 
-				.portrait-box {
-					width: 127rpx;
-					height: 127rpx;
+				.portrait {
+					width: 100%;
+					height: 100%;
 					border-radius: 50%;
 					border-radius: 50%;
-
-					.portrait {
-						width: 100%;
-						height: 100%;
-
-					}
-				}
-
-				.info-box {
-					padding-left: 15rpx;
-					display: flex;
-					flex-direction: column;
-					justify-content: center;
-
-					.username {
-						font-size: 34rpx;
-						font-family: PingFang SC;
-						font-weight: bold;
-						color: #FFFFFF;
-						line-height: 44rpx;
-					}
-
-					.phone {
-						font-size: 26rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #FFFFFF;
-						line-height: 44rpx;
-					}
 				}
 				}
 			}
 			}
 
 
-			.config {
-				width: 165rpx;
-				height: 64rpx;
-				background: #FFFFFF;
-				border-radius: 32px 0px 0px 32px;
+			.info-box {
+				padding-left: 15rpx;
 				display: flex;
 				display: flex;
+				flex-direction: column;
 				justify-content: center;
 				justify-content: center;
-				align-items: center;
 
 
-				.config-img {
-					width: 32rpx;
-					height: 32rpx;
-					margin-right: 5rpx;
-
-					image {
-						width: 100%;
-						height: 100%;
-					}
+				.username {
+					font-size: 34rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ffffff;
+					line-height: 44rpx;
 				}
 				}
 
 
-				.setting {
-					margin-left: 5rpx;
-					font-size: 28rpx;
+				.phone {
+					font-size: 26rpx;
 					font-family: PingFang SC;
 					font-family: PingFang SC;
 					font-weight: 500;
 					font-weight: 500;
-					color: #438BED;
-					line-height: 72rpx;
+					color: #ffffff;
+					line-height: 44rpx;
 				}
 				}
 			}
 			}
 		}
 		}
-	}
-
-
-
-
-
-	.content-box {
-		height: 100%;
-	}
 
 
-	.vheigh {
-		height: var(--status-bar-height);
-		background-color: $base-color;
-	}
+		.config {
+			width: 165rpx;
+			height: 64rpx;
+			background: #ffffff;
+			border-radius: 32px 0px 0px 32px;
+			display: flex;
+			justify-content: center;
+			align-items: center;
 
 
-	.cover-container {
-		background: $page-color-base;
+			.config-img {
+				width: 32rpx;
+				height: 32rpx;
+				margin-right: 5rpx;
 
 
-		padding: 0 20rpx;
-		position: relative;
-		background: #f5f5f5;
-		padding-bottom: 20rpx;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
 
 
-		.arc {
-			position: absolute;
-			left: 0;
-			top: -34rpx;
-			width: 100%;
-			height: 36rpx;
+			.setting {
+				margin-left: 5rpx;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #438bed;
+				line-height: 72rpx;
+			}
 		}
 		}
 	}
 	}
+}
 
 
-	.order-box {
-		position: relative;
-		margin: -80rpx 20rpx 0 20rpx;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		width: 710rpx;
-		height: 221rpx;
-		background: #FFFFFF;
-		box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
-		border-radius: 20rpx;
-
-		.order {
-
-			width: 100%;
-			height: 80rpx;
-			padding: 0 35rpx;
-			border-bottom: #F5F5F5 solid 2rpx;
-
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
+.content-box {
+	height: 100%;
+}
 
 
+.vheigh {
+	height: var(--status-bar-height);
+	background-color: $base-color;
+}
 
 
+.cover-container {
+	background: $page-color-base;
 
 
-			.order-font {
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #333333;
+	padding: 0 20rpx;
+	position: relative;
+	background: #f5f5f5;
+	padding-bottom: 20rpx;
 
 
+	.arc {
+		position: absolute;
+		left: 0;
+		top: -34rpx;
+		width: 100%;
+		height: 36rpx;
+	}
+}
+
+.order-box {
+	position: relative;
+	margin: -80rpx 20rpx 0 20rpx;
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	width: 710rpx;
+	height: 221rpx;
+	background: #ffffff;
+	box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+
+	.order {
+		width: 100%;
+		height: 80rpx;
+		padding: 0 35rpx;
+		border-bottom: #f5f5f5 solid 2rpx;
 
 
-			}
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
 
 
-			image {
-				width: 12rpx;
-				height: 22rpx;
-			}
+		.order-font {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
 		}
 		}
 
 
-		.order1 {
-			display: flex;
-			align-items: center;
-			height: 170rpx;
-
-			.order-content1 {
-				width: 25%;
-
+		image {
+			width: 12rpx;
+			height: 22rpx;
+		}
+	}
 
 
+	.order1 {
+		display: flex;
+		align-items: center;
+		height: 170rpx;
 
 
-				.order-item1 {
-					display: flex;
-					flex-direction: column;
+		.order-content1 {
+			width: 25%;
 
 
-					align-items: center;
+			.order-item1 {
+				display: flex;
+				flex-direction: column;
 
 
+				align-items: center;
 
 
-					.icon1 {
-						width: 42rpx;
-						height: 38rpx;
+				.icon1 {
+					width: 42rpx;
+					height: 38rpx;
 
 
-						.icon-img1 {
-							width: 100%;
-							height: 100%;
-						}
+					.icon-img1 {
+						width: 100%;
+						height: 100%;
 					}
 					}
+				}
 
 
-					text {
-						font-size: 24rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #333333;
-						line-height: 54rpx;
-					}
+				text {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 54rpx;
 				}
 				}
 			}
 			}
 		}
 		}
 	}
 	}
+}
 
 
+.item-box {
+	border-radius: 10rpx;
+	background-color: white;
+	margin-top: 20rpx;
 
 
+	.box-title {
+		line-height: 1;
+		padding: 20rpx;
 
 
-	.item-box {
-		border-radius: 10rpx;
-		background-color: white;
-		margin-top: 20rpx;
+		.title {
+			font-size: $font-lg;
+			font-weight: bold;
+		}
 
 
-		.box-title {
-			line-height: 1;
-			padding: 20rpx;
+		.link {
+			font-size: $font-base - 2rpx;
+			color: $font-color-light;
+		}
+	}
 
 
-			.title {
-				font-size: $font-lg;
-				font-weight: bold;
-			}
+	.order-section {
+		@extend %section;
+		padding: 28rpx 0;
 
 
-			.link {
-				font-size: $font-base - 2rpx;
-				color: $font-color-light;
-			}
+		.order-item {
+			@extend %flex-center;
+			width: 120rpx;
+			height: 120rpx;
+			border-radius: 10rpx;
+			font-size: $font-sm;
+			color: $font-color-dark;
 		}
 		}
 
 
-		.order-section {
-			@extend %section;
-			padding: 28rpx 0;
-
-			.order-item {
-				@extend %flex-center;
-				width: 120rpx;
-				height: 120rpx;
-				border-radius: 10rpx;
-				font-size: $font-sm;
-				color: $font-color-dark;
-			}
-
-			.iconfont {
-				font-size: 48rpx;
-				margin-bottom: 18rpx;
-				color: #fa436a;
-			}
+		.iconfont {
+			font-size: 48rpx;
+			margin-bottom: 18rpx;
+			color: #fa436a;
+		}
 
 
-			.icon-shouhoutuikuan {
-				font-size: 44rpx;
-			}
+		.icon-shouhoutuikuan {
+			font-size: 44rpx;
+		}
 
 
-			.icon {
-				height: 90rpx;
-				width: 90rpx;
-				margin-bottom: 18rpx;
-				background-size: 100%;
-				background-repeat: no-repeat;
-				background-position: center;
+		.icon {
+			height: 90rpx;
+			width: 90rpx;
+			margin-bottom: 18rpx;
+			background-size: 100%;
+			background-repeat: no-repeat;
+			background-position: center;
 
 
-				.icon-img {
-					width: 100%;
-					height: 100%;
-				}
+			.icon-img {
+				width: 100%;
+				height: 100%;
 			}
 			}
 		}
 		}
 	}
 	}
+}
 
 
-	.history-section {
-		// padding: 30rpx 0 0;
-		margin-top: 20rpx;
-		background: #fff;
-		border-radius: 10rpx;
+.history-section {
+	// padding: 30rpx 0 0;
+	margin-top: 20rpx;
+	background: #fff;
+	border-radius: 10rpx;
 
 
-		.sec-header {
-			display: flex;
-			align-items: center;
-			font-size: $font-base;
-			color: $font-color-dark;
+	.sec-header {
+		display: flex;
+		align-items: center;
+		font-size: $font-base;
+		color: $font-color-dark;
+		line-height: 40rpx;
+		margin-left: 30rpx;
+		padding-top: 30rpx;
+
+		.iconfont {
+			font-size: 44rpx;
+			color: $color-red;
+			margin-right: 16rpx;
 			line-height: 40rpx;
 			line-height: 40rpx;
-			margin-left: 30rpx;
-			padding-top: 30rpx;
-
-			.iconfont {
-				font-size: 44rpx;
-				color: $color-red;
-				margin-right: 16rpx;
-				line-height: 40rpx;
-			}
 		}
 		}
+	}
 
 
-		.h-list {
-			white-space: nowrap;
-			padding: 30rpx 30rpx 0;
+	.h-list {
+		white-space: nowrap;
+		padding: 30rpx 30rpx 0;
 
 
-			.h-list-image {
-				display: inline-block;
-				width: 160rpx;
-				height: 160rpx;
-				margin-right: 20rpx;
-				border-radius: 10rpx;
-			}
+		.h-list-image {
+			display: inline-block;
+			width: 160rpx;
+			height: 160rpx;
+			margin-right: 20rpx;
+			border-radius: 10rpx;
 		}
 		}
 	}
 	}
+}
 </style>
 </style>

+ 2 - 2
uni.scss

@@ -4,7 +4,7 @@ $page-row-spacing: 30rpx;
 $page-color-base: #f8f8f8;//页面背景颜色
 $page-color-base: #f8f8f8;//页面背景颜色
 $page-color-light: #f8f6fc;
 $page-color-light: #f8f6fc;
 // 主题颜色
 // 主题颜色
-$base-color: #5dbc7c;//项目颜色
+$base-color: #438BED;//项目颜色
 $box-shadow-color:#5dbc7c;//阴影颜色
 $box-shadow-color:#5dbc7c;//阴影颜色
 $font-color:#5dbc7c;//字体颜色
 $font-color:#5dbc7c;//字体颜色
 $font-color-spec: #5dbc7c;//可操作文字颜色
 $font-color-spec: #5dbc7c;//可操作文字颜色
@@ -17,7 +17,7 @@ $font-base: 28rpx;
 $font-lg: 32rpx;
 $font-lg: 32rpx;
 /*文字颜色*/
 /*文字颜色*/
 $font-color-dark: #303133;//黑
 $font-color-dark: #303133;//黑
-$font-color-base: #606266;//基础
+$font-color-base: #438BED;//基础
 $font-color-white:#ffffff;//白色
 $font-color-white:#ffffff;//白色
 $font-color-light: #909399;//灰色
 $font-color-light: #909399;//灰色
 $font-color-disabled: #c0c4cc;//禁用
 $font-color-disabled: #c0c4cc;//禁用

+ 31 - 11
utils/newRequest.js

@@ -1,4 +1,4 @@
-import store from '../store'
+import store from '../store';
 import md5 from 'js-md5'
 import md5 from 'js-md5'
 let service = {
 let service = {
 	baseURL: store.state.baseURL, // 请求头
 	baseURL: store.state.baseURL, // 请求头
@@ -44,18 +44,26 @@ let service = {
 	open: async function(data) {
 	open: async function(data) {
 		return await new Promise(function(resolve, reject) {
 		return await new Promise(function(resolve, reject) {
 			let requestData = ''; //保存处理完成后请求数据
 			let requestData = ''; //保存处理完成后请求数据
+			let url =''//保存链接地址
+			//console.log(data);
 			// 请求前数据处理
 			// 请求前数据处理
 			requestData = service.request.success(data);
 			requestData = service.request.success(data);
-			// 数据复制用于请求
-			let url = '';
-			if (requestData.url.indexOf('http') > -1) {
-				url = requestData.url
-			} else {
-				url = service.baseURL + requestData.url
+			// #ifdef H5
+			
+			if(process.env.NODE_ENV === 'development'){
+				url= requestData.url;
+			    console.log('开发环境')
+			}else{
+				url=service.baseURL + requestData.url;
+			    console.log('生产环境')
 			}
 			}
+			// #endif
+			// #ifndef H5
+			url=service.baseURL + requestData.url;
+			// #endif
 			// 数据复制用于请求
 			// 数据复制用于请求
 			uni.request({
 			uni.request({
-				url,
+				url:url,
 				method: requestData.method || 'GET',
 				method: requestData.method || 'GET',
 				data: requestData.data,
 				data: requestData.data,
 				header: data.header || service.header,
 				header: data.header || service.header,
@@ -80,6 +88,7 @@ let service = {
 	upFilse: async function(data) {
 	upFilse: async function(data) {
 		return await new Promise(function(resolve, reject) {
 		return await new Promise(function(resolve, reject) {
 			let requestData = ''; //保存处理完成后请求数据
 			let requestData = ''; //保存处理完成后请求数据
+			let url = '' //保存请求地址
 			try {
 			try {
 				// 请求前数据处理
 				// 请求前数据处理
 				requestData = service.request.success(data);
 				requestData = service.request.success(data);
@@ -87,9 +96,21 @@ let service = {
 				// 请求报错拦截
 				// 请求报错拦截
 				service.request.error(e);
 				service.request.error(e);
 			}
 			}
+			// #ifdef H5
+			if(process.env.NODE_ENV === 'development'){
+				url= requestData.url;
+			    console.log('开发环境')
+			}else{
+				url=service.baseURL + requestData.url;
+			    console.log('生产环境')
+			}
+			// #endif
+			// #ifndef H5
+			url=service.baseURL + requestData.url;
+			// #endif
 			let config = {
 			let config = {
 				// 上传图片的API
 				// 上传图片的API
-				upload_img_url: service.baseURL + requestData.url
+				upload_img_url:url
 			}
 			}
 
 
 			let Uploader = {
 			let Uploader = {
@@ -98,8 +119,6 @@ let service = {
 					return new Promise((resolve, reject) => {
 					return new Promise((resolve, reject) => {
 						uni.chooseImage({
 						uni.chooseImage({
 							count: num,
 							count: num,
-							sourceType:['album'],
-							sizeType:'compressed',
 							success(res) {
 							success(res) {
 								// console.log(res);
 								// console.log(res);
 								// 缓存文件路径
 								// 缓存文件路径
@@ -111,6 +130,7 @@ let service = {
 							}
 							}
 						})
 						})
 					})
 					})
+
 				},
 				},
 				// 上传图片
 				// 上传图片
 				upload_one(path) {
 				upload_one(path) {