Переглянути джерело

Merge branch 'master' of http://git.liuniu946.com/xuhaolan/paopaoShop

lhl 3 роки тому
батько
коміт
9deb6f9d15
100 змінених файлів з 2646 додано та 1564 видалено
  1. 18 0
      api/functionalUnit.js
  2. 27 0
      api/user.js
  3. 33 1
      api/wallet.js
  4. 7 1
      pages.json
  5. 34 8
      pages/index/index.vue
  6. 27 18
      pages/index/sign1.vue
  7. 416 375
      pages/money/pay.vue
  8. 71 52
      pages/money/paySuccess.vue
  9. 483 265
      pages/money/recharge.vue
  10. 23 19
      pages/money/wallet.vue
  11. 136 67
      pages/money/withdmoenys.vue
  12. 10 24
      pages/money/withdrawal.vue
  13. 4 4
      pages/order/createOrder.vue
  14. 1 1
      pages/order/order.vue
  15. 7 12
      pages/product/common/productBottom.vue
  16. 11 39
      pages/product/common/productContent.vue
  17. 15 16
      pages/product/list.vue
  18. 189 99
      pages/product/product.vue
  19. 16 8
      pages/user/award.vue
  20. 417 0
      pages/user/cash.vue
  21. 1 3
      pages/user/jiedianDetails.vue
  22. 406 454
      pages/user/mygx.vue
  23. 255 47
      pages/user/scoreAccumulate.vue
  24. 1 5
      pages/user/team.vue
  25. 9 6
      pages/user/user.vue
  26. 28 39
      pages/user/withdrawal.vue
  27. BIN
      static/img/cash-bg.png
  28. BIN
      static/img/logo.jpg
  29. BIN
      static/img/myjf.png
  30. BIN
      static/img/paySuccess.png
  31. BIN
      unpackage/dist/build/h5/3-14-5.rar
  32. 1 1
      unpackage/dist/build/h5/index.html
  33. BIN
      unpackage/dist/build/h5/static/icon/bdsj.png
  34. BIN
      unpackage/dist/build/h5/static/icon/dsjh.png
  35. BIN
      unpackage/dist/build/h5/static/icon/fanhui.png
  36. BIN
      unpackage/dist/build/h5/static/icon/goto.png
  37. BIN
      unpackage/dist/build/h5/static/icon/i1.png
  38. BIN
      unpackage/dist/build/h5/static/icon/i2.png
  39. BIN
      unpackage/dist/build/h5/static/icon/i3.png
  40. BIN
      unpackage/dist/build/h5/static/icon/i4.png
  41. BIN
      unpackage/dist/build/h5/static/icon/kf.png
  42. BIN
      unpackage/dist/build/h5/static/icon/mygx.png
  43. BIN
      unpackage/dist/build/h5/static/icon/myjd.png
  44. BIN
      unpackage/dist/build/h5/static/icon/myqb.png
  45. BIN
      unpackage/dist/build/h5/static/icon/mytg.png
  46. BIN
      unpackage/dist/build/h5/static/icon/myyj.png
  47. BIN
      unpackage/dist/build/h5/static/icon/search-h.png
  48. BIN
      unpackage/dist/build/h5/static/icon/shdz.png
  49. BIN
      unpackage/dist/build/h5/static/icon/tghb.png
  50. BIN
      unpackage/dist/build/h5/static/img/cash-bg.8993f7b8.png
  51. BIN
      unpackage/dist/build/h5/static/img/cash-bg.png
  52. BIN
      unpackage/dist/build/h5/static/img/img009.609fc055.png
  53. BIN
      unpackage/dist/build/h5/static/img/img009.png
  54. BIN
      unpackage/dist/build/h5/static/img/img010.becc4342.png
  55. BIN
      unpackage/dist/build/h5/static/img/img010.png
  56. BIN
      unpackage/dist/build/h5/static/img/logo.jpg
  57. BIN
      unpackage/dist/build/h5/static/img/mygx.ca95ee72.png
  58. BIN
      unpackage/dist/build/h5/static/img/mygx.png
  59. BIN
      unpackage/dist/build/h5/static/img/myjf.6b34f1a7.png
  60. BIN
      unpackage/dist/build/h5/static/img/myjf.png
  61. BIN
      unpackage/dist/build/h5/static/img/myyue.0637582a.png
  62. BIN
      unpackage/dist/build/h5/static/img/myyue.png
  63. BIN
      unpackage/dist/build/h5/static/img/paySuccess.ca7ed587.png
  64. BIN
      unpackage/dist/build/h5/static/img/paySuccess.png
  65. BIN
      unpackage/dist/build/h5/static/img/user-top-bg.00e593af.png
  66. BIN
      unpackage/dist/build/h5/static/img/user-top-bg.png
  67. BIN
      unpackage/dist/build/h5/static/img/yongjin-bg.7a027847.png
  68. BIN
      unpackage/dist/build/h5/static/img/yongjin-bg.png
  69. 0 0
      unpackage/dist/build/h5/static/js/index.74c92c56.js
  70. 0 0
      unpackage/dist/build/h5/static/js/index.b2f278b6.js
  71. 0 0
      unpackage/dist/build/h5/static/js/pages-activity-bargain-index.fc86a02a.js
  72. 0 0
      unpackage/dist/build/h5/static/js/pages-activity-goods_bargain-index.f0500761.js
  73. 0 0
      unpackage/dist/build/h5/static/js/pages-activity-goods_bargain_details-index.fa50a185.js
  74. 0 0
      unpackage/dist/build/h5/static/js/pages-cart-cart.75a11be0.js
  75. 0 0
      unpackage/dist/build/h5/static/js/pages-cart-cart~pages-category-business~pages-game-game~pages-index-index~pages-user-award~pages-use~a9e8262b.e7e04017.js
  76. 0 0
      unpackage/dist/build/h5/static/js/pages-category-business.785c8fc5.js
  77. 0 0
      unpackage/dist/build/h5/static/js/pages-category-business.f403dbed.js
  78. 0 0
      unpackage/dist/build/h5/static/js/pages-index-index.194d144f.js
  79. 0 0
      unpackage/dist/build/h5/static/js/pages-index-index.2b06e6f7.js
  80. 0 0
      unpackage/dist/build/h5/static/js/pages-index-sign.3f578c44.js
  81. 0 0
      unpackage/dist/build/h5/static/js/pages-index-sign1.1ba24fd5.js
  82. 0 0
      unpackage/dist/build/h5/static/js/pages-index-sign1.dacc625a.js
  83. 0 0
      unpackage/dist/build/h5/static/js/pages-money-account.40d0ce1e.js
  84. 0 0
      unpackage/dist/build/h5/static/js/pages-money-account.9315887f.js
  85. 0 0
      unpackage/dist/build/h5/static/js/pages-money-pay.25cecbf3.js
  86. 0 0
      unpackage/dist/build/h5/static/js/pages-money-pay.8c460c81.js
  87. 0 0
      unpackage/dist/build/h5/static/js/pages-money-paySuccess.4b9e830d.js
  88. 0 0
      unpackage/dist/build/h5/static/js/pages-money-paySuccess.7df3a3b1.js
  89. 0 0
      unpackage/dist/build/h5/static/js/pages-money-recharge.2a65956d.js
  90. 0 0
      unpackage/dist/build/h5/static/js/pages-money-recharge.3b471118.js
  91. 0 0
      unpackage/dist/build/h5/static/js/pages-money-wallet.02c6ccab.js
  92. 0 0
      unpackage/dist/build/h5/static/js/pages-money-wallet.688b8676.js
  93. 0 0
      unpackage/dist/build/h5/static/js/pages-money-wallet~pages-order-order~pages-user-award~pages-user-coupon~pages-user-favorites~pages-u~bf4a43c1.b45fc6a8.js
  94. 0 0
      unpackage/dist/build/h5/static/js/pages-money-wallet~pages-order-order~pages-user-coupon~pages-user-favorites~pages-user-scoreAccumulate.bc4d14c3.js
  95. 0 0
      unpackage/dist/build/h5/static/js/pages-money-withdmoenys.01e27dd4.js
  96. 0 0
      unpackage/dist/build/h5/static/js/pages-money-withdmoenys.0dc52ebb.js
  97. 0 0
      unpackage/dist/build/h5/static/js/pages-money-withdrawal.2298c334.js
  98. 0 0
      unpackage/dist/build/h5/static/js/pages-money-withdrawal.ee3c8aac.js
  99. 0 0
      unpackage/dist/build/h5/static/js/pages-order-createOrder.3a58f5c1.js
  100. 0 0
      unpackage/dist/build/h5/static/js/pages-order-createOrder.957868aa.js

+ 18 - 0
api/functionalUnit.js

@@ -64,3 +64,21 @@ export function signUser(data) {
 		data
 	});
 }
+
+//天天领红包-当天可领
+export function my_award(data) {
+	return request({
+		url: '/api/game/my_award',
+		method: 'get',
+		data
+	});
+}
+
+//天天领红包-领取红包
+export function get_award(data,id) {
+	return request({
+		url: '/api/game/get_award/' + id,
+		method: 'post',
+		data
+	});
+}

+ 27 - 0
api/user.js

@@ -153,4 +153,31 @@ export function transfer(data) {
 		method: 'post',
 		data
 	})
+}
+
+//余额转账
+export function yuetransfer(data) {
+	return request({
+		url:'/api/yue/trade',
+		method: 'post',
+		data
+	})
 }
+
+//现金转账
+export function cashtransfer(data) {
+	return request({
+		url:'/api/cash/trade',
+		method: 'post',
+		data
+	})
+}
+
+// 我的分红积分
+export function share(data) {
+	return request({
+		url:'/api/game',
+		method: 'get',
+		data
+	})
+}

+ 33 - 1
api/wallet.js

@@ -18,6 +18,14 @@ export function userBalance(data) {
 	});
 }
 
+export function wallet(data) {
+	return request({
+		url: '/api/wallet',
+		method: 'get',
+		data
+	});
+}
+
 // 提现
 export function extractCash(data) {
 	return request({
@@ -27,6 +35,15 @@ export function extractCash(data) {
 	});
 }
 
+// 提现
+export function exchangeCash(data) {
+	return request({
+		url: '/api/extract/brokerage',
+		method: 'post',
+		data
+	});
+}
+
 // 提现信息
 export function extractBank(data) {
 	return request({
@@ -98,5 +115,20 @@ export function balance(data) {
 	});
 }
 
+// 账户余额
+export function cashList(data) {
+	return request({
+		url: '/api/cash/list',
+		method: 'get',
+		data
+	});
+}
 
-
+//充值金额
+export function moneyChong(data){
+	return request({
+		url:'/api/recharge/index',
+		method:'get',
+		data
+	})
+}

+ 7 - 1
pages.json

@@ -99,10 +99,16 @@
 				"navigationBarTitleText": "我的推广"
 			}
 		},
