xiaol 6 months ago
parent
commit
1f05f13321
2 changed files with 30 additions and 19 deletions
  1. 26 16
      pages/index/pledge.vue
  2. 4 3
      pages/user/transfer.vue

+ 26 - 16
pages/index/pledge.vue

@@ -163,22 +163,32 @@
 			},
 			// 挂出
 			submission() {
-				sellPush({
-						type: 'USDT',
-						num: this.number,
-						price: this.price,
-						phone: '',
-						trade_psw: '',
-						sell_type: 'money',
-
-					}).then(({
-						data
-					}) => {
-
-					})
-					.catch(e => {
-						console.log(e);
-					});
+				let obj = this;
+				uni.showModal({
+					title: '请输入支付密码',
+					editable:true,
+					success: res => {
+						if(res.confirm){
+							sellPush({
+									type: 'USDT',
+									num: obj.number,
+									price: obj.price,
+									phone: '',
+									trade_psw: res.content,
+									sell_type: 'money',
+								}).then(({
+									data
+								}) => {
+							
+								})
+								.catch(e => {
+									console.log(e);
+								});
+						}
+					},
+					fail: () => {},
+					complete: () => {}
+				});
 			},
 			init() {
 				this.page = 1;

+ 4 - 3
pages/user/transfer.vue

@@ -66,12 +66,13 @@
 								num: that.number,
 								to_user_address: that.address,
 								trade_psw: res.content,
-							}).then(
-								(res) => {
+							}).then((res) => {
 									uni.showToast({
-										title: e.msg,
+										title: res.msg,
 										duration: 1500,
 									});
+									that.number = ''
+									that.qianBao();
 								}
 							).catch(
 								(res) => {