소스 검색

Merge remote-tracking branch 'origin/master' into new-dev

# Conflicts:
#	manifest.json
#	pages.json
#	pages/wallet/wallet.vue
wuguojie 1 년 전
부모
커밋
0063ce3058
4개의 변경된 파일165개의 추가작업 그리고 19개의 파일을 삭제
  1. 3 1
      manifest.json
  2. 14 2
      pages.json
  3. 148 15
      pages/wallet/wallet.vue
  4. 0 1
      pages/wallet/withdraw.vue

+ 3 - 1
manifest.json

@@ -220,4 +220,6 @@
 		}
 	}
 }
-// 小程序特有相关
+// 小程序特有相关
+
+

+ 14 - 2
pages.json

@@ -3,7 +3,7 @@
 		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
 	},
 	"pages": [{
-			"path": "pages/login/login", //登录页	
+			"path": "pages/login/login", //登录页
 			"style": {
 				"enablePullDownRefresh": false, //是否开启下拉刷新功能
 				"app-plus": {
@@ -999,6 +999,18 @@
 				}
 			}
 		},
+		},
+		{
+			"path": "pages/sign/index",
+			"style": {
+				"navigationBarTitleText": "签约",
+				"app-plus": {
+					"scrollIndicator": "none",
+					"bounce": "none"
+				}
+			}
+
+		}
 
 		//ui升级模块
 		//洗车模块
@@ -1159,4 +1171,4 @@
 			"query": "" //启动参数,在页面的onLoad函数里面得到
 		}]
 	}
-}
+}

+ 148 - 15
pages/wallet/wallet.vue

@@ -56,6 +56,78 @@
 		data() {
 			return {
 				totalAssetAmount: null,
+				bankList: [{
+						bankName: "中国邮政储蓄银行",
+						logo: "/static/image/bankLogo/youzheng.png",
+						background: "linear-gradient(90deg, rgba(79, 136, 69, 0.7) 0%, #4f8845 100%)"
+					},
+					{
+						bankName: "中国工商银行",
+						logo: "/static/image/bankLogo/gongshang.png",
+						background: "linear-gradient(90deg, rgba(177, 0, 13, 0.7) 0%, #b1000d 100%)"
+					},
+					{
+						bankName: "中国农业银行",
+						logo: "/static/image/bankLogo/nongye.png",
+						background: "linear-gradient(90deg, rgba(86,152, 130, 0.7) 0%, #569882 100%)"
+					},
+					{
+						bankName: "中国银行",
+						logo: "/static/image/bankLogo/zhongguo.png",
+						background: "linear-gradient(90deg, rgba(157, 32, 40, 0.7) 0%, #9d2028 100%)"
+					},
+					{
+						bankName: "中国建设银行",
+						logo: "/static/image/bankLogo/jianshe.png",
+						background: "linear-gradient(90deg, rgba(6, 89, 159, 0.7) 0%, #06569F 100%)"
+					},
+					{
+						bankName: "招商银行",
+						logo: "/static/image/bankLogo/zhaoshang.png",
+						background: "linear-gradient(90deg, rgba(197, 0, 25, 0.7) 0%, #c50019 100%)"
+					},
+					{
+						bankName: "中国民生银行",
+						logo: "/static/image/bankLogo/minsheng.png",
+						background: "linear-gradient(90deg, rgba(84,149, 92, 0.7) 0%, #54955c 100%)"
+					},
+					{
+						bankName: "中国光大银行",
+						logo: "/static/image/bankLogo/guangda.png",
+						background: "linear-gradient(90deg, rgba(93, 30, 131, 0.7) 0%, #5d1e83 100%)"
+					},
+					{
+						bankName: "中信银行",
+						logo: "/static/image/bankLogo/zhongxin.png",
+						background: "linear-gradient(90deg, rgba(184, 0,22, 0.7) 0%, #b80016 100%)"
+					},
+					{
+						bankName: "华夏银行",
+						logo: "/static/image/bankLogo/huaxia.png",
+						background: "linear-gradient(90deg, rgba(216, 12, 24, 0.7) 0%, #d80c18 100%)"
+					},
+					{
+						bankName: "中国交通银行",
+						logo: "/static/image/bankLogo/jiaotong.png",
+						background: "linear-gradient(90deg, rgba(33, 58, 120, 0.7) 0%, #213a78 100%)"
+					},
+					{
+						bankName: "晋商银行",
+						logo: "/static/image/bankLogo/jinshang.png",
+						background: "linear-gradient(90deg, rgba(224, 150, 165, 0.7) 0%, #e096a5 100%)"
+					},
+					{
+						bankName: "山西银行",
+						logo: "/static/image/bankLogo/shanxi.png",
+						background: "linear-gradient(90deg, rgba(192, 19, 73, 0.7) 0%, #c01349 100%)"
+					},
+					{
+						bankName: "农村商业银行",
+						logo: "/static/image/bankLogo/nongcun.png",
+						background: "linear-gradient(90deg, rgba(0, 155, 77, 0.7) 0%, #009b4d 100%)"
+					},
+				],
+				bankCardInfo: {}
 			}
 		},
 		computed: {
@@ -63,6 +135,7 @@
 		},
 		onShow() {
 			this.getAdvanceMoney(); //金额
+			this.getbankCard();
 		},
 		onLoad() {
 			this.getAdvanceMoney(); //手续费金额
@@ -74,6 +147,27 @@
 					url: '/pages/chat/chat'
 				})
 			},
