xuhaolan 4 سال پیش
والد
کامیت
4600c09bb4
9فایلهای تغییر یافته به همراه1476 افزوده شده و 1408 حذف شده
  1. 2 2
      api/wallet.js
  2. 2 2
      manifest.json
  3. 3 19
      pages.json
  4. 484 448
      pages/money/pay.vue
  5. 540 484
      pages/money/recharge.vue
  6. 1 1
      pages/public/login.vue
  7. 442 450
      pages/user/extension.vue
  8. 2 2
      pages/user/user.vue
  9. BIN
      static/error/logo.png

+ 2 - 2
api/wallet.js

@@ -43,7 +43,7 @@ export function extractBank(data) {
 		data
 	});
 }
-// #ifdef H5
+
 // 公众号充值
 export function rechargeWechat(data) {
 	return request({
@@ -52,7 +52,7 @@ export function rechargeWechat(data) {
 		data
 	});
 }
-// #endif
+
 // #ifdef MP
 // 小程序充值
 export function rechargeRoutine(data) {

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "万吉商城",
     "appid" : "__UNI__F0EBD91",
     "description" : "",
-    "versionName" : "1.1.0",
-    "versionCode" : 110,
+    "versionName" : "1.1.7",
+    "versionCode" : 117,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 3 - 19
pages.json

@@ -101,12 +101,7 @@
 		{
 			"path": "pages/money/moneyPwd",
 			"style": {
-				"navigationBarTitleText": "交易密码",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
+				"navigationBarTitleText": "交易密码"
 			}
 		},{
 			"path": "pages/public/login",
@@ -122,19 +117,13 @@
 		{
 			"path": "pages/money/withdmoenys",
 			"style": {
-				"navigationBarTitleText": "余额转账",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
+				"navigationBarTitleText": "余额转账"
 			}
 		},
 		{
 			"path": "pages/user/extension",
 			"style": {
 				"navigationStyle": "custom",
-
 				"navigationBarTitleText": "我的推广"
 			}
 		},
@@ -383,12 +372,7 @@
 		{
 			"path": "pages/user/award",
 			"style": {
-				"navigationBarTitleText": "奖励明细",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
+				"navigationBarTitleText": "奖励明细"
 			}
 		},
 		{

+ 484 - 448
pages/money/pay.vue

@@ -1,449 +1,485 @@
-<template>
-	<view class="app">
-		<view class="price-box">
-			<text>支付金额</text>
-			<text class="price">{{ money }}</text>
-		</view>
-		<view class="pay-type-list">
-			<view class="type-item b-b" @click="changePayType(1)" v-if="bool">
-				<text class="icon iconfont iconweixin"></text>
-				<view class="con">
-					<text class="tit">微信支付</text>
-					<text>推荐使用微信支付</text>
-				</view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 1"></radio></label>
-			</view>
-			<!-- #ifdef APP-PLUS -->
-			<view class="type-item b-b" @click="changePayType(2)">
-				<text class="icon iconfont iconzhifubao"></text>
-				<view class="con"><text class="tit">支付宝支付</text></view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
-			</view>
-			<!-- #endif -->
-			<view class="type-item" @click="changePayType(3)">
-				<text class="icon iconfont iconyue"></text>
-				<view class="con">
-					<text class="tit">余额支付</text>
-					<text>可用余额 ¥{{ now_money }}</text>
-				</view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 3"></radio></label>
-			</view>
-			<view v-if="is_gp==1" class="type-item" @click="changePayType(4)">
-				<text class="icon iconfont iconyue"></text>
-				<view class="con">
-					<text class="tit">报单金额</text>
-					<text>可用余额 ¥{{ gp_now_money }}</text>
-				</view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 4"></radio></label>
-			</view>
-			<view v-if="is_gp==1" class="type-item" @click="changePayType(5)">
-				<text class="icon iconfont iconyue"></text>
-				<view class="con">
-					<text class="tit">积分支付</text>
-					<text>可用积分 ¥{{ integral }}</text>
-				</view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 5"></radio></label>
-			</view>
-		</view>
-		<text class="mix-btn" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</text>
-	</view>
-</template>
-
-<script>
-import { balance } from '@/api/wallet.js';
-import { createOrderkey,computedOrderkey,orderPay } from '@/api/order.js';
-import { getUserInfo } from '@/api/user.js';
-import { mapState } from 'vuex';
-// #ifdef H5
-import weixinObj from "@/plugin/jweixin-module/index.js";
-// #endif
-export default {
-	data() {
-		return {
-			payType: 1, //支付类型
-			// #ifdef H5
-			payName: 'weixin',
-			// #endif
-			// #ifdef MP-WEIXIN
-			payName: 'weixin',
-			// #endif
-			orderInfo: {},
-			money: 0.0, //订单金额
-			now_money: 0.0, //余额
-			orderKey: '',
-			orderId: '', //保存订单id
-			payLoding: false, //判断是否支付中
-			type: '', //判断是否从订单中进入
-			// #ifdef H5
-			froms: '', //保存h5中数据来源对象
-			// #endif
-			pinkid: '' ,//保存拼团商品id
-			'gp_now_money':0,
-			'integral':0,
-			is_gp:0,//1为公排0不是公排
-			bool: true
-		};
-	},
-	onLoad(options) {
-		this.bool = uni.getStorageSync('weichatBrowser');
-		if(!this.bool) {
-			this.payType = 3
-			this.payName = 'yue'
-		}
-		if (options.type == 1) {
-			this.type = 1;
-			this.orderId = options.ordid;
-			this.money = options.money;
-		} else {
-			this.orderKey = options.key;
-			let prepage = this.$api.prePage();
-			computedOrderkey({
-				orderkey: this.orderKey,
-				couponId: prepage.couponChecked.id, //优惠券编号
-				addressId: prepage.addressData.id, //地址编号
-				useIntegral: prepage.checkedPoints ? 1 : 0
-			}).then(({ data }) => {
-				// 获取支付金额
-				this.money = data.result.pay_price;
-			});
-		}
-		// 保存pinkid
-		if (options.pinkid) {
-			this.pinkid = options.pinkid;
-		}
-		// 保存是否公排
-		if (options.is_gp) {
-			this.is_gp = options.is_gp;
-		}
-		// 载入余额
-		balance({}).then(({ data }) => {
-			// 获取余额
-			this.now_money = data.now_money;
-		});
-		// 载入用户信息
-		this.getUserInfo();
-	},
-	methods: {
-		getUserInfo(){
-			getUserInfo().then(({data}) => {
-				this.gp_now_money = data.gp_now_money
-				this.integral = data.integral
-				console.log(e,'数据');
-			})
-		},
-		//选择支付方式
-		changePayType(type) {
-			this.payType = type;
-			if (this.payType == 1) {
-				this.payName = 'weixin';
-				return
-			}
-			if (this.payType == 2) {
-				this.payName = 'ali';
-				return
-			}
-			if (this.payType == 3) {
-				this.payName = 'yue';
-				return
-			}
-			// 报单金额
-			if (this.payType == 4) {
-				this.payName = 'gp_now_money';
-				return
-			}
-			// 积分
-			if (this.payType == 5) {
-				this.payName = 'integral';
-				return
-			}
-		},
-		// 支付金额
-		orderMoneyPay() {
-			let obj = this;
-			orderPay({
-				uni: obj.orderId,
-				// #ifdef H5
-				from: obj.froms ? 'weixin' : 'H5', //来源
-				// #endif
-				// #ifdef MP-WEIXIN
-				from: 'routine', //来源
-				// #endif
-				// #ifdef APP-PLUS
-				from: 'app', //来源
-				// #endif
-				paytype: obj.payName //支付类型  weixin-微信 yue-余额
-			})
-				.then(e => {
-					// 判断是否为余额支付
-					if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
-						if (e.status == 200) {
-							obj.paySuccessTo();
-						} else {
-							obj.$api.msg(msg);
-						}
-					}
-					if (obj.payName == 'weixin' || obj.payName == 'routine') {
-						let da = e.data.result.jsConfig;
-						let data = {
-							// #ifdef H5
-							timestamp: da.timestamp,
-							// #endif
-							// #ifdef MP
-							timeStamp: da.timestamp,
-							// #endif
-							nonceStr: da.nonceStr,
-							package: da.package,
-							signType: da.signType,
-							paySign: da.paySign,
-							success: function(res) {
-								obj.paySuccessTo();
-							},
-							fail: () => {
-								uni.navigateTo({
-									url: '/pages/order/order?state=0'
-								});
-							}
-						};
-						// #ifdef H5
-						if(obj.payName == 'weixin'){
-weixinObj.chooseWXPay(data);
-						}
-						// #endif
-						// #ifdef MP-WEIXIN
-						if(obj.payName == 'routine'){
-							wx.requestPayment(data);
-						}
-						// #endif
-					}
-					uni.hideLoading();
-					obj.payLoding = false;
-				})
-				.catch(e => {
-					// 支付完成
-					uni.hideLoading();
-					obj.payLoding = false;
-					console.log(e);
-				});
-		},
-		// 支付成功跳转
-		paySuccessTo() {
-			uni.hideLoading();
-			uni.redirectTo({
-				url: '/pages/money/paySuccess?orderid=' + this.orderId
-			});
-		},
-		//确认支付
-		confirm: async function() {
-			let obj = this;
-			uni.showLoading({
-				title: '支付中',
-				mask: true
-			})
-			// 判断是否余额不足
-			if (obj.payName == 'yue' && +obj.now_money < obj.money) {
-				uni.showModal({
-					title: '提示',
-					content: '账户余额不足!',
-					showCancel: false,
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-				return;
-			}
-			// 判断是否报单
-			if(obj.is_gp==1){
-				// 判断是否报单金额不足
-				if (obj.payName == 'gp_now_money' && +obj.gp_now_money < obj.money) {
-					uni.showModal({
-						title: '提示',
-						content: '账户余额不足!',
-						showCancel: false,
-						success: res => {},
-						fail: () => {},
-						complete: () => {}
-					});
-					return;
-				}
-				// 判断是否积分不足
-				if (obj.payName == 'integral' && +obj.integral < obj.money) {
-					uni.showModal({
-						title: '提示',
-						content: '账户余额不足!',
-						showCancel: false,
-						success: res => {},
-						fail: () => {},
-						complete: () => {}
-					});
-					return;
-				}
-			}
-			
-			// 支付中
-			obj.payLoding = true;
-			// #ifdef H5
-			// 获取当前是否为微信浏览器
-			obj.froms = uni.getStorageSync('weichatBrowser') || '';
-			// #endif
-			// 判断是否为未支付订单中跳转进入
-			if (obj.type != 1) {
-				// 初次生成订单
-				obj.firstCreateOrder();
-			} else {
-				// 已经生成订单未支付
-				obj.orderMoneyPay();
-			}
-		},
-		// 初次订单创建
-		firstCreateOrder() {
-			let obj = this;
-			// 获取下单页面数据
-			let prepage = obj.$api.prePage();
-
-			let data = {
-				real_name: prepage.addressData.real_name, //联系人名称
-				phone: prepage.addressData.phone, //联系人号码
-				couponId: prepage.couponChecked.id, //优惠券编号
-				addressId: prepage.addressData.id, //支付地址id
-				useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
-				payType: obj.payName, //支付类型  weixin-微信 yue-余额
-				mark: prepage.desc, //备注
-				// #ifdef H5
-				from: obj.froms ? 'weixin' : 'H5', //来源
-				// #endif
-				// #ifdef MP-WEIXIN
-				from: 'routine', //来源
-				// #endif
-				// #ifdef APP-PLUS
-				from: 'app', //来源
-				// #endif
-				shipping_type: 1 ,//提货方式 1 快递 2自提
-				is_gp:obj.is_gp
-			};
-			// 判断是否拼团商品
-			if (obj.pinkid) {
-				data.pinkId = obj.pinkid;
-			}
-			// 生成订单
-			createOrderkey(data, obj.orderKey)
-				.then(({ data, status, msg }) => {
-					// 判断是否支付失败
-					if (data.status == 'ORDER_EXIST') {
-						uni.showModal({
-							title: '提示',
-							content: msg,
-							showCancel: false
-						});
-						uni.hideLoading();
-						obj.payLoding = false;
-						return;
-					}
-					// 保存订单号
-					obj.orderId = data.result.orderId;
-					// 判断是否为余额支付
-					if (obj.payName == 'yue'||obj.payName == 'gp_now_money'||obj.payName == 'integral') {
-						if (status == 200 && data.status == 'SUCCESS') {
-							obj.paySuccessTo();
-						} else {
-							obj.$api.msg(msg);
-						}
-					} else {
-						// 立即支付
-						obj.orderMoneyPay();
-					}
-				})
-				.catch(e => {
-					uni.hideLoading();
-					obj.payLoding = false;
-					console.log(e);
-				});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.app {
-	width: 100%;
-}
-
-.price-box {
-	background-color: #fff;
-	height: 265upx;
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
-	align-items: center;
-	font-size: 28upx;
-	color: #909399;
-
-	.price {
-		font-size: 50upx;
-		color: #303133;
-		margin-top: 12upx;
-		&:before {
-			content: '¥';
-			font-size: 40upx;
-		}
-	}
-}
-
-.pay-type-list {
-	margin-top: 20upx;
-	background-color: #fff;
-	padding-left: 60upx;
-	.type-item {
-		height: 120upx;
-		padding: 20upx 0;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding-right: 60upx;
-		font-size: 30upx;
-		position: relative;
-	}
-
-	.icon {
-		width: 100upx;
-		font-size: 52upx;
-	}
-	.iconyue {
-		color: #fe8e2e;
-	}
-	.iconweixin {
-		color: #36cb59;
-	}
-	.iconzhifubao {
-		color: #01aaef;
-	}
-	.tit {
-		font-size: $font-lg;
-		color: $font-color-dark;
-		margin-bottom: 4upx;
-	}
-	.con {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		font-size: $font-sm;
-		color: $font-color-light;
-	}
-}
-.mix-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 630upx;
-	height: 80upx;
-	margin: 80upx auto 30upx;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10upx;
-	/* box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4); */
-}
-
-.clickbg {
-	background-color: $color-gray !important;
-}
+<template>
+	<view class="app">
+		<view class="price-box">
+			<text>支付金额</text>
+			<text class="price">{{ money }}</text>
+		</view>
+		<view class="pay-type-list">
+			<view class="type-item b-b" @click="changePayType(1)" v-if="bool">
+				<text class="icon iconfont iconweixin"></text>
+				<view class="con">
+					<text class="tit">微信支付</text>
+					<text>推荐使用微信支付</text>
+				</view>
+				<label class="radio">
+					<radio value="" color="#5dbc7c" :checked="payType == 1"></radio>
+				</label>
+			</view>
+			<!-- #ifdef APP-PLUS -->
+			<view class="type-item b-b" @click="changePayType(2)">
+				<text class="icon iconfont iconzhifubao"></text>
+				<view class="con"><text class="tit">支付宝支付</text></view>
+				<label class="radio">
+					<radio value="" color="#5dbc7c" :checked="payType == 2"></radio>
+				</label>
+			</view>
+			<!-- #endif -->
+			<view class="type-item" @click="changePayType(3)">
+				<text class="icon iconfont iconyue"></text>
+				<view class="con">
+					<text class="tit">余额支付</text>
+					<text>可用余额 ¥{{ now_money }}</text>
+				</view>
+				<label class="radio">
+					<radio value="" color="#5dbc7c" :checked="payType == 3"></radio>
+				</label>
+			</view>
+			<view v-if="is_gp==1" class="type-item" @click="changePayType(4)">
+				<text class="icon iconfont iconyue"></text>
+				<view class="con">
+					<text class="tit">报单金额</text>
+					<text>可用余额 ¥{{ gp_now_money }}</text>
+				</view>
+				<label class="radio">
+					<radio value="" color="#5dbc7c" :checked="payType == 4"></radio>
+				</label>
+			</view>
+			<!-- <view v-if="is_gp==1" class="type-item" @click="changePayType(5)">
+				<text class="icon iconfont iconyue"></text>
+				<view class="con">
+					<text class="tit">积分支付</text>
+					<text>可用积分 ¥{{ integral }}</text>
+				</view>
+				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 5"></radio></label>
+			</view> -->
+		</view>
+		<text class="mix-btn" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</text>
+	</view>
+</template>
+
+<script>
+	import {
+		balance
+	} from '@/api/wallet.js';
+	import {
+		createOrderkey,
+		computedOrderkey,
+		orderPay
+	} from '@/api/order.js';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	import {
+		mapState
+	} from 'vuex';
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
+	export default {
+		data() {
+			return {
+				payType: 1, //支付类型
+				// #ifdef H5
+				payName: 'weixin',
+				// #endif
+				// #ifdef MP-WEIXIN
+				payName: 'weixin',
+				// #endif
+				orderInfo: {},
+				money: 0.0, //订单金额
+				now_money: 0.0, //余额
+				orderKey: '',
+				orderId: '', //保存订单id
+				payLoding: false, //判断是否支付中
+				type: '', //判断是否从订单中进入
+				// #ifdef H5
+				froms: '', //保存h5中数据来源对象
+				// #endif
+				pinkid: '', //保存拼团商品id
+				'gp_now_money': 0,
+				'integral': 0,
+				is_gp: 0, //1为公排0不是公排
+				bool: true
+			};
+		},
+		onLoad(options) {
+			this.bool = uni.getStorageSync('weichatBrowser');
+			if (!this.bool) {
+				this.payType = 3
+				this.payName = 'yue'
+			}
+			if (options.type == 1) {
+				this.type = 1;
+				this.orderId = options.ordid;
+				this.money = options.money;
+			} else {
+				this.orderKey = options.key;
+				let prepage = this.$api.prePage();
+				computedOrderkey({
+					orderkey: this.orderKey,
+					couponId: prepage.couponChecked.id, //优惠券编号
+					addressId: prepage.addressData.id, //地址编号
+					useIntegral: prepage.checkedPoints ? 1 : 0
+				}).then(({
+					data
+				}) => {
+					// 获取支付金额
+					this.money = data.result.pay_price;
+				});
+			}
+			// 保存pinkid
+			if (options.pinkid) {
+				this.pinkid = options.pinkid;
+			}
+			// 保存是否公排
+			if (options.is_gp) {
+				this.is_gp = options.is_gp;
+			}
+			// 载入余额
+			balance({}).then(({
+				data
+			}) => {
+				// 获取余额
+				this.now_money = data.now_money;
+			});
+			// 载入用户信息
+			this.getUserInfo();
+		},
+		methods: {
+			getUserInfo() {
+				getUserInfo().then(({
+					data
+				}) => {
+					this.gp_now_money = data.gp_now_money
+					this.integral = data.integral
+					console.log(e, '数据');
+				})
+			},
+			//选择支付方式
+			changePayType(type) {
+				this.payType = type;
+				if (this.payType == 1) {
+					this.payName = 'weixin';
+					return
+				}
+				if (this.payType == 2) {
+					this.payName = 'ali';
+					return
+				}
+				if (this.payType == 3) {
+					this.payName = 'yue';
+					return
+				}
+				// 报单金额
+				if (this.payType == 4) {
+					this.payName = 'gp_now_money';
+					return
+				}
+				// 积分
+				if (this.payType == 5) {
+					this.payName = 'integral';
+					return
+				}
+			},
+			// 支付金额
+			orderMoneyPay() {
+				let obj = this;
+				orderPay({
+						uni: obj.orderId,
+						// #ifdef H5
+						from: obj.froms ? 'weixin' : 'H5', //来源
+						// #endif
+						// #ifdef MP-WEIXIN
+						from: 'routine', //来源
+						// #endif
+						// #ifdef APP-PLUS
+						from: 'app', //来源
+						// #endif
+						paytype: obj.payName //支付类型  weixin-微信 yue-余额
+					})
+					.then(e => {
+						// 判断是否为余额支付
+						if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
+							if (e.status == 200) {
+								obj.paySuccessTo();
+							} else {
+								obj.$api.msg(msg);
+							}
+						}
+						if (obj.payName == 'weixin' || obj.payName == 'routine') {
+							let da = e.data.result.jsConfig;
+							let data = {
+								// #ifdef H5
+								timestamp: da.timestamp,
+								// #endif
+								// #ifdef MP
+								timeStamp: da.timestamp,
+								// #endif
+								nonceStr: da.nonceStr,
+								package: da.package,
+								signType: da.signType,
+								paySign: da.paySign,
+								success: function(res) {
+									obj.paySuccessTo();
+								},
+								fail: () => {
+									uni.navigateTo({
+										url: '/pages/order/order?state=0'
+									});
+								}
+							};
+							// #ifdef H5
+							if (obj.payName == 'weixin') {
+								weixinObj.chooseWXPay(data);
+							}
+							// #endif
+							// #ifdef MP-WEIXIN
+							if (obj.payName == 'routine') {
+								wx.requestPayment(data);
+							}
+							// #endif
+						}
+						uni.hideLoading();
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						// 支付完成
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e);
+					});
+			},
+			// 支付成功跳转
+			paySuccessTo() {
+				uni.hideLoading();
+				uni.redirectTo({
+					url: '/pages/money/paySuccess?orderid=' + this.orderId
+				});
+			},
+			//确认支付
+			confirm: async function() {
+				let obj = this;
+				uni.showLoading({
+					title: '支付中',
+					mask: true
+				})
+				// 判断是否余额不足
+				if (obj.payName == 'yue' && +obj.now_money < obj.money) {
+					uni.showModal({
+						title: '提示',
+						content: '账户余额不足!',
+						showCancel: false,
+						success: res => {},
+						fail: () => {},
+						complete: () => {}
+					});
+					return;
+				}
+				// 判断是否报单
+				if (obj.is_gp == 1) {
+					// 判断是否报单金额不足
+					if (obj.payName == 'gp_now_money' && +obj.gp_now_money < obj.money) {
+						uni.showModal({
+							title: '提示',
+							content: '账户余额不足!',
+							showCancel: false,
+							success: res => {},
+							fail: () => {},
+							complete: () => {}
+						});
+						return;
+					}
+					// 判断是否积分不足
+					if (obj.payName == 'integral' && +obj.integral < obj.money) {
+						uni.showModal({
+							title: '提示',
+							content: '账户余额不足!',
+							showCancel: false,
+							success: res => {},
+							fail: () => {},
+							complete: () => {}
+						});
+						return;
+					}
+				}
+
+				// 支付中
+				obj.payLoding = true;
+				// #ifdef H5
+				// 获取当前是否为微信浏览器
+				obj.froms = uni.getStorageSync('weichatBrowser') || '';
+				// #endif
+				// 判断是否为未支付订单中跳转进入
+				if (obj.type != 1) {
+					// 初次生成订单
+					obj.firstCreateOrder();
+				} else {
+					// 已经生成订单未支付
+					obj.orderMoneyPay();
+				}
+			},
+			// 初次订单创建
+			firstCreateOrder() {
+				let obj = this;
+				// 获取下单页面数据
+				let prepage = obj.$api.prePage();
+
+				let data = {
+					real_name: prepage.addressData.real_name, //联系人名称
+					phone: prepage.addressData.phone, //联系人号码
+					couponId: prepage.couponChecked.id, //优惠券编号
+					addressId: prepage.addressData.id, //支付地址id
+					useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
+					payType: obj.payName, //支付类型  weixin-微信 yue-余额
+					mark: prepage.desc, //备注
+					// #ifdef H5
+					from: obj.froms ? 'weixin' : 'H5', //来源
+					// #endif
+					// #ifdef MP-WEIXIN
+					from: 'routine', //来源
+					// #endif
+					// #ifdef APP-PLUS
+					from: 'app', //来源
+					// #endif
+					shipping_type: 1, //提货方式 1 快递 2自提
+					is_gp: obj.is_gp
+				};
+				// 判断是否拼团商品
+				if (obj.pinkid) {
+					data.pinkId = obj.pinkid;
+				}
+				// 生成订单
+				createOrderkey(data, obj.orderKey)
+					.then(({
+						data,
+						status,
+						msg
+					}) => {
+						// 判断是否支付失败
+						if (data.status == 'ORDER_EXIST') {
+							uni.showModal({
+								title: '提示',
+								content: msg,
+								showCancel: false
+							});
+							uni.hideLoading();
+							obj.payLoding = false;
+							return;
+						}
+						// 保存订单号
+						obj.orderId = data.result.orderId;
+						// 判断是否为余额支付
+						if (obj.payName == 'yue' || obj.payName == 'gp_now_money' || obj.payName == 'integral') {
+							if (status == 200 && data.status == 'SUCCESS') {
+								obj.paySuccessTo();
+							} else {
+								obj.$api.msg(msg);
+							}
+						} else {
+							// 立即支付
+							obj.orderMoneyPay();
+						}
+					})
+					.catch(e => {
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.app {
+		width: 100%;
+	}
+
+	.price-box {
+		background-color: #fff;
+		height: 265upx;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		font-size: 28upx;
+		color: #909399;
+
+		.price {
+			font-size: 50upx;
+			color: #303133;
+			margin-top: 12upx;
+
+			&:before {
+				content: '¥';
+				font-size: 40upx;
+			}
+		}
+	}
+
+	.pay-type-list {
+		margin-top: 20upx;
+		background-color: #fff;
+		padding-left: 60upx;
+
+		.type-item {
+			height: 120upx;
+			padding: 20upx 0;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding-right: 60upx;
+			font-size: 30upx;
+			position: relative;
+		}
+
+		.icon {
+			width: 100upx;
+			font-size: 52upx;
+		}
+
+		.iconyue {
+			color: #fe8e2e;
+		}
+
+		.iconweixin {
+			color: #36cb59;
+		}
+	
+	.iconzhifubao {
+			color: #01aaef;
+		}
+
+		.tit {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			margin-bottom: 4upx;
+		}
+
+		.con {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+	}
+
+	.mix-btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 630upx;
+		height: 80upx;
+		margin: 80upx auto 30upx;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		border-radius: 10upx;
+		/* box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4); */
+	}
+
+	.clickbg {
+		background-color: $color-gray !important;
+	}
 </style>

+ 540 - 484
pages/money/recharge.vue

@@ -1,217 +1,164 @@
-<template>
-	<view class="content">
-		<view class="yue">
-			<view class="font">当前余额</view>
-			<view class="money">{{ nowmoney | getMoneyStyle }}</view>
-		</view>
-		<view class="row-box">
-			<view class="title">充值金额</view>
-			<view class="row">
-				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="money" placeholder="请输入充值金额" placeholder-class="placeholder" />
-			</view>
-		</view>
-
-		<view class="list">
-					<radio-group @change="tabRadio">
-						<!-- #ifndef APP-PLUS -->
-						<!-- <label>
-							<view class="box">
-								<view class="icon iconfont iconweixin1"></view>
-								<view class="title-box">
-									<view class="title"><text>微信充值</text></view>
-								</view>
-								<view class="right"><radio value="weixin" color=" #456ffb" :checked="type == 'weixin'" /></view>
-							</view>
-						</label> -->
-						<!-- #endif -->
-						<!-- #ifdef APP-PLUS -->
-						<!-- <label>
-							<view class="box">
-								<view class="icon iconfont iconzhifubao"></view>
-								<view class="title-box">
-									<view class="title"><text>支付宝支付</text></view>
-								</view>
-								<view class="right"><radio value="ali" color=" #456ffb" :checked="type == 'ali'" /></view>
-							</view>
-						</label> -->
-						<!-- #endif -->
-						<label>
-							<view class="box">
-								<view class="icon iconfont"><image class="yongjing" src="http://xmpt.liuniu946.com/img/yongjing.png"></image></view>
-								<view class="title-box">
-									<view class="title"><text>佣金充值</text></view>
-									<view class="node">可用佣金¥{{ yongMoney?yongMoney:0 }}</view>
-								</view>
-								<view class="right"><radio value="yongjing" color=" #456ffb" :checked="type == 'yongjing'" /></view>
-							</view>
-						</label>
-						
-					</radio-group>
-				</view>
-		<button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">确认充值</button>
-	</view>
-</template>
-
-<script>
-import { getMoneyStyle } from '@/utils/rocessor.js';
-// #ifdef H5
-import { rechargeWechat,userBalance,extractBank} from '@/api/wallet.js';
-import weixinObj from "@/plugin/jweixin-module/index.js";
-// #endif
-// #ifdef MP
-import { rechargeRoutine } from '@/api/wallet.js';
-// #endif
-import { mapState } from 'vuex';
-export default {
-	filters: {
-		getMoneyStyle
-	},
-	data() {
-		return {
+<template>
+	<view class="content">
+		<view class="yue">
+			<view class="font">当前余额</view>
+			<view class="money">{{ nowmoney | getMoneyStyle }}</view>
+		</view>
+		<view class="row-box">
+			<view class="title">充值金额</view>
+			<view class="row">
+				<text class="tit">¥</text>
+				<input class="input" type="number" v-model="money" placeholder="请输入充值金额"
+					placeholder-class="placeholder" />
+			</view>
+		</view>
+
+		<view class="list">
+			<radio-group @change="tabRadio">
+				<!-- #ifndef APP-PLUS -->
+				<!-- <label>
+							<view class="box">
+								<view class="icon iconfont iconweixin1"></view>
+								<view class="title-box">
+									<view class="title"><text>微信充值</text></view>
+								</view>
+								<view class="right"><radio value="weixin" color=" #456ffb" :checked="type == 'weixin'" /></view>
+							</view>
+						</label> -->
+				<!-- #endif -->
+				<!-- #ifdef APP-PLUS -->
+				<!-- <label>
+							<view class="box">
+								<view class="icon iconfont iconzhifubao"></view>
+								<view class="title-box">
+									<view class="title"><text>支付宝支付</text></view>
+								</view>
+								<view class="right"><radio value="ali" color=" #456ffb" :checked="type == 'ali'" /></view>
+							</view>
+						</label> -->
+				<!-- #endif -->
+				<label>
+					<view class="box">
+						<view class="icon iconfont">
+							<image class="yongjing" src="http://xmpt.liuniu946.com/img/yongjing.png"></image>
+						</view>
+						<view class="title-box">
+							<view class="title"><text>佣金充值</text></view>
+							<view class="node">可用佣金¥{{ yongMoney?yongMoney:0 }}</view>
+						</view>
+						<view class="right">
+							<radio value="yongjing" color=" #456ffb" :checked="type == 'yongjing'" />
+						</view>
+					</view>
+				</label>
+
+			</radio-group>
+		</view>
+		<button class="add-btn up" :class="{ 'active-bg': payLoding }"
+			@click="!payLoding ? confirm() : ''">确认充值</button>
+	</view>
+</template>
+
+<script>
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import {
+		userBalance,
+		extractBank,
+		rechargeWechat
+	} from '@/api/wallet.js';
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
+	// #ifdef MP
+	import {
+		rechargeRoutine
+	} from '@/api/wallet.js';
+	// #endif
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		data() {
+			return {
+				// #ifdef H5
+				type: 'yongjing',
+				// #endif
+				// #ifndef  H5
+				type: 'weixin',
+				// #endif
+				money: '', //充值金额
+				payLoding: false, //是否加载中
+				yongMoney: '',
+				nowmoney: '',
+				typeText: 1 //默认支付方式
+
+
+			};
+		},
+		watch: {
+			type(newValue, oldValue) {
+				console.log(newValue);
+				console.log(oldValue);
+			}
+		},
+		onShow() {
+			this.yongMoney = ''
+			userBalance({}).then(({
+				data
+			}) => {
+				console.log(data);
+				this.nowmoney = data.now_money;
+			});
+			extractBank({}).then(({
+				data
+			}) => {
+				this.yongMoney = (data.commissionCount * 1).toFixed(2); //累积佣金
+				console.log(data, 'wwwww');
+				this.disable = true
+			});
+		},
+		onLoad(options) {},
+		computed: {
 			// #ifdef H5
-			type: 'yongjing',
+			...mapState(['weichatObj'])
 			// #endif
-			// #ifndef  H5
-			type: 'weixin',
-			// #endif
-			money: '', //充值金额
-			payLoding: false ,//是否加载中
-			yongMoney:'',
-			nowmoney:'',
-			typeText:1//默认支付方式
-			
-			
-		};
-	},
-	watch: {
-		type(newValue, oldValue) {
-			console.log(newValue);
-			console.log(oldValue);
-		}
-	},
-	onShow() {
-		this.yongMoney = ''
-		userBalance({}).then(({ data }) => {
-			console.log(data);
-			this.nowmoney = data.now_money;
-		});
-		extractBank({}).then(({ data }) => {
-			this.yongMoney = (data.commissionCount * 1).toFixed(2); //累积佣金
-			console.log(data,'wwwww');
-			this.disable= true
-		});
-	},
-	onLoad(options) {},
-	computed: {
-		// #ifdef H5
-		...mapState(['weichatObj'])
-		// #endif
-	},
-	methods: {
-		// 跳转
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			});
-		},
-	// 切换选中对象
-	tabRadio(e) {
-		console.log(e,'选中');
-		if (e.detail.value == 'weixin') {
-			this.typeText = 0;
-		}
-		if (e.detail.value == 'yongjing') {
-			this.typeText = 1;
-		}
-		// if (e.detail.value == 'ali') {
-		// 	this.typeText = 2;
-		// }
-		// #ifdef APP-PLUS
-		this.type = e.target.value
-		// #endif
-		// #ifndef APP-PLUS
-		this.type = e.detail.value;
-		// #endif
-		console.log(this.typeText);
-	},
-		// 提交
-		// confirm() {
-		// 	let obj = this;
-		// 	obj.payLoding = true;
-		// 	// #ifdef H5
-		// 	rechargeWechat({ price: this.money, from: this.type })
-		// 		.then(e => {
-		// 			let da = e.data.data;
-		// 			obj.weichatObj.chooseWXPay({
-		// 				timestamp: da.timestamp,
-		// 				nonceStr: da.nonceStr,
-		// 				package: da.package,
-		// 				signType: da.signType,
-		// 				paySign: da.paySign,
-		// 				success: function(res) {
-		// 					uni.showToast({
-		// 						title: '充值成功',
-		// 						duration: 2000,
-		// 						position: 'top'
-		// 					});
-		// 				}
-		// 			});
-		// 			obj.payLoding = false;
-		// 		})
-		// 		.catch(e => {
-		// 			obj.payLoding = false;
-		// 			console.log(e);
-		// 		});
-		// 	// #endif
-		// 	// #ifdef MP
-		// 	rechargeRoutine({ price: this.money})
-		// 		.then(e => {
-		// 			let da = e.data;
-		// 				wx.requestPayment({
-		// 						timeStamp: da.timestamp,
-		// 						nonceStr: da.nonceStr,
-		// 						package: da.package,
-		// 						signType: da.signType,
-		// 						paySign: da.paySign,
-		// 						success: function(res) {
-		// 							uni.redirectTo({
-		// 								url: '/pages/money/paySuccess'
-		// 							});
-		// 						},
-								
-		// 					})
-					
-		// 			obj.payLoding = false;
-		// 		})
-		// 		.catch(e => {
-		// 			obj.payLoding = false;
-		// 			console.log(e);
-		// 		});
-		// 	// #endif
-		// },
-		confirm() {
-			console.log('开始充值');
-			let obj = this;
-			if(obj.payLoding) {
-				return;
-			}
-			if (obj.money == '') {
-				obj.$api.msg('请输入充值金额');
-				obj.payLoding = false;
-				return;
-			}
-			if (obj.typeText == null) {
-				obj.$api.msg('请选择充值方式');
-				obj.payLoding = false;
-				return;
-			}
-			if (obj.type == 'yongjing' && obj.money > parseInt(obj.yongMoney)) {
-				obj.$api.msg('佣金不足');
-				obj.payLoding = false;
-				return;
-			}
-			obj.payLoding = true
+		},
+		methods: {
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				console.log(e, '选中');
+				if (e.detail.value == 'weixin') {
+					this.typeText = 0;
+				}
+				if (e.detail.value == 'yongjing') {
+					this.typeText = 1;
+				}
+				// if (e.detail.value == 'ali') {
+				// 	this.typeText = 2;
+				// }
+				// #ifdef APP-PLUS
+				this.type = e.target.value
+				// #endif
+				// #ifndef APP-PLUS
+				this.type = e.detail.value;
+				// #endif
+				console.log(this.typeText);
+			},
+			// 提交
+			// confirm() {
+			// 	let obj = this;
+			// 	obj.payLoding = true;
 			// 	// #ifdef H5
 			// 	rechargeWechat({ price: this.money, from: this.type })
 			// 		.then(e => {
@@ -252,284 +199,393 @@ export default {
 			// 								url: '/pages/money/paySuccess'
 			// 							});
 			// 						},
-									
+
 			// 					})
-						
+
 			// 			obj.payLoding = false;
 			// 		})
 			// 		.catch(e => {
 			// 			obj.payLoding = false;
 			// 			console.log(e);
 			// 		});
-			// 	// #endif
-			// #ifdef APP-PLUS
-			const pushDate = { price: this.money, from:this.typeText==1?'yongjing':'ali', type: this.typeText  }
-			console.log(pushDate,'徐浩岚');
-			rechargeWechat(pushDate)
-				.then(e => {
-					console.log(e,'返回数据');
-					let da = e.data;
-					// obj.money = '';
-					// obj.yongMoney = ''
-					console.log(obj.type,'ali');
-					if (obj.type == 'yongjing') {
-						const url = e.data.data;
-						console.log(url,'url');
-						uni.requestPayment({
-							provider: 'alipay',
-							orderInfo: url,
-							success: res => {
-								console.log(res,'22222323232');
-								uni.showToast({
-									title: '充值成功',
-									duration: 2000,
+			// 	// #endif
+			// },
+			confirm() {
+				console.log('开始充值');
+				let obj = this;
+				if (obj.payLoding) {
+					return;
+				}
+				if (obj.money == '') {
+					obj.$api.msg('请输入充值金额');
+					obj.payLoding = false;
+					return;
+				}
+				if (obj.typeText == null) {
+					obj.$api.msg('请选择充值方式');
+					obj.payLoding = false;
+					return;
+				}
+				if (obj.type == 'yongjing' && obj.money > parseInt(obj.yongMoney)) {
+					obj.$api.msg('佣金不足');
+					obj.payLoding = false;
+					return;
+				}
+				obj.payLoding = true
+				// 	// #ifdef H5
+				// 	rechargeWechat({ price: this.money, from: this.type })
+				// 		.then(e => {
+				// 			let da = e.data.data;
+				// 			obj.weichatObj.chooseWXPay({
+				// 				timestamp: da.timestamp,
+				// 				nonceStr: da.nonceStr,
+				// 				package: da.package,
+				// 				signType: da.signType,
+				// 				paySign: da.paySign,
+				// 				success: function(res) {
+				// 					uni.showToast({
+				// 						title: '充值成功',
+				// 						duration: 2000,
+				// 						position: 'top'
+				// 					});
+				// 				}
+				// 			});
+				// 			obj.payLoding = false;
+				// 		})
+				// 		.catch(e => {
+				// 			obj.payLoding = false;
+				// 			console.log(e);
+				// 		});
+				// 	// #endif
+				// 	// #ifdef MP
+				// 	rechargeRoutine({ price: this.money})
+				// 		.then(e => {
+				// 			let da = e.data;
+				// 				wx.requestPayment({
+				// 						timeStamp: da.timestamp,
+				// 						nonceStr: da.nonceStr,
+				// 						package: da.package,
+				// 						signType: da.signType,
+				// 						paySign: da.paySign,
+				// 						success: function(res) {
+				// 							uni.redirectTo({
+				// 								url: '/pages/money/paySuccess'
+				// 							});
+				// 						},
+
+				// 					})
+
+				// 			obj.payLoding = false;
+				// 		})
+				// 		.catch(e => {
+				// 			obj.payLoding = false;
+				// 			console.log(e);
+				// 		});
+				// 	// #endif
+				// #ifdef APP-PLUS
+				const pushDate = {
+					price: this.money,
+					from: this.typeText == 1 ? 'yongjing' : 'ali',
+					type: this.typeText
+				}
+				console.log(pushDate, '徐浩岚', rechargeWechat);
+				console.log(obj.type, 'type')
+				rechargeWechat(pushDate)
+					.then(e => {
+						console.log(e, '返回数据');
+						// let da = e.data;
+						// obj.money = '';
+						// obj.yongMoney = ''
+						console.log(obj.type, 'ali');
+
+						if (obj.type == 'yongjing') {
+							// const url = e.data.data;
+							// console.log(url,'url');
+
+							uni.showToast({
+								title: '充值成功',
+								duration: 2000,
+							});
+							obj.yongMoney = ''
+							userBalance({}).then(({
+								data
+							}) => {
+								console.log(data);
+								obj.nowmoney = data.now_money;
+							});
+							extractBank({}).then(({
+								data
+							}) => {
+								obj.yongMoney = (data.commissionCount * 1).toFixed(2); //累积佣金
+								console.log(data, 'wwwww');
+								obj.disable = true
+								obj.payLoding = false;
+							});
+
+						}
+						// if (obj.type == 'yongjing') {
+						// 	uni.navigateTo({
+						// 		url: '/pages/money/rechargeSuccess'
+						// 	});
+						// 	obj.payLoding = false;
+						// 	console.log(e, '佣金');
+						// }
+					})
+					.catch(e => {
+						obj.money = '';
+						obj.payLoding = false;
+						console.log(e);
+					});
+				// #endif
+				// #ifdef H5
+				// rechargeWechat({ price: this.money, from: this.type })
+				const pushDate = {
+					price: this.money,
+					from: 'weixin',
+					type: this.typeText
+				};
+				rechargeWechat(pushDate)
+					.then(e => {
+						console.log(e);
+						if (obj.type == 'weixin') {
+							let da = e.data.data;
+							console.log(weixinObj, 'weixin');
+							weixinObj.chooseWXPay({
+								timestamp: da.timestamp,
+								nonceStr: da.nonceStr,
+								package: da.package,
+								signType: da.signType,
+								paySign: da.paySign,
+								success: function(res) {
+									uni.showToast({
+										title: '充值成功',
+										duration: 2000,
+										position: 'top'
+									});
+								}
+							});
+							obj.payLoding = false;
+						}
+						console.log(obj.type, '当前', obj.type == 'yongjing');
+						if (obj.type == 'yongjing') {
+							obj.yongMoney = ''
+							uni.navigateTo({
+								url: './paySuccess',
+
+								fail(e) {
+									console.log(e, '错误');
+								}
+							});
+							obj.payLoding = false;
+							console.log(e, '佣金');
+						}
+					})
+					.catch(e => {
+						obj.payLoding = false;
+						console.log(e);
+					});
+				// #endif
+				// #ifdef MP
+				rechargeRoutine({
+						price: this.money
+					})
+					.then(e => {
+						let da = e.data;
+						wx.requestPayment({
+							timeStamp: da.timestamp,
+							nonceStr: da.nonceStr,
+							package: da.package,
+							signType: da.signType,
+							paySign: da.paySign,
+							success: function(res) {
+								obj.yongMoney = ''
+								uni.redirectTo({
+									url: '/pages/money/paySuccess'
 								});
-								uni.navigateTo({
-									url:'./paySuccess'
-								})
-							},
-							fail: e => {
-								console.log(e);
-							},
-							complete: () => {}
-						});
-						obj.payLoding = false;
-					}
-					if (obj.type == 'yongjing') {
-						uni.navigateTo({
-							url: '/pages/money/rechargeSuccess'
-						});
-						obj.payLoding = false;
-						console.log(e, '佣金');
-					}
-				})
-				.catch(e => {
-					obj.money = '';
-					obj.payLoding = false;
-					console.log(e);
-				});
-			// #endif
-			// #ifdef H5
-			// rechargeWechat({ price: this.money, from: this.type })
-			const pushDate = { price: this.money, from: 'weixin', type: this.typeText };
-			rechargeWechat(pushDate)
-				.then(e => {
-					console.log(e);
-					if (obj.type == 'weixin') {
-						let da = e.data.data;
-						console.log(weixinObj, 'weixin');
-						weixinObj.chooseWXPay({
-							timestamp: da.timestamp,
-							nonceStr: da.nonceStr,
-							package: da.package,
-							signType: da.signType,
-							paySign: da.paySign,
-							success: function(res) {
-								uni.showToast({
-									title: '充值成功',
-									duration: 2000,
-									position: 'top'
-								});
-							}
-						});
-						obj.payLoding = false;
-					}
-					console.log(obj.type,'当前',obj.type == 'yongjing');
-					if (obj.type == 'yongjing') {
-						obj.yongMoney = ''
-						uni.navigateTo({
-							url: './paySuccess',
-							
-							fail(e) {
-								console.log(e,'错误');
-							}
-						});
-						obj.payLoding = false;
-						console.log(e, '佣金');
-					}
-				})
-				.catch(e => {
-					obj.payLoding = false;
-					console.log(e);
-				});
-			// #endif
-			// #ifdef MP
-			rechargeRoutine({ price: this.money })
-				.then(e => {
-					let da = e.data;
-					wx.requestPayment({
-						timeStamp: da.timestamp,
-						nonceStr: da.nonceStr,
-						package: da.package,
-						signType: da.signType,
-						paySign: da.paySign,
-						success: function(res) {
-							obj.yongMoney = ''
-							uni.redirectTo({
-								url: '/pages/money/paySuccess'
-							});
-						}
-					});
-		
-					obj.payLoding = false;
-				})
-				.catch(e => {
-					obj.payLoding = false;
-					console.log(e);
-				});
-			// #endif
-		},
-		//获取订单列表
-		loadData(source) {
-			console.log(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;
-			}
-			navItem.loadingType = 'loading';
-			setTimeout(() => {
-				let orderList = [];
-				orderList.forEach(item => {
-					navItem.orderList.push(item);
-				});
-				//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-				this.$set(navItem, 'loaded', true);
-				//判断是否还有数据, 有改为 more, 没有改为noMore
-				navItem.loadingType = 'more';
-			}, 600);
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	height: 100%;
-}
-.yue {
-	display: flex;
-	justify-content: space-between;
-	padding: 30rpx 48rpx 30rpx 26rpx;
-	background: #ffffff;
-	.font {
-		font-size: 28rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #333333;
-	}
-	.money {
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #ef041f;
-	}
-}
-.add-btn {
-	&.modified {
-		color: $base-color;
-	}
-	&.up {
-		background-color: $base-color;
-		color: #fff;
-	}
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 0 auto;
-	margin-top: 30rpx;
-	font-size: $font-lg;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
-.row-box {
-	margin-top: 30rpx;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	.title {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
-	}
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		height: 80rpx;
-		.tit {
-			flex-shrink: 0;
-			width: 40rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
-		.input {
-			flex: 1;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
-		.iconlocation {
-			font-size: 36rpx;
-			color: $font-color-light;
-		}
-
-		.buttom {
-			color: $font-color;
-			font-size: $font-base;
-		}
-	}
-}
-.list {
-	padding-left: 30rpx;
-	margin-top: 30rpx;
-	background-color: #ffffff;
-	.box {
-		display: flex;
-		align-items: center;
-		width: 100%;
-		height: 120rpx;
-		border-bottom: 1px solid $border-color-light;
-		.icon {
-			font-size: 48rpx;
-			padding-right: 20rpx;
-		}
-		.yongjing {
-			width: 48rpx;
-			height: 48rpx;
-		}
-		.iconweixin1 {
-			color: #18bf16;
-		}
-		.iconzhifubao {
-			color: #08aaec;
-		}
-		.title-box {
-			flex-grow: 1;
-			text-align: left;
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-base;
-			}
-			.node {
-				font-size: $font-sm;
-				color: $font-color-light;
-			}
-		}
-	}
-}
-/deep/ .uni-radio-input {
-	width: 45rpx;
-	height: 45rpx;
-}
-
-.active-bg {
-	background-color: $color-gray !important;
-}
+							}
+						});
+
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						obj.payLoding = false;
+						console.log(e);
+					});
+				// #endif
+			},
+			//获取订单列表
+			loadData(source) {
+				console.log(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;
+				}
+				navItem.loadingType = 'loading';
+				setTimeout(() => {
+					let orderList = [];
+					orderList.forEach(item => {
+						navItem.orderList.push(item);
+					});
+					//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
+					this.$set(navItem, 'loaded', true);
+					//判断是否还有数据, 有改为 more, 没有改为noMore
+					navItem.loadingType = 'more';
+				}, 600);
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.yue {
+		display: flex;
+		justify-content: space-between;
+		padding: 30rpx 48rpx 30rpx 26rpx;
+		background: #ffffff;
+
+		.font {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+
+		.money {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ef041f;
+		}
+	}
+
+	.add-btn {
+		&.modified {
+			color: $base-color;
+		}
+
+		&.up {
+			background-color: $base-color;
+			color: #fff;
+		}
+
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
+
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
+
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
+				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: $font-color;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+	
+	.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+			}
+
+			.yongjing {
+				width: 48rpx;
+				height: 48rpx;
+			}
+
+			.iconweixin1 {
+				color: #18bf16;
+			}
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
+	}
+
+	.active-bg {
+		background-color: $color-gray !important;
+	}
 </style>

+ 1 - 1
pages/public/login.vue

@@ -15,7 +15,7 @@
 			</view>
 			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">登录</button></view>
 			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true" hover-class="none" @click="register">注册</button></view>
-			<navigator url="./forget"><view class="forget">忘记密码</view></navigator>
+			<navigator url="../set/password"><view class="forget">忘记密码</view></navigator>
 			<!-- <view class="flex other">
 				<view class="fenge"></view>
 				<view class="qita">其他方式登录</view>

+ 442 - 450
pages/user/extension.vue

@@ -1,4 +1,4 @@
- <template>
+<template>
  	<view class="content">
  		<view class="content-money">
  			<view class="money-box">
@@ -7,95 +7,48 @@
  				</view> -->
  				<!-- <view class="header">我的推广</view> -->
  				<image class="tuiguang_bg" src="../../static/img/tgbg.png"></image>
- 			 <!--  <view class="money_img"><image :src="list.avatar || img"></image></view> -->
- 			 <view class="money-frame">
- 				 <!-- <view class="money_name">我的推广</view> -->
- 				 <view class="money_num">
- 					{{userInfo.spread_count || '0'}}
- 					<text class="money_ren">人</text>
+ 				<!--  <view class="money_img"><image :src="list.avatar || img"></image></view> -->
+ 				<view class="money-frame">
+ 					<!-- <view class="money_name">我的推广</view> -->
+ 					<view class="money_num">
+ 						{{total || 0}}
+ 						<text class="money_ren">人</text>
+ 					</view>
  				</view>
- 			 </view>
  			</view>
  			<view class="flex buttom-box">
- 				<view class="buttom"  @click="tabClick(0)">
- 					<view class="money">{{total || 0}}</view>
+ 				<view class="buttom" @click="tabClick(0)">
+ 					<!-- <view class="money">{{total || 0}}</view> -->
  					<text class="text" :class="{ current: tabCurrentIndex === 0 }">一级推广</text>
  				</view>
- 				<view class="buttom"  @click="tabClick(1)">
+ 				<!-- <view class="buttom"  @click="tabClick(1)">
  					<view class="money">{{totalLevel || 0}}</view>
  					<text class="text" :class="{ current: tabCurrentIndex === 1 }">二级推广</text>
- 				</view>
+ 				</view> -->
  			</view>
  		</view>
- 		<swiper :current="tabCurrentIndex" :style="{ height: maxheight + 'px' }" class="swiper-box" duration="300" @change="changeTab">
+ 		<swiper :current="tabCurrentIndex" :style="{ height: maxheight + 'px' }" class="swiper-box" duration="300"
+ 			@change="changeTab">
  			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<!-- <view class="tg-wrapper">
-					<view class="tg-box">
-						<view class="tg-item">
-							<view class="tg-tit">
-								会员
-							</view>
-							<view class="tg-val">
-								10人
-							</view>
-						</view>
-						<view class="tg-jg"></view>
-						<view class="tg-item">
-							<view class="tg-tit">
-								店长
-							</view>
-							<view class="tg-val">
-								10人
-							</view>
-						</view>
-						<view class="tg-jg"></view>
-						<view class="tg-item">
-							<view class="tg-tit">
-								代理
-							</view>
-							<view class="tg-val">
-								10人
-							</view>
-						</view>
-					</view>
-				</view> -->
  				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
  					<!-- 空白页 -->
  					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
- 
  					<!-- 订单列表 -->
  					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
  						<view class="title-box flex_item">
- 							<view class="title-avatar"><image :src="item.avatar||'/static/error/missing-face.png'"></image></view>
+ 							<view class="title-avatar">
+ 								<image src="../../static/error/logo.png" mode=""></image>
+ 							</view>
  							<view class="list_tpl">
  								<view class="title flex">
  									<text>{{ item.nickname }}{{item.level}}</text>
-									<view class="itemVip lv1" v-if="item.level == 1">
-										会员
-									</view>
-									<view class="itemVip lv2" v-if="item.level == 2">
-										村代
-									</view>
-									<view class="itemVip lv3" v-if="item.level == 3">
-										镇代
-									</view>
-									<view class="itemVip lv4" v-if="item.level == 4">
-										区代
-									</view>
-									<view class="itemVip lv5" v-if="item.level == 5">
-										市代
-									</view>
-									<view class="itemVip lv6" v-if="item.level == 6">
-										省代
-									</view>
-									<!-- <image src="../../static/img/lv01.png" mode="" v-if="item.level == 1"></image>
-									<image src="../../static/img/lv02.png" mode="" v-if="item.level == 2"></image>
-									<image src="../../static/img/lv03.png" mode="" v-if="item.level == 3"></image>
-									<image src="../../static/img/lv04.png" mode="" v-if="item.level == 4"></image> -->
  								</view>
  								<view class="time">
  									<text>{{ item.time }}</text>
  								</view>
+								<view class="time">
+									<text>手机号:{{item.phone}}</text>
+								</view>
  							</view>
  						</view>
  					</view>
@@ -106,420 +59,459 @@
  	</view>
  </template>
  <script>
- import { getExtensionData,getUserInfo ,getSpreadPeople} from '@/api/user.js';
- import { mapState, mapMutations } from 'vuex';
- import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
- import empty from '@/components/empty';
- export default {
- 	components: {
- 		empty,
- 		uniLoadMore,
- 	},
- 	onReady() {
- 		// 初始化获取页面宽度
- 		uni.createSelectorQuery()
- 			.select('.content')
- 			.fields(
- 				{
- 					size: true
- 				},
- 				data => {
- 					// console.log(data);
- 					// console.log(Math.floor((data.width / 750) * 300));
- 					// 保存头部高度
- 					this.maxheight = data.height - Math.floor((data.width / 750) * 470) - 44;
- 					// console.log(this.maxheight);
- 				}
- 			)
- 			.exec();
- 	},
- 	data() {
- 		return {
- 			// 头部图高度
- 			maxheight: '',
- 			tabCurrentIndex: 0,
- 			navList: [
- 				{
+ 	import {
+ 		getExtensionData,
+ 		getUserInfo,
+ 		getSpreadPeople
+ 	} from '@/api/user.js';
+ 	import {
+ 		mapState,
+ 		mapMutations
+ 	} from 'vuex';
+ 	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+ 	import empty from '@/components/empty';
+ 	export default {
+ 		components: {
+ 			empty,
+ 			uniLoadMore,
+ 		},
+ 		onReady() {
+ 			// 初始化获取页面宽度
+ 			uni.createSelectorQuery()
+ 				.select('.content')
+ 				.fields({
+ 						size: true
+ 					},
+ 					data => {
+ 						// console.log(data);
+ 						// console.log(Math.floor((data.width / 750) * 300));
+ 						// 保存头部高度
+ 						this.maxheight = data.height - Math.floor((data.width / 750) * 470) - 44;
+ 						// console.log(this.maxheight);
+ 					}
+ 				)
+ 				.exec();
+ 		},
+ 		data() {
+ 			return {
+ 				// 头部图高度
+ 				maxheight: '',
+ 				tabCurrentIndex: 0,
+ 				navList: [{
  					state: 0,
  					text: '一级推广',
  					loadingType: 'more',
  					orderList: [],
  					page: 1, //当前页数
  					limit: 10 //每次信息条数
- 				},
- 				{
- 					state: 1,
- 					text: '二级推广',
- 					loadingType: 'more',
- 					orderList: [],
- 					page: 1, //当前页数
- 					limit: 10 //每次信息条数
- 				}
- 			],
- 			all:'',
- 			list:'',
- 			total:'',
- 			totalLevel:'',
- 			img:'http://kaifa.crmeb.net/uploads/attach/2019/08/20190807/723adbdd4e49a0f9394dfc700ab5dba3.png',
-			userInfo: {}
- 		};
- 	},
- 	onLoad(options) {},
- 	onShow() {
- 		this.loadData();
-		this.loadAll()
- 	},
- 	methods: {
- 		// 页面跳转
- 		navto(e) {
- 			uni.navigateTo({
- 				url: e
- 			});
+ 				}],
+ 				all: '',
+ 				list: '',
+ 				total: '',
+ 				totalLevel: '',
+ 				img: 'http://kaifa.crmeb.net/uploads/attach/2019/08/20190807/723adbdd4e49a0f9394dfc700ab5dba3.png',
+ 				userInfo: {}
+ 			};
  		},
- 		//获取推广人数信息
- 		async 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';
- 			getSpreadPeople(
- 				{
- 					page: navItem.page,
- 					limit: navItem.limit,
- 					keyword:'',
-					// sort: 'ASC/DESC',
-					// level: index,
- 					// sort:'uid desc'
-					// sort: 'pay_price ASC'
- 					grade:state
- 				},
- 			)
- 				.then(({ data }) => {
- 					console.log(data);
- 					
- 					this.total = data.total;
- 					this.totalLevel =data.totalLevel;
- 					// this.all = this.total + this.totalLevel;
- 					if (data.list.length > 0) {
- 						this.list = data.list
-						const D = data.list.map((e) => {
- 							e.level = +e.level;
-							return e;
- 						})
- 						navItem.orderList = navItem.orderList.concat(D);
- 						navItem.page++;
- 					}
- 					this.$nextTick(function(){
- 						if (navItem.limit == data.list.length) {
- 							//判断是否还有数据, 有改为 more, 没有改为noMore
- 							navItem.loadingType = 'more';
- 							return;
- 						} else {
- 							//判断是否还有数据, 有改为 more, 没有改为noMore
- 							navItem.loadingType = 'noMore';
+ 		onLoad(options) {},
+ 		onShow() {
+ 			this.loadData();
+ 			this.loadAll()
+ 		},
+ 		methods: {
+ 			// 页面跳转
+ 			navto(e) {
+ 				uni.navigateTo({
+ 					url: e
+ 				});
+ 			},
+ 			//获取推广人数信息
+ 			async 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';
+ 				getSpreadPeople({
+ 						page: navItem.page,
+ 						limit: navItem.limit,
+ 						keyword: '',
+ 						// sort: 'ASC/DESC',
+ 						// level: index,
+ 						// sort:'uid desc'
+ 						// sort: 'pay_price ASC'
+ 						grade: state
+ 					}, )
+ 					.then(({
+ 						data
+ 					}) => {
+ 						console.log(data);
+
+ 						this.total = data.total;
+ 						this.totalLevel = data.totalLevel;
+ 						// this.all = this.total + this.totalLevel;
+ 						if (data.list.length > 0) {
+ 							this.list = data.list
+ 							const D = data.list.map((e) => {
+ 								e.level = +e.level;
+ 								return e;
+ 							})
+ 							navItem.orderList = navItem.orderList.concat(D);
+ 							navItem.page++;
  						}
+ 						this.$nextTick(function() {
+ 							if (navItem.limit == data.list.length) {
+ 								//判断是否还有数据, 有改为 more, 没有改为noMore
+ 								navItem.loadingType = 'more';
+ 								return;
+ 							} else {
+ 								//判断是否还有数据, 有改为 more, 没有改为noMore
+ 								navItem.loadingType = 'noMore';
+ 							}
+ 						})
+ 						this.$set(navItem, 'loaded', true);
  					})
- 					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;
+ 			},
+ 			// 点击返回 我的页面
+ 			toBack() {
+ 				uni.switchTab({
+ 					url: '/pages/user/user'
  				})
- 				.catch(e => {
- 					console.log(e);
+ 			},
+ 			loadAll() {
+ 				getUserInfo().then(res => {
+ 					this.userInfo = res.data
+ 					console.log(res, '6666666666666666666')
  				});
- 		},
- 		//swiper 切换
- 		changeTab(e) {
- 			this.tabCurrentIndex = e.target.current;
- 			this.loadData('tabChange');
- 		},
- 		//顶部tab点击
- 		tabClick(index) {
- 			this.tabCurrentIndex = index;
- 		},
- 		// 点击返回 我的页面
- 		toBack(){
- 			uni.switchTab({
- 				url:'/pages/user/user'
- 			})
- 		},
-		loadAll(){
-			getUserInfo().then(res => {
-				this.userInfo = res.data
-				console.log(res,'6666666666666666666')
-			});
-		}
- 	}
- };
- </script>
- 
- <style lang="scss">
- page {
- 	background: #ffffff;
- 	height: 100%;
- }
- .itemVip{
-	 font-size: 24rpx;
-	 line-height: 1;
-	 color: #FFFFFF;
-	 border-radius: 99rpx;
-	 padding:10rpx 20rpx;
-	 margin-left: 10rpx;
- }
- .lv1{
-	 background-image: linear-gradient(to right,#a9a9a9,#a9a9a9);
- }
- .lv2{
-	 background-image: linear-gradient(to right,#ffc107,#ffc107);
- }
- .lv3{
-	background-image: linear-gradient(to right,#e51c23,#e51c23);
- }
- .lv4{
-	background-image: linear-gradient(to right,#000000,#000000);
- }
- .lv5{
-	background-image: linear-gradient(to right,#000000,#000000);
- }
- .lv6{
-	 background-image: linear-gradient(to right,#000000,#000000);
- }
- .content-money {
- 	// padding-bottom: 30rpx;
- 	background: $page-color-base;
- 	.buttom-box {
- 		position: relative;
- 		background-color: #ffffff;
- 		text-align: center;
- 		padding: 30rpx 0;
- 		.buttom {
- 			flex-grow: 1;
- 		}
- 		.money{
- 			
- 			font-size: 32rpx;
- 			font-weight: bold;
- 			color: #921a23;
- 		}
- 		.text {
- 			padding-bottom: 26rpx;
- 			font-size: 28rpx;
- 			font-weight: 500;
- 			color: #666666;
- 			&.current {
- 				border-bottom: 2px solid #921a23;
- 			}
- 		}
- 		.icon {
- 			height: 50rpx;
- 			width: 48rpx;
- 			margin: 0 auto;
- 			.icon-img {
- 				width: 100%;
- 				height: 100%;
  			}
  		}
+ 	};
+ </script>
+
+ <style lang="scss">
+ 	page {
+ 		background: #ffffff;
+ 		height: 100%;
  	}
- }
- .money-box {
- 	// background: $base-color;
- 	height: 380rpx;
- 	color: #FF4C4C;
- 	text-align: center;
- 	font-size: 35rpx;
- 	position: relative;
- 	// padding-top: 60rpx;
- 	.header{
- 		position: absolute;
- 		left: 0;
- 		top: 0;
- 		width: 100%;
- 		height: 80rpx;
- 		font-size: 36rpx;
- 		font-weight: bold;
- 		z-index: 99;
- 		display: flex;
- 		justify-content: center;
- 		align-items: center;
+
+ 	.itemVip {
+ 		font-size: 24rpx;
+ 		line-height: 1;
+ 		color: #FFFFFF;
+ 		border-radius: 99rpx;
+ 		padding: 10rpx 20rpx;
+ 		margin-left: 10rpx;
  	}
- 	.goback-box{
- 		position: absolute;
- 		left: 29rpx;
- 		top: 0;
- 		height: 80rpx;
- 		display: flex;
- 		align-items: center;
+
+ 	.lv1 {
+ 		background-image: linear-gradient(to right, #a9a9a9, #a9a9a9);
  	}
- 	.goback{
- 		z-index: 100;
- 		width: 34rpx;
- 		height: 34rpx;
+
+ 	.lv2 {
+ 		background-image: linear-gradient(to right, #ffc107, #ffc107);
  	}
- 	.tuiguang_bg {
- 		width: 100%;
- 		height: 400rpx;
- 		position: relative;
+
+ 	.lv3 {
+ 		background-image: linear-gradient(to right, #e51c23, #e51c23);
  	}
- 	.money_img{
- 		width: 100%;
- 		height: 120rpx;
- 		text-align: center;
- 		padding-top: 50rpx;
- 		padding-bottom: 135rpx;
- 		image{
- 			width:120rpx;
- 			height: 120rpx;
- 			border: 4rpx solid #FD5F6F;
- 			border-radius: 50%;
- 		}
+
+ 	.lv4 {
+ 		background-image: linear-gradient(to right, #000000, #000000);
  	}
- 	.money-frame {
- 		position: absolute;
- 		top: 0;
- 		width: 100%;
- 		padding-top: 120rpx;
- 		// left: 30rpx;
- 		// height: 460rpx;
- 		// display: flex;
- 		// align-items: flex-start;
- 		// flex-direction: column;
- 		// justify-content: center;
+
+ 	.lv5 {
+ 		background-image: linear-gradient(to right, #000000, #000000);
  	}
- 	.money_name{
- 		width: 100%;
- 		text-align: center;
- 		font-size: 32rpx;
- 		font-family: PingFang SC;
- 		font-weight: bold;
- 		color: #FFFFFF;
- 		
+
+ 	.lv6 {
+ 		background-image: linear-gradient(to right, #000000, #000000);
  	}
- 	.money_num {
-		padding-top: 50rpx;
- 		font-size: 72rpx;
- 		font-family: PingFang SC;
- 		font-weight: bold;
+
+ 	.content-money {
+ 		// padding-bottom: 30rpx;
+ 		background: $page-color-base;
+
+ 		.buttom-box {
+ 			position: relative;
+ 			background-color: #ffffff;
+ 			text-align: center;
+ 			padding: 30rpx 0;
+
+ 			.buttom {
+ 				flex-grow: 1;
+ 			}
+
+ 			.money {
+
+ 				font-size: 32rpx;
+ 				font-weight: bold;
+ 				color: #921a23;
+ 			}
+
+ 			.text {
+ 				padding-bottom: 26rpx;
+ 				font-size: 28rpx;
+ 				font-weight: 500;
+ 				color: #666666;
+
+ 				&.current {
+ 					border-bottom: 2px solid #921a23;
+ 				}
+ 			}
+
+ 			.icon {
+ 				height: 50rpx;
+ 				width: 48rpx;
+ 				margin: 0 auto;
+
+ 				.icon-img {
+ 					width: 100%;
+ 					height: 100%;
+ 				}
+ 			}
+ 		}
+ 	}
+
+ 	.money-box {
+ 		// background: $base-color;
+ 		height: 380rpx;
  		color: #FF4C4C;
- 		.money_ren {
+ 		text-align: center;
+ 		font-size: 35rpx;
+ 		position: relative;
+
+ 		// padding-top: 60rpx;
+ 		.header {
+ 			position: absolute;
+ 			left: 0;
+ 			top: 0;
+ 			width: 100%;
+ 			height: 80rpx;
  			font-size: 36rpx;
+ 			font-weight: bold;
+ 			z-index: 99;
+ 			display: flex;
+ 			justify-content: center;
+ 			align-items: center;
  		}
- 	}
- }
- 
- // 列表
- 
- .swiper-box {
- 	// padding-top: 10rpx;
- 	.order-item {
- 		padding: 20rpx 30rpx;
-		padding-bottom: 0;
- 		line-height: 1.5;
- 		.title-box {
+
+ 		.goback-box {
+ 			position: absolute;
+ 			left: 29rpx;
+ 			top: 0;
+ 			height: 80rpx;
+ 			display: flex;
+ 			align-items: center;
+ 		}
+
+ 		.goback {
+ 			z-index: 100;
+ 			width: 34rpx;
+ 			height: 34rpx;
+ 		}
+
+ 		.tuiguang_bg {
  			width: 100%;
-			&.flex_item{
-				border-bottom: 1px dashed #999999  ;
-				padding-bottom: 20rpx;
-			}
- 			.title-avatar{
- 				width: 100rpx;
- 				height: 100rpx;
- 				margin-right: 25rpx;
- 				image{
- 					width: 100%;
- 					height: 100%;
- 					border-radius: 100%;
- 				}
+ 			height: 400rpx;
+ 			position: relative;
+ 		}
+
+ 		.money_img {
+ 			width: 100%;
+ 			height: 120rpx;
+ 			text-align: center;
+ 			padding-top: 50rpx;
+ 			padding-bottom: 135rpx;
+
+ 			image {
+ 				width: 120rpx;
+ 				height: 120rpx;
+ 				border: 4rpx solid #FD5F6F;
+ 				border-radius: 50%;
+ 			}
+ 		}
+
+ 		.money-frame {
+ 			position: absolute;
+ 			top: 0;
+ 			width: 100%;
+ 			padding-top: 120rpx;
+ 			// left: 30rpx;
+ 			// height: 460rpx;
+ 			// display: flex;
+ 			// align-items: flex-start;
+ 			// flex-direction: column;
+ 			// justify-content: center;
+ 		}
+
+ 		.money_name {
+ 			width: 100%;
+ 			text-align: center;
+ 			font-size: 32rpx;
+ 			font-family: PingFang SC;
+ 			font-weight: bold;
+ 			color: #FFFFFF;
+
+ 		}
+
+ 		.money_num {
+ 			padding-top: 50rpx;
+ 			font-size: 72rpx;
+ 			font-family: PingFang SC;
+ 			font-weight: bold;
+ 			color: #FF4C4C;
+
+ 			.money_ren {
+ 				font-size: 36rpx;
  			}
- 			.list_tpl{
- 				width: 85%;
- 				.title {
- 					font-size: $font-lg;
- 					color: $font-color-base;
- 					overflow:hidden;            //超出的文本隐藏
- 					text-overflow:ellipsis;     //溢出用省略号显示
- 					white-space:nowrap;
-					 justify-content: space-between;
-					 
-					image {
-						margin-left: 9rpx;
-						width: 147rpx;
-						height: 32rpx;
-					}
+ 		}
+ 	}
+
+ 	// 列表
+
+ 	.swiper-box {
+
+ 		// padding-top: 10rpx;
+ 		.order-item {
+ 			padding: 20rpx 30rpx;
+ 			padding-bottom: 0;
+ 			line-height: 1.5;
+
+ 			.title-box {
+ 				width: 100%;
+
+ 				&.flex_item {
+ 					border-bottom: 1px dashed #999999;
+ 					padding-bottom: 20rpx;
+ 				}
+
+ 				.title-avatar {
+ 					width: 100rpx;
+ 					height: 100rpx;
+ 					margin-right: 25rpx;
+
+ 					image {
+ 						width: 100%;
+ 						height: 100%;
+ 						border-radius: 100%;
+ 					}
  				}
- 				.time {
- 					margin-top: 15rpx;
- 					font-size: 22rpx;
- 					color: $font-color-light;
+
+ 				.list_tpl {
+ 					width: 85%;
+
+ 					.title {
+ 						font-size: $font-lg;
+ 						color: $font-color-base;
+ 						overflow: hidden; //超出的文本隐藏
+ 						text-overflow: ellipsis; //溢出用省略号显示
+ 						white-space: nowrap;
+ 						justify-content: space-between;
+
+ 						image {
+ 							margin-left: 9rpx;
+ 							width: 147rpx;
+ 							height: 32rpx;
+ 						}
+ 					}
+
+ 					.time {
+ 						margin-top: 15rpx;
+ 						font-size: 22rpx;
+ 						color: $font-color-light;
+ 					}
  				}
  			}
+
+ 			.money {
+ 				color: #DB1935;
+ 				font-size: $font-lg;
+ 			}
  		}
- 		.money {
- 			color: #DB1935;
- 			font-size: $font-lg;
+ 	}
+
+ 	.list-scroll-content {
+ 		height: 100%;
+ 	}
+
+ 	.content {
+ 		height: 100%;
+
+ 		.empty-content {
+ 			background-color: #ffffff;
  		}
  	}
- }
- .list-scroll-content {
- 	height: 100%;
- }
- .content {
- 	height: 100%;
- 	.empty-content {
- 		background-color: #ffffff;
+
+ 	.tg-wrapper {
+ 		width: 100%;
+ 		background-color: #f7f7f7;
+
+ 		padding: 20rpx 0;
+
+ 		.tg-box {
+ 			display: flex;
+ 			justify-content: center;
+ 			width: 690rpx;
+ 			height: 143rpx;
+ 			background-color: #fff;
+ 			margin: 0 auto;
+ 			align-items: center;
+
+ 			.tg-item {
+ 				width: 33%;
+ 				display: flex;
+ 				flex-direction: column;
+ 				justify-content: center;
+ 				align-items: center;
+
+ 				.tg-tit {
+ 					font-size: 24rpx;
+ 					font-family: PingFang SC;
+ 					font-weight: bold;
+ 					color: #333333;
+
+ 				}
+
+ 				.tg-val {
+ 					padding-top: 15rpx;
+ 					font-size: 34rpx;
+ 					font-family: PingFang SC;
+ 					font-weight: bold;
+ 					color: #333333;
+
+ 				}
+ 			}
+
+ 			.tg-jg {
+ 				width: 1rpx;
+ 				height: 51rpx;
+ 				background: #DDDDDD;
+ 			}
+ 		}
  	}
- }
- .tg-wrapper {
-	width: 100%;
-	background-color: #f7f7f7;
-	
-	padding: 20rpx 0;
-	.tg-box {
-		display: flex;
-		justify-content: center;
-		width: 690rpx;
-		height: 143rpx;
-		background-color: #fff;
-		margin: 0 auto;
-		align-items: center;
-		.tg-item {
-			width: 33%;
-			display: flex;
-			flex-direction: column;
-			justify-content: center;
-			align-items: center;
-			.tg-tit {
-				font-size: 24rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #333333;
-				
-			}
-			.tg-val {
-				padding-top: 15rpx;
-				font-size: 34rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #333333;
-				
-			}
-		}
-		.tg-jg {
-			width: 1rpx;
-			height: 51rpx;
-			background: #DDDDDD;
-		}
-	}
- }
  </style>
- 

+ 2 - 2
pages/user/user.vue

@@ -128,7 +128,7 @@
 							</view>
 							<text>奖励明细</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/user/award')" hover-class="common-hover"
+						<view class="order-item" @click="navTo('/pages/user/scoreAccumulate')" hover-class="common-hover"
 							:hover-stay-time="50">
 							<view class="icon">
 								<image class="icon-img" src="/static/icon/u3.png" mode="aspectFit"></image>
@@ -176,7 +176,7 @@
 			</view>
 		</scroll-view>
 		<view class="u-tabbar">
-			<text>临海市宗斌副食品商行</text>
+			<text>浙江万吉健康产业有限公司</text>
 			<text>版权所有</text>
 			
 		</view>

BIN
static/error/logo.png