cmy 10 місяців тому
батько
коміт
538787db00
6 змінених файлів з 51 додано та 48 видалено
  1. 1 1
      api/game.js
  2. 4 1
      manifest.json
  3. 0 11
      package-lock.json
  4. 0 3
      package.json
  5. 8 8
      pages/index/order.vue
  6. 38 24
      pages/index/orderDetail.vue

+ 1 - 1
api/game.js

@@ -30,7 +30,7 @@ export  function getSell(data) {
 export  function setSellVoucher(data) {
 	return request({
 		url: `/api/sell/voucher/${data.id}`,
-		method: 'get',
+		method: 'post',
 		data
 	});
 }

+ 4 - 1
manifest.json

@@ -34,7 +34,10 @@
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
                 ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
+                "schemes" : "yzhifu,yzf",
+                "minSdkVersion" : 29,
+                "targetSdkVersion" : 30
             },
             "ios" : {
                 "idfa" : false,

+ 0 - 11
package-lock.json

@@ -4,17 +4,6 @@
   "requires": true,
   "packages": {
     "": {
-      "dependencies": {
-        "@metamask/detect-provider": "^2.0.0"
-      }
-    },
-    "node_modules/@metamask/detect-provider": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/@metamask/detect-provider/-/detect-provider-2.0.0.tgz",
-      "integrity": "sha512-sFpN+TX13E9fdBDh9lvQeZdJn4qYoRb/6QF2oZZK/Pn559IhCFacPMU1rMuqyXoFQF3JSJfii2l98B87QDPeCQ==",
-      "engines": {
-        "node": ">=14.0.0"
-      }
     }
   }
 }

+ 0 - 3
package.json

@@ -1,5 +1,2 @@
 {
-  "dependencies": {
-    "@metamask/detect-provider": "^2.0.0"
-  }
 }

+ 8 - 8
pages/index/order.vue

@@ -43,6 +43,7 @@
 				</view>
 			</view>
 		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
 	</view>
 </template>
 
@@ -124,7 +125,7 @@
 				if (this.tabIndex == 0) {
 					sellMy({
 						page: obj.page,
-						limit: 10,
+						limit: obj.limit,
 						status:obj.status
 					}, obj.status).then(res => {
 						obj.dataList(res.data.list)
@@ -132,7 +133,7 @@
 				} else if (this.tabIndex == 1) {
 					sellBuyMy({
 						page: obj.page,
-						limit: 10,
+						limit: obj.limit,
 						status:obj.status
 					}, obj.status).then(res => {
 						let ar = res.data.list.map((re)=>{
@@ -140,7 +141,6 @@
 							re.num = +re.num;
 							re.price = +re.price;
 							re.money = +(re.num*re.price).toFixed(8);
-							
 							return re
 						})
 						obj.dataList(ar)
@@ -152,11 +152,11 @@
 				if (ar.length > 0) {
 					obj.list = obj.list.concat(ar);
 					obj.page++;
-					if (obj.limit == ar.length) {
-						obj.loadingType = "more";
-					} else {
-						obj.loadingType = "nomore";
-					}
+				}
+				if (obj.limit == ar.length) {
+					obj.loadingType = "more";
+				} else {
+					obj.loadingType = "nomore";
 				}
 				console.log(obj.list,"list");
 			},

+ 38 - 24
pages/index/orderDetail.vue

@@ -16,21 +16,31 @@
 				<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">
+			<view class="example-title flex_item">
+				<view class="titleTip"></view>
+				<view class="">打款凭证</view>
+			</view>
+			<view class="login_input">
+				<!-- <view class="login_img"><text>打款凭证</text></view> -->
+				<view class="login_name" @click="scImg" v-if="!baseData.voucher">
 					<image :src="img||'/static/image/img19.png'"></image>
 				</view>
+				<view class="login_name" v-else>
+					<image class="showImage" mode="widthFix" :src="baseData.voucher"></image>
+				</view>
 			</view>
-			<view class="submission"><button class="golden" type="golden" hover-class="none"
+			<view class="submission" v-if="baseData.status==3"><button class="golden" type="golden" hover-class="none"
 					@click="submission">确认提交</button></view>
 		</view>
 	</view>
 </template>
 <script type="text/javascript">
 	// import { show_cb,do_cb } from '@/api/recharge.js';
-	// import { upload } from '@/api/real.js';
+	import {
+		upload
+	} from '@/api/order.js';
 	import {
 		getSell,
 		setSellVoucher
@@ -41,11 +51,11 @@
 	export default {
 		data() {
 			return {
-				img:'',
-				remark:'',
-				id:'',
-				baseData:{},
-				allmoney:0
+				img: '',
+				remark: '',
+				id: '',
+				baseData: {},
+				allmoney: 0,
 			};
 		},
 		onLoad(opt) {
@@ -62,9 +72,9 @@
 					})
 					.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);
+						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) {
@@ -101,19 +111,19 @@
 				//确认充值调接口,成功跳转页面
 				setSellVoucher({
 						id: obj.id,
-						img: obj.img,
+						image: obj.img,
 					})
 					.then(function(e) {
+						uni.hideLoading();
 						uni.showToast({
-							title: '请耐心等待审核通过',
-							duration: 1500,
-							mask: false,
-							icon: 'none'
+							title: e.msg
 						});
-						uni.hideLoading();
+						setTimeout(()=>{
+							uni.navigateBack()
+						},1500)
 					})
 					.catch(function(e) {
-						console.log(e);
+						console.log(e, '错误');
 						uni.hideLoading();
 					});
 			},
@@ -146,7 +156,6 @@
 		font-size: 28rpx !important;
 		background-color: #1F2A4A;
 		margin: 25rpx 0rpx;
-		padding: 0rpx 25rpx;
 		padding-bottom: 15rpx;
 	}
 
@@ -199,7 +208,7 @@
 			color: #e3e3e3;
 			font-size: 26rpx;
 			margin-bottom: 10rpx;
-			
+
 			text {
 				padding-left: 15rpx;
 				font-size: 26rpx;
@@ -209,7 +218,7 @@
 	}
 
 	.login_input {
-		border-bottom: 1px solid #464755;
+		// border-bottom: 1px solid #464755;
 		padding: 35rpx;
 	}
 
@@ -258,8 +267,13 @@
 	}
 
 	.login_name {
-		width: 480rpx;
+		width: 100%;
 		color: #ffffff;
+
+		.showImage {
+			width: 100%;
+			border: 1px solid #FFF;
+		}
 	}
 
 	.login_name image {