From d84283821bb08d81d887f20a7118caf25b8b2714 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期二, 27 八月 2024 18:29:10 +0800
Subject: [PATCH] 判断接口返回值是否是字符串,然后解析

---
 pages/modal/3018.vue |  716 +++++++++++++++++++++++++++++++----------------------------
 1 files changed, 372 insertions(+), 344 deletions(-)

diff --git a/pages/modal/3018.vue b/pages/modal/3018.vue
index ef69bae..5653b7c 100644
--- a/pages/modal/3018.vue
+++ b/pages/modal/3018.vue
@@ -1,5 +1,5 @@
 <template>
-	<view class="content">
+	<view class="uni-page-modal-3018">
 		<view class="v-area" v-for="(classattr,index) in classAttrList">
 			<div class="class_attr_title" style="display: none;">
 				<div class="title_line"></div>
@@ -254,8 +254,11 @@
 			</div>
 
 		</view>
-		<button type="default" @tap="cancel" class="btn_cancel">{{translateSys('cancel')}}</button>
-		<button type="default" @tap="sava" class="btn_add">{{title}}</button>
+
+		<view class="v-bottom"><button type="default" @tap="cancel"
+				class="btn_cancel">{{translateSys('cancel')}}</button>
+			<button type="default" @tap="sava" class="btn_add">{{title}}</button>
+		</view>
 		<!-- 鏅�寮圭獥 top bottom center left right -->
 		<view>
 			<uni-popup class="view-popup" ref="popup" background-color="#fff" @change="popupChange">
@@ -338,8 +341,11 @@
 				popupParam: {},
 			}
 		},
