소스 검색

预览,签名

zouling 1 년 전
부모
커밋
2e8c8c9fe3

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "皖源融资担保",
     "appid" : "__UNI__FA20DEF",
     "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : 100,
+    "versionName" : "1.0.1",
+    "versionCode" : 101,
     "transformPx" : false,
     "app-plus" : {
         "usingComponents" : true,

+ 27 - 15
pages/index/index.vue

@@ -360,21 +360,33 @@
 				title: '加载中'
 			});
 			var url=baseUrl+e;
-			uni.downloadFile({
-				url: url,//文件的下载路径
-				success(result) {
-						uni.hideLoading()
-					var filePath = result.tempFilePath;
-					   uni.openDocument({
-					     filePath: filePath,
-					     showMenu: true,
-					     success: function (res) {
-					       // console.log('打开文档成功');
-					     }
-					   });
-				},
-				fail(res) {uni.hideLoading()}
-			})
+			let index1 = e.lastIndexOf("."); // 得到一个索引值
+			let index2 = e.length;
+			let type = e.substring(index1, index2);
+			if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
+				uni.previewImage({
+					current: 0,
+					urls: [url],
+					// background: '#ffffff'
+				});
+				uni.hideLoading();
+			} else {
+				uni.downloadFile({
+					url: url,//文件的下载路径
+					success(result) {
+							uni.hideLoading()
+						var filePath = result.tempFilePath;
+						   uni.openDocument({
+						     filePath: filePath,
+						     showMenu: true,
+						     success: function (res) {
+						       // console.log('打开文档成功');
+						     }
+						   });
+					},
+					fail(res) {uni.hideLoading()}
+				})
+			}
 		},
 		getScanFn(){
 			// 扫码识别

+ 1 - 1
work/components/business/aqyxx.vue

@@ -46,7 +46,7 @@
 			<image :src="titimg"></image>全体股东身份及征信
 		</view>
 		<view class="flexcw" v-for="(ite,idx) in datainfo.shareholderFjList" :key="idx">
-			<view class="txt">股东{{Number(idx)+1}}身份证:<text class="txta" @click="getDown(ite.shareholderFrontUrl)">在线查看</text></view>
+			<view class="txt" v-if="ite.shareholderFrontUrl">股东{{Number(idx)+1}}身份证:<text class="txta" @click="getDown(ite.shareholderFrontUrl)">在线查看</text></view>
 			<view class="txt" v-if="ite.shareholderZxUrl">股东{{Number(idx)+1}}征信:<text class="txta" @click="getDown(ite.shareholderZxUrl.split(',')[0])">在线查看</text></view>
 		</view>
 	</view>

+ 2 - 1
work/components/business/ewjcj.vue

@@ -25,7 +25,8 @@
 					<view class="imgl"><image :src="filico" ></image></view>
 					<view class="tit">{{fite.name}}</view>
 				</view>
-				<view class="edit" v-if="(ite.val=='psyjqpb'||ite.val=='gdhyjy'||ite.val=='wtdbht')&&datainfo.loanApplicationType!=4&&checkPermi(['word:wordFilePath:wordFilePath'])" @click="getQmFn(fite.url)">
+				<!-- ||ite.val=='wtdbht' -->
+				<view class="edit" v-if="(ite.val=='gdhyjy')&&datainfo.loanApplicationType!=4&&checkPermi(['word:wordFilePath:wordFilePath'])" @click="getQmFn(fite.url)">
 					<image :src="edit"></image>
 					<view>在线签名</view>
 				</view>

+ 12 - 0
work/components/popup/popup.vue

@@ -709,6 +709,17 @@
 					title: '加载中'
 				});
 				var url=baseUrl+e;
+				let index1 = e.lastIndexOf("."); // 得到一个索引值
+				let index2 = e.length;
+				let type = e.substring(index1, index2);
+				if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
+					uni.previewImage({
+						current: 0,
+						urls: [url],
+						// background: '#ffffff'
+					});
+					uni.hideLoading();
+				} else {
 				uni.downloadFile({
 					url: url,//文件的下载路径
 					success(result) {
@@ -724,6 +735,7 @@
 					},
 					fail(res) {uni.hideLoading()}
 				})
+				}
 			},
 		}
 	}

