lhl пре 2 година
родитељ
комит
e4486dbb25

+ 357 - 282
App.vue

@@ -1,283 +1,358 @@
-<script>
-/**
- * vuex管理登陆状态,具体可以参考官方登陆模板示例
- */
-import { mapMutations } from 'vuex';
-// #ifdef H5
-import { weixindata, setRouter } from './utils/wxAuthorized';
-// #endif
-// #ifdef APP-PLUS
-import { getUpApp } from './utils/upApp.js';
-// #endif
-export default {
-	data() {
-		return {
-			/* 保存微信信息 */
-			appData: {}
-		};
-	},
-	methods: {
-		...mapMutations('user', ['setUserInfo', 'login', 'hasLogin'])
-	},
-	onLaunch: function(urlObj) {
-		let obj = this;
-		// 加载缓存中的用户信息
-		let userInfo = uni.getStorageSync('userInfo') || '';
-		// 判断是否拥有用户信息
-		if (userInfo.uid) {
-			//更新登陆状态
-			uni.getStorage({
-				key: 'userInfo',
-				success: res => {
-					obj.setUserInfo(res.data);
-					obj.login(res.data);
-				}
-			});
-		}
-		// #ifdef H5
-		// 保存路由对象
-		setRouter(this.$router);
-		//判断是否已经缓存浏览器
-		let bool = uni.getStorageSync('weichatBrowser') || '';
-		if (bool === '') {
-			//判断是否为微信浏览
-			bool = navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger';
-			// 保存当前是否为微信内核浏览器
-			uni.setStorageSync('weichatBrowser', bool);
-		}
-		if (bool) {
-			// 加载微信信息
-			weixindata();
-		}
-		// #endif
-		// #ifdef APP-PLUS
-		// 判断是否升级
-		getUpApp();
-		// 获取当前运行系统
-		let system = uni.getStorageSync('platform') || '';
-		if (!system) {
-			uni.setStorage({
-				key: 'platform',
-				data: uni.getSystemInfoSync().platform
-			});
-		}
-		// #endif
-	},
-	onShow: function() {
-		// 加载拦截
-		// console.log('App Show');
-	},
-	onHide: function() {
-		// console.log('App Hide');
-	}
-};
-</script>
-
-<style lang="scss">
-/*全局公共样式和字体图标*/
-@import '/static/css/cmy.css';
-view,
-scroll-view,
-swiper,
-swiper-item,
-cover-view,
-cover-image,
-icon,
-text,
-rich-text,
-progress,
-button,
-checkbox,
-form,
-input,
-label,
-radio,
-slider,
-switch,
-textarea,
-navigator,
-audio,
-camera,
-image,
-video {
-	box-sizing: border-box;
-}
-/* 骨架屏替代方案 */
-.Skeleton {
-	background: #f3f3f3;
-	padding: 20rpx 0;
-	border-radius: 8rpx;
-}
-
-/* 图片载入替代方案 */
-.image-wrapper {
-	font-size: 0;
-	background: #f3f3f3;
-	border-radius: 4px;
-	image {
-		width: 100%;
-		height: 100%;
-		transition: 0.6s;
-		opacity: 0;
-		&.loaded {
-			opacity: 1;
-		}
-	}
-}
-
-// 设置富文本中图片最大宽度
-uni-rich-text img {
-	max-width: 100% !important;
-}
-/*边框*/
-.b-b:after,
-.b-t:after {
-	position: absolute;
-	z-index: 3;
-	left: 0;
-	right: 0;
-	height: 0;
-	content: '';
-	transform: scaleY(0.5);
-	border-bottom: 1px solid $border-color-base;
-}
-
-.b-b:after {
-	bottom: 0;
-}
-
-.b-t:after {
-	top: 0;
-}
-
-/* button样式改写 */
-uni-button,
-button {
-	height: 80rpx;
-	line-height: 80rpx;
-	font-size: $font-lg + 2rpx;
-	font-weight: normal;
-
-	&.no-border:before,
-	&.no-border:after {
-		border: 0;
-	}
-}
-
-uni-button[type='default'],
-button[type='default'] {
-	color: $font-color-dark;
-}
-
-/* input 样式 */
-.input-placeholder {
-	color: #999999;
-}
-
-.placeholder {
-	color: #999999;
-}
-// 边距样式
-@for $i from 1 to 4 {
-	.margin-l-#{$i * 10} {
-		margin-left: $i * 10rpx !important;
-	}
-	.margin-r-#{$i * 10} {
-		margin-right: $i * 10rpx !important;
-	}
-	.margin-t-#{$i * 10} {
-		margin-top: $i * 10rpx !important;
-	}
-	.margin-b-#{$i * 10} {
-		margin-bottom: $i * 10rpx !important;
-	}
-	.margin-#{$i * 10} {
-		margin: $i * 10rpx !important;
-	}
-	.margin-v-#{$i * 10} {
-		margin-top: $i * 10rpx !important;
-		margin-bottom: $i * 10rpx !important;
-	}
-	.margin-c-#{$i * 10} {
-		margin-left: $i * 10rpx !important;
-		margin-right: $i * 10rpx !important;
-	}
-	.padding-l-#{$i * 10} {
-		padding-left: $i * 10rpx !important;
-	}
-	.padding-r-#{$i * 10} {
-		padding-right: $i * 10rpx !important;
-	}
-	.padding-t-#{$i * 10} {
-		padding-top: $i * 10rpx !important;
-	}
-	.padding-b-#{$i * 10} {
-		padding-bottom: $i * 10rpx !important;
-	}
-	.padding-#{$i * 10} {
-		padding: $i * 10rpx !important;
-	}
-	.padding-v-#{$i * 10} {
-		padding-top: $i * 10rpx !important;
-		padding-bottom: $i * 10rpx !important;
-	}
-	.padding-c-#{$i * 10} {
-		padding-left: $i * 10rpx !important;
-		padding-right: $i * 10rpx !important;
-	}
-}
-// 字体大小
-.font-size-sm {
-	font-size: $font-sm;
-}
-.font-size-base {
-	font-size: $font-base;
-}
-.font-size-lg {
-	font-size: $font-lg;
-}
-// 字体颜色
-.font-color-yellow {
-	color: $color-yellow;
-}
-.font-color-gray {
-	color: $color-gray;
-}
-.font-color-red {
-	color: $color-red;
-}
-// 边框颜色
-.border-color-yellow {
-	border: 1rpx solid $color-yellow;
-}
-
-// 修改默认背景颜色
-uni-page-wrapper {
-	background-color: $page-color-base;
-}
-page {
-	background-color: $page-color-base;
-	// 设置默认字体
-	font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif, Droid Sans Fallback;
-}
-	/*边框*/
-	.b-b:after,
-	.b-t:after {
-		position: absolute;
-		z-index: 3;
-		left: 0;
-		right: 0;
-		height: 0;
-		content: '';
-		transform: scaleY(0.5);
-		border-bottom: 1px solid $border-color-base;
-	}
-
-	.b-b:after {
-		bottom: 0;
-	}
-	.status_bar {
-	        height: var(--status-bar-height);
-	        width: 100%;
-	    }
+<script>
+	/**
+	 * vuex管理登陆状态,具体可以参考官方登陆模板示例
+	 */
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	// #ifdef H5
+	import {
+		weixindata,
+		setRouter
+	} from './utils/wxAuthorized';
+	// #endif
+	// #ifdef APP-PLUS
+	import {
+		getUpApp
+	} from './utils/upApp.js';
+	// #endif
+	export default {
+		data() {
+			return {
+				/* 保存微信信息 */
+				appData: {}
+			};
+		},
+		computed: {
+			...mapState(['argstime'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login', 'hasLogin']),
+			...mapMutations(['setArgstime']),
+			parseQuery(query) {
+				var args = {};
+				var items = query.split("&");
+
+				var item = null,
+					name = null,
+					value = null;
+				for (var i = 0; i < items.length; i++) {
+					item = items[i].split("=");
+					if (item[0]) {
+						name = item[0];
+						value = item[1] ? item[1] : "";
+						args[name] = value;
+					}
+				}
+				return args;
+			}
+		},
+		onLaunch: function(urlObj) {
+			let obj = this;
+			// 加载缓存中的用户信息
+			let userInfo = uni.getStorageSync('userInfo') || '';
+			// 判断是否拥有用户信息
+			if (userInfo.uid) {
+				//更新登陆状态
+				uni.getStorage({
+					key: 'userInfo',
+					success: res => {
+						obj.setUserInfo(res.data);
+						obj.login(res.data);
+					}
+				});
+			}
+			// #ifdef H5
+			// 保存路由对象
+			setRouter(this.$router);
+			//判断是否已经缓存浏览器
+			let bool = uni.getStorageSync('weichatBrowser') || '';
+			if (bool === '') {
+				//判断是否为微信浏览
+				bool = navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger';
+				// 保存当前是否为微信内核浏览器
+				uni.setStorageSync('weichatBrowser', bool);
+			}
+			if (bool) {
+				// 加载微信信息
+				weixindata();
+			}
+			// #endif
+			// #ifdef APP-PLUS
+			// 判断是否升级
+			getUpApp();
+			// 获取当前运行系统
+			let system = uni.getStorageSync('platform') || '';
+			if (!system) {
+				uni.setStorage({
+					key: 'platform',
+					data: uni.getSystemInfoSync().platform
+				});
+			}
+			// #endif
+		},
+		onShow: function() {
+			// 加载拦截
+			// console.log('App Show');
+			// var args = plus.runtime.arguments;
+			// if (args) {
+			// 	// 处理args参数
+			// 	console.log(args, 'args+++++')
+			// 	let query = args.split('//')[1]
+			// 	let queryobj = this.parseQuery(query)
+			// 	console.log(queryobj, 'queryobj+++++')
+			// 	// 判断是否是上次的快链
+			// 	if (this.argstime != queryobj.time) {
+			// 		this.setArgstime(queryobj.time)
+			// 		if (queryobj.url == 'product') {
+			// 			uni.navigateTo({
+			// 				url: '/pages/product/product?id=' + queryobj.id + '&spread=' + queryobj.spread
+			// 			})
+			// 		}
+			// 	}
+			// }
+		},
+		onHide: function() {
+			// console.log('App Hide');
+		}
+	};
+</script>
+
+<style lang="scss">
+	/*全局公共样式和字体图标*/
+	@import '/static/css/cmy.css';
+
+	view,
+	scroll-view,
+	swiper,
+	swiper-item,
+	cover-view,
+	cover-image,
+	icon,
+	text,
+	rich-text,
+	progress,
+	button,
+	checkbox,
+	form,
+	input,
+	label,
+	radio,
+	slider,
+	switch,
+	textarea,
+	navigator,
+	audio,
+	camera,
+	image,
+	video {
+		box-sizing: border-box;
+	}
+
+	/* 骨架屏替代方案 */
+	.Skeleton {
+		background: #f3f3f3;
+		padding: 20rpx 0;
+		border-radius: 8rpx;
+	}
+
+	/* 图片载入替代方案 */
+	.image-wrapper {
+		font-size: 0;
+		background: #f3f3f3;
+		border-radius: 4px;
+
+		image {
+			width: 100%;
+			height: 100%;
+			transition: 0.6s;
+			opacity: 0;
+
+			&.loaded {
+				opacity: 1;
+			}
+		}
+	}
+
+	// 设置富文本中图片最大宽度
+	uni-rich-text img {
+		max-width: 100% !important;
+	}
+
+	/*边框*/
+	.b-b:after,
+	.b-t:after {
+		position: absolute;
+		z-index: 3;
+		left: 0;
+		right: 0;
+		height: 0;
+		content: '';
+		transform: scaleY(0.5);
+		border-bottom: 1px solid $border-color-base;
+	}
+
+	.b-b:after {
+		bottom: 0;
+	}
+
+	.b-t:after {
+		top: 0;
+	}
+
+	/* button样式改写 */
+	uni-button,
+	button {
+		height: 80rpx;
+		line-height: 80rpx;
+		font-size: $font-lg + 2rpx;
+		font-weight: normal;
+
+		&.no-border:before,
+		&.no-border:after {
+			border: 0;
+		}
+	}
+
+	uni-button[type='default'],
+	button[type='default'] {
+		color: $font-color-dark;
+	}
+
+	/* input 样式 */
+	.input-placeholder {
+		color: #999999;
+	}
+
+	.placeholder {
+		color: #999999;
+	}
+
+	// 边距样式
+	@for $i from 1 to 4 {
+		.margin-l-#{$i * 10} {
+			margin-left: $i * 10rpx !important;
+		}
+
+		.margin-r-#{$i * 10} {
+			margin-right: $i * 10rpx !important;
+		}
+
+		.margin-t-#{$i * 10} {
+			margin-top: $i * 10rpx !important;
+		}
+
+		.margin-b-#{$i * 10} {
+			margin-bottom: $i * 10rpx !important;
+		}
+
+		.margin-#{$i * 10} {
+			margin: $i * 10rpx !important;
+		}
+
+		.margin-v-#{$i * 10} {
+			margin-top: $i * 10rpx !important;
+			margin-bottom: $i * 10rpx !important;
+		}
+
+		.margin-c-#{$i * 10} {
+			margin-left: $i * 10rpx !important;
+			margin-right: $i * 10rpx !important;
+		}
+
+		.padding-l-#{$i * 10} {
+			padding-left: $i * 10rpx !important;
+		}
+
+		.padding-r-#{$i * 10} {
+			padding-right: $i * 10rpx !important;
+		}
+
+		.padding-t-#{$i * 10} {
+			padding-top: $i * 10rpx !important;
+		}
+
+		.padding-b-#{$i * 10} {
+			padding-bottom: $i * 10rpx !important;
+		}
+
+		.padding-#{$i * 10} {
+			padding: $i * 10rpx !important;
+		}
+
+		.padding-v-#{$i * 10} {
+			padding-top: $i * 10rpx !important;
+			padding-bottom: $i * 10rpx !important;
+		}
+
+		.padding-c-#{$i * 10} {
+			padding-left: $i * 10rpx !important;
+			padding-right: $i * 10rpx !important;
+		}
+	}
+
+	// 字体大小
+	.font-size-sm {
+		font-size: $font-sm;
+	}
+
+	.font-size-base {
+		font-size: $font-base;
+	}
+
+	.font-size-lg {
+		font-size: $font-lg;
+	}
+
+	// 字体颜色
+	.font-color-yellow {
+		color: $color-yellow;
+	}
+
+	.font-color-gray {
+		color: $color-gray;
+	}
+
+	.font-color-red {
+		color: $color-red;
+	}
+
+	// 边框颜色
+	.border-color-yellow {
+		border: 1rpx solid $color-yellow;
+	}
+
+	// 修改默认背景颜色
+	uni-page-wrapper {
+		background-color: $page-color-base;
+	}
+
+	page {
+		background-color: $page-color-base;
+		// 设置默认字体
+		font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif, Droid Sans Fallback;
+	}
+
+	/*边框*/
+	.b-b:after,
+	.b-t:after {
+		position: absolute;
+		z-index: 3;
+		left: 0;
+		right: 0;
+		height: 0;
+		content: '';
+		transform: scaleY(0.5);
+		border-bottom: 1px solid $border-color-base;
+	}
+
+	.b-b:after {
+		bottom: 0;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+	}
 </style>

