submit
This commit is contained in:
parent
95aa4241c0
commit
6553f4ac34
@ -36,7 +36,6 @@ const result = ref(groupObjectsByNumberKeys(slots))
|
|||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.content2{
|
.content2{
|
||||||
|
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
padding-left: 18rpx;
|
padding-left: 18rpx;
|
||||||
padding-right: 32rpx;
|
padding-right: 32rpx;
|
||||||
@ -50,6 +49,8 @@ const result = ref(groupObjectsByNumberKeys(slots))
|
|||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
.wrap1_2{
|
.wrap1_2{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
padding-left: 36rpx;
|
padding-left: 36rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
@ -151,16 +151,18 @@ const exchange=async (item)=>{
|
|||||||
imageSrc.value = "data:image/png;base64," + uni.arrayBufferToBase64(arrayBuffer)
|
imageSrc.value = "data:image/png;base64," + uni.arrayBufferToBase64(arrayBuffer)
|
||||||
showWin4.value=true
|
showWin4.value=true
|
||||||
uni.connectSocket({
|
uni.connectSocket({
|
||||||
url: `ws://172.16.100.93:9052/api/smart/appointment/subscribe/msg?AppointmentUid=${item.appointmentUid}`,
|
url: `ws://warehouse.szjixun.cn/ticket/api/smart/appointment/subscribe/msg?AppointmentUid=${item.appointmentUid}`,
|
||||||
success: function() {
|
success: function() {
|
||||||
console.log('WebSocket连接已创建成功!');
|
console.log('WebSocket连接已创建成功!');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
uni.onSocketOpen(function (res) {
|
uni.onSocketOpen( (res)=> {
|
||||||
console.log(res,'onSocketOpen')
|
console.log(res,'onSocketOpen')
|
||||||
});
|
});
|
||||||
uni.onSocketMessage(function (res) {
|
uni.onSocketMessage((res)=>{
|
||||||
|
|
||||||
console.log('WebSocket接收到消息:', res.data);
|
console.log('WebSocket接收到消息:', res.data);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const goViewVenues = (item) => {
|
const goViewVenues = (item) => {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<image :src="userInfo.avatar"></image>
|
<image :src="userInfo.avatar"></image>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap2">
|
<div class="wrap2">
|
||||||
<div class="wrap2_1">恢复默认头像</div>
|
<div class="wrap2_1" @click="setDefault">恢复默认头像</div>
|
||||||
<div class="wrap2_2" @click="changeAvatar">更换头像</div>
|
<div class="wrap2_2" @click="changeAvatar">更换头像</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -40,12 +40,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {updateInfo, upload} from "@/http/apis";
|
import {getInfo, updateInfo, upload} from "@/http/apis";
|
||||||
import {nextTick, ref} from 'vue'
|
import {ref} from 'vue'
|
||||||
const userInfo=ref(uni.getStorageSync('userInfo'))
|
const userInfo=ref(uni.getStorageSync('userInfo'))
|
||||||
|
const getUserInfo = async () => {
|
||||||
|
const res=await getInfo()
|
||||||
|
if (res.code===200){
|
||||||
|
uni.setStorageSync('userInfo',res.data)
|
||||||
|
userInfo.value=res.data
|
||||||
|
}
|
||||||
|
}
|
||||||
const currentAvatar=ref('')
|
const currentAvatar=ref('')
|
||||||
const changeAvatar=()=>{
|
const changeAvatar=()=>{
|
||||||
|
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count:1,
|
count:1,
|
||||||
success:async (res)=>{
|
success:async (res)=>{
|
||||||
@ -53,12 +59,15 @@ const changeAvatar=()=>{
|
|||||||
name:'file',
|
name:'file',
|
||||||
filePath:res.tempFilePaths[0]
|
filePath:res.tempFilePaths[0]
|
||||||
})
|
})
|
||||||
userInfo.value.avatar=res1.data.path
|
currentAvatar.value=res1.data.path
|
||||||
|
await reqAvatar()
|
||||||
reqAvatar()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const setDefault=()=>{
|
||||||
|
currentAvatar.value='https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/e1fd068c-180e-45d6-9196-680f778adc13.png'
|
||||||
|
reqAvatar()
|
||||||
|
}
|
||||||
const logOut=()=>{
|
const logOut=()=>{
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示', // 确认框标题
|
title: '提示', // 确认框标题
|
||||||
@ -80,14 +89,13 @@ const logOut=()=>{
|
|||||||
fail: function (error) {
|
fail: function (error) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
const reqAvatar=async ()=>{
|
const reqAvatar=async ()=>{
|
||||||
const res= await updateInfo({
|
const res= await updateInfo({
|
||||||
avatar:currentAvatar.value
|
avatar:currentAvatar.value
|
||||||
})
|
})
|
||||||
if (res.code===200) {
|
if (res.code===200) {
|
||||||
uni.setStorageSync('userInfo',userInfo.value)
|
await getUserInfo()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '更换头像成功',
|
title: '更换头像成功',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import {defineStore} from 'pinia'
|
import {defineStore} from 'pinia'
|
||||||
import {ref} from 'vue'
|
import {ref} from 'vue'
|
||||||
|
import {getInfo} from "@/http/apis";
|
||||||
|
|
||||||
export const useMainStore = defineStore('main', () => {
|
export const useMainStore = defineStore('main', () => {
|
||||||
const titleHeight = ref('')
|
const titleHeight = ref('')
|
||||||
const tabHeight = ref('')
|
const tabHeight = ref('')
|
||||||
const currentBooking = ref(null)
|
const currentBooking = ref(null)
|
||||||
const isShow = ref(true)
|
const isShow = ref(true)
|
||||||
return {titleHeight, tabHeight, isShow}
|
|
||||||
|
return {titleHeight, tabHeight, isShow,currentBooking}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user