From 728dc5e559a6f7a13e9bfbf0952a3c54406c9bfd Mon Sep 17 00:00:00 2001 From: kenny <879464294@qq.com> Date: Thu, 16 Oct 2025 19:15:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=8F=91=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 443 ++++++++++--------- pages/report/component/m-dialog/m-dialog.vue | 186 ++++++++ pages/report/index.vue | 165 ++++++- sheep/api/report/index.js | 50 ++- 4 files changed, 625 insertions(+), 219 deletions(-) create mode 100644 pages/report/component/m-dialog/m-dialog.vue diff --git a/manifest.json b/manifest.json index c24cad1..15a5f38 100644 --- a/manifest.json +++ b/manifest.json @@ -1,222 +1,237 @@ { - "name" : "商城", - "appid" : "__UNI__A2B711F", - "description" : "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。", - "versionName" : "2025.09", - "versionCode" : "183", - "transformPx" : false, - "app-plus" : { - "usingComponents" : true, - "nvueCompiler" : "uni-app", - "nvueStyleCompiler" : "uni-app", - "compilerVersion" : 3, - "nvueLaunchMode" : "fast", - "splashscreen" : { - "alwaysShowBeforeRender" : true, - "waiting" : true, - "autoclose" : true, - "delay" : 0 + "name": "商城", + "appid": "__UNI__A2B711F", + "description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。", + "versionName": "2025.09", + "versionCode": "183", + "transformPx": false, + "app-plus": { + "usingComponents": true, + "nvueCompiler": "uni-app", + "nvueStyleCompiler": "uni-app", + "compilerVersion": 3, + "nvueLaunchMode": "fast", + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 + }, + "safearea": { + "bottom": { + "offset": "none" + } + }, + "modules": { + "Payment": {}, + "Share": {}, + "VideoPlayer": {}, + "OAuth": {} + }, + "distribute": { + "android": { + "permissions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "minSdkVersion": 21, + "schemes": "shopro" + }, + "ios": { + "urlschemewhitelist": [ + "baidumap", + "iosamap" + ], + "dSYMs": false, + "privacyDescription": { + "NSPhotoLibraryUsageDescription": "需要同意访问您的相册选取图片才能完善该条目", + "NSPhotoLibraryAddUsageDescription": "需要同意访问您的相册才能保存该图片", + "NSCameraUsageDescription": "需要同意访问您的摄像头拍摄照片才能完善该条目", + "NSUserTrackingUsageDescription": "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验" }, - "safearea" : { - "bottom" : { - "offset" : "none" - } + "urltypes": "shopro", + "capabilities": { + "entitlements": { + "com.apple.developer.associated-domains": [ + "applinks:shopro.sheepjs.com" + ] + } }, - "modules" : { - "Payment" : {}, - "Share" : {}, - "VideoPlayer" : {}, - "OAuth" : {} + "idfa": true + }, + "sdkConfigs": { + "speech": {}, + "ad": {}, + "oauth": { + "apple": {}, + "weixin": { + "appid": "wxae7a0c156da9383b", + "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/" + } }, - "distribute" : { - "android" : { - "permissions" : [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "minSdkVersion" : 21, - "schemes" : "shopro" - }, - "ios" : { - "urlschemewhitelist" : [ "baidumap", "iosamap" ], - "dSYMs" : false, - "privacyDescription" : { - "NSPhotoLibraryUsageDescription" : "需要同意访问您的相册选取图片才能完善该条目", - "NSPhotoLibraryAddUsageDescription" : "需要同意访问您的相册才能保存该图片", - "NSCameraUsageDescription" : "需要同意访问您的摄像头拍摄照片才能完善该条目", - "NSUserTrackingUsageDescription" : "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验" - }, - "urltypes" : "shopro", - "capabilities" : { - "entitlements" : { - "com.apple.developer.associated-domains" : [ "applinks:shopro.sheepjs.com" ] - } - }, - "idfa" : true - }, - "sdkConfigs" : { - "speech" : {}, - "ad" : {}, - "oauth" : { - "apple" : {}, - "weixin" : { - "appid" : "wxae7a0c156da9383b", - "UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/" - } - }, - "payment" : { - "weixin" : { - "__platform__" : [ "ios", "android" ], - "appid" : "wxae7a0c156da9383b", - "UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/" - }, - "alipay" : { - "__platform__" : [ "ios", "android" ] - } - }, - "share" : { - "weixin" : { - "appid" : "wxae7a0c156da9383b", - "UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/" - } - } - }, - "orientation" : [ "portrait-primary" ], - "splashscreen" : { - "androidStyle" : "common", - "iosStyle" : "common", - "useOriginalMsgbox" : true - }, - "icons" : { - "android" : { - "hdpi" : "unpackage/res/icons/72x72.png", - "xhdpi" : "unpackage/res/icons/96x96.png", - "xxhdpi" : "unpackage/res/icons/144x144.png", - "xxxhdpi" : "unpackage/res/icons/192x192.png" - }, - "ios" : { - "appstore" : "unpackage/res/icons/1024x1024.png", - "ipad" : { - "app" : "unpackage/res/icons/76x76.png", - "app@2x" : "unpackage/res/icons/152x152.png", - "notification" : "unpackage/res/icons/20x20.png", - "notification@2x" : "unpackage/res/icons/40x40.png", - "proapp@2x" : "unpackage/res/icons/167x167.png", - "settings" : "unpackage/res/icons/29x29.png", - "settings@2x" : "unpackage/res/icons/58x58.png", - "spotlight" : "unpackage/res/icons/40x40.png", - "spotlight@2x" : "unpackage/res/icons/80x80.png" - }, - "iphone" : { - "app@2x" : "unpackage/res/icons/120x120.png", - "app@3x" : "unpackage/res/icons/180x180.png", - "notification@2x" : "unpackage/res/icons/40x40.png", - "notification@3x" : "unpackage/res/icons/60x60.png", - "settings@2x" : "unpackage/res/icons/58x58.png", - "settings@3x" : "unpackage/res/icons/87x87.png", - "spotlight@2x" : "unpackage/res/icons/80x80.png", - "spotlight@3x" : "unpackage/res/icons/120x120.png" - } - } - } + "payment": { + "weixin": { + "__platform__": [ + "ios", + "android" + ], + "appid": "wxae7a0c156da9383b", + "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/" + }, + "alipay": { + "__platform__": [ + "ios", + "android" + ] + } + }, + "share": { + "weixin": { + "appid": "wxae7a0c156da9383b", + "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/" + } } - }, - "quickapp" : {}, - "quickapp-native" : { - "icon" : "/static/logo.png", - "package" : "com.example.demo", - "features" : [ - { - "name" : "system.clipboard" - } - ] - }, - "quickapp-webview" : { - "icon" : "/static/logo.png", - "package" : "com.example.demo", - "minPlatformVersion" : 1070, - "versionName" : "1.0.0", - "versionCode" : 100 - }, - "mp-weixin" : { - "appid" : "wx736793c30c956243", - "setting" : { - "urlCheck" : false, - "minified" : true, - "postcss" : true + }, + "orientation": [ + "portrait-primary" + ], + "splashscreen": { + "androidStyle": "common", + "iosStyle": "common", + "useOriginalMsgbox": true + }, + "icons": { + "android": { + "hdpi": "unpackage/res/icons/72x72.png", + "xhdpi": "unpackage/res/icons/96x96.png", + "xxhdpi": "unpackage/res/icons/144x144.png", + "xxxhdpi": "unpackage/res/icons/192x192.png" }, - "optimization" : { - "subPackages" : true - }, - "plugins" : {}, - "lazyCodeLoading" : "requiredComponents", - "usingComponents" : {}, - "permission" : {}, - "requiredPrivateInfos" : [ "chooseAddress" ] - }, - "mp-alipay" : { - "usingComponents" : true - }, - "mp-baidu" : { - "usingComponents" : true - }, - "mp-toutiao" : { - "usingComponents" : true - }, - "mp-jd" : { - "usingComponents" : true - }, - "h5" : { - "template" : "index.html", - "router" : { - "mode" : "history", - "base" : "/" - }, - "sdkConfigs" : { - "maps" : {} - }, - "async" : { - "timeout" : 20000 - }, - "title" : "商城", - "optimization" : { - "treeShaking" : { - "enable" : true - } + "ios": { + "appstore": "unpackage/res/icons/1024x1024.png", + "ipad": { + "app": "unpackage/res/icons/76x76.png", + "app@2x": "unpackage/res/icons/152x152.png", + "notification": "unpackage/res/icons/20x20.png", + "notification@2x": "unpackage/res/icons/40x40.png", + "proapp@2x": "unpackage/res/icons/167x167.png", + "settings": "unpackage/res/icons/29x29.png", + "settings@2x": "unpackage/res/icons/58x58.png", + "spotlight": "unpackage/res/icons/40x40.png", + "spotlight@2x": "unpackage/res/icons/80x80.png" + }, + "iphone": { + "app@2x": "unpackage/res/icons/120x120.png", + "app@3x": "unpackage/res/icons/180x180.png", + "notification@2x": "unpackage/res/icons/40x40.png", + "notification@3x": "unpackage/res/icons/60x60.png", + "settings@2x": "unpackage/res/icons/58x58.png", + "settings@3x": "unpackage/res/icons/87x87.png", + "spotlight@2x": "unpackage/res/icons/80x80.png", + "spotlight@3x": "unpackage/res/icons/120x120.png" + } } + } + } + }, + "quickapp": {}, + "quickapp-native": { + "icon": "/static/logo.png", + "package": "com.example.demo", + "features": [ + { + "name": "system.clipboard" + } + ] + }, + "quickapp-webview": { + "icon": "/static/logo.png", + "package": "com.example.demo", + "minPlatformVersion": 1070, + "versionName": "1.0.0", + "versionCode": 100 + }, + "mp-weixin": { + "appid": "wx736793c30c956243", + "setting": { + "urlCheck": false, + "minified": true, + "postcss": true }, - "vueVersion" : "3", - "_spaceID" : "192b4892-5452-4e1d-9f09-eee1ece40639", - "locale" : "zh-Hans", - "fallbackLocale" : "zh-Hans" -} + "optimization": { + "subPackages": true + }, + "plugins": {}, + "lazyCodeLoading": "requiredComponents", + "usingComponents": {}, + "permission": {}, + "requiredPrivateInfos": [ + "chooseAddress" + ] + }, + "mp-alipay": { + "usingComponents": true + }, + "mp-baidu": { + "usingComponents": true + }, + "mp-toutiao": { + "usingComponents": true + }, + "mp-jd": { + "usingComponents": true + }, + "h5": { + "template": "index.html", + "router": { + "mode": "history", + "base": "/" + }, + "sdkConfigs": { + "maps": {} + }, + "async": { + "timeout": 20000 + }, + "title": "商城", + "optimization": { + "treeShaking": { + "enable": true + } + } + }, + "vueVersion": "3", + "_spaceID": "192b4892-5452-4e1d-9f09-eee1ece40639", + "locale": "zh-Hans", + "fallbackLocale": "zh-Hans" +} \ No newline at end of file diff --git a/pages/report/component/m-dialog/m-dialog.vue b/pages/report/component/m-dialog/m-dialog.vue new file mode 100644 index 0000000..c0e81db --- /dev/null +++ b/pages/report/component/m-dialog/m-dialog.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/pages/report/index.vue b/pages/report/index.vue index 675426e..b653131 100644 --- a/pages/report/index.vue +++ b/pages/report/index.vue @@ -310,7 +310,22 @@ - + + + + +
+ + + +
@@ -348,6 +363,8 @@ } from '@/constant/aiText'; import { praiseTextApi } from '@/sheep/api/doubao'; + const email = ref(''); + const { // praiseTextApi, getStyleApi, @@ -359,6 +376,7 @@ getAiFaceResult, getUserInfo, getUserAvatar, + sendMail, } = ReportApi; const collect = ref(null); @@ -864,12 +882,45 @@ } activeTab.value = tabIndex; } + + const dialog = ref({ + visible: false, + }); + + const openEmailDialog = () => { + console.log('openEmailDialog: '); + + dialog.value.visible = true; + }; + + const sendEmail = async () => { + const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; + + if (!emailRegex.test(email.value)) { + uni.showToast({ title: '请输入正确的邮箱', icon: 'none' }); + return; + } + + const res = await sendMail({ + timeout: 100 * 1000, + pageUrl: window.location.href, + email: email.value, + }); + + if (res.data.code == 0) { + dialog.value.visible = false; + email.value = ''; + + uni.showToast({ title: '已经进入发送队列,稍后请查收邮件', icon: 'none' }); + } + }; diff --git a/sheep/api/report/index.js b/sheep/api/report/index.js index 520db3b..312a127 100644 --- a/sheep/api/report/index.js +++ b/sheep/api/report/index.js @@ -1,4 +1,5 @@ import request from '@/sheep/request'; +import Request from 'luch-request'; const ReportApi = { getHairApi: (data) => { @@ -77,10 +78,57 @@ const ReportApi = { getUserAvatar: () => request({ - url: '/member/user/get ', + url: '/member/user/get', method: 'get', }), + // sendMail: () => + // request({ + // url: '/sendMail', + // method: 'post', + // }), + + sendMail: (data) => { + // const init = () => { + // const http = new Request({ + // baseURL: 'http://42.193.102.139:4000/api/pdf', + // timeout: 100 * 1000, + // method: 'POST', + // header: { + // Accept: 'text/json', + // 'Content-Type': 'application/json;charset=UTF-8', + // }, + // // #ifdef H5 + // // 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+) + // withCredentials: false, + // // #endif + // }); + + // return http; + // }; + + const http = new Request({ + baseURL: 'http://42.193.102.139:4000/api/pdf', + timeout: 100 * 1000, + method: 'GET', + header: { + Accept: 'text/json', + 'Content-Type': 'application/json;charset=UTF-8', + Authorization: 'Bearer 14fc0280-fc65-462d-ac2d-50178c0212e3', + }, + // #ifdef H5 + // 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+) + withCredentials: false, + // #endif + }); + + // const http = init(); + + return http.request({ + method: 'POST', + data, + }); + }, // https://puton.huimeimeta.com/app-api/cloth/getFaceList }; export default ReportApi;