USER-20230908AJ\Administrator il y a 3 semaines
Parent
commit
644e72725c
3 fichiers modifiés avec 81 ajouts et 258 suppressions
  1. 49 49
      .env.js
  2. 23 208
      page_task/task_details/task_details.vue
  3. 9 1
      static/css/common.css

+ 49 - 49
.env.js

@@ -1,52 +1,52 @@
-// let version = __wxConfig.envVersion;
+let version = __wxConfig.envVersion;
 
-// console.log('配置文件加载')
-// // #ifdef MP-WEIXIN
-// console.log('微信小程序验证')
-// console.log(__wxConfig.envVersion)
-// if (version === 'develop') {
-//     //开发环境
-//     ENV_CONFIG = require('.env.dev.js');
-//     ENV_CONFIG.isCanvas2d = false
-// }else if (__wxConfig.envVersion === 'release') {
-//     //生产环境
-//     ENV_CONFIG = require('.env.prod.js');
-//     ENV_CONFIG.isCanvas2d = true
-// }  else {
-//     //体验环境
-//     ENV_CONFIG = require('.env.prod.js');
-//     ENV_CONFIG.isCanvas2d = true
-// }
-// //#endif
-// // #ifndef MP-WEIXIN
-// console.log('其它环境验证')
-// if (version === 'develop') {
-//     //开发环境
-//     // ENV_CONFIG = require('.env.dev.js');
-//     ENV_CONFIG = require('.env.trial.js');
-//     ENV_CONFIG.isCanvas2d = false
-//     // ENV_CONFIG = require('.env.prod.js');
-// }else if(version === 'trial'){
-//     //体验环境
-//     ENV_CONFIG = require('.env.trial.js');
-//     ENV_CONFIG.isCanvas2d = true
-// } else{
+console.log('配置文件加载')
+// #ifdef MP-WEIXIN
+console.log('微信小程序验证')
+console.log(__wxConfig.envVersion)
+if (version === 'develop') {
+    //开发环境
+    ENV_CONFIG = require('.env.dev.js');
+    ENV_CONFIG.isCanvas2d = false
+}else if (__wxConfig.envVersion === 'release') {
+    //生产环境
+    ENV_CONFIG = require('.env.prod.js');
+    ENV_CONFIG.isCanvas2d = true
+}  else {
+    //体验环境
+    ENV_CONFIG = require('.env.prod.js');
+    ENV_CONFIG.isCanvas2d = true
+}
+//#endif
+// #ifndef MP-WEIXIN
+console.log('其它环境验证')
+if (version === 'develop') {
+    //开发环境
+    // ENV_CONFIG = require('.env.dev.js');
+    ENV_CONFIG = require('.env.trial.js');
+    ENV_CONFIG.isCanvas2d = false
+    // ENV_CONFIG = require('.env.prod.js');
+}else if(version === 'trial'){
+    //体验环境
+    ENV_CONFIG = require('.env.trial.js');
+    ENV_CONFIG.isCanvas2d = true
+} else{
 
-//     //生产环境
-//     ENV_CONFIG = require('.env.prod.js');
-//     ENV_CONFIG.isCanvas2d = true
-// }
-// //#endif
+    //生产环境
+    ENV_CONFIG = require('.env.prod.js');
+    ENV_CONFIG.isCanvas2d = true
+}
+//#endif
 
-// //给环境变量process.uniEnv赋值
-// if (ENV_CONFIG !== null) {
-//     process.uniEnv = {};
-//     for (let key in ENV_CONFIG) {
-//         process.uniEnv[key] = ENV_CONFIG[key];
-//     }
-//     // #ifdef H5
-//     if (nodeEnv !== 'development') {
-//         process.uniEnv.baseUrl = window.location.hostname;
-//     }
-//     //#endif
-// }
+//给环境变量process.uniEnv赋值
+if (ENV_CONFIG !== null) {
+    process.uniEnv = {};
+    for (let key in ENV_CONFIG) {
+        process.uniEnv[key] = ENV_CONFIG[key];
+    }
+    // #ifdef H5
+    if (nodeEnv !== 'development') {
+        process.uniEnv.baseUrl = window.location.hostname;
+    }
+    //#endif
+}

+ 23 - 208
page_task/task_details/task_details.vue

@@ -7,24 +7,17 @@
 					</image>
 					<view class="detail-content">
 						<view class="row-c m-l10 m-t16 m-b20 text-color-fff">
