Commit d625f845 by Ken Nakahira

Merge branch 'newer-branch' into 'master'

更新代码

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