hwq 1 rok pred
rodič
commit
114c5c2cc8

+ 1 - 2
pages.json

@@ -9,8 +9,7 @@
 		{
 			"path": "pages/index/artDetail",
 			"style": {
-				"navigationBarTitleText": "",
-				"navigationStyle": "custom"
+				"navigationBarTitleText": "产品动态"
 			}
 		},
 		{

+ 255 - 193
pages/category/category.vue

@@ -1,216 +1,278 @@
 <template>
 	<view class="content">
-		<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>
-		</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">
-						<image :src="titem.pic"></image>
-						<text>{{ titem.cate_name }}</text>
+		<view class="dddd" style="height: 10rpx;"></view>
+		<view class="flex cate-wrap" :style="{'height': height}">
+			<scroll-view scroll-y="true" class="left-wrap" :style="{'height': height}">
+				<view class="left-item" v-for="(leftitem,leftindex) in flist"
+					:class="{'action-item': currentIndex == leftindex}" @click="leftClick(leftindex)">
+					{{leftitem.cate_name}}
+				</view>
+			</scroll-view>
+			<scroll-view scroll-y="true" class="right-wrap" :style="{'height': height}" @scrolltolower="getProducts()">
+				<view class="right-item" v-for="gooditem in list"
+					@click="navto('/pages/product/product?id=' + gooditem.id)">
+					<image :src="gooditem.image" mode="" class="good-img"></image>
+					<view class="good-info flex">
+						<view class="good-name clamp2">
+							{{gooditem.store_name}}
+						</view>
+						<view class="good-price">
+							¥{{gooditem.price}}
+						</view>
 					</view>
 				</view>
-			</view>
-		</scroll-view>
+				<uni-load-more :status="loadingType"></uni-load-more>
+			</scroll-view>
+		</view>
 	</view>
 </template>
-
 <script>
-import { getCategoryList } from '@/api/product.js';
-export default {
-	data() {
-		return {
-			sizeCalcState: false,
-			tabScrollTop: 0,
-			currentId: 9,
-			flist: [],
-		};
-	},
-	onLoad() {
-		this.loadData();
-	},
-	// 监听导航栏输入框点击事件
-	onNavigationBarSearchInputClicked(e) {
-		uni.navigateTo({
-			url: '/pages/product/search'
-		});
-	},
-	methods: {
-		// 载入数据
-		async loadData() {
-			let obj = this;
-			getCategoryList({})
-				.then(({ data }) => {
-					obj.flist = data.map(function(s) {
-						return s;
-					});
-				})
-				.catch(err => {
-					console.log(err);
-				});
+	import {
+		getCategoryList,
+		getProducts
+	} from '@/api/product.js';
+	export default {
+		data() {
+			return {
+				sizeCalcState: false,
+				tabScrollTop: 0,
+				currentId: 9,
+				flist: [],
+				height: '',
+				currentIndex: 0,
+				list: [],
+				page: 1,
+				limit: 20,
+				loadingType: 'more',
+				loaded: false,
+			};
 		},
-		//一级分类点击
-		tabtap(item) {
-			console.log(item);
-			// 判断有没有初始化页面高度对象数据
-			if (!this.sizeCalcState) {
-				this.calcSize();
-			}
-			// 获取当前点击的id
-			this.currentId = item.id;
-			console.log(item.top);
-			this.tabScrollTop = item.top;
-			console.log(this.tabScrollTop);
+		onLoad() {
+			this.loadData();
 		},
-		//右侧栏滚动
-		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
+		// 监听导航栏输入框点击事件
+		onNavigationBarSearchInputClicked(e) {
+			uni.navigateTo({
+				url: '/pages/product/search'
+			});
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.cate-wrap').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
 				},
-				function(e) {
-					// 保存包裹框高度
-					box = e.height;
+				fail: res => {}
+			});
+		},
+		methods: {
+			leftClick(index) {
+				this.currentIndex = index
+				this.getProducts('reload')
+			},
+			getProducts(type) {
+				let index = this.flist[this.currentIndex].id
+				if (type == 'reload') {
+					this.list = []
+					this.page = 1
+					this.loadingType = 'more'
+					this.loaded = false
 				}
-			).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 (this.loadingType == 'loading' || this.loadingType == 'noMore') {
+					return
 				}
-			}
-		},
-		//计算右侧栏每个tab的高度等信息
-		calcSize() {
-			let h = 0;
-			this.flist.forEach(item => {
-				let view = uni.createSelectorQuery().select('#main-' + item.id);
-				view.fields(
-					{
-						size: true
+				this.loadingType = 'loading'
+				getProducts({
+					cid: index,
+					page: this.page,
+					limit: this.limit
+				}).then(res => {
+					this.list = this.list.concat(res.data)
+					if (this.limit == res.data.length) {
+						this.page++
+						this.loadingType = 'more'
+					} else {
+						this.loadingType = 'noMore'
+					}
+					this.loaded = true
+				})
+			},
+			// 载入数据
+			async loadData() {
+				let obj = this;
+				getCategoryList({})
+					.then(({
+						data
+					}) => {
+						obj.flist = data.map(function(s) {
+							return s;
+						});
+						obj.getProducts()
+					})
+					.catch(err => {
+						console.log(err);
+					});
+			},
+			//一级分类点击
+			tabtap(item) {
+				console.log(item);
+				// 判断有没有初始化页面高度对象数据
+				if (!this.sizeCalcState) {
+					this.calcSize();
+				}
+				// 获取当前点击的id
+				this.currentId = item.id;
+				console.log(item.top);
+				this.tabScrollTop = item.top;
+				console.log(this.tabScrollTop);
+			},
+			//右侧栏滚动
+			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
 					},
-					data => {
-						item.top = h;
-						h += data.height;
-						item.bottom = h;
+					function(e) {
+						// 保存包裹框高度
+						box = e.height;
 					}
 				).exec();
-			});
-			this.sizeCalcState = true;
-		},
-		navToList(sid, tid) {
-			// 点击导航跳转到详细页面
-			uni.navigateTo({
-				url: '/pages/product/list?fid='+this.currentId+'&sid='+sid+'&tid='+tid
-			});
+				// 获取所有距离顶部大于滚轮距离页面高度的所有分类
+				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;
+					}
+				}
+			},
+			//计算右侧栏每个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();
+				});
+				this.sizeCalcState = true;
+			},
+			navToList(sid, tid) {
+				// 点击导航跳转到详细页面
+				uni.navigateTo({
+					url: '/pages/product/list?fid=' + this.currentId + '&sid=' + sid + '&tid=' + tid
+				});
+			},
+			navto(url) {
+				uni.navigateTo({
+					url
+				})
+			}
 		}
