Sfoglia il codice sorgente

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-huozhuapp

gjy 2 anni fa
parent
commit
d464b81a80

+ 86 - 29
pages/mine/cargoowner/addEnerprise.vue

@@ -24,7 +24,11 @@
 			</view>
 		</view>
 		<view class='content1'>
-			<view class="title">上传企业授权书</view>
+			<view class="flex">
+				<view class="title">上传企业授权书</view>
+				<view class="title title_css" @click="formWork">授权书模板</view>
+			</view>
+
 			<!-- {{show}} -->
 			<!-- 			<button type="default" @click="()=>{show = true}" style="width: 80%;background-color: #007AFF;color: #fff;margin-top: 60rpx;">选择文件</button>
 				<view class="textStyle" v-for="(item,index) in pathArr" :key="index">
@@ -39,8 +43,8 @@
 					</view>
 				</view>
 				<nk-select-file v-model="show" @confirm="getPath"></nk-select-file> -->
-			<u-upload class="uview-upload" :fileList="fileList1" @beforeRead='beforeRead($event)' @afterRead="afterRead($event)" @delete="deletePic"
-				name="1" multiple :maxCount="9"></u-upload>
+			<u-upload class="uview-upload" :fileList="fileList1" @beforeRead='beforeRead($event)'
+				@afterRead="afterRead($event)" @delete="deletePic" name="1" multiple :maxCount="9"></u-upload>
 			<!-- 		<view style='position:relative;'>
 				<view v-if='!dataDetails.certificateAddressUrl' @click="uploadImg(1)" class="picture picture7">
 					<image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
@@ -89,6 +93,8 @@
 				提交
 			</view>
 		</view>
+		<u-picker :show="formWorkShow" @cancel="formWorkShow = false" @close="formWorkShow = false"
+			:columns="formWorkColumns" @confirm="formWorkSubmit"></u-picker>
 	</view>
 </template>
 
@@ -120,7 +126,12 @@
 				uploadType: '',
 				index: 0,
 				fileList1: [],
-				urlList:[]
+				urlList: [],
+				formWorkShow: false,
+				formWorkColumns: [
+					["复制下载链接", "预览模板"]
+				]
+
 			}
 		},
 		computed: {
@@ -151,21 +162,59 @@
 			}
 		},
 		methods: {
+			formWork() {
+				this.formWorkShow = true
+			},
+			formWorkSubmit(e) {
+				let that = this
+				console.log(e.value[0])
+				if (e.value[0] == "复制下载链接") {
+					uni.setClipboardData({
+						data: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/contractPdf/1069f84fcbbe4c2d9ce048bf98ea7a63.pdf',
+						success: function() {
+							uni.showToast({
+								title: '复制成功',
+							});
+							that.formWorkShow = false
+						},
+						fail: function() {
+							uni.showToast({
+								title: '复制失败',
+							});
+						}
+					});
+				} else {
+					uni.downloadFile({
+						url: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/contractPdf/1069f84fcbbe4c2d9ce048bf98ea7a63.pdf',
+						success: function(res) {
+							var filePath = res.tempFilePath;
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+									that.formWorkShow = false
+								}
+							});
+						}
+					});
+				}
+			},
 			async get_camera_permission() {
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-				if(photol == false){
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
 					uni.showModal({
 						title: '提示',
 						content: '您已经关闭相机权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
-									            // plus.runtime.openURL("app-settings:");
+								// plus.runtime.openURL("app-settings:");
 							} else if (res.cancel) {
 								console.log('用户点击取消');
 							}
 						}
-					});	
+					});
 				}
 			},
 			getPath(event) {
@@ -173,7 +222,7 @@
 				this.pathArr = event;
 			},
 			uploadFilePromise(file, url) {
-				uploadImage('image',url, 'appData/',
+				uploadImage('image', url, 'appData/',
 					result => {
 						// 上传成功回调函数
 						this.urlList.push(result)
@@ -182,7 +231,7 @@
 			},
 			// 删除图片
 			deletePic(event) {
-				this.urlList=this.urlList.splice(event.index,1)
+				this.urlList = this.urlList.splice(event.index, 1)
 				this[`fileList${event.name}`].splice(event.index, 1)
 			},
 			// 新增图片
@@ -210,21 +259,21 @@
 				}
 			},
 			async beforeRead(event) {
-				console.log(1221212,event)
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-								if(photol == false){
-									uni.showModal({
-									    title: '提示',
-									    content: '您已经关闭相机权限,去设置',
-									    success: function (res) {
-									        if (res.confirm) {
-									            plus.runtime.openURL("app-settings:");
-									        } else if (res.cancel) {
-									            console.log('用户点击取消');
-									        }
-									    }
-									});	
-								}
+				console.log(1221212, event)
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function(res) {
+							if (res.confirm) {
+								plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+				}
 			},
 			consent() {
 				this.checked = !this.checked
@@ -308,7 +357,7 @@
 				// 	})
 				// 	return true
 				// }
-				if(this.urlList.length == 0){
+				if (this.urlList.length == 0) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "企业授权书不能为空!",
@@ -332,7 +381,7 @@
 				}
 			},
 			submit() {
-				if(this.validate()){
+				if (this.validate()) {
 					return
 				}
 				uni.showLoading({
@@ -448,9 +497,17 @@
 		}
 
 		.title {
+			width: 50%;
 			color: #999999;
 			margin: 20rpx 0;
 		}
+
+		.title_css {
+			text-align: right;
+			color: #2772FB;
+			margin: 20rpx 0;
+			font-size: 30rpx;
+		}
 	}
 
 	.u-input {
@@ -486,6 +543,6 @@
 			margin-top: 10px;
 		}
 
-	
+
 	}
 </style>

+ 1 - 1
pages/mine/cargoowner/cargoowner.vue

@@ -260,7 +260,7 @@
 		width: 100%;
 		bottom: 0;
 		left: 0;
-		padding: 15px 15px 30px;
+		padding: 15px 15px 40px;
 		box-sizing: border-box;
 	}
 

+ 1 - 1
pages/mine/cargoowner/editEnerprise.vue

@@ -66,7 +66,7 @@
 		</u-action-sheet>
 		<view class="content4">
 			<view style='margin:0 0 18px;font-size:12px;color:#999;' class='flex items-center'>
-				<u--image style='margin-right:5px;margin-top: 16rpx;' @click='consent'
+				<u--image style='margin-right:5px;margin-top: 6rpx;' @click='consent'
 					:src="checked?'../../../static/mine/duihao@2x.png':'../../../static/mine/wxz.png'"
 					width="12px" height="12px"></u--image>
 					我已阅读并同意全部细则

+ 2 - 0
pages/mine/set.vue

@@ -27,6 +27,8 @@
 				</view>
 				<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
 			</view> -->
+		</view>
+		<view class='wrap'>
 			<view class='flex flex-space-between wrap-item' @click='UpdataPassword'>
 				<view>
 					<text>修改密码</text>

+ 3 - 1
pages/news/index.vue

@@ -176,7 +176,9 @@
 			read(val) {
 				if(val.newsType == "投诉结果" || val.newsType == "举报结果"){
 					uni.$u.route("/pages/news/feedbackResults?id=" + val.bussId + "&type=" + val.newsType)
-				}
+				}else{
+					uni.$u.route("/pages/news/newsSee?_obj=" + JSON.stringify(val))
+					}
 				uni.showLoading({
 					title: '加载中',
 					mask: true