Commit e88e8bf3 by Ken Nakahira

提交更新代码

parent 33c3fea5
......@@ -365,12 +365,13 @@
<scroll-view
:scroll-y="true"
:scroll-top="scrollTop_pangbai"
:style="{height: '7.5rem'}"
:style="{height: boxHeight + 'rpx'}"
:scroll-into-view="bottomElement_pangbai"
class="pangbai_content"
id="pangbaiBox"
>
<view id="scrollView">
<view class="npc" id="pangbai">{{yyds_pangbai}}</view>
<view class="npc" :style="{fontSize: fontSize + 'rpx'}">{{yyds_pangbai}}</view>
<!-- 最后一个元素,用于滚动定位 -->
<view id="bottomElement_pangbai"></view>
</view>
......@@ -504,6 +505,8 @@ export default {
'中国大陆少女口音3': 'zh-CN-YunxiaNeural',
},
Allvoice:[],
fontSize:0,
boxHeight:210,
worldParameter:[]
}
},
......@@ -567,7 +570,7 @@ export default {
//获取历史聊天记录 根据历史记录处理决定 websocket 的连接
this.getHistory()
this.calcFontSize(26)
//讲完话以后 向服务器发送数据
recorderManager.onStop( res=> {
......@@ -739,11 +742,14 @@ export default {
});
},
calcFontSize() {
calcFontSize(size) {
let windowInfo = wx.getWindowInfo();
let FontSizeRPX = 26 / (430/750);
let FontSizePX = FontSizeRPX * (windowInfo.windowWidth/750);
document.getElementById('pangbai').style.fontSize = FontSizePX;
let FontSizeRPX = size * (428/750);
let FontSizePX = FontSizeRPX / (windowInfo.windowWidth/750);
let pangbaiHeightRPX = 210 * (428/750);
let pangbaiHeightPX = pangbaiHeightRPX / (windowInfo.windowWidth/750);
this.fontSize = FontSizePX;
this.height = 210;
},
splitString(str) {
......@@ -3028,7 +3034,6 @@ export default {
position:relative;
}
.pangbai_content{
height: 250rpx;
overflow: scroll;
color: #fff;
padding: 12rpx;
......@@ -3202,8 +3207,8 @@ export default {
.npc{
word-break:break-all;
white-space:pre-wrap;
font-size: 26rpx;
padding-right: 16rpx;
font-size: 86%;
}
.confirm{
width: 160rpx;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -605,6 +605,7 @@ var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runt
//
//
//
//
// import FullScreenLoading from '../../components/FullScreenLoading.vue';
var recorderManager = uni.getRecorderManager();
......@@ -703,6 +704,8 @@ var _default = {
'中国大陆少女口音3': 'zh-CN-YunxiaNeural'
},
Allvoice: [],
fontSize: 0,
boxHeight: 210,
worldParameter: []
};
},
......@@ -765,6 +768,7 @@ var _default = {
//获取历史聊天记录 根据历史记录处理决定 websocket 的连接
this.getHistory();
this.calcFontSize(26);
//讲完话以后 向服务器发送数据
recorderManager.onStop(function (res) {
......@@ -939,11 +943,14 @@ var _default = {
}).exec();
});
},
calcFontSize: function calcFontSize() {
calcFontSize: function calcFontSize(size) {
var windowInfo = wx.getWindowInfo();
var FontSizeRPX = 26 / (430 / 750);
var FontSizePX = FontSizeRPX * (windowInfo.windowWidth / 750);
document.getElementById('pangbai').style.fontSize = FontSizePX;
var FontSizeRPX = size * (428 / 750);
var FontSizePX = FontSizeRPX / (windowInfo.windowWidth / 750);
var pangbaiHeightRPX = 210 * (428 / 750);
var pangbaiHeightPX = pangbaiHeightRPX / (windowInfo.windowWidth / 750);
this.fontSize = FontSizePX;
this.height = 210;
},
splitString: function splitString(str) {
var result = [];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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