'youhua'
This commit is contained in:
parent
92527f3872
commit
a2e812d21f
60
components/playAudio.vue
Normal file
60
components/playAudio.vue
Normal file
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <button @click="playAudio">播放AAC音频</button>
|
||||
<button @click="pauseAudio">暂停</button>
|
||||
<button @click="stopAudio">停止</button>
|
||||
<text>当前状态: {{ statusText }}</text> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
audioContext: null,
|
||||
statusText: '未播放'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 创建音频实例
|
||||
this.audioContext = uni.createInnerAudioContext();
|
||||
// 设置音频源,这里以 static 目录下的本地文件为例
|
||||
this.audioContext.src = '/static/audio/sound.aac';
|
||||
|
||||
// 监听各种事件
|
||||
this.audioContext.onPlay(() => {
|
||||
this.statusText = '播放中';
|
||||
});
|
||||
this.audioContext.onPause(() => {
|
||||
this.statusText = '已暂停';
|
||||
});
|
||||
this.audioContext.onStop(() => {
|
||||
this.statusText = '已停止';
|
||||
});
|
||||
this.audioContext.onEnded(() => {
|
||||
this.statusText = '播放结束';
|
||||
});
|
||||
this.audioContext.onError((res) => {
|
||||
this.statusText = '播放错误';
|
||||
console.error('音频播放错误:', res);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
playAudio() {
|
||||
this.audioContext.play();
|
||||
},
|
||||
pauseAudio() {
|
||||
this.audioContext.pause();
|
||||
},
|
||||
stopAudio() {
|
||||
this.audioContext.stop(); // 停止会重置进度到开头
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 页面销毁时,销毁音频实例以释放资源
|
||||
if (this.audioContext) {
|
||||
this.audioContext.destroy();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -283,7 +283,14 @@
|
||||
<view class="status">待上传</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="popTwoText4">高空作业证</view> -->
|
||||
<view class="popTwoText4">
|
||||
<text>健康证</text>
|
||||
<text>{{personInfo.health_certificate||'未填写'}}</text>
|
||||
</view>
|
||||
<view class="popTwoText4">
|
||||
<text>高空作业证</text>
|
||||
<text>{{personInfo.high_altitude_certificate||'未填写'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
@ -361,6 +368,7 @@
|
||||
<u-picker :show="showType" :columns="[typelist]" keyName="name" @cancel="showType = false" @confirm="confirmType"></u-picker>
|
||||
|
||||
<u-picker :show="showDistance" :columns="[distanceArr]" keyName="name" @cancel="showDistance = false" @confirm="confirmDistance"></u-picker>
|
||||
<playAudio ref="audioRef"></playAudio>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -370,6 +378,7 @@
|
||||
import appointTime from '@/components/appointTime.vue';
|
||||
import citySelect from '@/components/linzq-citySelect/linzq-citySelect.vue';
|
||||
import util from '../../common/util.js'
|
||||
import playAudio from '@/components/playAudio.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -478,14 +487,16 @@
|
||||
},
|
||||
open_door_title: '',
|
||||
open_door_content: '',
|
||||
nowOrder: {}
|
||||
nowOrder: {},
|
||||
timeoutID: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
CustomTabBar,
|
||||
cancleOrder,
|
||||
appointTime,
|
||||
citySelect
|
||||
citySelect,
|
||||
playAudio
|
||||
},
|
||||
computed: {
|
||||
countTime: function(){
|
||||
@ -517,6 +528,13 @@
|
||||
// this.getdata()
|
||||
// this.config()
|
||||
// this.qiangdanlist()
|
||||
|
||||
let _this = this;
|
||||
clearInterval(this.timeoutID); // 取消定时器
|
||||
this.timeoutID = setInterval(function() {
|
||||
console.log('这条消息将在2秒后显示');
|
||||
_this.qiangdanlist()
|
||||
}, 60000);
|
||||
},
|
||||
onHide() {
|
||||
},
|
||||
@ -543,6 +561,7 @@
|
||||
// this.getquestion()
|
||||
// this.recycleOrderList()
|
||||
// this.qiangdanlist()
|
||||
console.log('123+++++++++++++')
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
if (res.from === 'button') {
|
||||
@ -665,7 +684,7 @@
|
||||
_this.cityText = res.city;
|
||||
_this.longitude = res.longitude;
|
||||
_this.latitude = res.latitude;
|
||||
console.log(res,'kkkkkkkkk+++')
|
||||
console.log(res,'kkkkkkkkk-+++')
|
||||
console.log(res,'kkkkkkkkk+++')
|
||||
_this.qiangdanlist()
|
||||
// uni.setStorageSync('city_name',res.city)
|
||||
@ -934,6 +953,7 @@
|
||||
console.log(data,'mmmmmmmmmm---')
|
||||
this.$api.qiangdanlist(data,res=>{
|
||||
if(res.code == '1'){
|
||||
this.deelQiangdan(res.data.list.data);
|
||||
this.qiangdanArr = this.qiangdanArr.concat(res.data.list.data)
|
||||
// this.recycleList = res.data.type
|
||||
this.lastPage1 = res.data.list.last_page //Math.ceil(res.data.total/this.limit)
|
||||
@ -941,6 +961,15 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
deelQiangdan(list){
|
||||
if(list.length){
|
||||
let time = new Date().getTime()
|
||||
let orderTime = list[0].createtime * 1000
|
||||
if((time - orderTime) < 60000){
|
||||
this.$refs.audioRef.playAudio();
|
||||
}
|
||||
}
|
||||
},
|
||||
recycleOrderList(status){
|
||||
console.log('fffffffff')
|
||||
let data = {
|
||||
@ -1596,7 +1625,7 @@
|
||||
}
|
||||
.popBoxTwo{
|
||||
width: 520rpx;
|
||||
height: 800rpx;
|
||||
height: 820rpx;
|
||||
.popTwoImg{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@ -1639,6 +1668,7 @@
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding-left: 27rpx;
|
||||
padding-right: 27rpx;
|
||||
background: rgba(255,141,96,0.1);
|
||||
border-radius: 10rpx;
|
||||
// opacity: 0.1;
|
||||
@ -1646,6 +1676,10 @@
|
||||
font-size: 24rpx;
|
||||
color: #C56742;
|
||||
margin-top: 15rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.popTowHeadImg{
|
||||
width: 300rpx;
|
||||
|
||||
@ -17,16 +17,16 @@
|
||||
</view>
|
||||
<view class="inputBox">
|
||||
<image :src="path+'/assets/img/icon/code.png'" class="inputIcon"></image>
|
||||
<input v-model="password" type="text" class="inputEle" placeholder="请输入验证码" />
|
||||
<view class="codeBtn flex-center" @click="smsCode">发送验证码</view>
|
||||
<input v-model="password" type="password" class="inputEle" placeholder="请输入密码" />
|
||||
<!-- <view class="codeBtn flex-center" @click="smsCode">发送验证码</view> -->
|
||||
</view>
|
||||
<view class="protBox">
|
||||
<image v-if="!isRead" @click="selectRead" :src="path+'/assets/img/icon/noSelected.png'"></image>
|
||||
<image v-else @click="selectRead" :src="path+'/assets/img/icon/selected.png'"></image>
|
||||
<text>同意</text>
|
||||
<text class="protText" @click="toshow()">《某某用户服务协议》</text>
|
||||
<text class="protText" @click="toshow('userProt')">《用户服务协议》</text>
|
||||
<text>和</text>
|
||||
<text class="protText" @click="toshow()">《隐私政策》</text>
|
||||
<text class="protText" @click="toshow('privacy')">《隐私政策》</text>
|
||||
</view>
|
||||
<button class="loginBtn flex-center" @click="loginEn">登录</button>
|
||||
</view>
|
||||
@ -62,6 +62,11 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toshow(val){
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/detail?type=' + val
|
||||
})
|
||||
},
|
||||
smsCode(){
|
||||
this.$api.smsCode({
|
||||
mobile: this.mobile
|
||||
@ -387,8 +392,8 @@ export default {
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
image{
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.protText{
|
||||
|
||||
@ -117,14 +117,14 @@
|
||||
<text class="phoneText" @click="callPhone(servicePhone)">{{servicePhone}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<button class="fsz32 flex-between listBox" open-type="contact">
|
||||
<!-- <button class="fsz32 flex-between listBox" open-type="contact">
|
||||
<view class="flex-center">
|
||||
<!-- <button class="flex-center slide-Items" open-type="contact"> -->
|
||||
<button class="flex-center slide-Items" open-type="contact">
|
||||
<image :src="path+'/assets/img/icon/message.png'" class="listIcon"></image>
|
||||
<text class="listLabel">在线客服</text>
|
||||
</view>
|
||||
<image src="/static/img/right.png" style="width: 50rpx;height:50rpx;"></image>
|
||||
</button>
|
||||
</button> -->
|
||||
<!-- <view class="fsz32 flex-between listBox" @click="linkPage('/pages/mine/editInfo')">
|
||||
<view class="flex-center">
|
||||
<image :src="path+'/assets/img/icon/question.png'" class="listIcon"></image>
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
async OnCanvas() {
|
||||
that.loading = true;
|
||||
that.ctx = uni.createCanvasContext(that.canvasID, this);
|
||||
let imgurl = 'https://admin.dbcdq.cn/assets/img/icon/bg3.png'
|
||||
let imgurl = 'https://admin.dbcdq.cn/assets/img/icon/bg5.png'
|
||||
// let imgurl = 'https://admin.dbcdq.cn/assets/img/icon/bg2.png'
|
||||
//网络主图
|
||||
let _imgInfo = await that.getImageInfo({
|
||||
@ -74,8 +74,8 @@
|
||||
})
|
||||
let h = that.canvasW/100*48
|
||||
|
||||
let left = that.canvasW/100*28.2
|
||||
let top = that.canvasH/100*48.5
|
||||
let left = that.canvasW/100*26
|
||||
let top = that.canvasH/100*49.8
|
||||
that.ctx.drawImage(_qrcodeImg.path, left, top, h, h);
|
||||
// that.ctx.drawImage(_qrcodeImg.path, that.canvasW - 214, that.canvasH - 225, h, h);
|
||||
//延迟后渲染至canvas上
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<u-tabs :list="tabArr" lineColor="#FB8F0C" @click="tabClick"></u-tabs>
|
||||
<view class="problem " v-if="list.length > 0">
|
||||
<view class="problem_main">
|
||||
<view class="li" v-for="(item,index) in list" :key="index" @click="show(index)">
|
||||
@ -52,11 +53,26 @@
|
||||
contentdown: '查看更多',
|
||||
contentrefresh: '加载中',
|
||||
contentnomore: ''
|
||||
}
|
||||
},
|
||||
tabArr: [{
|
||||
name: '操作规范',
|
||||
}, {
|
||||
name: '回收问题',
|
||||
}, {
|
||||
name: '清洗问题'
|
||||
}, {
|
||||
name: '清运问题'
|
||||
}, {
|
||||
name: '维修问题'
|
||||
}, {
|
||||
name: '账户问题'
|
||||
}, {
|
||||
name: '其他问题'
|
||||
}]
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.getdata()
|
||||
this.getdata('操作规范')
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
@ -66,7 +82,11 @@
|
||||
this.ifBottomRefresh = true
|
||||
this.getData()
|
||||
},
|
||||
methods:{
|
||||
methods:{
|
||||
tabClick(val){
|
||||
this.list = []
|
||||
this.getdata(val.name)
|
||||
},
|
||||
getH(){
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('.textBox').boundingClientRect(({ height }) => {
|
||||
@ -85,9 +105,10 @@
|
||||
})
|
||||
this.list = list;
|
||||
},
|
||||
getdata(){
|
||||
getdata(type){
|
||||
let data={page:this.page}
|
||||
data.platform = 'app'
|
||||
data.platform = 'app'
|
||||
data.question_type = type
|
||||
this.$api.question_list(data,res=>{
|
||||
if(res.code == '1'){
|
||||
this.list= this.list.concat(res.data.list.data)
|
||||
|
||||
BIN
static/audio/sound.aac
Normal file
BIN
static/audio/sound.aac
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
unpackage/cache/wgt/__UNI__0B7E65B/static/audio/sound.aac
vendored
Normal file
BIN
unpackage/cache/wgt/__UNI__0B7E65B/static/audio/sound.aac
vendored
Normal file
Binary file not shown.
10
unpackage/dist/build/app-plus/app-service.js
vendored
10
unpackage/dist/build/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/app-view.js
vendored
2
unpackage/dist/build/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/build/app-plus/static/audio/sound.aac
vendored
Normal file
BIN
unpackage/dist/build/app-plus/static/audio/sound.aac
vendored
Normal file
Binary file not shown.
1668
unpackage/dist/dev/app-plus/app-service.js
vendored
1668
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
1641
unpackage/dist/dev/app-plus/app-view.js
vendored
1641
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because it is too large
Load Diff
BIN
unpackage/dist/dev/app-plus/static/audio/sound.aac
vendored
Normal file
BIN
unpackage/dist/dev/app-plus/static/audio/sound.aac
vendored
Normal file
Binary file not shown.
BIN
unpackage/release/apk/__UNI__0B7E65B__20251215223558.apk
Normal file
BIN
unpackage/release/apk/__UNI__0B7E65B__20251215223558.apk
Normal file
Binary file not shown.
BIN
unpackage/release/apk/__UNI__0B7E65B__20251216202246.apk
Normal file
BIN
unpackage/release/apk/__UNI__0B7E65B__20251216202246.apk
Normal file
Binary file not shown.
BIN
unpackage/release/apk/__UNI__0B7E65B__20251222224027.apk
Normal file
BIN
unpackage/release/apk/__UNI__0B7E65B__20251222224027.apk
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user