dam-7 feat 修改版本

master
guoshuang 3 years ago
parent 126182997b
commit cb3b6079db

@ -150,10 +150,10 @@ export default class LoginPage extends BasePage {
console.log('image', this.image); console.log('image', this.image);
console.log('Version////', this.Version); console.log('Version////', this.Version);
} }
Version = '2.0.1'; Version = '1.0.5';
async update() { async update() {
try { try {
await session.QueryVersion(); await session.QueryVersion(server.serverAddress);
if (this.Version < session.Version) { if (this.Version < session.Version) {
// //
uni.showModal({ uni.showModal({

@ -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'; //import { server } from '@/pages/login/server/model';
export interface User { export interface User {
code?: string; code?: string;
msg?: string; msg?: string;
@ -160,11 +160,11 @@ class SessionService extends VuexModule {
} }
//查询版本号 //查询版本号
@MutationAction @MutationAction
async QueryVersion() { async QueryVersion(serverAddress: string) {
const a = server.serverAddress; //const a = server.serverAddress;
//const a = ServeUrl.server.address; //const a = ServeUrl.server.address;
console.log('a', a); console.log('serverAddress', serverAddress);
const res: any = await request.get(a + '/sgNginxDownload/Debug/setup.json'); const res: any = await request.get(serverAddress + '/sgNginxDownload/Debug/setup.json');
const Version = res.version; const Version = res.version;
const url = res.url + '/' + res.file; const url = res.url + '/' + res.file;
console.log('url..........', url); console.log('url..........', url);

Loading…
Cancel
Save