Преглед изворни кода

添加轮廓及提示照片

yangg пре 2 месеци
родитељ
комит
c8f5988b2e

+ 3 - 1
pages.json

@@ -21,7 +21,8 @@
 		{
 			"path": "pages/interview-notice/interview-notice",
 			"style": {
-				"navigationBarTitleText": "面试注意事项"
+				"navigationBarTitleText": "面试注意事项",
+				"navigationStyle": "default"
 				}
 		},
 		{
@@ -88,6 +89,7 @@
 			}
 		}
 	],
+	
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "面试系统",

+ 25 - 16
pages/interview/interview.vue

@@ -39,6 +39,9 @@
 		
 		<!-- 为小程序环境添加camera组件 -->
 		<view v-if="!isH5 && showCamera" class="camera-container">
+			<cover-view class="gesture-hint">
+				<cover-view class="gesture-hint-text">{{ gestureHints[currentStep] }}</cover-view>
+			</cover-view>
 			<camera 
 				:device-position="cameraPosition" 
 				flash="auto" 
@@ -51,7 +54,7 @@
 			<!-- 添加手势引导蒙层 -->
 			<cover-view class="gesture-overlay">
 				<!-- 添加右上角引导图标 -->
-				<cover-view class="guide-icon">
+				<cover-view class="guide-icon" :style="currentStep>=3?'left:30rpx':'right:30rpx'">
 					<cover-image :src="guideIcon[currentStep]" class="guide-image"></cover-image>
 					<!-- <text class="guide-text">引导</text> -->
 				</cover-view>
@@ -60,9 +63,6 @@
 					:src="gestureOverlays[currentStep]" 
 					class="gesture-image"
 				></cover-image>
-				<cover-view class="gesture-hint">
-					<cover-view class="gesture-hint-text">{{ gestureHints[currentStep] }}</cover-view>
-				</cover-view>
 			</cover-view>
 			
 			<cover-view class="camera-controls">
@@ -76,13 +76,13 @@
 		
 		<!-- 为浏览器环境添加视频元素 -->
 		<view v-if="isH5" class="camera-container" v-show="showCamera">
-			<video ref="videoElement" class="camera-video" autoplay></video>
+			<!-- <video ref="videoElement" class="camera-video" autoplay></video> -->
 			<canvas ref="canvasElement" class="camera-canvas" style="display: none;"></canvas>
 			
 			<!-- 添加H5环境的手势引导蒙层 -->
 			<view class="gesture-overlay">
 				<!-- 添加右上角引导图标 -->
-				<view class="guide-icon">
+				<view class="guide-icon" :style="currentStep>=3?'left:30rpx':'right:30rpx'">
 					<image :src="guideIcon[currentStep]" class="guide-image"></image>
 					<!-- <text class="guide-text">引导</text> -->
 				</view>
@@ -136,6 +136,12 @@ import { apiBaseUrl } from '@/common/config.js'; // Import the base URL from a c
 				cameraMode: 'normal', // 添加相机模式
 				cameraInitRetries: 0, // 添加重试计数器
 				gestureOverlays: [
+					'http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%89%8B%E6%8E%8C.png',
+					'http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%89%8B%E8%83%8C.png',
+					'http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%8F%A1%E6%8B%B3.png',
+					'http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%89%8B%E6%8E%8C.png',
+					'http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%89%8B%E8%83%8C.png',
+					'http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%8F%A1%E6%8B%B3.png'
 					/* '/static/images/palm_overlay.png',  // 手掌正面引导图
 					'/static/images/back_overlay.png',  // 手掌反面引导图
 					'/static/images/fist_overlay.png'   // 握拳引导图 */
@@ -151,12 +157,12 @@ import { apiBaseUrl } from '@/common/config.js'; // Import the base URL from a c
 				photoLinks: [null, null, null, null, null, null], // 存储上传后的图片链接
 				cameraPosition: 'front', // 修改默认为前置摄像头
 				guideIcon: [
-					'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/d9082487afc4499c97407aa3cebd1923.jpeg',
-					'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/27022cfcc05644aabb415b93cac126b1.jpeg',
-					'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/fcfa3bf149cd4edd962d9b8844bed0b0.jpeg',
-					'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/d9082487afc4499c97407aa3cebd1923.jpeg',
-					'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/27022cfcc05644aabb415b93cac126b1.jpeg',
-					'http://121.36.251.245:9000/minlong/tenant_1/general_uploads/fcfa3bf149cd4edd962d9b8844bed0b0.jpeg',
+					'http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%89%8B%E6%8E%8C.jpg',
+					'http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%89%8B%E8%83%8C.jpg',
+					'http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E5%8D%A7%E6%8B%B3.jpg',
+					'http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%89%8B%E6%8E%8C.jpg',
+					'http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%89%8B%E8%83%8C.jpg',
+					'http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E5%8D%A7%E6%8B%B3.jpg',
 				]
 			}
 		},