+ 139 - 130
api/wallet.js

@@ -1,131 +1,140 @@
-import request from '@/utils/request'
-
-// 获取用户消费记录
-export function spreadCommission(data,state) {
-	return request({
-		url: '/api/spread/commission/'+state,
-		method: 'get',
-		data
-	});
+import request from '@/utils/request'
+
+// 获取用户消费记录
+export function spreadCommission(data, state) {
+	return request({
+		url: '/api/spread/commission/' + state,
+		method: 'get',
+		data
+	});
+}
+
+// 获取账户余额
+export function userBalance(data) {
+	return request({
+		url: '/api/user/balance',
+		method: 'get',
+		data
+	});
+}
+
+// 提现
+export function extractCash(data) {
+	return request({
+		url: '/api/extract/cash',
+		method: 'post',
+		data
+	});
+}
+
+// 提现信息
+export function extractBank(data) {
+	return request({
+		url: '/api/extract/bank',
+		method: 'get',
+		data
+	});
+}
+// #ifdef H5
+// 公众号充值
+export function rechargeWechat(data) {
+	return request({
+		url: '/api/recharge/wechat',
+		method: 'post',
+		data
+	});
+}
+// #endif
+// #ifdef MP
+// 小程序充值
+export function rechargeRoutine(data) {
+	return request({
+		url: '/api/recharge/routine',
+		method: 'post',
+		data
+	});
+}
+// #endif
+// 获取提现支付宝账号
+export function aliInfo(data) {
+	return request({
+		url: '/api/ali/info',
+		method: 'get',
+		data
+	});
+}
+//获取默认银行卡账号
+export function bankInfo(data) {
+	return request({
+		url: '/api/bank/info',
+		method: 'get',
+		data
+	});
+}
+// 保存提现支付宝账号
+export function setAliInfo(data) {
+	return request({
+		url: '/api/ali/edit',
+		method: 'post',
+		data
+	});
+}
+
+// 账户余额
+export function balance(data) {
+	return request({
+		url: '/api/user/balance',
+		method: 'get',
+		data
+	});
+}
+
+//
+export function yue(data) {
+	return request({
+		url: '/api/now_money/list',
+		method: 'get',
+		data
+	});
+}
+
+export function integral(data) {
+	return request({
+		url: '/api/integral/list',
+		method: 'get',
+		data
+	});
+}
+
+export function setBank(data) {
+	return request({
+		url: '/api/auction/pay',
+		method: 'post',
+		data
+	});
+}
+
+export function getBank(data) {
+	return request({
+		url: '/api/auction/pay_list',
+		method: 'get',
+		data
+	});
+}
+
+export function examine(data) {
+	return request({
+		url: '/api/examine',
+		method: 'get',
+		data
+	});
+}
+
+//app 支付宝充值
+export function rechargeAli(data) {
+	return request({
+		url: '/api/recharge/ali',
+		method: 'post',
+		data
+	});
 }
-
-// 获取账户余额
-export function userBalance(data) {
-	return request({
-		url: '/api/user/balance',
-		method: 'get',
-		data
-	});
-}
-
-// 提现
-export function extractCash(data) {
-	return request({
-		url: '/api/extract/cash',
-		method: 'post',
-		data
-	});
-}
-
-// 提现信息
-export function extractBank(data) {
-	return request({
-		url: '/api/extract/bank',
-		method: 'get',
-		data
-	});
-}
-// #ifdef H5
-// 公众号充值
-export function rechargeWechat(data) {
-	return request({
-		url: '/api/recharge/wechat',
-		method: 'post',
-		data
-	});
-}
-// #endif
-// #ifdef MP
-// 小程序充值
-export function rechargeRoutine(data) {
-	return request({
-		url: '/api/recharge/routine',
-		method: 'post',
-		data
-	});
-}
-// #endif
-// 获取提现支付宝账号
-export function aliInfo(data) {
-	return request({
-		url: '/api/ali/info',
-		method: 'get',
-		data
-	});
-}
-//获取默认银行卡账号
-export function bankInfo(data) {
-	return request({
-		url: '/api/bank/info',
-		method: 'get',
-		data
-	});
-}
-// 保存提现支付宝账号
-export function setAliInfo(data) {
-	return request({
-		url: '/api/ali/edit',
-		method: 'post',
-		data
-	});
-}
-
-// 账户余额
-export function balance(data) {
-	return request({
-		url: '/api/user/balance',
-		method: 'get',
-		data
-	});
-}
-
-//
-export function yue(data) {
-	return request({
-		url: '/api/now_money/list',
-		method: 'get',
-		data
-	});
-}
-
-export function integral(data) {
-	return request({
-		url: '/api/integral/list',
-		method: 'get',
-		data
-	});
-}
-
-export function setBank(data) {
-	return request({
-		url: '/api/auction/pay',
-		method: 'post',
-		data
-	});
-}
-
-export function getBank(data) {
-	return request({
-		url: '/api/auction/pay_list',
-		method: 'get',
-		data
-	});
-}
-
-export function examine(data) {
-	return request({
-		url: '/api/examine',
-		method: 'get',
-		data
-	});
-}

+ 4 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "宏根蒂",
     "appid" : "__UNI__D811809",
     "description" : "",
-    "versionName" : "1.0.5",
-    "versionCode" : 105,
+    "versionName" : "1.1.4",
+    "versionCode" : 114,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -41,7 +41,8 @@
                     "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                 ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
+                "schemes" : "honggd"
             },
             "ios" : {
                 "idfa" : false,

+ 0 - 3
pages.json

@@ -204,9 +204,6 @@
 		{
 			"path": "pages/user/pushList",
 			"style": {
-				// #ifndef MP-WEIXIN
-				"navigationStyle": "custom",
-				// #endif
 				"navigationBarTitleText": "下级消费记录"
 			}
 		},

+ 30 - 9
pages/index/actionDetail.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 		<image v-if="detail.pics" :src="detail.pics.split(',')[1]" mode="widthFix" class="top-img"></image>
-		<view class="add-if">
+		<view class="add-if" >
 			<view class="jj" v-if="!detail.partake">
 				<view class="if-tit">
 					购买7万元宏根蒂品牌红酒成为
@@ -16,8 +16,8 @@
 					立即参与
 				</view>
 			</view>
-			<view v-else>
-				<view class="flex">
+			<view v-else-if="detail.partake.out_id == detail.id">
+				<view class="flex" >
 					<image class="action_icon" src="../../static/img/action_left_icon.png" mode="widthFix"></image>
 					<view class="text-white action_title">
 						参与进度
@@ -26,25 +26,38 @@
 				</view>
 				<view class="jj margin-t-20">
 					<view class="dqyj">
-						当前业绩量: {{detail.partake.money}}
+						当前业绩量: {{(detail.partake.money*1).toFixed(2)}}
 					</view>
 					<view class="show-jdt">
 						<image src="../../static/img/action_bg.png" mode="" style="width: 601rpx;"></image>
 						<view class="jdt">
 							<view class="jdt-wrap">
-								<view class="jdt-wc" :style="{'width': detail.partake.money == 0? '0%':(detail.partake.money*1 >= detail.number*1 ? '100%': (((detail.partake.money*1)/(detail.number*1)*100).toFixed(2) + '%')) }">
+								<view class="jdt-wc" :style="{'width': detail.partake.money == 0? '0%':(detail.partake.money*1 >= detail.partake.number*1 ? '100%': (((detail.partake.money*1)/(detail.partake.number*1)*100).toFixed(2) + '%')) }">
 									
 								</view>
 							</view>
 						</view>
 						<view class="jdt-tit">
-							业绩量达到{{detail.number}}
+							达标业绩量:{{(detail.partake.number*1).toFixed(2)}}
 						</view>
 					</view>
 					
 				</view>
 			</view>
-
+			<view class="jj" v-else>
+				<view class="if-tit">
+					购买7万元宏根蒂品牌红酒成为
+				</view>
+				<view class="if-level">
+					品牌经纪人
+				</view>
+				<view class="if-status">
+					{{userInfo.level > 0 ?'您已满足参与条件': '您未满足参与条件'}}
+				</view>
+				<view class="add-btn cant"  @click="addn()" >
+					立即参与
+				</view>
+			</view>
 		</view>
 		<view class="add-recoed flex">
 			<view class="add-left">
@@ -123,7 +136,7 @@
 			getActionDetail() {
 				let that = this
 				getActionDetail({
-
+					uid: that.userInfo.uid
 				}, that.id).then(res => {
 
 					console.log(res);
@@ -138,10 +151,18 @@
 				addAction({
 					out_id: this.id
 				}).then(res => {
-					uni.hideLoading()
+					uni.hideLoading()
+					this.getActionDetail()
 				}).catch(() => {
 					uni.hideLoading()
 				})
+			},
+			addn() {
+				uni.showModal({
+					title: '提示',
+					content: '您当前已有参与中的活动,无法再参加该活动。',
+					showCancel:false
+				})
 			}
 		}
 	}

+ 14 - 8
pages/index/addList.vue

@@ -8,16 +8,17 @@
 					<image src="../../static/icon/jl-na.png"></image>
 				</view>
 				<view class="list-tpl">
-					<view class="title">
-						<view class="title-name clamp">{{ item.name }}</view>
+					<view class="title clamp">
+						<!-- <view class="title-name clamp"></view>-->
+						 {{ item.name }}
 					</view>
 					<view class="time">
-						<text>{{item.create_time}}</text>
+						<text>{{item.finish_time}}</text>
 					</view>
 				</view>
 				<view class="list-right">
 					<view class="je">
-						金额:{{item.money || '0'}}
+						业绩金额:{{item.number || '0'}}
 					</view>
 					<view class="">
 						{{item.status == 0?'进行中': (item.status == 1?'待核销':(item.status == 2?'已核销':'失败'))}}
@@ -67,7 +68,12 @@
 					page: that.page,
 					limit: that.limit
 				}).then(res => {
-					that.list = res.data
+					that.list = res.data
+					if(res.data.length == that.limit) {
+						that.loadingType = 'more'
+					}else {
+						that.loadingType = 'noMore'
+					}
 				})
 			}
 		}