+ 13 - 1
work/pages/business/add.vue

@@ -2142,7 +2142,7 @@
 				});
 			},
 			getDownloader(path,name){
-				console.log(path,name)
+				// console.log(path,name)
 				// #ifdef APP-PLUS
 				uni.showLoading({
 					title: '加载中'
@@ -2217,6 +2217,17 @@
 					title: '加载中'
 				});
 				var url=baseUrl+e;
+				let index1 = e.lastIndexOf("."); // 得到一个索引值
+				let index2 = e.length;
+				let type = e.substring(index1, index2);
+				if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
+					uni.previewImage({
+						current: 0,
+						urls: [url],
+						// background: '#ffffff'
+					});
+					uni.hideLoading();
+				} else {
 				uni.downloadFile({
 					url: url,//文件的下载路径
 					success(result) {
@@ -2232,6 +2243,7 @@
 					},
 					fail(res) {uni.hideLoading()}
 				})
+				}
 			},
 		}
 	}

+ 12 - 0
work/pages/business/details.vue

@@ -1071,6 +1071,17 @@
 					title: '加载中'
 				});
 				var url=baseUrl+e;
+				let index1 = e.lastIndexOf("."); // 得到一个索引值
+				let index2 = e.length;
+				let type = e.substring(index1, index2);
+				if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
+					uni.previewImage({
+						current: 0,
+						urls: [url],
+						// background: '#ffffff'
+					});
+					uni.hideLoading();
+				} else {
 				uni.downloadFile({
 					url: url,//文件的下载路径
 					success(result) {
@@ -1086,6 +1097,7 @@
 					},
 					fail(res) {uni.hideLoading()}
 				})
+				}
 			},
 		}
 	}

+ 3 - 3
work/pages/business/sign.vue

@@ -62,14 +62,14 @@
 				chirography: [], //笔迹
 				currentChirography: {}, //当前笔迹
 				linePrack: [] ,//划线轨迹 , 生成线条的实际点
-				url:'d://test.docx',
+				url:'',
 			};
 		},
 		onLoad(e) {
 			if(e.url){
 				this.url=JSON.parse(decodeURIComponent(e.url));
 			}
-			console.log(this.url)
+			// console.log(this.url)
 		},
 		mounted() {
 			let canvasName = this.canvasName;
@@ -527,7 +527,7 @@
 												 	var result=resa.target.result;
 												 	// console.log(result,2) 
 												 	var params={
-												 		wordFilePath:baseUrl+that.url,
+												 		wordFilePath:that.url,
 												 		image:result
 												 	}
 												     getWordFilePath(params).then(resb=>{

+ 4 - 4
work/pages/file/list.vue

@@ -107,7 +107,7 @@
 				this.getDataFn()
 			},
 			getDownloader(path,name){
-				console.log(path,name)
+				// console.log(path,name)
 				// #ifdef APP-PLUS
 				uni.showLoading({
 					title: '加载中'
@@ -134,9 +134,9 @@
 								
 								//下载成功,d.filename是文件在保存在本地的相对路径,使用下面的API可转为平台绝对路径
 								let fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
-								setTimeout(() => {
-									plus.runtime.openFile(d.filename); //选择软件打开文件
-								}, 1500)
+								// setTimeout(() => {
+								// 	plus.runtime.openFile(d.filename); //选择软件打开文件
+								// }, 1500)
 							} else {
 								//下载失败
 								uni.hideLoading();

+ 12 - 0
work/pages/file/wjdetails.vue

@@ -66,6 +66,17 @@
 					title: '加载中'
 				});
 				var url=baseUrl+e;
+				let index1 = e.lastIndexOf("."); // 得到一个索引值
+				let index2 = e.length;
+				let type = e.substring(index1, index2);
+				if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
+					uni.previewImage({
+						current: 0,
+						urls: [url],
+						// background: '#ffffff'
+					});
+					uni.hideLoading();
+				} else {
 				uni.downloadFile({
 					url: url,//文件的下载路径
 					success(result) {
@@ -81,6 +92,7 @@
 					},
 					fail(res) {uni.hideLoading()}
 				})
+				}
 			},
 		}
 	}