+		{
+			"path": "pages/user/cash",
+			"style": {
+				"navigationBarTitleText": "我的现金"
+			}
+		},
 		{
 			"path": "pages/money/withdmoenys",
 			"style": {
-				"navigationBarTitleText": "响亮积分转账"
+				"navigationBarTitleText": "转账"
 			}
 		},
 		{

+ 34 - 8
pages/index/index.vue

@@ -35,9 +35,9 @@
 					<image class="nitem-image" src="../../static/index/index04.png" mode=""></image>
 					<view class="nitem-font">积分商城</view>
 				</view>
-				<view class="navbar-item" @click="navTo('')">
+				<view class="navbar-item" @click="navTo('/pages/product/list')">
 					<image class="nitem-image" src="../../static/index/index03.png" mode=""></image>
-					<view class="nitem-font">公益</view>
+					<view class="nitem-font">全部商品</view>
 				</view>
 				<view class="navbar-item" @click="navTo('/pages/user/shareQrCode')">
 					<image class="nitem-image" src="../../static/index/index02.png" mode=""></image>
@@ -53,7 +53,6 @@
 			<view class="product-title">
 				<image class="pt-image" src="../../static/index/index15.png" mode=""></image>
 				<view class="pt-title">会员礼包</view>
-				<view class="pt-tip">每日必买</view>
 			</view>
 			<view class="hotgoods">
 				<view class="hotgoods-item" v-for="item in bastList" :key="item.id" @click="navToDetailPage(item)">
@@ -129,7 +128,7 @@ import { interceptor } from '@/utils/loginUtils';
 import { mapState, mapMutations } from 'vuex';
 import { tabbar } from '@/utils/tabbar.js';
 // #ifdef H5
-import { weixindata } from '@/utils/wxAuthorized';
+import { weixindata, shareLoad } from '@/utils/wxAuthorized';
 // #endif
 export default {
 	components: {
@@ -156,7 +155,7 @@ export default {
 		};
 	},
 	computed: {
-		...mapState(['loginInterceptor']),
+		...mapState(['loginInterceptor','baseURL']),
 		...mapState('user', ['hasLogin', 'userInfo'])
 	},
 	onLoad: function(option) {
@@ -169,11 +168,14 @@ export default {
 				data: option.scene
 			});
 		}
-		// #endif
+		// #endif
+		// #ifdef H5
+		this.IndexShare();
+		//#endif
 	},
 	onShow: function() {
 		// 判断是否强制登录
-		if (this.loginInterceptor && !this.hasLogin) {
+		if (!this.hasLogin) {
 			// 登录拦截
 			interceptor();
 		}
@@ -211,7 +213,31 @@ export default {
 	},
 	// #endif
 	methods: {
-		...mapMutations(['setLat', 'setLon']),
+		...mapMutations(['setLat', 'setLon']),
+		// #ifdef H5
+		IndexShare() {
+			let obj = this;
+			let pages = getCurrentPages();
+			// 获取当前页面
+			let page = pages[pages.length - 1];
+			let path = '#/' + page.route + '?';
+			// 保存传值
+			for (let i in page.options) {
+				path += i + '=' + page.options[i] + '&';
+			}
+			console.log(obj.Path)
+			// 保存邀请人
+			path += 'spread=' + this.userInfo.uid;
+			let data = {
+				link: this.baseURL + '/index/' + path,
+				title: this.userInfo.nickname + '邀请您进入响亮商城',
+				desc:'欢迎加入响亮商城',
+				imgUrl: 'https://xl.liuniu946.com/index/static/img/logo.jpg'
+			};
+			console.log(data,'分享数据');
+			shareLoad(data);
+		},
+		// #endif
 		getaddress() {
 			console.log('dizhi+++++++++++');
 			let obj = this;

+ 27 - 18
pages/index/sign1.vue

@@ -3,13 +3,11 @@
 		<view class="title">天天领现金</view>
 		<view class="main after" v-if="signTrue">
 			<image class="main-bg" src="../../static/img/money-ok.png" mode=""></image>
-			<view class="num">
-				{{day_integral}}
-			</view>
+			<view class="num">{{ day_integral }}</view>
 		</view>
 		<view class="main before" v-if="!signTrue">
 			<image class="main-bg" src="../../static/img/money-bg.png" mode=""></image>
-			<view class="btn" @click="integral()">立即领取</view>
+			<view class="btn" :class="{ current: is_have }" @click="integral()">立即领取</view>
 		</view>
 		<view class="info-box flex">
 			<view class="info-item">
@@ -18,7 +16,7 @@
 			</view>
 			<view class="info-item">
 				<view class="info-num">{{ allSign }}</view>
-				<view class="info-font">领取天数</view>
+				<view class="info-font">公益池金额</view>
 			</view>
 		</view>
 	</view>
@@ -26,7 +24,7 @@
 
 <script>
 import calendar from '../../components/ss-calendar/ss-calendar.vue';
-import { signList, integral, signUser } from '@/api/functionalUnit.js';
+import { signList, integral, signUser, my_award, get_award } from '@/api/functionalUnit.js';
 export default {
 	components: {
 		calendar
@@ -41,7 +39,9 @@ export default {
 			allSign: 0, //累计签到
 			sum_integral: 0, //累计获得积分
 			day_integral: '', //今天签到的钱
-			signTrue: false
+			signTrue: false,
+			is_have: true, //是否可领
+			id: ''
 		};
 	},
 	onLoad() {
@@ -58,24 +58,29 @@ export default {
 		},
 		//获取签到用户信息
 		signUser() {
-			signUser({ all: 1 }).then(({ data }) => {
-				this.actionDay = data.sign_num; //连续签到天数
-				this.allSign = data.sum_sgin_day; //累计签到天数
-				this.sum_integral = data.sum_integral; //累计总积分
+			my_award().then(data => {
+				console.log(data);
+				this.sum_integral = data.data.all_get;
+				this.allSign = data.data.all_out;
+				if (data.data.todayAward != null) {
+					this.day_integral = data.data.todayAward.award; //今天获取的金额
+					this.id = data.data.todayAward.id;
+					this.is_have = false;
+				}
+				console.log(this.is_have);
 			});
 		},
 		// 签到
 		integral() {
+			if(is_have){
+				return
+			}
 			console.log(111);
-			integral({})
+			get_award({}, this.id)
 				.then(e => {
 					console.log(e);
-					this.day_integral = e.data.integral, //今天获取的金额
-						// 改为已签到
+					// 改为已签到
 					this.signTrue = true;
-					this.actionDay++;
-					// 保存签到成功
-					this.signList.push(this.day);
 				})
 				.catch(e => {
 					console.log(e);
@@ -106,6 +111,10 @@ page,
 .before {
 	padding-top: 590rpx;
 }
+.current {
+	color: #FFFFFF !important;
+	background: #989898 !important;
+}
 .main {
 	width: 750rpx;
 	height: 926rpx;
@@ -124,7 +133,7 @@ page,
 		font-size: 122rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
-		color: #EB2749;
+		color: #eb2749;
 		opacity: 0.9;
 	}
 	.btn {

+ 416 - 375
pages/money/pay.vue

@@ -1,32 +1,40 @@
-<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)">
-				<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>
+<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)">
+				<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 class="type-item" @click="changePayType(5)">
+				<image class="cash-icon" src="../../static/icon/mygx.png" mode=""></image>
+				<view class="con">
+					<text class="tit">现金支付</text>
+					<text>可用现金 {{ userInfo.cash }}</text>
+				</view>
+				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 5"></radio></label>
 			</view>
 			<view class="type-item" @click="changePayType(4)" v-if="isP == 1">
 				<text class="icon iconfont iconyue"></text>
@@ -35,82 +43,82 @@
 					<text>可用余额 {{ userInfo.pink_integral }}</text>
 				</view>
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 4"></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 { mapState,mapMutations } from 'vuex';
+			</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 { mapState, mapMutations } from 'vuex';
 import { orderData, userinfo } from '@/api/user.js';
 // #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
-			isP: 0,
-		};
-	},
-	computed: {
-		// #ifdef H5
+// #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
+			isP: 0
+		};
+	},
+	computed: {
+		// #ifdef H5
 		...mapState(['weichatObj']),
-		...mapState('user',['userInfo'])
-		// #endif
-	},
+		...mapState('user', ['userInfo'])
+		// #endif
+	},
 	onLoad(options) {
-		if(options.isP) {
-			this.isP = options.isP
-		}
-		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;
-			});
+		if (options.isP) {
+			this.isP = options.isP;
+		}
+		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;
+			});
 		}
-		this.getUserInfo()
-		// 保存pinkid
-		if (options.pinkid) {
-			this.pinkid = options.pinkid;
-		}
-		// 载入余额
-		balance({}).then(({ data }) => {
-			// 获取余额
-			this.now_money = data.now_money;
-		});
-	},
+		this.getUserInfo();
+		// 保存pinkid
+		if (options.pinkid) {
+			this.pinkid = options.pinkid;
+		}
+		// 载入余额
+		balance({}).then(({ data }) => {
+			// 获取余额
+			this.now_money = data.now_money;
+		});
+	},
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
 		getUserInfo() {
@@ -121,47 +129,50 @@ export default {
 				.catch(e => {
 					console.log(e);
 				});
-		},
-		//选择支付方式
-		changePayType(type) {
-			this.payType = type;
-			if (this.payType == 1) {
-				this.payName = 'weixin';
-			}
-			if (this.payType == 2) {
-				this.payName = 'ali';
-			}
-			if (this.payType == 3) {
-				this.payName = 'yue';
+		},
+		//选择支付方式
+		changePayType(type) {
+			this.payType = type;
+			if (this.payType == 1) {
+				this.payName = 'weixin';
+			}
+			if (this.payType == 2) {
+				this.payName = 'ali';
 			}
-			if(this.payType == 4) {
+			if (this.payType == 3) {
+				this.payName = 'yue';
+			}
+			if (this.payType == 4) {
 				this.payName = 'pink_integral';
-			}
-		},
-		// 支付金额
-		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 (this.payType == 5) {
+				this.payName = 'cash';
+			}
+		},
+		// 支付金额
+		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 == 'pink_integral' && e.data.status == 'SUCCESS') {
 						if (e.status == 200) {
@@ -169,78 +180,98 @@ export default {
 						} 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 == 'pink_integral' && +obj.userInfo.pink_integral < obj.money) {
-				uni.showModal({
-					title: '提示',
-					content: '拼团积分不足!',
-					showCancel: false,
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
+					}
+					if (obj.payName == 'cash' && 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 == 'pink_integral' && +obj.userInfo.pink_integral < obj.money) {
+				uni.showModal({
+					title: '提示',
+					content: '拼团积分不足!',
+					showCancel: false,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
 				});
-				uni.hideLoading()
-				return;
+				uni.hideLoading();
+				return;
 			}
 			// 判断是否拼团积分不足
+			if (obj.payName == 'cash' && +obj.userInfo.cash < obj.money) {
+				uni.showModal({
+					title: '提示',
+					content: '现金不足!',
+					showCancel: false,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+				uni.hideLoading();
+				return;
+			}
+			// 判断是否余额不足
 			if (obj.payName == 'yue' && +obj.now_money < obj.money) {
 				uni.showModal({
 					title: '提示',
@@ -250,173 +281,183 @@ export default {
 					fail: () => {},
 					complete: () => {}
 				});
-				uni.hideLoading()
+				uni.hideLoading();
 				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自提
-			};
-			// 判断是否拼团商品
-			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') {
-						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;
-}
+			}
+			// 支付中
+			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自提
+			};
+			// 判断是否拼团商品
+			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') {
+						if (status == 200 && data.status == 'SUCCESS') {
+							obj.paySuccessTo();
+						} else {
+							obj.$api.msg(msg);
+						}
+					} else if (obj.payName == 'cash') {
+						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;
+	}
+	.cash-icon {
+		width: 100rpx;
+		height: 52rpx;
+		padding-right: 50rpx;
+	}
+	.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>

+ 71 - 52
pages/money/paySuccess.vue

@@ -1,65 +1,84 @@
 <template>
 	<view class="content">
-		<text class="success-icon iconfont iconroundcheck"></text>
-		<text class="tit">支付成功</text>
+		<image class="success-icon" src="../../static/img/paySuccess.png" mode=""></image>
+		<text class="tit">订单支付成功</text>
 		<view class="btn-group">
-			<navigator :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect" class="mix-btn">查看订单</navigator>
+			<navigator url="/pages/order/order?state=1" open-type="redirect" class="mix-btn">查看订单</navigator>
 			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
 		</view>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				orderId:''
-			}
-		},
-		onLoad(opt) {
-			// 保存订单号
-			this.orderId = opt.orderid;
-		},
-		methods: {
-			
-		}
-	}
+export default {
+	data() {
+		return {
+			type: 2 //1为兑换支付成功2为预购成功
+		};
+	},
+	onLoad(opt) {
+		// 保存订单号
+	// 	if ('type' in opt) {
+	// 		this.type = opt.type;
+	// 	}
+	// 	if (this.type == 1) {
+	// 		uni.setNavigationBarTitle({
+	// 			title: '兑换成功'
+	// 		});
+	// 	}
+	// 	if (this.type == 2) {
+	// 		uni.setNavigationBarTitle({
+	// 			title: '预约成功'
+	// 		});
+	// 	}
+	},
+	methods: {}
+};
 </script>
 