+		mounted() {
+			console.log("3018 mounted");
+		},
 		onLoad(options) {
-			// console.log(options);
+			console.log("3018", options);
 			uni.setNavigationBarTitle({
 				title: options.titlename
 			}); //璁剧疆椤堕儴鏍囬 
@@ -363,8 +369,7 @@
 			}
 			if (!param.Edit_dlg.Name) {
 				uni.showModal({
-					title: this.translateSys('tip')
-					",
+					title: this.translateSys('tip'),
 					content: this.translate('function_not_edit_dlg'),
 					showCancel: false,
 					confirmText: this.translateSys('cancel')
@@ -950,7 +955,6 @@
 							for (var j = 0; j < attr.length; j++) {
 								var ar = attr[j];
 								req.push(this.formatAttr(ar))
-
 							}
 						}
 						var info = {
@@ -1246,7 +1250,7 @@
 			},
 			add() {
 				uni.showLoading({
-					title: this.translateSys("loading")
+					title: this.translateSys("loading"),
 					mask: true
 				});
 				var req = [];
@@ -2348,251 +2352,7 @@
 	}
 </script>
 <style>
-	.class_attr_title {
-		font-size: 44rpx;
-		padding-bottom: 22rpx;
-		position: relative;
-	}
-
-	.class_attr_title .title_line {
-		border-bottom: 2rpx solid #aaa;
-		position: relative;
-		bottom: -50rpx;
-		width: calc(100% - 290rpx);
-		margin-left: 100px;
-	}
-
-	.class_attr_title .title_icon {
-		border-radius: 50%;
-		width: 100rpx;
-		line-height: 64rpx;
-		display: inline-block;
-		vertical-align: middle;
-		padding-top: 10rpx;
-		padding-left: 20rpx;
-		text-align: center;
-		color: #fff;
-	}
-
-	.class_attr_title i {
-		color: #2c6aa0 !important;
-	}
-
-	.class_attr_title .title_icon i {
-		font-size: 80rpx;
-	}
-
-	.class_attr_title .title {
-		padding-right: 22rpx;
-		display: inline-block;
-		background-color: #fff;
-		position: relative;
-		bottom: -8rpx;
-	}
-
-	.class_attr_title .arrow {
-		position: absolute;
-		top: 6rpx;
-		right: 30rpx;
-		font-size: 60rpx;
-	}
-
-	input::-webkit-input-placeholder {
-		font-size: 12rpx;
-	}
-
-	textarea {
-		width: 98%;
-		border: 1px solid #d5d5d5;
-		padding: 10rpx 8rpx 12rpx;
-		background: #FFF;
-		border-radius: 0 !important;
-		font-size: 34rpx;
-		font-family: inherit;
-		box-shadow: none !important;
-		transition-duration: 0.1s;
-		color: #046db3;
-		margin-top: 4px;
-	}
-
-	input {
-		border: 1px solid #d5d5d5;
-		width: 98%;
-		height: 52rpx;
-		background: #FFF;
-		border-radius: 0 !important;
-		color: #046db3;
-		padding: 10rpx 8rpx 12rpx;
-		font-size: 34rpx;
-		font-family: inherit;
-		box-shadow: none !important;
-		transition-duration: 0.1s;
-		margin-top: 4rpx;
-	}
-
-	.select {
-		width: 20px;
-		position: absolute;
-		opacity: 0;
-	}
-
-	.class_attr_body .form-group {
-		margin: 20rpx 30rpx;
-		/* margin-left: -12px;
-	    margin-right: -12px; */
-	}
-
-	.form-group>label[class*="col-"] {
-		margin-bottom: 8rpx;
-		font-size: 32rpx;
-	}
-
-	.form-group label {
-		vertical-align: middle;
-		line-height: 60rpx;
-	}
-
-	.no-padding-right {
-		padding-right: 0 !important;
-	}
-
-	.col-xs-12 {
-		width: 100%;
-	}
-
-	.tx_title {
-		font-size: 32rpx;
-	}
-
-	.tx_title2 {
-		font-size: 32rpx;
-		text-align: right;
-		display: inline-block;
-		vertical-align: -2px;
-	}
-
-	.text-right {
-		margin-right: 20rpx;
-		margin-top: -6rpx;
-		display: inline-block;
-		float: right;
-		font-size: 48rpx;
-	}
-
-	.text-right a,
-	.text-right2 a {
-		color: #337ab7;
-	}
-
-	.text-right2 {
-		margin: 0;
-		vertical-align: -4px;
-		margin-left: 9px;
-		float: none;
-		font-size: 48rpx;
-		display: inline-block;
-	}
-
-	.section_iput {
-		border: 1px solid #d5d5d5;
-		width: 98%;
-		height: 62rpx;
-		background: #FFF;
-		border-radius: 0 !important;
-		color: #046db3;
-		padding: 10rpx 8rpx 10rpx;
-		font-size: 34rpx;
-		font-family: inherit;
-		box-shadow: none !important;
-		transition-duration: 0.1s;
-	}
-
-	.date_iput {
-		border: 1px solid #d5d5d5;
-		/* width: 98%; */
-		height: 62rpx;
-		background: #FFF;
-		border-radius: 0 !important;
-		color: #046db3;
-		padding: 10rpx 8rpx 4rpx;
-		font-size: 34rpx;
-		font-family: inherit;
-		box-shadow: none !important;
-		transition-duration: 0.1s;
-	}
-
-	button.btn_add {
-		width: 49.5%;
-		margin-top: 50rpx;
-		padding: 20rpx;
-		line-height: 1.5;
-		background: #27A6E1;
-		border: none;
-		color: #fff;
-		font-size: 38rpx;
-		font-weight: bold;
-		float: right;
-		display: inline-block;
-	}
-
-	button.btn_cancel {
-		width: 49.5%;
-		margin-top: 50rpx;
-		padding: 20rpx;
-		line-height: 1.5;
-		background: #27A6E1;
-		border: none;
-		color: #fff;
-		font-size: 38rpx;
-		font-weight: bold;
-		float: left;
-		display: inline-block;
-	}
-
-	.i_tishi {
-		color: red;
-		vertical-align: sub;
-		font-style: initial;
-		margin-left: 20rpx;
-		font-size: 17px;
-	}
-
-	.attr_field {
-		display: inline-block;
-		vertical-align: middle;
-		margin-left: 8px;
-		/* width: 71%; */
-	}
-
-	.input_vallist {
-		max-height: 350rpx;
-		overflow-y: auto;
-		display: none;
-	}
-
-	.input_vallist ul {
-		/* border: 1px solid red; */
-		padding: 0 20rpx;
-	}
-
-	.input_vallist ul li {
-		list-style: none;
-		padding: 20rpx;
-		border-bottom: 1px solid #ccc;
-	}
-
-	.input_vallist ul li a {
-		float: right;
-	}
-
-	.input_vallist ul li a i {
-		font-size: 45rpx;
-	}
-
-	.view-popup {
-		position: relative;
-	}
-
+	
 	.popup-content {
 		@include flex;
 		align-items: center;
@@ -2602,105 +2362,373 @@
 		/* height: 150px; */
 		/* border: 1px solid red; */
 	}
-
-	.popup-cont {
-		overflow-y: auto;
-		/* border: 1px solid red; */
-	}
-
 	.popup-height {
 		@include height;
 		/* width: 200px; */
 	}
-
-	.popup-header {
-		font-size: 42rpx;
-		font-weight: bold;
-		margin: 20rpx 20rpx 0px 20rpx;
-	}
-
-	.view_popup_CheckList {
-		margin-bottom: 20rpx;
-	}
-
-	.popup-footer {
-		float: right;
-		position: absolute;
-		bottom: 0;
-		right: 20rpx;
-	}
-
-	button.btn_popup_add {
-		width: 180rpx;
-		margin-top: 50rpx;
-		margin-right: 20rpx;
-		padding: 15rpx;
-		line-height: 1.5;
-		background: #27A6E1;
-		border: none;
-		color: #fff;
-		font-size: 38rpx;
-		font-weight: bold;
-		/* float: left; */
-		display: inline-block;
-	}
-
-	button.btn_popup_cancel {
-		width: 180rpx;
-		margin-top: 50rpx;
-		padding: 15rpx;
-		line-height: 1.5;
-		background: #27A6E1;
-		border: none;
-		color: #fff;
-		font-size: 38rpx;
-		font-weight: bold;
-		/* float: right; */
-		display: inline-block;
-	}
 </style>
-<style>
-	.touch-item {
-		background-color: #F8F9FC;
-		display: flex;
-		justify-content: space-between;
-		width: 100%;
-		overflow: hidden
-	}
 
-	.itemcontent {
+<style lang="scss">
+	.uni-page-modal-3018 {
 		display: flex;
-		flex-direction: column;
-		padding: 5px 10px;
-		border-bottom: 1px solid #eeeeee;
-		margin-right: 0;
-		margin-left: -100px;
-		width: 100%;
-		-webkit-transition: all 0.4s;
-		transition: all 0.4s;
-		-webkit-transform: translateX(100px);
-		transform: translateX(100px);
-		position: relative;
-	}
+		height: calc(100vh - 30rpx);
+		width: 720rpx;
+		flex-direction: column !important;
+		padding: 15rpx;
 
-	.itembtn {
-		width: 100px;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		background-color: #119bf8;
-		color: white;
-		position: relative;
-		-webkit-transform: translateX(100px);
-		transform: translateX(100px);
-		-webkit-transition: all 0.4s;
-		transition: all 0.4s;
-	}
+		.v-area {
+			width: 100%;
+			flex-direction: column !important;
+		}
 
-	.touch-move-active .itemcontent,
-	.touch-move-active .itembtn {
-		-webkit-transform: translateX(0);
-		transform: translateX(0);
+		.v-bottom {
+			display: block;
+			width: calc(100% - 30rpx);
+			padding: 10rpx 15rpx 20rpx 15rpx;
+		}
+
+		.class_attr_title {
+			font-size: 44rpx;
+			padding-bottom: 22rpx;
+			position: relative;
+		}
+
+		.class_attr_title .title_line {
+			border-bottom: 2rpx solid #aaa;
+			position: relative;
+			bottom: -50rpx;
+			width: calc(100% - 290rpx);
+			margin-left: 100px;
+		}
+
+		.class_attr_title .title_icon {
+			border-radius: 50%;
+			width: 100rpx;
+			line-height: 64rpx;
+			display: inline-block;
+			vertical-align: middle;
+			padding-top: 10rpx;
+			padding-left: 20rpx;
+			text-align: center;
+			color: #fff;
+		}
+
+		.class_attr_title i {
+			color: #2c6aa0 !important;
+		}
+
+		.class_attr_title .title_icon i {
+			font-size: 80rpx;
+		}
+
+		.class_attr_title .title {
+			padding-right: 22rpx;
+			display: inline-block;
+			background-color: #fff;
+			position: relative;
+			bottom: -8rpx;
+		}
+
+		.class_attr_title .arrow {
+			position: absolute;
+			top: 6rpx;
+			right: 30rpx;
+			font-size: 60rpx;
+		}
+
+		input::-webkit-input-placeholder {
+			font-size: 12rpx;
+		}
+
+		textarea {
+			width: 98%;
+			border: 1px solid #d5d5d5;
+			padding: 10rpx 8rpx 12rpx;
+			background: #FFF;
+			border-radius: 0 !important;
+			font-size: 34rpx;
+			font-family: inherit;
+			box-shadow: none !important;
+			transition-duration: 0.1s;
+			color: #046db3;
+			margin-top: 4px;
+		}
+
+		input {
+			border: 1px solid #d5d5d5;
+			width: 98%;
+			height: 52rpx;
+			background: #FFF;
+			border-radius: 0 !important;
+			color: #046db3;
+			padding: 10rpx 8rpx 12rpx;
+			font-size: 34rpx;
+			font-family: inherit;
+			box-shadow: none !important;
+			transition-duration: 0.1s;
+			margin-top: 4rpx;
+		}
+
+		.select {
+			width: 20px;
+			position: absolute;
+			opacity: 0;
+		}
+
+		.class_attr_body .form-group {
+			margin: 20rpx 30rpx;
+			/* margin-left: -12px;
+	    margin-right: -12px; */
+		}
+
+		.form-group>label[class*="col-"] {
+			margin-bottom: 8rpx;
+			font-size: 32rpx;
+		}
+
+		.form-group label {
+			vertical-align: middle;
+			line-height: 60rpx;
+		}
+
+		.no-padding-right {
+			padding-right: 0 !important;
+		}
+
+		.col-xs-12 {
+			width: 100%;
+		}
+
+		.tx_title {
+			font-size: 32rpx;
+		}
+
+		.tx_title2 {
+			font-size: 32rpx;
+			text-align: right;
+			display: inline-block;
+			vertical-align: -2px;
+		}
+
+		.text-right {
+			margin-right: 20rpx;
+			margin-top: -6rpx;
+			display: inline-block;
+			float: right;
+			font-size: 48rpx;
+		}
+
+		.text-right a,
+		.text-right2 a {
+			color: #337ab7;
+		}
+
+		.text-right2 {
+			margin: 0;
+			vertical-align: -4px;
+			margin-left: 9px;
+			float: none;
+			font-size: 48rpx;
+			display: inline-block;
+		}
+
+		.section_iput {
+			border: 1px solid #d5d5d5;
+			width: 98%;
+			height: 62rpx;
+			background: #FFF;
+			border-radius: 0 !important;
+			color: #046db3;
+			padding: 10rpx 8rpx 10rpx;
+			font-size: 34rpx;
+			font-family: inherit;
+			box-shadow: none !important;
+			transition-duration: 0.1s;
+		}
+
+		.date_iput {
+			border: 1px solid #d5d5d5;
+			/* width: 98%; */
+			height: 62rpx;
+			background: #FFF;
+			border-radius: 0 !important;
+			color: #046db3;
+			padding: 10rpx 8rpx 4rpx;
+			font-size: 34rpx;
+			font-family: inherit;
+			box-shadow: none !important;
+			transition-duration: 0.1s;
+		}
+
+		button.btn_add {
+			width: 49.5%;
+			margin-top: 50rpx;
+			padding: 20rpx;
+			line-height: 1.5;
+			background: #27A6E1;
+			border: none;
+			color: #fff;
+			font-size: 38rpx;
+			font-weight: bold;
+			float: right;
+			display: inline-block;
+		}
+
+		button.btn_cancel {
+			width: 49.5%;
+			margin-top: 50rpx;
+			padding: 20rpx;
+			line-height: 1.5;
+			background: #27A6E1;
+			border: none;
+			color: #fff;
+			font-size: 38rpx;
+			font-weight: bold;
+			float: left;
+			display: inline-block;
+		}
+
+		.i_tishi {
+			color: red;
+			vertical-align: sub;
+			font-style: initial;
+			margin-left: 20rpx;
+			font-size: 17px;
+		}
+
+		.attr_field {
+			display: inline-block;
+			vertical-align: middle;
+			margin-left: 8px;
+			/* width: 71%; */
+		}
+
+		.input_vallist {
+			max-height: 350rpx;
+			overflow-y: auto;
+			display: none;
+		}
+
+		.input_vallist ul {
+			/* border: 1px solid red; */
+			padding: 0 20rpx;
+		}
+
+		.input_vallist ul li {
+			list-style: none;
+			padding: 20rpx;
+			border-bottom: 1px solid #ccc;
+		}
+
+		.input_vallist ul li a {
+			float: right;
+		}
+
+		.input_vallist ul li a i {
+			font-size: 45rpx;
+		}
+
+		.view-popup {
+			position: relative;
+		}
+              
+
+		.popup-cont {
+			overflow-y: auto;
+			/* border: 1px solid red; */
+		}
+
+		
+
+		.popup-header {
+			font-size: 42rpx;
+			font-weight: bold;
+			margin: 20rpx 20rpx 0px 20rpx;
+		}
+
+		.view_popup_CheckList {
+			margin-bottom: 20rpx;
+		}
+
+		.popup-footer {
+			float: right;
+			position: absolute;
+			bottom: 0;
+			right: 20rpx;
+		}
+
+		button.btn_popup_add {
+			width: 180rpx;
+			margin-top: 50rpx;
+			margin-right: 20rpx;
+			padding: 15rpx;
+			line-height: 1.5;
+			background: #27A6E1;
+			border: none;
+			color: #fff;
+			font-size: 38rpx;
+			font-weight: bold;
+			/* float: left; */
+			display: inline-block;
+		}
+
+		button.btn_popup_cancel {
+			width: 180rpx;
+			margin-top: 50rpx;
+			padding: 15rpx;
+			line-height: 1.5;
+			background: #27A6E1;
+			border: none;
+			color: #fff;
+			font-size: 38rpx;
+			font-weight: bold;
+			/* float: right; */
+			display: inline-block;
+		}
+
+
+		.touch-item {
+			background-color: #F8F9FC;
+			display: flex;
+			justify-content: space-between;
+			width: 100%;
+			overflow: hidden
+		}
+
+		.itemcontent {
+			display: flex;
+			flex-direction: column;
+			padding: 5px 10px;
+			border-bottom: 1px solid #eeeeee;
+			margin-right: 0;
+			margin-left: -100px;
+			width: 100%;
+			-webkit-transition: all 0.4s;
+			transition: all 0.4s;
+			-webkit-transform: translateX(100px);
+			transform: translateX(100px);
+			position: relative;
+		}
+
+		.itembtn {
+			width: 100px;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			background-color: #119bf8;
+			color: white;
+			position: relative;
+			-webkit-transform: translateX(100px);
+			transform: translateX(100px);
+			-webkit-transition: all 0.4s;
+			transition: all 0.4s;
+		}
+
+		.touch-move-active .itemcontent,
+		.touch-move-active .itembtn {
+			-webkit-transform: translateX(0);
+			transform: translateX(0);
+		}
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1