Commit 75b3cb3b by Ken Nakahira

Merge branch 'newer-branch'

# Conflicts:
#	pages/index/index.vue
#	unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
#	unpackage/dist/dev/mp-weixin/project.config.json
parents a35027b2 4c913119
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
<view class="sendMoney plg4"> <view class="sendMoney plg4">
<button open-type="share" @click="shareToTimeline" class="shareWord"></button> <button open-type="share" @click="shareToTimeline" class="shareWord"></button>
</view> </view>
<view @click="sendMoneyMethods" class="sendMoney plg5" v-if="tools_money"></view> <view @click="sendMoneyMethods" class="sendMoney plg5" ></view>
<!-- v-if="JSON.parse(currentPageData.worldParameter).includes('物品')" --> <!-- v-if="JSON.parse(currentPageData.worldParameter).includes('物品')" -->
<view class="sendMoney plg6" @click="handleMore" v-if="tools_total"></view> <view class="sendMoney plg6" @click="handleMore"></view>
</view> </view>
<!-- 提供一个弹窗 用于输入昵称 --> <!-- 提供一个弹窗 用于输入昵称 -->
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<view v-if="board" class="board"> <view v-if="board" class="board">
<view class="jk"> <view class="jk">
<!-- <image class="bk" :src="base64Img" /> --> <!-- <image class="bk" :src="base64Img" /> -->
<view class="imageH" :style="{backgroundImage:'url(' + base64Img + ')',backgroundSize:'cover',backgroundRepeat:'no-repeat'}"></view> <view class="imageH" :style="{backgroundImage:'url(' + base64Img + ')',backgroundSize:'contain',backgroundRepeat:'no-repeat'}"></view>
<!-- 内容区域 --> <!-- 内容区域 -->
<!-- background: 'url(../../static/UI/结局框.png)', --> <!-- background: 'url(../../static/UI/结局框.png)', -->
<view class="jklock"> </view> <view class="jklock"> </view>
...@@ -368,9 +368,10 @@ ...@@ -368,9 +368,10 @@
:style="{height: boxHeight + 'rpx'}" :style="{height: boxHeight + 'rpx'}"
:scroll-into-view="bottomElement_pangbai" :scroll-into-view="bottomElement_pangbai"
class="pangbai_content" class="pangbai_content"
id="pangbaiBox"
> >
<view id="scrollView"> <view id="scrollView">
<view class="npc" :style="{fontSize: fontSize + 'rpx'}"> <view class="npc" :style="{fontSize: fontSize + 'rpx'}" id="pangbaiCntainer">
{{yyds_pangbai}} {{yyds_pangbai}}
</view> </view>
<!-- 最后一个元素,用于滚动定位 --> <!-- 最后一个元素,用于滚动定位 -->
...@@ -378,7 +379,7 @@ ...@@ -378,7 +379,7 @@
</view> </view>
</scroll-view> </scroll-view>
<image <image
@click="nextTips" @click="debouncedNextTips"
src="../../static/UI/继续.png" src="../../static/UI/继续.png"
class="tre" class="tre"
mode="scaleToFill" mode="scaleToFill"
...@@ -420,8 +421,6 @@ var recorderManager = uni.getRecorderManager(); ...@@ -420,8 +421,6 @@ var recorderManager = uni.getRecorderManager();
export default { export default {
data() { data() {
return { return {
tools_money:true,
tools_total:true,
UI_show:true, UI_show:true,
normal:false, normal:false,
ttf:false, ttf:false,
...@@ -512,6 +511,7 @@ export default { ...@@ -512,6 +511,7 @@ export default {
total_val:[], total_val:[],
fontSize:0, fontSize:0,
boxHeight:210, boxHeight:210,
debouncedNextTips:null,
quotedData:[] quotedData:[]
} }
}, },
...@@ -576,6 +576,7 @@ export default { ...@@ -576,6 +576,7 @@ export default {
//获取历史聊天记录 根据历史记录处理决定 websocket 的连接 //获取历史聊天记录 根据历史记录处理决定 websocket 的连接
this.getHistory() this.getHistory()
this.calcFontSize(26) this.calcFontSize(26)
this.created()
//讲完话以后 向服务器发送数据 //讲完话以后 向服务器发送数据
recorderManager.onStop( res=> { recorderManager.onStop( res=> {
...@@ -632,21 +633,6 @@ export default { ...@@ -632,21 +633,6 @@ export default {
console.log('this.worldParameter',this.worldParameter) console.log('this.worldParameter',this.worldParameter)
console.log('currentPageData',this.currentPageData) console.log('currentPageData',this.currentPageData)
console.log()
const tool = JSON.parse(this.currentPageData.worldRules).tools
if(tool.length==0){
//道具红包都不显示
this.tools_money = false
this.tools_total = false
}else if(tool.length==1){
if(tool[0]=="物品"){
this.tools_money = false
}else if(tool[0]=="红包"){
this.tools_total = false
}
}else if(tool.length==2){
//红包物品都显示
}
this.worldParameter = JSON.parse(this.currentPageData.worldParameter) this.worldParameter = JSON.parse(this.currentPageData.worldParameter)
this.worldParameter = this.worldParameter.filter(item=>{ this.worldParameter = this.worldParameter.filter(item=>{
return item!='时间' && item!='地点' && item!='物品' return item!='时间' && item!='地点' && item!='物品'
...@@ -698,16 +684,44 @@ export default { ...@@ -698,16 +684,44 @@ export default {
this.loadingBG = true this.loadingBG = true
}, },
nextTips(){ nextTips(){
//结算当前语音的递归 进行下一次语音 // 结算当前语音的递归 进行下一次语音
// this.EPlayer.onEnded() // this.EPlayer.onEnded()
this.$nextTick(() => {
this.jumping = true this.jumping = true
clearInterval(this.Strem) clearInterval(this.Strem)
if(this.EPlayer) {
this.EPlayer.stop() this.EPlayer.stop()
if(!this.kill){ }
if(this.glod_dp && this.str != "") {
this.realVoice(this.str)
} else {
this.yyds_pangbai += this.str this.yyds_pangbai += this.str
} }
this.str = ''
this.jumping = false this.jumping = false
this.EPlayer.onended() this.EPlayer.onended()
console.log('------------------')
});
},
realVoice(text){
this.yyds_dp = text
this.yyds_pangbai += " “ "+text+ " ” "
},
debounce(fn, interval) {
var timer;
var gapTime = interval;//间隔时间,如果interval不传,则默认1000ms
return function() {
clearTimeout(timer);
var context = this;
var args = arguments;//保存此处的arguments,因为setTimeout是全局的,arguments不是防抖函数需要的。
timer = setTimeout(function() {
fn.apply(context,args);
}, gapTime);
};
},
created() {
// Bind the debounced version of nextTips
this.debouncedNextTips = this.debounce(this.nextTips, 750);
}, },
handleCloseDialog(){ handleCloseDialog(){
this.show = false this.show = false
...@@ -881,7 +895,7 @@ export default { ...@@ -881,7 +895,7 @@ export default {
uni.hideLoading(); uni.hideLoading();
//处理把数据添加至页面 //处理把数据添加至页面
const backValue = JSON.parse(message.data) const backValue = JSON.parse(message.data)
console.log('----onMessage----',backValue) // console.log('----onMessage----',backValue)
if(!this.header){ if(!this.header){
this.glod_dp = false //先隐藏数字人对话框 this.glod_dp = false //先隐藏数字人对话框
} }
...@@ -1230,33 +1244,6 @@ export default { ...@@ -1230,33 +1244,6 @@ export default {
}) })
}, },
reloadGetPhoto(){
uni.request({
url:`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.png` ?
`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.png` :
`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.jpg` ?
`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.jpg` :
`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.gif` ?
`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.gif` :
`/images/ai1.png`,
method: 'GET',
responseType: 'arraybuffer',
data: {
id: this.currentPageData.worldName,
},
responseType: 'arraybuffer',
header: {
'Cookie': `${uni.getStorageSync('session_token')}`,
"Cache-Control": "no-cache"
}
}).then(res => {
const arrayBuffer = res[1].data
this.dpPhoto = 'data:image/png;base64,' + uni.arrayBufferToBase64(arrayBuffer);
}).catch(err => {
console.log(err)
})
},
getPhoto(){ getPhoto(){
//获取背景图 //获取背景图
uni.request( uni.request(
...@@ -1283,7 +1270,8 @@ export default { ...@@ -1283,7 +1270,8 @@ export default {
}).catch(err => console.log(err)) }).catch(err => console.log(err))
//获取数字人头像 //获取数字人头像
uni.request({ uni.request(
{
url:`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.png` ? url:`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.png` ?
`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.png` : `https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.png` :
`https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.jpg` ? `https://admin.mindepoch.com:8089/worlds/${this.currentPageData.worldName}.jpg` ?
...@@ -1751,7 +1739,7 @@ export default { ...@@ -1751,7 +1739,7 @@ export default {
if (Cobj2.content != "") { if (Cobj2.content != "") {
setTimeout(() => { setTimeout(() => {
this.FetchAbuffer(Cobj2, voicer, Sarry) this.FetchAbuffer(Cobj2, voicer, Sarry)
}, 1000) }, 500)
} }
}).catch(err=>{ }).catch(err=>{
console.log(1223,err) console.log(1223,err)
...@@ -1780,7 +1768,7 @@ export default { ...@@ -1780,7 +1768,7 @@ export default {
if (Cobj.content != "") { if (Cobj.content != "") {
setTimeout(() => { setTimeout(() => {
this.FetchAbuffer_real(Cobj, voicer, Sarry) this.FetchAbuffer_real(Cobj, voicer, Sarry)
}, 1000) }, 500)
} }
}) })
}, },
...@@ -1788,17 +1776,18 @@ export default { ...@@ -1788,17 +1776,18 @@ export default {
execFile(data,ISLIU_content){ execFile(data,ISLIU_content){
// let arrObj = data; // let arrObj = data;
// const content = arrObj[0].text; // const content = arrObj[0].text;
// //quoted为真 或为假 表示 真假音线 // quoted为真 或为假 表示 真假音线
// const voicer = arrObj[0].quoted ? // const voicer = arrObj[0].quoted ?
// this.currentPageData.voiceGroups[1] : // this.currentPageData.voiceGroups[1] :
// this.currentPageData.voiceGroups[0] // this.currentPageData.voiceGroups[0]
// const voicer = arrObj[0].quoted ? this.currentPageData.voiceGroups[1] : this.currentPageData.voiceGroups[0]; // const voicer = arrObj[0].quoted ? this.currentPageData.voiceGroups[1] : this.currentPageData.voiceGroups[0];
let arrObj = data; let arrObj = data;
console.log('arrObj_execFile',arrObj)
const content = arrObj[0].text; const content = arrObj[0].text;
const voicer = arrObj[0].voicer; const voicer = arrObj[0].voicer;
this.GoSay(content,voicer,(text, falg)=>{ this.GoSay(content,voicer,(text, falg)=>{
if(!arrObj || arrObj.length == 0) {return}
if(arrObj[0].quoted){ if(arrObj[0].quoted){
if(text!==""&&!falg){ if(text!==""&&!falg){
this.glod_dp = true this.glod_dp = true
...@@ -1814,8 +1803,8 @@ export default { ...@@ -1814,8 +1803,8 @@ export default {
this.execFile(arrObj) this.execFile(arrObj)
} }
} }
}else{ }else {
if(text!==""&&!falg){ if (text !== "" && !falg) {
this.kill = false this.kill = false
this.delayText(text) this.delayText(text)
} }
...@@ -1823,8 +1812,8 @@ export default { ...@@ -1823,8 +1812,8 @@ export default {
console.log('GoSay讲话完毕!') console.log('GoSay讲话完毕!')
this.kill = true this.kill = true
arrObj.shift() arrObj.shift()
console.log('arrObj',arrObj) console.log('arrObj', arrObj)
if(arrObj.length!==0){ if (arrObj.length !== 0) {
this.execFile(arrObj) this.execFile(arrObj)
} }
} }
...@@ -1888,7 +1877,7 @@ export default { ...@@ -1888,7 +1877,7 @@ export default {
if(count.length==0){ if(count.length==0){
clearInterval(this.Strem) clearInterval(this.Strem)
} }
}, 100); }, 50);
}, },
createSSML(text, voiceName) { createSSML(text, voiceName) {
...@@ -1904,11 +1893,12 @@ export default { ...@@ -1904,11 +1893,12 @@ export default {
// GoSound 真人音线 // GoSound 真人音线
GoSound(content, voicer, CB) { GoSound(content, voicer, CB) {
// 要读的文字 声线 回调 // 要读的文字 声线 回调
const that = this const that = this
let Sarry = []; let Sarry = [];
this.Cobj = this.computeLen({ content }); this.Cobj = this.computeLen({ content });
this.str = this.Cobj.Sr
this.glod_dp = true
uni.request({ uni.request({
url: 'https://admin.mindepoch.com:8089/VoiceMode/GetVoiceEcho', url: 'https://admin.mindepoch.com:8089/VoiceMode/GetVoiceEcho',
method: 'post', method: 'post',
...@@ -1984,6 +1974,8 @@ export default { ...@@ -1984,6 +1974,8 @@ export default {
that.jumping = false that.jumping = false
Rfunc() Rfunc()
}else{ }else{
console.log('Checkpoint')
this.str = Sobj.S
that.tempFilePath2 = wx.env.USER_DATA_PATH + `/tempAudio_${new Date().getTime()}.mp3`; that.tempFilePath2 = wx.env.USER_DATA_PATH + `/tempAudio_${new Date().getTime()}.mp3`;
FileSystemManager.writeFile({ FileSystemManager.writeFile({
filePath: that.tempFilePath2, filePath: that.tempFilePath2,
...@@ -2010,7 +2002,7 @@ export default { ...@@ -2010,7 +2002,7 @@ export default {
if (that.Cobj.content != "") { if (that.Cobj.content != "") {
setTimeout(() => { setTimeout(() => {
that.FetchAbuffer_real(that.Cobj, voicer, Sarry, CB) that.FetchAbuffer_real(that.Cobj, voicer, Sarry, CB)
}, 5000) }, 2000)
} }
}, },
fail:(err)=>{ fail:(err)=>{
...@@ -2066,6 +2058,7 @@ export default { ...@@ -2066,6 +2058,7 @@ export default {
console.log('oooGoSayooo') console.log('oooGoSayooo')
this.EPlayer.cb = CB this.EPlayer.cb = CB
var Rfunc = () => { var Rfunc = () => {
console.log('Sarry',Sarry)
if(this.jumping){ if(this.jumping){
return return
} }
...@@ -2103,6 +2096,8 @@ export default { ...@@ -2103,6 +2096,8 @@ export default {
this.jumping = false this.jumping = false
Rfunc() Rfunc()
}else{ }else{
console.log('Checkpoint')
this.str = Sobj.S
this.tempFilePath2 = wx.env.USER_DATA_PATH + `/tempAudio_${new Date().getTime()}.mp3`; this.tempFilePath2 = wx.env.USER_DATA_PATH + `/tempAudio_${new Date().getTime()}.mp3`;
// const mark = that.Cobj2.Sr // const mark = that.Cobj2.Sr
FileSystemManager.writeFile({ FileSystemManager.writeFile({
...@@ -2128,7 +2123,7 @@ export default { ...@@ -2128,7 +2123,7 @@ export default {
if (this.Cobj2.content != "") { if (this.Cobj2.content != "") {
setTimeout(() => { setTimeout(() => {
this.FetchAbuffer(this.Cobj2, voicer, Sarry, CB) this.FetchAbuffer(this.Cobj2, voicer, Sarry, CB)
}, 5000) }, 2000)
} }
}, },
...@@ -2758,7 +2753,7 @@ export default { ...@@ -2758,7 +2753,7 @@ export default {
} }
.board{ .board{
width: 80vw; width: 80vw;
height: 70vh; height: 85vh;
border-radius: 10rpx; border-radius: 10rpx;
position: fixed; position: fixed;
top:50%; top:50%;
...@@ -2766,9 +2761,7 @@ export default { ...@@ -2766,9 +2761,7 @@ export default {
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
z-index: 999999; z-index: 999999;
padding: 12rpx; padding: 12rpx;
/**
overflow-y:scroll; overflow-y:scroll;
**/
} }
.boardBG{ .boardBG{
width: 80vw; width: 80vw;
...@@ -2805,10 +2798,10 @@ export default { ...@@ -2805,10 +2798,10 @@ export default {
padding: 0rpx 30rpx; padding: 0rpx 30rpx;
line-height: 45rpx; line-height: 45rpx;
overflow-y: scroll; overflow-y: scroll;
height: 450rpx; height: 350rpx;
} }
.imageH{ .imageH{
height: 320rpx; height: 340rpx;
width: 80%; width: 80%;
margin:auto; margin:auto;
z-index: -1; z-index: -1;
...@@ -2818,11 +2811,11 @@ export default { ...@@ -2818,11 +2811,11 @@ export default {
top:0; top:0;
left:0; left:0;
background-image: url(https://admin.mindepoch.com:8089/worlds/结局框.png); background-image: url(https://admin.mindepoch.com:8089/worlds/结局框.png);
background-size: cover; background-size: contain;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
width: 80vw; width: 80vw;
height: 70vh; height: 80vh;
z-index:-2; z-index:-2;
} }
.HHH{ .HHH{
...@@ -2866,11 +2859,9 @@ export default { ...@@ -2866,11 +2859,9 @@ export default {
height: 60rpx; height: 60rpx;
width:100%; width:100%;
display: flex; display: flex;
margin-top: 20px;
/**
position:absolute; position:absolute;
bottom:60rpx; bottom:60rpx;
left:0; **/ left:0;
} }
.home{ .home{
width: 200rpx; width: 200rpx;
...@@ -3143,7 +3134,7 @@ export default { ...@@ -3143,7 +3134,7 @@ export default {
bottom:0; bottom:0;
left:50%; left:50%;
transform:translateX(-50%); transform:translateX(-50%);
padding-bottom: 30rpx; padding-bottom: 40rpx;
} }
.pangbai_title{ .pangbai_title{
height: 76rpx; height: 76rpx;
...@@ -3315,7 +3306,6 @@ export default { ...@@ -3315,7 +3306,6 @@ export default {
.tre{ .tre{
position:absolute; position:absolute;
right:30rpx; right:30rpx;
bottom:-250rpx;
width:36rpx; width:36rpx;
height:27rpx; height:27rpx;
z-index:99; z-index:99;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"description": "项目配置文件。", "description": "项目配置文件。",
"packOptions": { "packOptions": {
"ignore": [], "ignore": []
"include": []
}, },
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"babelSetting": { "es6": false,
"ignore": [], "postcss": false,
"disablePlugins": [], "minified": false,
"outputPath": "" "newFeature": true,
} "bigPackageSizeSupport": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "3.3.4", "libVersion": "",
"appid": "wx3a8c6fc90ee21b81", "appid": "wx3a8c6fc90ee21b81",
"projectname": "mindEpoch", "projectname": "mindEpoch",
"condition": {}, "condition": {
"editorSetting": { "search": {
"tabIndent": "insertSpaces", "current": -1,
"tabSize": 2 "list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"miniprogram": {
"current": 0,
"list": [
{
"name": "",
"path": "",
"query": "",
"id": 0
}
]
}
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment