hwq 3 tahun lalu
induk
melakukan
b75c5443bd

+ 4 - 0
.hbuilderx/launch.json

@@ -2,6 +2,10 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "remote"
+     	},
      	"default" : 
      	{
      		"launchtype" : "remote"

+ 18 - 0
api/wallet.js

@@ -55,6 +55,24 @@ export function rechargeRoutine(data) {
 	});
 }
 // #endif
+// #ifdef APP-PLUS
+// App微信充值
+export function rechargeApp(data) {
+	return request({
+		url: '/api/recharge/app',
+		method: 'post',
+		data
+	});
+}
+// App支付宝充值
+export function rechargeAli(data) {
+	return request({
+		url: '/api/recharge/ali',
+		method: 'post',
+		data
+	});
+}
+// #endif
 // 获取提现支付宝账号
 export function aliInfo(data) {
 	return request({

+ 16 - 4
manifest.json

@@ -2,8 +2,8 @@
     "name" : "正一健康",
     "appid" : "__UNI__A53E8B3",
     "description" : "",
-    "versionName" : "1.0.4",
-    "versionCode" : 104,
+    "versionName" : "1.0.9",
+    "versionCode" : 109,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -14,7 +14,9 @@
             "autoclose" : true,
             "delay" : 0
         },
-        "modules" : {},
+        "modules" : {
+            "Payment" : {}
+        },
         /* 模块配置 */
         "distribute" : {
             /* 应用发布信息 */
@@ -37,7 +39,17 @@
                 "maps" : {},
                 "oauth" : {},
                 "geolocation" : {},
-                "payment" : {},
+                "payment" : {
+                    "weixin" : {
+                        "__platform__" : [ "android" ],
+                        "appid" : "wxe7542891b1e27ad1",
+                        "UniversalLinks" : ""
+                    },
+                    "alipay" : {
+                        "__platform__" : [ "ios", "android" ]
+                    },
+                    "appleiap" : {}
+                },
                 "push" : {},
                 "share" : {},
                 "speech" : {

+ 72 - 28
pages/index/fugou.vue

@@ -42,7 +42,7 @@
 						<view class="type">选择支付方式</view>
 						<view class="image" @click="close"><image src="../../static/img/x.png" mode="aspectFill"></image></view>
 					</view>
-					<!-- <view class="paybox-main flex">
+					<view class="paybox-main flex">
 						<view class="zftype flex">
 							<image src="../../static/img/weixin.png" mode="aspectFill"></image>
 							<view class="zf">微信支付</view>
@@ -51,11 +51,11 @@
 					</view>
 					<view class="paybox-main flex">
 						<view class="zftype flex">
-							<image src="../../static/img/weixin.png" mode="aspectFill"></image>
+							<image src="../../static/img/zifubao.png" mode="aspectFill"></image>
 							<view class="zf">支付宝支付</view>
 						</view>
 						<label class="radio1" @click="changePayType(4)"><radio style="transform:scale(0.7)" value="" :checked="payType == 4" color="#5dbc7c"></radio></label>
-					</view> -->
+					</view>
 					<view class="paybox-main flex">
 						<view class="zftype flex">
 							<image src="../../static/img/yue.png" mode="aspectFill"></image>
@@ -92,6 +92,7 @@
 import { fugou } from '@/api/order.js';
 import { getUserInfo } from '@/api/user.js';
 import { loadIndexs } from '@/api/index.js';
+import { extractCash, extractBank, aliInfo, bankInfo,userBalance } from '@/api/wallet.js';
 export default {
 	data() {
 		return {
@@ -129,6 +130,10 @@ export default {
 		};
 	},
 	onLoad(option) {
+		userBalance({}).then(({ data }) => {
+			console.log(data,'账号信息')
+			this.now_money = data.now_money
+		});
 		this.loadData();
 		this.userinfo();
 	},
@@ -143,7 +148,8 @@ export default {
 			} else {
 				this.payAllMoney = +this.moneyAll;
 			}
-		}
+		},
+		
 	},
 	computed: {
 		Postage() {
@@ -207,29 +213,19 @@ export default {
 			try {
 				let obj = this;
 				// 判断是否余额不足
-				// if (obj.payName == 'yue' && +obj.now_money < obj.payAllMoney) {
-				// 	uni.showModal({
-				// 		title: '提示',
-				// 		content: '账户余额不足!',
-				// 		showCancel: false,
-				// 		success: res => {},
-				// 		fail: () => {},
-				// 		complete: () => {}
-				// 	});
-				// 	return;
-				// }
-				// if (obj.payName == 'yue' && +obj.now_money < obj.payAllMoney) {
-				// 	uni.showModal({
-				// 		title: '提示',
-				// 		content: '账户余额不足!',
-				// 		showCancel: false,
-				// 		success: res => {},
-				// 		fail: () => {},
-				// 		complete: () => {}
-				// 	});
-				// 	return;
-				// }
+				if (obj.payName == 'yue' && +obj.now_money < obj.payAllMoney) {
+					uni.showModal({
+						title: '提示',
+						content: '账户余额不足!',
+						showCancel: false,
+						success: res => {},
+						fail: () => {},
+						complete: () => {}
+					});
+					return;
+				}
 				// 支付中
+				console.log(this.payName,'支付方式')
 				obj.payLoding = true;
 				// #ifdef H5
 				// 获取当前是否为微信浏览器
@@ -249,7 +245,8 @@ export default {
 					use_integral: use_integral,
 					pay_type: this.payName,
 					// #ifdef H5
-					from: obj.froms ? 'weixin' : 'H5', //来源
+					// from: obj.froms ? 'weixin' : 'H5', //来源
+					from: 'app' //来源
 					// #endif
 					// #ifdef MP-WEIXIN
 					from: 'routine', //来源
@@ -282,6 +279,7 @@ export default {
 					}
 					console.log('-----', data);
 					let da = data.result.jsConfig;
+					
 					// #ifdef MP-WEIXIN
 					if (obj.payName == 'weixin' || obj.payName == 'routine') {
 						// let da = data.result.jsConfig;
@@ -303,7 +301,53 @@ export default {
 					}
 
 					// #endif
-
+					// #ifdef APP-PLUS
+					if (obj.payName == 'weixin' || obj.payName == 'routine') {
+						// let da = data.result.jsConfig;
+						console.log('--weixinda--', da);
+						let data = {
+							appid:da.appid,
+							noncestr: da.noncestr,
+							package: da.package,
+							partnerid:da.partnerid,
+							prepayid:da.prepayid,
+							timestamp: da.timestamp,
+							sign:da.sign
+						};
+						console.log('--data--', data);
+						uni.requestPayment({
+							provider: 'wxpay',
+							orderInfo: data,
+							success(res) {
+								console.log(res)
+							},
+							fail(res) {
+								console.log("微信掉起失败")
+								console.log(res,'失败')
+							}
+						})
+					}
+					if (obj.payName == 'ali') {
+						const url = data.result.jsConfig;
+						console.log(url, 'url');
+						uni.requestPayment({
+							provider: 'alipay',
+							orderInfo: url,
+							success: res => {
+								console.log(res);
+								uni.showToast({
+									title: '支付成功',
+									duration: 2000
+								});
+							},
+							fail: e => {
+								console.log(e);
+							},
+							complete: () => {}
+						});
+						obj.payLoding = false;
+					}
+					// #endif
 					uni.hideLoading();
 					// #ifdef H5
 					if (data.status == 'PAY_DEFICIENCY') {

+ 125 - 59
pages/money/account.vue

@@ -16,7 +16,7 @@
 				</view>
 				<view class="row b-b" v-if="tabIndex == 1">
 					<text class="tit">所属银行</text>
-					<input class="input" v-model="tabItem.orderList.bankName" type="text" placeholder="请输入账号" placeholder-class="placeholder" />
+					<input class="input" v-model="tabItem.orderList.bankName" type="text" placeholder="请输入所属银行" placeholder-class="placeholder" />
 				</view>
 			</swiper-item>
 		</swiper>
@@ -27,6 +27,9 @@
 
 <script>
 import { aliInfo, bankInfo, setAliInfo, setBankInfo } from '@/api/wallet.js';
+import { edit } from '@/api/user.js';
+import { mapState, mapMutations } from 'vuex';
+import { orderData, getUserInfo,service } from '@/api/user.js';
 export default {
 	data() {
 		return {
@@ -56,14 +59,33 @@ export default {
 			]
 		};
 	},
-
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
 	onLoad(options) {
 		this.tabCurrentIndex = +options.state || 0;
+		console.log(this.userInfo,'123456')
+		if(this.userInfo.alipay_code != null){
+			this.navList[0].orderList.code = this.userInfo.alipay_code
+		}
+		if(this.userInfo.alipay_name != null){
+			this.navList[0].orderList.name = this.userInfo.alipay_name
+		}
+		if(this.userInfo.bank_code != null){
+			this.navList[1].orderList.code = this.userInfo.bank_code
+		}
+		if(this.userInfo.bank_name != null){
+			this.navList[1].orderList.bankName = this.userInfo.bank_name
+		}
+		if(this.userInfo.bank_user_name != null){
+			this.navList[1].orderList.name = this.userInfo.bank_user_name
+		}
 		// this.loadAli();
 		// this.loadBank();
 	},
 
 	methods: {
+		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
 		//加载数据
 		loadAli(source) {
 			aliInfo({}).then(({ data }) => {
@@ -94,6 +116,7 @@ export default {
 		confirm() {
 			let obj = this;
 			let arr = obj.navList[obj.tabCurrentIndex].orderList;
+			console.log(arr);
 			let pages = getCurrentPages(); //获取所有页面栈实例列表
 			console.log(pages);
 			let nowPage = pages[pages.length - 1]; //当前页页面实例
@@ -111,27 +134,32 @@ export default {
 					return this.$api.msg('请输入银行卡号');
 				}
 				let data = {
-					fullname: arr.name,
-					bank: arr.bankName,
-					bankno: arr.code
+					bank_user_name: arr.name,
+					bank_name: arr.bankName,
+					bank_code: arr.code
 				};
-				// #ifdef H5
-				prevPage.$vm.bankData = data;
-				// #endif
-				// #ifdef MP
-				prevPage.setData({
-					bankData: data
+				// // #ifdef H5
+				// prevPage.$vm.bankData = data;
+				// // #endif
+				// // #ifdef MP
+				// prevPage.setData({
+				// 	bankData: data
+				// });
+				// // #endif
+				edit({
+					bank_user_name: arr.name,
+					bank_name: arr.bankName,
+					bank_code: arr.code
+				}).then(e => {
+					obj.$api.msg('修改成功');
+					obj.getUserInfo();
 				});
-				// #endif
 				// obj.setBankInfo({
 				// 	fullname: arr.name,
 				// 	bank: arr.bankName,
 				// 	bankno: arr.code,
 				// 	id:arr.id
 				// });
-				uni.navigateBack({
-					delta: 1
-				});
 			}
 			if (obj.tabCurrentIndex == 0) {
 				if (!arr.name) {
@@ -141,64 +169,102 @@ export default {
 					return this.$api.msg('请输入支付宝账号');
 				}
 				let data = {
-					fullname: arr.name,
-					alino: arr.code
+					alipay_name: arr.name,
+					alipay_code: arr.code
 				};
-				// #ifdef H5
-				prevPage.$vm.aliData = data;
-				// #endif
+				// // #ifdef H5
+				// prevPage.$vm.aliData = data;
+				// // #endif
 
-				// #ifdef MP
-				prevPage.setData({
-					bankData: data
-				});
-				// #endif
+				// // #ifdef MP
+				// prevPage.setData({
+				// 	bankData: data
+				// });
+				// // #endif
+				console.log(111);
+				edit({
+					alipay_name: arr.name,
+					alipay_code: arr.code
+				})
+					.then(e => {
+						console.log(e, '123456');
+						obj.$api.msg('修改成功');
+						obj.getUserInfo();
+					})
+					.catch(e => {
+						console.log(e);
+					});
 				// obj.setAliInfo({
 				// 	fullname: arr.name,
 				// 	alino: arr.code,
 				// 	id:arr.id
 				// });
-				uni.navigateBack({
-					delta: 1
-				});
 			}
 		},
-		/* 保存银行卡详细 */
-		setBankInfo(obj) {
-			setBankInfo(obj)
-				.then(e => {
-					uni.showToast({
-						title: '修改成功',
-						duration: 2000,
-						position: 'top'
-					});
-					this.$api.prePage().dataUp();
-					setTimeout(() => {
-						uni.navigateBack();
-					}, 1500);
+		// 更新用户信息
+		getUserInfo() {
+			getUserInfo({})
+				.then(({ data }) => {
+					console.log(data)
+					this.setUserInfo(data);
+					// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
+					orderData({})
+						.then(({ data }) => {
+							this.setOrderInfo(data);
+							uni.navigateBack({
+								delta: 1
+							});
+						})
+						.catch(e => {
+							this.setOrderInfo({
+								complete_count: 0, //完成
+								received_count: 0, //待收货
+								unshipped_count: 0, //待发货
+								order_count: 0, //订单总数
+								unpaid_count: 0 //待付款
+							});
+						});
 				})
 				.catch(e => {
 					console.log(e);
 				});
 		},
-		// 修改支付宝信息
-		setAliInfo(obj) {
-			setAliInfo(obj)
-				.then(e => {
-					uni.showToast({
-						title: '修改成功',
-						duration: 2000,
-						position: 'top'
-					});
-					this.$api.prePage().dataUp();
-					setTimeout(() => {
-						uni.navigateBack();
-					}, 1500);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		}
+		/* 保存银行卡详细 */
+		// setBankInfo(obj) {
+		// 	setBankInfo(obj)
+		// 		.then(e => {
+		// 			uni.showToast({
+		// 				title: '修改成功',
+		// 				duration: 2000,
+		// 				position: 'top'
+		// 			});
+		// 			this.$api.prePage().dataUp();
+		// 			setTimeout(() => {
+		// 				uni.navigateBack();
+		// 			}, 1500);
+		// 		})
+		// 		.catch(e => {
+		// 			console.log(e);
+		// 		});
+		// },
+		// // 修改支付宝信息
+		// setAliInfo(obj) {
+		// 	setAliInfo(obj)
+		// 		.then(e => {
+		// 			uni.showToast({
+		// 				title: '修改成功',
+		// 				duration: 2000,
+		// 				position: 'top'
+		// 			});
+		// 			this.$api.prePage().dataUp();
+		// 			setTimeout(() => {
+		// 				uni.navigateBack();
+		// 			}, 1500);
+		// 		})
+		// 		.catch(e => {
+		// 			console.log(e);
+		// 		});
+		// }
 	}
 };
 </script>

+ 60 - 3
pages/money/pay.vue

@@ -15,12 +15,20 @@
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 1"></radio></label>
 			</view>
 			<!-- #endif -->
-			<!-- #ifdef APP-PLUS -->
-			<!-- <view class="type-item b-b" @click="changePayType(2)">
+			<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>
+			<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> -->
+			</view>
+			<!-- #ifdef APP-PLUS -->
 			<!-- #endif -->
 			<view class="type-item" @click="changePayType(3)">
 				<text class="icon iconfont iconyue"></text>
@@ -160,6 +168,53 @@ export default {
 							obj.$api.msg(msg);
 						}
 					}
+					// #ifdef APP-PLUS
+					if (obj.payName == 'weixin' || obj.payName == 'routine') {
+						let da = e.data.result.jsConfig;
+						console.log('--da--', da);
+						let data = {
+							appid:da.appid,
+							noncestr: da.noncestr,
+							package: da.package,
+							partnerid:da.partnerid,
+							prepayid:da.prepayid,
+							timestamp: da.timestamp,
+							sign:da.sign
+						};
+						console.log('--data--', data);
+						uni.requestPayment({
+							provider: 'wxpay',
+							orderInfo: data,
+							success(res) {
+								console.log(res)
+							},
+							fail(res) {
+								console.log(res,'失败')
+							}
+						})
+					}
+					if (obj.payName == 'ali') {
+						const url = e.data.result.jsConfig;
+						console.log(url, 'url');
+						uni.requestPayment({
+							provider: 'alipay',
+							orderInfo: url,
+							success: res => {
+								console.log(res);
+								uni.showToast({
+									title: '支付成功',
+									duration: 2000
+								});
+							},
+							fail: e => {
+								console.log(e);
+							},
+							complete: () => {}
+						});
+						obj.payLoding = false;
+					}
+					// #endif
+					// #ifndef APP-PLUS
 					if (obj.payName == 'weixin' || obj.payName == 'routine') {
 						let da = e.data.result.jsConfig;
 						let data = {
@@ -193,6 +248,7 @@ export default {
 						}
 						// #endif
 					}
+					// #endif
 					uni.hideLoading();
 					obj.payLoding = false;
 				})
@@ -298,6 +354,7 @@ export default {
 						obj.payLoding = false;
 						return;
 					}
+					console.log(data,'dingdan')
 					// 保存订单号
 					obj.orderId = data.result.orderId;
 					// 判断是否为余额支付

+ 126 - 76
pages/money/recharge.vue

@@ -1,12 +1,8 @@
 <template>
 	<view class="content">
 		<view class="yue">
-			<view class="font">
-				当前余额
-			</view>
-			<view class="money">
-				{{ nowmoney | getMoneyStyle }}
-			</view>
+			<view class="font">当前余额</view>
+			<view class="money">{{ nowmoney | getMoneyStyle }}</view>
 		</view>
 		<view class="row-box">
 			<view class="title">充值金额</view>
@@ -16,9 +12,7 @@
 			</view>
 			<view class="xian"></view>
 			<view class="moneyBtn-box">
-				<view class="moneyBtn" v-for="(item,index) in moneyList" :class="{'current' : choose == index}" :key="index" @click="changemoney(item,index)">
-					{{ item }}元
-				</view>
+				<view class="moneyBtn" v-for="(item, index) in moneyList" :class="{ current: choose == index }" :key="index" @click="changemoney(item, index)">{{ item }}元</view>
 			</view>
 		</view>
 
@@ -30,24 +24,31 @@
 						<view class="icon iconfont iconweixin1"></view>
 						<view class="title-box">
 							<view class="title"><text>微信充值</text></view>
-							
 						</view>
 						<view class="right"><radio value="weixin" color="#6EAB4E" :checked="type == 'weixin'" /></view>
 					</view>
 				</label>
 				<!-- #endif -->
-				<!-- <label>
+				<!-- #ifdef APP-PLUS -->
+				<label>
 					<view class="box">
-						<view class="icon iconfont"><image class="yongjing" src="http://xmpt.liuniu946.com/img/yongjing.png"></image></view>
+						<view class="icon iconfont iconweixin1"></view>
 						<view class="title-box">
-							<view class="title"><text>佣金充值</text></view>
-							<view class="node">可用佣金¥{{ yongMoney }}</view>
-							
+							<view class="title"><text>微信充值</text></view>
 						</view>
-						<view class="right"><radio value="yongjing" color=" #5dbc7c" :checked="type == 'yongjing'" /></view>
+						<view class="right"><radio value="weixin" color="#6EAB4E" :checked="type == 'weixin'" /></view>
 					</view>
-				</label> -->
-				
+				</label>
+				<label>
+					<view class="box">
+						<view class="icon iconfont iconzhifubao"></view>
+						<view class="title-box">
+							<view class="title"><text>支付宝充值</text></view>
+						</view>
+						<view class="right"><radio value="ali" color="#6EAB4E" :checked="type == 'ali'" /></view>
+					</view>
+				</label>
+				<!-- #endif -->
 			</radio-group>
 		</view>
 		<button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">确认充值</button>
@@ -55,18 +56,19 @@
 </template>
 
 <script>
-	
 import { getMoneyStyle } from '@/utils/rocessor.js';
-import { userBalance,extractBank } from '@/api/wallet.js'
+import { userBalance, extractBank } from '@/api/wallet.js';
 // #ifdef H5
 import { rechargeWechat } from '@/api/wallet.js';
 // #endif
 // #ifdef MP
 import { rechargeRoutine } from '@/api/wallet.js';
 // #endif
+// #ifdef APP-PLUS
+import { rechargeApp,rechargeAli } from '@/api/wallet.js';
+// #endif
 import { mapState } from 'vuex';
 // #ifdef H5
-
 import weixinObj from '@/plugin/jweixin-module/index.js';
 // #endif
 export default {
@@ -81,30 +83,29 @@ export default {
 			// #endif
 			// #ifdef APP-PLUS
 			typeText: 1,
-			type: 'yongjing',
+			type: 'ali',
 			// #endif
 			money: '', //充值金额
 			payLoding: false, //是否加载中
-			moneyList: [300,200,150,100,50],
+			moneyList: [300, 200, 150, 100, 50],
 			nowmoney: '',
 			choose: -1,
-			yongMoney:'',
+			yongMoney: ''
 		};
 	},
 	onLoad(options) {
 		const obj = this;
-		if(options.type == '1'){
-			obj.type = 'yongjing',
-			obj.typeText = 1
+		if (options.type == '1') {
+			(obj.type = 'ali'), (obj.typeText = 1);
 		}
 	},
 	onShow() {
 		userBalance({}).then(({ data }) => {
-			console.log(data)
+			console.log(data);
 			this.nowmoney = data.now_money;
 		});
 		extractBank({}).then(({ data }) => {
-			this.yongMoney = (data.commissionCount*1).toFixed(2);//累积佣金
+			this.yongMoney = (data.commissionCount * 1).toFixed(2); //累积佣金
 		});
 	},
 	computed: {
@@ -121,39 +122,36 @@ export default {
 		},
 		// 切换选中对象
 		tabRadio(e) {
-			console.log(e)
-			if ( e.detail.value == 'weixin' ) {
-				this.typeText = 0
-			} 
-			else {
-				this.typeText = 1
+			console.log(e);
+			if (e.detail.value == 'weixin') {
+				this.typeText = 0;
+			} else {
+				console.log(12346)
+				this.typeText = 1;
 			}
-			this.type = e;
-			console.log(this.typeText);
+			this.type = e.detail.value;
 		},
 		// 提交
 		confirm() {
 			let obj = this;
 			obj.payLoding = true;
-			if( obj.money == ''){
+			if (obj.money == '') {
 				obj.$api.msg('请输入充值金额');
 				obj.payLoding = false;
 				return;
 			}
-			if( obj.type == 'yongjin' && obj.money > parseInt(obj.yongMoney) ) {
+			if (obj.type == 'yongjin' && obj.money > parseInt(obj.yongMoney)) {
 				obj.$api.msg('佣金不足');
 				obj.payLoding = false;
 				return;
 			}
 			// #ifdef H5
-			// rechargeWechat({ price: this.money, from: this.type })
-			rechargeWechat({ price: this.money, from: 'weixin',
-			 type: this.typeText})
+			rechargeWechat({ price: this.money, from: 'weixin', type: this.typeText })
 				.then(e => {
-					console.log(e)
-					if ( obj.type == 'weixin' ){
+					console.log(e);
+					if (obj.type == 'weixin') {
 						let da = e.data.data;
-						console.log(weixinObj,"weixin")
+						console.log(weixinObj, 'weixin');
 						weixinObj.chooseWXPay({
 							timestamp: da.timestamp,
 							nonceStr: da.nonceStr,
@@ -161,20 +159,18 @@ export default {
 							signType: da.signType,
 							paySign: da.paySign,
 							success: function(res) {
-								
 								uni.showToast({
 									title: '充值成功',
 									duration: 2000,
 									position: 'top'
 								});
-								
 							}
 						});
 						obj.payLoding = false;
-					}else {
+					} else {
 						uni.navigateTo({
 							url: '/pages/money/rechargeSuccess'
-						})
+						});
 						obj.payLoding = false;
 						console.log(e, '佣金');
 					}
@@ -185,23 +181,22 @@ export default {
 				});
 			// #endif
 			// #ifdef MP
-			rechargeRoutine({ price: this.money})
+			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'
-									});
-								},
-								
-							})
-					
+					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 => {
@@ -209,6 +204,62 @@ export default {
 					console.log(e);
 				});
 			// #endif
+			// #ifdef APP-PLUS
+			console.log(this.money)
+			if(this.typeText == 0){
+				rechargeApp({ price: this.money })
+					.then(e => {
+						let da = e.data;
+						let data = {
+							appid:da.appid,
+							noncestr: da.noncestr,
+							package: da.package,
+							partnerid:da.partnerid,
+							prepayid:da.prepayid,
+							timestamp: da.timestamp,
+							sign:da.sign
+						};
+						uni.requestPayment({
+							provider: 'wxpay',
+							orderInfo: data,
+							success(res) {
+								console.log(res)
+							},
+							fail(res) {
+								console.log("微信掉起失败")
+								console.log(res,'失败')
+							}
+						})
+				
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						obj.payLoding = false;
+						console.log(e);
+				});
+			}else {
+				rechargeAli({ price: this.money }).then(e =>{
+					console.log(e, 'url');
+					const url = e.msg;
+					uni.requestPayment({
+						provider: 'alipay',
+						orderInfo: url,
+						success: res => {
+							console.log(res);
+							uni.showToast({
+								title: '支付成功',
+								duration: 2000
+							});
+						},
+						fail: e => {
+							console.log(e);
+						},
+						complete: () => {}
+					});
+					obj.payLoding = false;
+				})
+			}
+			// #endif
 		},
 		//获取订单列表
 		loadData(source) {
@@ -237,9 +288,9 @@ export default {
 				navItem.loadingType = 'more';
 			}, 600);
 		},
-		changemoney(item,index){
+		changemoney(item, index) {
 			this.choose = index;
-			this.money = item
+			this.money = item;
 		}
 	}
 };
@@ -255,7 +306,7 @@ page {
 		color: $base-color;
 	}
 	&.up {
-		background: #6EAB4E;
+		background: #6eab4e;
 		color: #fff;
 	}
 	display: flex;
@@ -306,7 +357,7 @@ page {
 	.xian {
 		width: 700rpx;
 		height: 1rpx;
-		background: #E6E6E6;
+		background: #e6e6e6;
 		margin-bottom: 16rpx;
 	}
 	.moneyBtn-box {
@@ -317,7 +368,7 @@ page {
 			margin-right: 30rpx;
 			width: 210rpx;
 			height: 70rpx;
-			background: #F0F0F0;
+			background: #f0f0f0;
 			border-radius: 4px;
 			margin-top: 30rpx;
 			text-align: center;
@@ -342,7 +393,6 @@ page {
 		.yongjing {
 			width: 48rpx;
 			height: 48rpx;
-			
 		}
 		.iconweixin1 {
 			color: #18bf16;
@@ -376,22 +426,22 @@ page {
 	display: flex;
 	justify-content: space-between;
 	padding: 30rpx 48rpx 30rpx 26rpx;
-	background: #FFFFFF;
-	.font{
+	background: #ffffff;
+	.font {
 		font-size: 28rpx;
 		font-family: PingFang SC;
 		font-weight: 500;
 		color: #333333;
 	}
-	.money{
+	.money {
 		font-size: 30rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
-		color: #EF041F;
+		color: #ef041f;
 	}
 }
 .current {
-	background: #6EAB4E !important;
+	background: #6eab4e !important;
 	color: #fff !important;
 }
-</style>
+</style>

+ 0 - 1
pages/product/product.vue

@@ -24,7 +24,6 @@
 			<view class="price-box-jf">
 				<!-- <text class="price-tip">¥</text> -->
 				<view class="price">
-					<image src="../../static/icon/jf.png" mode=""></image>
 					<text>{{goodsObjact.integral}}</text><text class="jf">积分</text>
 					<text class="m-price">¥{{ goodsObjact.ot_price }}</text>
 				</view>

+ 2 - 2
pages/public/externalRegistered.vue

@@ -209,8 +209,8 @@
 					// 	});
 					// },1000)
 					setTimeout(() => {
-						uni.switchTab({
-							url: '/pages/index/index'
+						uni.navigateTo({
+							url: '/pages/public/login'
 						},1000);
 					})
 				}).catch(err => {

+ 57 - 12
pages/public/register.vue

@@ -70,7 +70,7 @@ export default {
 			parent_area: '',//区域
 			parent_areas: ['A','B','C'],//区域列表
 			pay_type: '',
-			pay_types: ['余额','佣金'],
+			pay_types: ['余额','佣金','支付宝','微信'],
 			isSelsect: false,
 			isinvitation: false,
 			isparent_area: false,
@@ -159,6 +159,8 @@ export default {
 				paytype = 'yue'
 			}else if(obj.pay_type == '佣金') {
 				paytype = 'brokerage'
+			}else if(obj.pay_type == '支付宝') {
+				paytype = 'ali'
 			}
 			register({
 				account: obj.phone, //账号
@@ -169,17 +171,60 @@ export default {
 				pay_type: paytype,
 				use_integral: obj.isSelsect ? '1':'0',
 				from: 'APP'
-			}).then(function(e) {
-				uni.showToast({
-					title:'注册成功',
-					duration:2000,
-					position:'top'
-				});
-				setTimeout(function () {
-					uni.navigateTo({
-						url: '/pages/user/jiedian'
-					});
-				},1000)
+			}).then(({da}) => {
+				if (obj.pay_type == 'weixin' || obj.pay_type == 'routine') {
+					// let da = data.result.jsConfig;
+					console.log('--da--', da);
+					let data = {
+						appid:da.appid,
+						noncestr: da.noncestr,
+						package: da.package,
+						partnerid:da.partnerid,
+						prepayid:da.prepayid,
+						timestamp: da.timestamp,
+						sign:da.sign
+					};
+					console.log('--data--', data);
+					uni.requestPayment({
+						provider: 'wxpay',
+						orderInfo: data,
+						success(res) {
+							console.log(res)
+						}
+					})
+				}
+				if (obj.pay_type == 'ali') {
+					const url = data.result.jsConfig;
+					console.log(url, 'url');
+					uni.requestPayment({
+						provider: 'alipay',
+						orderInfo: url,
+						success: res => {
+							console.log(res);
+							uni.showToast({
+								title: '支付成功',
+								duration: 2000
+							});
+						},
+						fail: e => {
+							console.log(e);
+						},
+						complete: () => {}
+					});
+					obj.payLoding = false;
+				}
+				if (obj.pay_type == 'yue' || obj.pay_type == 'brokerage'){
+					uni.showToast({
+						title:'注册成功',
+						duration:2000,
+						position:'top'
+					});
+					setTimeout(function () {
+						uni.navigateTo({
+							url: '/pages/user/jiedian'
+						});
+					},1000)
+				}
 			}).catch( err => {
 				console.log(err)
 			})

+ 2 - 1
pages/user/accounts.vue

@@ -44,11 +44,12 @@
 		</view>
 	</view>
 </template>
-
+ 
 <script>
 	export default {
 		data() {
 			return {
+				bfb:0,
 				height: '',
 				tabCurrentIndex: 0,
 				navList: [{

+ 1 - 1
pages/user/award.vue

@@ -21,7 +21,7 @@
 					<!-- 空白页 -->
 					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
 					<!-- 订单列表 -->
-					<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index" @click="showItem(item)">
+					<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>

+ 77 - 8
pages/user/registerList.vue

@@ -70,7 +70,14 @@
 							<image src="../../static/img/x.png" mode="aspectFill"></image>
 						</view>
 					</view>
-					<!-- <view class="paybox-main flex">
+					<view class="paybox-main flex">
+						<view class="zftype flex">
+							<image src="../../static/img/zifubao.png" mode="aspectFill"></image>
+							<view class="zf">支付宝支付</view>
+						</view>
+						<label class="radio1" @click="changePayType(4)"><radio style="transform:scale(0.7)" value="" :checked="paytype == 'ali'" color="#5dbc7c"></radio></label>
+					</view>
+					<view class="paybox-main flex">
 						<view class="zftype flex">
 							<image src="../../static/img/weixin.png" mode="aspectFill"></image>
 							<view class="zf">微信支付</view>
@@ -79,7 +86,7 @@
 							<radio style="transform:scale(0.7)" value="" :checked="paytype == 'weixin'" color="#5dbc7c">
 							</radio>
 						</label>
-					</view> -->
+					</view>
 					<view class="paybox-main flex">
 						<view class="zftype flex">
 							<image src="../../static/img/yue.png" mode="aspectFill"></image>
@@ -225,6 +232,9 @@
 				if (type == 3) {
 					this.paytype = 'brokerage';
 				}
+				if (type == 4) {
+					this.paytype = 'ali';
+				}
 			},
 			getRegisterList(type) {
 				let obj = this;
@@ -327,13 +337,72 @@
 				}
 				obj.$refs.popupPay.close();
 				payRegister(data, id).then(res => {
+					// #ifdef APP-PLUS
+					if (obj.paytype == 'weixin' || obj.paytype == 'routine') {
+						console.log(res,'111111')
+						let da = res.data.result.jsConfig;
+						console.log('--weixinda--', da);
+						let data = {
+							appid:da.appid,
+							noncestr: da.noncestr,
+							package: da.package,
+							partnerid:da.partnerid,
+							prepayid:da.prepayid,
+							timestamp: da.timestamp,
+							sign:da.sign
+						};
+						console.log('--data--', data);
+						uni.requestPayment({
+							provider: 'wxpay',
+							orderInfo: data,
+							success(res) {
+								let s = obj.registerList[obj.tabCurrentIndex].list.indexOf(obj.payitem);
+								obj.registerList[obj.tabCurrentIndex].list.splice(s, 1);
+								uni.showToast({
+									title: '支付成功',
+									duration: 2000
+								});
+								console.log(res)
+							},
+							fail(res) {
+								console.log("微信掉起失败")
+								console.log(res,'失败')
+							}
+						})
+					}
+					if (obj.paytype == 'ali') {
+						console.log(res, 'url');
+						const url = res.data.result.jsConfig;
+						uni.requestPayment({
+							provider: 'alipay',
+							orderInfo: url,
+							success: res => {
+								console.log(res);
+								let s = obj.registerList[obj.tabCurrentIndex].list.indexOf(obj.payitem);
+								obj.registerList[obj.tabCurrentIndex].list.splice(s, 1);
+								uni.showToast({
+									title: '支付成功',
+									duration: 2000
+								});
+							},
+							fail: e => {
+								console.log(e);
+							},
+							complete: () => {}
+						});
+						obj.payLoding = false;
+					}
+					// #endif
+					if(this.paytype == 'yue' || this.paytype == "brokerage"){
+						let s = obj.registerList[obj.tabCurrentIndex].list.indexOf(obj.payitem);
+						obj.registerList[obj.tabCurrentIndex].list.splice(s, 1);
+						uni.showToast({
+							title: '支付成功',
+							duration: 2000
+						});
+					}
 					uni.hideLoading()
-					uni.showToast({
-						title: '支付成功',
-						duration: 2000
-					});
-					let s = obj.registerList[obj.tabCurrentIndex].list.indexOf(obj.payitem);
-					obj.registerList[obj.tabCurrentIndex].list.splice(s, 1);
+					
 				}).catch(err => {
 					uni.hideLoading()
 					console.log(err)

+ 24 - 21
pages/user/withdrawal.vue

@@ -28,11 +28,11 @@
 						<view class="icon iconfont iconzhifubao"></view>
 						<view class="title-box">
 							<view class="title">
-								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-if="aliData.fullname != null">提现至支付宝</text>
 								<text v-else>请创建支付宝账号</text>
 							</view>
 							<view class="node">
-								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
+								<text v-if="aliData.fullname != null">真实姓名({{ aliData.fullname }})</text>
 							</view>
 						</view>
 						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
@@ -43,11 +43,11 @@
 						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
 						<view class="title-box">
 							<view class="title">
-								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
+								<text v-if="bankData.bankno != null">{{ bankData.bank + ' ' + bankData.bankno }}</text>
 								<text v-else>请创建银行账号</text>
 							</view>
 							<view class="node">
-								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
+								<text v-if="bankData.fullname != null">真实姓名({{ bankData.fullname}})</text>
 							</view>
 						</view>
 						<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
@@ -72,9 +72,6 @@ export default {
 	components: {
 		uniNoticeBar
 	},
-	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-	},
 	data() {
 		return {
 			type: 'alipay', //提现方式
@@ -82,35 +79,35 @@ export default {
 			freeze: '0.0', //冻结金额
 			withdrawal: '', //提现金额
 			minPrice: '', //最少提现金额
-			aliData: {},
-			bankData: {},
-			dai: '',//待审核金额
+			aliData: {fullname:'',alino:''},
+			bankData: {fullname:'',bank:'',bankno:''},
+			// dai: '',//待审核金额
 			// #ifdef H5
 			weichatBsrowser: false
 			// #endif
 		};
 	},
 	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
 		moneyMin() {
 			return '最低提现金额' + this.minPrice + '元'
 		}
 	},
-	onLoad(options) {
+	onShow() {
 		
 		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
 		
 		//加载提现信息
 		this.loadData();
 		// 加载提款账号信息
-		this.loadAli();
-		this.loadBank();
+		console.log(this.userInfo,'123')
+		this.aliData.fullname = this.userInfo.alipay_name;
+		this.aliData.alino = this.userInfo.alipay_code
+		this.bankData.fullname = this.userInfo.bank_user_name;
+		this.bankData.bank = this.userInfo.bank_name;
+		this.bankData.bankno = this.userInfo.bank_code;
 	},
 	methods: {
-		// 更新数据
-		dataUp(){
-			this.loadAli();
-			this.loadBank();
-		},
 		//加载数据
 		async loadAli(source) {
 			aliInfo({}).then(e => {
@@ -125,12 +122,18 @@ export default {
 		},
 		// 加载余额信息
 		async loadData() {
-			userBalance({}).then(({ data }) => {
-				this.money = data.now_money;
+			uni.showLoading({
+				title: '加载中',
+				// mask: true
 			});
+			// userBalance({}).then(({ data }) => {
+			// 	console.log(data,'账号信息')
+			// });
 			extractBank({}).then(({ data }) => {
+				this.money = data.brokerage_price;
 				this.minPrice = +data.minPrice;
-				this.dai = data.now_money_extract.toFixed(2);
+				uni.hideLoading();
+				// this.dai = data.now_money_extract.toFixed(2);
 			})
 		},
 		// 跳转

TEMPAT SAMPAH
static/img/zifubao.png


+ 1 - 0
unpackage/debug/.roid.ins

@@ -0,0 +1 @@
+installed

TEMPAT SAMPAH
unpackage/debug/android_debug.apk


File diff ditekan karena terlalu besar
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


File diff ditekan karena terlalu besar
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


File diff ditekan karena terlalu besar
+ 0 - 0
unpackage/dist/dev/app-plus/app-view.js


File diff ditekan karena terlalu besar
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


File diff ditekan karena terlalu besar
+ 0 - 0
unpackage/dist/dev/app-plus/view.css


File diff ditekan karena terlalu besar
+ 0 - 0
unpackage/dist/dev/app-plus/view.umd.min.js


+ 20 - 24
utils/upApp.js

@@ -6,7 +6,7 @@ const iosAppStroeUrl =
 	'https://apps.apple.com/cn/app/%E6%BB%A1%E5%9B%AD%E6%98%A5%E7%BA%BF%E4%B8%8A%E5%95%86%E5%9F%8E/id1524593346';
 
 // 获取app是否需要升级
-export function getUpApp () {
+export function getUpApp() {
 	// 获取当前运行系统
 	let hj = uni.getSystemInfoSync().platform;
 	// 获取仓库app数据对象
@@ -24,7 +24,7 @@ export function getUpApp () {
 	uni.request({
 		url: getUpAppUrl1,
 		method: 'GET',
-		header:{
+		header: {
 			"Authori-zation": 'Bearer ' + token,
 		},
 		data: {},
@@ -34,22 +34,22 @@ export function getUpApp () {
 			plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
 				// 保存线上版本号
 				let version = r.apk;
-				console.log(version,'version+++++++++++++++++++++++1+')
+				console.log(version, 'version+++++++++++++++++++++++1+')
 				// 获取线上版本
 				const arr = r.version_code.split('.');
 				// 获取当前系统
 				const arr1 = wgtinfo.version.split('.');
-				console.log(wgtinfo.version,'wgtinfo.version+++++++++++')
+				console.log(wgtinfo.version, 'wgtinfo.version+++++++++++')
 				for (let i = 0; i < arr.length; i++) {
 					// 线上版本号
 					const x = +arr[i];
 					// 线下版本号
 					const y = +arr1[i];
-					console.log(arr,arr1,"版本号")
+					console.log(arr, arr1, "版本号")
 					// 判断当前版本是否为小于等于线上版本
 					if (x >= y) {
 						console.log('dashabi2020')
-						console.log(x,y)
+						console.log(x, y)
 						// 只有ios才需要显示
 						if (hj === 'ios') {
 							// 设置显示数据
@@ -74,7 +74,7 @@ export function getUpApp () {
 									if (hj === 'android') {
 										// plus.runtime.openURL('http://lxscimg.liuniu946.com/lxscV' + version + '.apk');
 										downApp(version);
-										
+
 									}
 								}
 							});
@@ -84,30 +84,26 @@ export function getUpApp () {
 				}
 			});
 		},
-		fail:e =>{
-			console.log(e,"失败")
+		fail: e => {
+			console.log(e, "失败")
 		}
 	});
 }
 // 下载app
-export function downApp (version) {
-	console.log(version,"版本号")
-	console.log(baseurl,'123')
+export function downApp(version) {
+	console.log(version, "版本号")
 	plus.nativeUI.showWaiting('下载升级包...');
-	plus.downloader
-		.createDownload(baseurl + version, {}, (d, status) => {
-			console.log(d,'下载数据',status,'下载状态');
-			if (status == 200) {
-				installApp(d.filename); // 安装app
-			} else {
-				plus.nativeUI.alert('下载升级包失败!');
-			}
-			plus.nativeUI.closeWaiting();
-		})
-		.start();
+	plus.downloader.createDownload( version, {}, (d, status) => {
+		if (status == 200) {
+			installApp(d.filename); // 安装app
+		} else {
+			plus.nativeUI.alert('下载升级包失败!');
+		}
+		plus.nativeUI.closeWaiting();
+	}).start();
 }
 // 安装app
-export function installApp (path) {
+export function installApp(path) {
 	plus.nativeUI.showWaiting('安装升级包...');
 	plus.runtime.install(
 		path, {},

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini