Browse Source

2024-4-24

cmy 10 months ago
parent
commit
e9ad59f221
3 changed files with 54 additions and 49 deletions
  1. 8 1
      api/game.js
  2. 45 36
      pages/index/orderDetail.vue
  3. 1 12
      pages/user/collection.vue

+ 8 - 1
api/game.js

@@ -26,7 +26,14 @@ export  function getSell(data) {
 		data
 	});
 }
-
+// 提交凭证
+export  function setSellVoucher(data) {
+	return request({
+		url: `/api/sell/voucher/${data.id}`,
+		method: 'get',
+		data
+	});
+}
 // 买入订单
 export  function sellBuy(data) {
 	return request({

+ 45 - 36
pages/index/orderDetail.vue

@@ -3,24 +3,26 @@
 		<view class="recharge">
 			<view class="example-title flex_item">
 				<view class="titleTip"></view>
-				<view class="">充值信息</view>
+				<view class="">支付信息</view>
 			</view>
 			<view class="infoBox">
-				<view class="tplAddr">收款地址<text>{{dataMoney.address}}</text></view>
+				<view class="tplAddr">银行:<text>{{baseData.bank}}</text></view>
+				<view class="tplAddr">支行:<text>{{baseData.bank_name}}</text></view>
+				<view class="tplAddr">卡号:<text>{{baseData.bank_code}}</text></view>
+				<view class="tplAddr">姓名:<text>{{baseData.real_name}}</text></view>
+				<view class="tplAddr">手机号:<text>{{baseData.phone}}</text></view>
+				<view class="tplAddr">数量:<text>{{baseData.num*1}}{{baseData.money_type}}</text></view>
+				<view class="tplAddr">单格:<text>¥{{baseData.price*1}}</text></view>
+				<view class="tplAddr">总价:<text>¥{{allmoney}}</text></view>
 			</view>
 		</view>
 		<view class="login_text">
 			<view class="login_input flex">
 				<view class="login_img"><text>打款凭证</text></view>
 				<view class="login_name" @click="scImg">
-					<image :src="img"></image>
+					<image :src="img||'/static/image/img19.png'"></image>
 				</view>
 			</view>
-			<view class="login_input flex" style="padding-top: 45rpx;border-bottom: none;">
-				<view class="login_img">备注</view>
-				<view class="login_name"><input class="uni-input" type="text" v-model="remark"
-						placeholder="例如:备注用户账号" /></view>
-			</view>
 			<view class="submission"><button class="golden" type="golden" hover-class="none"
 					@click="submission">确认提交</button></view>
 		</view>
@@ -30,36 +32,44 @@
 	// import { show_cb,do_cb } from '@/api/recharge.js';
 	// import { upload } from '@/api/real.js';
 	import {
-		qianBao
-	} from '@/api/wallet.js';
+		getSell,
+		setSellVoucher
+	} from '@/api/game.js';
 	import {
 		copyText
 	} from '@/utils/rocessor.js';
 	export default {
 		data() {
 			return {
-				
+				img:'',
+				remark:'',
+				id:'',
+				baseData:{},
+				allmoney:0
 			};
 		},
-		onLoad() {
-			this.uid = uni.getStorageSync('uid');
-			this.qianBao();
+		onLoad(opt) {
+			this.id = opt.id;
+			this.getData();
 		},
 		methods: {
 			//获取数据
-			qianBao() {
+			getData() {
 				const that = this;
-				qianBao({}).then(
-					(res) => {
-						that.dataMoney = res.data.back.USDT.money
-						that.val = that.dataMoney.address;
-						console.log(that.dataMoney, 'dataMoney');
-					}
-				).catch(
-					(res) => {
-						console.log(res,'err');
-					}
-				)
+				//确认充值调接口,成功跳转页面
+				getSell({
+						id: that.id,
+					})
+					.then(function(e) {
+						that.baseData = e.data.info
+						that.baseData.num = that.baseData.num*1;
+						that.baseData.price = that.baseData.price*1;
+						that.allmoney = +(that.baseData.num*that.baseData.price).toFixed(8);
+						console.log(that.allmoney);
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
 			},
 			// 下载图片
 			domImage() {
@@ -85,20 +95,17 @@
 			submission() {
 				let obj = this;
 				uni.showLoading({
-					title: '充币中...',
+					title: '提交中...',
 					mask: true
 				});
 				//确认充值调接口,成功跳转页面
-				do_cb({
-						uid: obj.uid,
+				setSellVoucher({
+						id: obj.id,
 						img: obj.img,
-						address: obj.address,
-						money: obj.money,
-						bz: obj.remark,
 					})
 					.then(function(e) {
 						uni.showToast({
-							title: '请耐心等待系统审核通过',
+							title: '请耐心等待审核通过',
 							duration: 1500,
 							mask: false,
 							icon: 'none'
@@ -107,6 +114,7 @@
 					})
 					.catch(function(e) {
 						console.log(e);
+						uni.hideLoading();
 					});
 			},
 			//上传图片
@@ -188,9 +196,10 @@
 		}
 
 		.tplAddr {
-			color: #fff;
-			font-size: 32rpx;
-
+			color: #e3e3e3;
+			font-size: 26rpx;
+			margin-bottom: 10rpx;
+			
 			text {
 				padding-left: 15rpx;
 				font-size: 26rpx;

+ 1 - 12
pages/user/collection.vue

@@ -70,7 +70,7 @@
 			};
 		},
 		onLoad() {
-			this.val = this.userInfo.uid;
+			this.val = this.userInfo.uid+'';
 			console.log(this.userInfo,'this.userInfo');
 		},
 		computed: {
@@ -100,17 +100,6 @@
 			//获取数据
 			loadData() {
 				const that = this;
-				qianBao({}).then(
-					(res) => {
-						that.dataMoney = res.data.back.USDT.money
-						that.val = that.dataMoney.address;
-						console.log(that.dataMoney, 'dataMoney');
-					}
-				).catch(
-					(res) => {
-						console.log(res,'err');
-					}
-				)
 			},
 		}
 	};