tanxue vor 1 Monat
Ursprung
Commit
7493406b91

+ 2 - 11
common/styles/global/components.scss

@@ -137,15 +137,6 @@ view{box-sizing: border-box;}
 			line-height: 50rpx;border-radius: 8rpx;padding: 0 10rpx;}
 }
 
-// 带背景色client使用
-.icon-title-bjcolor-navBar-box{
-	background-color: #fff;padding: 10rpx;border-bottom: 1rpx solid #e0e0e0;
-	.nav-bar-title{color: #3fd2a1;}
-	.nav-bar-icon{width: 100rpx;height: 63rpx;background-image:unset;top: calc(12rpx + var(--status-bar-height));}
-	.nav-bar-icon::before{content:'';width:50rpx;height: 50rpx;display: inline-block;margin-top: 6rpx;
-	@include ezy-no-repeat-cover();
-	background-image: url("@/static/images/common/return-icon.png");}
-}
 // 仅一个返回按钮
 .phone-nav-bar-icon{width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: var(--status-bar-height);
 		background-image: url("@/static/images/common/nav-bar-jt.svg");@include ezy-no-repeat-cover();
@@ -311,13 +302,13 @@ margin-right: 18rpx;display: inline-block;vertical-align: middle;}
 /***** 考试须知  *****/
 .phone-ksxz-dialog{
 	position: relative;
+	.phone-ksxz-body{width: 100%;position: relative;}
 	.uni-dialog-title{
 		padding: 24rpx 0!important;font-size: 30rpx;border-bottom: 1px solid #f5f5f5;
 		.uni-popup__info{color: #333!important;}
 	}
 	.ksxz-close-icon{width: 36rpx;height: 36rpx;@include ezy-no-repeat-cover;
-	position: absolute;top: 26rpx;right: 20rpx;
-			background-image: url("@/static/images/common/close-icon.svg");}
+	position: absolute;top: -100rpx;right: 20rpx;}
 	.uni-dialog-content{justify-content: flex-start!important;}
 	
 	.uni-dialog-button-text{color: #999!important;}

+ 0 - 352
components/customMap/customMap.vue

@@ -1,352 +0,0 @@
-<template>
-	<view class="map-popup-box">
-		<view class="icon-title-navBar-box">
-			<view @click="goUpPage" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">选择地址</text>
-		</view>
-		<uni-popup ref="filterPopup" type="top" :animation="false" :is-mask-click="false"
-			mask-background-color="rgba(0, 0, 0, 0.4)">
-			<view class="white-popup">
-				<view class="icon-title-navBar-box">
-					<view @click="closePop" class="nav-bar-icon"></view>
-					<text class="nav-bar-title">选择城市</text>
-				</view>
-				<t-index-address @select="select"></t-index-address>
-			</view>
-		</uni-popup>
-		<!-- 查询职业 -->
-		<view class="phone-search-box city-search-box">
-			<view @click="openPopup" class="city-select-btn">
-				{{currentCity}}
-			</view>
-			<view class="city-input-box">
-				<input class="search-input" placeholder="请输入地址" v-model="data.keyword" />
-				<view class="search-icon" @click="handleClick">
-					<uni-icons type="search" size="24" color="#fff"></uni-icons>
-				</view>
-			</view>
-		</view>
-		<map style="width: 100%; height: 300px;" :latitude="data.latitude" :longitude="data.longitude"
-			:markers="data.covers" :show-location="true"> </map>
-
-		<view v-if="result" class="map-card-list">
-			<!--  #ifdef H5   -->
-			<view v-for="(item,index) in result.data" key="index" @click="xuanzeAdress(item)" class="map-card-box">
-				<view>
-					<view class="map-card-title"><text v-if="index==0" class="dqwz-text">当前位置</text>{{item.title}}
-					</view>
-					<view class="map-card-address">{{item.address}}</view>
-				</view>
-				<icon class="map-active-icon" v-if="index==0"></icon>
-			</view>
-			<!--   #endif   -->
-			<!--  #ifdef APP   -->
-			<view v-for="(item,index) in result.data.data" key="index" @click="xuanzeAdress(item)" class="map-card-box">
-				<view>
-					<view class="map-card-title"><text v-if="index==0" class="dqwz-text">当前位置</text>{{item.title}}
-					</view>
-					<view class="map-card-address">{{item.address}}</view>
-				</view>
-				<icon class="map-active-icon" v-if="index==0"></icon>
-			</view>
-			<!--   #endif   -->
-		</view>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		ref
-	} from "vue"
-	import myIcon from "@/static/images/common/markIcon.png"
-	import {
-		jsonp
-	} from "@/utils/common.js"
-
-	import {
-		onLoad,
-		onHide,
-		onShow
-	} from "@dcloudio/uni-app"
-	import {
-		useCustomMap
-	} from "@/components/customMap/useMap.js"
-	import config from "@/config.js"
-	const emits = defineEmits(['close', 'xuanzeAdress', 'currentWeizhi'])
-	const {
-		getPositionSearchByKeyword
-	} = useCustomMap();
-
-	const result = ref(null);
-	const filterPopup = ref(null);
-	let currentCity = ref('选择城市');
-
-	function select(data) {
-		console.log('data', data);
-		currentCity.value = data.name; // 更新当前城市
-		filterPopup.value.close()
-		getCityLocation(data.name);
-	}
-
-
-
-	function openPopup(data) {
-		console.log('data', data);
-		filterPopup.value.open("top")
-	}
-
-	function closePop(data) {
-		console.log('data', data);
-		filterPopup.value.close()
-	}
-
-
-	function getCityLocation(city) {
-		console.log('222222');
-		console.log('city', city);
-		const Key = config.mapKey
-		const url = `https://apis.map.qq.com/ws/geocoder/v1`;
-		const url2 = `https://apis.map.qq.com/ws/geocoder/v1/?address=${city}&key=${Key}`;
-		// #ifdef H5
-		jsonp(url, {
-			address: `${city}`,
-			key: Key,
-			output: 'jsonp'
-		}, 'ccc1').then(res => {
-			console.log('res1222222', res);
-			if (res.status === 0) {
-			const cityLocation = res.result.location;
-			console.log('cityLocation', cityLocation);
-			if (cityLocation) {
-				data.latitude = cityLocation.lat;
-				data.longitude = cityLocation.lng;
-				data.covers[0].latitude = cityLocation.lat;
-				data.covers[0].longitude = cityLocation.lng;
-				// 重新搜索附近的地点
-				getPositionSearchByKeyword(data.keyword || '公司',
-					`nearby(${cityLocation.lat},${cityLocation.lng},1000)`,
-					onSuccess, onError, {
-						page: 1,
-						size: 3,
-					});
-			}
-			} else {
-				console.error('失败:', res);
-		
-			}
-		}).catch(err => {
-			console.log('err', err);
-		}).finally(() => {
-		
-		})
-		
-		// #endif
-		// #ifdef APP
-		uni.request({
-			url: url2,
-			method: 'get',
-			timeout: 20000,
-		}).then(res => {
-			console.log('res', res);
-			if (res.data && res.data.result && res.data.result.location) {
-				const cityLocation = res.data.result.location;
-				console.log('cityLocation', cityLocation);
-				if (cityLocation) {
-					data.latitude = cityLocation.lat;
-					data.longitude = cityLocation.lng;
-					data.covers[0].latitude = cityLocation.lat;
-					data.covers[0].longitude = cityLocation.lng;
-					// 重新搜索附近的地点
-					getPositionSearchByKeyword(data.keyword || '公司',
-						`nearby(${cityLocation.lat},${cityLocation.lng},1000)`,
-						onSuccess, onError, {
-							page: 1,
-							size: 3,
-						});
-				}
-			}
-		}).catch(err => {
-			console.log('err')
-
-		}).finally(() => {
-
-		})
-		// #endif
-	}
-
-	function handleClick() {
-		if (data.keyword) {
-			getPositionSearchByKeyword(data.keyword, `nearby(${data.latitude},${data.longitude},1000)`, onSuccess,
-				onError, {
-					page: 1,
-					size: 3,
-				})
-		}
-	}
-
-	function onSuccess(res) {
-		console.log('数据', res);
-		result.value = res
-		// #ifdef H5
-		if (res && res.data && res.data.length > 0) {
-			// 获取第一个搜索结果的经纬度
-			const firstResult = res.data[0];
-			const newLatitude = firstResult.location.lat; // 纬度
-			const newLongitude = firstResult.location.lng; // 经度
-
-			// 更新地图的中心点
-			data.latitude = newLatitude;
-			data.longitude = newLongitude;
-
-			// 更新标记点
-			data.covers = [{
-				latitude: newLatitude,
-				longitude: newLongitude,
-				iconPath: myIcon, // 使用你的图标路径
-				width: 30,
-				height: 30
-			}];
-		}
-		// #endif
-		// #ifdef APP
-		if (res.data && res.data.data && res.data.data.length > 0) {
-			// 获取第一个搜索结果的经纬度
-			const firstResult = res.data.data[0];
-			const newLatitude = firstResult.location.lat; // 纬度
-			const newLongitude = firstResult.location.lng; // 经度
-
-			// 更新地图的中心点
-			data.latitude = newLatitude;
-			data.longitude = newLongitude;
-
-			// 更新标记点
-			data.covers = [{
-				latitude: newLatitude,
-				longitude: newLongitude,
-				iconPath: myIcon, // 使用你的图标路径
-				width: 30,
-				height: 30
-			}];
-		}
-		// #endif
-	}
-
-	function onError(err) {
-		console.log('错误', err)
-	}
-
-	function goUpPage(err) {
-		console.log('错误', err)
-		emits('close');
-
-	}
-
-	function xuanzeAdress(item) {
-		console.log('item', item);
-		emits('xuanzeAdress', item.address);
-		emits('currentWeizhi', item.location);
-
-	}
-
-	const data = reactive({
-		keyword: '', // 关键字
-		id: 0, // 使用 marker点击事件 需要填写id
-		title: 'map',
-		latitude: 0,
-		longitude: 0,
-		covers: [{
-			latitude: 0,
-			longitude: 0,
-			iconPath: myIcon,
-			width: 30,
-			height: 30
-		}]
-	})
-
-	function getCityName(latitude, longitude) {
-		const Key = config.mapKey
-		const url1 = `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude},${longitude}&key=${Key}`;
-		const url = `https://apis.map.qq.com/ws/geocoder/v1`;
-		//const url = `https://apis.map.qq.com/ws/geocoder/v1/`;
-		// #ifdef H5
-		jsonp(url, {
-			location: `${latitude},${longitude}`,
-			key: Key,
-			output: 'jsonp'
-		}, 'ccc').then(res => {
-			console.log('res11111', res);
-			if (res.status === 0) {
-				const city = res.result.address_component.city;
-				currentCity.value = city; // 更新当前城市
-				console.log('当前城市:', city);
-			} else {
-				console.error('逆地理编码失败:', res);
-
-			}
-		}).catch(err => {
-			console.log('err', err);
-		}).finally(() => {
-
-		})
-		// #endif
-		// #ifdef APP
-		uni.request({
-			url: url1,
-			success: (res) => {
-				if (res.data.status === 0) {
-					console.log('当前城市:', res);
-					const city = res.data.result.address_component.city;
-					currentCity.value = city; // 更新当前城市
-					console.log('当前城市:', city);
-				} else {
-					console.error('逆地理编码失败:', res.data.message);
-					uni.showToast({
-						title: '获取城市信息失败',
-						icon: 'none',
-					});
-				}
-			},
-			fail: (err) => {
-				console.error('请求失败:', err);
-				uni.showToast({
-					title: '请求失败',
-					icon: 'none',
-				});
-			}
-		});
-		// #endif
-	}
-	// 初始化
-	function initLocation() {
-		console.log('init')
-		uni.getLocation({
-			type: 'wgs84',
-			success: function(res) {
-				console.log('res', res)
-				data.longitude = res.longitude;
-				data.latitude = res.latitude;
-				data.covers[0].longitude = res.longitude;
-				data.covers[0].latitude = res.latitude;
-				console.log('当前位置的经度:' + res.longitude);
-				console.log('当前位置的纬度:' + res.latitude);
-				getCityName(res.latitude, res.longitude)
-				// 获取当前位置附近的数据
-				getPositionSearchByKeyword('公司', `nearby(${res.latitude},${res.longitude},1000)`, onSuccess,
-					onError, {
-						page: 1,
-						size: 3,
-					});
-			}
-		});
-	}
-
-	onLoad(() => {
-		console.log('初始化',config)
-		initLocation();
-	})
-</script>
-
-<style>
-
-</style>

+ 0 - 69
components/customMap/useMap.js

@@ -1,69 +0,0 @@
-// 文档地址 https://lbs.qq.com/service/webService/webServiceGuide/search/webServiceSearch
-// 注意当前请求仅打包后有效
-import request from '@/utils/request'
-import {
-	ref
-} from "vue"
-import {
-	jsonp
-} from "@/utils/common.js"
-import config from '@/config.js'
-// 关键词不全
-const httpUrl = "https://apis.map.qq.com/ws/place/v1/search"
-const Key = config.mapKey
-
-export function useCustomMap() {
-	// 关键字 范围 页码 数量 成功回调 失败回调
-	function getPositionSearchByKeyword(keyword, boundary, successFun, errorFun, options) {
-		let cpage = options.page || 1;
-		let csize = options.size || 20;
-		let cboundary = boundary; //'nearby(39.992870,116.310250,1000)'
-
-		uni.showLoading({
-			title: '加载中'
-		})
-		// #ifdef H5
-		jsonp(httpUrl, {
-			key: Key,
-			output: "jsonp",
-			keyword: keyword,
-			boundary: cboundary,
-			page_size: csize,
-			page_index: cpage,
-		}).then(res => {
-			successFun && successFun(res)
-		}).catch(err => {
-			errorFun && errorFun(err);
-		}).finally(() => {
-			uni.hideLoading();
-		})
-		// #endif
-		// #ifdef APP
-		uni.request({
-			url: httpUrl,
-			method: 'get',
-			data: {
-				key: Key,
-				output: "JSON",
-				keyword: keyword,
-				boundary: cboundary,
-				page_size: csize,
-				page_index: cpage,
-			},
-			timeout: 20000,
-		}).then(res => {
-			successFun && successFun(res)
-		}).catch(err => {
-			console.log('err')
-			errorFun && errorFun(err);
-		}).finally(() => {
-			uni.hideLoading();
-		})
-		// #endif
-	}
-
-	return {
-		getPositionSearchByKeyword
-	}
-
-}

+ 24 - 18
components/identification/identification.vue

@@ -4,20 +4,23 @@
 			mask-background-color="rgba(0, 0, 0, 0.4);">
 			<uni-popup-dialog mode="input" class="phone-ksxz-dialog" title="身份确认" :duration="2000" :before-close="true"
 				cancelText="修改" @close="handleClose" @confirm="handleConfirm">
-				<view @click="handleCloseOnly" class="ksxz-close-icon"></view>
-				<view class="ksxz-content-box">
-					<view class="ksxz-img-box">
-						<!-- #ifdef H5 -->
-							<img :src="data.icon" v-if="data.icon" alt="">
-							<icon class="phone-default-userImg" v-else></icon>
-						<!-- <image :src="data.icon" /> -->
-						<!-- #endif -->
+				<view class="phone-ksxz-body">
+					<view @click="handleCloseOnly" class="ksxz-close-icon"
+					:style="{ backgroundImage: 'url(' + data.iconsArr.closeIcon + ')' }"></view>
+					<view class="ksxz-content-box">
+						<view class="ksxz-img-box">
+							<!-- #ifdef H5 -->
+								<img :src="data.icon" v-if="data.icon" alt="">
+								<icon class="phone-default-userImg" v-else></icon>
+							<!-- <image :src="data.icon" /> -->
+							<!-- #endif -->
+						</view>
+						<view :class="{isEmpty: !data.realName}">姓名:{{data.realName}}</view>
+						<view :class="{isEmpty: !data.realName}">电话:{{data.userName}}</view>
+						<view>职业:{{data.zyName}}</view>
+						<view>等级:{{data.zyLevelName}}</view>
+						<view :class="{isEmpty: !data.realName}">证件号:{{data.idcard}}</view>
 					</view>
-					<view :class="{isEmpty: !data.realName}">姓名:{{data.realName}}</view>
-					<view :class="{isEmpty: !data.realName}">电话:{{data.userName}}</view>
-					<view>职业:{{data.zyName}}</view>
-					<view>等级:{{data.zyLevelName}}</view>
-					<view :class="{isEmpty: !data.realName}">证件号:{{data.idcard}}</view>
 				</view>
 			</uni-popup-dialog>
 		</uni-popup>
@@ -25,10 +28,8 @@
 </template>
 
 <script setup>
-	import {
-		ref,
-		reactive
-	} from "vue"
+	import {ref,reactive,onMounted} from "vue"
+	import cacheManager from '@/utils/cacheManager.js';
 	const popupRef = ref(null)
 	const data = reactive({
 		realName: '',
@@ -39,10 +40,15 @@
 		icon: '',
 		gender: '',
 		userId: '',
+		iconsArr:{
+			closeIcon: '',
+		}
 	})
 
 	const emits = defineEmits(['confirm', 'changeData'])
-
+	onMounted(() => {
+			data.iconsArr.closeIcon = cacheManager.get('projectImg').closeIcon;
+		});
 	function handleCloseOnly() {
 		popupRef.value.close()
 	}

+ 4 - 9
pages/client/Chengji/lxScoreShijuan.vue

@@ -1,10 +1,7 @@
 <template>
 	<view class="phone-score-page">
 		<!-- 导航区域 -->
-		<view class="icon-title-bjcolor-navBar-box">
-			<view @click="handleBack" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">{{data.lxName}}</text>
-		</view>
+		<customNavbarVue :title="data.lxName" :show-back-btn="true" @back="handleBack"></customNavbarVue>
 		<!-- 上方区域 -->
 		<topCard @openCard="handleOpenCard" :name="data.lxName" :zyLevelName="data.zyLevelName"
 			:userScore="data.userScore" :Score="data.ksScore"></topCard>
@@ -77,10 +74,8 @@
 		<!-- 答题卡 -->
 		<uni-popup ref="popupRef" background-color="#fff" :animation="false" :is-mask-click="false" :mask-click="false">
 			<view class="answer-card-popup">
-				<view class="icon-title-bjcolor-navBar-box">
-					<view @click="handlePopupBack" class="nav-bar-icon"> </view>
-					<text class="nav-bar-title">答题卡</text>
-				</view>
+				<customNavbarVue title="答题卡" :show-back-btn="true" @back="handlePopupBack"></customNavbarVue>
+				
 				<view class="card-content-box">
 					<view class="answer-card-content" v-for="(paragraph,paragraphIndex) in questionData"
 						:key="paragraphIndex">
@@ -107,7 +102,7 @@
 	import {
 		useQuestionTools
 	} from "@/components/questions/useQuestionTools.js";
-
+	import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
 	import {
 		onLoad
 	} from "@dcloudio/uni-app";

+ 0 - 4
pages/client/Kecheng/study.vue

@@ -1,10 +1,6 @@
 <template>
 	<view class="kecheng-study-page">
 		<customNavbarVue title="课程" :show-back-btn="true" @back="goUpPage"></customNavbarVue>
-		<!-- <view class="icon-title-bjcolor-navBar-box">
-			<view @click="goUpPage" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">{{name}}</text>
-		</view> -->
 		<!-- 播放器 -->
 		<!-- 	<videoPlayVue v-if="showVideo" ref="videoRef" class="phone-video-box" @play-end="onPlayEnd" @play-play="onPlay"
 			@play-pause="onPause" @play-timeupdate="onTimeupdate"></videoPlayVue> -->

+ 1 - 4
pages/client/Lianxi/exam.vue

@@ -59,10 +59,7 @@
 		<!-- 答题卡 -->
 		<uni-popup ref="popupRef" background-color="#fff" :animation="false" :is-mask-click="false" :mask-click="false">
 			<view class="answer-card-popup">
-				<view class="icon-title-bjcolor-navBar-box">
-					<view @click="handlePopupBack" class="nav-bar-icon"> </view>
-					<text class="nav-bar-title">答题卡</text>
-				</view>
+				<customNavbarVue title="答题卡" :show-back-btn="true" @back="handlePopupBack"></customNavbarVue>
 				<view class="card-content-box">
 					<view class="answer-card-content" v-for="(paragraph,paragraphIndex) in questionData"
 						:key="paragraphIndex">

+ 0 - 3
pages/client/ShouYe/shouye.vue

@@ -1,9 +1,6 @@
 <template>
 	<view class="client-shouye-page">
 		<customNavbarVue title="首页"></customNavbarVue>
-		<!-- <view class="icon-title-bjcolor-navBar-box">
-			<text class="nav-bar-title">{{data.realName}}</text>
-		</view> -->
 	
 		<template v-if="data.kaoshiList.length||data.lianxiList.length||data.kechengList.length">
 			<!-- 考试 -->

+ 0 - 1
static/images/common/close-icon.svg

@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1741152980307" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2627" xmlns:xlink="http://www.w3.org/1999/xlink" width="60" height="60"><path d="M576 512l277.333333 277.333333-64 64-277.333333-277.333333L234.666667 853.333333 170.666667 789.333333l277.333333-277.333333L170.666667 234.666667 234.666667 170.666667l277.333333 277.333333L789.333333 170.666667 853.333333 234.666667 576 512z" fill="#333333" p-id="2628" data-spm-anchor-id="a313x.search_index.0.i2.10e63a81LGTChs" class="selected"></path></svg>

BIN
static/images/common/defen-icon.png


BIN
static/images/common/markIcon.png


BIN
static/images/common/return-icon.png