v5.5.82 部分bug修改

This commit is contained in:
lanzhihui 2024-11-28 11:23:53 +08:00
parent a4459d4c2b
commit d56dbd226f
12 changed files with 742 additions and 862 deletions

1318
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -35,7 +35,7 @@ wepy.app({
} }
}, },
globalData: { globalData: {
versions: 'v5.5.80', // 版本号 versions: 'v5.5.82', // 版本号
navBarHeight: 0, // 导航栏高度 navBarHeight: 0, // 导航栏高度
navRight: 0, // 胶囊距右方间距(方保持左、右间距一致) navRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
navTop: 0, // 胶囊距顶部间距 navTop: 0, // 胶囊距顶部间距

View File

@ -426,7 +426,7 @@ scroll-view {
return return
} }
console.log(vm.from, url, type, '7777') console.log(vm.from, url, type, '7777')
if (vm.from != 'dynamicDetail') { if (vm.from != 'dynamicDetail' && vm.from != 'dynamic') {
console.log('44---') console.log('44---')
return return
} }

View File

@ -56,6 +56,7 @@ wepy.component({
methods: { methods: {
chooseImageV2() { // 上传照片 chooseImageV2() { // 上传照片
let vm = this let vm = this
console.log(vm.num, 'num===')
vm.$showLoading(`加载中...`) vm.$showLoading(`加载中...`)
vm.cancelFn() vm.cancelFn()
wx.chooseMedia({ wx.chooseMedia({

View File

@ -102,7 +102,7 @@ export default {
// 成功回调 // 成功回调
wx.removeStorageSync('formId') wx.removeStorageSync('formId')
resolve({statusCode, ...data}) resolve({statusCode, ...data})
} else if (data.code === 1) { } else if (data.code == 1) {
// resolve({statusCode, ...data}) // resolve({statusCode, ...data})
reject(new Error(`error ${data.message}`)) reject(new Error(`error ${data.message}`))
if (this.$is == 'pages/service/GroupChatPage' && data.message.includes('已断开连接')) { if (this.$is == 'pages/service/GroupChatPage' && data.message.includes('已断开连接')) {

View File

@ -274,9 +274,9 @@ page {
<view class="cu-form-group"> <view class="cu-form-group">
<view class="grid col-04 grid-square flex-sub"> <view class="grid col-04 grid-square flex-sub">
<block v-if="uploadType == 'image'"> <block v-if="uploadType == 'image'">
<view class="bg-img ui-dynamic-pic-item" v-for="(item,index) in imgList" :key="index" @tap="$previewImages(item, imgList)"> <view class="bg-img ui-dynamic-pic-item" v-for="(item,index) in imgList" :key="index" @tap.stop="$previewImages(item, imgList)">
<image class="ui-dynamic-pic" :src="item" mode="aspectFill"></image> <image class="ui-dynamic-pic" :src="item" mode="aspectFill"></image>
<view class="cu-tag bg-red ui-delete-icon" @tap="delImg" data-index="{{index}}"> <view class="cu-tag bg-red ui-delete-icon" @tap.stop="delImg(index)" data-index="{{index}}">
<text class="cuIcon-close"></text> <text class="cuIcon-close"></text>
</view> </view>
</view> </view>
@ -302,6 +302,7 @@ page {
<view class="issue" @tap="saveIssue">发布</view> <view class="issue" @tap="saveIssue">发布</view>
</view> </view>
</view> </view>
<view v-if="showCon" class="modal-mask" @tap="showCon = false"> <view v-if="showCon" class="modal-mask" @tap="showCon = false">
<view class="modal-dialog"> <view class="modal-dialog">
<view class="modal-title">温馨提示</view> <view class="modal-title">温馨提示</view>
@ -312,7 +313,7 @@ page {
</view> </view>
</view> </view>
</view> </view>
<uploadPic :num="9 - imgList.length" :chooseShow.sync="choosePicsShow" @changeVal="changeVal" @closeUploadPic="closeUpload"></uploadPic> <uploadPic :num="imgNum" :chooseShow.sync="choosePicsShow" @changeVal="changeVal" @closeUploadPic="closeUpload"></uploadPic>
<!-- <uploadVideo :chooseShow.sync="chooseVideoShow" @changeVal="changeVideoVal" @closeUploadVideo="closeUpload"></uploadVideo>--> <!-- <uploadVideo :chooseShow.sync="chooseVideoShow" @changeVal="changeVideoVal" @closeUploadVideo="closeUpload"></uploadVideo>-->
<uploadVideoV2 ref="uploadVideo" @uploadVideoSuccess="changeVideoVal" @closeUploadVideo="closeUpload"></uploadVideoV2> <uploadVideoV2 ref="uploadVideo" @uploadVideoSuccess="changeVideoVal" @closeUploadVideo="closeUpload"></uploadVideoV2>
</template> </template>
@ -367,7 +368,6 @@ wepy.page({
if (code == 0) { if (code == 0) {
vm.$showToast('动态已发布') vm.$showToast('动态已发布')
setTimeout(() => { setTimeout(() => {
vm.throttle = true
// 发布成功后返回列表并且切换到最新tab // 发布成功后返回列表并且切换到最新tab
const pages = getCurrentPages() const pages = getCurrentPages()
const prevPage = pages[pages.length - 2] const prevPage = pages[pages.length - 2]
@ -378,6 +378,7 @@ wepy.page({
prevPage.$wepy.scrollTopHandle = -1 prevPage.$wepy.scrollTopHandle = -1
prevPage.$wepy.getList() prevPage.$wepy.getList()
wx.navigateBack({delta: 1}) wx.navigateBack({delta: 1})
vm.throttle = true
}, 1200) }, 1200)
} }
}).catch(() => { }).catch(() => {
@ -510,6 +511,11 @@ wepy.page({
wx.navigateTo({url: `/pages/dynamic/searchTopic`}) wx.navigateTo({url: `/pages/dynamic/searchTopic`})
} }
}, },
computed: {
imgNum: function () {
return 9 - this.imgList.length
}
},
onShow() {}, onShow() {},
onLoad(e) { onLoad(e) {
let vm = this let vm = this

View File

@ -294,7 +294,8 @@ wepy.page({
no_more: false, no_more: false,
loading: false, loading: false,
page: 1, page: 1,
list: [] // 列表数据 list: [], // 列表数据
throttle: true
}, },
methods: { methods: {
getList() { getList() {
@ -314,8 +315,9 @@ wepy.page({
industry_sub: vm.is_industry_sub ? vm.is_industry_sub : '', industry_sub: vm.is_industry_sub ? vm.is_industry_sub : '',
income: vm.is_income ? vm.is_income : '' income: vm.is_income ? vm.is_income : ''
} }
console.log(data, '*/**********') if (vm.throttle) {
vm.$showLoading('加载中...') vm.$showLoading('加载中...')
vm.throttle = false
vm.$get({url: `${service.host}/other/user/list?keyword=${vm.inputVal}`, data}).then(({code, data}) => { vm.$get({url: `${service.host}/other/user/list?keyword=${vm.inputVal}`, data}).then(({code, data}) => {
if (code === 0) { if (code === 0) {
if (vm.list.length === 0 || vm.page === 1) { if (vm.list.length === 0 || vm.page === 1) {
@ -337,7 +339,11 @@ wepy.page({
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
console.log(err) console.log(err)
}).finally(() => {
vm.throttle = true
}) })
}
console.log(data, '*/**********')
}, },
// 初始化列表数据 // 初始化列表数据
initData() { initData() {
@ -418,6 +424,7 @@ wepy.page({
let vm = this let vm = this
clearTimeout(vm.timer) clearTimeout(vm.timer)
vm.timer = setTimeout(() => { vm.timer = setTimeout(() => {
vm.list = []
vm.page = 1 vm.page = 1
vm.no_more = false vm.no_more = false
vm.getList() vm.getList()

View File

@ -603,7 +603,7 @@ page {
<view class="ui-relative {{!item.isSelf ? 'ui-left-msg-box f-fl' : 'ui-right-msg-box f-fr'}}"> <view class="ui-relative {{!item.isSelf ? 'ui-left-msg-box f-fl' : 'ui-right-msg-box f-fr'}}">
<image v-if="item.isSelf && item.isSend == 2" class="ui-error-icon" src="https://image.fulllinkai.com/202408/16/26bce9092cd2c703f7d5b2d56ef9d132.png" mode="widthFix"></image> <image v-if="item.isSelf && item.isSend == 2" class="ui-error-icon" src="https://image.fulllinkai.com/202408/16/26bce9092cd2c703f7d5b2d56ef9d132.png" mode="widthFix"></image>
<image v-if="!item.isSelf && item.isSend == 2" class="ui-error-icon-v2" src="https://image.fulllinkai.com/202408/16/26bce9092cd2c703f7d5b2d56ef9d132.png" mode="widthFix"></image> <image v-if="!item.isSelf && item.isSend == 2" class="ui-error-icon-v2" src="https://image.fulllinkai.com/202408/16/26bce9092cd2c703f7d5b2d56ef9d132.png" mode="widthFix"></image>
<image v-if="!item.isSelf" class="ui-user-pic" :src="item.avatar" mode="aspectFill"></image> <image @tap="jumpPathUser" v-if="!item.isSelf" class="ui-user-pic" :src="item.avatar" mode="aspectFill"></image>
<view class="{{item.isSelf ? 'ui-pr-12' : 'ui-pl-12'}}"> <view class="{{item.isSelf ? 'ui-pr-12' : 'ui-pl-12'}}">
<view class="ui-relative"> <view class="ui-relative">
<!--文本加表情信息--> <!--文本加表情信息-->
@ -825,6 +825,8 @@ wepy.page({
isSend: 0, isSend: 0,
msgType: 'text' msgType: 'text'
}) })
// vm.$post({url: ``, data: {}})
// .then(res => {
vm.toView = `id_${timeData}` vm.toView = `id_${timeData}`
let msgIndex = 0 let msgIndex = 0
let msgNewObj = {} let msgNewObj = {}
@ -860,6 +862,7 @@ wepy.page({
}) })
} }
}) })
// })
}, },
// 发送图片消息 // 发送图片消息
sendPictures(file) { sendPictures(file) {
@ -1558,6 +1561,10 @@ wepy.page({
}, },
jumpPath(url) { jumpPath(url) {
wx.navigateTo({url: url}) wx.navigateTo({url: url})
},
jumpPathUser(e) {
let vm = this
wx.navigateTo({url: `/pages/home/information?id=${vm.otherUserId}`})
} }
}, },

View File

@ -353,6 +353,12 @@ page {
letter-spacing: 2rpx; letter-spacing: 2rpx;
} }
} }
.name_width{
max-width: 190rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style> </style>
<template> <template>
<view class="ui-friendRequest"> <view class="ui-friendRequest">
@ -373,7 +379,7 @@ page {
</view> </view>
<view class="rit weuis"> <view class="rit weuis">
<view class="title"> <view class="title">
<view class="font_32 color333 bold name"> <view class="font_32 color333 bold name_width" >
{{item.user.nickname }} {{item.user.nickname }}
</view> </view>
<!-- <block v-if="item.user.type !== 'single'">--> <!-- <block v-if="item.user.type !== 'single'">-->

View File

@ -701,6 +701,8 @@ wepy.page({
videoState: null, videoState: null,
playAudioIndex: -1, playAudioIndex: -1,
innerAudioContext: null,
myTime: null,
audioTime: null, audioTime: null,
audioState: null, audioState: null,
@ -793,6 +795,8 @@ wepy.page({
isSend: 0, isSend: 0,
msgType: '0' msgType: '0'
}) })
// vm.$post({url: ``, data: {}})
// .then(res => {
vm.toView = `id_${timeData}` vm.toView = `id_${timeData}`
let msgIndex = 0 let msgIndex = 0
let msgNewObj = {} let msgNewObj = {}
@ -828,6 +832,7 @@ wepy.page({
}) })
} }
}) })
// })
}, },
// 发送图片消息 // 发送图片消息
sendPictures(file) { sendPictures(file) {
@ -1480,28 +1485,49 @@ wepy.page({
// 播放音频 // 播放音频
playAudio(row, index) { playAudio(row, index) {
let vm = this let vm = this
if (index != vm.playAudioIndex && vm.innerAudioContext) { // 不同清除
vm.audioState = true
clearInterval(vm.myTime)
// vm.playAudioIndex = -1
vm.innerAudioContext.destroy() // 释放音频资源
vm.innerAudioContext = null
} else {
vm.audioState = !vm.audioState vm.audioState = !vm.audioState
}
vm.playAudioIndex = index vm.playAudioIndex = index
const innerAudioContext = wx.createInnerAudioContext({
console.log(vm.innerAudioContext)
if (vm.audioState) {
if (!vm.innerAudioContext) {
vm.myTime = null
vm.innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: false // 是否使用 WebAudio 作为底层音频驱动,默认关闭。对于短音频、播放频繁的音频建议开启此选项,开启后将获得更优的性能表现。由于开启此选项后也会带来一定的内存增长,因此对于长音频建议关闭此选项 useWebAudioImplement: false // 是否使用 WebAudio 作为底层音频驱动,默认关闭。对于短音频、播放频繁的音频建议开启此选项,开启后将获得更优的性能表现。由于开启此选项后也会带来一定的内存增长,因此对于长音频建议关闭此选项
}) })
let myTime = null
if (vm.audioState) {
innerAudioContext.src = row.url
innerAudioContext.play() // 播放
vm.audioTime = 0 vm.audioTime = 0
myTime = setInterval(() => { vm.innerAudioContext.src = row.url
} else {
vm.audioTime = Math.floor(vm.innerAudioContext.currentTime)
}
console.log(vm.audioTime, 'vm.audioTime')
vm.innerAudioContext.play() // 播放
vm.myTime = setInterval(() => {
vm.audioTime += 1 vm.audioTime += 1
if (vm.audioTime * 1000 > row.dur) { if (vm.audioTime * 1000 > row.dur) {
clearInterval(myTime) clearInterval(vm.myTime)
vm.audioState = false vm.audioState = false
vm.playAudioIndex = -1 vm.playAudioIndex = -1
vm.innerAudioContext.destroy() // 释放音频资源
vm.innerAudioContext = null
} }
}, 1000) }, 1000)
console.log(vm.innerAudioContext, 'innerAudioContext=')
} else { } else {
clearInterval(myTime) vm.innerAudioContext.pause() // 停止
clearInterval(vm.myTime)
// vm.myTime = null
vm.audioState = false vm.audioState = false
vm.playAudioIndex = -1 // vm.playAudioIndex = -1
} }
}, },
// 预览图片 // 预览图片

View File

@ -530,7 +530,7 @@
let recordTime = String(parseFloat(new Date(repTime).getTime()) / 1000) let recordTime = String(parseFloat(new Date(repTime).getTime()) / 1000)
console.log(recordTime, 'recordTime') console.log(recordTime, 'recordTime')
self.UID = recordTime.substring(recordTime.length - 5) + String(data.user.id) self.UID = recordTime.substring(recordTime.length - 5) + String(data.user.id)
wx.setStorageSync('UID', self.user.UID) wx.setStorageSync('UID', self.UID)
self.shareConfig.images[1].url = data.share_qrcode self.shareConfig.images[1].url = data.share_qrcode
self.posterConfig = self.shareConfig self.posterConfig = self.shareConfig
console.log(self.posterConfig, '333===0999') console.log(self.posterConfig, '333===0999')

View File

@ -265,6 +265,9 @@
return vm.$showToast('请核查认证信息') return vm.$showToast('请核查认证信息')
} }
this.user = data this.user = data
let userInfo = wx.getStorageSync('userInfo')
userInfo.is_real_approved = data.is_real_approved
wx.setStorageSync('userInfo', userInfo)
if (data.card_num && data.is_real_approved == 1) { if (data.card_num && data.is_real_approved == 1) {
this.user.new_card_num = this.interceptAndReplace(data.card_num, 5, 2, '*') this.user.new_card_num = this.interceptAndReplace(data.card_num, 5, 2, '*')
} }