语音播报 bug

This commit is contained in:
2025-03-03 19:33:07 +08:00
parent b38c1b02c2
commit 58a98c9403
9 changed files with 110 additions and 231 deletions

View File

@ -36,6 +36,11 @@ const sendRequest = (options)=>{
rj(result.data);
}
}else if(result.statusCode==401){
const pages = getCurrentPages();
const currentPages = pages[pages.length-1];
if(currentPages&&currentPages.route.indexOf('pages/login/login')>-1){
return;
}
wx.navigateTo({
url: '/pages/login/login',
})

View File

@ -1,6 +1,5 @@
import request from './request';
let app = getApp();
const token = wx.getStorageSync('accessToken');
export default {
genderKV:{
@ -37,7 +36,7 @@ export default {
filePath: file.tempFilePath,
name: 'file',
header:{
Authorization: `Bearer ${token||app.globalData.accessToken}`
Authorization: `Bearer ${app?.globalData?.accessToken}`
},
url: request.baseUrl+'/api/upload/image',
success:(res)=>{

5
app.js
View File

@ -13,11 +13,6 @@ App({
url: '/pages/login/index',
})
}
wx.onAppShow((options) => {
if(token){
// this.getUserInfo();
}
})
},
onHide(){
console.log('app on hide');

View File

@ -372,7 +372,9 @@ list-view{
display: block;
}
switch .wx-switch-input{
background-color:#999999;
}
switch .wx-switch-input.wx-switch-input-checked {
background-color:var(--main-color);
border-color: var(--main-color);

View File

@ -81,34 +81,24 @@ Component({
if(this.loopOrderTimer){
clearInterval(this.loopOrderTimer);
}
if(this.emptyAutioPlayTimer){
clearTimeout(this.emptyAutioPlayTimer)
}
if(this.bgam){
this.bgam.stop();
}
},
notice(){
if(this.emptyAutioPlayTimer){
clearTimeout(this.emptyAutioPlayTimer)
}
// this.bgam.src = this.data.haveOrderAudio;
// this.bgam.onEnded(()=>{
// console.log('notice onend');
// this.emptyAutioPlayTimer = setTimeout(()=>{
// this.bgam.src = this.data.emptyAudio;
// },1000)
// });
const innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement:true
})
innerAudioContext.src = this.data.haveOrderAudio;
innerAudioContext.play();
innerAudioContext.onEnded(()=>{
innerAudioContext.destroy();
})
this.bgam.src = this.data.haveOrderAudio;
this.bgam.onEnded(()=>{
this.bgam.src = this.data.emptyAudio;
});
// console.log('notice order');
// const innerAudioContext = wx.createInnerAudioContext({
// useWebAudioImplement:true
// })
// innerAudioContext.src = this.data.haveOrderAudio;
// innerAudioContext.play();
// innerAudioContext.onEnded(()=>{
// innerAudioContext.destroy();
// })
}
}
})

View File

@ -64,7 +64,6 @@ Page({
unReadOrderCount:0
},
onLoad(){
console.log(wx.env.USER_DATA_PATH);
this.orderBackgroundNotice = this.selectComponent('#orderBackgroundNotice');
const snHeight = getStatusNavBarHeight();
this.setData({

View File

@ -1,5 +1,6 @@
<scroll-view refresher-triggered="{{refreshTrigger}}" bindrefresherrefresh="getOrderDetail"
refresher-enabled scroll-y class="order-detail">
<view class="content">
<view class="page-container address-info">
<view class="title">
{{orderDetail.community_name}}
@ -47,33 +48,7 @@
src="{{item}}" bind:tap="previewPackageImage" data-item="{{item}}"/>
</view>
</view>
<!-- <view class="page-container package-info">
<view class="station-list" bind:tap="navToOrderDetail">
<view class="sl-item" wx:for="{{orderDetail.packages}}" wx:key="index">
<view class="name">{{item.station_name}}</view>
<view class="package">
<view class="key">{{item.pickup_codes.length}} 件包裹:</view>
<view class="value">
<label wx:for="{{item.pickup_codes}}" wx:key="index" wx:for-item="code">
{{orderDetail.status==orderStatus.created?'******':code}}
</label>
</view>
</view>
<view class="received-status" wx:if="{{item.status!=orderStatus.created}}">待取件</view>
</view>
</view>
<view class="address">
<view class="title">
{{orderDetail.community_name}}
{{orderDetail.building_name}}
{{orderDetail.address_detail}}
</view>
<view class="sub-title">
{{orderDetail.address_name}}
{{genderKV[orderDetail.address_gender]}}{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}}
</view>
</view>
</view> -->
<view class="page-container steps">
<view class="item {{orderStep>0?'night':''}}">
<view class="content">
@ -128,5 +103,6 @@
</view>
</view>
<view class="scroll-view-dispatch"></view>
</view>
</scroll-view>

View File

@ -1,6 +1,9 @@
.order-detail{
height:100vh;
}
.order-detail .content{
overflow: auto;
}
.address-info .title{
font-size: 40rpx;
font-weight: 600;
@ -70,96 +73,6 @@
width:160rpx;height:160rpx;
border-radius: 12rpx;
}
/* .package-info{
padding:56rpx 20rpx 40rpx 20rpx;
position: relative;
color: #555555;
}
.package-info::before{
content: '';
position: absolute;
width:1.2rpx;
background-color: rgba(85, 85, 85, 0.5);
left:38.5rpx;top:90rpx;
bottom:130rpx;
} */
/* .package-info .name{
font-size: 40rpx;
font-weight: 600;
flex: 1;
}
.package-info .received-status{
border-left: 1rpx solid #999999;
padding-left:18rpx;
} */
/* .package-info .package{
font-size:32rpx;
margin-top:24rpx;
display: flex;
} */
/* .package-info .station-list .sl-item{
position: relative;
padding-left:64rpx;
padding-bottom:50rpx;
display: flex;
align-items: center;
}
.package-info .station-list .sl-item:first-child::before{
content: '取';
left:0;top:0;
width:40rpx;height:40rpx;
color:#fff;
font-size: 24rpx;
text-align: center;
line-height: 40rpx;
}
.package-info .station-list .sl-item::before{
position: absolute;
left:12rpx;top:12rpx;
width:16rpx;height:16rpx;
content: '';
background-color: #555555;
border-radius: 50%;
display: inline-block;
}
.package-list .item .station-list .sl-item{
padding-bottom:50rpx;
} */
/* .package-info .package .value{
flex:1;
display: flex;
flex-wrap: wrap;
gap: 16rpx;
} */
/* .package-info .address{
padding-left:64rpx;
position: relative;
}
.package-info .address::before{
content: '送';
position: absolute;
top:0;left:0;
width:40rpx;height:40rpx;
background-color: var(--main-color);
border-radius: 50%;
color:#fff;
line-height: 40rpx;
text-align: center;
font-size: 24rpx;
}
.package-info .address .title{
color:var(--main-font-color);
font-size: 40rpx;
font-weight: 600;
}
.package-info .address .sub-title{
font-size: 32rpx;
margin-top:24rpx
} */
.steps{
display: flex;

View File

@ -35,7 +35,7 @@
.amount .input{
flex: 1;
font-size: 56rpx;
font-weight: 500;
font-weight: 600;
height:114rpx;
margin-left:24rpx;
}