+			// 获取银行卡信息
+			async getbankCard() {
+				let res = await this.$http.post('/userBank/getUserBankList', {
+					auditStatus: "1",
+					delFlag: '0'
+				});
+				this.bankList.map(val => {
+					res.data.map(ele => {
+						if (val.bankName == ele.bankAccount) {
+							ele.logo = val.logo;
+							return ele;
+						}
+					})
+				})
+				let bankinfo = res.data.find(val => val.isDefault == 1)
+				if (bankinfo) {
+					this.bankCardInfo = bankinfo;
+				} else {
+					this.bankCardInfo = res.data[0]
+				}
+			},
 			// 预收账户金额查询
 			async getAdvanceMoney() {
 				let res = await this.$http.get('/sysUserAccount/getUserSumAmountByUserId?userId=' + this.userInfo
@@ -119,21 +213,60 @@
 			},
 			// 去提现
 			async toWithdraw() {
-				let res = await this.$http.post('/userBank/getUserBankList', {
-					auditStatus: '1',
-					delFlag: '0'
-				});
-				if (res.data.length) {
-					this.navigate({
-						url: `/pages/wallet/withdraw?amount=${this.totalAssetAmount}`,
-					}, "navigateTo", true)
-				} else {
-					uni.showToast({
-						title: '暂无审核通过的银行卡,不可提现',
-						duration: 3000,
-						icon: "none"
+				let that = this
+				let signResult = await this.$http.post('/ttqf/queryPressing', {
+					userId: uni.getStorageSync('username'),
+					bankNumber: this.bankCardInfo.bankNumber
+				})
+				if(signResult.data.bizCode === '1') { // 未签约
+					uni.showModal({
+						title: '温馨提示',
+						content: '尚未签约,需先去签约!',
+						showCancel: true,
+						confirmText: '去签约',
+						cancelText: '稍后签约',
+						async success(res) {
+							if(res.confirm) {
+								let srcResult = await that.$http.post('/ttqf/signingAddress', {
+									userId: uni.getStorageSync('username')
+								})
+								if(srcResult.data) {
+									plus.runtime.openURL(srcResult.data.url)
+								}
+							}
+						}
+					})
+				} else if(signResult.data.bizCode === '2') { // 签约未完成
+					uni.showModal({
+						title: '温馨提示',
+						content: '签约进行中,是否去查看?',
+						showCancel: true,
+						confirmText: '去查看',
+						cancelText: '取消',
+						success(res) {
+							if(res.confirm) {
+								if(signResult.data) {
+									plus.runtime.openURL(signResult.data.url)
+								}
+							}
+						}
+					})
+				} else if(signResult.data.bizCode === '3' || signResult.data.bizCode === '0') { // 签约完成
+					let res = await this.$http.post('/userBank/getUserBankList', {
+						auditStatus: '1',
+						delFlag: '0'
 					});
-
+					if (res.data.length) {
+						this.navigate({
+							url: `/pages/wallet/withdraw?amount=${this.totalAssetAmount}`,
+						}, "navigateTo", true)
+					} else {
+						uni.showToast({
+							title: '暂无审核通过的银行卡,不可提现',
+							duration: 3000,
+							icon: "none"
+						});
+					}
 				}
 			},
 
@@ -224,4 +357,4 @@
 			margin-left: 20px;
 		}
 	}
-</style>
+</style>

+ 0 - 1
pages/wallet/withdraw.vue

@@ -294,7 +294,6 @@
 						return uni.navigateBack(1);
 					}, 2000);
 				}
-
 			},
 			//金额计算
 			checkMoney() {