-							<image class="wh-45 r-circle" src="/page_task/static/img/task-details/head.png"
+							<image class="wh-45 r-circle" src="https://img10.360buyimg.com/imgw/s288x1000_jfs/t1/307262/4/9992/255939/684f9a78Fbddd6f3f/e07bf46597371d37.jpg"
 								mode="aspectFill">
 							</image>
-							<text class="size-28 m-lr16">{{business.name}}</text>
-							<view class="size-24 row-c sys-bg-007038 r-100 p-lr16 p-tb6">
-								<text>{{business.sex===1?'男':'女'}}</text>
-								<view class="detail-line m-lr10"></view>
-								<text>{{business.age}}岁</text>
-							</view>
-							<view class="row-c size-24 sys-bg-007038 r-100 p-lr16 p-tb6 m-l20" @click="makingCall(business.phone)">
-								<image class="wh-20" src="/page_task/static/img/task-details/phone-two.png"
-									mode="aspectFill">
-								</image>
-								<text>{{business.phone}}</text>
+							<text class="size-28 m-lr16  m-t6">大连市甘井子区宜居园81号2单元1层1号房屋</text>
+
+							<view class="row-c size-24 sys-bg-007038 r-100 p-lr16 p-tb6 m-l20" >
+								<text>住宅</text>
 							</view>
-							<image class="wh-60 animate__animated animate__fadeInDownBig" v-if="business.status>0"
+							<image class="wh-60 animate__animated animate__fadeInDownBig"
 								style="position: absolute;right: 20rpx;"
-								:src="'/page_task/static/img/task-details/icon-'+business.status+'.png'"
+								:src="'/page_task/static/img/task-details/icon-1.png'"
 								mode="aspectFill">
 							</image>
 						</view>
