Kaynağa Gözat

Merge branch 'master' of http://39.104.94.153:3000/yf_lj/bigDataApp

lj 4 yıl önce
ebeveyn
işleme
42fdcda0c0
2 değiştirilmiş dosya ile 25 ekleme ve 7 silme
  1. 4 5
      pages/disandpests/index.vue
  2. 21 2
      pages/index/index.vue

+ 4 - 5
pages/disandpests/index.vue

@@ -4,7 +4,7 @@
 			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="病虫害识别"></uni-nav-bar>
 		</view>
 		<view class="image_box">
-			<image :src="path" mode="widthFix" class="image"></image>
+			<image :src="path" mode="" class="image"></image>
 		</view>
 		<view class="recognition" v-if="datasTF">
 			<p class="recognition_title">{{name}}</p>
@@ -208,10 +208,9 @@
 		top: 44px;
 		width: 100%;
 		height: 400rpx;
-		display: flex;
-		justify-content: center;
 		.image {
-			margin: 0 auto;
+			width: 100%;
+			height: 400rpx;
 		}
 	}
 	.recognition {
@@ -272,7 +271,7 @@
 
 	.datas {
 		position: absolute;
-		top: 264px;
+		top: 284px;
 		width: 95%;
 		left: 2.5%;
 		.datas_title{

+ 21 - 2
pages/index/index.vue

@@ -18,6 +18,9 @@
 		<u-modal v-model="show" :mask-close-able="true" title="" :show-cancel-button="true" confirm-text="拍病害" cancel-text="拍虫害"
 		 content="拍照识别病虫害" @confirm="confirm" @cancel="cancel"></u-modal>
 		<kps-image-cutter @ok="onok" @cancel="oncancle" :url="url" :fixed="false" :blob="true" :maxWidth="500" :maxHeight="380" :height="380"></kps-image-cutter>
+		<view class="loading" v-if="loadTF">
+			<u-loading  mode="flower" size="100" :show="true" ></u-loading>
+		</view>
 	</view>
 </template>
 
@@ -29,6 +32,7 @@
 		},
 		data() {
 			return {
+				loadTF:false,
 				currentPage: 'tabBar1',
 				list: [{
 					image: '../../static/image/index/11.png'
@@ -76,7 +80,10 @@
 			}
 		},
 		onLoad() {
-
+			
+		},
+		onShow(){
+			this.loadTF = false
 		},
 		methods: {
 			tabfunction(index) {
@@ -129,6 +136,7 @@
 			onok(ev) {
 				this.path = this.url
 				console.log(ev)
+				this.loadTF = true
 				uni.showLoading({
 					mask:true,
 					success:function(){
@@ -213,7 +221,18 @@
 		margin: 0 auto;
 		border-radius: 20rpx !important;
 	}
-
+	.loading{
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 100;
+		width:100%;
+		height: 100vh;
+		background-color: rgba(0,0,0,0.5);
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
 	.function {
 		width: 95%;
 		margin: 20rpx auto;