Browse Source

2021-12-21

xuhaolan 4 years ago
parent
commit
baa060e4bd

+ 8 - 0
api/index.js

@@ -6,6 +6,14 @@ export function crtItemList(data,id) {
 		data
 		data
 	});
 	});
 }
 }
+// 分享获得积分
+export function addJifen(data) {
+	return request({
+		url: '/api/sharegive',
+		method: 'post',
+		data
+	});
+}
 
 
 // 促销商品
 // 促销商品
 export function groom4(data) {
 export function groom4(data) {

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
 {
     "name" : "永省购",
     "name" : "永省购",
-    "appid" : "__UNI__7E72005",
+    "appid" : "__UNI__082645B",
     "description" : "",
     "description" : "",
     "versionName" : "1.0.0",
     "versionName" : "1.0.0",
     "versionCode" : "100",
     "versionCode" : "100",

+ 12 - 1
pages.json

@@ -43,6 +43,17 @@
 				}
 				}
 			}
 			}
 		},
 		},
+		{
+			"path": "pages/index/sign",
+			"style": {
+				"navigationBarTitleText": "积分签到",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
 		{
 		{
 			"path": "pages/contract/agreement",
 			"path": "pages/contract/agreement",
 			"style": {
 			"style": {
@@ -190,7 +201,7 @@
 		{
 		{
 			"path": "pages/product/construction",
 			"path": "pages/product/construction",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "施工产品",
+				"navigationBarTitleText": "礼包商品",
 				"app-plus": {
 				"app-plus": {
 					"titleNView": {
 					"titleNView": {
 						"type": "transparent"
 						"type": "transparent"

+ 30 - 4
pages/index/index.vue

@@ -136,7 +136,7 @@
 				</view>
 				</view>
 				
 				
 				<view class="good" v-for="item in bastList"
 				<view class="good" v-for="item in bastList"
-					@click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id">
+					@click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id" >
 					<image :src="item.image" mode="" class="good-img"></image>
 					<image :src="item.image" mode="" class="good-img"></image>
 					<view class="good-name clamp">{{ item.store_name }}</view>
 					<view class="good-name clamp">{{ item.store_name }}</view>
 					<!-- <view class="good-info clamp">纯植物无香精</view> -->
 					<!-- <view class="good-info clamp">纯植物无香精</view> -->
@@ -171,7 +171,8 @@
 	} from '@/utils/rocessor.js';
 	} from '@/utils/rocessor.js';
 	import {
 	import {
 		loadIndexs,
 		loadIndexs,
-		getStoreList
+		getStoreList,
+		addJifen
 	} from '@/api/index.js';
 	} from '@/api/index.js';
 	import {
 	import {
 		getUserInfo
 		getUserInfo
@@ -221,6 +222,7 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
+				shop:[],
 				isAuth:0,
 				isAuth:0,
 				wechat_qrcode: '', //公众号二维码
 				wechat_qrcode: '', //公众号二维码
 				storeList: [], //门店列表
 				storeList: [], //门店列表
@@ -279,16 +281,25 @@
 			// 设置菜单中的转发按钮触发转发事件时的转发内容
 			// 设置菜单中的转发按钮触发转发事件时的转发内容
 			let pages = getCurrentPages(); //获取加载的页面
 			let pages = getCurrentPages(); //获取加载的页面
 			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
 			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+			console.log(currentPage,'1919');
 			let url = currentPage.route; //当前页面url
 			let url = currentPage.route; //当前页面url
 			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
 			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+			addJifen({}).then(({data})=>{
+					console.log(data,'fenxiang');
+			})
 			console.log(url + '?id=' + item.id + '&spread=' + this.userInfo.uid)
 			console.log(url + '?id=' + item.id + '&spread=' + this.userInfo.uid)
 			let shareObj = {
 			let shareObj = {
 				title: this.userInfo.nickname + "邀请您加入永省购", // 默认是小程序的名称(可以写slogan等)
 				title: this.userInfo.nickname + "邀请您加入永省购", // 默认是小程序的名称(可以写slogan等)
 				path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
 				path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
 				// imageUrl: ,
 				// imageUrl: ,
 				success: function(res) {
 				success: function(res) {
+					console.log(res,'xuhaolan');
 					// 转发成功之后的回调
 					// 转发成功之后的回调
-					if (res.errMsg == 'shareAppMessage:ok') {}
+					if (res.errMsg == 'shareAppMessage:ok') {
+						
+					}
+					//token
+					
 				},
 				},
 				fail: function() {
 				fail: function() {
 					// 转发失败之后的回调
 					// 转发失败之后的回调
@@ -402,6 +413,7 @@
 				this.$refs.popup.open()
 				this.$refs.popup.open()
 			},
 			},
 			navTo(url) {
 			navTo(url) {
+				
 				uni.navigateTo({
 				uni.navigateTo({
 					url: url
 					url: url
 				})
 				})
@@ -557,7 +569,21 @@
 						this.swiperLength = this.carouselList.length;
 						this.swiperLength = this.carouselList.length;
 						this.menusList = data.menus;
 						this.menusList = data.menus;
 						this.goodsList = goods.firstList; //最新商品
 						this.goodsList = goods.firstList; //最新商品
-						this.bastList = goods.bastList; //精品推荐
+						let bast = goods.bastList; //精品推荐
+						let arr = []
+						bast.forEach(item =>{
+							if(item.store_name =='加盟会员'){
+								 // this.shop.push(item.store_name)
+								 if(this.userInfo.uid &&  this.userInfo.level>1){
+								 }else {
+									 arr.push(item)
+								 }
+							}else {
+								arr.push(item)
+							}
+						})
+						// console.log(this.shop,'2223344');
+						this.bastList = arr
 						console.log(this.bastList, 'this.bastList6666666666666666666666');
 						console.log(this.bastList, 'this.bastList6666666666666666666666');
 						this.wechat_qrcode = data.wechat_qrcode
 						this.wechat_qrcode = data.wechat_qrcode
 						console.log(data.wechat_qrcode)
 						console.log(data.wechat_qrcode)

+ 177 - 0
pages/index/sign.vue

@@ -0,0 +1,177 @@
+<template>
+	<view>
+		<view class="title-box">
+			<view class=" title-conetnt  position-relative">
+				<view class="title-img"><image src="/static/img/img08.png" mode="aspectFit"></image></view>
+				<view class="title-content-box">
+					<view class="title-text">已连续签到</view>
+					<view class="title-day-text">
+						<text class="title-day">{{actionDay}}</text>
+						<text>天</text>
+					</view>
+					<view class="title-button" :class="{'signAction':signTrue}" @click="signTrue?'':integral()">{{signTrue?'已签到':'立即签到'}}</view>
+				</view>
+			</view>
+			<view class="title-tip"><text>共获得{{sum_integral}}积分,总签到{{allSign}}天</text></view>
+		</view>
+		<calendar class="sign-date-box" :checks="signList" checksClass="" :checkTextShow="true" checksIcon="/static/img/img07.png"></calendar>
+	</view>
+</template>
+
+<script>
+import calendar from '../../components/ss-calendar/ss-calendar.vue';
+import { signList, integral,signUser } from '@/api/functionalUnit.js';
+export default {
+	components: {
+		calendar
+	},
+	data() {
+		return {
+			money: '', //保存当前月份
+			year: '', //保存当前年份
+			day: '', //保存当前日期
+			signList: [] ,//签到日子列表
+			actionDay:0,//连续签到天数
+			allSign:0,//累计签到
+			sum_integral:0,//累计获得积分
+			signTrue:false,
+		};
+	},
+	onLoad() {
+		this.signUser();
+		this.getData();
+		this.loadList();
+	},
+	methods: {
+		// 获取当前时间
+		getData(current) {
+			const date = current ? new Date(current) : new Date();
+			this.year = date.getFullYear();//保存当前年份
+			this.month = date.getMonth() + 1;//保存当前月份
+			this.day = date.getDate();//保存当前日期
+		},
+		//获取签到用户信息
+		signUser(){
+			signUser({all:1}).then(({data}) => {
+				this.actionDay = data.sign_num;//连续签到天数
+				this.allSign = data.sum_sgin_day;//累计签到天数
+				this.sum_integral = data.sum_integral;//累计总积分
+			})
+		},
+		// 签到
+		integral() {
+			integral({})
+				.then(e => {
+					// 改为已签到
+					this.signTrue = true;
+					this.actionDay++;
+					// 保存签到成功
+					this.signList.push(this.day);
+					uni.showToast({
+						title: '签到成功',
+						duration: 2000,
+						position: 'top'
+					});
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 获取签到列表
+		loadList() {
+			let obj = this;
+			let present = this.day; //保存当前天数用于后续计算
+			let actionDay = 0; //用于计算活跃天数
+			let arr = []; //保存返回数组;
+			signList({
+				page: 1,
+				limit: 31
+			}).then(e => {
+				arr = e.data.map((e, ind) => {
+					let time = e.add_time.split('-');
+					let day = parseInt(time[2].replace(/^0/i, ''));
+					let year = time[0];
+					let month = +time[1];
+					if (obj.year == year && obj.month == month) {
+						return day;
+					}
+				});
+				this.signList = arr;
+				// 判断今天是否已经签到
+				if(arr[0]==this.day){
+					this.signTrue = true;
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: $page-color-base;
+}
+.sign-date-box {
+	margin: 25rpx;
+	border-radius: 15rpx;
+	margin-top: -70rpx;
+}
+.title-box {
+	background-color: $base-color;
+	padding-top: 120rpx;
+	color: #ffffff;
+	height: 590rpx;
+	.title-conetnt {
+		height: 350rpx;
+		width: 350rpx;
+		margin: 0 auto;
+		text-align: center;
+		.title-img {
+			position: absolute;
+			top: 0;
+			left: 0;
+			height: 100%;
+			width: 100%;
+			image {
+				height: 100%;
+				width: 100%;
+			}
+		}
+		.title-content-box {
+			position: absolute;
+			width: 100%;
+			.title-day-text {
+				padding: 20rpx;
+				font-size: $font-base - 2rpx;
+				.title-day {
+					font-size: 60rpx;
+				}
+			}
+			.title-text {
+				font-size: 26rpx;
+				padding-top: 100rpx;
+			}
+			.title-button {
+				background-color: #fe7e51;
+				border-radius: 99rpx;
+				width: 200rpx;
+				height: 64rpx;
+				margin: 0 auto;
+				line-height: 64rpx;
+				text-align: center;
+				font-size: $font-base;
+				&.signAction{
+					background-color: $font-color-light;
+				}
+			}
+		}
+	}
+}
+.title-tip {
+	color: #ffffff;
+	font-size: $font-base - 2rpx;
+	padding-top: 20rpx;
+	text-align: center;
+	margin-top: -40rpx;
+}
+</style>

+ 9 - 1
pages/money/account.vue

@@ -26,6 +26,11 @@
 					<input class="input" v-model="tabItem.orderList.name" type="text" placeholder="提款人姓名"
 					<input class="input" v-model="tabItem.orderList.name" type="text" placeholder="提款人姓名"
 						placeholder-class="placeholder" />
 						placeholder-class="placeholder" />
 				</view>
 				</view>
+				<view class="row b-b">
+					<text class="tit">手机号码</text>
+					<input class="input" v-model="tabItem.orderList.phone" type="number" placeholder="提款人手机号"
+						placeholder-class="placeholder" />
+				</view>
 				<view class="row b-b">
 				<view class="row b-b">
 					<text class="tit">{{ tabIndex == 0 ? '账号' : '银行卡号' }}</text>
 					<text class="tit">{{ tabIndex == 0 ? '账号' : '银行卡号' }}</text>
 					<input class="input" v-model="tabItem.orderList.code" type="text" placeholder="请输入账号"
 					<input class="input" v-model="tabItem.orderList.code" type="text" placeholder="请输入账号"
@@ -84,7 +89,7 @@
 						loadingType: 'more',
 						loadingType: 'more',
 
 
 						orderList: {
 						orderList: {
-
+							phone:'',
 							name: '',
 							name: '',
 							code: '',
 							code: '',
 							id: '',
 							id: '',
@@ -169,6 +174,9 @@
 						// console.log(obj.bankList[obj.bankIndex]);
 						// console.log(obj.bankList[obj.bankIndex]);
 						return this.$api.msg('请输入所属银行');
 						return this.$api.msg('请输入所属银行');
 					}
 					}
+					if(!arr.phone){
+						return this.$api.msg('请输入手机号码')
+					}
 					if (!arr.code) {
 					if (!arr.code) {
 						return this.$api.msg('请输入银行卡号');
 						return this.$api.msg('请输入银行卡号');
 					}
 					}

File diff suppressed because it is too large
+ 13 - 16
pages/order/createOrder.vue


+ 195 - 158
pages/product/common/productBottom.vue

@@ -13,78 +13,173 @@
 			<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
 			<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
 		</view> -->
 		</view> -->
 		<view class="btm-btn">
 		<view class="btm-btn">
-			<button type="primary" class="add-btn" @click="buy(2)" v-if="showAdd">加入购物车</button>
+			<button type="primary" class="add-btn" @click="buy(2)" v-if="showAdd&&jifen==0">加入购物车</button>
 			<button type="primary" class="buy-btn" @click="buy(1)" :class="{'quck':!showAdd }">立即购买</button>
 			<button type="primary" class="buy-btn" @click="buy(1)" :class="{'quck':!showAdd }">立即购买</button>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
-import { collectAdd, collectDel } from '@/api/product.js';
-export default {
-	props: {
-		many: {
-			default: 9
-		},
-		goodsObjact: {
-			default: function() {
-				return {};
+	import {
+		collectAdd,
+		collectDel
+	} from '@/api/product.js';
+	import {
+		addJifen
+	} from '@/api/index.js'
+	export default {
+		props: {
+			jifen: {
+
+			},
+			many: {
+				default: 9
+			},
+			goodsObjact: {
+				default: function() {
+					return {};
+				}
+			},
+			goodsid: {
+				default: ''
+			},
+			showAdd: {
+				default: true
 			}
 			}
 		},
 		},
-		goodsid: {
-			default: ''
+		data() {
+			return {};
 		},
 		},
-		showAdd: {
-			default: true
-		}
-	},
-	data() {
-		return {};
-	},
-	methods: {
-		buy(type) {
-			this.$emit('specOPne', type);
+		onLoad() {
+			addJifen()
 		},
 		},
-		//收藏
-		toFavorite(item) {
-			let obj = this;
-			item.userCollect = !item.userCollect;
-			if (!item.userCollect) {
-				collectDel({ id: obj.goodsid, category: 'product' }).then(function(e) {
-					uni.showToast({
-						title: '成功取消收藏',
-						type: 'top',
-						duration: 1500
+		methods: {
+			buy(type) {
+				this.$emit('specOPne', type);
+			},
+			//收藏
+			toFavorite(item) {
+				let obj = this;
+				item.userCollect = !item.userCollect;
+				if (!item.userCollect) {
+					collectDel({
+						id: obj.goodsid,
+						category: 'product'
+					}).then(function(e) {
+						uni.showToast({
+							title: '成功取消收藏',
+							type: 'top',
+							duration: 1500
+						});
 					});
 					});
-				});
-			} else {
-				collectAdd({ id: obj.goodsid, category: 'product' }).then(function(e) {
-					uni.showToast({
-						title: '成功加入收藏',
-						type: 'top',
-						duration: 1500
+				} else {
+					collectAdd({
+						id: obj.goodsid,
+						category: 'product'
+					}).then(function(e) {
+						uni.showToast({
+							title: '成功加入收藏',
+							type: 'top',
+							duration: 1500
+						});
 					});
 					});
-				});
+				}
 			}
 			}
 		}
 		}
-	}
-};
+	};
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-/* 底部操作菜单 */
-.page-bottom {
-	position: fixed;
-	bottom: 0rpx;
-	z-index: 95;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	width: 750rpx;
-	height: 120rpx;
-	background-color: #ffffff;
-	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+	/* 底部操作菜单 */
+	.page-bottom {
+		position: fixed;
+		bottom: 0rpx;
+		z-index: 95;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 750rpx;
+		height: 120rpx;
+		background-color: #ffffff;
+
+		/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
 	border-radius: 16rpx; */
 	border-radius: 16rpx; */
+		.p-b-btn {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			font-size: $font-sm;
+			color: $font-color-base;
+			width: 96rpx;
+			height: 80rpx;
+
+			.iconfont {
+				font-size: 40rpx;
+				line-height: 48rpx;
+				color: $font-color-light;
+			}
+
+			&.active,
+			&.active .iconfont {
+				color: $uni-color-primary;
+			}
+
+			.iconlikefill {
+				font-size: 46rpx;
+			}
+
+			image {
+				width: 56rpx;
+				height: 58rpx;
+			}
+		}
+
+		.action-btn-group {
+			display: flex;
+			height: 76rpx;
+			border-radius: 100px;
+			overflow: hidden;
+			margin-left: 20rpx;
+			position: relative;
+
+			&:after {
+				content: '';
+				position: absolute;
+				top: 50%;
+				right: 50%;
+				transform: translateY(-50%);
+				height: 28rpx;
+				width: 0;
+				border-right: 1px solid rgba(255, 255, 255, 0.5);
+			}
+
+			.action-btn {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				// width: 270rpx;
+				// height: 100%;
+				font-size: $font-base;
+				padding: 0;
+				border-radius: 0;
+				background: transparent;
+				width: 339rpx;
+				height: 90rpx;
+
+				&.buy-now-btn {
+					background-color: #303e49;
+				}
+
+				&.add-cart-btn {
+					background-color: #fff;
+					color: #ff4c4c;
+					border: #ff4c4c 1px solid;
+				}
+			}
+		}
+	}
+
 	.p-b-btn {
 	.p-b-btn {
 		display: flex;
 		display: flex;
 		flex-direction: column;
 		flex-direction: column;
@@ -94,126 +189,68 @@ export default {
 		color: $font-color-base;
 		color: $font-color-base;
 		width: 96rpx;
 		width: 96rpx;
 		height: 80rpx;
 		height: 80rpx;
+
 		.iconfont {
 		.iconfont {
 			font-size: 40rpx;
 			font-size: 40rpx;
 			line-height: 48rpx;
 			line-height: 48rpx;
 			color: $font-color-light;
 			color: $font-color-light;
 		}
 		}
+
 		&.active,
 		&.active,
 		&.active .iconfont {
 		&.active .iconfont {
 			color: $uni-color-primary;
 			color: $uni-color-primary;
 		}
 		}
+
+		.icon-fenxiang2 {
+			font-size: 42rpx;
+			transform: translateY(-2rpx);
+		}
+
 		.iconlikefill {
 		.iconlikefill {
 			font-size: 46rpx;
 			font-size: 46rpx;
 		}
 		}
-		image {
-			width: 56rpx;
-			height: 58rpx;
-		}
 	}
 	}
-	.action-btn-group {
+
+	.btm-btn {
+		z-index: 2;
+		width: 750rpx;
+		height: 130rpx;
 		display: flex;
 		display: flex;
-		height: 76rpx;
-		border-radius: 100px;
-		overflow: hidden;
-		margin-left: 20rpx;
-		position: relative;
-		&:after {
-			content: '';
-			position: absolute;
-			top: 50%;
-			right: 50%;
-			transform: translateY(-50%);
-			height: 28rpx;
-			width: 0;
-			border-right: 1px solid rgba(255, 255, 255, 0.5);
+		// justify-content: space-between;
+		justify-content: space-between;
+		// justify-content: space-between;
+		position: fixed;
+		padding: 20rpx;
+		bottom: 0;
+		background-color: #fff;
+
+		// z-index: 666;
+		.add-btn {
+			width: 100%;
+			height: 90rpx;
+			border: 1px solid #ff4c4c;
+			border-radius: 45rpx;
+			background-color: #fff;
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #ff4c4c;
+			line-height: 90rpx;
 		}
 		}
-		.action-btn {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			// width: 270rpx;
-			// height: 100%;
-			font-size: $font-base;
-			padding: 0;
-			border-radius: 0;
-			background: transparent;
-			width: 339rpx;
+
+		.buy-btn {
+			width: 100%;
 			height: 90rpx;
 			height: 90rpx;
-			&.buy-now-btn {
-				background-color: #303e49;
-			}
-			&.add-cart-btn {
-				background-color: #fff;
-				color: #ff4c4c;
-				border: #ff4c4c 1px solid;
-			}
+			background: #ff4c4c;
+			border-radius: 45rpx;
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #ff4c4c;
+			line-height: 90rpx;
+			color: #fff;
+		}
+
+		.quck {
+			width: 691px;
 		}
 		}
 	}
 	}
-}
-.p-b-btn {
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	justify-content: center;
-	font-size: $font-sm;
-	color: $font-color-base;
-	width: 96rpx;
-	height: 80rpx;
-	.iconfont {
-		font-size: 40rpx;
-		line-height: 48rpx;
-		color: $font-color-light;
-	}
-	&.active,
-	&.active .iconfont {
-		color: $uni-color-primary;
-	}
-	.icon-fenxiang2 {
-		font-size: 42rpx;
-		transform: translateY(-2rpx);
-	}
-	.iconlikefill {
-		font-size: 46rpx;
-	}
-}
-.btm-btn {
-	z-index: 2;
-	width: 750rpx;
-	height: 130rpx;
-	display: flex;
-	// justify-content: space-between;
-	justify-content: space-between;
-	// justify-content: space-between;
-	position: fixed;
-	padding: 20rpx;
-	bottom: 0;
-	background-color: #fff;
-	// z-index: 666;
-	.add-btn {
-		width: 339rpx;
-		height: 90rpx;
-		border: 1px solid #ff4c4c;
-		border-radius: 45rpx;
-		background-color: #fff;
-		font-size: 36rpx;
-		font-weight: 500;
-		color: #ff4c4c;
-		line-height: 90rpx;
-	}
-	.buy-btn {
-		width: 339rpx;
-		height: 90rpx;
-		background: #ff4c4c;
-		border-radius: 45rpx;
-		font-size: 36rpx;
-		font-weight: 500;
-		color: #ff4c4c;
-		line-height: 90rpx;
-		color: #fff;
-	}
-	.quck {
-		width: 691px;
-	}
-}
 </style>
 </style>

+ 18 - 1
pages/product/construction.vue

@@ -35,6 +35,7 @@ export default {
 	},
 	},
 	data() {
 	data() {
 		return {
 		return {
+			shop:[],
 			list: [],
 			list: [],
 			storeList: [],
 			storeList: [],
 			loadingType: 'more',
 			loadingType: 'more',
@@ -87,9 +88,25 @@ export default {
 			}).then(({data}) => {
 			}).then(({data}) => {
 				console.log(data,'is_drop++++++++++++++++')
 				console.log(data,'is_drop++++++++++++++++')
 				let list = data.map(item => {
 				let list = data.map(item => {
+					console.log(item,'33');
+					if(item.store_name =='加盟会员'){
+						console.log(item.store_name);
+						 // this.shop.push(item.store_name)
+						 if(this.userInfo.uid &&  this.userInfo.level>1){
+						 }else {
+							 this.shop.push(item)
+						 }
+					}else {
+						 this.shop.push(item)
+					}
+					if(this.userInfo.uid &&  this.userInfo.level!=1){
+					}
 					return item
 					return item
+					console.log(item,'888');
 				})
 				})
-				obj.list = obj.list.concat(list)
+			
+				obj.list = obj.list.concat(this.shop)
+				console.log(obj.list,'22');
 				obj.page++
 				obj.page++
 				if (obj.limit == data.length) {
 				if (obj.limit == data.length) {
 					//判断是否还有数据, 有改为 more, 没有改为noMore
 					//判断是否还有数据, 有改为 more, 没有改为noMore

+ 28 - 4
pages/product/product.vue

@@ -19,7 +19,7 @@
 		<!-- 底部高度撑开 -->
 		<!-- 底部高度撑开 -->
 		<view class="contentBottomHeight"></view>
 		<view class="contentBottomHeight"></view>
 		<!-- 底部操作菜单 -->
 		<!-- 底部操作菜单 -->
-		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid" @specOPne="specOPne"
+		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :jifen = "jifen" :goodsid="goodsid" @specOPne="specOPne"
 			:showAdd="showAdd"></product-bottom>
 			:showAdd="showAdd"></product-bottom>
 		<!-- 规格-模态层弹窗 -->
 		<!-- 规格-模态层弹窗 -->
 		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
 		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
@@ -80,6 +80,9 @@
 		mapState
 		mapState
 	} from 'vuex';
 	} from 'vuex';
 	import store from '@/store/index.js';
 	import store from '@/store/index.js';
+	import {
+		addJifen
+	} from '@/api/index.js'
 	import {
 	import {
 		saveUrl
 		saveUrl
 	} from '@/utils/loginUtils.js';
 	} from '@/utils/loginUtils.js';
@@ -118,6 +121,7 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
+				jifen:0,//是否有积分
 				mer_id:'',//商户编号
 				mer_id:'',//商户编号
 				show: false,
 				show: false,
 				showAdd: true,
 				showAdd: true,
@@ -186,7 +190,9 @@
 				}
 				}
 			}
 			}
 		},
 		},
+		
 		async onLoad(options) {
 		async onLoad(options) {
+		
 			let obj = this;
 			let obj = this;
 			obj.userInfo = uni.getStorageSync('userInfo');
 			obj.userInfo = uni.getStorageSync('userInfo');
 			//保存商品id
 			//保存商品id
@@ -214,18 +220,26 @@
 		},
 		},
 		// 分享
 		// 分享
 		onShareAppMessage(options) {
 		onShareAppMessage(options) {
+			
 			// 设置菜单中的转发按钮触发转发事件时的转发内容
 			// 设置菜单中的转发按钮触发转发事件时的转发内容
 			let pages = getCurrentPages(); //获取加载的页面
 			let pages = getCurrentPages(); //获取加载的页面
 			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
 			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
 			let url = currentPage.route; //当前页面url
 			let url = currentPage.route; //当前页面url
 			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
 			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+			addJifen({}).then(({data})=>{
+					console.log(data,'fenxiang');
+			})
 			let shareObj = {
 			let shareObj = {
 				title: this.goodsObjact.store_name + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
 				title: this.goodsObjact.store_name + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
 				path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
 				path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
 				imageUrl: this.goodsObjact.image,
 				imageUrl: this.goodsObjact.image,
 				success: function(res) {
 				success: function(res) {
 					// 转发成功之后的回调
 					// 转发成功之后的回调
-					if (res.errMsg == 'shareAppMessage:ok') {}
+					console.log(res,'分享毁掉')
+					if (res.errMsg == 'shareAppMessage:ok') {
+						
+					}
+				
 				},
 				},
 				fail: function() {
 				fail: function() {
 					// 转发失败之后的回调
 					// 转发失败之后的回调
@@ -239,6 +253,12 @@
 
 
 			return shareObj;
 			return shareObj;
 		},
 		},
+		onShow:function(){
+			wx.hideShareMenu()
+			if (this.userInfo.uid) {
+				wx.showShareMenu()
+			}
+		},
 		methods: {
 		methods: {
 			// #ifdef MP-WEIXIN
 			// #ifdef MP-WEIXIN
 			IndexShare() {
 			IndexShare() {
@@ -381,11 +401,14 @@
 			goodsDetail() {
 			goodsDetail() {
 				let obj = this;
 				let obj = this;
 				// 获取普通商品信息
 				// 获取普通商品信息
-				if (obj.goodsType == 0) {
+				if (obj.goodsType == 0 ) {
 					goodsDetail({}, this.goodsid).then(function({
 					goodsDetail({}, this.goodsid).then(function({
 						data
 						data
 					}) {
 					}) {
 						obj.list = data;
 						obj.list = data;
+						obj.jifen = data.storeInfo.use_integral*1
+						console.log(obj.jifen,typeof(obj.jifen));
+						
 						console.log(obj.list, '普通商品数据');
 						console.log(obj.list, '普通商品数据');
 						obj.good_list = data.good_list; //保存猜你喜欢列表
 						obj.good_list = data.good_list; //保存猜你喜欢列表
 						obj.reply = data.reply; //保存评论列表
 						obj.reply = data.reply; //保存评论列表
@@ -460,7 +483,7 @@
 						obj.goodsNumberMax = goods.num;
 						obj.goodsNumberMax = goods.num;
 						console.log(obj.seckillObj, '数据');
 						console.log(obj.seckillObj, '数据');
 						obj.goodsObjact = goods;
 						obj.goodsObjact = goods;
-						obj.IndexShare()
+						// obj.IndexShare()
 						if (obj.goodsObjact.description != null) {
 						if (obj.goodsObjact.description != null) {
 							obj.description = obj.goodsObjact.description.replace(/\<img/gi,
 							obj.description = obj.goodsObjact.description.replace(/\<img/gi,
 								'<img class="rich-img"');
 								'<img class="rich-img"');
@@ -517,6 +540,7 @@
 					data.new = 0;
 					data.new = 0;
 				}
 				}
 				console.log(data,'777');
 				console.log(data,'777');
+			
 				cartAdd(data)
 				cartAdd(data)
 					.then(function(e) {
 					.then(function(e) {
 						let da = e.data;
 						let da = e.data;

+ 2 - 1
pages/public/wxLogin.vue

@@ -107,10 +107,11 @@ export default {
 			// #endif
 			// #endif
 			
 			
 			wechatMpAuth({
 			wechatMpAuth({
+				spread_spid: spread_spid == 'undefined' ? '':spread_spid ,
 				code: obj.code,
 				code: obj.code,
 				iv: user.iv,
 				iv: user.iv,
 				encryptedData: user.encryptedData,
 				encryptedData: user.encryptedData,
-				spread_spid: spread_spid,
+				
 				// #ifdef MP
 				// #ifdef MP
 				spread_code: spread_code,
 				spread_code: spread_code,
 				// #endif
 				// #endif

+ 5 - 0
pages/redirect/redirect.vue

@@ -55,6 +55,11 @@ export default {
 			// #ifndef MP
 			// #ifndef MP
 			// 获取推广人id
 			// 获取推广人id
 			let spread_spid = uni.getStorageSync('spread') || '';
 			let spread_spid = uni.getStorageSync('spread') || '';
+			console.log('red-----------')
+			if(!spread_spid) {
+				spread_spid = ''
+				console.log('red+++++++++')
+			}
 			// #endif
 			// #endif
 			// #ifdef MP
 			// #ifdef MP
 			// 小程序推广人
 			// 小程序推广人

+ 2 - 2
pages/user/award.vue

@@ -36,7 +36,7 @@
 				</scroll-view>
 				</scroll-view>
 			</swiper-item>
 			</swiper-item>
 		</swiper>
 		</swiper>
-		<view class="moneyTx" ><view class="btn" @click="navto('./withdrawal')" v-show="auth ==0">提现</view></view>
+		<view class="moneyTx" ><view class="btn" @click="navto('./withdrawal')" v-if="auth === '0'">提现</view></view>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -90,7 +90,7 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			// 头部图高度
 			// 头部图高度
-			isAuth:0,
+			isAuth:'',
 			maxheight: '',
 			maxheight: '',
 			tabCurrentIndex: 0,
 			tabCurrentIndex: 0,
 			navList: [
 			navList: [

+ 2 - 2
pages/user/withdrawal.vue

@@ -89,7 +89,7 @@
 								<text v-else>请创建银行账号</text>
 								<text v-else>请创建银行账号</text>
 							</view>
 							</view>
 							<view class="node">
 							<view class="node">
-								<text v-if="bankData.name">真实姓名({{ bankData.name }})</text>
+								<text v-if="bankData.name">真实姓名({{ bankData.name +')'+' '+'('+bankData.phone }})</text>
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="right"><radio value="bank" color="#ff4c4c" :checked="type == 'bank'" /></view>
 						<view class="right"><radio value="bank" color="#ff4c4c" :checked="type == 'bank'" /></view>
@@ -240,7 +240,7 @@ export default {
 				}
 				}
 			}
 			}
 			if (this.type=='bank') {
 			if (this.type=='bank') {
-				data.name = this.bankData.name;
+				data.name = this.bankData.name+'('+this.bankData.phone+')';
 				data.bankname = this.bankData.bank + '(' + this.bankData.zhiBank + ')';
 				data.bankname = this.bankData.bank + '(' + this.bankData.zhiBank + ')';
 				data.cardnum = this.bankData.code;
 				data.cardnum = this.bankData.code;
 				if(!data.name) {
 				if(!data.name) {

+ 1 - 1
pagesA/order/orderDl.vue

@@ -181,7 +181,7 @@ export default {
 			navItem.loadingType = 'loading';
 			navItem.loadingType = 'loading';
 
 
 			orderListDl({
 			orderListDl({
-				type: state,
+				status: state,
 				page: navItem.page,
 				page: navItem.page,
 				limit: navItem.limit
 				limit: navItem.limit
 			})
 			})

BIN
static/icon/i7.png


BIN
static/icon/i8.png


BIN
static/icon/img09.png


BIN
static/icon/t1.png


BIN
static/icon/t2.png


Some files were not shown because too many files changed in this diff