Commit 8d79ac4a by Ken Nakahira

提交更新代码

parent 8aa54cec
...@@ -361,29 +361,28 @@ ...@@ -361,29 +361,28 @@
<view class="UI_body_left_Pangbai_content"> <view class="UI_body_left_Pangbai_content">
<view class="pangbai_title"> <view class="pangbai_title">
<text>旁白</text> <text>旁白</text>
<image
@click="nextTips"
src="../../static/UI/继续.png"
class="tre"
mode="scaleToFill"
/>
</view> </view>
<scroll-view <scroll-view
:scroll-y="true" :scroll-y="true"
:scroll-top="scrollTop_pangbai" :scroll-top="scrollTop_pangbai"
:scroll-with-animation="true" :style="{height: boxHeight + 'rpx'}"
:style="{height: '200rpx'}"
:scroll-into-view="bottomElement_pangbai" :scroll-into-view="bottomElement_pangbai"
class="pangbai_content" class="pangbai_content"
> >
<view id="scrollView"> <view id="scrollView">
<view class="npc"> <view class="npc" :style="{fontSize: fontSize + 'rpx'}">
{{yyds_pangbai}} {{yyds_pangbai}}
</view> </view>
<!-- 最后一个元素,用于滚动定位 --> <!-- 最后一个元素,用于滚动定位 -->
<view id="bottomElement_pangbai"></view> <view id="bottomElement_pangbai"></view>
</view> </view>
</scroll-view> </scroll-view>
<image
@click="nextTips"
src="../../static/UI/继续.png"
class="tre"
mode="scaleToFill"
/>
</view> </view>
</view> </view>
</view> </view>
...@@ -509,6 +508,8 @@ export default { ...@@ -509,6 +508,8 @@ export default {
Allvoice:[], Allvoice:[],
worldParameter:[], worldParameter:[],
total_val:[], total_val:[],
fontSize:0,
boxHeight:210,
quotedData:[] quotedData:[]
} }
}, },
...@@ -572,7 +573,7 @@ export default { ...@@ -572,7 +573,7 @@ export default {
//获取历史聊天记录 根据历史记录处理决定 websocket 的连接 //获取历史聊天记录 根据历史记录处理决定 websocket 的连接
this.getHistory() this.getHistory()
this.calcFontSize(26)
//讲完话以后 向服务器发送数据 //讲完话以后 向服务器发送数据
recorderManager.onStop( res=> { recorderManager.onStop( res=> {
...@@ -729,15 +730,26 @@ export default { ...@@ -729,15 +730,26 @@ export default {
} }
}).exec() }).exec()
}, },
scrollToBottom_pangbai(){ scrollToBottom_pangbai() {
uni.createSelectorQuery().in(this).select('#scrollView').boundingClientRect((res)=>{ this.$nextTick(() => {
// console.log('res1',res) uni.createSelectorQuery().in(this).select('#scrollView').boundingClientRect((res) => {
if(res){ if (res) {
this.scrollTop_pangbai=res.height*2; this.scrollTop_pangbai=res.height*2;
}else{ } else {
// this.scrollTop_pangbai=this.historyRecord.length*1000; //this.scrollTop_pangbai = this.historyRecord.length * 1000;
} }
}).exec() }).exec();
});
},
calcFontSize(size) {
let windowInfo = wx.getWindowInfo();
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) { splitString(str) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,6 +6,11 @@ ...@@ -6,6 +6,11 @@
}, },
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"es6": false,
"postcss": false,
"minified": false,
"newFeature": true,
"bigPackageSizeSupport": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
......
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