-<style lang='scss'>
-	.content{
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-	}
-	.success-icon{
-		font-size: 160upx;
-		color: #5dbc7c;
-		margin-top: 100upx;
-	}
-	.tit{
-		font-size: 38upx;
-		color: #303133;
-	}
-	.btn-group{
-		padding-top: 100upx;
-	}
-	.mix-btn {
-		margin-top: 30upx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		width: 600upx;
-		height: 80upx;
-		font-size: $font-lg;
-		color: #fff;
-		background-color: $base-color;
-		border-radius: 10upx;
-		&.hollow{
-			background: #fff;
-			color: #303133;
-			border: 1px solid #ccc;
-		}
+<style lang="scss">
+.content {
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+}
+.success-icon {
+	margin-top: 100rpx;
+	width: 302rpx;
+	height: 320rpx;
+}
+.tit {
+	margin-top: 40rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #333333;
+}
+.btn-group {
+	padding-top: 130rpx;
+	display: flex;
+	justify-content: flex-start;
+}
+.mix-btn {
+	margin-top: 30upx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 301rpx;
+	height: 78rpx;
+	background: #EF0E74;
+	border-radius: 10rpx;
+	font-size: $font-lg;
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	&.hollow {
+		margin-left: 36rpx;
+		background: #fff;
+		color: #EF0E74;
+		border: 1px solid #EF0E74;
 	}
+}
 </style>

+ 483 - 265
pages/money/recharge.vue

@@ -1,267 +1,485 @@
-<template>
-	<view class="content">
-		<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">
-				<!-- #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="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
-					</view>
-				</label>
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconweixin1"></view>
-						<view class="title-box">
-							<view class="title"><text>微信充值</text></view>
-							<view class="node"><text>真实姓名(代勇明)</text></view>
-						</view>
-						<view class="right"><radio value="weixin" color=" #5dbc7c" :checked="type == 'weixin'" /></view>
-					</view>
-				</label>
-				<!-- #endif -->
-			</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 } from '@/api/wallet.js';
-// #endif
-// #ifdef MP
-import { rechargeRoutine } from '@/api/wallet.js';
-// #endif
-import { mapState } from 'vuex';
+<template>
+	<view class="content">
+		<view class="top_box">
+			<text class="yue-tit">当前余额:</text>
+			<text class="yue-num">¥{{ now_money | parseFloatNum }}</text>
+		</view>
+
+		<view class="line_box"></view>
+
+		<view class="cz_box">
+			<view class="cz_wrap">
+				<text class="cz_tit">¥</text>
+				<input class="cz_input" type="number" v-model="money" @focus="changeNum()" placeholder="请输入充值金额" placeholder-class="placeholder" />
+			</view>
+			<view class="zc_list_box">
+				<view class="zc_list_price" :class="{ seletPrice: seletNum == item.price }" @click="seletChange(item, index)" v-for="(item, index) in list" :key="index">
+					{{ item.price | parseFloatNum }}元
+				</view>
+			</view>
+		</view>
+		<!-- <view class="line_box"></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="rechar-box">
+			<view class="rechar-title">注意事项</view>
+			<view class="rechar-text" v-for="(item, index) in zhuyi" :key="index">
+				<text>{{ index + 1 }}.{{item}}</text>
+			</view>
+		</view> -->
+		<view class="line_box"></view>
+		<view class="cz-type">
+			<view class="type-left">
+				<view class="icon iconfont iconweixin"></view>
+				<view class="tit">微信充值</view>
+			</view>
+			<view class="right"><radio value="weixin" color=" #EB001C" :checked="type == 'weixin'" /></view>
+		</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 weixinObj from '@/plugin/jweixin-module/index.js';
-// #endif
-export default {
-	filters: {
-		getMoneyStyle
-	},
-	data() {
-		return {
-			type: 'weixin',
-			money: '', //充值金额
-			payLoding: false //是否加载中
-		};
-	},
-	onLoad(options) {},
-	computed: {
-		// #ifdef H5
-		...mapState(['weichatObj'])
-		// #endif
-	},
-	methods: {
-		// 跳转
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			});
-		},
-		// 切换选中对象
-		tabRadio(e) {
-			this.type = e;
-		},
-		// 提交
-		confirm() {
-			let obj = this;
-			obj.payLoding = true;
-			// #ifdef H5
-			rechargeWechat({ price: this.money, from: this.type })
-				.then(e => {
-					let da = e.data.data;
-					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;
-				})
-				.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
-		},
-		//获取订单列表
-		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%;
-}
-
-.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;
-		}
-		.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;
-}
+import { rechargeWechat, rechargeIndex } from '@/api/wallet.js';
+// #endif
+// #ifdef MP
+import { rechargeWechat, rechargeRoutine, rechargeIndex } from '@/api/wallet.js';
+// #endif
+import { mapState } from 'vuex';
+import { spreadCommission, userBalance,moneyChong } from '@/api/wallet.js';
+export default {
+	filters: {
+		getMoneyStyle,
+		// 去处小数点后的0
+		parseFloatNum(clock) {
+			return parseFloat(clock);
+		}
+	},
+	data() {
+		return {
+			type: 'weixin',
+			money: '', //充值金额
+			payLoding: false ,//是否加载中
+			list: [
+				'300',
+				'200',
+				'150',
+				'100',
+				'50'
+			],
+			now_money:'',
+			seletNum: '300',	// 选中
+			zhuyi: [],
+			quota: '',	// 送的钱
+			typeText: 0,	// 0-微信 1-佣金
+		};
+	},
+	onLoad(options) {
+		this.loadData();
+	},
+	computed: {
+		// #ifdef H5
+		...mapState(['weichatObj', 'userInfo'])
+		// #endif
+		// #ifdef MP
+		...mapState(['userInfo'])
+		// #endif
+	},
+	methods: {
+		// 跳转
+		navTo(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		changeNum() {
+			this.seletNum = this.money = '';
+			console.log(this.seletNum, this.money);
+		},
+		seletChange(item, index) {
+			this.seletNum = item.price;
+			this.seletMoney = item.price;
+			this.money = item.price
+		},
+		// 切换选中对象
+		tabRadio(e) {
+			this.type = e.detail.value;
+			if ( e.detail.value == 'weixin' ) {
+				this.typeText = 0
+			} else {
+				this.typeText = 1
+			}
+		},
+		// 充值金额
+		rechargeXuan(item) {
+			this.money = item.price;
+			this.quota = item.quota;
+		},
+
+		loadData() {
+			moneyChong({}).then(({data}) =>{
+				console.log(data,"123456789");
+				this.list = data.recharge_quota;
+			});
+			userBalance({}).then(({ data }) => {
+				this.now_money = data.now_money;
+			});
+		},
+
+		// 提交
+		confirm() {
+			let obj = this;
+			obj.payLoding = true;
+			if( !obj.money ) {
+				obj.$api.msg('请输入金额');
+				obj.payLoding = false;
+				return;
+			}
+			// #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',
+								success: function(res) {
+									uni.navigateBack()
+								}
+							});
+						}
+					});
+					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.showToast({
+										title: '充值成功',
+										duration: 2000,
+										position: 'top',
+										success: function(res) {
+											uni.navigateBack()
+										}
+									});
+								},
+
+							})
+
+					obj.payLoding = false;
+				})
+				.catch(e => {
+					obj.payLoding = false;
+					console.log(e);
+				});
+			// #endif
+		},
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+	background: #ffffff;
+}
+.top_box {
+	padding: 20rpx 26rpx 20rpx 47rpx;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	.yue-tit {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #333333;
+	}
+	.yue-num {
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ff6f0f;
+	}
+}
+
+.line_box {
+	width: 100%;
+	height: 20rpx;
+	background: #f8f8f8;
+}
+.cz_box {
+	padding: 40rpx 20rpx 20rpx;
+	.cz_wrap {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding-bottom: 20rpx;
+		border-bottom: 1px solid #e6e6e6;
+		.cz_tit {
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+		}
+		.cz_input {
+			text-align: right;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			// color: #BFBFBF;
+		}
+	}
+	.zc_list_box {
+		display: flex;
+		flex-wrap: wrap;
+		.zc_list_price {
+			width: 202rpx;
+			height: 60rpx;
+			background: #f0f0f0;
+			border-radius: 8rpx;
+			margin-top: 36rpx;
+			margin-right: 50rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&:nth-child(3n) {
+				margin-right: 0;
+			}
+		}
+		.seletPrice {
+			background: linear-gradient(143.2747deg, #ff6a00, #ee0979);
+			color: #ffffff;
+		}
+	}
+}
+.recha-box {
+	padding: 50rpx 30rpx 0;
+	display: flex;
+	flex-wrap: wrap;
+	.recha-frame {
+		width: 210rpx;
+		height: 181rpx;
+		border: 1px solid #dbdede;
+		border-radius: 20rpx;
+		display: flex;
+		align-items: center;
+		flex-direction: column;
+		justify-content: center;
+		margin-right: 30rpx;
+		margin-bottom: 30rpx;
+		&:nth-child(3n) {
+			margin-right: 0;
+		}
+		.recha-top {
+			display: flex;
+			align-items: center;
+			.recha-img {
+				width: 64rpx;
+				height: 62rpx;
+			}
+			.recha-tit {
+				margin-left: 10rpx;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+		.recha-song {
+			margin-top: 20rpx;
+			font-size: $font-base;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ff9900;
+		}
+	}
+	.select-frame {
+		border: 1px solid #ef041f;
+	}
+}
+
+.rechar-box {
+	padding: 30rpx 20rpx 0;
+	.rechar-title {
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+		margin-bottom: 10rpx;
+	}
+	.rechar-text {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+	}
+}
+.cz-type {
+	margin-top: 22rpx;
+	display: flex;
+	justify-content: space-between;
+	padding: 32rpx;
+	align-items: center;
+	.type-left {
+		display: flex;
+		align-items: center;
+		.icon {
+			height: 38rpx;
+			image {
+				width: 48rpx;
+				height: 38rpx;
+			}
+		}
+		.iconweixin {
+			color: #36cb59;
+		}
+		.tit {
+			margin-left: 12rpx;
+			font-size: 30rpx;
+			color: #333333;
+		}
+	}
+	.type-right {
+		image {
+			width: 36rpx;
+			height: 36rpx;
+		}
+	}
+}
+.add-btn {
+	&.modified {
+		
+	}
+	&.up {
+		color: #F21F5D;
+	}
+	margin-top: 100rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 604rpx;
+	height: 90rpx;
+	border: 2rpx solid #F21F5D;
+	border-radius: 10rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #F21F5D;
+	line-height: 90rpx;
+	text-align: center;
+}
+.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;
+		padding-right: 25rpx;
+		.icon {
+			font-size: 48rpx;
+			padding-right: 20rpx;
+			display: flex;
+		}
+		.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: linear-gradient(143.2747deg, #ff6a00, #ee0979) !important;
+	color: #FFFFFF !important;
+}
 </style>

+ 23 - 19
pages/money/wallet.vue

@@ -6,14 +6,18 @@
 				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
 				<view class="header">我的余额</view>
 			</view>
-			<view class="content-bg"><image src="../../static/img/yongjin-bg.png" mode=""></image></view>
+			<view class="content-bg"><image src="../../static/img/myyue.png" mode=""></image></view>
 			<view class="money-box">
 				<view class="money">{{money | getMoneyStyle}}</view>
 				<view>我的余额</view>
 			</view>
-			<view class="money-btn" @click="navto('/pages/money/recharge')">
-				余额充值
-				<text>></text>
+			<view class="moneybtn-box">
+				<view class="money-btn" @click="navto('/pages/money/withdmoenys?type=yue')">
+					余额转账
+				</view>
+				<view class="money-btn" @click="navto('/pages/money/recharge')">
+					余额充值
+				</view>
 			</view>
 		</view>
 		<view class="info-box flex">
@@ -130,8 +134,6 @@ export default {
 		// 获取用户余额
 		userBalance({}).then(({ data }) => {
 			this.money = data.now_money;
-			this.orderStatusSum = data.orderStatusSum
-			this.recharge = data.recharge
 		});
 	},
 	methods: {
@@ -142,7 +144,8 @@ export default {
 			});
 		},
 		//获取收入支出信息
-		async loadData(source) {
+		async loadData(source) {
+			let obj = this
 			//这里是将订单挂载到tab列表下
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
@@ -165,13 +168,17 @@ export default {
 				},
 				state
 			)
-				.then(({ data }) => {
-					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data[0].list);
+				.then(({ data }) => {
+					obj.recharge = data.income;
+					obj.orderStatusSum = data.expend;
+					if (data.list.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data.list[0].list);
 						console.log(navItem.orderList);
 						navItem.page++;
+					}else {
+						navItem.loadingType = 'noMore';
 					}
-					if (navItem.limit == data.length) {
+					if (navItem.limit == data.list[0].list.length) {
 						//判断是否还有数据, 有改为 more, 没有改为noMore
 						navItem.loadingType = 'more';
 						return;
@@ -300,7 +307,7 @@ page {
 .money-box {
 	position: relative;
 	z-index: 2;
-	padding-top: 90rpx;
+	padding-top: 70rpx;
 	color: #ffffff;
 	text-align: center;
 	.money {
@@ -313,20 +320,17 @@ page {
 		font-size: 30rpx;
 	}
 }
-.money-btn {
+.moneybtn-box {
+	display: flex;
+	justify-content: space-between;
 	position: relative;
 	z-index: 2;
 	color: #ffffff;
-	padding-right: 50rpx;
-	text-align: right;
+	padding:20rpx 50rpx ;
 	font-size: 30rpx;
 	font-family: PingFang SC;
 	font-weight: bold;
 	color: #FFFFFF;
-	text {
-		display: inline-block;
-		padding-left: 10rpx;
-	}
 }
 
 .navbar {

+ 136 - 67
pages/money/withdmoenys.vue

@@ -1,33 +1,49 @@
 <template>
 	<view class="content">
 		<view class="content-money">
-			<view class="flex">
+			<view class="flex" v-if="type == 'xl'">
 				<view class="buttom">
 					<view class="icon">{{ userInfo.integral | getMoneyStyle }}</view>
 					<text class="text">可用响亮积分</text>
 				</view>
 			</view>
+			<view class="flex" v-if="type == 'yue'">
+				<view class="buttom">
+					<view class="icon">{{ userInfo.now_money | getMoneyStyle }}</view>
+					<text class="text">可用余额</text>
+				</view>
+			</view>
+			<view class="flex" v-if="type == 'cash'">
+				<view class="buttom">
+					<view class="icon">{{ userInfo.cash | getMoneyStyle }}</view>
+					<text class="text">可用现金</text>
+				</view>
+			</view>
+		</view>
+		<view class="row-box">
+			<view class="title">收款人手机号</view>
+			<view class="row"><input class="input" type="number" v-model="card" placeholder="请输入收款人手机号" placeholder-class="placeholder" /></view>
 		</view>
-		<u-form ref="uForm" class="item">
-			<u-form-item label-width='150' label="用户手机"><u-input type="text" v-model="card" /></u-form-item>
-		</u-form>
 		<view class="row-box">
 			<view class="title">转账金额</view>
 			<view class="row">
-				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="withdrawal" placeholder='转入金额' placeholder-class="placeholder" />
-				<view class="buttom" @click="withdrawal = userInfo.integral">全部转账</view>
+				<!-- <text class="tit">¥</text> -->
+				<input class="input" type="number" v-model="withdrawal" placeholder="转入金额" placeholder-class="placeholder" />
+				<view class="buttom" v-if="type == 'xl'" @click="withdrawal = userInfo.integral">全部转账</view>
+				<view class="buttom" v-if="type == 'yue'" @click="withdrawal = userInfo.now_money">全部转账</view>
+				<view class="buttom" v-if="type == 'cash'" @click="withdrawal = userInfo.cash">全部转账</view>
 			</view>
 		</view>
-		
-		<button class="add-btn up" :class="{'action':loding}" @click="!loding?confirm():''">转入</button>
+		<view class="tip" v-if="withdrawal != 0 && type == 'xl'">实际转入{{ realmoney }}响亮积分,{{ gy }}响亮积分流入公益池</view>
+
+		<button class="add-btn up" :class="{ action: loding }" @click="!loding ? confirm() : ''">提交申请</button>
 	</view>
 </template>
 
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
-import { getUserInfo,transfer } from '@/api/user.js';
-import { mapMutations,mapState } from 'vuex';
+import { getUserInfo, transfer, yuetransfer, cashtransfer } from '@/api/user.js';
+import { mapMutations, mapState } from 'vuex';
 export default {
 	filters: {
 		getMoneyStyle
@@ -36,13 +52,14 @@ export default {
 		return {
 			money: '0.00', //可提现金额
 			withdrawal: '', //提现金额
-			password:'',//支付密码
-			card:'',//转账卡号
-			name:'',
+			password: '', //支付密码
+			card: '', //转账卡号
+			name: '',
 			// #ifdef H5
 			weichatBsrowser: false,
 			// #endif
-			loding:false,
+			loding: false,
+			type: 'xl'
 		};
 	},
 	onLoad(options) {
@@ -50,22 +67,34 @@ export default {
 		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
 		// #endif
 		this.dataUp();
+		if (options.type) {
+			this.type = options.type;
+			console.log(this.type);
+		}
 	},
 	computed: {
-		...mapState('user', ['userInfo']) 
+		...mapState('user', ['userInfo']),
+		realmoney() {
+			return (this.withdrawal * 0.9).toFixed(2) * 1;
+		},
+		gy() {
+			return (this.withdrawal * 0.08).toFixed(2) * 1;
+		}
 	},
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'login']),
 		// 更新数据
-		dataUp(){
+		dataUp() {
 			let obj = this;
-			getUserInfo({}).then((e) => {
-				obj.login();
-				// 保存返回用户数据
-				obj.setUserInfo(e.data);
-			}).catch((e) => {
-				console.log(e);
-			})
+			getUserInfo({})
+				.then(e => {
+					obj.login();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+				})
+				.catch(e => {
+					console.log(e);
+				});
 		},
 		// 切换选中对象
 		tabRadio(e) {
@@ -75,46 +104,86 @@ export default {
 		confirm() {
 			let obj = this;
 			obj.loding = true;
-			if(obj.withdrawal == 0){
+			if (obj.withdrawal == 0) {
 				obj.loding = false;
 				uni.showModal({
-					title:"提示",
-					content:"转账金额不要为0"
-				})
+					title: '提示',
+					content: '转账金额不要为0'
+				});
 				return;
 			}
-			if(obj.card == obj.userInfo.phone){
+			if (obj.card == obj.userInfo.phone) {
 				obj.loding = false;
 				uni.showModal({
-					title:"提示",
-					content:"不要输入自己的用户账号"
-				})
-			}else{
-				
+					title: '提示',
+					content: '不要输入自己的用户账号'
+				});
+			} else {
 				let data = {
-					to_user_account:obj.card, //编号
+					to_user_account: obj.card, //编号
 					num: obj.withdrawal //金额
+				};
+				if (obj.type == 'xl') {
+					transfer(data)
+						.then(e => {
+							// 允许按钮点击
+							obj.loding = false;
+							// 初始化提现金额
+							obj.withdrawal = '';
+							uni.showToast({
+								title: '提交成功',
+								duration: 2000,
+								position: 'top'
+							});
+							obj.dataUp();
+						})
+						.catch(e => {
+							obj.$api.msg(e.msg);
+							obj.loding = false;
+							console.log();
+						});
+				}
+				if (obj.type == 'yue') {
+					yuetransfer(data)
+						.then(e => {
+							// 允许按钮点击
+							obj.loding = false;
+							// 初始化提现金额
+							obj.withdrawal = '';
+							uni.showToast({
+								title: '提交成功',
+								duration: 2000,
+								position: 'top'
+							});
+							obj.dataUp();
+						})
+						.catch(e => {
+							obj.$api.msg(e.msg);
+							obj.loding = false;
+							console.log();
+						});
 				}
-				transfer(data)
-					.then(e => {
-						// 允许按钮点击
-						obj.loding = false;
-						// 初始化提现金额
-						obj.withdrawal = ''
-						uni.showToast({
-							title: '提交成功',
-							duration: 2000,
-							position: 'top'
+				if (obj.type == 'cash') {
+					cashtransfer(data)
+						.then(e => {
+							// 允许按钮点击
+							obj.loding = false;
+							// 初始化提现金额
+							obj.withdrawal = '';
+							uni.showToast({
+								title: '提交成功',
+								duration: 2000,
+								position: 'top'
+							});
+							obj.dataUp();
+						})
+						.catch(e => {
+							obj.$api.msg(e.msg);
+							obj.loding = false;
+							console.log();
 						});
-						obj.dataUp();
-					})
-					.catch(e => {
-						obj.$api.msg(e.msg)
-						obj.loding = false;
-						console.log();
-					});
+				}
 			}
-			
 		}
 	}
 };
@@ -129,9 +198,9 @@ page {
 	background: #ffffff;
 }
 
-.item{
+.item {
 	padding: 0 $page-row-spacing;
-	background-color: #FFFFFF;
+	background-color: #ffffff;
 }
 .flex {
 	background-color: #ffffff;
@@ -191,24 +260,20 @@ page {
 		}
 
 		.buttom {
-			color: $base-color;
+			color: #f21f5d;
 			font-size: $font-base;
 		}
 	}
 }
 .add-btn {
-	background: $base-color;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
+	width: 520rpx;
 	height: 80rpx;
-	margin: 0 auto;
-	margin-top: 30rpx;
-	font-size: $font-lg;
-	border-radius: 10rpx;
-	color: #fff;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	border: 2rpx solid #f21f5d;
+	border-radius: 40rpx;
+	margin: 140rpx auto;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #f21f5d;
 }
 .name {
 	background: #fff;
@@ -252,6 +317,10 @@ page {
 		}
 	}
 }
+.tip {
+	padding: 20rpx;
+	color: #ff0000;
+}
 /deep/ .uni-radio-input {
 	width: 45rpx;
 	height: 45rpx;

+ 10 - 24
pages/money/withdrawal.vue

@@ -4,28 +4,28 @@
 			<view class="flex ">
 				<view class="buttom">
 					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可转金额</text>
+					<text class="text">可转金额</text>
 				</view>
 			</view>
 		</view>
 		<view class="row-box">
-			<view class="title">转金额</view>
+			<view class="title">转金额</view>
 			<view class="row">
 				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="withdrawal" placeholder="请输入佣金数量" placeholder-class="placeholder" />
-				<view class="buttom" @click="withdrawal = money">全部转</view>
+				<input class="input" type="number" v-model="withdrawal" placeholder="请输入消费券数量" placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = money">全部转</view>
 			</view>
 		</view>
 		<button class="add-btn up" @click="confirm">提交申请</button>
 		<view class="tip" v-if="withdrawal != 0">
-			实际到账{{ realmoney }}现金,佣金流入{{ gy }}至公益池
+			实际到账{{ realmoney }}现金,{{ gy }}响亮积分
 		</view>
 	</view>
 </template>
 
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
-import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
+import { exchangeCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
 import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
 export default {
 	filters: {
@@ -58,10 +58,10 @@ export default {
 	},
 	computed:{
 		realmoney() {
-			return (this.withdrawal * 0.9).toFixed(2) * 1
+			return (this.withdrawal * 0.7).toFixed(2) * 1
 		},
 		gy() {
-			return (this.withdrawal * 0.08).toFixed(2) * 1
+			return (this.withdrawal * 0.3).toFixed(2) * 1
 		}
 	},
 	methods: {
@@ -85,9 +85,8 @@ export default {
 		// 加载余额信息
 		async loadData() {
 			extractBank({}).then(({ data }) => {
-				this.money = data.moneyCount;//可提现余额
+				this.money = data.commissionCount;//可提现余额
 				this.minPrice = data.minPrice;//最小提现
-				this.freeze =data.inmoneyCount//提现中的余额
 			});
 		},
 		// 跳转
@@ -103,22 +102,9 @@ export default {
 		// 提交
 		confirm() {
 			let data = {
-				extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
 				money: this.withdrawal, //金额
-				money_type: 1//0佣金1余额
 			}
-			if (this.type=='alipay') {
-				data.name = this.aliData.fullname;
-				data.alipay_code = this.aliData.alino;
-			}
-			if (this.type=='bank') {
-				data.name = this.bankData.fullname;
-				data.bankname = this.bankData.bank;
-				data.cardnum = this.bankData.bankno;
-			}
-			
-			
-			extractCash(data)
+			exchangeCash(data)
 				.then(e => {
 					uni.showToast({
 						title: '提交成功',

+ 4 - 4
pages/order/createOrder.vue

@@ -1,8 +1,8 @@
 <template>
 	<view>
-		<view class="navbar">
+		<!-- <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>
+		</view> -->
 
 		<!-- 地址 -->
 		<navigator v-if="tabCurrentIndex == 0" url="/pages/set/address?source=1" class="address-section">
@@ -709,9 +709,9 @@ page {
 		height: 100%;
 		color: #fff;
 		font-size: 32rpx;
-		background-color: $base-color;
+		background-color: #FF4C4C;
 		&.submitNo {
-			background-color: $font-color-disabled;
+			background-color:  #FF4C4C;
 		}
 	}
 }

+ 1 - 1
pages/order/order.vue

@@ -58,7 +58,7 @@
 							<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>
+							<button v-if="item._status._title == '未发货' && item.is_gift != 1" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
 						</view>
 					</view>
 

+ 7 - 12
pages/product/common/productBottom.vue

@@ -4,10 +4,6 @@
 			<text class="iconfont iconhome"></text>
 			<text>首页</text>
 		</navigator>
-		<view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
-			<text class="iconfont " :class="{ iconlike: !goodsObjact.userCollect, iconlikefill: goodsObjact.userCollect }"></text>
-			<text>收藏</text>
-		</view>
 		<view class="action-btn-group">
 			<button type="primary" class=" action-btn no-border add-cart-btn" @click="buy(2)">加入购物车</button>
 			<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
@@ -71,10 +67,11 @@ export default {
 	bottom: 0rpx;
 	z-index: 95;
 	display: flex;
-	justify-content: center;
+	justify-content: space-between;
+	padding-left: 20rpx;
 	align-items: center;
 	width: 750rpx;
-	height: 120rpx;
+	height: 96rpx;
 	background-color: #ffffff;
 	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
 	border-radius: 16rpx; */
@@ -106,8 +103,7 @@ export default {
 	}
 	.action-btn-group {
 		display: flex;
-		height: 76rpx;
-		border-radius: 100px;
+		height: 96rpx;
 		overflow: hidden;
 		margin-left: 20rpx;
 		position: relative;
@@ -119,23 +115,22 @@ export default {
 			transform: translateY(-50%);
 			height: 28rpx;
 			width: 0;
-			border-right: 1px solid rgba(255, 255, 255, 0.5);
 		}
 		.action-btn {
 			display: flex;
 			align-items: center;
 			justify-content: center;
-			width: 270rpx;
+			width: 300rpx;
 			height: 100%;
 			font-size: $font-base;
 			padding: 0;
 			border-radius: 0;
 			background: transparent;
 			&.buy-now-btn {
-				background-color: #303e49;
+				background-color: #FF4C4C;
 			}
 			&.add-cart-btn {
-				background-color: $base-color;
+				background-color: #FFB238;
 			}
 		}
 	}

+ 11 - 39
pages/product/common/productContent.vue

@@ -1,27 +1,14 @@
 <template>
 	<view class="introduce-section">
-		<text class="title clamp2">{{ goodsObjact.store_name }}</text>
-		<button open-type="share" class="shareDate">
-			<image class="share-img" src="../../../static/img/img57.png"></image>
-			好物推荐
-		</button>
-		<text class="info" v-if="goodsObjact.store_info">{{ goodsObjact.store_info }}</text>
-		<!-- <view class="progress-box">
-			<progress :percent="goodsObjact.percent | parseIntTo" activeColor="#F65527" font-size="10" show-info border-radius="5" stroke-width="9" />
-			<view class="number">剩余{{ goodsObjact.percent | parseIntTo }}%</view>
-		</view> -->
 		<view class="price-box">
 			<text class="price-tip">¥</text>
 			<view class="price">
 				{{ goodsObjact.price }}
-				<text class="text">/份</text>
 				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
 			</view>
 		</view>
-		<view class="price-green">
-			¥{{ goodsObjact.ot_price }}
-			<text>市场价</text>
-		</view>
+		<text class="title clamp2">{{ goodsObjact.store_name }}</text>
+		<text class="info" v-if="goodsObjact.store_info">{{ goodsObjact.store_info }}</text>
 	</view>
 </template>
 
@@ -59,15 +46,13 @@ export default {
 .introduce-section {
 	position: relative;
 	background: #fff;
-	padding: 35rpx 0rpx;
-	padding-left: 35rpx;
+	padding: 26rpx 26rpx 30rpx 20rpx;
 	.title {
-		font-size: 32rpx;
-		color: $font-color-dark;
-		.tip-o {
-			color: #ff3334;
-			padding-left: 15rpx;
-		}
+		margin-top: 26rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 800;
+		color: #333333;
 	}
 	.shareDate {
 		position: absolute;
@@ -111,28 +96,15 @@ export default {
 		display: flex;
 		align-items: baseline;
 		height: 64rpx;
-		padding: 10rpx 0;
 		font-size: 26rpx;
-		color: $uni-color-primary;
+		color: #FF4C4C;
 	}
 	.price {
-		font-size: $font-lg + 6rpx;
+		font-size: 50rpx;
 		.text {
 			padding-left: 5rpx;
 			color: #b0b0b0;
-			font-size: 22rpx !important;
-		}
-	}
-	.price-green {
-		color: #2dbd59;
-		font-size: 28rpx !important;
-		text {
-			background: #2dbd59;
-			color: #ffffff;
-			padding: 0rpx 10rpx;
-			border-radius: 5rpx;
-			font-size: 22rpx !important;
-			margin-left: 15rpx;
+			font-size: 32rpx !important;
 		}
 	}
 	.m-price {

+ 15 - 16
pages/product/list.vue

@@ -21,7 +21,7 @@
 		<view class="goods-list">
 			<view v-for="(item, index) in goodsList" :key="index" class="goods-item" @click="navToDetailPage(item)">
 				<view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
-				<text class="title clamp">{{ item.title }}</text>
+				<text class="title clamp">{{ item.store_name }}</text>
 				<view class="price-box">
 					<text class="price">{{ item.price }}</text>
 					<text>已售 {{ item.sales }}</text>
@@ -62,7 +62,7 @@ export default {
 			filterIndex: 0, //查询类型
 			numberOrder: 0, //1 销量从低到高 2销量从高到低
 			limit: 6, //每次加载数据条数
-			page: 0, //当前页数
+			page: 1, //当前页数
 			cateId: 0, //已选三级分类id
 			priceOrder: 0, //1 价格从低到高 2价格从高到低
 			cateList: [], //分类列表
@@ -72,7 +72,7 @@ export default {
 
 	onLoad(options) {
 		// #ifdef H5
-		this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
+		// this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
 		// #endif
 		this.cateId = options.tid;
 		this.loadCateList(options.fid, options.sid);
@@ -99,14 +99,10 @@ export default {
 		async loadCateList(fid, sid) {
 			let obj = this;
 			getCategoryList({}).then(function(e) {
-				console.log(e);
-				e.data.forEach(function(e) {
-					if (e.id == fid) {
-						obj.cateList = e.children;
-						return;
-					}
-				});
-				console.log(obj.cateList);
+				obj.cateList = e.data.filter(e => {
+					return e.id != 1
+				})
+				console.log(obj.cateList,"123456789");
 			});
 		},
 		//加载商品 ,带下拉刷新和上滑加载
@@ -141,7 +137,10 @@ export default {
 			}
 			getProducts(data).then(function(e) {
 				console.log(e.data);
-				obj.goodsList = obj.goodsList.concat(e.data);
+				let arr = e.data.filter(info => {
+					return (info.cate_id != 2)
+				})
+				obj.goodsList = obj.goodsList.concat(arr);
 				//判断是否还有下一页,有是more  没有是nomore
 				if (obj.limit==e.data.length) {
 					obj.page++
@@ -253,16 +252,16 @@ page,
 		color: $font-color-dark;
 		position: relative;
 		&.current {
-			color: $base-color;
+			color: #FF4C4C;
 			&:after {
 				content: '';
 				position: absolute;
 				left: 50%;
 				bottom: 0;
 				transform: translateX(-50%);
-				width: 120rpx;
+				width: 150rpx;
 				height: 0;
-				border-bottom: 4rpx solid $base-color;
+				border-bottom: 4rpx solid #FF4C4C;
 			}
 		}
 	}
@@ -403,7 +402,7 @@ page,
 	}
 	.price {
 		font-size: $font-lg;
-		color: $uni-color-primary;
+		color: #FF4C4C;
 		line-height: 1;
 		&:before {
 			content: '¥';

+ 189 - 99
pages/product/product.vue

@@ -4,6 +4,18 @@
 		<top-swiper :imgList="imgList"></top-swiper>
 		<!-- 标题 -->
 		<product-content :goodsObjact="goodsObjact"></product-content>
+		<view class="c-list">
+			<view class="c-row b-b" @click="toggleSpec">
+				<text class="tit">购买数量</text>
+				<view class="con">
+					<text class="selected-text">{{ goodsNumber }}</text>
+				</view>
+				<text class="iconfont iconenter"></text>
+			</view>
+			<view class="c-row b-b">
+				<text>每购买一个送{{goodsObjact.give_integral}}响亮积分</text>
+			</view>
+		</view>
 		<!-- 拼货时间及优惠 -->
 		<!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
 		<!-- 猜你喜欢 -->
@@ -26,13 +38,13 @@
 				<view class="a-t">
 					<image :src="actionImage"></image>
 					<view class="right">
-						<text class="name">{{ goodsObjact.store_name }}</text>
-						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
-						<text class="stock">库存:{{ goodsStore }}件</text>
-						<view class="selected" v-if="specList != ''">
+						<view class="good-name clamp">{{ goodsObjact.store_name }}</view>
+						<text class="price">¥{{ actionPrice }}</text>
+						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
+						<!-- <view class="selected" v-if="goodsType == 0">
 							已选:
 							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
-						</view>
+						</view> -->
 					</view>
 				</view>
 				<view v-for="(item, index) in specList" :key="index" class="attr-list">
@@ -49,26 +61,26 @@
 						</text>
 					</view>
 				</view>
-				<!-- <view class="attr-list">
-					<text>购买数量</text>
+				<view class="flex">
+					<view>购买数量</view>
 					<view class="item-list">
 						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
 					</view>
-				</view> -->
-				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
-				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
+				</view>
+				<button class="btn" @click.stop="buy">确定</button>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+import uniNumberBox from '@/components/uni-number-box.vue';
 import { goodsDetail, cartAdd } from '@/api/product.js';
 import { mapState } from 'vuex';
 import store from '@/store/index.js';
 import { saveUrl } from '@/utils/loginUtils.js';
 // #ifdef H5
-import { weixindata } from '@/utils/wxAuthorized';
+import { weixindata, shareLoad } from '@/utils/wxAuthorized';
 // #endif
 // 头部轮播图
 import topSwiper from './common/topSwiper.vue';
@@ -88,6 +100,7 @@ import guessLike from './common/guessLike.vue';
 import estimate from './common/estimate.vue';
 export default {
 	components: {
+		uniNumberBox,
 		guessLike,
 		topSwiper,
 		productContent,
@@ -148,7 +161,7 @@ export default {
 				s: '' //秒
 			},
 			userInfo: '',
-			isVip: '0',
+			isVip: '0'
 		};
 	},
 	filters: {
@@ -174,9 +187,9 @@ export default {
 			uni.setStorageSync('spread', options.spread);
 		}
 		if (options.isVip) {
-			obj.isVip = options.isVip
+			obj.isVip = options.isVip;
 		}
-		console.log(obj.isVip,'vip')
+		console.log(obj.isVip, 'vip');
 		saveUrl();
 		this.goodsDetail();
 		// 注册邀请信息
@@ -188,36 +201,37 @@ export default {
 		// #endif
 	},
 	computed: {
-		...mapState(['weichatObj', 'baseURL', 'urlFile']),
+		...mapState(['weichatObj', 'baseURL', 'urlFile'])
 	},
 	// 分享
-	onShareAppMessage(options) {
-		// 设置菜单中的转发按钮触发转发事件时的转发内容
-		let pages = getCurrentPages(); //获取加载的页面
-		let currentPage = pages[pages.length - 1]; //获取当前页面的对象
-		let url = currentPage.route; //当前页面url
-		let item = currentPage.options; //如果要获取url中所带的参数可以查看options
-		let shareObj = {
-			title: this.goodsObjact.store_name + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
-			path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
-			imageUrl: this.goodsObjact.image,
-			success: function(res) {
-				// 转发成功之后的回调
-				if (res.errMsg == 'shareAppMessage:ok') {
-				}
-			},
-			fail: function() {
-				// 转发失败之后的回调
-				if (res.errMsg == 'shareAppMessage:fail cancel') {
-					// 用户取消转发
-				} else if (res.errMsg == 'shareAppMessage:fail') {
-					// 转发失败,其中 detail message 为详细失败信息
-				}
-			}
-		};
-
-		return shareObj;
-	},
+	// onShareAppMessage(options) {
+	// 	// 设置菜单中的转发按钮触发转发事件时的转发内容
+	// 	let pages = getCurrentPages(); //获取加载的页面
+	// 	let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+	// 	let url = currentPage.route; //当前页面url
+	// 	let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+	// 	let shareObj = {
+	// 		title: this.goodsObjact.store_name,
+	// 		desc: obj.goodsObjact.store_info,
+	// 		path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
+	// 		imageUrl: this.goodsObjact.image,
+	// 		success: function(res) {
+	// 			// 转发成功之后的回调
+	// 			if (res.errMsg == 'shareAppMessage:ok') {
+	// 			}
+	// 		},
+	// 		fail: function() {
+	// 			// 转发失败之后的回调
+	// 			if (res.errMsg == 'shareAppMessage:fail cancel') {
+	// 				// 用户取消转发
+	// 			} else if (res.errMsg == 'shareAppMessage:fail') {
+	// 				// 转发失败,其中 detail message 为详细失败信息
+	// 			}
+	// 		}
+	// 	};
+
+	// 	return shareObj;
+	// },
 	methods: {
 		//选择规格
 		selectSpec(item, arr, ind) {
@@ -271,6 +285,31 @@ export default {
 				url: '/pages/coupon/getcoupon'
 			});
 		},
+		// #ifdef H5
+		// 加载微信html5页面分享方法
+		shareDate() {
+			let obj = this;
+			// 保存分享人id链接
+			let url = window.location.href + '&spread=' + this.userInfo.uid;
+			// 判断是否微信浏览器
+			let bool = uni.getStorageSync('weichatBrowser') || '';
+			if (bool) {
+				// 过滤微信强制添加的链接地址
+				url = url.replace(/[\?,&]from=singlemessage/g, '');
+				let data = {
+					link: url, // 分享链接
+					imgUrl: obj.goodsObjact.image, // 分享图标
+					desc: obj.goodsObjact.store_info,
+					title: obj.goodsObjact.store_name,
+					success: function(e) {
+						console.log(e);
+					}
+				};
+				console.log(data, '分享');
+				shareLoad(data);
+			}
+		},
+		// #endif
 		//详情页
 		navToDetailPage(item) {
 			let id = item.id;
@@ -349,34 +388,61 @@ export default {
 					obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
 				}
 				obj.shopId = data.mer_id; //保存商店id
+				// #ifdef H5
+				obj.shareDate();
+				// #endif
 			});
 		},
+		// #ifdef H5
+		// 加载微信html5页面分享方法
+		shareDate() {
+			let obj = this;
+			// 保存分享人id链接
+			let url = window.location.href + '&spread=' + this.userInfo.uid;
+			// 判断是否微信浏览器
+			let bool = uni.getStorageSync('weichatBrowser') || '';
+			if (bool) {
+				// 过滤微信强制添加的链接地址
+				url = url.replace(/[\?,&]from=singlemessage/g, '');
+				let data = {
+					link: url, // 分享链接
+					imgUrl: obj.goodsObjact.image, // 分享图标
+					desc: obj.goodsObjact.store_info,
+					title: obj.goodsObjact.store_name,
+					success: function(e) {
+						console.log(e);
+					}
+				};
+				shareLoad(data);
+			}
+		},
+		// #endif
 		// 立即购买
 		buy() {
 			let obj = this;
 			console.log(obj.userInfo);
-			if(obj.userInfo.lock_spread_user == null){
-				if(obj.userInfo.unlock_spread_user == null){
+			if (obj.userInfo.lock_spread_user == null) {
+				if (obj.userInfo.unlock_spread_user == null) {
 					uni.showModal({
 						title: '提示',
 						content: '您未绑定或锁定邀请人,无法购买会员礼包,是否前往绑定关系',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								console.log('用户点击确定');
 								uni.navigateTo({
-									url:'/pages/set/user'
-								})
+									url: '/pages/set/user'
+								});
 							} else if (res.cancel) {
 								console.log('用户点击取消');
 							}
 						}
 					});
-					return
-				}else {
+					return;
+				} else {
 					uni.showModal({
 						title: '提示',
-						content: '已锁定邀请人:'+ obj.userInfo.unlock_spread_user.phone +'购买商品后将绑定关系',
-						success: function (res) {
+						content: '已锁定邀请人:' + obj.userInfo.unlock_spread_user.phone + '购买商品后将绑定关系',
+						success: function(res) {
 							if (res.confirm) {
 								obj.buy1();
 							} else if (res.cancel) {
@@ -384,7 +450,7 @@ export default {
 							}
 						}
 					});
-					return
+					return;
 				}
 			}
 			// 创建传值对象
@@ -422,7 +488,7 @@ export default {
 					console.log(e);
 				});
 		},
-		buy1(){
+		buy1() {
 			let obj = this;
 			let data = {
 				cartNum: obj.goodsNumber, //商品数量
@@ -430,7 +496,7 @@ export default {
 				productId: obj.goodsid, //商品编号
 				uniqueId: obj.uniqueId
 			};
-			
+
 			if (obj.type == 2) {
 				data.new = 0;
 			}
@@ -473,32 +539,27 @@ export default {
 	right: 0;
 	bottom: 0;
 	z-index: 99;
+
 	&.show {
 		display: block;
-
 		.mask {
 			animation: showPopup 0.2s linear both;
 		}
-
 		.layer {
 			animation: showLayer 0.2s linear both;
 		}
 	}
-
 	&.hide {
 		.mask {
 			animation: hidePopup 0.2s linear both;
 		}
-
 		.layer {
 			animation: hideLayer 0.2s linear both;
 		}
 	}
-
 	&.none {
 		display: none;
 	}
-
 	.mask {
 		position: fixed;
 		top: 0;
@@ -507,62 +568,53 @@ export default {
 		z-index: 1;
 		background-color: rgba(0, 0, 0, 0.4);
 	}
-
 	.layer {
 		position: fixed;
 		z-index: 99;
 		bottom: 0;
 		width: 100%;
-		min-height: 35vh;
+		min-height: 30vh;
 		border-radius: 10rpx 10rpx 0 0;
 		background-color: #fff;
-
 		.btn {
 			height: 66rpx;
 			line-height: 66rpx;
 			border-radius: 100rpx;
-			background: $uni-color-primary;
+			// background: $uni-color-primary;
+			background: #FF4C4C;
 			font-size: $font-base + 2rpx;
 			color: #fff;
 			margin: 30rpx auto 20rpx;
 		}
 	}
-
 	@keyframes showPopup {
 		0% {
 			opacity: 0;
 		}
-
 		100% {
 			opacity: 1;
 		}
 	}
-
 	@keyframes hidePopup {
 		0% {
 			opacity: 1;
 		}
-
 		100% {
 			opacity: 0;
 		}
 	}
-
 	@keyframes showLayer {
 		0% {
 			transform: translateY(120%);
 		}
-
 		100% {
 			transform: translateY(0%);
 		}
 	}
-
 	@keyframes hideLayer {
 		0% {
 			transform: translateY(0);
 		}
-
 		100% {
 			transform: translateY(120%);
 		}
@@ -570,18 +622,15 @@ export default {
 }
 /* 规格选择弹窗 */
 .attr-content {
-	padding: 25rpx 30rpx;
-
+	padding: 10rpx 30rpx;
 	.a-t {
 		display: flex;
-
 		image {
 			width: 170rpx;
 			height: 170rpx;
 			flex-shrink: 0;
 			border-radius: 8rpx;
 		}
-
 		.right {
 			display: flex;
 			flex-direction: column;
@@ -589,30 +638,30 @@ export default {
 			font-size: $font-sm + 2rpx;
 			color: $font-color-base;
 			line-height: 42rpx;
-			width: 75%;
-
-			.price {
-				font-size: $font-lg;
-				color: $uni-color-primary;
-				margin: 10rpx 0rpx;
+			.good-name {
+				padding-top: 20rpx;
+				max-width: 320rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #1d2023;
+				line-height: 42rpx;
+				margin-bottom: 15rpx;
 			}
-
-			.name {
-				font-size: 32rpx;
-				color: $font-color-dark;
-				height: 50rpx;
-				overflow: hidden;
-				text-overflow: ellipsis;
-				white-space: nowrap;
-				display: block;
+			.price {
+				font-size: 60rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #ff6f0f;
+				// font-size: $font-lg;
+				// color: $uni-color-primary;
+				// margin-bottom: 10rpx;
 			}
-
 			.selected-text {
 				margin-right: 10rpx;
 			}
 		}
 	}
-
 	.attr-list {
 		display: flex;
 		flex-direction: column;
@@ -621,17 +670,16 @@ export default {
 		padding-top: 30rpx;
 		padding-left: 10rpx;
 	}
-
 	.item-list {
 		padding: 20rpx 0 0;
 		display: flex;
 		flex-wrap: wrap;
-
-		text {
+		.tit {
 			display: flex;
 			align-items: center;
 			justify-content: center;
 			background: #eee;
+			// margin-left: 10rpx;
 			margin-right: 20rpx;
 			margin-bottom: 20rpx;
 			border-radius: 100rpx;
@@ -641,10 +689,10 @@ export default {
 			font-size: $font-base;
 			color: $font-color-dark;
 		}
-
 		.selected {
-			background: #ddffdf;
-			color: $uni-color-primary;
+			background: #FCEFF1;
+			border: 1px solid #EF041F;
+			color: #EF041F;
 		}
 	}
 }
@@ -683,4 +731,46 @@ page {
 	width: 100% !important;
 	height: auto;
 }
+.c-list {
+	margin-top: 20rpx;
+	font-size: $font-sm + 2rpx;
+	color: $font-color-base;
+	background: #fff;
+	.c-row {
+		display: flex;
+		align-items: center;
+		padding: 20rpx 30rpx;
+		position: relative;
+	}
+	.tit {
+		width: 140rpx;
+	}
+	.con {
+		flex: 1;
+		color: $font-color-dark;
+		.selected-text {
+			margin-right: 10rpx;
+		}
+	}
+	.bz-list {
+		height: 40rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-dark;
+		text {
+			display: inline-block;
+			margin-right: 30rpx;
+		}
+	}
+	.con-list {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		color: $font-color-dark;
+		line-height: 40rpx;
+	}
+	.red {
+		color: $uni-color-primary;
+	}
+}
+
 </style>

+ 16 - 8
pages/user/award.vue

@@ -4,27 +4,27 @@
 			<view class="status_bar"><!-- 这里是状态栏 --></view>
 			<view class="body-title">
 				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
-				<view class="header">我的佣金</view>
+				<view class="header">我的补贴券</view>
 			</view>
 			<view class="content-bg"><image src="../../static/img/yongjin-bg.png" mode=""></image></view>
 			<view class="money-box">
 				<view class="money">{{ userInfo.brokerage_price }}</view>
-				<view>我的佣金</view>
+				<view>我的补贴券</view>
 			</view>
 			<view class="money-btn" @click="navto('/pages/money/withdrawal')">
-				佣金转现金
+				补贴券转换
 				<text>></text>
 			</view>
 		</view>
 		<view class="info-box flex">
 			<view class="info-item">
 				<view class="info-font">累计收入</view>
-				<view class="info-num">300</view>
+				<view class="info-num">{{recharge}}</view>
 			</view>
 			<view class="shu"></view>
 			<view class="info-item">
-				<view class="info-font">累计提现</view>
-				<view class="info-num">300</view>
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{orderStatusSum}}</view>
 			</view>
 		</view>
 		<view class="navbar">
@@ -96,6 +96,8 @@ export default {
 			// 头部图高度
 			maxheight: '',
 			tabCurrentIndex: 0,
+			orderStatusSum: 0,
+			recharge: 0,
 			navList: [
 				{
 					state: 0,
@@ -136,6 +138,7 @@ export default {
 		},
 		//获取收入支出信息
 		async loadData(source) {
+			let obj = this;
 			//这里是将订单挂载到tab列表下
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
@@ -159,10 +162,15 @@ export default {
 				state
 			)
 				.then(({ data }) => {
-					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data[0].list);
+					obj.recharge = data.income;
+					obj.orderStatusSum = data.expend;
+						console.log(data);
+					if (data.list.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data.list[0].list);
 						console.log(navItem.orderList);
 						navItem.page++;
+					}else {
+						navItem.loadingType = 'noMore';
 					}
 					if (navItem.limit == data.length) {
 						//判断是否还有数据, 有改为 more, 没有改为noMore

+ 417 - 0
pages/user/cash.vue

@@ -0,0 +1,417 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar"><!-- 这里是状态栏 --></view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
+				<view class="header">我的现金</view>
+			</view>
+			<view class="content-bg"><image src="../../static/img/cash-bg.png" mode=""></image></view>
+			<view class="money-box">
+				<view class="money">{{ userInfo.cash }}</view>
+				<view>我的现金</view>
+			</view>
+			<view class="moneybtn-box">
+				<view class="money-btn" @click="navto('/pages/money/withdmoenys?type=cash')">
+					现金转账
+				</view>
+				<view class="money-btn" @click="navto('/pages/user/withdrawal')">
+					现金提现
+				</view>
+			</view>
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{recharge}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{orderStatusSum}}</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: maxheight }" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.mark }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+								<view v-if="item.status == 0" class="status">待发放</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+import { cashList, userBalance } from '@/api/wallet.js';
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import { mapState, mapMutations } from 'vuex';
+import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
+import empty from '@/uview-ui/components/u-empty/u-empty.vue';
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
+	components: {
+		empty,
+		uniLoadMore
+	},
+	onReady(res) {
+		var _this = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.swiper-box').boundingClientRect();
+				query.exec(function(res) {
+					_this.maxheight = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', _this.height);
+				});
+			},
+			fail: res => {}
+		});
+	},
+	data() {
+		return {
+			// 头部图高度
+			maxheight: '',
+			tabCurrentIndex: 0,
+			orderStatusSum: 0,
+			recharge: 0,
+			navList: [
+				{
+					state: 1,
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 0,
+					text: '支出',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}
+			],
+			money: ''
+		};
+	},
+	onLoad(options) {},
+	onShow() {
+		this.loadData();
+	},
+	methods: {
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		},
+		// 点击返回 我的页面
+		toBack() {
+			uni.navigateBack({});
+		},
+		//获取收入支出信息
+		async loadData(source) {
+			let obj = this
+			//这里是将订单挂载到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';
+
+			cashList(
+				{
+					page: navItem.page,
+					limit: navItem.limit,
+					pm: state
+				}
+			)
+				.then(({ data }) => {
+					obj.recharge = data.income;
+					obj.orderStatusSum = data.expend;
+					if (data.list.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data.list);
+						console.log(navItem.orderList);
+						navItem.page++;
+					}
+					if (navItem.limit == data.list.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;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #f1f1f1;
+	height: 100%;
+}
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
+.content-money {
+	position: relative;
+	height: 480rpx;
+	.content-bg {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		width: 750rpx;
+		height: 480rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.body-title {
+		height: 80rpx;
+		text-align: center;
+		font-size: 35rpx;
+		position: relative;
+		.header {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: 100%;
+			font-size: 36rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #fffeff;
+			height: 80rpx;
+			font-size: 36rpx;
+			font-weight: 700;
+			z-index: 9;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+		.goback-box {
+			position: absolute;
+			left: 18rpx;
+			top: 0;
+			height: 80rpx;
+			display: flex;
+			align-items: center;
+		}
+
+		.goback {
+			z-index: 100;
+			width: 34rpx;
+			height: 34rpx;
+		}
+	}
+}
+.info-box {
+	width: 670rpx;
+	height: 186rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	margin: -100rpx auto 0;
+	position: relative;
+	z-index: 2;
+	.info-item {
+		width: 50%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		line-height: 1;
+		.info-font {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #999999;
+		}
+		.info-num {
+			margin-top: 30rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #181818;
+		}
+	}
+	.shu {
+		width: 2rpx;
+		height: 74rpx;
+		background: #dcdfe6;
+	}
+}
+.moneybtn-box {
+	display: flex;
+	justify-content: space-between;
+	position: relative;
+	z-index: 2;
+	color: #ffffff;
+	padding:20rpx 50rpx ;
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #FFFFFF;
+}
+.money-box {
+	position: relative;
+	z-index: 2;
+	padding-top: 90rpx;
+	color: #ffffff;
+	text-align: center;
+	.money {
+		font-size: 72rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ffffff;
+	}
+	.text {
+		font-size: 30rpx;
+	}
+}
+
+.navbar {
+	margin-top: 20rpx;
+	display: flex;
+	height: 88rpx;
+	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: #999999;
+		position: relative;
+		&.current {
+			color: #000;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid #fe5b38;
+			}
+		}
+	}
+}
+//列表
+.swiper-box {
+	.order-item:last-child {
+		margin-bottom: 60rpx;
+	}
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			color: #fd5b23;
+			font-size: $font-lg;
+			text-align: right;
+			.status {
+				color: $font-color-light;
+			}
+		}
+	}
+}
+.list-scroll-content {
+	background: #ffffff;
+	height: 100%;
+}
+.content {
+	height: 100%;
+	.empty-content {
+		background-color: #ffffff;
+	}
+}
+.btn-box {
+	width: 674rpx;
+	height: 88rpx;
+	background: linear-gradient(0deg, #2e58ff, #32c6ff);
+	border-radius: 44rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	text-align: center;
+	line-height: 88rpx;
+	position: fixed;
+	bottom: 48rpx;
+	left: 0;
+	right: 0;
+	margin: 0 auto;
+}
+</style>

+ 1 - 3
pages/user/jiedianDetails.vue

@@ -29,7 +29,7 @@
 				<view class="box-content">
 					<view class="content-top">
 						<view class="content-top-left">
-							<view class="name">
+							<view class="name clamp">
 								{{item.user.nickname}}
 							</view>
 							<view class="time">
@@ -262,9 +262,7 @@
 					.name {
 						font-size: 30rpx;
 						font-weight: bold;
-
 					}
-
 					.time {
 						color: #999999;
 						margin-left: 15rpx;

+ 406 - 454
pages/user/mygx.vue

@@ -1,455 +1,407 @@
-<template>
-	<view class="content">
-		<view class="content-money">
-			<view class="status_bar">
-				<!-- 这里是状态栏 -->
-			</view>
-			<view class="body-title">
-				<view class="goback-box" @click="toBack">
-					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
-				</view>
-				<view class="header">我的贡献</view>
-			</view>
-			<view class="content-bg">
-				<image src="../../static/img/mygx.png" mode=""></image>
-			</view>
-			<view class="money-box">
-				<view class="money">{{ userInfo.brokerage_price }}</view>
-				<view>我的贡献</view>
-			</view>
-		</view>
-		<view class="info-box flex">
-			<view class="info-item">
-				<view class="info-font">累计收入</view>
-				<view class="info-num">300</view>
-			</view>
-			<view class="shu"></view>
-			<view class="info-item">
-				<view class="info-font">累计支出</view>
-				<view class="info-num">300</view>
-			</view>
-		</view>
-		<view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item"
-				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-		<swiper :current="tabCurrentIndex" :style="{ height: maxheight }" class="swiper-box" duration="300"
-			@change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view>
-						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
-							<view class="title-box">
-								<view class="title">
-									<text>{{ item.title }}</text>
-								</view>
-								<view class="time">
-									<text>{{ item.add_time }}</text>
-								</view>
-							</view>
-							<view class="money">
-								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
-								<view v-if="item.status == 0" class="status">待发放</view>
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType" v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	import {
-		spreadCommission,
-		userBalance
-	} from '@/api/wallet.js';
-	import {
-		getMoneyStyle
-	} from '@/utils/rocessor.js';
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
-	import empty from '@/uview-ui/components/u-empty/u-empty.vue';
-	export default {
-		filters: {
-			getMoneyStyle
-		},
-		computed: {
-			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-		},
-		components: {
-			empty,
-			uniLoadMore
-		},
-		onReady(res) {
-			var _this = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.swiper-box').boundingClientRect();
-					query.exec(function(res) {
-						_this.maxheight = resu.windowHeight - res[0].top + 'px';
-						console.log('打印页面的剩余高度', _this.height);
-					});
-				},
-				fail: res => {}
-			});
-		},
-		data() {
-			return {
-				// 头部图高度
-				maxheight: '',
-				tabCurrentIndex: 0,
-				navList: [{
-						state: 0,
-						text: '收入',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 ,//每次信息条数
-						loaded: false
-					},
-					{
-						state: 1,
-						text: '支出',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 ,//每次信息条数
-						loaded: false
-					}
-				],
-				money: ''
-			};
-		},
-		onLoad(options) {},
-		onShow() {
-			this.loadData();
-		},
-		methods: {
-			// 页面跳转
-			navto(e) {
-				uni.navigateTo({
-					url: e
-				});
-			},
-			// 点击返回 我的页面
-			toBack() {
-				uni.navigateBack({});
-			},
-			//获取收入支出信息
-			async loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state + 3;
-				if (source == 'tabChange' && navItem.loaded == true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType == 'loading' || navItem.loadingType == 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-
-				spreadCommission({
-							page: navItem.page,
-							limit: navItem.limit
-						},
-						state
-					)
-					.then(({
-						data
-					}) => {
-						if (data.length > 0) {
-							navItem.orderList = navItem.orderList.concat(data[0].list);
-							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;
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page {
-		background: #f1f1f1;
-		height: 100%;
-	}
-
-	.status_bar {
-		height: var(--status-bar-height);
-		width: 100%;
-	}
-
-	.content-money {
-		position: relative;
-		height: 480rpx;
-
-		.content-bg {
-			position: absolute;
-			top: 0;
-			left: 0;
-			right: 0;
-			width: 750rpx;
-			height: 480rpx;
-
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-
-		.body-title {
-			height: 80rpx;
-			text-align: center;
-			font-size: 35rpx;
-			position: relative;
-
-			.header {
-				position: absolute;
-				left: 0;
-				top: 0;
-				width: 100%;
-				font-size: 36rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #fffeff;
-				height: 80rpx;
-				font-size: 36rpx;
-				font-weight: 700;
-				z-index: 9;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-			}
-
-			.goback-box {
-				position: absolute;
-				left: 18rpx;
-				top: 0;
-				height: 80rpx;
-				display: flex;
-				align-items: center;
-			}
-
-			.goback {
-				z-index: 100;
-				width: 34rpx;
-				height: 34rpx;
-			}
-		}
-	}
-
-	.info-box {
-		width: 670rpx;
-		height: 186rpx;
-		background: #ffffff;
-		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
-		border-radius: 20rpx;
-		margin: -100rpx auto 0;
-		position: relative;
-		z-index: 2;
-
-		.info-item {
-			width: 50%;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			line-height: 1;
-
-			.info-font {
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #999999;
-			}
-
-			.info-num {
-				margin-top: 30rpx;
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #181818;
-			}
-		}
-	
-	.shu {
-			width: 2rpx;
-			height: 74rpx;
-			background: #dcdfe6;
-		}
-	}
-
-	.money-box {
-		position: relative;
-		z-index: 2;
-		padding-top: 90rpx;
-		color: #ffffff;
-		text-align: center;
-
-		.money {
-			font-size: 72rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #ffffff;
-		}
-
-		.text {
-			font-size: 30rpx;
-		}
-	}
-
-	.money-btn {
-		position: relative;
-		z-index: 2;
-		color: #ffffff;
-		padding-right: 50rpx;
-		text-align: right;
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #FFFFFF;
-
-		text {
-			display: inline-block;
-			padding-left: 10rpx;
-		}
-	}
-
-	.navbar {
-		margin-top: 20rpx;
-		display: flex;
-		height: 88rpx;
-		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: #999999;
-			position: relative;
-
-			&.current {
-				color: #000;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid #fe5b38;
-				}
-			}
-		}
-	}
-
-	//列表
-	.swiper-box {
-		.order-item:last-child {
-			margin-bottom: 60rpx;
-		}
-
-		.order-item {
-			padding: 20rpx 30rpx;
-			line-height: 1.5;
-
-			.title-box {
-				.title {
-					font-size: $font-lg;
-					color: $font-color-base;
-				}
-
-				.time {
-					font-size: $font-base;
-					color: $font-color-light;
-				}
-			}
-
-			.money {
-				color: #fd5b23;
-				font-size: $font-lg;
-				text-align: right;
-
-				.status {
-					color: $font-color-light;
-				}
-			}
-		}
-	}
-
-	.list-scroll-content {
-		background: #ffffff;
-		height: 100%;
-	}
-
-	.content {
-		height: 100%;
-
-		.empty-content {
-			background-color: #ffffff;
-		}
-	}
-
-	.btn-box {
-		width: 674rpx;
-		height: 88rpx;
-		background: linear-gradient(0deg, #2e58ff, #32c6ff);
-		border-radius: 44rpx;
-		font-size: 36rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #ffffff;
-		text-align: center;
-		line-height: 88rpx;
-		position: fixed;
-		bottom: 48rpx;
-		left: 0;
-		right: 0;
-		margin: 0 auto;
-	}
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar"><!-- 这里是状态栏 --></view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
+				<view class="header">我的分红积分</view>
+			</view>
+			<view class="content-bg"><image src="../../static/img/mygx.png" mode=""></image></view>
+			<view class="money-box">
+				<view class="money">{{ my_point }}</view>
+				<view>我的分红积分</view>
+				<view>1分红积分价值{{ price * 1}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { spreadCommission, userBalance } from '@/api/wallet.js';
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import { share } from '@/api/user.js';
+import { mapState, mapMutations } from 'vuex';
+import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
+import empty from '@/uview-ui/components/u-empty/u-empty.vue';
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
+	components: {
+		empty,
+		uniLoadMore
+	},
+	onReady(res) {
+		var _this = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.swiper-box').boundingClientRect();
+				query.exec(function(res) {
+					_this.maxheight = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', _this.height);
+				});
+			},
+			fail: res => {}
+		});
+	},
+	data() {
+		return {
+			// 头部图高度
+			maxheight: '',
+			tabCurrentIndex: 0,
+			price: 0,
+			my_point: 0,
+			navList: [
+				{
+					state: 0,
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10, //每次信息条数
+					loaded: false
+				},
+				{
+					state: 1,
+					text: '支出',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10, //每次信息条数
+					loaded: false
+				}
+			],
+			money: ''
+		};
+	},
+	onLoad(options) {},
+	onShow() {
+		share().then(({data}) =>{
+			this.price = data.price;
+			this.my_point = data.my_point;
+			console.log(data);
+		})
+		this.loadData();
+	},
+	methods: {
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		},
+		// 点击返回 我的页面
+		toBack() {
+			uni.navigateBack({});
+		},
+		//获取收入支出信息
+		async loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state + 3;
+			if (source == 'tabChange' && navItem.loaded == true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType == 'loading' || navItem.loadingType == 'noMore') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			spreadCommission(
+				{
+					page: navItem.page,
+					limit: navItem.limit
+				},
+				state
+			)
+				.then(({ data }) => {
+					if (data.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data[0].list);
+						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;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #f1f1f1;
+	height: 100%;
+}
+
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
+
+.content-money {
+	position: relative;
+	height: 480rpx;
+
+	.content-bg {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		width: 750rpx;
+		height: 480rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.body-title {
+		height: 80rpx;
+		text-align: center;
+		font-size: 35rpx;
+		position: relative;
+
+		.header {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: 100%;
+			font-size: 36rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #fffeff;
+			height: 80rpx;
+			font-size: 36rpx;
+			font-weight: 700;
+			z-index: 9;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+
+		.goback-box {
+			position: absolute;
+			left: 18rpx;
+			top: 0;
+			height: 80rpx;
+			display: flex;
+			align-items: center;
+		}
+
+		.goback {
+			z-index: 100;
+			width: 34rpx;
+			height: 34rpx;
+		}
+	}
+}
+
+.info-box {
+	width: 670rpx;
+	height: 186rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	margin: -100rpx auto 0;
+	position: relative;
+	z-index: 2;
+
+	.info-item {
+		width: 50%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		line-height: 1;
+
+		.info-font {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #999999;
+		}
+
+		.info-num {
+			margin-top: 30rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #181818;
+		}
+	}
+
+	.shu {
+		width: 2rpx;
+		height: 74rpx;
+		background: #dcdfe6;
+	}
+}
+
+.money-box {
+	position: relative;
+	z-index: 2;
+	padding-top: 90rpx;
+	color: #ffffff;
+	text-align: center;
+
+	.money {
+		font-size: 72rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ffffff;
+	}
+
+	.text {
+		font-size: 30rpx;
+	}
+}
+
+.money-btn {
+	position: relative;
+	z-index: 2;
+	color: #ffffff;
+	padding-right: 50rpx;
+	text-align: right;
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #ffffff;
+
+	text {
+		display: inline-block;
+		padding-left: 10rpx;
+	}
+}
+
+.navbar {
+	margin-top: 20rpx;
+	display: flex;
+	height: 88rpx;
+	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: #999999;
+		position: relative;
+
+		&.current {
+			color: #000;
+
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid #fe5b38;
+			}
+		}
+	}
+}
+
+//列表
+.swiper-box {
+	.order-item:last-child {
+		margin-bottom: 60rpx;
+	}
+
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+
+		.money {
+			color: #fd5b23;
+			font-size: $font-lg;
+			text-align: right;
+
+			.status {
+				color: $font-color-light;
+			}
+		}
+	}
+}
+
+.list-scroll-content {
+	background: #ffffff;
+	height: 100%;
+}
+
+.content {
+	height: 100%;
+
+	.empty-content {
+		background-color: #ffffff;
+	}
+}
+
+.btn-box {
+	width: 674rpx;
+	height: 88rpx;
+	background: linear-gradient(0deg, #2e58ff, #32c6ff);
+	border-radius: 44rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	text-align: center;
+	line-height: 88rpx;
+	position: fixed;
+	bottom: 48rpx;
+	left: 0;
+	right: 0;
+	margin: 0 auto;
+}
 </style>

+ 255 - 47
pages/user/scoreAccumulate.vue

@@ -1,68 +1,134 @@
 <template>
 	<view class="content">
-		<!-- <view class="navbar">
+		<view class="content-money">
+			<view class="status_bar"><!-- 这里是状态栏 --></view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
+				<view class="header">响亮积分</view>
+			</view>
+			<view class="content-bg"><image src="../../static/img/myjf.png" mode=""></image></view>
+			<view class="money-box">
+				<view class="money">{{userInfo.integral | getMoneyStyle}}</view>
+				<view>我的响亮积分</view>
+			</view>
+			<view class="money-btn" @click="navto('/pages/money/withdmoenys')">
+				积分转账
+				<text>></text>
+			</view>
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{recharge}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{orderStatusSum}}</view>
+			</view>
+		</view>
+		<view class="navbar">
 			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view> -->
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" @change="changeTab">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+				<scroll-view scroll-y="true" class="list-scroll-content" @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">
-							<view class="title">
-								<text>{{ item.mark }}</text>
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.mark }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
 							</view>
-							<view class="time">
-								<text>{{ item.add_time }}</text>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+								<view v-if="item.status == 0" class="status">待发放</view>
 							</view>
 						</view>
-						<view class="money">
-							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
-						</view>
 					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+					<uni-load-more :status="tabItem.loadingType" v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
-		<view class="btn" @click="navto('/pages/money/withdmoenys')">
-			响亮积分转账
-		</view>
 	</view>
 </template>
 
 <script>
-	
 import { integrallist } from '@/api/functionalUnit.js';
+import { getMoneyStyle } from '@/utils/rocessor.js';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
+import { mapState, mapMutations } from 'vuex';
 export default {
+	filters: {
+		getMoneyStyle
+	},
 	components: {
 		empty,
 		uniLoadMore
 	},
-	onReady() {
-		
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
+	onReady(res) {
+		var _this = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.swiper-box').boundingClientRect();
+				query.exec(function(res) {
+					_this.height = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', _this.height);
+				});
+			},
+			fail: res => {}
+		});
 	},
 	data() {
 		return {
+			height: '',
+			// 头部图高度
+			maxheight:'',
 			tabCurrentIndex: 0,
+			orderStatusSum: 0,
+			recharge: 0,
 			navList: [
+				// {
+				// 	state: 0,
+				// 	text: '全部',
+				// 	loadingType: 'more',
+				// 	orderList: [],
+				// 	page: 1, //当前页数
+				// 	limit: 10 //每次信息条数
+				// },
 				{
 					state: 0,
-					text: '全部',
+					text: '支出',
 					loadingType: 'more',
 					orderList: [],
 					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
+				{
+					state: 1,
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}
 			],
 		};
 	},
+	onLoad(options) {},
 	onShow() {
-		// 载入积分数据
 		this.loadData();
 	},
 	methods: {
@@ -74,6 +140,7 @@ export default {
 		},
 		//获取收入支出信息
 		async loadData(source) {
+			let obj = this
 			//这里是将订单挂载到tab列表下
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
@@ -92,16 +159,20 @@ export default {
 			integrallist(
 				{
 					page: navItem.page,
-					limit: navItem.limit
+					limit: navItem.limit,
+					pm: state
 				},
-				state
 			)
 				.then(({ data }) => {
-					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data);
+					obj.recharge = data.income;
+					obj.orderStatusSum = data.expend;
+					if (data.list.length > 0) {
+						console.log(data);
+						navItem.orderList = navItem.orderList.concat(data.list);
+						console.log(navItem.orderList);
 						navItem.page++;
 					}
-					if (navItem.limit == data.length) {
+					if (navItem.limit == data.list.length) {
 						//判断是否还有数据, 有改为 more, 没有改为noMore
 						navItem.loadingType = 'more';
 						return;
@@ -125,6 +196,11 @@ export default {
 		//顶部tab点击
 		tabClick(index) {
 			this.tabCurrentIndex = index;
+		},
+		toBack() {
+			uni.navigateBack({
+				
+			})
 		}
 	}
 };
@@ -132,12 +208,137 @@ export default {
 
 <style lang="scss">
 page {
-	background: #ffffff;
+	background: #f1f1f1;
 	height: 100%;
 }
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
+.content-money {
+	position: relative;
+	height: 480rpx;
+	.content-bg {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		width: 750rpx;
+		height: 480rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.body-title {
+		height: 80rpx;
+		text-align: center;
+		font-size: 35rpx;
+		position: relative;
+		.header {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: 100%;
+			font-size: 36rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #fffeff;
+			height: 80rpx;
+			font-size: 36rpx;
+			font-weight: 700;
+			z-index: 9;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+		.goback-box {
+			position: absolute;
+			left: 18rpx;
+			top: 0;
+			height: 80rpx;
+			display: flex;
+			align-items: center;
+		}
+
+		.goback {
+			z-index: 100;
+			width: 34rpx;
+			height: 34rpx;
+		}
+	}
+}
+.info-box {
+	width: 670rpx;
+	height: 186rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	margin: -100rpx auto 0;
+	position: relative;
+	z-index: 2;
+	.info-item {
+		width: 50%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		line-height: 1;
+		.info-font {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #999999;
+		}
+		.info-num {
+			margin-top: 30rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #181818;
+		}
+	}
+	.shu {
+		width: 2rpx;
+		height: 74rpx;
+		background: #dcdfe6;
+	}
+}
+.money-box {
+	position: relative;
+	z-index: 2;
+	padding-top: 90rpx;
+	color: #ffffff;
+	text-align: center;
+	.money {
+		font-size: 72rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ffffff;
+	}
+	.text {
+		font-size: 30rpx;
+	}
+}
+.money-btn {
+	position: relative;
+	z-index: 2;
+	color: #ffffff;
+	padding-right: 50rpx;
+	text-align: right;
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #FFFFFF;
+	text {
+		display: inline-block;
+		padding-left: 10rpx;
+	}
+}
+
 .navbar {
+	margin-top: 20rpx;
 	display: flex;
-	height: 40px;
+	height: 88rpx;
 	padding: 0 5px;
 	background: #fff;
 	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
@@ -150,10 +351,10 @@ page {
 		align-items: center;
 		height: 100%;
 		font-size: 15px;
-		color: $font-color-dark;
+		color: #999999;
 		position: relative;
 		&.current {
-			color: $base-color;
+			color: #000;
 			&:after {
 				content: '';
 				position: absolute;
@@ -162,16 +363,16 @@ page {
 				transform: translateX(-50%);
 				width: 44px;
 				height: 0;
-				border-bottom: 2px solid $base-color;
+				border-bottom: 2px solid #fe5b38;
 			}
 		}
 	}
 }
-// 列表
-
+//列表
 .swiper-box {
-	height: calc(100% - 44px);
-	padding-top: 10rpx;
+	.order-item:last-child {
+		margin-bottom: 60rpx;
+	}
 	.order-item {
 		padding: 20rpx 30rpx;
 		line-height: 1.5;
@@ -188,10 +389,15 @@ page {
 		.money {
 			color: #fd5b23;
 			font-size: $font-lg;
+			text-align: right;
+			.status {
+				color: $font-color-light;
+			}
 		}
 	}
 }
 .list-scroll-content {
+	background: #ffffff;
 	height: 100%;
 }
 .content {
@@ -200,19 +406,21 @@ page {
 		background-color: #ffffff;
 	}
 }
-.btn {
+.btn-box {
+	width: 674rpx;
+	height: 88rpx;
+	background: linear-gradient(0deg, #2e58ff, #32c6ff);
+	border-radius: 44rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	text-align: center;
+	line-height: 88rpx;
 	position: fixed;
-	bottom: 30rpx;
+	bottom: 48rpx;
 	left: 0;
 	right: 0;
-	width: 690upx;
-	height: 80upx;
 	margin: 0 auto;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10upx;
-	text-align: center;
-	line-height: 80upx;
 }
 </style>

+ 1 - 5
pages/user/team.vue

@@ -15,10 +15,8 @@
 		<swiper :current="tabCurrentIndex" :style="{ height: maxheight }" class="swiper-box" duration="300" @change="changeTab">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
 				<scroll-view class="list-scroll-content" :style="{ height: maxheight }" 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"></image></view>
@@ -118,9 +116,7 @@ export default {
 			})
 				.then(({ data }) => {
 					console.log(data);
-					this.total = data.total;
-					this.totalLevel = data.totalLevel;
-					this.all = this.total + this.totalLevel;
+					this.all = data.total;
 					if (data.list.length > 0) {
 						this.list = data.list;
 						navItem.orderList = navItem.orderList.concat(data.list);

+ 9 - 6
pages/user/user.vue

@@ -11,7 +11,7 @@
 			<view class="sy-box flex">
 				<view class="sy-item" @click="navTo('/pages/money/wallet')">
 					<view class="sy-item-name">余额</view>
-					<view class="sy-item-val">{{ userInfo.now_money || '0.00' }}</view>
+					<view class="sy-item-val">{{ userInfo.now_money  || '0.00' }}</view>
 				</view>
 				<view class="jg"></view>
 				<view class="sy-item" @click="navTo('/pages/user/scoreAccumulate')">
@@ -19,7 +19,7 @@
 					<view class="sy-item-val">{{ userInfo.integral || '0.00' }}</view>
 				</view>
 				<view class="jg"></view>
-				<view class="sy-item">
+				<view class="sy-item" @click="navTo('/pages/user/cash')">
 					<view class="sy-item-name">现金</view>
 					<view class="sy-item-val">{{ userInfo.cash }}</view>
 				</view>
@@ -29,15 +29,15 @@
 			<view class="order-section">
 				<view class="order-item" @click="navTo('/pages/user/award')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/myyj.png" mode="aspectFit"></image></view>
-					<text>我的佣金</text>
+					<text>我的补贴券</text>
 				</view>
-				<view class="order-item" @click="navTo('/pages/money/wallet')" hover-class="common-hover" :hover-stay-time="50">
+				<view class="order-item" @click="navTo('')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/myqb.png" mode="aspectFit"></image></view>
-					<text>我的钱包</text>
+					<text>公益基金</text>
 				</view>
 				<view class="order-item" @click="navTo('/pages/user/mygx')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/mygx.png" mode="aspectFit"></image></view>
-					<text>我的贡献值</text>
+					<text>分红积分</text>
 				</view>
 				<view class="order-item" @click="navTo('/pages/user/jiedian')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/myjd.png" mode="aspectFit"></image></view>
@@ -245,6 +245,9 @@ export default {
 		 * navigator标签现在默认没有转场动画,所以用view
 		 */
 		navTo(url) {
+			if(url == ''){
+				this.$api.msg('敬请期待')
+			}
 			if (!this.hasLogin) {
 				// 保存地址
 				saveUrl();

+ 28 - 39
pages/user/withdrawal.vue

@@ -1,27 +1,26 @@
 <template>
 	<view class="content">
-		<uni-notice-bar single="true" text="实际到账70%,剩余30%转化为响亮积分"></uni-notice-bar>
+		<!-- <uni-notice-bar single="true" text="实际到账98%"></uni-notice-bar> -->
 		<view class="content-money">
 			<view class="flex " style="width: 750rpx;justify-content: space-around;margin-left: 0;">
 				<view class="buttom">
-					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可提现金</text>
+					<view class="icon">{{ userInfo.cash | getMoneyStyle }}</view>
+					<text class="text">可提现金</text>
 				</view>
-				<!-- <view class="interval"></view>
-				<view class="buttom">
-					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
-					<text class="text">待审核提现佣金</text>
-				</view> -->
 			</view>
 		</view>
+		
 		<view class="row-box">
 			<view class="title">提现金额</view>
 			<view class="row">
 				<text class="tit">¥</text>
 				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'" placeholder-class="placeholder" />
-				<view class="buttom" @click="withdrawal = money">全部提现</view>
+				<view class="buttom" @click="withdrawal = userInfo.cash">全部提现</view>
 			</view>
 		</view>
+		<view class="tip" v-if="withdrawal != 0">
+			实际到账 {{ real }}元
+		</view>
 		<!-- #ifndef MP-WEIXIN -->
 		<view class="list" >
 			<radio-group @change="tabRadio">
@@ -95,6 +94,8 @@
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
+import { orderData, getUserInfo } from '@/api/user.js';
+import { mapState, mapMutations } from 'vuex';
 import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
 export default {
 	filters: {
@@ -103,6 +104,12 @@ export default {
 	components: {
 		uniNoticeBar
 	},
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+		real() {
+			return (this.withdrawal * 0.98).toFixed(2) * 1;
+		}
+	},
 	data() {
 		return {
 			type: 'alipay', //提现方式
@@ -133,29 +140,11 @@ export default {
 		// this.loadBank();
 	},
 	methods: {
-		// 更新数据
-		// dataUp() {
-		// 	this.loadAli();
-		// 	this.loadBank();
-		// },
-		// //加载数据
-		// async loadAli(source) {
-		// 	aliInfo({}).then(e => {
-		// 		this.aliData = e.data;
-		// 	});
-		// },
-		// // 加载银行卡信息
-		// async loadBank() {
-		// 	bankInfo({}).then(e => {
-		// 		this.bankData = e.data;
-		// 	});
-		// },
+		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
 		// 加载余额信息
 		async loadData() {
 			extractBank({}).then(({ data }) => {
-				this.money = data.commissionCount;
 				this.minPrice = data.minPrice;
-				this.freeze = data.incommissionCount;
 			});
 		},
 		// 跳转
@@ -185,17 +174,6 @@ export default {
 				});
 				return;
 			}
-			// if (this.type == 'alipay') {
-			// 	console.log('alipay');
-			// 	data.name = this.aliData.fullname;
-			// 	data.alipay_code = this.aliData.alino;
-			// }
-			// if (this.type == 'bank') {
-			// 	console.log(bank);
-			// 	data.name = this.bankData.fullname;
-			// 	data.bankname = this.bankData.bank;
-			// 	data.cardnum = this.bankData.bankno;
-			// }
 			if (this.type == 'alipay') {
 				console.log('alipay');
 				data.name = this.alipay_name;
@@ -210,6 +188,13 @@ export default {
 
 			extractCash(data)
 				.then(e => {
+					getUserInfo({})
+						.then(({ data }) => {
+							this.setUserInfo(data);
+						})
+						.catch(e => {
+							console.log(e);
+						});
 					uni.showToast({
 						title: '提交成功',
 						duration: 2000,
@@ -380,4 +365,8 @@ page {
 		color: $font-color-light;
 	}
 }
+.tip {
+	padding: 20rpx;
+	color: #FD3B39;
+}
 </style>

BIN
static/img/cash-bg.png


BIN
static/img/logo.jpg


BIN
static/img/myjf.png


BIN
static/img/paySuccess.png


BIN
unpackage/dist/build/h5/3-11-3.rar → unpackage/dist/build/h5/3-14-5.rar


+ 1 - 1
unpackage/dist/build/h5/index.html

@@ -1,2 +1,2 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>响亮商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.0c0314dc.js></script><script src=/index/static/js/index.b2f278b6.js></script></body></html>
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.0c0314dc.js></script><script src=/index/static/js/index.74c92c56.js></script></body></html>

BIN
unpackage/dist/build/h5/static/icon/bdsj.png


BIN
unpackage/dist/build/h5/static/icon/dsjh.png


BIN
unpackage/dist/build/h5/static/icon/fanhui.png


BIN
unpackage/dist/build/h5/static/icon/goto.png


BIN
unpackage/dist/build/h5/static/icon/i1.png


BIN
unpackage/dist/build/h5/static/icon/i2.png


BIN
unpackage/dist/build/h5/static/icon/i3.png


BIN
unpackage/dist/build/h5/static/icon/i4.png


BIN
unpackage/dist/build/h5/static/icon/kf.png


BIN
unpackage/dist/build/h5/static/icon/mygx.png


BIN
unpackage/dist/build/h5/static/icon/myjd.png


BIN
unpackage/dist/build/h5/static/icon/myqb.png


BIN
unpackage/dist/build/h5/static/icon/mytg.png


BIN
unpackage/dist/build/h5/static/icon/myyj.png


BIN
unpackage/dist/build/h5/static/icon/search-h.png


BIN
unpackage/dist/build/h5/static/icon/shdz.png


BIN
unpackage/dist/build/h5/static/icon/tghb.png


BIN
unpackage/dist/build/h5/static/img/cash-bg.8993f7b8.png


BIN
unpackage/dist/build/h5/static/img/cash-bg.png


BIN
unpackage/dist/build/h5/static/img/img009.609fc055.png


BIN
unpackage/dist/build/h5/static/img/img009.png


BIN
unpackage/dist/build/h5/static/img/img010.becc4342.png


BIN
unpackage/dist/build/h5/static/img/img010.png


BIN
unpackage/dist/build/h5/static/img/logo.jpg


BIN
unpackage/dist/build/h5/static/img/mygx.ca95ee72.png


BIN
unpackage/dist/build/h5/static/img/mygx.png


BIN
unpackage/dist/build/h5/static/img/myjf.6b34f1a7.png


BIN
unpackage/dist/build/h5/static/img/myjf.png


BIN
unpackage/dist/build/h5/static/img/myyue.0637582a.png


BIN
unpackage/dist/build/h5/static/img/myyue.png


BIN
unpackage/dist/build/h5/static/img/paySuccess.ca7ed587.png


BIN
unpackage/dist/build/h5/static/img/paySuccess.png


BIN
unpackage/dist/build/h5/static/img/user-top-bg.00e593af.png


BIN
unpackage/dist/build/h5/static/img/user-top-bg.png


BIN
unpackage/dist/build/h5/static/img/yongjin-bg.7a027847.png


BIN
unpackage/dist/build/h5/static/img/yongjin-bg.png


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/index.74c92c56.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/index.b2f278b6.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-activity-bargain-index.fc86a02a.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-activity-goods_bargain-index.f0500761.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-activity-goods_bargain_details-index.fa50a185.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-cart-cart.75a11be0.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-cart-cart~pages-category-business~pages-game-game~pages-index-index~pages-user-award~pages-use~a9e8262b.e7e04017.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-category-business.785c8fc5.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-category-business.f403dbed.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.194d144f.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.2b06e6f7.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-sign.3f578c44.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-sign1.1ba24fd5.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-sign1.dacc625a.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-account.40d0ce1e.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-account.9315887f.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-pay.25cecbf3.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-pay.8c460c81.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-paySuccess.4b9e830d.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-paySuccess.7df3a3b1.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-recharge.2a65956d.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-recharge.3b471118.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-wallet.02c6ccab.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-wallet.688b8676.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-wallet~pages-order-order~pages-user-award~pages-user-coupon~pages-user-favorites~pages-u~bf4a43c1.b45fc6a8.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-wallet~pages-order-order~pages-user-coupon~pages-user-favorites~pages-user-scoreAccumulate.bc4d14c3.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-withdmoenys.01e27dd4.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-withdmoenys.0dc52ebb.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-withdrawal.2298c334.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-withdrawal.ee3c8aac.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-order-createOrder.3a58f5c1.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-order-createOrder.957868aa.js


Деякі файли не було показано, через те що забагато файлів було змінено