xuhaolan 3 years ago
parent
commit
b0424df4f6

+ 7 - 0
api/functionalUnit.js

@@ -37,6 +37,13 @@ export function integrallist(data) {
 		data
 	});
 }
+export function gxlist(data) {
+	return request({
+		url: '/api/gx/list',
+		method: 'get',
+		data
+	});
+}
 
 
 // 获取签到列表

+ 8 - 0
api/wallet.js

@@ -26,6 +26,14 @@ export function extractCash(data) {
 		data
 	});
 }
+// 转换奖金
+export function getGxz(data) {
+	return request({
+		url: '/api/exchange_gx',
+		method: 'post',
+		data
+	});
+}
 
 // 提现信息
 export function extractBank(data) {

+ 15 - 0
pages.json

@@ -19,6 +19,12 @@
 				}
 			}
 		}, 
+		{
+			"path": "pages/user/shareQrCode",
+			"style": {
+				"navigationBarTitleText": "邀请好友"
+			}
+		},
 		{
 			"path": "pages/public/login",
 			"style": {
@@ -523,6 +529,15 @@
          }
             
         }
+        ,{
+            "path" : "pages/money/conversion",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 75 - 14
pages/index/index.vue

@@ -54,45 +54,50 @@
 						邀请有礼
 					</view>
 				</view>
-
 			</view>
-			<view class="customs">
+			<!-- <view class="customs">
 				<image src="../../static/index/index09.png" mode=""></image>
 				<view class="vip">
 					会员专区
 				</view>
-			</view>
+			</view> -->
 			<view class="jifen-content">
-				<view class="jifen-box" v-for="(item,index) in bastList" :key="index"
-					@click="navTo('/pages/product/product?id=' + item.id)">
+				<view class="jifen-box" v-for="(item,index) in list" :key="index"
+					@click="navToDetailPage(item)">
 					<view class="img">
-						<image class="hlbg" src="../../static/index/index04.png" mode=""></image>
+						<!-- <image class="hlbg" src="../../static/index/index04.png" mode=""></image> -->
 						<image class="image" :src="item.image" mode=""></image>
 					</view>
 					<view class="jifen-list">
 						<view class="box-title">
 							<view class="top clamp2">
-								{{item.store_name}}
+								{{item.goods_name}}
 							</view>
 						</view>
 						<view class="box-price">
-							<view class="huiyuan">
+							<!-- <view class="huiyuan">
 								会员价
-							</view>
-							<view class="price">
-								
-							</view>
+							</view> -->
+							<!-- <view class="price">
+								
+							</view> -->
 							<view class="price-left">
-								{{(item.price*1).toFixed(0)}}
+								{{(item.price*1).toFixed(0)}}
 							</view>
+							<view class="btn">立即购买</view>
 						</view>
+						
 					</view>
 				</view>
 			</view>
+			<uni-load-more :status="loadingType"></uni-load-more>
 		</view>
 	</view>
 </template>
 <script>
+	import {
+		getJfList,getBl
+	} from '@/api/product.js';
 	import {
 		loadIndexs
 	} from '@/api/index.js';
@@ -106,6 +111,14 @@
 		},
 		data() {
 			return {
+				height: '',
+				list: [],
+				page: 1,
+				limit: 4,
+				loadingType: 'more',
+				total_pages: 0,
+				keyword: '',
+				three_integral: 1,
 				carouselList: [], //轮播列表
 				couponArray: '',
 				bastList: [], //会员礼包
@@ -115,8 +128,45 @@
 		},
 		onLoad() {
 			this.loadData()
+			this.getArticleList()
 		},
 		methods: {
+			navToDetailPage(item) {
+				uni.navigateTo({
+					url: '/pages/product/jfproduct?id=' + item.id
+				});
+			},
+			
+			getArticleList() {
+				let obj = this
+				if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
+					return
+				}
+				obj.loadingType = 'loading'
+				getJfList({
+					page: obj.page,
+					limit: obj.limit,
+					keyword: obj.keyword, //商品关键字
+					is_gp:1 //设置是否vip商品
+				}).then(({
+					data
+				}) => {
+					console.log(data.data,'22222');
+					obj.list = obj.list.concat(data.data)
+					obj.total_pages = data.meta.pagination.total_pages
+					obj.page++
+					if(obj.page <= obj.total_pages) {
+						obj.loadingType = 'more'
+					}else {
+						obj.loadingType = 'noMore'
+					}
+					if (data.length == obj.limit) {
+						obj.loadingType = 'more'
+					} else {
+						obj.loadingType = 'noMore'
+					}
+				})
+			},
 			// 请求载入数据
 			async loadData() {
 				loadIndexs({})
@@ -166,13 +216,22 @@
 		background-color: #FFFFFF;
 		;
 	}
+	.btn {
+		background: #16cc9f;
+		border-radius: 24rpx;
+		font-size: 24rpx;
+		font-weight: 500;
+		color: #ffffff;
+		float: right;
+		padding: 10rpx 20rpx;
+	}
 
 	.title-box {
 		display: flex;
 		width: 100%;
 
 		.boxx {
-			margin: 40rpx 0 80rpx 0;
+			margin: 40rpx 0 30rpx 0;
 			width: 25%;
 			display: flex;
 			flex-direction: column;
@@ -470,8 +529,10 @@
 					}
 
 					.box-price {
+						width: 300rpx;
 						display: flex;
 						align-items: center;
+						justify-content: space-around;
 						position: absolute;
 						bottom: 20rpx;
 							

+ 1 - 1
pages/index/jfgood.vue

@@ -18,7 +18,7 @@
 									<!-- <image src="../../static/img/jiantou.png" mode=""></image> -->
 									<!-- <view class="jiang">直降{{ (item.ot_price - item.price).toFixed(2) }}元</view> -->
 								</view>
-								<view class="price" >{{ ((item.price)*(three_integral)).toFixed(2) }}积分</view>
+								<view class="price" >{{ ((item.price)*(three_integral)).toFixed(2) }}</view>
 							</view>
 							<view class="btn">立即购买</view>
 						</view>

+ 267 - 0
pages/money/conversion.vue

@@ -0,0 +1,267 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="flex ">
+				<view class="buttom">
+					<view class="icon">{{ userInfo.brokerage_price | getMoneyStyle }}</view>
+					<text class="text">可转换奖金</text>
+				</view>
+			</view>
+		</view>
+		<view class="row-box">
+			<view class="title">转换金额</view>
+			<view class="row">
+				<text class="tit">¥</text>
+				<input class="input" type="number" v-model="withdrawal" placeholder="请输入转换奖金数量" placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = userInfo.brokerage_price*1">全部转换</view>
+			</view>
+		</view>
+		<button class="add-btn up" @click="confirm">立即兑换</button>
+		<!-- <view class="tip" v-if="withdrawal != 0">
+			实际到账{{ realmoney }}现金,{{ gy }}响亮积分
+		</view> -->
+	</view>
+</template>
+
+<script>
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import { exchangeCash, extractBank, aliInfo, bankInfo ,getGxz} from '@/api/wallet.js';
+import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
+import {
+				mapState,
+				mapMutations
+			} from 'vuex';
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	components: {
+		uniNoticeBar
+	},
+	data() {
+		return {
+			type: 'weixin', //提现方式
+			money: '0.00', //可提现金额
+			withdrawal: '', //提现金额
+			aliData: {},
+			bankData: {},
+			// #ifdef H5
+			weichatBsrowser: false
+			// #endif
+		};
+	},
+	onLoad(options) {
+		console.log(this.userInfo);
+		// #ifdef H5
+		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+		// #endif
+		//加载提现信息
+		this.loadData();
+		// 加载提款账号信息
+		this.loadAli();
+		this.loadBank();
+	},
+	computed:{
+		...mapState('user',['userInfo','orderInfo','hasLogin']),
+		realmoney() {
+			return (this.withdrawal * 0.7).toFixed(2) * 1
+		},
+		gy() {
+			return (this.withdrawal * 0.3).toFixed(2) * 1
+		}
+	},
+	methods: {
+		// 更新数据
+		dataUp(){
+			this.loadAli();
+			this.loadBank();
+		},
+		//加载数据
+		async loadAli(source) {
+			aliInfo({}).then(e => {
+				this.aliData = e.data;
+			});
+		},
+		// 加载银行卡信息
+		async loadBank() {
+			bankInfo({}).then(e => {
+				this.bankData = e.data;
+			});
+		},
+		// 加载余额信息
+		async loadData() {
+			extractBank({}).then(({ data }) => {
+				this.money = data.commissionCount;//可提现余额
+				this.minPrice = data.minPrice;//最小提现
+			});
+		},
+		// 跳转
+		navTo(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		// 切换选中对象
+		tabRadio(e) {
+			this.type = e.detail.value;
+		},
+		// 提交
+		confirm() {
+			let data = {
+				money: this.withdrawal, //金额
+			}
+			getGxz(data)
+				.then(e => {
+					console.log(e,'222');
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000,
+						position: 'top'
+					});
+				})
+				.catch(e => {
+					console.log();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.content-money {
+	padding: 30rpx 0;
+	background: #ffffff;
+}
+.flex {
+	background-color: #ffffff;
+	text-align: center;
+	margin: 0 30rpx;
+	border-radius: $border-radius-sm;
+	.buttom {
+		width: 100%;
+		text-align: center;
+		font-size: $font-lg;
+	}
+	.interval {
+		width: 2px;
+		height: 60rpx;
+		background-color: #eeeeee;
+	}
+	.icon {
+		background-size: 100%;
+		font-size: 42rpx;
+		color: $font-color-dark;
+		font-weight: bold;
+		background-repeat: no-repeat;
+		background-position: center;
+	}
+	.text {
+		color: $font-color-light;
+	}
+}
+
+.row-box {
+	margin-top: 30rpx;
+	padding: 20rpx 30rpx;
+	background: #fff;
+	.title {
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		height: 80rpx;
+		.tit {
+			flex-shrink: 0;
+			width: 40rpx;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
+
+		.buttom {
+			color: $font-color-spec;
+			font-size: $font-base;
+		}
+	}
+}
+.add-btn {
+	&.modified {
+		color: $base-color;
+	}
+	&.up {
+		background-color: $base-color;
+		color: #fff;
+	}
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 0 auto;
+	margin-top: 30rpx;
+	font-size: $font-lg;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+
+.list {
+	padding-left: 30rpx;
+	margin-top: 30rpx;
+	background-color: #ffffff;
+	.box {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 120rpx;
+		border-bottom: 1px solid $border-color-light;
+		.icon {
+			font-size: 48rpx;
+			padding-right: 20rpx;
+			.icon-img {
+				height: 50rpx;
+				width: 50rpx;
+			}
+		}
+		.iconweixin1 {
+			color: #18bf16;
+		}
+		.iconzhifubao {
+			color: #08aaec;
+		}
+		.title-box {
+			flex-grow: 1;
+			text-align: left;
+			.title {
+				font-size: $font-base + 2rpx;
+				color: $font-color-base;
+			}
+			.node {
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+	}
+}
+.tip {
+	padding: 20rpx 40rpx;
+	color: #FD3B39;
+}
+/deep/ .uni-radio-input {
+	width: 45rpx;
+	height: 45rpx;
+}
+</style>

+ 3 - 2
pages/money/wallet.vue

@@ -22,7 +22,7 @@
 				<text>></text>
 			</view>
 		</view>
-		<view class="info-box flex">
+		<!-- <view class="info-box flex">
 			<view class="info-item">
 				<view class="info-font">累计收入</view>
 				<view class="info-num">{{recharge | getMoneyStyle}}</view>
@@ -32,7 +32,7 @@
 				<view class="info-font">累计支出</view>
 				<view class="info-num">{{orderStatusSum |getMoneyStyle}}</view>
 			</view>
-		</view>
+		</view> -->
 		<view class="navbar">
 			<view v-for="(item, index) in navList" :key="index" class="nav-item"
 				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
@@ -376,6 +376,7 @@
 	}
 
 	.money-btn {
+		margin-top: 70rpx;
 		position: relative;
 		z-index: 2;
 		color: #ffffff;

+ 1 - 1
pages/public/externalRegistered.vue

@@ -191,7 +191,7 @@
 					captcha: obj.code, //验证码
 					password: obj.password, //密码
 					// parent: obj.invitation,//接点人uid
-					register: obj.register, //推荐人id
+					spread: obj.register, //推荐人id
 					// parent_area: obj.parent_area,//区域
 					// pay_type: paytype,
 					// use_integral: obj.isSelsect ? '1':'0',

+ 17 - 15
pages/user/contribution.vue

@@ -8,15 +8,15 @@
 			</view>
 			<view class="content-bg"><image src="../../static/user/gxzbg.png" mode=""></image></view>
 			<view class="money-box">
-				<view class="money">{{userInfo.integral | getMoneyStyle}}</view>
+				<view class="money">{{userInfo.gx | getMoneyStyle}}</view>
 				<view>贡献值余额</view>
 			</view>
-			<view class="money-btn" @click="navto('/pages/money/withdmoenys')">
+			<view class="money-btn" @click="navto('/pages/money/conversion')">
 				贡献值互转
 				<text>></text>
 			</view>
 		</view>
-		<view class="info-box flex">
+		<!-- <view class="info-box flex">
 			<view class="info-item">
 				<view class="info-font">累计收入</view>
 				<view class="info-num">{{recharge}}</view>
@@ -26,18 +26,18 @@
 				<view class="info-font">累计支出</view>
 				<view class="info-num">{{orderStatusSum}}</view>
 			</view>
-		</view>
-		<view class="navbar">
+		</view> -->
+		<!-- <view class="navbar">
 			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" @change="changeTab">
+		</view> -->
+		<!-- <swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" @change="changeTab">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
 				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
 					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
 	
 					<!-- 订单列表 -->
-					<view>
+					<!-- <view>
 						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
 							<view class="title-box">
 								<view class="title">
@@ -52,16 +52,17 @@
 								<view v-if="item.status == 0" class="status">待发放</view>
 							</view>
 						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType" v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
-				</scroll-view>
+					</view> -->
+					<!-- <uni-load-more :status="tabItem.loadingType" v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more> -->
+			<!-- 	</scroll-view>
 			</swiper-item>
-		</swiper>
+		</swiper> --> 
 	</view>
 </template>
 
 <script>
-import { integrallist } from '@/api/functionalUnit.js';
+	
+import { integrallist ,gxlist} from '@/api/functionalUnit.js';
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
@@ -156,7 +157,7 @@ export default {
 			// 修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
 
-			integrallist(
+			gxlist(
 				{
 					page: navItem.page,
 					limit: navItem.limit,
@@ -329,6 +330,7 @@ page {
 	font-family: PingFang SC;
 	font-weight: bold;
 	color: #FFFFFF;
+	margin-top: 70rpx;
 	text {
 		display: inline-block;
 		padding-left: 10rpx;

+ 26 - 26
pages/user/integral.vue

@@ -22,7 +22,7 @@
 				<text>></text>
 			</view> -->
 		</view>
-		<view class="info-box flex">
+		<!-- <view class="info-box flex">
 			<view class="info-item">
 				<view class="info-font">累计收入</view>
 				<view class="info-num">{{recharge | getMoneyStyle}}</view>
@@ -32,7 +32,7 @@
 				<view class="info-font">累计支出</view>
 				<view class="info-num">{{orderStatusSum |getMoneyStyle}}</view>
 			</view>
-		</view>
+		</view> -->
 		<view class="navbar">
 			<view v-for="(item, index) in navList" :key="index" class="nav-item"
 				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
@@ -131,7 +131,7 @@
 					// },
 
 					{
-						state: 1,
+						state: 0,
 						text: '支出',
 						loadingType: 'more',
 						orderList: [],
@@ -139,7 +139,7 @@
 						limit: 10 //每次信息条数
 					},
 					{
-						state: 2,
+						state: 1,
 						text: '收入',
 						loadingType: 'more',
 						orderList: [],
@@ -179,7 +179,7 @@
 				//这里是将订单挂载到tab列表下
 				let index = this.tabCurrentIndex;
 				let navItem = this.navList[index];
-				let state = navItem.state;
+				let state = navItem.state ;
 				if (source === 'tabChange' && navItem.loaded === true) {
 					//tab切换只有第一次需要加载数据
 					return;
@@ -194,31 +194,31 @@
 				integrallist({
 						page: navItem.page,
 						limit: navItem.limit,
+						pm:state
 
-					}, state)
+					})
 					.then(({
 						data
 					}) => {
-
-						data.map(e => {
-							console.log(e, 'map数据');
-							if (e.list.length > 0) {
-								console.log(e, '数据111');
-								navItem.orderList = navItem.orderList.concat(e.list);
-								console.log(navItem.orderList);
-								navItem.page++;
-							}
-							if (navItem.limit == e.list.length) {
-								//判断是否还有数据, 有改为 more, 没有改为noMore
-								navItem.loadingType = 'more';
-								return;
-							} else {
-								//判断是否还有数据, 有改为 more, 没有改为noMore
-								navItem.loadingType = 'noMore';
-							}
-							uni.hideLoading();
-							this.$set(navItem, 'loaded', true);
-						})
+						// console.log(data,'垃圾数据');
+						if (data.length > 0) {
+							// console.log(data, '数据111');
+							navItem.orderList = navItem.orderList.concat(data);
+							console.log(navItem.orderList,'合并数据');
+							navItem.page++;
+						}
+						if (navItem.limit == data.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'more';
+							
+							return;
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'noMore';
+							
+						}
+						uni.hideLoading();
+						this.$set(navItem, 'loaded', true);
 						// .catch(e => {
 						// 	console.log(e);
 						// });

+ 3 - 2
pages/user/jiangjin.vue

@@ -16,7 +16,7 @@
 				<text>></text>
 			</view>
 		</view>
-		<view class="info-box flex">
+		<!-- <view class="info-box flex">
 					<view class="info-item">
 						<view class="info-font">累计收入</view>
 						<view class="info-num">{{recharge | getMoneyStyle}}</view>
@@ -26,7 +26,7 @@
 						<view class="info-font">累计支出</view>
 						<view class="info-num">{{orderStatusSum |getMoneyStyle}}</view>
 					</view>
-				</view>
+				</view> -->
 				<view class="navbar">
 					<view v-for="(item, index) in navList" :key="index" class="nav-item"
 						:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
@@ -376,6 +376,7 @@
 			}
 		
 			.money-btn {
+				margin-top: 70rpx;
 				position: relative;
 				z-index: 2;
 				color: #ffffff;

+ 54 - 43
pages/user/jiedian.vue

@@ -8,27 +8,30 @@
 			</view>
 			<view class="number-box">
 				<view class="number">
-					<text>{{ userInfo.A_count + userInfo.B_count + userInfo.C_count }}</text>
+					<text>{{ jiedianNb }}</text>
 				</view>
-				<view class="renshu">我的接点人数</view>
+				<view class="renshu">接点人数</view>
 			</view>
 		</view>
 		<view class="message">
 			<view class="yeji">
 				<view class="yeji-a">
 					<view class="yeji-top">A区业绩</view>
-					<view class="yeji-buttom">¥{{ userInfo.A_achievement }}</view>
+					<view class="yeji-buttom" v-if="jiedianList[0]">¥{{ jiedianList[0].achievement }}</view>
+					<view class="yeji-buttom" v-else>¥0</view>
 				</view>
 				<view class="border"></view>
 				<view class="yeji-a">
 					<view class="yeji-top">B区业绩</view>
-					<view class="yeji-buttom">¥{{ userInfo.B_achievement }}</view>
+					<view class="yeji-buttom" v-if="jiedianList[1]">¥{{ jiedianList[1].achievement}}</view>
+					<view class="yeji-buttom" v-else>¥0</view>
 				</view>
 				<view class="border"></view>
 				<view class="yeji-a">
 					<view class="yeji-top">C区业绩</view>
-					<view class="yeji-buttom">¥{{ userInfo.C_achievement }}</view>
+					<view class="yeji-buttom" v-if="jiedianList[2]">¥{{ jiedianList[2].achievement }}</view>
+					<view class="yeji-buttom" v-else>¥0</view>
 				</view>
 			</view>
 			<view class="back" @click="navBack()" v-if="parentList.length > 0">
@@ -56,85 +59,85 @@
 					<image src="../../static/image/sanchaji.png" mode=""></image>
 				</view>
 				<view class="subordinate">
-					<view class="headbox" v-if="listA" @click="nav('a')">
+					<view class="headbox" v-if="jiedianList[0]" @click="nav('a')">
 						<view class="head">
 							<view class="photo">
-								<image v-if='listA.avatar' :src="listA.avatar" mode="scaleToFill"></image>
+								<image v-if='jiedianList[0].user.avatar' :src="jiedianList[0].user.avatar" mode="scaleToFill"></image>
 							</view>
 						</view>
 						<view class="head-title">
 							<image src="../../static/image/jiedian1.png" mode="scaleToFill"></image>
 						</view>
 						<view class="head-name">
-							{{listA.nickname}}
+							{{jiedianList[0].user.nickname}}
 						</view>
 						<view class="head-phone">
-							{{listA.phone}}
+							{{jiedianList[0].user.phone}}
 						</view>
 					</view>
-					<view class="zhuce" v-else @click="open('A')">
+					<view class="zhuce" v-else >
 						<view class="jia">
 							<view class="jia_photo">
-								+
+								
 								<!-- <image v-if='!listA.avatar' class="imgbox" src="../../static/img/jiedian07.png" mode="scaleToFill"></image> -->
 							</view>
 							<view class="font">
-								点击添加
+								暂无
 							</view>
 						</view>
 					</view>
-					<view class="headbox" v-if="listB" @click="nav('b')">
+					<view class="headbox" v-if="jiedianList[1]" @click="nav('b')">
 						<view class="head">
 							<view class="photo">
-								<image :key='listB.id' :src="listB.avatar" mode="scaleToFill"></image>
+								<image :key='jiedianList[1].user.id' :src="jiedianList[1].user.avatar" mode="scaleToFill"></image>
 							</view>
 						</view>
 						<view class="head-title">
 							<image src="../../static/image/jiedian1.png" mode="scaleToFill"></image>
 						</view>
 						<view class="head-name">
-							{{listB.nickname}}
+							{{jiedianList[1].user.nickname}}
 						</view>
 						<view class="head-phone">
-							{{listB.phone}}
+							{{jiedianList[1].user.phone}}
 						</view>
 					</view>
-					<view class="zhuce" v-else @click="open('B')">
+					<view class="zhuce" v-else >
 						<view class="jia">
 							<view class="jia_photo">
-								+
+								
 								<!-- <image v-if='!listB.avatar' class="imgbox" src="../../static/img/jiedian07.png" mode="scaleToFill"></image> -->
 							</view>
 							<view class="font">
-								点击添加
+								暂无
 							</view>
 						</view>
 					</view>
 
-					<view class="headbox" v-if="listC" @click="nav('c')">
+					<view class="headbox" v-if="jiedianList[2]" @click="nav('c')">
 						<view class="head">
 							<view class="photo">
-								<image v-if='listC.avatar' :src="listC.avatar" mode="scaleToFill"></image>
+								<image v-if='jiedianList[2].user.avatar' :src="jiedianList[2].user.avatar" mode="scaleToFill"></image>
 							</view>
 						</view>
 						<view class="head-title">
 							<image src="../../static/image/jiedian1.png" mode="scaleToFill"></image>
 						</view>
 						<view class="head-name">
-							{{listC.nickname}}
+							{{jiedianList[2].user.nickname}}
 						</view>
 						<view class="head-phone">
-							{{listC.phone}}
+							{{jiedianList[2].user.phone}}
 						</view>
 					</view>
-					<view class="zhuce" v-else @click="open('C')">
+					<view class="zhuce" v-else >
 						<view class="jia">
 							<view class="jia_photo">
-								+
+								
 								<!-- <image v-if='!listC.avatar' class="imgbox" src="../../static/img/jiedian07.png" mode="scaleToFill"></image> -->
 							</view>
 							<view class="font">
-								点击添加
+								暂无
 							</view>
 						</view>
 					</view>
@@ -205,6 +208,7 @@
 		},
 		data() {
 			return {
+				jiedianNb:0,
 				bianhao: '1',
 				a: 1,
 				b: 2,
@@ -270,7 +274,6 @@
 				console.log(obj.parentList, 'navBack')
 				// 保存回退后数据对象
 				obj.name = parent.name;
-				 
 				obj.avatar = parent.avatar;
 				obj.id = parent.id;
 				obj.listA = obj.listB = obj.listC = '';
@@ -286,6 +289,9 @@
 				getjiedian({}, this.id).then(({
 					data
 				}) => {
+					console.log(data,'22323232');
+					obj.jiedianNb = data.all
+					obj.jiedianList = data.list
 					uni.hideLoading()
 					if (data.list.length != 0) {
 						data.list.forEach(e => {
@@ -299,7 +305,7 @@
 								item = 'listC';
 							}
 							obj[item] = e;
-							console.log(obj, '当前数据');
+							// console.log(obj, '当前数据');
 						});
 					} else {
 						return;
@@ -311,14 +317,14 @@
 			nav(type) {
 				const obj = this;
 				// 保存当前选中的对象
-				let item = '';
+				let item;
 				if (type == 'a') {
-					item = 'listA'
+					item =  obj.jiedianList[0]
 				} else {
 					if (type == 'b') {
-						item = 'listB'
+						item =  obj.jiedianList[1]
 					} else if (type == 'c') {
-						item = 'listC'
+						item =  obj.jiedianList[2]
 					}
 				}
 				obj.parentList.push({
@@ -328,15 +334,15 @@
 					id: obj.id,
 				})
 				console.log(obj.parentList, 's');
-				obj.name = obj[item].nickname;
-				obj.phone = obj[item].phone;
+				obj.name = item.user.nickname;
+				obj.phone = item.user.phone;
 				obj.avatar = '';
 				obj.$nextTick(function() {
-					obj.avatar = obj[item].avatar;
-					obj.id = obj[item].uid;
-					obj.listA = '';
-					obj.listB = '';
-					obj.listC = '';
+					obj.avatar = item.user.avatar;
+					obj.id = item.user.uid;
+					// obj.listA = '';
+					// obj.listB = '';
+					// obj.listC = '';
 					obj.loadData();
 				})
 			},
@@ -425,6 +431,7 @@
 
 
 				.zhuce {
+					
 					display: flex;
 
 					.zhuce-img {
@@ -531,6 +538,7 @@
 				align-items: center;
 
 				.headbox {
+					width: 33%;
 					position: absolute;
 					// width: 154rpx;
 					// height: 154rpx;
@@ -621,13 +629,15 @@
 			}
 
 			.subordinate {
+				
 				width: 750rpx;
 				display: flex;
 				justify-content: space-around;
 
 				.zhuce {
-
-					width: 154rpx;
+					display: flex;
+					justify-content: center;
+					width: 33%;
 					height: 154rpx;
 
 
@@ -651,7 +661,7 @@
 						}
 
 						.font {
-							font-size: 22rpx;
+							font-size: 30rpx;
 							font-weight: 500;
 							color: #999999;
 						}
@@ -666,7 +676,7 @@
 					flex-direction: column;
 					// flex-wrap: nowrap;
 					align-items: center;
-					padding: 0 10rpx;
+					// padding: 0 10rpx;
 
 					.head {
 						width: 154rpx;
@@ -735,6 +745,7 @@
 			align-items: center;
 
 			.yeji-a {
+				width: 33%;
 				display: flex;
 				flex-direction: column;
 				justify-content: space-around;

+ 126 - 144
pages/user/shareQrCode.vue

@@ -1,161 +1,143 @@
 <template>
-	<view class="container" v-if="loaded">
+	<view class="container">
 		<image @longtap="bc_code" class="backImg" :src="backImg"></image>
-		<!-- <view class="tki-qrcode"><canvas @longtap="bc_code" canvas-id="qrcode" /></view> -->
-		<view class="tki-qrcode">
-			<tki-qrcode :key="'http://shop.zhengyjk1994.com/register?petent=' + userInfo.uid" cid="tki-qrcode-canvas"
-				ref="qrcode"
-				:val="'http://shop.zhengyjk1994.com/register?petent=' + userInfo.uid"
-				:size="300" unit="upx" background="#ffffff" foreground="#333333" pdground="#333333" icon=""
-				:iconSize="40" :lv="3" :onval="true" :loadMake="true" :usingComponents="true" />
-		</view>
+		<view class="tki-qrcode"><canvas @longtap="bc_code" canvas-id="qrcode" /></view>
 	</view>
 </template>
 
 <script>
-	import {
-		spreadBanner
-	} from '@/api/user.js';
-	import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue'
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	export default {
-		components: {
-			tkiQrcode
-		},
-		data() {
-			return {
-				url: '',
-				backImg: '',
-				loaded: false
-			};
-		},
-		onLoad() {
-			this.spread();
-		},
-		computed: {
-			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
-			cpSize() {
-				if (this.unit == "upx") {
-					return uni.upx2px(this.size)
-				} else {
-					return this.size
-				}
-			},
+import { spreadBanner } from '@/api/user.js';
+export default {
+	// components: { tkiQrcode },
+	data() {
+		return {
+			url: '',
+			backImg: '',
+			userInfo: ''
+		};
+	},
+	onLoad() {
+		this.spread();
+	},
+	computed: {
+		cpSize() {
+			if (this.unit == 'upx') {
+				return uni.upx2px(this.size);
+			} else {
+				return this.size;
+			}
+		}
+	},
+	methods: {
+		spread() {
+			uni.showLoading({
+				title: '加载中'
+			});
+			let obj = this;
+			spreadBanner({
+				//#ifdef H5
+				type: 2,
+				//#endif
+				//#ifdef MP
+				type:1,
+				//#endif
+				//#ifdef APP-PLUS
+				type:2,
+				//#endif
+			}).then(({ data }) => {
+				console.log(data);
+				//#ifdef MP
+				obj.backImg = data[0].poster;
+				//#endif
+				//#ifdef H5
+				obj.backImg = data[0].wap_poster;
+				//#endif
+				//#ifdef APP-PLUS
+				obj.backImg = data[0].wap_poster;
+				//#endif
+				uni.hideLoading();
+			});
 		},
-		methods: {
-			spread() {
-				let obj = this;
-				uni.showLoading({
-					title: '二维码生成中...'
-				})
-				spreadBanner({
-					type: 2
-				}).then(({
-					data
-				}) => {
-					uni.hideLoading()
-					console.log(data)
-					obj.backImg = data[0].pic;
-					console.log(obj.backImg, 'obj.backImg')
-					this.loaded = true
-					
-				}).catch(err => {
-					console.log(err)
-					uni.hideLoading()
-				});
-			},
-			bc_code() {
-				let that = this;
-				console.log('保存二维码', this.backImg)
-				uni.downloadFile({ //获得二维码的临时地址
-					url: this.backImg,
-					success: (res) => {
-						//console.log('获取url',res)
-						if (res.statusCode == 200) {
-							uni.saveImageToPhotosAlbum({
-								filePath: res.tempFilePath, //传入临时地址
-								success() {
-									that.$api.msg('保存成功') //封装的提示
-								},
-								fail() {
-									that.$api.msg('保存失败')
-								}
-							})
-						}
+		bc_code() {
+			let that = this;
+			console.log('保存二维码', this.backImg);
+			uni.downloadFile({
+				//获得二维码的临时地址
+				url: this.backImg,
+				success: res => {
+					//console.log('获取url',res)
+					if (res.statusCode == 200) {
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath, //传入临时地址
+							success() {
+								that.$api.msg('保存成功'); //封装的提示
+							},
+							fail() {
+								that.$api.msg('保存失败');
+							}
+						});
 					}
-				})
-			},
-		},
+				}
+			});
+		}
 	}
+};
 </script>
 
 <style lang="scss">
-	page {
-		width: 100%;
-		min-height: 100%;
-
-		.container {
-			width: 100%;
-			height: 100%;
-		}
-	}
-
-	.backImg {
-		position: absolute;
+page {
+	width: 100%;
+	min-height: 100%;
+	.container {
 		width: 100%;
 		height: 100%;
 	}
-
-	.portrait {
-		width: 100%;
-		text-align: center;
-		padding-top: 80rpx;
-		padding-bottom: 30rpx;
-
-		image {
-			width: 250rpx;
-			height: 250rpx;
-		}
-	}
-
-	.text {
-		text-align: center;
-		width: 100%;
-		color: #FFFFFF;
-		font-size: 55rpx;
-		letter-spacing: 15rpx;
-	}
-
-	.uid-name {
-		padding: 50rpx 0rpx;
-		text-align: center;
-		width: 100%;
-		color: #FFFFFF;
-	}
-
-	.copy-btn {
-		color: #FFFFFF;
-		background-color: #4BA6ED;
-		border-radius: 50rpx;
-		width: 170rpx;
-		line-height: 70rpx;
-		margin: 0rpx auto;
-		text-align: center;
-	}
-
-	.tki-qrcode {
-		position: fixed;
-		bottom: 10%;
-		left: 30%;
-	}
-
-	canvas {
-		width: 150px;
-		height: 150px;
-		margin: auto;
-
+}
+.backImg {
+	position: absolute;
+	width: 100%;
+	height: 100%;
+}
+.portrait {
+	width: 100%;
+	text-align: center;
+	padding-top: 80rpx;
+	padding-bottom: 30rpx;
+	image {
+		width: 250rpx;
+		height: 250rpx;
 	}
+}
+.text {
+	text-align: center;
+	width: 100%;
+	color: #ffffff;
+	font-size: 55rpx;
+	letter-spacing: 15rpx;
+}
+.uid-name {
+	padding: 50rpx 0rpx;
+	text-align: center;
+	width: 100%;
+	color: #ffffff;
+}
+.copy-btn {
+	color: #ffffff;
+	background-color: #4ba6ed;
+	border-radius: 50rpx;
+	width: 170rpx;
+	line-height: 70rpx;
+	margin: 0rpx auto;
+	text-align: center;
+}
+.tki-qrcode {
+	position: fixed;
+	bottom: 10%;
+	left: 30%;
+}
+canvas {
+	width: 150px;
+	height: 150px;
+	margin: auto;
+}
 </style>

+ 57 - 36
pages/user/user.vue

@@ -9,21 +9,24 @@
 				<!-- 用户信息 -->
 				<view class="infor-left">
 					<view class="info-img">
-					<image :src=" userInfo.avatar || '../../static/error/missing-face.png' "></image>	
+						<image :src=" userInfo.avatar || '../../static/error/missing-face.png'"></image>
 					</view>
-					<view class="vip-img1" v-if="vipDj==1">
-						<image  src="../../static/user/vip1.png" mode=""></image>
+					<view class="vip-img1" v-if="userInfo.vip_info.name=='银卡' ">
+						<!-- <image src="../../static/user/vip1.png" mode=""></image> -->
+						银卡
 					</view>
-					<view class="vip-img2"  v-if="vipDj==2">
-						<image  src="../../static/user/vip2.png" mode=""></image>
+					<view class="vip-img1" v-if="userInfo.vip_info.name=='金卡' ">
+						<!-- <image src="../../static/user/vip2.png" mode=""></image> -->
+						金卡
 					</view>
-					<view class="vip-img3" v-if="vipDj==3">
-						<image  src="../../static/user/vip3.png" mode=""></image>
+					<view class="vip-img1" v-if="userInfo.vip_info.name=='钻卡' ">
+						<!-- <image src="../../static/user/vip3.png" mode=""></image> -->
+						钻卡
 					</view>
 					<view class="username">{{ userInfo.nickname || '游客' }}</view>
 					<view class="info-box">
 
-						<view class="phone" v-if="userInfo.phone">ID:{{userInfo.phone | phone}}</view>
+						<view class="phone" v-if="userInfo.uid">ID:{{userInfo.uid | phone}}</view>
 					</view>
 				</view>
 				<!-- 设置 -->
@@ -68,19 +71,23 @@
 				</view>
 				<view class="order-section">
 					<view class="order-item" @click="nav('/pages/money/wallet')">
-						<image src="../../static/user/user03.png" mode="scaleToFill" style="width:62rpx;height: 51rpx;"></image>
+						<image src="../../static/user/user03.png" mode="scaleToFill" style="width:62rpx;height: 51rpx;">
+						</image>
 						<view class="text">余额</view>
 					</view>
 					<view class="order-item" @click="nav('/pages/user/jiangjin')">
-						<image src="../../static/user/user18.png" mode="scaleToFill" style="width:71rpx;height: 62rpx;"></image>
+						<image src="../../static/user/user18.png" mode="scaleToFill" style="width:71rpx;height: 62rpx;">
+						</image>
 						<view class="text">奖金</view>
 					</view>
 					<view class="order-item" @click="nav('/pages/user/integral')">
-						<image src="../../static/user/user17.png" mode="scaleToFill"  style="width:55rpx;height: 56rpx;"></image>
+						<image src="../../static/user/user17.png" mode="scaleToFill" style="width:55rpx;height: 56rpx;">
+						</image>
 						<view class="text">积分</view>
 					</view>
 					<view class="order-item" @click="nav('/pages/user/contribution')">
-						<image src="../../static/user/user05.png" mode="scaleToFill" style="width:51rpx;height: 66rpx;"></image>
+						<image src="../../static/user/user05.png" mode="scaleToFill" style="width:51rpx;height: 66rpx;">
+						</image>
 						<view class="text">贡献值</view>
 					</view>
 					<!-- <view class="order-item" @click="nav('/pages/user/packet')">
@@ -98,7 +105,7 @@
 						<image class="jiantou" src="../../static/img/img32.png" mode="scaleToFill"></image>
 					</view>
 				</view>
-				<view class="ul-btm" @click="nav('/pages/user/shareQrCode')">
+				<view class="ul-btm"  @click="nav('/pages/user/shareQrCode')">
 					<image src="../../static/user/user13.png" mode="scaleToFill"></image>
 					<view class="btm-right">
 						<view class="text">邀请海报</view>
@@ -119,7 +126,7 @@
 						<image class="jiantou" src="../../static/img/img32.png" mode="scaleToFill"></image>
 					</view>
 				</view>
-				<view class="ul-btm" @click="nav('/pages/user/registerList')">
+				<view class="ul-btm" @click="nav('/pages/set/userinfo')">
 					<image src="../../static/user/user07.png" mode="scaleToFill"></image>
 					<view class="btm-right">
 						<view class="text">设置</view>
@@ -179,7 +186,7 @@
 		data() {
 			return {
 				text: '123465',
-				vipDj:3,
+				vipDj: 3,
 			}
 		},
 		filters: {
@@ -245,7 +252,7 @@
 					});
 			},
 			nav(url) {
-				console.log(url)
+				// console.log(url)
 				if (!this.hasLogin) {
 					// 保存地址
 					saveUrl();
@@ -253,7 +260,10 @@
 					interceptor();
 				} else {
 					uni.navigateTo({
-						url
+						url,
+						fail(e) {
+							console.log(e);
+						}
 					})
 				}
 
@@ -292,11 +302,13 @@
 </script>
 
 <style lang="scss">
-	.container,page {
+	.container,
+	page {
 		background: #FFFFFF;
 		height: auto;
 		min-height: 100%;
 	}
+
 	.u-tabbar {
 		display: flex;
 		flex-direction: column;
@@ -343,7 +355,7 @@
 				align-items: center;
 				justify-content: center;
 
-				.info-img{
+				.info-img {
 					image {
 						width: 126rpx;
 						height: 126rpx;
@@ -352,38 +364,47 @@
 						flex-shrink: 0;
 					}
 				}
-			
-				.vip-img1{
+
+				.vip-img1 {
+					border-radius: 20rpx;
 					position: absolute;
-					width: 133rpx;
-					height: 32rpx;
-					image{
-						width: 100%;
-						height: 100%;
-					}
-					
+					width: 100rpx;
+					height: 35rpx;
+					font-size: 24rpx;
+					color: #C4A774;
+					line-height: 35rpx;
+					text-align: center;
+					background: #1F2125;
+
+					// image {
+					// 	width: 100%;
+					// 	height: 100%;
+					// }
+
 				}
-				
-				.vip-img2{
+
+				.vip-img2 {
 					position: absolute;
 					width: 91rpx;
 					height: 32rpx;
-					image{
+
+					image {
 						width: 100%;
 						height: 100%;
 					}
-					
+
 				}
-				
-				.vip-img3{
+
+				.vip-img3 {
 					position: absolute;
 					width: 117rpx;
 					height: 32rpx;
-					image{
+
+					image {
 						width: 100%;
 						height: 100%;
 					}
-					
+
 				}
 
 				.info-box {