@@ -850,7 +856,7 @@ import { apiBaseUrl } from '@/common/config.js'; // Import the base URL from a c
 /* 小程序相机组件样式 */
 .camera-component {
 	width: 100%;
-	height: 80%;
+	height: 100%;
 	display: block;
 }
 
@@ -880,16 +886,19 @@ import { apiBaseUrl } from '@/common/config.js'; // Import the base URL from a c
 }
 
 .gesture-image {
-	width: 70%;
-	height: 70%;
-	opacity: 0.6;
+	width: 100%;
+	height: 100%;
+/* 	opacity: 0.6; */
 }
 
 .gesture-hint {
+	position: fixed;
+	top: 1px;
 	background-color: rgba(0, 0, 0, 0.5);
 	padding: 10rpx 20rpx;
 	border-radius: 10rpx;
 	margin-top: 20rpx;
+	z-index: 999;
 }
 
 .gesture-hint-text {

+ 50 - 2
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -75,8 +75,8 @@ const capitalize = cacheStringFunction((str) => {
   return str.charAt(0).toUpperCase() + str.slice(1);
 });
 const toHandlerKey = cacheStringFunction((str) => {
-  const s = str ? `on${capitalize(str)}` : ``;
-  return s;
+  const s2 = str ? `on${capitalize(str)}` : ``;
+  return s2;
 });
 const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
 const invokeArrayFns$1 = (fns, arg) => {
@@ -99,6 +99,36 @@ let _globalThis;
 const getGlobalThis = () => {
   return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
 };
+function normalizeStyle(value) {
+  if (isArray(value)) {
+    const res = {};
+    for (let i = 0; i < value.length; i++) {
+      const item = value[i];
+      const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
+      if (normalized) {
+        for (const key in normalized) {
+          res[key] = normalized[key];
+        }
+      }
+    }
+    return res;
+  } else if (isString(value) || isObject(value)) {
+    return value;
+  }
+}
+const listDelimiterRE = /;(?![^(]*\))/g;
+const propertyDelimiterRE = /:([^]+)/;
+const styleCommentRE = /\/\*[^]*?\*\//g;
+function parseStringStyle(cssText) {
+  const ret = {};
+  cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
+    if (item) {
+      const tmp = item.split(propertyDelimiterRE);
+      tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
+    }
+  });
+  return ret;
+}
 function normalizeClass(value) {
   let res = "";
   if (isString(value)) {
@@ -6764,8 +6794,25 @@ function vFor(source, renderItem) {
   }
   return ret;
 }
+function stringifyStyle(value) {
+  if (isString(value)) {
+    return value;
+  }
+  return stringify(normalizeStyle(value));
+}
+function stringify(styles) {
+  let ret = "";
+  if (!styles || isString(styles)) {
+    return ret;
+  }
+  for (const key in styles) {
+    ret += `${key.startsWith(`--`) ? key : hyphenate(key)}:${styles[key]};`;
+  }
+  return ret;
+}
 const o = (value, key) => vOn(value, key);
 const f = (source, renderItem) => vFor(source, renderItem);
+const s = (value) => stringifyStyle(value);
 const e = (target, ...sources) => extend(target, ...sources);
 const n = (value) => normalizeClass(value);
 const t = (val) => toDisplayString(val);
@@ -7610,5 +7657,6 @@ exports.n = n;
 exports.o = o;
 exports.p = p;
 exports.resolveComponent = resolveComponent;
+exports.s = s;
 exports.t = t;
 exports.wx$1 = wx$1;

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/interview-notice/interview-notice.json

@@ -1,4 +1,5 @@
 {
   "navigationBarTitleText": "面试注意事项",
+  "navigationStyle": "default",
   "usingComponents": {}
 }

+ 30 - 22
unpackage/dist/dev/mp-weixin/pages/interview/interview.js

@@ -34,6 +34,12 @@ const _sfc_main = {
       cameraInitRetries: 0,
       // 添加重试计数器
       gestureOverlays: [
+        "http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%89%8B%E6%8E%8C.png",
+        "http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%89%8B%E8%83%8C.png",
+        "http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%8F%A1%E6%8B%B3.png",
+        "http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%89%8B%E6%8E%8C.png",
+        "http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%89%8B%E8%83%8C.png",
+        "http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%8F%A1%E6%8B%B3.png"
         /* '/static/images/palm_overlay.png',  // 手掌正面引导图
         '/static/images/back_overlay.png',  // 手掌反面引导图
         '/static/images/fist_overlay.png'   // 握拳引导图 */
@@ -51,12 +57,12 @@ const _sfc_main = {
       cameraPosition: "front",
       // 修改默认为前置摄像头
       guideIcon: [
-        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/d9082487afc4499c97407aa3cebd1923.jpeg",
-        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/27022cfcc05644aabb415b93cac126b1.jpeg",
-        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/fcfa3bf149cd4edd962d9b8844bed0b0.jpeg",
-        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/d9082487afc4499c97407aa3cebd1923.jpeg",
-        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/27022cfcc05644aabb415b93cac126b1.jpeg",
-        "http://121.36.251.245:9000/minlong/tenant_1/general_uploads/fcfa3bf149cd4edd962d9b8844bed0b0.jpeg"
+        "http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%89%8B%E6%8E%8C.jpg",
+        "http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E6%89%8B%E8%83%8C.jpg",
+        "http://121.36.251.245:9000/minlong/%E5%B7%A6%E6%89%8B%E5%8D%A7%E6%8B%B3.jpg",
+        "http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%89%8B%E6%8E%8C.jpg",
+        "http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E6%89%8B%E8%83%8C.jpg",
+        "http://121.36.251.245:9000/minlong/%E5%8F%B3%E6%89%8B%E5%8D%A7%E6%8B%B3.jpg"
       ]
     };
   },
@@ -488,24 +494,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     l: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args)),
     m: !$data.isH5 && $data.showCamera
   }, !$data.isH5 && $data.showCamera ? {
-    n: $data.cameraPosition,
-    o: common_vendor.o((...args) => $options.handleCameraError && $options.handleCameraError(...args)),
-    p: $data.cameraMode,
-    q: $data.guideIcon[$data.currentStep],
-    r: $data.gestureOverlays[$data.currentStep],
-    s: common_vendor.t($data.gestureHints[$data.currentStep]),
-    t: common_vendor.o((...args) => $options.capturePhotoMP && $options.capturePhotoMP(...args)),
-    v: common_vendor.o((...args) => $options.cancelCamera && $options.cancelCamera(...args))
+    n: common_vendor.t($data.gestureHints[$data.currentStep]),
+    o: $data.cameraPosition,
+    p: common_vendor.o((...args) => $options.handleCameraError && $options.handleCameraError(...args)),
+    q: $data.cameraMode,
+    r: $data.guideIcon[$data.currentStep],
+    s: common_vendor.s($data.currentStep >= 3 ? "left:30rpx" : "right:30rpx"),
+    t: $data.gestureOverlays[$data.currentStep],
+    v: common_vendor.o((...args) => $options.capturePhotoMP && $options.capturePhotoMP(...args)),
+    w: common_vendor.o((...args) => $options.cancelCamera && $options.cancelCamera(...args))
   } : {}, {
-    w: $data.isH5
+    x: $data.isH5
   }, $data.isH5 ? {
-    x: $data.guideIcon[$data.currentStep],
-    y: $data.gestureOverlays[$data.currentStep],
-    z: common_vendor.t($data.gestureHints[$data.currentStep]),
-    A: common_vendor.o((...args) => $options.capturePhoto && $options.capturePhoto(...args)),
-    B: common_vendor.o((...args) => $options.switchCamera && $options.switchCamera(...args)),
-    C: common_vendor.o((...args) => $options.cancelCamera && $options.cancelCamera(...args)),
-    D: $data.showCamera
+    y: $data.guideIcon[$data.currentStep],
+    z: common_vendor.s($data.currentStep >= 3 ? "left:30rpx" : "right:30rpx"),
+    A: $data.gestureOverlays[$data.currentStep],
+    B: common_vendor.t($data.gestureHints[$data.currentStep]),
+    C: common_vendor.o((...args) => $options.capturePhoto && $options.capturePhoto(...args)),
+    D: common_vendor.o((...args) => $options.switchCamera && $options.switchCamera(...args)),
+    E: common_vendor.o((...args) => $options.cancelCamera && $options.cancelCamera(...args)),
+    F: $data.showCamera
   } : {});
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/interview/interview.wxml


+ 7 - 4
unpackage/dist/dev/mp-weixin/pages/interview/interview.wxss

@@ -160,7 +160,7 @@
 /* 小程序相机组件样式 */
 .camera-component {
 	width: 100%;
-	height: 80%;
+	height: 100%;
 	display: block;
 }
 .camera-controls {
@@ -188,15 +188,18 @@
 	z-index: 10;
 }
 .gesture-image {
-	width: 70%;
-	height: 70%;
-	opacity: 0.6;
+	width: 100%;
+	height: 100%;
+/* 	opacity: 0.6; */
 }
 .gesture-hint {
+	position: fixed;
+	top: 1px;
 	background-color: rgba(0, 0, 0, 0.5);
 	padding: 10rpx 20rpx;
 	border-radius: 10rpx;
 	margin-top: 20rpx;
+	z-index: 999;
 }
 .gesture-hint-text {
 	color: white;

+ 1 - 1
unpackage/dist/dev/mp-weixin/project.config.json

@@ -8,7 +8,7 @@
     "urlCheck": false,
     "es6": true,
     "postcss": false,
-    "minified": true,
+    "minified": false,
     "newFeature": true,
     "bigPackageSizeSupport": true,
     "babelSetting": {

Неке датотеке нису приказане због велике количине промена