检测优化

This commit is contained in:
13405411873 2024-11-11 11:25:51 +08:00
parent b357b7bdd9
commit 086c1655c8
4 changed files with 71 additions and 32 deletions

View File

@ -28,7 +28,7 @@
export default{
data(){
return{
msgSocket: this.$msgSocket,
msgSocket: null,
aindex:1,
arr:[
{text:'首页'},
@ -45,7 +45,8 @@
this.aindex = this.msg
},
mounted() {
console.log(this.aindex);
this.msgSocket = this.$msgSocket,
this.aindex = this.msg
},
watch: {

View File

@ -35,10 +35,12 @@
</template>
<script>
const innerAudioContext = uni.createInnerAudioContext();
import request from '../../utils/request';
export default{
data(){
return{
aindex:1,
chuan:0,
arr:[
@ -61,26 +63,49 @@
},
mounted() {
this.aindex = this.msg
},
methods:{
// getgogo(index){
// if(index == 1){
// this.aindex = index
// uni.reLaunch({
// url:'/pages/index/index'
// });
// }
// if(index == 2){
// this.aindex = index
// uni.reLaunch({
// url:'/pages/my/my'
// });
// }
// }
},
methods:{
dianyidain() {
console.log('执行了dianyidain');
innerAudioContext.src = 'https://www.nuoyunr.com/lananRsc/rescue/msgV.mp3';
//
const playCount = 5;
let currentCount = 0;
//
innerAudioContext.onEnded(() => {
//
currentCount++;
//
if (currentCount < playCount) {
//
innerAudioContext.play();
} else {
//
console.log('播放完成');
}
});
//
innerAudioContext.play();
},
msgInfo() {
console.log(this.msgSocket, 'msgSocket')
if (this.msgSocket) {
console.log('消息回调启动成功')
this.msgSocket.onMessage(res => {
console.log("发出提示音");
this.dianyidain()
})
}
},
async getbottom(){
let data = {
partnerId:uni.getStorageSync('partnerId')

View File

@ -15,6 +15,7 @@ import {
} from './utils/orderSocket.js'
let SocketTask;
let timerId;
export function startSocketConnect(userId) {
SocketTask = null
SocketTask = connect(userId);
@ -26,6 +27,7 @@ export function startSocketConnect(userId) {
sendSocketMessage(SocketTask)
}, 10000);
}
}
export function closeSocketMain(userId) {

View File

@ -92,21 +92,32 @@
<view class="" v-for="(item,index) in detailData.stepInfos" :key="index">
<view class="x-box">
<view class="h-title" style="display: flex;align-items: center;justify-content: space-between;">
<view class="qiu_">{{index +1}}</view>
<text style="width: 46%;" >{{ item.title }}</text>
<view style="width: 10%;">
<view class="qiu_">{{index +1}}</view>
</view>
<text style="width:30%;box-sizing: border-box;padding-left: 5px;" > {{ item.title }}</text>
<text class="times">{{ item.createTime }}</text>
<text class="times">施工人员:{{ item.nickname }}</text>
<text class="times">施工人员:
{{ item.nickname }}</text>
</view>
<view class="">
<view style="margin-bottom: 5px;">{{ item.content }}</view>
<view v-if="item.images" >
<view v-for="it in item.images.split(',')">
<image :src="baseImageUrl+'/'+it" style="width: 28vw; height: 12vh; margin-right: 1vw; " ></image>
</view>
</view>
</view>
<view style="display: flex;align-items: center;">
<view class="xb_" v-if="index != detailData.stepInfos.length - 1 "> </view>
<text>{{ item.content }}</text>
<view v-if="item.images" >
<view v-for="it in item.images.split(',')">
{{baseImageUrl+'/'+it}}
<image :src="baseImageUrl+'/'+it" mode=""></image>
</view>
</view>
</view>
</view>
@ -845,7 +856,7 @@
.times {
width: 30%;
font-size: 15px;
font-size: 12px;
font-weight: 400;
color: #999999;
margin-left: 25px;