This commit is contained in:
2024-03-16 15:12:48 +08:00
parent 583487a52e
commit 47558cdaee
5 changed files with 54 additions and 44 deletions

View File

@ -31,7 +31,6 @@
} }
}, },
onLoad(e) { onLoad(e) {
console.log(e)
if (e) { if (e) {
this.list = JSON.parse(e.list) this.list = JSON.parse(e.list)
} }

View File

@ -14,8 +14,7 @@
</view> --> </view> -->
<view class="name"> <view class="name">
<u-form :model="form" ref="uForm" label-width="110"> <u-form :model="form" ref="uForm" label-width="110">
<u-form-item label="用户名:"><u-input placeholder="请输入用户名" maxlength="11" <u-form-item label="用户名:"><u-input placeholder="请输入用户名" v-model="personAccount" /></u-form-item>
v-model="personAccount" /></u-form-item>
<u-form-item label="密码:"> <u-form-item label="密码:">
<u-input placeholder="请输入密码" :password-icon="true" type="password" v-model="personPassword" /> <u-input placeholder="请输入密码" :password-icon="true" type="password" v-model="personPassword" />
<!-- <span class="pwd">忘记密码</span> --> <!-- <span class="pwd">忘记密码</span> -->
@ -58,6 +57,10 @@
// this.password = options.password // this.password = options.password
// } // }
// }, // },
onShow() {
this.personAccount = uni.getStorageSync('loginform').personAccount
this.personPassword = uni.getStorageSync('loginform').personPassword
},
methods: { methods: {
...mapMutations(['scoket']), ...mapMutations(['scoket']),
login() { login() {
@ -76,6 +79,11 @@
duration: '1500' duration: '1500'
}) })
} else if (res.data.data.status == 2 || res.data.data.status == 1) { } else if (res.data.data.status == 2 || res.data.data.status == 1) {
let form = {
personAccount: this.personAccount,
personPassword: this.personPassword
}
uni.setStorageSync('loginform', form);
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '登录成功', title: '登录成功',
type: 'success', type: 'success',

View File

@ -213,7 +213,8 @@
uni.closeSocket(); uni.closeSocket();
} }
uni.closeSocket(); uni.closeSocket();
uni.clearStorageSync(); uni.removeStorageSync('id');
uni.removeStorageSync('status');
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '退出账号成功', title: '退出账号成功',
type: 'success', type: 'success',

View File

@ -339,7 +339,8 @@
senderName: that.currentItem.doctorName, senderName: that.currentItem.doctorName,
messageType: 1, messageType: 1,
sendTime: new Date(), sendTime: new Date(),
content: this.formData.content content: this.formData.content,
sourcePlatform: 'APP'
} }
that.formData.content = '' // that.formData.content = '' //
sendMessage(obj).then(res => { sendMessage(obj).then(res => {
@ -491,7 +492,8 @@
senderName: that.currentItem.doctorName, senderName: that.currentItem.doctorName,
messageType: 2, messageType: 2,
sendTime: new Date(), sendTime: new Date(),
content: fileurls.fileUrl content: fileurls.fileUrl,
sourcePlatform: 'APP'
} }
sendMessage(obj).then(respp => { sendMessage(obj).then(respp => {
if (respp.code == 200) { if (respp.code == 200) {