wangxy 1 timme sedan
förälder
incheckning
8beba5dfaf

+ 2 - 2
pages/client/hetong/HetongInfo.vue

@@ -71,7 +71,7 @@
 	}
 
 	function init() {
-		httpApi.getHetongInfo({
+		httpApi.getHetongPreview({
 			id: tId.value
 		}).then(res => {
 			info.value = res.data;
@@ -142,7 +142,7 @@
 	}
 	function handleGoLishi() {
 		uni.redirectTo({
-			url: '/pages/admin/Hetong/HetongList'
+			url: '/pages/kehu/hetong/HetongList'
 		})
 	}
 

+ 0 - 153
pages/client/hetong/hetong.vue

@@ -1,153 +0,0 @@
-<template>
-	<view class="phone-hetong-page">
-		<view class="phone-navBar-box">
-			<view @click="goUpPage" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">合同</text>
-		</view>
-		<template v-if="tId">
-			<view class="pdf-box"> 
-				 <img v-for="item in imgList" mode="aspectFit" :src="`data:image/png;base64,${item}`" 
-				 @click="previewBase64Image(`data:image/png;base64,${item}`)" class="pdf-img"/>
-			</view>
-			<!-- 加载提示 -->
-			<view class="pdf-tip-box" v-if="isLoading">
-				<view class="tip-img-box">
-					 <view class="tip-text">加载中...</view>
-				</view>
-			</view>
-		</template>
-		<view class="hetong-tip-box" v-if="info.status == 0">
-				  请务必仔细阅读上述内容,确认已完全理解所有条款后,点击【我已阅读】按钮完成签字确认。
-		</view>
-		<button v-if="info.status == 0" type="default" class="phone-green-btn ht-btn"
-			@click="handleQianming">我已阅读</button>
-
-		<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
-			<view class="ht-qm-popup">
-				<view class="icon-title-navBar-box">
-					<view @click="goback2" class="nav-bar-icon"></view>
-					<text class="nav-bar-title">签名</text>
-				</view>
-				<writeSign @getBase64="getBase64"></writeSign>
-			</view>
-		</uni-popup>
-		
-	</view>
-</template>
-
-<script setup>
-	import {
-		ref
-	} from "vue";
-	import * as httpApi from "@/api/jzHetong.js"
-	import {
-		onLoad
-	} from "@dcloudio/uni-app"
-	import writeSign from "@/components/writeSign/index.vue"
-  import {throttleAdvanced} from "@/utils/common.js"
-  import { base64ToPath } from 'image-tools';
-
-	const tId = ref(null)
-	const info = ref({})
-	const popupRef = ref(null)
-	const imgList = ref([])
-	const isLoading = ref(true)
-  const timer1 = ref(null)
-
-	function goUpPage() {
-		uni.navigateBack()
-    clearTimeout(timer1.value);
-    timer1.value = null;
-	}
-	onLoad(({id}) => {
-    tId.value = id;
-		init(id)
-	})
-
-	function init(id) {
-		if (!id) {
-			uni.showToast({
-				title: '数据异常,请确认路径是否完整'
-			})
-			return;
-		}
-
-		httpApi.getHetongInfo({id}).then(res => {
-			info.value = res.data;
-			imgList.value = res.data.base64List;
-		}).finally(() => {
-			isLoading.value = false;
-		})
-	}
-
-  async function previewBase64Image(base64Data) {
-      try {
-        // 关键步骤:将 Base64 字符串转换为本地临时路径
-        // 此处以使用 image-tools 的 base64ToPath 为例
-        const localPath = await base64ToPath(base64Data);
-        // 调用 UniApp 的图片预览 API
-        uni.previewImage({
-          urls: [localPath], // 注意:urls 参数需要是数组,即使只预览一张图
-          current: 0, // 当前显示图片在 urls 数组中的索引
-        });
-      } catch (error) {
-        // 如果出现错误(如转换失败),隐藏加载提示并告知用户
-        console.error('预览失败:', error);
-        uni.showToast({
-          title: '预览失败',
-          icon: 'none'
-        });
-      }
-  }
-
-	function handleGoLishi() {
-		uni.redirectTo({
-			url: '/pages/admin/Hetong/HetongList'
-		})
-	}
-
-	function handleQianming() {
-		popupRef.value.open()
-	}
-
-  const  handleQM = throttleAdvanced((img) => {
-    uni.showToast({
-      title: "签名提交中...",
-      mask: true,
-    })
-
-    httpApi.getHetongQianming({
-      id: tId.value,
-      yifangBase64: img.replace(/^data:image\/\w+;base64,/, ''), // 当前接口,只有唯一yifangBase64 + id
-    }).then(res => {
-      if (res.data) {
-        uni.showToast({
-          title: "签名成功",
-          duration: 2000,
-          mask: true,
-          success() {
-            timer1.value = setTimeout(() => uni.navigateBack(),2000)
-          }
-        })
-      }
-    })
-  })
-
-	function getBase64(img) {
-		if (!img) {
-			uni.showToast({
-				title: '签名异常'
-			})
-			return;
-		}
-    handleQM(img)
-	}
-
-	function goback2() {
-		popupRef.value.close()
-	}
-</script>
-
-<style>
-
-</style>

+ 2 - 2
pages/kehu/hetong/HetongInfo.vue

@@ -71,7 +71,7 @@
 	}
 
 	function init() {
-		httpApi.getHetongInfo({
+		httpApi.getHetongPreview({
 			id: tId.value
 		}).then(res => {
 			info.value = res.data;
@@ -142,7 +142,7 @@
 	}
 	function handleGoLishi() {
 		uni.redirectTo({
-			url: '/pages/admin/Hetong/HetongList'
+			url: '/pages/client/hetong/HetongList'
 		})
 	}
 

+ 0 - 153
pages/kehu/hetong/hetong.vue

@@ -1,153 +0,0 @@
-<template>
-	<view class="phone-hetong-page">
-		<view class="phone-navBar-box">
-			<view @click="goUpPage" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">合同</text>
-		</view>
-		<template v-if="tId">
-			<view class="pdf-box"> 
-				 <img v-for="item in imgList" mode="aspectFit" :src="`data:image/png;base64,${item}`" 
-				 @click="previewBase64Image(`data:image/png;base64,${item}`)" class="pdf-img"/>
-			</view>
-			<!-- 加载提示 -->
-			<view class="pdf-tip-box" v-if="isLoading">
-				<view class="tip-img-box">
-					 <view class="tip-text">加载中...</view>
-				</view>
-			</view>
-		</template>
-		<view class="hetong-tip-box" v-if="info.status == 0">
-				  请务必仔细阅读上述内容,确认已完全理解所有条款后,点击【我已阅读】按钮完成签字确认。
-		</view>
-		<button v-if="info.status == 0" type="default" class="phone-green-btn ht-btn"
-			@click="handleQianming">我已阅读</button>
-
-		<uni-popup ref="popupRef" type="bottom" background-color="#fff" :is-mask-click="false" :mask-click="false">
-			<view class="ht-qm-popup">
-				<view class="icon-title-navBar-box">
-					<view @click="goback2" class="nav-bar-icon"></view>
-					<text class="nav-bar-title">签名</text>
-				</view>
-				<writeSign @getBase64="getBase64"></writeSign>
-			</view>
-		</uni-popup>
-		
-	</view>
-</template>
-
-<script setup>
-	import {
-		ref
-	} from "vue";
-	import * as httpApi from "@/api/khHetong.js"
-	import {
-		onLoad
-	} from "@dcloudio/uni-app"
-	import writeSign from "@/components/writeSign/index.vue"
-  import {throttleAdvanced} from "@/utils/common.js"
-  import { base64ToPath } from 'image-tools';
-
-	const tId = ref(null)
-	const info = ref({})
-	const popupRef = ref(null)
-	const imgList = ref([])
-	const isLoading = ref(true)
-  const timer1 = ref(null)
-
-	function goUpPage() {
-		uni.navigateBack()
-    clearTimeout(timer1.value);
-    timer1.value = null;
-	}
-	onLoad(({id}) => {
-    tId.value = id;
-		init(id)
-	})
-
-	function init(id) {
-		if (!id) {
-			uni.showToast({
-				title: '数据异常,请确认路径是否完整'
-			})
-			return;
-		}
-
-		httpApi.getHetongInfo({id}).then(res => {
-			info.value = res.data;
-			imgList.value = res.data.base64List;
-		}).finally(() => {
-			isLoading.value = false;
-		})
-	}
-
-  async function previewBase64Image(base64Data) {
-      try {
-        // 关键步骤:将 Base64 字符串转换为本地临时路径
-        // 此处以使用 image-tools 的 base64ToPath 为例
-        const localPath = await base64ToPath(base64Data);
-        // 调用 UniApp 的图片预览 API
-        uni.previewImage({
-          urls: [localPath], // 注意:urls 参数需要是数组,即使只预览一张图
-          current: 0, // 当前显示图片在 urls 数组中的索引
-        });
-      } catch (error) {
-        // 如果出现错误(如转换失败),隐藏加载提示并告知用户
-        console.error('预览失败:', error);
-        uni.showToast({
-          title: '预览失败',
-          icon: 'none'
-        });
-      }
-  }
-
-	function handleGoLishi() {
-		uni.redirectTo({
-			url: '/pages/admin/Hetong/HetongList'
-		})
-	}
-
-	function handleQianming() {
-		popupRef.value.open()
-	}
-
-  const  handleQM = throttleAdvanced((img) => {
-    uni.showToast({
-      title: "签名提交中...",
-      mask: true,
-    })
-
-    httpApi.getHetongQianming({
-      id: tId.value,
-      yifangBase64: img.replace(/^data:image\/\w+;base64,/, ''), // 当前接口,只有唯一yifangBase64 + id
-    }).then(res => {
-      if (res.data) {
-        uni.showToast({
-          title: "签名成功",
-          duration: 2000,
-          mask: true,
-          success() {
-            timer1.value = setTimeout(() => uni.navigateBack(),2000)
-          }
-        })
-      }
-    })
-  })
-
-	function getBase64(img) {
-		if (!img) {
-			uni.showToast({
-				title: '签名异常'
-			})
-			return;
-		}
-    handleQM(img)
-	}
-
-	function goback2() {
-		popupRef.value.close()
-	}
-</script>
-
-<style>
-
-</style>

+ 10 - 39
pages/kehu/my/my.vue

@@ -39,11 +39,11 @@
 				<text>用户服务协议</text>
 				<icon class="jt-icon" :style="{ backgroundImage: 'url(' + myInfoData.imgsArr.jtIcon + ')' }"></icon>
 			</view>
-			<view class="list-row" @click="showZhuaPaiConfirm">
+	<!-- 		<view class="list-row" @click="showZhuaPaiConfirm">
 				<icon class="list-icon" :style="{ backgroundImage: 'url(' + myInfoData.imgsArr.sxtcsListIcon + ')' }"></icon>
 				<text>摄像头测试</text>
 				<icon class="jt-icon" :style="{ backgroundImage: 'url(' + myInfoData.imgsArr.jtIcon + ')' }"></icon>
-			</view>
+			</view> -->
 			<view class="list-row" @click="exitLogin">
 				<icon class="list-icon" :style="{ backgroundImage: 'url(' + myInfoData.imgsArr.loginOutListIcon + ')' }"></icon>
 				<text>退出登录</text>
@@ -61,12 +61,11 @@
 	import {toast} from "@/utils/common";
 	import {onLoad,onShow} from '@dcloudio/uni-app';
 	import cacheManager from '@/utils/cacheManager.js';
-	import {getMineUser,getMineInfo,getMineLogout} from '@/api/my.js'
+	import {getKehuUser,getKehuLogout} from '@/api/kehu.js'
 	import {reactive,ref} from "vue";
 	import customTabbarClient from "@/components/custom-tabbar/custom-tabbar-client.vue"
 	import commonDialog from '@/components/dialog/commonDialog.vue';
 	import shexiangDialogVue from "@/components/dialog/shexiangDialog.vue";
-	// import zhuapaiConfrimVue from "@/components/zhuapaiConfirm/index.vue";
 	
 	let myInfoData = reactive({
 		userImg: '',
@@ -101,69 +100,42 @@
 	const exitTitle = '退出登录';
 	function getMyInit() {
 		getUserInfo();
-		getNumInfo();
 	}
 	// 获取用户头像
 	function goToPage(data){
 		switch (data) {
-		    case 'ks':
-		        uni.navigateTo({
-		        	url:'/pages/client/Kaoshi/list?from=my'
-		        })
-		        break;
-		    case 'lx':
-		        uni.navigateTo({
-		        	url:'/pages/client/Lianxi/list?from=my'
-		        })
-		        break;
-		    case 'kc':
-		        uni.navigateTo({
-		        	url:'/pages/client/Kecheng/list?from=my'
-		        })
-		        break;
-			case 'cj':
-			    uni.navigateTo({
-			    	url:'/pages/client/Chengji/list?from=my'
-			    })
-			    break;
 			case 'grcj':
 			    uni.navigateTo({
-			    	url:'/pages/client/my/myInfo?from=my'
+			    	url:'/pages/kehu/my/myInfo?from=my'
 			    })
 				break;
 			case 'zc':
 				uni.navigateTo({
-					url:'/pages/client/my/zhengce?from=my'
+					url:'/pages/kehu/my/zhengce?from=my'
 				})
 				break;
 			case 'xy':
 				uni.navigateTo({
-					url:'/pages/client/my/xieyi?from=my'
+					url:'/pages/kehu/my/xieyi?from=my'
 				})
 			    break;
 		}
 	}
 	function getUserInfo(){
-		getMineUser({}).then(res => {
+		getKehuUser({}).then(res => {
 			myInfoData.userImg= res.data.icon;
 			myInfoData.realName = res.data.realName;
 			myInfoData.idcard = res.data.idcard;
 			myInfoData.userName = res.data.userName;
 		})
 	}
-	function getNumInfo(){
-		getMineInfo({}).then(res => {
-			myInfoData.kaoshiCount = res.data.kaoshiCount;
-			myInfoData.kechengCount = res.data.kechengCount;
-			myInfoData.lianxiCount = res.data.lianxiCount;
-		})
-	}
+
 	function exitLogin(){
 		commonDialogRef.value.handleShow();
 		
 	}
 	function exitBtn(){
-		getMineLogout().then(res => {
+		getKehuLogout().then(res => {
 			toast('退出登录成功')
 			cacheManager.clearAll();
 			uni.reLaunch({
@@ -175,13 +147,12 @@
 	}
 	
 	function showMessageDl() {
-		console.log(shexiangRef.value)
 		shexiangRef.value.handleShow()
 	}
 	
 	function showZhuaPaiConfirm() {
 		uni.navigateTo({
-			url: "/pages/client/my/cameraTest"
+			url: "/pages/kehu/my/cameraTest"
 		})
 	}