update:版本号相关修改

master
guoshuang 3 years ago
parent 9f05ef4c81
commit 921a2435d3

@ -153,7 +153,7 @@ export default class LoginPage extends BasePage {
Version = '1.0.1'; Version = '1.0.1';
async update() { async update() {
await session.QueryVersion(); await session.QueryVersion();
if (this.Version != session.Version) { if (this.Version < session.Version) {
// //
uni.showModal({ uni.showModal({
content: this.$t('message.Tip1') as string, content: this.$t('message.Tip1') as string,

@ -83,7 +83,6 @@ export default class ServerPage extends BasePage {
} }
onSubmit(): void { onSubmit(): void {
localStorage.removeItem('host');
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (valid) { if (valid) {
const { host, port } = this.form; const { host, port } = this.form;
@ -99,7 +98,7 @@ export default class ServerPage extends BasePage {
throw e; throw e;
} }
server.setServerAddress({ address }); server.setServerAddress({ address });
localStorage.setItem('host', host); //localStorage.setItem('host', host);
uni.showToast({ uni.showToast({
//icon: 'success', //icon: 'success',
title: this.$t('message.SetServerSuccessfully') as string, title: this.$t('message.SetServerSuccessfully') as string,

@ -6,7 +6,7 @@ import { url } from '@/utils/url';
import { stringify } from 'query-string'; import { stringify } from 'query-string';
import store from '@/store'; import store from '@/store';
import { page } from '@/utils/page'; import { page } from '@/utils/page';
import { server } from '@/pages/login/server/model';
export interface User { export interface User {
code?: string; code?: string;
msg?: string; msg?: string;
@ -161,7 +161,9 @@ class SessionService extends VuexModule {
//查询版本号 //查询版本号
@MutationAction @MutationAction
async QueryVersion() { async QueryVersion() {
const a = localStorage.getItem('host'); const a = server.serverAddress;
//const ServeUrl = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__'));
//const a = ServeUrl.server.address;
console.log('a', a); console.log('a', a);
const res: any = await request.get(a + '/sgNginxDownload/Debug/setup.json'); const res: any = await request.get(a + '/sgNginxDownload/Debug/setup.json');
const Version = res.version; const Version = res.version;

Loading…
Cancel
Save