From 7d69cdcde0ff661ecf84ebce99b7d2e7eeafdfbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E7=BB=A7=E7=BB=AD=E5=90=B9?= <17611323298@163.com> Date: Thu, 20 Jul 2023 10:02:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __MACOSX/components/._.DS_Store | Bin 120 -> 0 bytes manifest.json | 233 ++++++------ .../Customerportrait/Receivedetailabout.vue | 7 - pages/index/guide.vue | 158 +++++++- pages/index/learning.vue | 9 - pages/index/mathManIndex.js | 78 ++-- pages/index/personal.vue | 7 - sdk/webimSDK3.1.1.js | 343 ------------------ store/index.js | 48 --- utils/WebIM.js | 234 ------------ utils/WebIMConfig.js | 90 ----- utils/subutil.js | 23 -- utils/tabbar.js | 32 -- utils/util.js | 6 +- 14 files changed, 311 insertions(+), 957 deletions(-) delete mode 100644 __MACOSX/components/._.DS_Store delete mode 100644 sdk/webimSDK3.1.1.js delete mode 100644 utils/WebIM.js delete mode 100644 utils/WebIMConfig.js delete mode 100644 utils/subutil.js delete mode 100644 utils/tabbar.js diff --git a/__MACOSX/components/._.DS_Store b/__MACOSX/components/._.DS_Store deleted file mode 100644 index a5b28df1cbc6e15bd0d35cdadd0c2e65d5131c7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 120 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}u^SMB_!U6R08`;00ODZ-jv*mIP;rnB Iur73U08|YJ=l}o! diff --git a/manifest.json b/manifest.json index 74d029a..e589adf 100644 --- a/manifest.json +++ b/manifest.json @@ -1,117 +1,120 @@ { - "name": "AI销讲助手", - "appid": "__UNI__7A1611D", - "description": "AI销讲助手", - "versionName": "1.1.0", - "versionCode": "100", - "transformPx": false, - "app-plus": { - "usingComponents": true, - "nvueCompiler": "uni-app", - "compilerVersion": 3, - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": true, - "autoclose": true, - "delay": 0 - }, - "modules": { - "Push": {}, - "UIWebview": {}, - "Webview-x5": {} - }, - "distribute": { - "android": { - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"] - }, - "ios": { - "idfa": false - }, - "sdkConfigs": { - "ad": {}, - "oauth": {} - }, - "icons": { - "android": { - "hdpi": "", - "xhdpi": "", - "xxhdpi": "", - "xxxhdpi": "" - }, - "ios": { - "appstore": "", - "ipad": {}, - "iphone": {} - } - } - } - }, - "quickapp": {}, - "mp-weixin": { - "appid": "wx8f883dca5ecc5510", - "setting": { - "urlCheck": false, - "es6": true, - "postcss": true, - "minified": false - }, - "usingComponents": true, - "permission": {}, - "requiredBackgroundModes": ["audio"], - "lazyCodeLoading": "requiredComponents", - "plugins": { - "WechatSI": { - "version": "0.3.4", - "provider": "wx069ba97219f66d99" - }, - "digital-human-plugin": { - "version": "3.0.0", - "provider": "wxb827be471e4dce7b" - } - }, - "uniStatistics": { - "enable": true - } - }, - "mp-alipay": { - "usingComponents": true - }, - "mp-baidu": { - "usingComponents": true - }, - "mp-toutiao": { - "usingComponents": true - }, - "h5": { - "router": { - "base": "/pages/login/guide" - } - }, - "uniStatistics": { - "version": "1" - } + "name" : "AI销讲助手", + "appid" : "__UNI__7A1611D", + "description" : "AI销讲助手", + "versionName" : "1.1.0", + "versionCode" : "100", + "transformPx" : false, + "app-plus" : { + "usingComponents" : true, + "nvueCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + "modules" : { + "Push" : {}, + "UIWebview" : {}, + "Webview-x5" : {} + }, + "distribute" : { + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] + }, + "ios" : { + "idfa" : false + }, + "sdkConfigs" : { + "ad" : {}, + "oauth" : {} + }, + "icons" : { + "android" : { + "hdpi" : "", + "xhdpi" : "", + "xxhdpi" : "", + "xxxhdpi" : "" + }, + "ios" : { + "appstore" : "", + "ipad" : {}, + "iphone" : {} + } + } + } + }, + "quickapp" : {}, + "mp-weixin" : { + "appid" : "wx8f883dca5ecc5510", + "setting" : { + "urlCheck" : false, + "es6" : true, + "postcss" : true, + "minified" : true + }, + "usingComponents" : true, + "permission" : {}, + "requiredBackgroundModes" : [ "audio" ], + "lazyCodeLoading" : "requiredComponents", + "plugins" : { + "WechatSI" : { + "version" : "0.3.4", + "provider" : "wx069ba97219f66d99" + }, + "digital-human-plugin" : { + "version" : "3.0.0", + "provider" : "wxb827be471e4dce7b" + } + }, + "uniStatistics" : { + "enable" : true + }, + "optimization" : { + "subPackages" : true + } + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "h5" : { + "router" : { + "base" : "/pages/login/guide" + } + }, + "uniStatistics" : { + "version" : "1" + } } diff --git a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue index 96c768d..10503bf 100644 --- a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue +++ b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue @@ -679,13 +679,6 @@ id: 0 }) }) - // util.getRequestPromise(config.service.findAllYi, {}, false).then(data => { - // this.biaoqianlist = data - // this.biaoqianlist.unshift({ - // name: "逼单话术", - // id: 0 - // }) - // }); }, // 取消加精 Cancelout2() { diff --git a/pages/index/guide.vue b/pages/index/guide.vue index 40e9c3e..19772cb 100644 --- a/pages/index/guide.vue +++ b/pages/index/guide.vue @@ -3,14 +3,42 @@ - - - + + + {{ message.text }} + + + + + + + + + + + + + + + {{voiceState}} + + + + + + + + - + @@ -57,14 +85,26 @@ var app = getApp(); var config = require("../../config"); const domainObj = require('@/utils/domain.js'); + + var plugins = requirePlugin("WechatSI"); + let manager = plugins.getRecordRecognitionManager(); + import human from './mathManIndex.js' + export default { mixins: [human], data() { return { domainObj: domainObj, // 域名 + + isRecording: false, + voiceState: "你可以这样说...", }; }, + + onLoad() { + this.initRecord() + }, onShow() { uni.request({ @@ -89,8 +129,46 @@ wx.navigateTo({ url: '/pages/login/index' }); - } + }, + + touchStart() { + manager.start({ + duration: 60000, + lang: "zh_CN" + }); + }, + touchEnd() { + uni.showToast() + manager.stop(); + }, + /** + * 初始化语音识别回调 + * 绑定语音播放开始事件 + */ + initRecord() { + manager.onStart = (res) => { + this.voiceState = "onStart:" + res.msg + "正在录音" + }; + //有新的识别内容返回,则会调用此事件 + manager.onRecognize = (res) => { + this.voiceState = res.result; + } + + // 识别结束事件 + manager.onStop = async (res) => { + + this.voiceState = res.result; + + await this.getReply(res.result) + } + + // 识别错误事件 + manager.onError = (res) => { + this.voiceState = res.msg; + + } + }, } }; @@ -167,5 +245,73 @@ font-size: 32rpx; } } + + + + // 语音输入 + .message-box { + padding: 24rpx; + width: 100vw; + height: 50vh; + display: flex; + flex-direction: column; + justify-content: flex-end; + + .lside { + display: flex; + justify-content: flex-start; + } + + .rside { + display: flex; + justify-content: flex-end; + } + } + + + + .voiceContent { + width: 100vw; + height: 90rpx; + display: flex; + justify-content: center; + align-items: center; + + .box { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + + .center { + width: 100%; + height: 100%; + background: #1590E9; + display: flex; + align-items: center; + justify-content: center; + + .voice { + width: 70rpx; + height: 70rpx; + } + + .text { + color: #FFFFFF; + font-size: 36rpx; + margin-top: 24rpx; + } + } + } + + } + + + .voice { + width: 44rpx; + height: 44rpx; + margin-left: 38rpx; + } } diff --git a/pages/index/learning.vue b/pages/index/learning.vue index de7067a..62d833c 100644 --- a/pages/index/learning.vue +++ b/pages/index/learning.vue @@ -145,24 +145,15 @@ - - -