检测优化

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

View File

@ -35,10 +35,12 @@
</template> </template>
<script> <script>
const innerAudioContext = uni.createInnerAudioContext();
import request from '../../utils/request'; import request from '../../utils/request';
export default{ export default{
data(){ data(){
return{ return{
aindex:1, aindex:1,
chuan:0, chuan:0,
arr:[ arr:[
@ -61,26 +63,49 @@
}, },
mounted() { mounted() {
this.aindex = this.msg this.aindex = this.msg
}, },
methods:{ methods:{
// getgogo(index){ dianyidain() {
console.log('执行了dianyidain');
innerAudioContext.src = 'https://www.nuoyunr.com/lananRsc/rescue/msgV.mp3';
//
const playCount = 5;
let currentCount = 0;
// if(index == 1){ //
// this.aindex = index innerAudioContext.onEnded(() => {
// uni.reLaunch({ //
// url:'/pages/index/index' currentCount++;
// });
// } //
// if(index == 2){ if (currentCount < playCount) {
// this.aindex = index //
// uni.reLaunch({ innerAudioContext.play();
// url:'/pages/my/my' } 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(){ async getbottom(){
let data = { let data = {
partnerId:uni.getStorageSync('partnerId') partnerId:uni.getStorageSync('partnerId')

View File

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

View File

@ -92,21 +92,32 @@
<view class="" v-for="(item,index) in detailData.stepInfos" :key="index"> <view class="" v-for="(item,index) in detailData.stepInfos" :key="index">
<view class="x-box"> <view class="x-box">
<view class="h-title" style="display: flex;align-items: center;justify-content: space-between;"> <view class="h-title" style="display: flex;align-items: center;justify-content: space-between;">
<view style="width: 10%;">
<view class="qiu_">{{index +1}}</view> <view class="qiu_">{{index +1}}</view>
<text style="width: 46%;" >{{ item.title }}</text> </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.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>
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<view class="xb_" v-if="index != detailData.stepInfos.length - 1 "> </view> <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>
</view> </view>
@ -845,7 +856,7 @@
.times { .times {
width: 30%; width: 30%;
font-size: 15px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
margin-left: 25px; margin-left: 25px;