优化
This commit is contained in:
@@ -17,11 +17,10 @@
|
||||
|
||||
<script>
|
||||
import request from "../../components/request.js";
|
||||
import genTestUserSig from "../../components/debug/GenerateTestUserSig.js";
|
||||
import TUIlogin from "../../components/TUILogin.js";
|
||||
import { goEasylogin } from "../../components/goEasyTool/tool.js";
|
||||
import { useCounterStore } from '@/stores/counter'
|
||||
|
||||
const counter = useCounterStore()
|
||||
// const genTestUserSig = require('../../components/debug/GenerateTestUserSig.js');
|
||||
export default {
|
||||
inject: ['$global'],
|
||||
data() {
|
||||
@@ -80,21 +79,6 @@ export default {
|
||||
userInfo: false,
|
||||
});
|
||||
this.info = res;
|
||||
const sdkAppID = Number(this.info.data.chatInfo.appId);
|
||||
const userID ="administrator";
|
||||
this.userSig = genTestUserSig({
|
||||
SDKAPPID : sdkAppID,
|
||||
SECRETKEY:this.info.data.chatInfo.appKey,
|
||||
userID: userID,
|
||||
})
|
||||
this.myuserSig = genTestUserSig({
|
||||
SDKAPPID : sdkAppID,
|
||||
SECRETKEY:this.info.data.chatInfo.appKey,
|
||||
userID: String(res.data.info.id),
|
||||
})
|
||||
uni.setStorageSync("myuserSig", this.myuserSig)
|
||||
uni.setStorageSync("chatInfo", this.info.data.chatInfo)
|
||||
uni.setStorageSync("userSig", this.userSig)
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
const now = Date.now();
|
||||
uni.setStorageSync("last_clean_time", now);
|
||||
@@ -104,11 +88,10 @@ export default {
|
||||
uni.reLaunch({
|
||||
url: "/pages/UserInformation/UserInformation",
|
||||
});
|
||||
TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.id,this.myuserSig.userSig)
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.id,this.myuserSig.userSig)
|
||||
goEasylogin(this.$goeasy,String(this.info.data.info.id),this.info.data.info.headerIcon,this.info.data.info.nickName);
|
||||
uni.hideLoading();
|
||||
//跳转原来页面否则首页
|
||||
uni.reLaunch({
|
||||
|
||||
Reference in New Issue
Block a user