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 @@
<view class="sendMoney plg4">
<button open-type="share" @click="shareToTimeline" class="shareWord"></button>
</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('物品')" -->
<view class="sendMoney plg6" @click="handleMore" v-if="tools_total"></view>
<view class="sendMoney plg6" @click="handleMore"></view>
</view>
<!-- 提供一个弹窗 用于输入昵称 -->
......@@ -72,7 +72,7 @@
<view v-if="board" class="board">
<view class="jk">
<!-- <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)', -->
<view class="jklock"> </view>
......@@ -368,9 +368,10 @@
:style="{height: boxHeight + 'rpx'}"
:scroll-into-view="bottomElement_pangbai"
class="pangbai_content"
id="pangbaiBox"
>
<view id="scrollView">
<view class="npc" :style="{fontSize: fontSize + 'rpx'}">
<view class="npc" :style="{fontSize: fontSize + 'rpx'}" id="pangbaiCntainer">
{{yyds_pangbai}}
</view>
<!-- 最后一个元素,用于滚动定位 -->
......@@ -378,7 +379,7 @@
</view>
</scroll-view>
<image
@click="nextTips"
@click="debouncedNextTips"
src="../../static/UI/继续.png"
class="tre"
mode="scaleToFill"
......@@ -420,8 +421,6 @@ var recorderManager = uni.getRecorderManager();
export default {
data() {
return {
tools_money:true,
tools_total:true,
UI_show:true,
normal:false,
ttf:false,
......@@ -512,6 +511,7 @@ export default {
total_val:[],
fontSize:0,
boxHeight:210,
debouncedNextTips:null,
quotedData:[]
}
},
......@@ -576,6 +576,7 @@ export default {
//获取历史聊天记录 根据历史记录处理决定 websocket 的连接
this.getHistory()
this.calcFontSize(26)
this.created()
//讲完话以后 向服务器发送数据
recorderManager.onStop( res=> {
......@@ -632,21 +633,6 @@ export default {
console.log('this.worldParameter',this.worldParameter)
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 = this.worldParameter.filter(item=>{
return item!='时间' && item!='地点' && item!='物品'
......@@ -698,16 +684,44 @@ export default {
this.loadingBG = true
},
nextTips(){
//结算当前语音的递归 进行下一次语音
// 结算当前语音的递归 进行下一次语音
// this.EPlayer.onEnded()
this.$nextTick(() => {
this.jumping = true
clearInterval(this.Strem)
if(this.EPlayer) {
this.EPlayer.stop()
if(!this.kill){
}
if(this.glod_dp && this.str != "") {
this.realVoice(this.str)
} else {
this.yyds_pangbai += this.str
}
this.str = ''
this.jumping = false
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(){
this.show = false
......@@ -881,7 +895,7 @@ export default {
uni.hideLoading();
//处理把数据添加至页面
const backValue = JSON.parse(message.data)
console.log('----onMessage----',backValue)
// console.log('----onMessage----',backValue)
if(!this.header){
this.glod_dp = false //先隐藏数字人对话框
}
......@@ -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(){
//获取背景图
uni.request(
......@@ -1283,7 +1270,8 @@ export default {
}).catch(err => console.log(err))
//获取数字人头像
uni.request({
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` ?
......@@ -1751,7 +1739,7 @@ export default {
if (Cobj2.content != "") {
setTimeout(() => {
this.FetchAbuffer(Cobj2, voicer, Sarry)
}, 1000)
}, 500)
}
}).catch(err=>{
console.log(1223,err)
......@@ -1780,7 +1768,7 @@ export default {
if (Cobj.content != "") {
setTimeout(() => {
this.FetchAbuffer_real(Cobj, voicer, Sarry)
}, 1000)
}, 500)
}
})
},
......@@ -1788,17 +1776,18 @@ export default {
execFile(data,ISLIU_content){
// let arrObj = data;
// const content = arrObj[0].text;
// //quoted为真 或为假 表示 真假音线
// quoted为真 或为假 表示 真假音线
// 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;
console.log('arrObj_execFile',arrObj)
const content = arrObj[0].text;
const voicer = arrObj[0].voicer;
this.GoSay(content,voicer,(text, falg)=>{
if(!arrObj || arrObj.length == 0) {return}
if(arrObj[0].quoted){
if(text!==""&&!falg){
this.glod_dp = true
......@@ -1814,8 +1803,8 @@ export default {
this.execFile(arrObj)
}
}
}else{
if(text!==""&&!falg){
}else {
if (text !== "" && !falg) {
this.kill = false
this.delayText(text)
}
......@@ -1823,8 +1812,8 @@ export default {
console.log('GoSay讲话完毕!')
this.kill = true
arrObj.shift()
console.log('arrObj',arrObj)
if(arrObj.length!==0){
console.log('arrObj', arrObj)
if (arrObj.length !== 0) {
this.execFile(arrObj)
}
}
......@@ -1888,7 +1877,7 @@ export default {
if(count.length==0){
clearInterval(this.Strem)
}
}, 100);
}, 50);
},
createSSML(text, voiceName) {
......@@ -1904,11 +1893,12 @@ export default {
// GoSound 真人音线
GoSound(content, voicer, CB) {
// 要读的文字 声线 回调
const that = this
let Sarry = [];
this.Cobj = this.computeLen({ content });
this.str = this.Cobj.Sr
this.glod_dp = true
uni.request({
url: 'https://admin.mindepoch.com:8089/VoiceMode/GetVoiceEcho',
method: 'post',
......@@ -1984,6 +1974,8 @@ export default {
that.jumping = false
Rfunc()
}else{
console.log('Checkpoint')
this.str = Sobj.S
that.tempFilePath2 = wx.env.USER_DATA_PATH + `/tempAudio_${new Date().getTime()}.mp3`;
FileSystemManager.writeFile({
filePath: that.tempFilePath2,
......@@ -2010,7 +2002,7 @@ export default {
if (that.Cobj.content != "") {
setTimeout(() => {
that.FetchAbuffer_real(that.Cobj, voicer, Sarry, CB)
}, 5000)
}, 2000)
}
},
fail:(err)=>{
......@@ -2066,6 +2058,7 @@ export default {
console.log('oooGoSayooo')
this.EPlayer.cb = CB
var Rfunc = () => {
console.log('Sarry',Sarry)
if(this.jumping){
return
}
......@@ -2103,6 +2096,8 @@ export default {
this.jumping = false
Rfunc()
}else{
console.log('Checkpoint')
this.str = Sobj.S
this.tempFilePath2 = wx.env.USER_DATA_PATH + `/tempAudio_${new Date().getTime()}.mp3`;
// const mark = that.Cobj2.Sr
FileSystemManager.writeFile({
......@@ -2128,7 +2123,7 @@ export default {
if (this.Cobj2.content != "") {
setTimeout(() => {
this.FetchAbuffer(this.Cobj2, voicer, Sarry, CB)
}, 5000)
}, 2000)
}
},
......@@ -2758,7 +2753,7 @@ export default {
}
.board{
width: 80vw;
height: 70vh;
height: 85vh;
border-radius: 10rpx;
position: fixed;
top:50%;
......@@ -2766,9 +2761,7 @@ export default {
transform: translate(-50%,-50%);
z-index: 999999;
padding: 12rpx;
/**
overflow-y:scroll;
**/
}
.boardBG{
width: 80vw;
......@@ -2805,10 +2798,10 @@ export default {
padding: 0rpx 30rpx;
line-height: 45rpx;
overflow-y: scroll;
height: 450rpx;
height: 350rpx;
}
.imageH{
height: 320rpx;
height: 340rpx;
width: 80%;
margin:auto;
z-index: -1;
......@@ -2818,11 +2811,11 @@ export default {
top:0;
left:0;
background-image: url(https://admin.mindepoch.com:8089/worlds/结局框.png);
background-size: cover;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
width: 80vw;
height: 70vh;
height: 80vh;
z-index:-2;
}
.HHH{
......@@ -2866,11 +2859,9 @@ export default {
height: 60rpx;
width:100%;
display: flex;
margin-top: 20px;
/**
position:absolute;
bottom:60rpx;
left:0; **/
left:0;
}
.home{
width: 200rpx;
......@@ -3143,7 +3134,7 @@ export default {
bottom:0;
left:50%;
transform:translateX(-50%);
padding-bottom: 30rpx;
padding-bottom: 40rpx;
}
.pangbai_title{
height: 76rpx;
......@@ -3315,7 +3306,6 @@ export default {
.tre{
position:absolute;
right:30rpx;
bottom:-250rpx;
width:36rpx;
height:27rpx;
z-index:99;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"description": "项目配置文件。",
"packOptions": {
"ignore": [],
"include": []
"ignore": []
},
"setting": {
"urlCheck": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
"es6": false,
"postcss": false,
"minified": false,
"newFeature": true,
"bigPackageSizeSupport": true
},
"compileType": "miniprogram",
"libVersion": "3.3.4",
"libVersion": "",
"appid": "wx3a8c6fc90ee21b81",
"projectname": "mindEpoch",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
"condition": {
"search": {
"current": -1,
"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