-	}
-};
+	};
 </script>
-
 <style lang="scss">
-page,
-.content {
-	height: 100%;
-	background-color: #f8f8f8;
-}
+	.cate-wrap {
+		width: 750rpx;
 
-.content {
-	display: flex;
-}
-.left-aside {
-	flex-shrink: 0;
-	width: 200rpx;
-	height: 100%;
-	background-color: #fff;
-}
-.f-item {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 100%;
-	height: 100rpx;
-	font-size: 32rpx;
-	color: $font-color-base;
-	position: relative;
-	&.active {
-		color: $base-color;
-		background: #f8f8f8;
-		&:before {
-			content: '';
-			position: absolute;
-			left: 0;
-			top: 50%;
-			transform: translateY(-50%);
-			height: 36rpx;
-			width: 8rpx;
-			background-color: $base-color;
-			border-radius: 0 4px 4px 0;
-			opacity: 0.8;
+		.left-wrap {
+			width: 180rpx;
+			flex-shrink: 0;
+			background-color: #f2f2f2;
+
+			.left-item {
+				width: 180rpx;
+				height: 100rpx;
+				line-height: 100rpx;
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #666666;
+				text-align: center;
+			}
+
+			.action-item {
+				background-color: #fff;
+				font-weight: bold;
+				position: relative;
+
+				&::before {
+					content: '';
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 3rpx;
+					height: 100rpx;
+					background: #418c78;
+				}
+			}
 		}
-	}
-}
 
-.right-aside {
-	flex: 1;
-	overflow: hidden;
-	padding-left: 20rpx;
-	padding-right: 20rpx;
-}
-.s-item {
-	display: flex;
-	align-items: center;
-	height: 70rpx;
-	padding-top: 8rpx;
-	font-size: 32rpx;
-	color: $font-color-dark;
-}
-.t-list {
-	display: flex;
-	flex-wrap: wrap;
-	border-radius: 15rpx;
-	width: 100%;
-	background: #fff;
-	padding-top: 12rpx;
-	&:after {
-		content: '';
-		flex: 99;
-		height: 0;
-	}
-}
-.t-item {
-	flex-shrink: 0;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	flex-direction: column;
-	width: 171rpx;
-	font-size: 28rpx;
-	color: #666;
-	padding-bottom: 20rpx;
+		.right-wrap {
+			flex-wrap: 1;
+			background-color: #fff;
+
+			.right-item {
+				width: 520rpx;
+				height: 240rpx;
+				padding: 30rpx 0;
+				margin: 0 auto;
+				border-bottom: 1px solid #eee;
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+
+				.good-img {
+					flex-shrink: 0;
+					width: 180rpx;
+					height: 180rpx;
+					border-radius: 20rpx;
+				}
+
+				.good-info {
+					flex-direction: column;
+					justify-content: space-between;
+					align-items: flex-start;
+					height: 100%;
+					padding-left: 25rpx;
 
-	image {
-		width: 140rpx;
-		height: 140rpx;
+					.good-name {
+						font-size: 30rpx;
+						font-weight: bold;
+						color: #333333;
+					}
+
+					.good-price {
+						font-size: 34rpx;
+						font-weight: bold;
+						color: #FF4C4C;
+					}
+				}
+			}
+		}
 	}
-}
-</style>
+</style>

+ 8 - 1
pages/index/artDetail.vue

@@ -1,6 +1,5 @@
 <template>
 	<view class="center">
-		<view class="title clamp">{{ item.title }}</view>
 		<view class="tip flex">
 			<view class="tip-left">作者:{{ item.author }}</view>
 			<view class="tip-right">{{ item.add_time }}</view>
@@ -80,6 +79,10 @@
 		height: 100%;
 	}
 
+	.vheigh {
+		height: var(--status-bar-height);
+	}
+
 	.title {
 		padding: 30rpx 30rpx 0 24rpx;
 		font-size: 32rpx;
@@ -97,6 +100,10 @@
 		border-bottom: 1px solid #e9e9e9;
 	}
 
+	.main {
+		padding: 10rpx;
+	}
+
 	/deep/ .main {
 		.rich-img {
 			width: 100% !important;

+ 54 - 17
pages/index/index.vue

@@ -99,7 +99,7 @@
 						<view class="shop-title shop-name clamp">{{ item.store_name }}</view>
 						<view class="shop-btn-box">
 							<view class="shop-price">
-								钜惠价: <text class="shop-num">¥{{ item.price*1 }}</text>
+								<!-- 钜惠价: --> <text class="shop-num">¥{{ item.price*1 }}</text>
 							</view>
 							<view class="shop-btn">
 								立即抢购 >
@@ -120,10 +120,11 @@
 						<view class="title">已经为您定制专属客服</view>
 						<image src="../../static/img/img010.png" mode=""></image>
 					</view>
-					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="nocancel">客服1VX:{{ text1 }}</view>
+					<view class="nocancel">客服2VX:{{ text2 }}</view>
 					<view class="comfirm-box">
-						<view class="cancel" @click="cancel">取消</view>
-						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+						<view class="cancel" @click="comfirm(text1)">复制客服1</view>
+						<view class="comfirm" @click="comfirm(text2)">复制客服2</view>
 					</view>
 				</view>
 			</view>
@@ -163,7 +164,8 @@
 	export default {
 		data() {
 			return {
-				text: '', //客服微信
+				text1: 'yangqianqian131419', //客服1微信
+				text2: 'AHFM134', //客服2微信
 				page: 1,
 				limit: 10,
 				loadingType: 'more',
@@ -179,6 +181,7 @@
 			};
 		},
 		computed: {
+			...mapState(['loginInterceptor', 'baseURL', 'weichatObj']),
 			...mapState('user', ['hasLogin', 'userInfo'])
 		},
 		onShareAppMessage(options) {
@@ -192,7 +195,8 @@
 				shareObj = {
 					title: this.userInfo.nickname + '邀请您加入滇润堂', // 默认是小程序的名称(可以写slogan等)
 					path: url + '?scene=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
-					imageUrl: '',
+					desc: this.userInfo.nickname + '邀请您加入滇润堂',
+					imgUrl: '../../static/img/logo.png',
 					success: function(res) {
 						// 转发成功之后的回调
 						if (res.errMsg == 'shareAppMessage:ok') {}
@@ -209,8 +213,9 @@
 			} else {
 				shareObj = {
 					title: '滇润堂', // 默认是小程序的名称(可以写slogan等)
+					desc: '滇润堂',
 					path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
-					imageUrl: '',
+					imgUrl: '../../static/img/logo.png',
 					success: function(res) {
 						// 转发成功之后的回调
 						if (res.errMsg == 'shareAppMessage:ok') {}
@@ -225,6 +230,7 @@
 					}
 				};
 			}
+			console.log(shareObj);
 
 			return shareObj;
 		},
@@ -242,8 +248,15 @@
 					key: 'spread_code',
 					data: option.scene
 				});
+				uni.setStorage({
+					key: 'spread',
+					data: option.scene
+				});
 			}
 			// #endif
+			// #ifdef H5
+			this.IndexShare();
+			//#endif
 		},
 		onShow: function() {
 			this.getGoodList();
@@ -251,6 +264,30 @@
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
+			// #ifdef H5
+			IndexShare() {
+				let obj = this;
+				let pages = getCurrentPages();
+				// 获取当前页面
+				let page = pages[pages.length - 1];
+				let path = '#/' + page.route + '?';
+				// 保存传值
+				for (let i in page.options) {
+					path += i + '=' + page.options[i] + '&';
+				}
+				console.log(obj.Path);
+				// 保存邀请人
+				path += 'spread=' + this.userInfo.uid;
+				let data = {
+					link: this.baseURL + '/index/' + path,
+					title: this.userInfo.nickname + '邀请您进入滇润堂',
+					desc: '欢迎加入滇润堂',
+					imgUrl: 'https://drt.liuniukj.com/logo.png'
+				};
+				console.log(data, '分享数据');
+				shareLoad(data);
+			},
+			// #endif
 			getGoodList() {
 				let obj = this;
 				if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
@@ -490,7 +527,7 @@
 			.care-item {
 				position: relative;
 				z-index: 2;
-				width: 144rpx;
+				width: 180rpx;
 
 				image {
 					width: 100%;
@@ -549,16 +586,16 @@
 						position: absolute;
 						top: -30rpx;
 						right: -20rpx;
-						width: 72rpx;
-						height: 72rpx;
+						width: 90rpx;
+						height: 90rpx;
 
 						.gift-title-bg {
 							position: absolute;
 							top: 0;
 							right: 0;
 							left: 0;
-							width: 72rpx;
-							height: 72rpx;
+							width: 90rpx;
+							height: 90rpx;
 
 							image {
 								width: 100%;
@@ -653,7 +690,7 @@
 
 			.shop-item {
 				position: relative;
-				width: 358rpx;
+				width: 356rpx;
 				margin: 0 0 60rpx;
 				display: flex;
 				flex-direction: column;
@@ -759,13 +796,13 @@
 
 					.shop-price {
 						padding-left: 10rpx;
-						font-size: 16rpx;
+						font-size: 12rpx;
 						font-family: FZYanSongS-DB-GB;
 						font-weight: 400;
-						color: #E36847;
+						color: red;
 
 						.shop-num {
-							font-size: 26rpx;
+							font-size: 30rpx;
 						}
 					}
 
@@ -790,7 +827,7 @@
 
 	.popup-box {
 		width: 522rpx;
-		height: 605rpx;
+		height: 625rpx;
 		background-color: #ffffff;
 		border-radius: 20rpx;
 		position: relative;

+ 1 - 1
pages/order/order.vue

@@ -59,7 +59,7 @@
 							实付款
 							<text class="price">{{ moneyNum(item.pay_price)}}</text>
 						</view>
-						<view class="action-box b-t" v-if="item.status != 5 && item.status != 0">
+						<view class="action-box b-t" v-if="item.status != 5 ">
 							<button v-if="item._status._title == '未支付'" class="action-btn"
 								@click.stop="cancelOrder(item)">取消订单</button>
 							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)"

+ 38 - 12
pages/product/product.vue

@@ -75,18 +75,19 @@
 		<!-- 底部操作菜单 -->
 		<view class="page-bottom" v-if="goodsType == 0">
 			<view class="action-btn-group">
-				<!-- <view class="shoucang flex" @click="toFavorite(goodsObjact)">
-					<image src="../../static/icon/sc-ico.png" mode=""></image>
+				<view class="shoucang flex" @click="toFavorite(goodsObjact)">
+					<text class="iconfont "
+						:class="{ iconlike: !goodsObjact.userCollect, iconlikefill: goodsObjact.userCollect }"></text>
 					<view class="">
 						收藏
 					</view>
-				</view> -->
-				<view class="shoucang flex" @click="toIndex()">
+				</view>
+				<!-- <view class="shoucang flex" @click="toIndex()">
 					<image src="../../static/icon/index.png" mode=""></image>
 					<view class="">
 						首页
 					</view>
-				</view>
+				</view> -->
 				<view class="buy-now">
 					<button type="primary" class=" action-btn no-border buy-now-btn" @click.stop="toggleSpec(2)"
 						v-if="isvip==0">加入购物车</button>
@@ -203,6 +204,7 @@
 				specList: [],
 				// 对比对象
 				productValue: [],
+				opt: '', //保存小程序传值
 				actionPrice: 0, //默认选中商品价格
 				actionImage: '', //默认选中图片
 				uniqueId: '', //选中的商品分类
@@ -255,6 +257,37 @@
 				// 存储邀请人
 				uni.setStorageSync('spread', options.spread);
 			}
+			if (options.type == 2) {
+				// 保存当前拼团商品类型
+				this.goodsType = 2;
+				// 家在数据
+				this.groupGoods();
+				return;
+			}
+			if (options.scene) {
+				if (typeof options.scene == 'string') {
+					let scene = ('{' + options.scene + '}')
+						.replace('qr%26', '')
+						.replace(/%3D/g, ':')
+						.replace(/%26/g, ',')
+						.replace('pid', '"pid"')
+						.replace('type', '"type"')
+						.replace('id', '"id"')
+						.replace('sid', '"sid"');
+					let opt = JSON.parse(scene);
+					this.opt = opt;
+					// 保存拼团订单id
+					this.goodsid = opt.id;
+					if (opt.pid) {
+						// 存储邀请人
+						// this.spread = opt.pid;
+						uni.setStorageSync('spread', opt.pid);
+					}
+					if (opt.type) {
+						this.goodsType = opt.type;
+					}
+				}
+			}
 			// 判断是否为秒杀商品
 			if (options.type == 1) {
 				// 保存商品类型
@@ -276,13 +309,6 @@
 				this.seckillGoods();
 				return;
 			}
-			if (options.type == 2) {
-				// 保存当前拼团商品类型
-				this.goodsType = 2;
-				// 家在数据
-				this.groupGoods();
-				return;
-			}
 			if (this.goodsType == 0) {
 				// 加载普通商品详情
 				this.goodsDetail();

+ 262 - 225
pages/public/register.vue

@@ -1,281 +1,318 @@
 <template>
 	<view class="container">
-		<view class="container_text" >
+		<view class="container_text">
 			<image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image>
 		</view>
 		<view class="loginTitle"><text>注册</text></view>
 		<view class="login_text">
 			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
+				<view class="login_img">
+					<image src="/static/icon/img03.png"></image>
+				</view>
 				<view class="login_name"><input class="uni-input" v-model="phone" focus placeholder="请输入手机号" /></view>
 			</view>
 			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
-				<view class="login_name"><input class="uni-input" type="password" v-model="password" focus placeholder="请输入密码" /></view>
+				<view class="login_img">
+					<image src="/static/icon/img04.png"></image>
+				</view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="password" focus
+						placeholder="请输入密码" /></view>
 			</view>
 			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
-				<view class="login_name"><input class="uni-input" type="password" v-model="repassword" focus placeholder="请重复输入密码" /></view>
+				<view class="login_img">
+					<image src="/static/icon/img04.png"></image>
+				</view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="repassword" focus
+						placeholder="请重复输入密码" /></view>
 			</view>
 			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img07.png"></image></view>
-				<view class="login_name"><input class="uni-input" type="text" v-model="invitation" focus placeholder="请输入邀请码" /></view>
+				<view class="login_img">
+					<image src="/static/icon/img07.png"></image>
+				</view>
+				<view class="login_name"><input class="uni-input" type="text" v-model="invitation" focus
+						placeholder="请输入邀请码" /></view>
 			</view>
 			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
+				<view class="login_img">
+					<image src="/static/icon/img06.png"></image>
+				</view>
 				<view class="login_name flex">
 					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
 					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
 				</view>
 			</view>
 			<view><button type="green" @click="register" class="uni-button uni-button-green">注册账号</button></view>
-			<view><button class="uni-button uni-button-green uni-button-green-plain" type="green" plain="true" hover-class="none" @click="login">返回登录</button></view>
+			<view><button class="uni-button uni-button-green uni-button-green-plain" type="green" plain="true"
+					hover-class="none" @click="login">返回登录</button></view>
 		</view>
 	</view>
 </template>
 <script>
-import { register, verify } from '@/api/login.js';
-export default {
-	data() {
-		return {
-			phone: '', //用户
-			password: '', //密码
-			repassword: '',
-			invitation: '', //邀请码
-			code: '', //验证码
-			time: '', //保存倒计时对象
-			countDown: 0 ,//倒计时
-		};
-	},
-	onLoad() {
-		// 获取扫码邀请人id
-		this.invitation = uni.getStorageSync('spread')||'';
-	},
-	watch: {
-		// 监听倒计时
-		countDown(i) {
-			if (i == 0) {
-				clearInterval(this.time);
-			}
-		}
-	},
-	methods: {
-		// 注册
-		register() {
-			let obj = this;
-			if (obj.phone == '') {
-				obj.$api.msg('请输入电话号码');
-				return;
-			}
-			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.phone)) {
-				obj.$api.msg('请输入正确的手机号');
-				return;
-			}
-			if (obj.password == '') {
-				obj.$api.msg('请输入密码');
-				return;
-			}
-			if (obj.repassword == '') {
-				obj.$api.msg('请再次输入密码');
-				return;
-			}
-			if (obj.repassword != obj.password) {
-				obj.$api.msg('两次密码不正确');
-				return;
-			}
-			// if ((obj.invitation = '')) {
-			// 	obj.$api.msg('请输入邀请码');
-			// 	return;
-			// }
-			// if (obj.code == '') {
-			// 	obj.$api.msg('请输入验证码');
-			// 	return;
-			// }
-			register({
-				account: obj.phone, //账号
-				captcha: obj.code, //验证码
-				password: obj.password ,//密码
-				spread:this.invitation//上级推广人
-			}).then(function(e) {
-				uni.showToast({
-					title:'注册成功',
-					duration:2000,
-					position:'top'
-				});
-				setTimeout(function () {
-					uni.navigateTo({
-						url: '/pages/public/login'
-					});
-				},1000)
-				
-			});
-			//调用注册接口,成功跳转登录页
+	import {
+		register,
+		verify
+	} from '@/api/login.js';
+	export default {
+		data() {
+			return {
+				phone: '', //用户
+				password: '153624', //密码
+				repassword: '153624',
+				invitation: '', //邀请码
+				code: '123456', //验证码
+				time: '', //保存倒计时对象
+				countDown: 0, //倒计时
+			};
 		},
-		//发送验证码
-		verification() {
-			let obj = this;
-			if (this.phone == '') {
-				this.$api.msg('请输入电话号码');
-				return;
-			}
-			if (this.phone.length < 11) {
-				this.$api.msg('请输入正确的手机号');
-				return;
+		onLoad() {
+			// 获取扫码邀请人id
+			this.invitation = uni.getStorageSync('spread') || '';
+		},
+		watch: {
+			// 监听倒计时
+			countDown(i) {
+				if (i == 0) {
+					clearInterval(this.time);
+				}
 			}
-			// 判断是否在倒计时
-			if (obj.countDown > 0) {
-				return false;
-			} else {
-				obj.countDown = 60;
-				obj.time = setInterval(() => {
-					obj.countDown--;
-				}, 1000);
-				//调用验证码接口
-				verify({
-					phone: obj.phone,
-					type: 'register'
-				})
-					.then(({ data }) => {})
-					.catch(err => {
-						console.log(err);
+		},
+		methods: {
+			// 注册
+			register() {
+				let obj = this;
+				if (obj.phone == '') {
+					obj.$api.msg('请输入电话号码');
+					return;
+				}
+				if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.phone)) {
+					obj.$api.msg('请输入正确的手机号');
+					return;
+				}
+				if (obj.password == '') {
+					obj.$api.msg('请输入密码');
+					return;
+				}
+				if (obj.repassword == '') {
+					obj.$api.msg('请再次输入密码');
+					return;
+				}
+				if (obj.repassword != obj.password) {
+					obj.$api.msg('两次密码不正确');
+					return;
+				}
+				// if ((obj.invitation = '')) {
+				// 	obj.$api.msg('请输入邀请码');
+				// 	return;
+				// }
+				// if (obj.code == '') {
+				// 	obj.$api.msg('请输入验证码');
+				// 	return;
+				// }
+				register({
+					account: obj.phone, //账号
+					captcha: obj.code, //验证码
+					password: obj.password, //密码
+					spread: this.invitation //上级推广人
+				}).then(function(e) {
+					uni.showToast({
+						title: '注册成功',
+						duration: 2000,
+						position: 'top'
 					});
+					setTimeout(function() {
+						uni.navigateTo({
+							url: '/pages/public/login'
+						});
+					}, 1000)
+
+				});
+				//调用注册接口,成功跳转登录页
+			},
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.phone == '') {
+					this.$api.msg('请输入电话号码');
+					return;
+				}
+				if (this.phone.length < 11) {
+					this.$api.msg('请输入正确的手机号');
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.phone,
+							type: 'register'
+						})
+						.then(({
+							data
+						}) => {})
+						.catch(err => {
+							console.log(err);
+						});
+				}
+			},
+			login() {
+				//返回登录
+				uni.navigateTo({
+					url: '/pages/public/login'
+				});
 			}
-		},
-		login() {
-			//返回登录
-			uni.navigateTo({
-				url: '/pages/public/login'
-			});
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	height: 100%;
-}
-.container {
-	width: 100%;
-	height: 100%;
-	background-size: 100%;
-}
-.container_text {
-	width: 100%;
-	height: 500rpx;
-	top: 0rpx;
-	.banner-img {
+	page {
+		height: 100%;
+	}
+
+	.container {
 		width: 100%;
 		height: 100%;
+		background-size: 100%;
+	}
+
+	.container_text {
+		width: 100%;
+		height: 500rpx;
+		top: 0rpx;
+
+		.banner-img {
+			width: 100%;
+			height: 100%;
+		}
 	}
-}
-.login_text {
-	margin: auto 30rpx;
-	position: relative;
-	padding: 100rpx 102rpx;
-	background-color: #ffffff;
-	margin-top: -180rpx;
-	border-radius: 20rpx;
-	.login_input {
-		border-bottom: 1px solid #f0f0f0;
-		margin-bottom: 65rpx;
-		.login_img image {
-			height: 35rpx;
-			width: 29rpx;
-			margin-right: 20rpx;
+
+	.login_text {
+		margin: auto 30rpx;
+		position: relative;
+		padding: 100rpx 102rpx;
+		background-color: #ffffff;
+		margin-top: -180rpx;
+		border-radius: 20rpx;
+
+		.login_input {
+			border-bottom: 1px solid #f0f0f0;
+			margin-bottom: 65rpx;
+
+			.login_img image {
+				height: 35rpx;
+				width: 29rpx;
+				margin-right: 20rpx;
+			}
+
+			.uni-input {
+				text-align: left;
+				width: 470rpx;
+				font-size: 28rpx !important;
+			}
+
+			.login_name {
+				color: #333333;
+			}
+		}
+
+		.other {
+			margin-top: 60rpx;
+
+			.fenge {
+				width: 30%;
+				height: 2rpx;
+				background-color: #eeeeee;
+			}
+
+			.qita {
+				font-size: 28rpx;
+				color: #999999;
+			}
 		}
-		.uni-input {
-			text-align: left;
-			width: 470rpx;
-			font-size: 28rpx !important;
+
+		.weixin {
+			width: 75rpx;
+			height: 75rpx;
+			margin: 25rpx auto;
 		}
-		.login_name {
-			color: #333333;
+
+		.weixin image {
+			width: 100%;
+			height: 100%;
 		}
-	}
 
-	.other {
-		margin-top: 60rpx;
-		.fenge {
-			width: 30%;
-			height: 2rpx;
-			background-color: #eeeeee;
+		.weixin_text {
+			text-align: center;
+			font-size: 28rpx;
+			color: #999999;
 		}
-		.qita {
+
+		.forget {
 			font-size: 28rpx;
+			width: 100%;
+			text-align: right;
 			color: #999999;
 		}
+
+		.uni-button-green {
+			color: #ffffff;
+			background-color: #5dbc7c;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+		}
+
+		.uni-button-green-plain {
+			border: 1px solid #5dbc7c;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			color: #5dbc7c;
+			background-color: #ffffff;
+		}
+
+		.uni-button {
+			height: 85rpx;
+			line-height: 85rpx;
+		}
 	}
-	.weixin {
-		width: 75rpx;
-		height: 75rpx;
-		margin: 25rpx auto;
-	}
-	.weixin image {
+
+	.loginTitle {
+		position: absolute;
+		top: 250rpx;
 		width: 100%;
-		height: 100%;
-	}
-	.weixin_text {
 		text-align: center;
-		font-size: 28rpx;
-		color: #999999;
+		color: white;
+		font-size: 40rpx;
 	}
+
 	.forget {
-		font-size: 28rpx;
-		width: 100%;
-		text-align: right;
-		color: #999999;
+		width: 100rpx;
+		font-size: 24rpx;
+		color: #ffffff;
+		margin: 0px auto;
+		border-bottom: 1px solid #ffffff;
 	}
 
-	.uni-button-green {
-		color: #ffffff;
-		background-color: #5dbc7c;
-		margin: 40rpx 10rpx;
-		border-radius: 50rpx;
+	.width {
+		width: 325rpx !important;
 	}
-	.uni-button-green-plain {
-		border: 1px solid #5dbc7c;
-		margin: 40rpx 10rpx;
-		border-radius: 50rpx;
+
+	.code {
 		color: #5dbc7c;
-		background-color: #ffffff;
-	}
-	.uni-button {
-		height: 85rpx;
-		line-height: 85rpx;
+		font-size: 23rpx;
+		border-left: 1px solid #eeeeee;
+		width: 150rpx;
+		flex-shrink: 0;
+		text-align: center;
 	}
-}
-.loginTitle {
-	position: absolute;
-	top: 250rpx;
-	width: 100%;
-	text-align: center;
-	color: white;
-	font-size: 40rpx;
-}
-
-.forget {
-	width: 100rpx;
-	font-size: 24rpx;
-	color: #ffffff;
-	margin: 0px auto;
-	border-bottom: 1px solid #ffffff;
-}
-.width {
-	width: 325rpx !important;
-}
-.code {
-	color: #5dbc7c;
-	font-size: 23rpx;
-	border-left: 1px solid #eeeeee;
-	width: 150rpx;
-	flex-shrink: 0;
-	text-align: center;
-}
-uni-button {
-	height: 80rpx !important;
-	line-height: 80rpx !important;
-}
-
-</style>
 
+	uni-button {
+		height: 80rpx !important;
+		line-height: 80rpx !important;
+	}
+</style>

+ 19 - 2
pages/public/wxLogin.vue

@@ -194,8 +194,25 @@
 						console.log(data, 'wechatMpAuth++++++++++++++++++++++++++');
 					})
 					.catch(err => {
-						// obj.loding = false;
-						// uni.hideLoading();
+						uni.showModal({
+							title: '授权失败',
+							content: '未能授权成功请重新授权',
+							cancelText: '查看报错',
+							confirmText: '确定',
+							success: res => {
+								if (res.cancel) {
+									uni.showModal({
+										title: '',
+										content: JSON.stringify(err),
+										showCancel: false,
+										confirmText: '关闭',
+									});
+								}
+							},
+							fail: () => {},
+							complete: () => {}
+						});
+						uni.hideLoading();
 					});
 			},
 			// #endif

+ 184 - 157
pages/set/address.vue

@@ -12,7 +12,8 @@
 			</view>
 			<view class="buttom">
 				<view class="default-buttom" @click.stop="defaultUp(item,index)">
-					<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.is_default == 1 }"></view>
+					<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.is_default == 1 }">
+					</view>
 					<text class="text">设为默认地址</text>
 				</view>
 				<view class="operation">
@@ -33,176 +34,202 @@
 </template>
 
 <script>
-import { getAddressList,setAddressDefault,addressDel } from '@/api/user.js';
-export default {
-	data() {
-		return {
-			source: 0,
-			addressList: []
-		};
-	},
-	onLoad(option) {
-		this.source = option.source||0
-		this.loadAddress();
-	},
-	methods: {
-		// 加载地址
-		loadAddress() {
-			getAddressList({
-				page: 1,
-				limit: 100
-			}).then(({ data }) => {
-				this.addressList = data;
-			});
-		},
-		// 设为默认地址
-		defaultUp(data,ind) {
-			this.addressList=this.addressList.map((e) => {
-				e.is_default=0
-				return e
-			})
-			this.addressList[ind].is_default=1
-			setAddressDefault({
-				id: data.id
-			}).then(({ data }) => {
-				this.loadAddress();
-			}).catch((e) => {
-				console.log(e);
-			});
+	import {
+		getAddressList,
+		setAddressDefault,
+		addressDel
+	} from '@/api/user.js';
+	export default {
+		data() {
+			return {
+				source: 0,
+				addressList: []
+			};
 		},
-		//删除地址
-		delAddress(item) {
-			addressDel({
-				id:item.id
-			}).then(({data})=>{
-				this.$api.msg('删除成功')
-			})
-			let s = this.addressList.indexOf(item);
-			this.addressList.splice(s, 1);
+		onLoad(option) {
+			this.source = option.source || 0
+			this.loadAddress();
 		},
-		//选择地址
-		checkAddress(item) {
-			if (this.source == 1) {
-				//this.$api.prePage()获取上一页实例,在App.vue定义
-				this.$api.prePage().addressData = item;
-				uni.navigateBack();
+		methods: {
+			// 加载地址
+			loadAddress() {
+				getAddressList({
+					page: 1,
+					limit: 100
+				}).then(({
+					data
+				}) => {
+					this.addressList = data;
+				});
+			},
+			// 设为默认地址
+			defaultUp(data, ind) {
+				this.addressList = this.addressList.map((e) => {
+					e.is_default = 0
+					return e
+				})
+				this.addressList[ind].is_default = 1
+				setAddressDefault({
+					id: data.id
+				}).then(({
+					data
+				}) => {
+					this.loadAddress();
+				}).catch((e) => {
+					console.log(e);
+				});
+			},
+			//删除地址
+			delAddress(item) {
+				addressDel({
+					id: item.id
+				}).then(({
+					data
+				}) => {
+					this.$api.msg('删除成功')
+				})
+				let s = this.addressList.indexOf(item);
+				this.addressList.splice(s, 1);
+			},
+			//选择地址
+			checkAddress(item) {
+				if (this.source == 1) {
+					//this.$api.prePage()获取上一页实例,在App.vue定义
+					this.$api.prePage().addressData = item;
+					uni.navigateBack();
+				}
+			},
+			// 添加地址
+			addAddress(type, item) {
+				uni.navigateTo({
+					url: `/pages/set/addressManage?type=${type}&data=${JSON.stringify(item)}`
+				});
+			},
+			//添加或修改成功之后回调
+			refreshList() {
+				// 重新加载地址
+				this.loadAddress()
 			}
-		},
-		// 添加地址
-		addAddress(type, item) {
-			uni.navigateTo({
-				url: `/pages/set/addressManage?type=${type}&data=${JSON.stringify(item)}`
-			});
-		},
-		//添加或修改成功之后回调
-		refreshList() {
-			// 重新加载地址
-			this.loadAddress()
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	padding-bottom: 120rpx;
-	padding-top: 20rpx;
-	background-color: $page-color-base;
-}
-.content {
-	position: relative;
-}
-.list {
-	align-items: center;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	margin: 20rpx;
-	margin-top: 0;
-	.buttom {
-		display: flex;
+	page {
+		padding-bottom: 120rpx;
+		padding-top: 20rpx;
+		background-color: $page-color-base;
+	}
+
+	.content {
+		position: relative;
+	}
+
+	.list {
 		align-items: center;
-		justify-content: space-between;
-		padding-top: 10rpx;
-		.checkbox {
-			font-size: 44rpx;
-			line-height: 1;
-			padding: 4rpx;
-			color: $font-color-disabled;
-			background: #fff;
-			border-radius: 50px;
-		}
-		.checkbox.checked {
-			color: $base-color;
-		}
-		.default-buttom {
-			display: flex;
-			align-items: center;
-		}
-		.operation {
+		padding: 20rpx 30rpx;
+		background: #fff;
+		margin: 20rpx;
+		margin-top: 0;
+
+		.buttom {
 			display: flex;
 			align-items: center;
-			.blank {
-				width: 30rpx;
+			justify-content: space-between;
+			padding-top: 10rpx;
+
+			.checkbox {
+				font-size: 44rpx;
+				line-height: 1;
+				padding: 4rpx;
+				color: $font-color-disabled;
+				background: #fff;
+				border-radius: 50px;
+			}
+
+			.checkbox.checked {
+				color: $base-color;
+			}
+
+			.default-buttom {
+				display: flex;
+				align-items: center;
+			}
+
+			.operation {
+				display: flex;
+				align-items: center;
+
+				.blank {
+					width: 30rpx;
+				}
+			}
+
+			.text {
+				padding-left: 10rpx;
+				font-size: 24rpx;
+				color: #666666;
 			}
 		}
-		.text {
-			padding-left: 10rpx;
-			font-size: 24rpx;
-			color: #666666;
-		}
 	}
-}
-.wrapper {
-	display: flex;
-	flex-direction: column;
-	flex: 1;
-	border-bottom: 1px solid #f0f0f0;
-	padding-bottom: 20rpx;
-}
-.address-box {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	.address {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
+
+	.wrapper {
+		display: flex;
+		flex-direction: column;
+		flex: 1;
+		border-bottom: 1px solid #f0f0f0;
+		padding-bottom: 20rpx;
+	}
+
+	.address-box {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.address {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
+
+		.mobile {
+			font-size: $font-base;
+			color: rgba(51, 51, 51, 1);
+		}
 	}
-	.mobile {
+
+	.u-box {
 		font-size: $font-base;
-		color: rgba(51, 51, 51, 1);
+		color: $font-color-light;
+		margin-top: 16rpx;
+
+		.name {
+			margin-right: 30rpx;
+		}
+	}
+
+	.icon-bianji {
+		display: flex;
+		align-items: center;
+		height: 80rpx;
+		font-size: 40rpx;
+		color: $font-color-light;
+		padding-left: 30rpx;
 	}
-}
-.u-box {
-	font-size: $font-base;
-	color: $font-color-light;
-	margin-top: 16rpx;
-	.name {
-		margin-right: 30rpx;
+
+	.add-btn {
+		position: fixed;
+		left: 30rpx;
+		right: 30rpx;
+		bottom: 50rpx;
+		z-index: 95;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		border-radius: 10rpx;
 	}
-}
-.icon-bianji {
-	display: flex;
-	align-items: center;
-	height: 80rpx;
-	font-size: 40rpx;
-	color: $font-color-light;
-	padding-left: 30rpx;
-}
-
-.add-btn {
-	position: fixed;
-	left: 30rpx;
-	right: 30rpx;
-	bottom: 16rpx;
-	z-index: 95;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10rpx;
-}
-</style>
+</style>

+ 6 - 6
pages/set/addressManage.vue

@@ -15,11 +15,11 @@
 			<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择地址'}}</pickerAddress>
 			<text class="iconfont iconlocation"></text>
 		</view>
-		<view class="row b-b">
+		<!-- <view class="row b-b">
 			<text class="tit">乡镇</text>
 			<input class="input" type="text" v-model="addressData.town" placeholder="请输入乡镇"
 				placeholder-class="placeholder" />
-		</view>
+		</view> -->
 		<view class="row b-b">
 			<text class="tit">详细地址</text>
 			<input class="input" type="text" v-model="addressData.area" placeholder="请输入详细地址"
@@ -135,10 +135,10 @@
 					this.$api.msg('请在地图选择所在位置');
 					return;
 				}
-				if (!data.town) {
-					this.$api.msg('请填写乡镇信息');
-					return;
-				}
+				// if (!data.town) {
+				// 	this.$api.msg('请填写乡镇信息');
+				// 	return;
+				// }
 				if (!data.area) {
 					this.$api.msg('请填写门牌号信息');
 					return;

+ 7 - 5
pages/set/userinfo.vue

@@ -9,15 +9,17 @@
 		</view>
 		<view class="row">
 			<text class="tit">昵称</text>
-			<input class="input" type="text" v-model="userInfo.nickname" placeholder-class="placeholder"  />
+			<input class="input" type="text" v-model="userInfo.nickname" placeholder-class="placeholder" />
 		</view>
 		<view class="row">
 			<text class="tit">ID</text>
 			<input class="input" type="text" disabled="true" v-model="userInfo.uid" placeholder-class="placeholder" />
 		</view>
-		<view class="row" v-if="userInfo.tjr">
-			<text class="tit">推荐人</text>
-			<input class="input" type="text" disabled="true" v-model="userInfo.tjr" placeholder-class="placeholder" />
+		<view class="row">
+			<text class="tit">等级</text>
+			<input v-if="userInfo.level_info" class="input" type="text" disabled="true"
+				v-model="userInfo.level_info.name" placeholder-class="placeholder" />
+			<text class="input" v-else>用户</text>
 		</view>
 		<view class="add-btn tj" @click="confirm">提交</view>
 		<view class="add-btn" @click="cancel">退出</view>
@@ -195,7 +197,7 @@
 		display: flex;
 		align-items: center;
 		justify-content: center;
-		margin:40rpx auto 30rpx;
+		margin: 40rpx auto 30rpx;
 		width: 560rpx;
 		height: 80rpx;
 		background: #fff;

+ 45 - 42
pages/user/team.vue

@@ -17,21 +17,7 @@
 				<view class="money">{{ all|| '0' }}</view>
 				<view>我的推广人数</view>
 			</view>
-			<!-- <view class="money-box" style="padding-top: 20rpx;" v-if="order*1 > 0">
-				<view>直推:{{zt_order}}单</view>
-				<view>间推:{{jt_order}}单</view>
-			</view> -->
 		</view>
-		<!-- <view class="flex buttom-box">
-			<view class="buttom" @click="tabClick(0)">
-				<view class="money">{{all || 0}}</view>
-				<text class="text" :class="{ current: tabCurrentIndex === 0 }">一级推广</text>
-			</view>
-			<view class="buttom" @click="tabClick(1)">
-				<view class="money">{{totalLevel || 0}}</view>
-				<text class="text" :class="{ current: tabCurrentIndex === 1 }">二级推广</text>
-			</view>
-		</view> -->
 		<swiper :current="tabCurrentIndex" :style="{ height: maxheight }" class="swiper-box" duration="300"
 			@change="changeTab">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
@@ -42,16 +28,31 @@
 					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
 						<view class="title-box flex_item">
 							<view class="title-avatar">
-								<image :src="item.avatar"></image>
+								<image :src="item.avatar|| '../../static/img/logo.png'"></image>
 							</view>
 							<view class="list_tpl">
-								<view class="title">
+								<view class="title flex">
 									<view class="title-name clamp">{{ item.nickname }}</view>
+									<view class="user-shop-item" v-if="userInfo.level_name">
+										<image class="user-shop-icon" src="../../static/icon/level-bg.png" mode="">
+										</image>
+										<view class="user-shopname" style="padding-left: 30rpx;">
+											{{userInfo.level_name}}
+										</view>
+									</view>
 								</view>
 								<view class="time">
 									<text>{{ item.time }}</text>
 								</view>
 							</view>
+							<view class="list-left">
+								<view class="money">
+									<text>{{ item.numberCount == null ? '未购买' : item.numberCount + '元' }}</text>
+								</view>
+								<view class="money">
+									<text>{{ item.number == null ? '未购买' : item.number + '套' }}</text>
+								</view>
+							</view>
 						</view>
 					</view>
 					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
@@ -303,7 +304,6 @@
 	.order-item {
 		padding: 20rpx 30rpx;
 		line-height: 1.5;
-		background-color: #fff;
 
 		.title-box {
 			width: 100%;
@@ -323,7 +323,7 @@
 			}
 
 			.list_tpl {
-				width: 85%;
+				width: 74%;
 
 				.title {
 					display: flex;
@@ -337,45 +337,48 @@
 					text-align: center;
 
 					.title-name {
-						max-width: 40%;
+						max-width: 30%;
 					}
 
-					.dl {
-						margin-left: 10rpx;
-						width: 93rpx;
-						height: 32rpx;
-						border-radius: 16rpx;
+					.user-shop-item {
+						position: relative;
+						width: 90rpx;
+						height: 30rpx;
+
+						.user-shop-icon {
+							position: absolute;
+							top: 0;
+							left: 0;
+							right: 0;
+							width: 90rpx;
+							height: 30rpx;
+						}
 
-						image {
-							width: 93rpx;
-							height: 32rpx;
-							border-radius: 16rpx;
+						.user-shopname {
+							position: relative;
+							z-index: 2;
+							font-size: 20rpx;
+							font-weight: 500;
+							color: #977843;
+							line-height: 30rpx;
+							text-align: left;
 						}
 					}
 
-					.class {
-						display: inline-block;
-						margin-left: 10rpx;
-						padding: 6rpx;
-						text-align: center;
-						border: 1px solid #2e58ff;
-						border-radius: 16rpx;
-						font-size: 20rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #2e58ff;
-					}
 				}
 
 				.time {
-					font-size: $font-lg;
+					font-size: $font-base;
 					color: $font-color-light;
 				}
 			}
 		}
 
-		.money {
+		.list-left {
 			width: 50%;
+		}
+
+		.money {
 			text-align: right;
 			color: #db1935;
 			font-size: $font-lg;

+ 11 - 9
pages/user/user.vue

@@ -6,15 +6,15 @@
 		</view>
 		<view class="" style="height: 100rpx;"></view>
 		<view class="user-box">
-			<!-- <view class="user-shop flex" v-if="userInfo.uid">
-				<view class="user-shop-item" v-if="userInfo.level> 0 " style="width: 180rpx;">
+			<view class="user-shop flex" v-if="userInfo.uid">
+				<view class="user-shop-item" v-if="userInfo.level_info" style="width: 180rpx;">
 					<image class="user-shop-icon" src="../../static/icon/level.png" mode="" style="width: 180rpx;">
 					</image>
 					<view class="user-shopname" style="padding-left: 70rpx;">
-						{{userInfo.level_name}}
+						{{userInfo.level_info.name}}
 					</view>
 				</view>
-			</view> -->
+			</view>
 			<image class="avatar" :src="userInfo.avatar" mode="" v-if="userInfo.avatar"
 				@click="navTo('/pages/set/userinfo')"></image>
 			<image class="avatar" src="../../static/error/missing-face.png" mode="" v-else></image>
@@ -125,10 +125,11 @@
 						<view class="title">已经为您定制专属客服</view>
 						<image src="../../static/img/img010.png" mode=""></image>
 					</view>
-					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="nocancel">客服1VX:{{ text1 }}</view>
+					<view class="nocancel">客服2VX:{{ text2 }}</view>
 					<view class="comfirm-box">
-						<view class="cancel" @click="cancel">取消</view>
-						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+						<view class="cancel" @click="comfirm(text1)">复制客服1</view>
+						<view class="comfirm" @click="comfirm(text2)">复制客服2</view>
 					</view>
 				</view>
 			</view>
@@ -168,7 +169,8 @@
 				achievement: '',
 				code: '',
 				levelList: [],
-				text: '' //客服微信
+				text1: 'yangqianqian131419', //客服1微信
+				text2: 'AHFM134', //客服2微信
 			};
 		},
 		onShow() {
@@ -410,7 +412,7 @@
 
 	.popup-box {
 		width: 522rpx;
-		height: 605rpx;
+		height: 625rpx;
 		background-color: #ffffff;
 		border-radius: 20rpx;
 		position: relative;

BIN
static/icon/dz.png


BIN
static/icon/level-bg.png


BIN
static/img/index1.png


BIN
static/img/index2.png


BIN
static/img/index3.png


BIN
static/img/index4.png