diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/src/util/w6sMedia.js b/zdxt-web-client/zdxt-efcode-enterprise-app/src/util/w6sMedia.js index ec5d2e83..9c6fb7b4 100644 --- a/zdxt-web-client/zdxt-efcode-enterprise-app/src/util/w6sMedia.js +++ b/zdxt-web-client/zdxt-efcode-enterprise-app/src/util/w6sMedia.js @@ -77,36 +77,39 @@ export const takePhotoWithWaterMark = async ({ await ensureW6sAuth() console.log('[w6sMedia] 鉴权完成, 准备调起拍照') return new Promise((resolve, reject) => { - w6s.image.takePicture({ - editable: false, - success: function (res) { - console.log('[w6sMedia] takePhotoAndAddWaterMark success 原始返回:', res) - console.log('[w6sMedia] 返回字段 imageURL:', res?.imageURL, 'key:', res?.key, 'imageInfo:', res?.imageInfo) - resolve(res) - }, - fail: function (err) { - console.error('[w6sMedia] takePhotoAndAddWaterMark fail:', err) - reject(err) - }, - }); - - // w6s.image.takePhotoAndAddWaterMark({ - // content, - // fontSize, - // color, - // markDisable: false, - // timeEnable, - // locationEnable, - // success: (res) => { + // w6s.image.takePicture({ + // editable: false, + // success: function (res) { // console.log('[w6sMedia] takePhotoAndAddWaterMark success 原始返回:', res) // console.log('[w6sMedia] 返回字段 imageURL:', res?.imageURL, 'key:', res?.key, 'imageInfo:', res?.imageInfo) // resolve(res) // }, - // fail: (err) => { - // console.error('[w6sMedia] takePhotoAndAddWaterMark fail:', err) + // fail: function (err) { + // console.error('[w6sMedia] takePhotoAndAddWaterMark fail:', err) // reject(err) - // }, - // }) + // }, + // }); + w6s.image.takePhotoAndAddWaterMark({ + content, + fontSize, + color, + // markDisable: false, + timeEnable, + // locationEnable, + success: (res) => { + console.log('[w6sMedia] takePhotoAndAddWaterMark success 原始返回:', res) + console.log('[w6sMedia] 返回字段 imageURL:', res?.result.imageURL, 'key:', res?.result.key, 'imageInfo:', res?.result.imageInfo) + getLocation().then((location) => { + console.log('[w6sMedia] 获取定位成功:', location) + // res?.result.location = location + resolve(res) + }) + }, + fail: (err) => { + console.error('[w6sMedia] takePhotoAndAddWaterMark fail:', err) + reject(err) + }, + }) }) } diff --git a/zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-wmy b/zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-wmy index b38d1b25..64a5f510 100644 --- a/zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-wmy +++ b/zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-wmy @@ -1,9 +1,9 @@ # 企业端开发环境 VITE_PORT = 12001 # VITE_PROXY_TARGET = 'http://139.186.148.21:8080' -# VITE_PROXY_TARGET = 'http://172.16.21.213:8080' +VITE_PROXY_TARGET = 'http://172.16.21.213:8080' # VITE_PROXY_TARGET = 'http://172.16.21.93:8080' -VITE_PROXY_TARGET = 'http://172.16.20.72:8080' +# VITE_PROXY_TARGET = 'http://172.16.20.72:8080' VITE_BASE_URL = '/efcode20-ent-app/api' VITE_CONTEXT_PATH = '/efcode20-ent-app/' VITE_DEFAULT_LOGIN = '/enterprise/loginByPassword'