@@ -111,7 +117,6 @@
 			.list-tpl {
 				// width: 85%;
 				flex-grow: 1;
-
 				.title {
 					display: flex;
 					justify-content: flex-start;
@@ -122,7 +127,7 @@
 					white-space: nowrap;
 					line-height: 1;
 					text-align: center;
-
+					flex-grow: 1;
 					.title-name {
 						max-width: 40%;
 					}
@@ -161,7 +166,8 @@
 			}
 		}
 
-		.money {
+		.money {
+			flex-shrink: 0;
 			width: 50%;
 			text-align: right;
 			color: #db1935;

+ 2 - 2
pages/index/index.vue

@@ -66,8 +66,8 @@
 
 		</view>
 		<view class="hdlist" >
-			<image src="../../static/index/ryc.png" @click="navTo('/pages/index/actionDetail?id=1')" mode="widthFix"></image>
-			<image src="../../static/index/xny.png" @click="navTo('/pages/index/actionDetail?id=2')" mode="widthFix"></image>
+			<image src="../../static/index/ryc.png" @click="navto('/pages/index/actionDetail?id=1',1)" mode="widthFix"></image>
+			<image src="../../static/index/xny.png" @click="navto('/pages/index/actionDetail?id=2',1)" mode="widthFix"></image>
 		</view>
 		<!-- 商品列表 start -->
 		<view class="product-box">

+ 7 - 3
pages/money/pay.vue

@@ -5,7 +5,7 @@
 			<text class="price">{{ money }}</text>
 		</view>
 		<view class="pay-type-list">
-			<view class="type-item b-b" @click="changePayType(1)">
+			<!-- <view class="type-item b-b" @click="changePayType(1)">
 				<text class="icon iconfont iconweixin"></text>
 				<view class="con">
 					<text class="tit">微信支付</text>
@@ -14,7 +14,7 @@
 				<label class="radio">
 					<radio value="" color="#5dbc7c" :checked="payType == 1"></radio>
 				</label>
-			</view>
+			</view> -->
 			<!-- #ifdef APP-PLUS -->
 			<view class="type-item b-b" @click="changePayType(2)">
 				<text class="icon iconfont iconzhifubao"></text>
@@ -57,13 +57,16 @@
 	export default {
 		data() {
 			return {
-				payType: 1, //支付类型
+				payType: 2, //支付类型
 				// #ifdef H5
 				payName: 'weixin',
 				// #endif
 				// #ifdef MP-WEIXIN
 				payName: 'weixin',
 				// #endif
+				// #ifdef APP-PLUS
+				payName: 'ali',
+				// #endif
 				orderInfo: {},
 				money: 0.0, //订单金额
 				now_money: 0.0, //余额
@@ -293,6 +296,7 @@
 					// #endif
 					shipping_type: 1 //提货方式 1 快递 2自提
 				};
+				console.log(data.mark,'我的备注')
 				// 判断是否拼团商品
 				if (obj.pinkid) {
 					data.pinkId = obj.pinkid;

+ 37 - 4
pages/money/recharge.vue

@@ -76,8 +76,15 @@
 	// #ifdef MP
 	import {
 		rechargeRoutine,
-		userBalance
+		userBalance
 	} from '@/api/wallet.js';
+	// #endif
+	// #ifdef APP-PLUS
+	import {
+		rechargeRoutine,
+		userBalance,
+		rechargeAli
+	} from '@/api/wallet.js';
 	// #endif
 	import {
 		mapState
@@ -95,7 +102,7 @@
 				type: 'alipay',
 				money: '', //充值金额
 				payLoding: false, //是否加载中
-				addTags: [300, 200, 150, 100, 50],
+				addTags: [300, 200, 150, 100, 50,5],
 				currentIndex: 0,
 				addMoney: 0,
 				isSect: false, //是否选择微信充值
@@ -129,7 +136,33 @@
 				}
 
 				let obj = this;
-				obj.payLoding = true;
+				obj.payLoding = true;
+				
+				// #ifdef APP-PLUS
+				console.log(obj.money,'obj.money+++')
+				rechargeAli({
+					price: obj.money*1,
+				}).then(res => {
+					uni.requestPayment({
+						provider: 'alipay',
+						orderInfo: res.msg,
+						success: res => {
+							console.log(res);
+							uni.showToast({
+								title: '支付成功',
+								duration: 2000
+							});
+							obj.userBalance()
+							obj.payLoding = false;
+						},
+						fail: e => {
+							console.log(e);
+							obj.payLoding = false;
+						},
+						complete: () => {}
+					});
+				})
+				// #endif
 				// #ifdef H5
 				rechargeWechat({
 						price: obj.money,
@@ -241,7 +274,7 @@
 				this.isSect = !this.isSect
 			},
 			userBalance() {
-				userBalance().then(res => {
+				getUserInfo().then(res => {
 					this.new_money = res.data.now_money
 					console.log(res)
 				})

+ 783 - 674
pages/order/order.vue

@@ -1,675 +1,784 @@
-<template>
-	<view class="content">
-		<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" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
-						<view class="i-top b-b">
-							<text class="time">{{ item._add_time }}</text>
-							<text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
-							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
-						</view>
-
-						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
-							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
-								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							</view>
-						</scroll-view>
-						<!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							<view class="right">
-								<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-								<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
-								<text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
-							</view>
-						</view> -->
-						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex-start">
-									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price">{{ goodsItem.productInfo.price|moneyNum }}</text>
-								</view>
-								<view class="row flex">
-									<text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
-									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
-								</view>
-							</view>
-						</view>
-
-						<view class="price-box">
-							共
-							<text class="num">{{ item.cartInfo.length }}</text>
-							件商品 邮费
-							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
-							实付款
-							<text class="price">{{ moneyNum(item.pay_price)}}</text>
-						</view>
-						<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)" class="action-btn recom">立即支付</button>
-							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
-							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
-							<button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
-						</view>
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-import { orderList, orderCancel, orderDel, orderTake } from '@/api/order.js';
-export default {
-	components: {
-		uniLoadMore,
-		empty
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '待付款',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '待发货',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '待收货',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 3,
-					text: '待评价',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 4,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-			]
-		};
-	},
-
-	onLoad(options) {
-		/**
-		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-		 * 替换onLoad下代码即可
-		 */
-		this.tabCurrentIndex = +options.state;
-		// #ifndef MP
-		this.loadData();
-		// #endif
-		// #ifdef MP
-		if (options.state == 0) {
-			this.loadData();
-		}
-		// #endif
-	},
-	// #ifdef APP-PLUS || H5
-	onBackPress(e){
-		uni.switchTab({
-			url: '/pages/user/user',
-		});
-		return true;
-	},
-	// #endif
-	methods: {
-		// 转换金额为数字
-		moneyNum(value){
-				return +value;
-		},
-		// 确认收货
-		orderTake(item, index) {
-			let obj = this;
-			uni.showModal({
-				title: '是否确认收货?',
-				success: () => {
-					orderTake({
-						uni: item.order_id
-					})
-						.then(e => {
-							obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
-							uni.showToast({
-								title: '收货成功'
-							});
-						})
-						.catch(e => {
-							console.log(e);
-						});
-				}
-			});
-		},
-		//跳转到订单详情
-		goToOrderDetail(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderDetail?id=' + e.order_id
-			});
-		},
-		// 申请退款
-		orderRefund(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderRefund?id=' + e.order_id
-			});
-		},
-		// 订单支付
-		orderPay(e) {
-			uni.navigateTo({
-				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
-			});
-		},
-		//获取订单列表
-		loadData(source) {
-			//这里是将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			if (navItem.loadingType === 'noMore') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			orderList({
-				type: state,
-				page: navItem.page,
-				limit: navItem.limit
-			})
-				.then(({ data }) => {
-					let arr = data.map(e => {
-						let b = this.orderStateExp(e.status);
-						e.stateTip = b.stateTip;
-						e.stateTipColor = b.stateTipColor;
-						return e;
-					});
-					navItem.orderList = navItem.orderList.concat(arr);
-					// 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);
-				});
-		},
-
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
-		},
-		//顶部tab点击
-		tabClick(index) {
-			this.tabCurrentIndex = index;
-		},
-		//删除订单
-		deleteOrder(index) {
-			uni.showLoading({
-				title: '请稍后'
-			});
-			setTimeout(() => {
-				this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
-				uni.hideLoading();
-			}, 600);
-		},
-		//取消订单
-		cancelOrder(item) {
-			uni.showModal({
-				title: '订单取消',
-				content: '是否取消订单?',
-				success: e => {
-					if (e.confirm) {
-						uni.showLoading({
-							title: '请稍后'
-						});
-						orderCancel({ id: item.order_id })
-							.then(e => {
-								uni.showToast({
-									title: '取消成功',
-									duration: 2000,
-									position: 'top'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-						//取消订单后删除待付款中该项
-						let list = this.navList[this.tabCurrentIndex].orderList;
-						let index = list.findIndex(val => val.id === item.id);
-						index !== -1 && list.splice(index, 1);
-						uni.hideLoading();
-					}
-				}
-			});
-		},
-
-		//订单状态文字和颜色
-		orderStateExp(state) {
-			let stateTip = '',
-				stateTipColor = '#fa436a';
-			switch (+state) {
-				case 0:
-					stateTip = '待付款';
-					break;
-				case 1:
-					stateTip = '待发货';
-					break;
-				case 2:
-					stateTip = '待收货';
-					break;
-				case 3:
-					stateTip = '待评价';
-					break;
-				case 4:
-					stateTip = '已完成';
-					stateTipColor = '#5dbc7c';
-					break;
-				case 9:
-					stateTip = '订单已关闭';
-					stateTipColor = '#909399';
-					break;
-
-				//更多自定义
-			}
-			return { stateTip, stateTipColor };
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.content {
-	background: $page-color-base;
-	height: 100%;
-}
-
-.swiper-box {
-	height: calc(100% - 40px);
-}
-.list-scroll-content {
-	height: 100%;
-}
-
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-
-.uni-swiper-item {
-	height: auto;
-}
-.order-item {
-	display: flex;
-	flex-direction: column;
-	padding-left: 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.i-top {
-		display: flex;
-		align-items: center;
-		height: 80rpx;
-		padding-right: 30rpx;
-		font-size: $font-base;
-		color: $font-color-dark;
-		position: relative;
-		.time {
-			flex: 1;
-		}
-		.state {
-			color: $base-color;
-		}
-		.del-btn {
-			padding: 10rpx 0 10rpx 36rpx;
-			font-size: $font-lg;
-			color: $font-color-light;
-			position: relative;
-			&:after {
-				content: '';
-				width: 0;
-				height: 30rpx;
-				border-left: 1px solid $border-color-dark;
-				position: absolute;
-				left: 20rpx;
-				top: 50%;
-				transform: translateY(-50%);
-			}
-		}
-	}
-	/* 多条商品 */
-	.goods-box {
-		height: 160rpx;
-		padding: 20rpx 0;
-		white-space: nowrap;
-		.goods-item {
-			width: 120rpx;
-			height: 120rpx;
-			display: inline-block;
-			margin-right: 24rpx;
-		}
-		.goods-img {
-			display: block;
-			width: 100%;
-			height: 100%;
-		}
-	}
-	/* 单条商品 */
-	.goods-box-single {
-		display: flex;
-		padding: 20rpx 0;
-		.goods-img {
-			display: block;
-			width: 120rpx;
-			height: 120rpx;
-		}
-		.right {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			padding: 0 30rpx 0 24rpx;
-			overflow: hidden;
-			.row{
-				margin-top: 10rpx;
-			}
-			.row_title{
-				padding:5rpx 10rpx;
-				background-color: #dddddd;
-				border-radius: 10rpx;
-				font-size: 22rpx;
-				color: #ffffff;
-			}
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				line-height: 1;
-				width: 80%;
-			}
-			.attr-box {
-				display: flex;
-				justify-content: flex-end;
-				font-size: $font-sm + 2rpx;
-				color: $font-color-light;
-			}
-			.price {
-				display: inline;
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					
-				}
-			}
-		}
-	}
-	.price-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: baseline;
-		padding: 20rpx 30rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-light;
-		.num {
-			margin: 0 8rpx;
-			color: $font-color-dark;
-		}
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			&:before {
-				content: '¥';
-				font-size: $font-sm;
-				margin: 0 2rpx 0 8rpx;
-			}
-		}
-	}
-	.action-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: center;
-		height: 100rpx;
-		position: relative;
-		padding-right: 30rpx;
-	}
-	.action-btn {
-		width: 160rpx;
-		height: 60rpx;
-		margin: 0;
-		margin-left: 24rpx;
-		padding: 0;
-		text-align: center;
-		line-height: 60rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-		background: #fff;
-		border-radius: 100px;
-		&:after {
-			border-radius: 100px;
-		}
-		&.recom {
-			color: $base-color;
-			&:after {
-				border-color: $base-color;
-			}
-		}
-		&.evaluate {
-			color: $color-yellow;
-			&:after {
-				border-color: $color-yellow;
-			}
-		}
-	}
-}
-
-/* load-more */
-.uni-load-more {
-	display: flex;
-	flex-direction: row;
-	height: 80rpx;
-	align-items: center;
-	justify-content: center;
-}
-
-.uni-load-more__text {
-	font-size: 28rpx;
-	color: #999;
-}
-
-.uni-load-more__img {
-	height: 24px;
-	width: 24px;
-	margin-right: 10px;
-}
-
-.uni-load-more__img > view {
-	position: absolute;
-}
-
-.uni-load-more__img > view view {
-	width: 6px;
-	height: 2px;
-	border-top-left-radius: 1px;
-	border-bottom-left-radius: 1px;
-	background: #999;
-	position: absolute;
-	opacity: 0.2;
-	transform-origin: 50%;
-	animation: load 1.56s ease infinite;
-}
-
-.uni-load-more__img > view view:nth-child(1) {
-	transform: rotate(90deg);
-	top: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(2) {
-	transform: rotate(180deg);
-	top: 11px;
-	right: 0;
-}
-
-.uni-load-more__img > view view:nth-child(3) {
-	transform: rotate(270deg);
-	bottom: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(4) {
-	top: 11px;
-	left: 0;
-}
-
-.load1,
-.load2,
-.load3 {
-	height: 24px;
-	width: 24px;
-}
-
-.load2 {
-	transform: rotate(30deg);
-}
-
-.load3 {
-	transform: rotate(60deg);
-}
-
-.load1 view:nth-child(1) {
-	animation-delay: 0s;
-}
-
-.load2 view:nth-child(1) {
-	animation-delay: 0.13s;
-}
-
-.load3 view:nth-child(1) {
-	animation-delay: 0.26s;
-}
-
-.load1 view:nth-child(2) {
-	animation-delay: 0.39s;
-}
-
-.load2 view:nth-child(2) {
-	animation-delay: 0.52s;
-}
-
-.load3 view:nth-child(2) {
-	animation-delay: 0.65s;
-}
-
-.load1 view:nth-child(3) {
-	animation-delay: 0.78s;
-}
-
-.load2 view:nth-child(3) {
-	animation-delay: 0.91s;
-}
-
-.load3 view:nth-child(3) {
-	animation-delay: 1.04s;
-}
-
-.load1 view:nth-child(4) {
-	animation-delay: 1.17s;
-}
-
-.load2 view:nth-child(4) {
-	animation-delay: 1.3s;
-}
-
-.load3 view:nth-child(4) {
-	animation-delay: 1.43s;
-}
-
-@-webkit-keyframes load {
-	0% {
-		opacity: 1;
-	}
-
-	100% {
-		opacity: 0.2;
-	}
-}
+<template>
+	<view class="content">
+		<scroll-view scroll-x="true" class="class-box flex b-t" :scroll-left="scrollLeft" :scroll-with-animation="true">
+			<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>
+		</scroll-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" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index"
+						class="order-item">
+						<view class="i-top b-b">
+							<text class="time">{{ item._add_time }}</text>
+							<text class="state"
+								:style="{ color: item.stateTipColor }">{{ item._status._title == '待评价'?'已完成': item._status._title}}</text>
+							<text v-if="item.status === 4" class="del-btn iconfont icondelete"
+								@click="deleteOrder(index)"></text>
+						</view>
+
+						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
+							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
+								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+							</view>
+						</scroll-view>
+						<!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
+							<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+							<view class="right">
+								<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
+								<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
+								<text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
+							</view>
+						</view> -->
+						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo"
+							:key="goodsIndex">
+							<image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
+							<view class="right">
+								<view class="flex-start">
+									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
+									<text class="price">{{moneyNum(goodsItem.productInfo.price) }}</text>
+								</view>
+								<view class="row flex">
+									<text
+										class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
+									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
+								</view>
+							</view>
+						</view>
+
+						<view class="price-box">
+							共
+							<text class="num">{{ item.cartInfo.length }}</text>
+							件商品 邮费
+							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
+							实付款
+							<text class="price">{{ moneyNum(item.pay_price)}}</text>
+						</view>
+						<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)"
+								class="action-btn recom">立即支付</button>
+							<!-- <button v-if="item._status._title == '待评价'" class="action-btn">评价</button> -->
+							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)"
+								class="action-btn">确认收货</button>
+							<button v-if="item._status._title == '未发货'" class="action-btn"
+								@click.stop="orderRefund(item)">申请退款</button>
+						</view>
+					</view>
+
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	import {
+		orderList,
+		orderCancel,
+		orderDel,
+		orderTake
+	} from '@/api/order.js';
+	export default {
+		components: {
+			uniLoadMore,
+			empty
+		},
+		data() {
+			return {
+				tabCurrentIndex: 0,
+				navList: [{
+						state: 0,
+						text: '待付款',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 1,
+						text: '待发货',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 2,
+						text: '待收货',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 3,
+						text: '已完成',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					// {
+					// 	state: 4,
+					// 	text: '已完成',
+					// 	loadingType: 'more',
+					// 	orderList: [],
+					// 	page: 1, //当前页数
+					// 	limit: 10 //每次信息条数
+					// },
+					{
+						state: -1,
+						text: '退款中',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: -2,
+						text: '已退款',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+				],
+				itemWidht: '',
+			};
+		},
+		computed: {
+			scrollLeft() {
+				if (this.tabCurrentIndex > 1) {
+					return this.itemWidht * (this.tabCurrentIndex - 1.5);
+				} else {
+					return 0;
+				}
+			}
+		},
+		onLoad(options) {
+			/**
+			 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
+			 * 替换onLoad下代码即可
+			 */
+			this.tabCurrentIndex = +options.state;
+			// #ifndef MP
+			this.loadData();
+			// #endif
+			// #ifdef MP
+			if (options.state == 0) {
+				this.loadData();
+			}
+			// #endif
+		},
+		onReady() {
+			uni.createSelectorQuery()
+				.select('.content')
+				.fields({
+						size: true
+					},
+					data => {
+						// 设置项目宽度
+						this.itemWidht = Math.floor((data.width / 750) * 150);
+						console.log(this.itemWidht, 'this.itemWidht++++++')
+					}
+				)
+				.exec();
+		},
+		// #ifdef APP-PLUS || H5
+		onBackPress(e) {
+			uni.switchTab({
+				url: '/pages/user/user',
+			});
+			return true;
+		},
+		// #endif
+		methods: {
+			// 转换金额为数字
+			moneyNum(value) {
+				return +value;
+			},
+			// 确认收货
+			orderTake(item, index) {
+				let obj = this;
+				uni.showModal({
+					title: '是否确认收货?',
+					success: (res) => {
+						if (res.confirm) {
+							orderTake({
+									uni: item.order_id
+								})
+								.then(e => {
+									obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
+									uni.showToast({
+										title: '收货成功'
+									});
+								})
+								.catch(e => {
+									console.log(e);
+								});
+						} else {
+							// console.log('cancel') //点击取消之后执行的代码
+							
+						}
+
+						
+
+					}
+				});
+			},
+			//跳转到订单详情
+			goToOrderDetail(e) {
+				uni.navigateTo({
+					url: '/pages/order/orderDetail?id=' + e.order_id
+				});
+			},
+			// 申请退款
+			orderRefund(e) {
+				uni.navigateTo({
+					url: '/pages/order/orderRefund?id=' + e.order_id
+				});
+			},
+			// 订单支付
+			orderPay(e) {
+				uni.navigateTo({
+					url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
+				});
+			},
+			//获取订单列表
+			loadData(source) {
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				orderList({
+						type: state,
+						page: navItem.page,
+						limit: navItem.limit
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.map(e => {
+							let b = this.orderStateExp(e.status);
+							e.stateTip = b.stateTip;
+							e.stateTipColor = b.stateTipColor;
+							return e;
+						});
+						navItem.orderList = navItem.orderList.concat(arr);
+						// 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);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			},
+			//删除订单
+			deleteOrder(index) {
+				uni.showLoading({
+					title: '请稍后'
+				});
+				setTimeout(() => {
+					this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
+					uni.hideLoading();
+				}, 600);
+			},
+			//取消订单
+			cancelOrder(item) {
+				uni.showModal({
+					title: '订单取消',
+					content: '是否取消订单?',
+					success: e => {
+						if (e.confirm) {
+							uni.showLoading({
+								title: '请稍后'
+							});
+							orderCancel({
+									id: item.order_id
+								})
+								.then(e => {
+									uni.showToast({
+										title: '取消成功',
+										duration: 2000,
+										position: 'top'
+									});
+								})
+								.catch(e => {
+									console.log(e);
+								});
+							//取消订单后删除待付款中该项
+							let list = this.navList[this.tabCurrentIndex].orderList;
+							let index = list.findIndex(val => val.id === item.id);
+							index !== -1 && list.splice(index, 1);
+							uni.hideLoading();
+						}
+					}
+				});
+			},
+
+			//订单状态文字和颜色
+			orderStateExp(state) {
+				let stateTip = '',
+					stateTipColor = '#fa436a';
+				switch (+state) {
+					case 0:
+						stateTip = '待付款';
+						break;
+					case 1:
+						stateTip = '待发货';
+						break;
+					case 2:
+						stateTip = '待收货';
+						break;
+					case 3:
+						stateTip = '待评价';
+						break;
+					case 4:
+						stateTip = '已完成';
+						stateTipColor = '#5dbc7c';
+						break;
+					case 9:
+						stateTip = '订单已关闭';
+						stateTipColor = '#909399';
+						break;
+
+						//更多自定义
+				}
+				return {
+					stateTip,
+					stateTipColor
+				};
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		background: $page-color-base;
+		height: 100%;
+	}
+
+	.swiper-box {
+		height: calc(100% - 40px);
+	}
+
+	.list-scroll-content {
+		height: 100%;
+	}
+
+	.navbar {
+		display: flex;
+		height: 40px;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			background: #fff;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			width: 20%;
+			flex-shrink: 0;
+			height: 100%;
+			font-size: 15px;
+			color: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid $base-color;
+				}
+			}
+		}
+	}
+
+	.uni-swiper-item {
+		height: auto;
+	}
+
+	.order-item {
+		display: flex;
+		flex-direction: column;
+		padding-left: 30rpx;
+		background: #fff;
+		margin-top: 16rpx;
+
+		.i-top {
+			display: flex;
+			align-items: center;
+			height: 80rpx;
+			padding-right: 30rpx;
+			font-size: $font-base;
+			color: $font-color-dark;
+			position: relative;
+
+			.time {
+				flex: 1;
+			}
+
+			.state {
+				color: $base-color;
+			}
+
+			.del-btn {
+				padding: 10rpx 0 10rpx 36rpx;
+				font-size: $font-lg;
+				color: $font-color-light;
+				position: relative;
+
+				&:after {
+					content: '';
+					width: 0;
+					height: 30rpx;
+					border-left: 1px solid $border-color-dark;
+					position: absolute;
+					left: 20rpx;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+
+		/* 多条商品 */
+		.goods-box {
+			height: 160rpx;
+			padding: 20rpx 0;
+			white-space: nowrap;
+
+			.goods-item {
+				width: 120rpx;
+				height: 120rpx;
+				display: inline-block;
+				margin-right: 24rpx;
+			}
+
+			.goods-img {
+				display: block;
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		/* 单条商品 */
+		.goods-box-single {
+			display: flex;
+			padding: 20rpx 0;
+
+			.goods-img {
+				display: block;
+				width: 120rpx;
+				height: 120rpx;
+			}
+
+			.right {
+				flex: 1;
+				display: flex;
+				flex-direction: column;
+				padding: 0 30rpx 0 24rpx;
+				overflow: hidden;
+
+				.row {
+					margin-top: 10rpx;
+				}
+
+				.row_title {
+					padding: 5rpx 10rpx;
+					background-color: #dddddd;
+					border-radius: 10rpx;
+					font-size: 22rpx;
+					color: #ffffff;
+				}
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-dark;
+					line-height: 1;
+					width: 80%;
+				}
+
+				.attr-box {
+					display: flex;
+					justify-content: flex-end;
+					font-size: $font-sm + 2rpx;
+					color: $font-color-light;
+				}
+
+				.price {
+					display: inline;
+					font-size: $font-base + 2rpx;
+					color: $font-color-dark;
+
+					&:before {
+						content: '¥';
+						font-size: $font-sm;
+
+					}
+				}
+			}
+		}
+
+		.price-box {
+			display: flex;
+			justify-content: flex-end;
+			align-items: baseline;
+			padding: 20rpx 30rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-light;
+
+			.num {
+				margin: 0 8rpx;
+				color: $font-color-dark;
+			}
+
+			.price {
+				font-size: $font-lg;
+				color: $font-color-dark;
+
+				&:before {
+					content: '¥';
+					font-size: $font-sm;
+					margin: 0 2rpx 0 8rpx;
+				}
+			}
+		}
+
+		.action-box {
+			display: flex;
+			justify-content: flex-end;
+			align-items: center;
+			height: 100rpx;
+			position: relative;
+			padding-right: 30rpx;
+		}
+
+		.action-btn {
+			width: 160rpx;
+			height: 60rpx;
+			margin: 0;
+			margin-left: 24rpx;
+			padding: 0;
+			text-align: center;
+			line-height: 60rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-dark;
+			background: #fff;
+			border-radius: 100px;
+
+			&:after {
+				border-radius: 100px;
+			}
+
+			&.recom {
+				color: $base-color;
+
+				&:after {
+					border-color: $base-color;
+				}
+			}
+
+			&.evaluate {
+				color: $color-yellow;
+
+				&:after {
+					border-color: $color-yellow;
+				}
+			}
+		}
+	}
+
+	/* load-more */
+	.uni-load-more {
+		display: flex;
+		flex-direction: row;
+		height: 80rpx;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.uni-load-more__text {
+		font-size: 28rpx;
+		color: #999;
+	}
+
+	.uni-load-more__img {
+		height: 24px;
+		width: 24px;
+		margin-right: 10px;
+	}
+
+	.uni-load-more__img>view {
+		position: absolute;
+	}
+
+	.uni-load-more__img>view view {
+		width: 6px;
+		height: 2px;
+		border-top-left-radius: 1px;
+		border-bottom-left-radius: 1px;
+		background: #999;
+		position: absolute;
+		opacity: 0.2;
+		transform-origin: 50%;
+		animation: load 1.56s ease infinite;
+	}
+
+	.uni-load-more__img>view view:nth-child(1) {
+		transform: rotate(90deg);
+		top: 2px;
+		left: 9px;
+	}
+
+	.uni-load-more__img>view view:nth-child(2) {
+		transform: rotate(180deg);
+		top: 11px;
+		right: 0;
+	}
+
+	.uni-load-more__img>view view:nth-child(3) {
+		transform: rotate(270deg);
+		bottom: 2px;
+		left: 9px;
+	}
+
+	.uni-load-more__img>view view:nth-child(4) {
+		top: 11px;
+		left: 0;
+	}
+
+	.load1,
+	.load2,
+	.load3 {
+		height: 24px;
+		width: 24px;
+	}
+
+	.load2 {
+		transform: rotate(30deg);
+	}
+
+	.load3 {
+		transform: rotate(60deg);
+	}
+
+	.load1 view:nth-child(1) {
+		animation-delay: 0s;
+	}
+
+	.load2 view:nth-child(1) {
+		animation-delay: 0.13s;
+	}
+
+	.load3 view:nth-child(1) {
+		animation-delay: 0.26s;
+	}
+
+	.load1 view:nth-child(2) {
+		animation-delay: 0.39s;
+	}
+
+	.load2 view:nth-child(2) {
+		animation-delay: 0.52s;
+	}
+
+	.load3 view:nth-child(2) {
+		animation-delay: 0.65s;
+	}
+
+	.load1 view:nth-child(3) {
+		animation-delay: 0.78s;
+	}
+
+	.load2 view:nth-child(3) {
+		animation-delay: 0.91s;
+	}
+
+	.load3 view:nth-child(3) {
+		animation-delay: 1.04s;
+	}
+
+	.load1 view:nth-child(4) {
+		animation-delay: 1.17s;
+	}
+
+	.load2 view:nth-child(4) {
+		animation-delay: 1.3s;
+	}
+
+	.load3 view:nth-child(4) {
+		animation-delay: 1.43s;
+	}
+
+	@-webkit-keyframes load {
+		0% {
+			opacity: 1;
+		}
+
+		100% {
+			opacity: 0.2;
+		}
+	}
 </style>

+ 30 - 22
pages/order/orderDetail.vue

@@ -1,26 +1,33 @@
 <template>
 	<view class="content">
-		<view class="row b-b b-t">
-			<text class="order-status" @click="item.delivery_type == 'express'?towuliu(item):''">{{ item._status ? item._status._msg : '' }}</text>
+		<view class="row b-b b-t">
+			
+			<text class="order-status" @click="item.delivery_type == 'express'?towuliu(item):''">{{ item._status ? (item._status._msg == '已收货,快去评价一下吧'?'已完成': (item._status._msg || '')):'' }}</text>
 		</view>
 		<!-- 快递信息 -->
-		<view class="express-box" @click="expressCheck(item)" v-if="item.delivery_id != null ">
-			<view v-if='item.delivery_id != null' style="width: 100%;padding: 10rpx 20rpx;background: #FFFFFF;">
-				<view class="express-frame">
-					<view>
-						<view style="display: flex;">
-						<text class="express-text">快递名:</text>
-							{{ item.delivery_name }}
-						</view>
-						<view style="display: flex;">
-							<text class="express-text">快递单号:</text>
-							{{ item.delivery_id }}
-						</view>
-					</view>
-					<text class="iconfont iconenter" style="color: #CCCCCC;"></text>
-				</view>
-			</view>
-		</view>
+		<view class="orderDetialBox" v-if="item.delivery_id">
+		   <view class="item flex">
+		    <view class="title-left flex">
+		     <text class="title">配送方式:</text>
+		     <view class="text">{{ item.delivery_type == 'express' ? '发货' : item.delivery_type == 'send' ? '送货' : '' }}</view>
+		    </view>
+		   </view>
+		   <view class="item flex">
+		    <view class="title-left flex">
+		     <text class="title" v-if="item.delivery_type == 'express'">快递公司:</text>
+		     <text class="title" v-if="item.delivery_type == 'send'">送货人员:</text>
+		     <view class="text">{{ item.delivery_name }}</view>
+		    </view>
+		    <!-- <view v-if="status._type != 1 && status._type != 0" class="buttom-right" @click="towuliu(item)">查看物流</view> -->
+		   </view>
+		   <view class="item flex">
+		    <view class="title-left flex">
+		     <text class="title" v-if="item.delivery_type == 'express'">快递单号:</text>
+		     <text class="title" v-if="item.delivery_type == 'send'">联系方式:</text>
+		     <view class="text">{{ item.delivery_id }}</view>
+		    </view>
+		   </view>
+		  </view>
 		<view class="address-box position-relative">
 			<view class="address-top flex">
 				<view class="title">{{ item.real_name }}</view>
@@ -40,12 +47,12 @@
 							<view class="attr-box">
 								{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num + '' + (goodsItem.productInfo.unit_name ||'') }}
 							</view>
-							<view>
+							<!-- <view>
 								<view v-if="status._type ==  3">
 									<view @click="evaluate(goodsItem)" class="yesevaluate" v-if="goodsItem.is_reply > 0"><text>已评价</text></view>
 									<view @click="evaluate(goodsItem)" class="evaluate" v-if="goodsItem.is_reply < 1"><text>去评价</text></view>
 								</view>
-							</view>
+							</view> -->
 						</view>
 					</view>
 				</view>
@@ -103,7 +110,8 @@
 			<view class="item flex">
 				<view class="title-left flex">
 					<text class="title">订单状态:</text>
-					<view class="text">{{ item._status._title || '' }}</view>
+					<view class="text">{{ item._status._title == '待评价'? '已完成':(item._status._title || '')  }}</view>
+					
 				</view>
 			</view>
 			<view class="item flex">

+ 2 - 2
pages/order/orderRefund.vue

@@ -87,7 +87,8 @@ export default {
 			});
 		},
 		//提交
-		confirm() {
+		confirm() {
+			let obj = this;
 			if (!obj.refund) {
 				uni.showModal({
 					title: '错误',
@@ -96,7 +97,6 @@ export default {
 				});
 				return false;
 			}
-			let obj = this;
 			refund({
 				text: obj.refund,
 				uni: obj.orderId,

+ 12 - 6
pages/product/product.vue

@@ -30,7 +30,7 @@
 				</view>
 			</view>
 		</view>
-
+		
 		<view class="introduce-section">
 			<view class="price-box" v-if="goodsType == 0">
 				<text class="price-tip">¥</text>
@@ -59,7 +59,9 @@
 					<text>最高抵扣¥{{ moneyNum(goodsObjact.use_max_integral) == 0 ? moneyNum(goodsObjact.price) : moneyNum(goodsObjact.use_max_integral) }}</text>
 				</view>
 			</view> -->
-		</view>
+		</view>
+		<!-- 评价 -->
+		<!-- <estimate @navTo="navTo('/pages/product/reply?id=' + goodsid)" v-if="reply" :reply="reply" :list="details"></estimate> -->
 		<view class="detail-desc">
 			<view class="d-header"><text>商品详情</text></view>
 			<rich-text class="detail-centent" :nodes="goodsObjact.description"></rich-text>
@@ -90,7 +92,7 @@
 					<image :src="actionImage"></image>
 					<view class="right">
 						<view class="good-name clamp">{{ goodsObjact.store_name }}</view>
-						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
+						<text class="price">¥{{ (actionPrice * goodsNumber).toFixed(2) }}</text>
 						<!-- <text class="price jf">{{ goodIntegral }}</text> -->
 						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
 						<!-- <view class="selected" v-if="goodsType == 0">
@@ -128,7 +130,9 @@
 	</view>
 </template>
 
-<script>
+<script>
+	// 评价
+	import estimate from './common/estimate.vue';
 // import share from '@/components/share';
 import uniNumberBox from '@/components/uni-number-box.vue';
 import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
@@ -145,7 +149,8 @@ import { userInfo } from 'os';
 export default {
 	components: {
 		uniNumberBox,
-		uniCountdown
+		uniCountdown,
+		estimate
 	},
 	filters: {
 		address(val) {
@@ -157,7 +162,8 @@ export default {
 		}
 	},
 	data() {
-		return {
+		return {
+			list: {},
 			details: '',
 			reply: '', //评论
 			type: 1, //默认支付方式add为

+ 1 - 1
pages/public/forget.vue

@@ -174,7 +174,7 @@ page {
 	}
 	.uni-button-green {
 		color: #ffffff;
-		background-color: #5dbc7c;
+		background-color: $base-color;
 		margin: 40rpx 10rpx;
 		border-radius: 50rpx;
 	}

+ 7 - 7
pages/public/register.vue

@@ -21,13 +21,13 @@
 				<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_input flex">
 				<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>
 			<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>
@@ -42,7 +42,7 @@ export default {
 			password: '', //密码
 			repassword: '',
 			invitation: '', //邀请码
-			code: 123456, //验证码
+			code: '', //验证码
 			time: '', //保存倒计时对象
 			countDown: 0 ,//倒计时
 		};
@@ -87,10 +87,10 @@ export default {
 			// 	obj.$api.msg('请输入邀请码');
 			// 	return;
 			// }
-			// if (obj.code == '') {
-			// 	obj.$api.msg('请输入验证码');
-			// 	return;
-			// }
+			if (obj.code == '') {
+				obj.$api.msg('请输入验证码');
+				return;
+			}
 			register({
 				account: obj.phone, //账号
 				captcha: obj.code, //验证码

+ 6 - 1
pages/user/pushList.vue

@@ -86,7 +86,12 @@
 	}
 </script>
 
-<style lang="scss">
+<style lang="scss">
+	page {
+		height: auto;
+		min-height: 100%;
+		background-color: #fff;
+	}
 .tab {
 	width: 100%;
 	height: 100rpx;

+ 254 - 54
pages/user/shareQrCode.vue

@@ -1,13 +1,24 @@
 <template>
-	<view class="content">
-		<image src="../../static/img/sharebase.png" mode="widthFix" class="baseimg"></image>
-		<view class="erweima" :style="{'top': height,'width': ewidth,'height': ewidth}">
+	<view class="main">
+		<view class="qrimg">
 			<tki-qrcode :cid="cid" ref="qrcode" :val="val" :size="size" :unit="unit" :background="background"
-				:foreground="foreground" :pdground="pdground" :iconSize="iconSize" :lv="lv" :onval="onval"
+				:foreground="foreground" :pdground="pdground" :icon="icon" :iconSize="iconSize" :lv="lv" :onval="onval" :showLoading="showLoading"
 				:loadMake="loadMake" :usingComponents="usingComponents" @result="qrR" />
 		</view>
+		<!-- 		<view class="qrcode-wrapper">
+			<image class="qrcode-save__image" :src="shareQrcodeUrl" mode="aspectFit"></image>
+			<view class="qrcode-save__btn">
+				
+			</view>
+		</view> -->
+		<!-- <canvas :style="{ width: canvasW + 'px', height: canvasH + 'px',}" canvas-id="myCanvas" id="myCanvas"></canvas> -->
+		<canvas :style="{ width:  '600rpx', height: '1066rpx',}" canvas-id="myCanvas" id="myCanvas" class="hb"></canvas>
+		<view class="" v-if="fina">
+			<button text="保存图片" @click="saveShareQrcode">保存图片</button>
+		</view>
 	</view>
 </template>
+
 <script>
 	import {
 		mapState,
@@ -16,28 +27,46 @@
 	import {
 		getUserInfo
 	} from '@/api/user.js';
+
+	var that
 	export default {
 		data() {
 			return {
-				ewidth: '',
-				height: '',
-				val: '',
-				cid: 'cid',
-				size: 150,
-				unit: '150',
-				background: '#FFFFFF',
-				foreground: '#000000',
-				pdground: '#000000',
-				icon: '',
-				iconSize: 40,
-				lv: 3,
-				onval: true,
-				loadMake: true,
-				usingComponents: true,
-				bs: 0,
-			};
+				cid: 'tki-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
+				size:300, //生成的二维码大小
+				unit: 'upx', //大小单位尺寸
+				// show: true,//默认使用组件中的image标签显示二维码
+				val: '', //要生成的内容
+				background: '#ffffff', //二维码背景色
+				foreground: '#333333', //二维码前景色
+				pdground: '#333333', //二维码角标色
+				icon: '', //二维码图标URL(必须是本地图片,网络图需要先下载至本地)
+				iconSize: 40, //二维码图标大小
+				lv: 3, //容错级别
+				onval: true, //监听val值变化自动重新生成二维码
+				loadMake: true, //组件初始化完成后自动生成二维码,val需要有值
+				usingComponents: false, //是否使用了自定义组件模式(主要是为了修复非自定义组件模式时 v-if 无法生成二维码的问题)
+				showLoading: false, //是否显示loading
+
+				erweimasrc: '',
+				canvasW: 0, // 画布宽
+				canvasH: 0, // 画布高
+				SystemInfo: {}, // 设备信息
+				goodsImg: {}, // 商品主图
+				ewmImg: {}, // 二维码图片
+				ewmW: 0, // 二维码大小
+				title: '', // 商品标题
+				canvasShow: true,
+				shareQrcodeUrl: '', //canvas本地路径
+				ratio: '', //画布比例
+				fina: false,
+			}
+		},
+		computed: {
+			...mapState(['baseURL', 'urlFile']),
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
 		},
-		onLoad() {
+		onLoad(options) {
 			const obj = this;
 			if (!this.userInfo.uid) {
 				getUserInfo({}).then(e => {
@@ -52,47 +81,218 @@
 				this.val = 'http://hgd.liuniu946.com/appdom/index.html?spread=' + this.userInfo.uid
 			}
 		},
-		onShow() {},
-		//下拉刷新
-		onPullDownRefresh() {
-		},
-		onReady() {
-		},
-		computed: {
-			...mapState(['baseURL', 'urlFile']),
-			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-		},
 		methods: {
 			qrR(res) {
-				this.src = res;
-				this.setImageHeight()
+				this.erweimasrc = res
+				console.log(res, 'erweima');
+				this.createPoster()
+			},
+			async createPoster() {
+				let that = this
+				// 获取设备信息,主要获取宽度,赋值给canvasW 也就是宽度:100%
+				this.SystemInfo = await this.getSystemInfo();
+				// 获取商品主图,二维码信息,APP端会返回图片的本地路径(H5端只能返回原路径)
+				this.goodsImg = await this.getImageInfo('/static/img/sharebase.png');
+				this.ewmImg = await this.getImageInfo(this.erweimasrc);
+				// this.canvasW = this.SystemInfo.windowWidth; // 画布宽度
+				this.ratio = this.SystemInfo.windowWidth / 750;
+				this.canvasW = 600 * this.ratio;
+				this.canvasH = 1066 * this.ratio;
+				this.ewmW = 250 * this.ratio;
+				console.log(this.canvasH, 'this.canvasH')
+				// this.canvasH = this.goodsImg.height + this.ewmW + 200;  // 画布高度 = 主图高度+二维码高度 + 文字图片的间距(大概50)
+
+				// 如果主图,二维码图片,设备信息都获取成功,开始绘制海报,这里需要用setTimeout延时绘制,否则可能会出现图片不显示。
+				if (this.goodsImg.errMsg == 'getImageInfo:ok' && this.ewmImg.errMsg == 'getImageInfo:ok' && this
+					.SystemInfo.errMsg == 'getSystemInfo:ok') {
+					console.log('ok')
+					uni.showToast({
+						icon: 'loading',
+						mask: true,
+						duration: 10000,
+						title: '海报绘制中',
+					});
+					setTimeout(() => {
+						var ctx = uni.createCanvasContext('myCanvas', this);
+						// 填充背景色,白色
+						ctx.setFillStyle('#fff'); // 默认白色
+						ctx.fillRect(0, 0, this.canvasW, this.canvasH) // fillRect(x,y,宽度,高度)
+
+						// 绘制商品主图,二维码
+						ctx.drawImage(this.goodsImg.path, 0, 0, this.canvasW, this
+							.canvasH) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度)
+						ctx.drawImage(this.ewmImg.path, (this.canvasW / 2 - this.ewmW / 2),this.canvasH - 85*this.ratio - this.ewmW,
+							this.ewmW, this.ewmW) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度,二维码的宽,高)
+
+						// 3、绘制商品标题,多余文字自动换行
+						ctx.setFontSize(16); // setFontSize() 设置字体字号
+						ctx.setFillStyle('#333'); // setFillStyle() 设置字体颜色
+
+						/* str 这段代码是我百度找的,参考别人的。canvas不能自动换行,需要自行计算 */
+						// let _strlineW = 0;
+						// let _strLastIndex = 0; //每次开始截取的字符串的索引
+						// let _strHeight = this.canvasW +20; //绘制字体距离canvas顶部的初始高度
+						// let _num = 1;
+						// for (let i = 0; i < this.title.length; i++) {
+						// 	_strlineW += ctx.measureText(this.title[i]).width;
+						// 	if (_strlineW > this.canvasW-155) {
+						// 		if(_num == 2 && 2){
+						// 			//文字换行数量大于二进行省略号处理
+						// 			ctx.fillText(this.title.substring(_strLastIndex, i-5)+'...', 40, _strHeight);
+						// 			_strlineW = 0;
+						// 			_strLastIndex = i;
+						// 			_num++;
+						// 			break;
+						// 		}else{
+						// 			ctx.fillText(this.title.substring(_strLastIndex, i), 40, _strHeight);
+						// 			_strlineW = 0;
+						// 			_strHeight += 20;
+						// 			_strLastIndex = i;
+						// 			_num++;
+						// 		}
+						// 	}else if (i == this.title.length - 1) {
+						// 		ctx.fillText(this.title.substring(_strLastIndex, i + 1), 40, _strHeight);
+						// 		_strlineW = 0;
+						// 	}
+						// }
+						/* end */
+
+						// ctx.setFontSize(16) // 字号
+						// ctx.setFillStyle('#e31d1a') // 颜色
+						// ctx.fillText('¥'+this.price, 10, this.canvasW +75); // (文字,x,y)
+						// ctx.setFontSize(12)
+						// ctx.setFillStyle('#b8b8b8')
+						// ctx.fillText('原价¥'+this.Oldprice, 100, this.canvasW +75);
+
+
+						// 邀请信息
+						// ctx.setFontSize(16)
+						// ctx.setFillStyle('#333')
+						// ctx.fillText('长按二维码立即预约', this.ewmW + 40, this.canvasW +100);
+
+						// ctx.setFontSize(16)
+						// ctx.setFillStyle('#333')
+						// ctx.fillText('分享自小程序', this.ewmW + 40, this.canvasW +120);
+						ctx.draw(false, (ret) => { // draw方法 把以上内容画到 canvas 中。
+							console.log(ret)
+							uni.showToast({
+								icon: 'none',
+								title: '生成成功!',
+							});
+							that.fina = true
+							uni.canvasToTempFilePath({ // 保存canvas为图片
+								canvasId: 'myCanvas',
+								quality: 1,
+								fileType: 'jpg',
+								complete: function(res) {
+									// 在H5平台下,tempFilePath 为 base64, // 图片提示跨域 H5保存base64失败,APP端正常输出临时路径
+									console.log(res)
+									that.canvasShow = false
+									that.shareQrcodeUrl = res.tempFilePath
+									that.$forceUpdate()
+									setTimeout(function() {
+										console.log(that.shareQrcodeUrl, that
+											.canvasShow)
+									}, 2000)
+								},
+							})
+						});
+					}, 1500)
+				} else {
+					console.log('err')
+				}
+			},
+			// 获取图片信息
+			getImageInfo(image) {
+				return new Promise((req, rej) => {
+					uni.getImageInfo({
+						src: image,
+						success: function(res) {
+							req(res)
+						},
+					});
+				})
 			},
-			setImageHeight: function() {
-				var _this = this;
-				const query = uni.createSelectorQuery().in(this);
-				query.select('.baseimg').boundingClientRect(data => {
-					_this.height = (547/816)*data.height + 'px'
-					_this.ewidth = (215/816)*data.height + 'px'
-				}).exec();
+
+			// 获取设备信息
+			getSystemInfo() {
+				return new Promise((req, rej) => {
+					uni.getSystemInfo({
+						success: function(res) {
+							req(res)
+						}
+					});
+				})
+			},
+			//保存图片
+			saveShareQrcode() {
+				console.log(this.shareQrcodeUrl)
+				uni.saveImageToPhotosAlbum({
+					filePath: this.shareQrcodeUrl,
+					success: (res) => {
+						uni.showToast({
+							icon: 'none',
+							position: 'bottom',
+							title: "成功保存到相册",
+						});
+					},
+					fail: (err) => {
+						//重新提示用户打开保存图片的授权
+						if (err.errMsg === "saveImageToPhotosAlbum:fail auth deny") {
+							uni.showModal({
+								title: '提示',
+								content: '需要您授权保存相册',
+								showCancel: false,
+								success(res) {
+									if (res.confirm) {
+										uni.openSetting({
+											success(settingdata) {
+												if (settingdata.authSetting[
+														'scope.writePhotosAlbum']) {
+													uni.showModal({
+														title: '提示',
+														content: '获取权限成功,再次保存图片即可成功',
+														showCancel: false,
+													})
+												} else {
+													uni.showModal({
+														title: '提示',
+														content: '获取权限失败,无法保存到相册',
+														showCancel: false
+													})
+												}
+											}
+										})
+									}
+								}
+							})
+						}
+					},
+				})
 			}
 		}
-	};
+	}
 </script>
 
 <style lang="scss">
-	.baseimg {
-		width: 100%;
+	.hb {
+		margin: auto;
 	}
-
-	.erweima {
-		// width: 300rpx;
+	.qrimg {
 		position: absolute;
-		// top: 930rpx;
-		left: 0;
-		right: 0;
-		margin: auto;
-		display: flex;
-		justify-content: center;
-		align-items: center;
+		left: -9999rpx;
+		top: -9999rpx;
+	}
+
+	button {
+		height: 88upx;
+		background-color: #feca00;
+		color: #fff;
+		border-radius: 44upx;
+		text-align: center;
+		line-height: 88upx;
+		width: 60%;
+		margin: 0 auto;
+		margin-top: 30upx;
 	}
 </style>

+ 4 - 4
pages/user/user.vue

@@ -12,7 +12,7 @@
 				<image class="avatar" src="../../static/img/app.png" mode="" v-else></image>
 				<view class="user-name-id">
 					<view class="user-name clamp2">{{userInfo.nickname  || '游客'}}</view>
-					<view class="user-uid" v-if="userInfo.uid">邀请码:{{userInfo.uid || ''}}</view>
+					<view class="user-uid" v-if="userInfo.uid">ID:{{userInfo.uid || ''}}</view>
 				</view>
 			</view>
 			<view class="flex yexq">
@@ -29,10 +29,10 @@
 					</view>
 				</view>
 			</view>
-			<view class="u-set" v-if="userInfo && userInfo.level > 0">
+			<view class="u-set" v-if="userInfo && userInfo.vip">
 				<image src="../../static/icon/vip.png" mode="widthFix"></image>
 				<view class="u-set-tit">
-					{{userInfo.level == 4 ?'创业合伙人': (userInfo.level == 3 ?'城市合伙人':(userInfo.level == 2 ?'团购经纪人':'vip'))}}
+					{{userInfo.vip_name == '联合创始合伙人'?'联合创始人':userInfo.vip_name}}
 				</view>
 			</view>
 			
@@ -322,7 +322,7 @@
 			},
 			// 加载初始数据
 			loadBaseData() {
-				getUserInfo({})
+				getUser({})
 					.then(({
 						data
 					}) => {

+ 6 - 2
store/index.js

@@ -14,7 +14,8 @@ const store = new Vuex.Store({
 		weichatInfo:{},//保存微信注册信息
 		weichatObj:'',//微信对象
 		// #endif
-		app: {}
+		app: {},
+		argstime: '',
 	},
 	mutations: {
 		//保存微信信息
@@ -27,7 +28,10 @@ const store = new Vuex.Store({
 		},
 		changeState(state,provider) {
 			state.app = provider;
-		}
+		},
+		setArgstime(state, provider) {
+			state.argstime = provider;
+		},
 	},
 	modules:{
 		user

BIN
unpackage/release/apk/__UNI__D811809__20230208142756.apk


BIN
unpackage/release/apk/__UNI__D811809__20230208144053.apk


BIN
unpackage/release/apk/__UNI__D811809__20230209095329.apk


BIN
unpackage/release/apk/__UNI__D811809__20230210133731.apk


BIN
unpackage/release/apk/__UNI__D811809__20230213143312.apk


BIN
unpackage/release/apk/__UNI__D811809__20230214170959.apk


BIN
unpackage/release/apk/__UNI__D811809__20230215101649.apk


BIN
unpackage/release/apk/__UNI__D811809__20230216110712.apk


BIN
unpackage/release/apk/__UNI__D811809__20230217184154.apk


+ 5 - 3
utils/request.js

@@ -66,12 +66,14 @@ service.interceptors.request(
 		// console.log(config);
 		if (!config.header) {
 			config.header = {
-				"Authori-zation": 'Bearer ' + token,
+				"Authori-zation": 'Bearer ' + token,
+				
 			}
 		} else {
 			// 添加key请求头
-			config.header["Authori-zation"] = 'Bearer ' + token;
-		}
+			config.header["Authori-zation"] = 'Bearer ' + token;
+			
+		}
 		return config
 	},
 	error => {