首頁組件
This commit is contained in:
130
App.vue
130
App.vue
@@ -10,70 +10,70 @@
|
||||
// console.log('App Show');
|
||||
try {
|
||||
// #ifdef APP-PLUS
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
let system = res;
|
||||
if (system.platform == 'ios') {
|
||||
console.log('ios', 64);
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 1,
|
||||
method: 'POST',
|
||||
// header: {
|
||||
// userId: uni.getStorageSync('userId'),
|
||||
// token: uni.getStorageSync('token'),
|
||||
// myLoginName: uni.getStorageSync('myLoginName')
|
||||
// },
|
||||
success: (res) => {
|
||||
let datares = res.data;
|
||||
// uni.showToast({
|
||||
// title: res.message || res.msg,
|
||||
// icon: "none",
|
||||
// })
|
||||
// console.log(datares, '11111111')
|
||||
if (datares.code == 200) {
|
||||
uni.is_update = datares.data.versionCode; //是版本号,判断是否升级
|
||||
uni.is_force = datares.data.forceUpdate; //是否强制更新 1:强制 0:未强制
|
||||
uni.versionName = datares.data.versionName; //是版本号 显示版本号
|
||||
uni.is_wgt = 0; //是热更新 目前好像没有该功能
|
||||
uni.updateUrlApp = datares.data.url; //是下载地址
|
||||
uni.update_content = datares.data.updateInfo; //版本说明
|
||||
// uni.pro.switchTab('index/index');
|
||||
}
|
||||
},
|
||||
fail: (res) => {
|
||||
// uni.showToast({
|
||||
// title: res.message || res.msg,
|
||||
// icon: "none",
|
||||
// })
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log(res, 66);
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 0,
|
||||
method: 'POST',
|
||||
// header: {
|
||||
// userId: uni.getStorageSync('userId'),
|
||||
// token: uni.getStorageSync('token'),
|
||||
// myLoginName: uni.getStorageSync('myLoginName')
|
||||
// },
|
||||
success: (res) => {
|
||||
let datares = res.data;
|
||||
console.log(res);
|
||||
if (datares.code == 200) {
|
||||
uni.is_update = datares.data.versionCode; //是版本号,判断是否升级
|
||||
uni.is_force = datares.data.forceUpdate; //是否强制更新 1:强制 0:未强制
|
||||
uni.versionName = datares.data.versionName; //是版本号 显示版本号
|
||||
uni.is_wgt = 0; //是热更新 目前好像没有该功能
|
||||
uni.updateUrlApp = datares.data.url; //是下载地址
|
||||
uni.update_content = datares.data.updateInfo; //版本说明
|
||||
// uni.pro.switchTab('index/index');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
// uni.getSystemInfo({
|
||||
// success: (res) => {
|
||||
// let system = res;
|
||||
// if (system.platform == 'ios') {
|
||||
// console.log('ios', 64);
|
||||
// uni.request({
|
||||
// url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 1,
|
||||
// method: 'POST',
|
||||
// // header: {
|
||||
// // userId: uni.getStorageSync('userId'),
|
||||
// // token: uni.getStorageSync('token'),
|
||||
// // myLoginName: uni.getStorageSync('myLoginName')
|
||||
// // },
|
||||
// success: (res) => {
|
||||
// let datares = res.data;
|
||||
// // uni.showToast({
|
||||
// // title: res.message || res.msg,
|
||||
// // icon: "none",
|
||||
// // })
|
||||
// // console.log(datares, '11111111')
|
||||
// if (datares.code == 200) {
|
||||
// uni.is_update = datares.data.versionCode; //是版本号,判断是否升级
|
||||
// uni.is_force = datares.data.forceUpdate; //是否强制更新 1:强制 0:未强制
|
||||
// uni.versionName = datares.data.versionName; //是版本号 显示版本号
|
||||
// uni.is_wgt = 0; //是热更新 目前好像没有该功能
|
||||
// uni.updateUrlApp = datares.data.url; //是下载地址
|
||||
// uni.update_content = datares.data.updateInfo; //版本说明
|
||||
// // uni.pro.switchTab('index/index');
|
||||
// }
|
||||
// },
|
||||
// fail: (res) => {
|
||||
// // uni.showToast({
|
||||
// // title: res.message || res.msg,
|
||||
// // icon: "none",
|
||||
// // })
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// console.log(res, 66);
|
||||
// uni.request({
|
||||
// url: uni.conf.baseUrl + '/api/systemConfig/updateSystemVersion?platformCode=' + 0,
|
||||
// method: 'POST',
|
||||
// // header: {
|
||||
// // userId: uni.getStorageSync('userId'),
|
||||
// // token: uni.getStorageSync('token'),
|
||||
// // myLoginName: uni.getStorageSync('myLoginName')
|
||||
// // },
|
||||
// success: (res) => {
|
||||
// let datares = res.data;
|
||||
// console.log(res);
|
||||
// if (datares.code == 200) {
|
||||
// uni.is_update = datares.data.versionCode; //是版本号,判断是否升级
|
||||
// uni.is_force = datares.data.forceUpdate; //是否强制更新 1:强制 0:未强制
|
||||
// uni.versionName = datares.data.versionName; //是版本号 显示版本号
|
||||
// uni.is_wgt = 0; //是热更新 目前好像没有该功能
|
||||
// uni.updateUrlApp = datares.data.url; //是下载地址
|
||||
// uni.update_content = datares.data.updateInfo; //版本说明
|
||||
// // uni.pro.switchTab('index/index');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// #endif
|
||||
} catch (e) {}
|
||||
},
|
||||
@@ -139,7 +139,7 @@
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #f2f2f2;
|
||||
background-color: #F9F9F9;
|
||||
}
|
||||
|
||||
text {
|
||||
|
||||
Reference in New Issue
Block a user