|
|
@@ -110,6 +110,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import IMSDK, {
|
|
|
+ SessionType
|
|
|
+ } from "openim-uniapp-polyfill";
|
|
|
+ import {
|
|
|
+ Igexin
|
|
|
+ } from '@/pages_im/util/common.js';
|
|
|
import {
|
|
|
getUserInfo
|
|
|
} from '@/api/user'
|
|
|
@@ -223,6 +229,33 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ logout() {
|
|
|
+ uni.clearStorage()
|
|
|
+ this.$logout();
|
|
|
+ let IMUserID = uni.getStorageSync('IMUserID');
|
|
|
+ IMSDK.asyncApi(IMSDK.IMMethods.Logout, IMSDK.uuid()).then(() => {
|
|
|
+ callingModule?.endCall();
|
|
|
+ meetingModule?.endCall();
|
|
|
+ }).catch((err) => console.log(err))
|
|
|
+ .finally(() => {
|
|
|
+ Igexin.unbindAlias(IMUserID);
|
|
|
+ uni.removeStorage({
|
|
|
+ key: "IMToken"
|
|
|
+ });
|
|
|
+ uni.removeStorage({
|
|
|
+ key: "IMUserID"
|
|
|
+ });
|
|
|
+ uni.removeStorage({
|
|
|
+ key: "IMHasLogin"
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ this.user = this.defUser;
|
|
|
+ this.coupons.expiredCount = 0;
|
|
|
+ this.coupons.notUsedCount = 0;
|
|
|
+ this.coupons.usedCount = 0;
|
|
|
+ },
|
|
|
getGoodsProducts() {
|
|
|
var that = this;
|
|
|
if (that.likeGoodsHasMore == true || that.likeGoodsLoading == true) return;
|