|
@@ -18,11 +18,13 @@
|
|
<div @click="getLogin" class="login-btn">登 录</div>
|
|
<div @click="getLogin" class="login-btn">登 录</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div v-else style=" width: 100%; color: #ffffff; font-size:20px; text-align: center; ">
|
|
|
|
- <div style="margin-bottom: 10px;">模拟发送手势:</div>
|
|
|
|
- <div @click="getCmdtest(1)" style="margin-bottom: 10px;">1、左滑动(切换项目)</div>
|
|
|
|
- <div @click="getCmdtest(2)" style="margin-bottom: 10px;">2、举左手(确认)</div>
|
|
|
|
- <div @click="getCmdtest(3)">3、双手胸前交叉(退出)</div>
|
|
|
|
|
|
+ <div v-else class="login-content-center">
|
|
|
|
+ <div class="login-input-box">
|
|
|
|
+ <div style="margin-bottom: 15px;">模拟发送手势:</div>
|
|
|
|
+ <div class="login-item"><div @click="getCmdtest(1)" class="login-btn" style="width:100%;">1、左滑动(切换项目)</div></div>
|
|
|
|
+ <div class="login-item"><div @click="getCmdtest(2)" class="login-btn" style="width:100%;">2、举左手(确认)</div></div>
|
|
|
|
+ <div class="login-item" style="margin-bottom: 0;"><div @click="getCmdtest(3)" class="login-btn" style="width:100%;">3、双手胸前交叉(退出)</div></div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -68,7 +70,12 @@ const getLogin = () => {
|
|
proxy?.$http.common.qrlogin(params).then((res: any) => {
|
|
proxy?.$http.common.qrlogin(params).then((res: any) => {
|
|
if (res.access_token) {
|
|
if (res.access_token) {
|
|
show.value = true
|
|
show.value = true
|
|
- getDeviceInfo()
|
|
|
|
|
|
+ //保存token
|
|
|
|
+ let token = 'JWT ' + res.access_token;
|
|
|
|
+ localStorage.setItem("token", token);
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ getDeviceInfo()
|
|
|
|
+ },500)
|
|
}
|
|
}
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
}).finally(() => proxy?.$modal?.closeLoading());
|
|
}).finally(() => proxy?.$modal?.closeLoading());
|