@@ -228,24 +221,12 @@
 		},
 		onLoad(data) {
       console.log('-----------aaaaa-----------')
-			if (data.taskId !== undefined) {
-				this.businessId = data.taskId
-        if(data.isReturn!==undefined){
-          this.isReturn=data.isReturn*1
-        }
-			} else {
-				tools.leftClick()
-			}
+
 		},
     mounted() {
-      this.getTaskDetail()
-      uni.$on('newTaskList', () => {
-        this.getTaskDetail()
-        this.$refs.stepsObj.getStageList()
-      })
+
     },
 		methods: {
-      type,
       makingCall(phone){
         tools.makingCall(phone)
       },
@@ -265,89 +246,25 @@
 				});
 			},
 			auditTask(auditType) {
-				uni.navigateTo({
-					url: '/page_task/task_operate/task_operate?businessId=' + this.business.id +
-						'&type=2&auditType=' + auditType
-				});
+
 			},
 			setPostLoan() {
-				uni.navigateTo({
-					url: '/pages-task/task-info/task-loan?id=' + this.business.id
-				});
+
 			},
 			editTask() {
-				uni.reLaunch({
-					url: '/page_task/information/information?businessId=' + this.business.id
-				})
+
 			},
 			cancellation() {
-				uni.showModal({
-					title: '提示',
-					content: '是否作废当前任务?',
-					success: (res) => {
-						console.log(res)
-						if (res.confirm) {
-
-							cancellation({
-								'id': this.business.id
-							}).then((res) => {
-								if (res.code === 1) {
-									this.business.status = 5;
-									this.isExecute = 0;
-									tools.success(res.msg)
-									uni.$emit('newReceiving')
-								} else {
-									tools.error(res.msg)
-								}
-							})
-						}
-					}
-				});
+
 			},
 			endTask() {
-				uni.showModal({
-					title: '提示',
-					content: '是否完成当前任务?',
-					success: (res) => {
-						console.log(res)
-						if (res.confirm) {
-
-							endTask({
-								'id': this.business.id
-							}).then((res) => {
-								if (res.code === 1) {
-									this.business.status = 4;
-									this.isExecute = 0;
-									tools.success(res.msg)
-									uni.$emit('newReceiving')
-								} else {
-									tools.error(res.msg)
-								}
-							})
-						}
-					}
-				});
+
 			},
 			takeTask() {
-				if (this.isAjax) {
-					// return;
-				}
-				this.isAjax = true;
-				takeTask({
-					'id': this.business.id
-				}).then((res) => {
-					if (res.code === 1) {
-						tools.success('领取成功')
-						uni.$emit('newReceiving')
-						this.getTaskDetail()
-					} else {
-						this.isAjax = false;
-						tools.error(res.msg)
-					}
-				})
+
 			},
       closeExecutePopup(){
-        this.$refs.executePopup.close('bottom')
+
       },
 			setNewExecute(type) {
 				if (type) {
@@ -374,78 +291,15 @@
 
 			},
 			openExecute() {
-				this.executeData = [];
-				getExecuteList({
-					'business_id': this.businessId
-				}).then((res) => {
-					if (res.code === 1) {
-						this.executeData = res.data
-						this.$refs.executePopup.open('bottom')
-					}
-				})
+
 			},
 			setTaskOperate(type) {
-				uni.navigateTo({
-					'url': '/page_task/task_operate/task_operate?businessId=' + this.businessId + '&type=' + type
-				})
+
 			},
 			async getTaskDetail() {
-				const res = await getTaskDetail({
-					id: this.businessId
-				})
-				if (res.code === 1) {
-					this.product = res.data.product
-					this.business = res.data.business
-					this.business.stageName = res.data.stageData.stageName
-					this.propertyList = res.data.propertyList
-					this.applyFor = res.data.applyFor
-					this.tripartite = res.data.tripartite
-					this.linkman = res.data.linkman
-					this.credit = res.data.credit
-					this.postLoan = res.data.postLoan
-					this.stageData = res.data.stageData
-					this.isExecute = res.data.isExecute
-					this.businessFile = res.data.businessFile
-          this.product.product_types.forEach(itemType=>{
-            if(itemType==='3' || itemType==='4'){
-              this.basicType.push(itemType)
-            }
-            if(itemType==='6'){
-              this.restType.push(itemType)
-            }
-          })
-					this.$refs.recordObj.startData()
-					this.$refs.zSwiper.swiper
-					this.getDetailsHeight()
-					this.setShowKey()
-				} else {
-					tools.leftClick()
-				}
-			},
-			setShowKey() {
-				this.product.type_data.forEach(item => {
-					switch (item.type) {
-						case '1':
-							this.clientKey = item.type_keys
-							break;
-						case '2':
-							this.propertyKey = item.type_keys
-							break;
-						case '3':
-							this.appliesKey = item.type_keys
-							break;
-						case '4':
-							this.tripartiteKey = item.type_keys
-							break;
-						case '5':
-							this.linkmanKey = item.type_keys
-							break;
-						case '6':
-							this.creditKey = item.type_keys
-							break;
-					}
-				})
+
 			},
+
 			// 获取详情高度Swiper
 			getDetailsHeight() {
 				this.maxHeight = '100%'
@@ -501,48 +355,11 @@
 			},
 			// 征信高度Swiper
 			onCreditHeight() {
-				this.creditHeight = '100%'
-				this.$nextTick(() => {
-					const query = uni.createSelectorQuery().in(this);
-					setTimeout(() => {
-						query.select('.property').boundingClientRect(data => {
-							if (data) {
-								this.creditHeight = data.height
-								uni.pageScrollTo({
-									scrollTop: 0,
-									duration: 300
-								});
-							}
-						}).exec();
-					}, 200)
-				})
+
 			},
 			// 征信高度Swiper
 			onCreditSwiper(swiper, index) {
-				this.creditHeight = '100%'
-				const query = uni.createSelectorQuery().in(this);
-				this.$nextTick(() => {
-					setTimeout(() => {
-						if (index == 0) {
-							query.select('.property').boundingClientRect(data => {
-								if (data) {
-									this.creditHeight = data.height
-								}
-							}).exec();
-						}
-						if (index == 1) {
-							query.select('.credit_list').boundingClientRect(data => {
-								if (data) {
-									this.creditHeight = data.height
-								}
-							}).exec();
-						}
-						uni.pageScrollTo({
-							scrollTop: 0,
-							duration: 300
-						});
-					}, 200)
-				})
+
 			},
 			onChange(current) {
 				if (current == 1) {
@@ -558,9 +375,7 @@
 				});
 			},
 			onSubmit() {
-				uni.navigateTo({
-					url: "/page_task/task_operate/task_operate"
-				})
+
 			}
 		}
 	}

+ 9 - 1
static/css/common.css

@@ -363,6 +363,13 @@
 	padding-right: 40rpx;
 }
 
+.m-t6{
+	max-width: 50%;          /* 最大宽度 */
+	overflow: hidden;          /* 超出隐藏 */
+	text-overflow: ellipsis;   /* 显示省略号 */
+	white-space: nowrap;       /* 不换行 */
+}
+
 /*margin大小*/
 .m-16 {
 	margin: 16rpx;
@@ -505,6 +512,7 @@
 	margin-bottom: 40rpx;
 }
 
+
 .m-lr10 {
 	margin-left: 10rpx;
 	margin-right: 10rpx;
@@ -1084,4 +1092,4 @@
 
 .mr-40 {
 	margin-right: 40rpx;
-}
+}